diff --git a/tools/lint-md.js b/tools/lint-md.js index 461308fb749bd8..495f9536db6dc9 100644 --- a/tools/lint-md.js +++ b/tools/lint-md.js @@ -1,2 +1,44426 @@ -#!/usr/bin/env node -module.exports=function(e,r){"use strict";var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var n=t[r]={i:r,l:false,exports:{}};e[r].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(313)}r(__webpack_require__);return startup()}([,,function(e,r,t){"use strict";var n=t(129);var i=t(536);var u=t(928);var o=t(926);var s=t(542);var a=t(966);e.exports=encode;encode.escape=escape;var f={}.hasOwnProperty;var c=['"',"'","<",">","&","`"];var l=construct();var p=toExpression(c);var h=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var v=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;function encode(e,r){var t=r||{};var n=t.subset;var i=n?toExpression(n):p;var u=t.escapeOnly;var o=t.omitOptionalSemicolons;e=e.replace(i,replace);if(n||u){return e}return e.replace(h,replaceSurrogatePair).replace(v,replace);function replaceSurrogatePair(e,r,t){return toHexReference((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,t.charAt(r+2),o)}function replace(e,r,n){return one(e,n.charAt(r+1),t)}}function escape(e){return encode(e,{escapeOnly:true,useNamedReferences:true})}function one(e,r,t){var n=t.useShortestReferences;var i=t.omitOptionalSemicolons;var u;var o;var s;var a;if((n||t.useNamedReferences)&&f.call(l,e)){u=toNamed(l[e],r,i,t.attribute)}if(n||!u){o=e.charCodeAt(0);s=toHexReference(o,r,i);if(n){a=toDecimalReference(o,r,i);if(a.lengthArray.isArray(e)?e:[e];const a=(e,r)=>{if(typeof e==="function"){return e}if(typeof e==="string"){const t=n(e,r);return r=>e===r||t(r)}if(e instanceof RegExp){return r=>e.test(r)}return e=>false};const f=(e,r,t,n)=>{const u=Array.isArray(t);const o=u?t[0]:t;if(!u&&typeof o!=="string"){throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(o))}const s=i(o);for(let e=0;e{if(e==null){throw new TypeError("anymatch: specify first argument")}const i=typeof t==="boolean"?{returnIndex:t}:t;const c=i.returnIndex||false;const l=s(e);const p=l.filter(e=>typeof e==="string"&&e.charAt(0)===u).map(e=>e.slice(1)).map(e=>n(e,i));const h=l.map(e=>a(e,i));if(r==null){return(e,r=false)=>{const t=typeof r==="boolean"?r:false;return f(h,p,e,t)}}return f(h,p,r,c)};c.default=c;e.exports=c},,function(e,r,t){"use strict";var n=t(608);var i=t(960);var u=t(353);var o=t(591);var s=t(263);e.exports=n("remark-lint:no-duplicate-definitions",noDuplicateDefinitions);var a="Do not use definitions with the same identifier";function noDuplicateDefinitions(e,r){var t={};s(e,["definition","footnoteDefinition"],validate);function validate(e){var n;var s;if(!u(e)){n=e.identifier;s=t[n];if(s&&s.type){r.message(a+" ("+o(i.start(s))+")",e)}t[n]=e}}}},function(e){"use strict";var r="";var t;e.exports=repeat;function repeat(e,n){if(typeof e!=="string"){throw new TypeError("expected a string")}if(n===1)return e;if(n===2)return e+e;var i=e.length*n;if(t!==e||typeof t==="undefined"){t=e;r=""}else if(r.length>=i){return r.substr(0,i)}while(i>r.length&&n>1){if(n&1){r+=e}n>>=1;e+=e}r+=e;r=r.substr(0,i);return r}},function(e,r,t){"use strict";var n=t(457);var i=t(685);function deprecated(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=t(945);e.exports.Schema=t(43);e.exports.FAILSAFE_SCHEMA=t(581);e.exports.JSON_SCHEMA=t(23);e.exports.CORE_SCHEMA=t(611);e.exports.DEFAULT_SAFE_SCHEMA=t(723);e.exports.DEFAULT_FULL_SCHEMA=t(910);e.exports.load=n.load;e.exports.loadAll=n.loadAll;e.exports.safeLoad=n.safeLoad;e.exports.safeLoadAll=n.safeLoadAll;e.exports.dump=i.dump;e.exports.safeDump=i.safeDump;e.exports.YAMLException=t(556);e.exports.MINIMAL_SCHEMA=t(581);e.exports.SAFE_SCHEMA=t(723);e.exports.DEFAULT_SCHEMA=t(910);e.exports.scan=deprecated("scan");e.exports.parse=deprecated("parse");e.exports.compose=deprecated("compose");e.exports.addConstructor=deprecated("addConstructor")},function(e){"use strict";e.exports=marker;var r=/\s+/g;var t=/\s+([-a-z0-9_]+)(?:=(?:"((?:\\[\s\S]|[^"])+)"|'((?:\\[\s\S]|[^'])+)'|((?:\\[\s\S]|[^"'\s])+)))?/gi;var n=/\s*([a-zA-Z0-9-]+)(\s+([\s\S]*))?\s*/;var i=new RegExp("(\\s*\x3c!--"+n.source+"--\x3e\\s*)");function marker(e){var r;var t;var u;var o;if(!e){return null}r=e.type;if(r!=="html"&&r!=="comment"){return null}t=e.value;u=t.match(r==="comment"?n:i);if(!u||u[0].length!==t.length){return null}u=u.slice(e.type==="comment"?1:2);o=parameters(u[1]||"");if(!o){return null}return{name:u[0],attributes:u[2]||"",parameters:o,node:e}}function parameters(e){var n={};var i=e.replace(t,replacer);return i.replace(r,"")?null:n;function replacer(e,r,t,i,u){var o=t||i||u||"";if(o==="true"||o===""){o=true}else if(o==="false"){o=false}else if(!isNaN(o)){o=Number(o)}n[r]=o;return""}}},function(e){e.exports=wrappy;function wrappy(e,r){if(e&&r)return wrappy(e)(r);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach(function(r){wrapper[r]=e[r]});return wrapper;function wrapper(){var r=new Array(arguments.length);for(var t=0;t{if(typeof r==="string"){t=r;r=null}try{try{return JSON.parse(e,r)}catch(t){i(e,r);throw t}}catch(e){e.message=e.message.replace(/\n/g,"");const r=new u(e);if(t){r.fileName=t}throw r}})},,,,,function(e){"use strict";e.exports=atxHeading;var r="\n";var t="\t";var n=" ";var i="#";var u=6;function atxHeading(e,o,s){var a=this;var f=a.options.pedantic;var c=o.length+1;var l=-1;var p=e.now();var h="";var v="";var D;var d;var g;while(++lu){return}if(!g||!f&&o.charAt(l+1)===i){return}c=o.length+1;d="";while(++l=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},,,,,function(e,r,t){var n=t(11);e.exports=n(once);e.exports.strict=n(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(e){var r=function(){if(r.called)return r.value;r.called=true;return r.value=e.apply(this,arguments)};r.called=false;return r}function onceStrict(e){var r=function(){if(r.called)throw new Error(r.onceError);r.called=true;return r.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";r.onceError=t+" shouldn't be called more than once";r.called=false;return r}},,function(e,r,t){"use strict";var n=t(270);var i=t(161);e.exports=i;var u=i.prototype;u.message=message;u.info=info;u.fail=fail;function message(e,r,t){var i=this.path;var u=new n(e,r,t);if(i){u.name=i+":"+u.name;u.file=i}u.fatal=false;this.messages.push(u);return u}function fail(){var e=this.message.apply(this,arguments);e.fatal=true;throw e}function info(){var e=this.message.apply(this,arguments);e.fatal=null;return e}},,,function(e,r,t){"use strict";var n=t(218);e.exports=compile;function compile(){return this.visit(n(this.tree,this.options.commonmark))}},,,,,,,,function(e,r){r.parse=r.decode=decode;r.stringify=r.encode=encode;r.safe=safe;r.unsafe=unsafe;var t=typeof process!=="undefined"&&process.platform==="win32"?"\r\n":"\n";function encode(e,r){var n=[];var i="";if(typeof r==="string"){r={section:r,whitespace:false}}else{r=r||{};r.whitespace=r.whitespace===true}var u=r.whitespace?" = ":"=";Object.keys(e).forEach(function(r,o,s){var a=e[r];if(a&&Array.isArray(a)){a.forEach(function(e){i+=safe(r+"[]")+u+safe(e)+"\n"})}else if(a&&typeof a==="object"){n.push(r)}else{i+=safe(r)+u+safe(a)+t}});if(r.section&&i.length){i="["+safe(r.section)+"]"+t+i}n.forEach(function(n,u,o){var s=dotSplit(n).join("\\.");var a=(r.section?r.section+".":"")+s;var f=encode(e[n],{section:a,whitespace:r.whitespace});if(i.length&&f.length){i+=t}i+=f});return i}function dotSplit(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function decode(e){var r={};var t=r;var n=null;var i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;var u=e.split(/[\r\n]+/g);u.forEach(function(e,u,o){if(!e||e.match(/^\s*[;#]/))return;var s=e.match(i);if(!s)return;if(s[1]!==undefined){n=unsafe(s[1]);t=r[n]=r[n]||{};return}var a=unsafe(s[2]);var f=s[3]?unsafe(s[4]):true;switch(f){case"true":case"false":case"null":f=JSON.parse(f)}if(a.length>2&&a.slice(-2)==="[]"){a=a.substring(0,a.length-2);if(!t[a]){t[a]=[]}else if(!Array.isArray(t[a])){t[a]=[t[a]]}}if(Array.isArray(t[a])){t[a].push(f)}else{t[a]=f}});Object.keys(r).filter(function(e,t,n){if(!r[e]||typeof r[e]!=="object"||Array.isArray(r[e])){return false}var i=dotSplit(e);var u=r;var o=i.pop();var s=o.replace(/\\\./g,".");i.forEach(function(e,r,t){if(!u[e]||typeof u[e]!=="object")u[e]={};u=u[e]});if(u===r&&s===o){return false}u[s]=r[e];return true}).forEach(function(e,t,n){delete r[e]});return r}function isQuoted(e){return e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'"}function safe(e){return typeof e!=="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&isQuoted(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function unsafe(e,r){e=(e||"").trim();if(isQuoted(e)){if(e.charAt(0)==="'"){e=e.substr(1,e.length-2)}try{e=JSON.parse(e)}catch(e){}}else{var t=false;var n="";for(var i=0,u=e.length;i=y){y=0}}else if(E===v){m++;B+=r.charAt(m)}else if((!y||C)&&E===h){L++}else if((!y||C)&&E===D){if(L){L--}else{if(!b){while(m=e.length?e.length:i+t;r.message+=` while parsing near '${n===0?"":"..."}${e.slice(n,u)}${u===e.length?"":"..."}'`}else{r.message+=` while parsing '${e.slice(0,t*2)}'`}throw r}}},function(e,r,t){const n=t(867);const i=t(669);r.init=init;r.log=log;r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.colors=[6,2,3,4,5,1];try{const e=t(247);if(e&&(e.stderr||e).level>=2){r.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}r.inspectOpts=Object.keys(process.env).filter(e=>{return/^debug_/i.test(e)}).reduce((e,r)=>{const t=r.substring(6).toLowerCase().replace(/_([a-z])/g,(e,r)=>{return r.toUpperCase()});let n=process.env[r];if(/^(yes|on|true|enabled)$/i.test(n)){n=true}else if(/^(no|off|false|disabled)$/i.test(n)){n=false}else if(n==="null"){n=null}else{n=Number(n)}e[t]=n;return e},{});function useColors(){return"colors"in r.inspectOpts?Boolean(r.inspectOpts.colors):n.isatty(process.stderr.fd)}function formatArgs(r){const{namespace:t,useColors:n}=this;if(n){const n=this.color;const i="[3"+(n<8?n:"8;5;"+n);const u=` ${i};1m${t} `;r[0]=u+r[0].split("\n").join("\n"+u);r.push(i+"m+"+e.exports.humanize(this.diff)+"")}else{r[0]=getDate()+t+" "+r[0]}}function getDate(){if(r.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const t=Object.keys(r.inspectOpts);for(let n=0;n0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1))===-1){i-=1;if(this.position-i>r/2-1){t=" ... ";i+=5;break}}u="";o=this.position;while(or/2-1){u=" ... ";o-=5;break}}s=this.buffer.slice(i,o);return n.repeat(" ",e)+t+s+u+"\n"+n.repeat(" ",e+this.position-i+t.length)+"^"};Mark.prototype.toString=function toString(e){var r,t="";if(this.name){t+='in "'+this.name+'" '}t+="at line "+(this.line+1)+", column "+(this.column+1);if(!e){r=this.getSnippet();if(r){t+=":\n"+r}}return t};e.exports=Mark},function(e,r,t){"use strict";var n=t(940);var i=t(215);var u=t(957);e.exports=setOptions;function setOptions(e){var r=this;var t=r.options;var o;var s;if(e==null){e={}}else if(typeof e==="object"){e=n(e)}else{throw new Error("Invalid value `"+e+"` for setting `options`")}for(o in u){s=e[o];if(s==null){s=t[o]}if(o!=="blocks"&&typeof s!=="boolean"||o==="blocks"&&typeof s!=="object"){throw new Error("Invalid value `"+s+"` for setting `options."+o+"`")}e[o]=s}r.options=e;r.escape=i(e);return r}},,function(e,r,t){"use strict";var n=t(551);var i=t(240);e.exports=fileSystem;function fileSystem(e,r,t){var u=e.files;if(u.length===0){t()}else{i(u,{cwd:r.cwd,extensions:r.extensions,silentlyIgnore:r.silentlyIgnore,ignorePatterns:r.ignorePatterns,ignore:new n({cwd:r.cwd,detectIgnore:r.detectIgnore,ignoreName:r.ignoreName,ignorePath:r.ignorePath})},onfound)}function onfound(n,i){var u=i.files;u.sort(sortAlphabetically);u.forEach(markAsGiven);e.files=u;if(r.out===null||r.out===undefined){r.out=i.oneFileMode}t(n)}function markAsGiven(e){e.data.unifiedEngineGiven=true}function sortAlphabetically(e,r){return e.pathArray.isArray(e)?e:[e];const V=(e,r=[])=>{e.forEach(e=>{if(Array.isArray(e)){V(e,r)}else{r.push(e)}});return r};const J=e=>{const r=V(z(e));if(!r.every(e=>typeof e===N)){throw new TypeError(`Non-string provided as watch path: ${r}`)}return r.map(Q)};const Z=e=>{let r=e.replace(S,x);while(r.match(_)){r=r.replace(_,x)}return r};const Q=e=>Z(u.normalize(Z(e)));const X=(e=H)=>r=>{if(typeof r!==N)return r;return Q(u.isAbsolute(r)?r:u.join(e,r))};const K=(e,r)=>{if(u.isAbsolute(e)){return e}if(e.startsWith(T)){return T+u.join(r,e.slice(1))}return u.join(r,e)};const ee=(e,r)=>e[r]===undefined;class DirEntry{constructor(e,r){this.path=e;this._removeWatcher=r;this.items=new Set}add(e){const{items:r}=this;if(!r)return;if(e!==I&&e!==L)r.add(e)}async remove(e){const{items:r}=this;if(!r)return;r.delete(e);if(!r.size){const e=this.path;try{await Y(e)}catch(r){this._removeWatcher(u.dirname(e),u.basename(e))}}}has(e){const{items:r}=this;if(!r)return;return r.has(e)}getChildren(){const{items:e}=this;if(!e)return;return[...e.values()]}dispose(){this.items.clear();delete this.path;delete this._removeWatcher;delete this.items;Object.freeze(this)}}const re="stat";const te="lstat";class WatchHelper{constructor(e,r,t,n){this.fsw=n;this.path=e=e.replace(k,H);this.watchPath=r;this.fullWatchPath=u.resolve(r);this.hasGlob=r!==e;if(e===H)this.hasGlob=false;this.globSymlink=this.hasGlob&&t?undefined:false;this.globFilter=this.hasGlob?a(e,undefined,P):false;this.dirParts=this.getDirParts(e);this.dirParts.forEach(e=>{if(e.length>1)e.pop()});this.followSymlinks=t;this.statMethod=t?re:te}checkGlobSymlink(e){if(this.globSymlink===undefined){this.globSymlink=e.fullParentDir===this.fullWatchPath?false:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}}if(this.globSymlink){return e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath)}return e.fullPath}entryPath(e){return u.join(this.watchPath,u.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:r}=e;if(r&&r.isSymbolicLink())return this.filterDir(e);const t=this.entryPath(e);const n=this.hasGlob&&typeof this.globFilter===$?this.globFilter(t):true;return n&&this.fsw._isntIgnored(t,r)&&this.fsw._hasReadPermissions(r)}getDirParts(e){if(!this.hasGlob)return[];const r=[];const t=e.includes(R)?l.expand(e):[e];t.forEach(e=>{r.push(u.relative(this.watchPath,e).split(B))});return r}filterDir(e){if(this.hasGlob){const r=this.getDirParts(this.checkGlobSymlink(e));let t=false;this.unmatchedGlob=!this.dirParts.some(e=>{return e.every((e,n)=>{if(e===M)t=true;return t||!r[0][n]||a(e,r[0][n],P)})})}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class FSWatcher extends n{constructor(e){super();const r={};if(e)Object.assign(r,e);this._watched=new Map;this._closers=new Map;this._ignoredPaths=new Set;this._throttled=new Map;this._symlinkPaths=new Map;this._streams=new Set;this.closed=false;if(ee(r,"persistent"))r.persistent=true;if(ee(r,"ignoreInitial"))r.ignoreInitial=false;if(ee(r,"ignorePermissionErrors"))r.ignorePermissionErrors=false;if(ee(r,"interval"))r.interval=100;if(ee(r,"binaryInterval"))r.binaryInterval=300;if(ee(r,"disableGlobbing"))r.disableGlobbing=false;r.enableBinaryInterval=r.binaryInterval!==r.interval;if(ee(r,"useFsEvents"))r.useFsEvents=!r.usePolling;const t=v.canUse();if(!t)r.useFsEvents=false;if(ee(r,"usePolling")&&!r.useFsEvents){r.usePolling=G}const n=process.env.CHOKIDAR_USEPOLLING;if(n!==undefined){const e=n.toLowerCase();if(e==="false"||e==="0"){r.usePolling=false}else if(e==="true"||e==="1"){r.usePolling=true}else{r.usePolling=!!e}}const i=process.env.CHOKIDAR_INTERVAL;if(i){r.interval=Number.parseInt(i,10)}if(ee(r,"atomic"))r.atomic=!r.usePolling&&!r.useFsEvents;if(r.atomic)this._pendingUnlinks=new Map;if(ee(r,"followSymlinks"))r.followSymlinks=true;if(ee(r,"awaitWriteFinish"))r.awaitWriteFinish=false;if(r.awaitWriteFinish===true)r.awaitWriteFinish={};const u=r.awaitWriteFinish;if(u){if(!u.stabilityThreshold)u.stabilityThreshold=2e3;if(!u.pollInterval)u.pollInterval=100;this._pendingWrites=new Map}if(r.ignored)r.ignored=z(r.ignored);let o=0;this._emitReady=(()=>{o++;if(o>=this._readyCount){this._emitReady=U;this._readyEmitted=true;process.nextTick(()=>this.emit(d))}});this._emitRaw=((...e)=>this.emit(C,...e));this._readyEmitted=false;this.options=r;if(r.useFsEvents){this._fsEventsHandler=new v(this)}else{this._nodeFsHandler=new h(this)}Object.freeze(r)}add(e,r,t){const{cwd:n,disableGlobbing:i}=this.options;this.closed=false;let o=J(e);if(n){o=o.map(e=>{const r=K(e,n);if(i||!c(e)){return r}return p(r)})}o=o.filter(e=>{if(e.startsWith(T)){this._ignoredPaths.add(e.slice(1));return false}this._ignoredPaths.delete(e);this._ignoredPaths.delete(e+j);this._userIgnored=undefined;return true});if(this.options.useFsEvents&&this._fsEventsHandler){if(!this._readyCount)this._readyCount=o.length;if(this.options.persistent)this._readyCount*=2;o.forEach(e=>this._fsEventsHandler._addToFsEvents(e))}else{if(!this._readyCount)this._readyCount=0;this._readyCount+=o.length;Promise.all(o.map(async e=>{const n=await this._nodeFsHandler._addToNodeFs(e,!t,0,0,r);if(n)this._emitReady();return n})).then(e=>{if(this.closed)return;e.filter(e=>e).forEach(e=>{this.add(u.dirname(e),u.basename(r||e))})})}return this}unwatch(e){if(this.closed)return this;const r=J(e);const{cwd:t}=this.options;r.forEach(e=>{if(!u.isAbsolute(e)&&!this._closers.has(e)){if(t)e=u.join(t,e);e=u.resolve(e)}this._closePath(e);this._ignoredPaths.add(e);if(this._watched.has(e)){this._ignoredPaths.add(e+j)}this._userIgnored=undefined});return this}close(){if(this.closed)return this;this.closed=true;this.removeAllListeners();const e=[];this._closers.forEach(r=>r.forEach(r=>{const t=r();if(t instanceof Promise)e.push(t)}));this._streams.forEach(e=>e.destroy());this._userIgnored=undefined;this._readyCount=0;this._readyEmitted=false;this._watched.forEach(e=>e.dispose());["closers","watched","streams","symlinkPaths","throttled"].forEach(e=>{this[`_${e}`].clear()});return e.length?Promise.all(e).then(()=>undefined):Promise.resolve()}getWatched(){const e={};this._watched.forEach((r,t)=>{const n=this.options.cwd?u.relative(this.options.cwd,t):t;e[n||I]=r.getChildren().sort()});return e}emitWithAll(e,r){this.emit(...r);if(e!==w)this.emit(D,...r)}async _emit(e,r,t,n,i){if(this.closed)return;const o=this.options;if(W)r=u.normalize(r);if(o.cwd)r=u.relative(o.cwd,r);const s=[e,r];if(i!==undefined)s.push(t,n,i);else if(n!==undefined)s.push(t,n);else if(t!==undefined)s.push(t);const a=o.awaitWriteFinish;let f;if(a&&(f=this._pendingWrites.get(r))){f.lastChange=new Date;return this}if(o.atomic){if(e===E){this._pendingUnlinks.set(r,s);setTimeout(()=>{this._pendingUnlinks.forEach((e,r)=>{this.emit(...e);this.emit(D,...e);this._pendingUnlinks.delete(r)})},typeof o.atomic==="number"?o.atomic:100);return this}if(e===g&&this._pendingUnlinks.has(r)){e=s[0]=m;this._pendingUnlinks.delete(r)}}if(a&&(e===g||e===m)&&this._readyEmitted){const t=(r,t)=>{if(r){e=s[0]=w;s[1]=r;this.emitWithAll(e,s)}else if(t){if(s.length>2){s[2]=t}else{s.push(t)}this.emitWithAll(e,s)}};this._awaitWriteFinish(r,a.stabilityThreshold,e,t);return this}if(e===m){const e=!this._throttle(m,r,50);if(e)return this}if(o.alwaysStat&&t===undefined&&(e===g||e===b||e===m)){const t=o.cwd?u.join(o.cwd,r):r;try{const r=await q(t);if(!r)return;s.push(r);this.emitWithAll(e,s)}catch(e){}}else{this.emitWithAll(e,s)}return this}_handleError(e){const r=e&&e.code;if(e&&r!=="ENOENT"&&r!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||r!=="EPERM"&&r!=="EACCES")){this.emit(w,e)}return e||this.closed}_throttle(e,r,t){if(!this._throttled.has(e)){this._throttled.set(e,new Map)}const n=this._throttled.get(e);const i=n.get(r);if(i){i.count++;return false}let u;const o=()=>{const e=n.get(r);const t=e?e.count:0;n.delete(r);clearTimeout(u);if(e)clearTimeout(e.timeoutObject);return t};u=setTimeout(o,t);const s={timeoutObject:u,clear:o,count:0};n.set(r,s);return s}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,r,t,n){let o;let s=e;if(this.options.cwd&&!u.isAbsolute(e)){s=u.join(this.options.cwd,e)}const a=new Date;const f=t=>{i.stat(s,(i,u)=>{if(i||!this._pendingWrites.has(e)){if(i&&i.code!=="ENOENT")n(i);return}const s=Number(new Date);if(t&&u.size!==t.size){this._pendingWrites.get(e).lastChange=s}const a=this._pendingWrites.get(e);const c=s-a.lastChange;if(c>=r){this._pendingWrites.delete(e);n(undefined,u)}else{o=setTimeout(f,this.options.awaitWriteFinish.pollInterval,u)}})};if(!this._pendingWrites.has(e)){this._pendingWrites.set(e,{lastChange:a,cancelWait:()=>{this._pendingWrites.delete(e);clearTimeout(o);return t}});o=setTimeout(f,this.options.awaitWriteFinish.pollInterval)}}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,r){if(this.options.atomic&&O.test(e))return true;if(!this._userIgnored){const{cwd:e}=this.options;const r=this.options.ignored;const t=r&&r.map(X(e));const n=z(t).filter(e=>typeof e===N&&!c(e)).map(e=>e+j);const i=this._getGlobIgnored().map(X(e)).concat(t,n);this._userIgnored=a(i,undefined,P)}return this._userIgnored([e,r])}_isntIgnored(e,r){return!this._isIgnored(e,r)}_getWatchHelpers(e,r){const t=r||this.options.disableGlobbing||!c(e)?e:f(e);const n=this.options.followSymlinks;return new WatchHelper(e,t,n,this)}_getWatchedDir(e){if(!this._boundRemove)this._boundRemove=this._remove.bind(this);const r=u.resolve(e);if(!this._watched.has(r))this._watched.set(r,new DirEntry(r,this._boundRemove));return this._watched.get(r)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return true;const r=e&&Number.parseInt(e.mode,10);const t=r&511;const n=Number.parseInt(t.toString(8)[0],10);return Boolean(4&n)}_remove(e,r){const t=u.join(e,r);const n=u.resolve(t);const i=this._watched.has(t)||this._watched.has(n);if(!this._throttle("remove",t,100))return;if(!i&&!this.options.useFsEvents&&this._watched.size===1){this.add(e,r,true)}const o=this._getWatchedDir(t);const s=o.getChildren();s.forEach(e=>this._remove(t,e));const a=this._getWatchedDir(e);const f=a.has(r);a.remove(r);let c=t;if(this.options.cwd)c=u.relative(this.options.cwd,t);if(this.options.awaitWriteFinish&&this._pendingWrites.has(c)){const e=this._pendingWrites.get(c).cancelWait();if(e===g)return}this._watched.delete(t);this._watched.delete(n);const l=i?A:E;if(f&&!this._isIgnored(t))this._emit(l,t);if(!this.options.useFsEvents){this._closePath(t)}}_closePath(e){const r=this._closers.get(e);if(!r)return;r.forEach(e=>e());this._closers.delete(e);const t=u.dirname(e);this._getWatchedDir(t).remove(u.basename(e))}_addPathCloser(e,r){if(!r)return;let t=this._closers.get(e);if(!t){t=[];this._closers.set(e,t)}t.push(r)}_readdirp(e,r){if(this.closed)return;const t={type:D,alwaysStat:true,lstat:true,...r};let n=s(e,t);this._streams.add(n);n.once(F,()=>{n=undefined});n.once(y,()=>{if(n){this._streams.delete(n);n=undefined}});return n}}r.FSWatcher=FSWatcher;const ne=(e,r)=>{const t=new FSWatcher(r);t.add(e);return t};r.watch=ne},function(e,r,t){"use strict";var n=t(170);var i=t(520);e.exports=transform;function transform(e,r,t){var u=new n;e.fileSet=u;u.on("add",add).on("done",t);if(e.files.length===0){t()}else{e.files.forEach(u.add,u)}function add(t){i.run({configuration:e.configuration,processor:r.processor(),cwd:r.cwd,extensions:r.extensions,pluginPrefix:r.pluginPrefix,treeIn:r.treeIn,treeOut:r.treeOut,inspect:r.inspect,color:r.color,out:r.out,output:r.output,streamOut:r.streamOut,alwaysStringify:r.alwaysStringify},t,u,done);function done(e){if(e){e=t.message(e);e.fatal=true}u.emit("one",t)}}}},,,,,,,function(e){e.exports=function(e,r){if(!r)r={};var t={bools:{},strings:{},unknownFn:null};if(typeof r["unknown"]==="function"){t.unknownFn=r["unknown"]}if(typeof r["boolean"]==="boolean"&&r["boolean"]){t.allBools=true}else{[].concat(r["boolean"]).filter(Boolean).forEach(function(e){t.bools[e]=true})}var n={};Object.keys(r.alias||{}).forEach(function(e){n[e]=[].concat(r.alias[e]);n[e].forEach(function(r){n[r]=[e].concat(n[e].filter(function(e){return r!==e}))})});[].concat(r.string).filter(Boolean).forEach(function(e){t.strings[e]=true;if(n[e]){t.strings[n[e]]=true}});var i=r["default"]||{};var u={_:[]};Object.keys(t.bools).forEach(function(e){setArg(e,i[e]===undefined?false:i[e])});var o=[];if(e.indexOf("--")!==-1){o=e.slice(e.indexOf("--")+1);e=e.slice(0,e.indexOf("--"))}function argDefined(e,r){return t.allBools&&/^--[^=]+$/.test(r)||t.strings[e]||t.bools[e]||n[e]}function setArg(e,r,i){if(i&&t.unknownFn&&!argDefined(e,i)){if(t.unknownFn(i)===false)return}var o=!t.strings[e]&&isNumber(r)?Number(r):r;setKey(u,e.split("."),o);(n[e]||[]).forEach(function(e){setKey(u,e.split("."),o)})}function setKey(e,r,n){var i=e;r.slice(0,-1).forEach(function(e){if(i[e]===undefined)i[e]={};i=i[e]});var u=r[r.length-1];if(i[u]===undefined||t.bools[u]||typeof i[u]==="boolean"){i[u]=n}else if(Array.isArray(i[u])){i[u].push(n)}else{i[u]=[i[u],n]}}function aliasIsBoolean(e){return n[e].some(function(e){return t.bools[e]})}for(var s=0;s=e.length){if(r)r[o]=e;return t(null,e)}a.lastIndex=l;var n=a.exec(e);v=p;p+=n[0];h=v+n[1];l=a.lastIndex;if(c[h]||r&&r[h]===h){return process.nextTick(LOOP)}if(r&&Object.prototype.hasOwnProperty.call(r,h)){return gotResolvedLink(r[h])}return u.lstat(h,gotStat)}function gotStat(e,n){if(e)return t(e);if(!n.isSymbolicLink()){c[h]=true;if(r)r[h]=h;return process.nextTick(LOOP)}if(!i){var o=n.dev.toString(32)+":"+n.ino.toString(32);if(s.hasOwnProperty(o)){return gotTarget(null,s[o],h)}}u.stat(h,function(e){if(e)return t(e);u.readlink(h,function(e,r){if(!i)s[o]=r;gotTarget(e,r)})})}function gotTarget(e,i,u){if(e)return t(e);var o=n.resolve(v,i);if(r)r[u]=o;gotResolvedLink(o)}function gotResolvedLink(r){e=n.resolve(r,e.slice(l));start()}}},function(e){"use strict";e.exports=orderedItems;var r="\n";var t=".";var n=r+r;function orderedItems(e){var i=this;var u=i.visitors.listItem;var o=i.options.incrementListMarker;var s=[];var a=e.start;var f=e.children;var c=f.length;var l=-1;var p;a=a==null?1:a;while(++l{if(Number.isNaN(e)){return false}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false};e.exports=r;e.exports.default=r},function(e){e.exports={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"}},function(e,r,t){"use strict";var n=t(608);var i=t(427);var u=t(263);var o=t(960);var s=t(353);e.exports=n("remark-lint:no-consecutive-blank-lines",noConsecutiveBlankLines);function noConsecutiveBlankLines(e,r){u(e,visitor);function visitor(e){var r=e.children;var t;var n;if(!s(e)&&r){t=r[0];if(t&&!s(t)){compare(o.start(e),o.start(t),0);r.forEach(visitChild);n=r[r.length-1];if(n!==t&&!s(n)){compare(o.end(e),o.end(n),1)}}}}function compare(e,t,n){var u=t.line-e.line;var o=Math.abs(u)-n;var s;if(o>0){s="Remove "+o+" "+i("line",o)+" "+(u>0?"before":"after")+" node";r.message(s,t)}}function visitChild(e,r,t){var n=t[r-1];var i=2;if(n&&!s(n)&&!s(e)){if(n.type==="list"&&e.type==="list"||e.type==="code"&&n.type==="list"&&!e.lang){i++}compare(o.end(n),o.start(e),i)}}}},function(e,r,t){"use strict";const n=t(747);const{Readable:i}=t(413);const u=t(622);const{promisify:o}=t(669);const s=t(558);const a=o(n.readdir);const f=o(n.stat);const c=o(n.lstat);const l="!";const p=new Set(["ENOENT","EPERM","EACCES","ELOOP"]);const h="files";const v="directories";const D="files_directories";const d="all";const g=[h,v,D,d];const m=e=>p.has(e.code);const E=e=>{if(e===undefined)return;if(typeof e==="function")return e;if(typeof e==="string"){const r=s(e.trim());return e=>r(e.basename)}if(Array.isArray(e)){const r=[];const t=[];for(const n of e){const e=n.trim();if(e.charAt(0)===l){t.push(s(e.slice(1)))}else{r.push(s(e))}}if(t.length>0){if(r.length>0){return e=>r.some(r=>r(e.basename))&&!t.some(r=>r(e.basename))}return e=>!t.some(r=>r(e.basename))}return e=>r.some(r=>r(e.basename))}};class ReaddirpStream extends i{static get defaultOptions(){return{root:".",fileFilter:e=>true,directoryFilter:e=>true,type:h,lstat:false,depth:2147483648,alwaysStat:false}}constructor(e={}){super({objectMode:true,autoDestroy:true,highWaterMark:e.highWaterMark||4096});const r={...ReaddirpStream.defaultOptions,...e};const{root:t,type:i}=r;this._fileFilter=E(r.fileFilter);this._directoryFilter=E(r.directoryFilter);const o=r.lstat?c:f;if(process.platform==="win32"&&f.length===3){this._stat=(e=>o(e,{bigint:true}))}else{this._stat=o}this._maxDepth=r.depth;this._wantsDir=[v,D,d].includes(i);this._wantsFile=[h,D,d].includes(i);this._wantsEverything=i===d;this._root=u.resolve(t);this._isDirent="Dirent"in n&&!r.alwaysStat;this._statsProp=this._isDirent?"dirent":"stats";this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent};try{this.parents=[this._exploreDir(t,1)]}catch(e){this.destroy(e)}this.reading=false;this.parent=undefined}async _read(e){if(this.reading)return;this.reading=true;try{while(!this.destroyed&&e>0){const{path:r,depth:t,files:n=[]}=this.parent||{};if(n.length>0){const i=n.splice(0,e).map(e=>this._formatEntry(e,r));for(const r of await Promise.all(i)){if(this._isDirAndMatchesFilter(r)){if(t<=this._maxDepth){this.parents.push(this._exploreDir(r.fullPath,t+1))}if(this._wantsDir){this.push(r);e--}}else if(this._isFileAndMatchesFilter(r)){if(this._wantsFile){this.push(r);e--}}}}else{const e=this.parents.pop();if(!e){this.push(null);break}this.parent=await e}}}catch(e){this.destroy(e)}finally{this.reading=false}}async _exploreDir(e,r){let t;try{t=await a(e,this._rdOptions)}catch(e){this._onError(e)}return{files:t,depth:r,path:e}}async _formatEntry(e,r){const t=this._isDirent?e.name:e;const n=u.resolve(u.join(r,t));const i={path:u.relative(this._root,n),fullPath:n,basename:t};try{i[this._statsProp]=this._isDirent?e:await this._stat(n)}catch(e){this._onError(e)}return i}_onError(e){if(m(e)&&!this.destroyed){this.emit("warn",e)}else{throw e}}_isDirAndMatchesFilter(e){const r=e&&e[this._statsProp];return r&&r.isDirectory()&&this._directoryFilter(e)}_isFileAndMatchesFilter(e){const r=e&&e[this._statsProp];const t=r&&(this._wantsEverything&&!r.isDirectory()||(r.isFile()||r.isSymbolicLink()));return t&&this._fileFilter(e)}}const b=(e,r={})=>{let t=r.entryType||r.type;if(t==="both")t=D;if(t)r.type=t;if(!e){throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)")}else if(typeof e!=="string"){throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)")}else if(t&&!g.includes(t)){throw new Error(`readdirp: Invalid type passed. Use one of ${g.join(", ")}`)}r.root=e;return new ReaddirpStream(r)};const A=(e,r={})=>{return new Promise((t,n)=>{const i=[];b(e,r).on("data",e=>i.push(e)).on("end",()=>t(i)).on("error",e=>n(e))})};b.promise=A;b.ReaddirpStream=ReaddirpStream;b.default=b;e.exports=b},function(e,r,t){"use strict";var n=t(578);e.exports=newline;var i="\n";function newline(e,r,t){var u=r.charAt(0);var o;var s;var a;var f;if(u!==i){return}if(t){return true}f=1;o=r.length;s=u;a="";while(fn){r.message("Move definitions to the end of the file (after the node at line `"+t+"`)",e)}}else if(t===null){t=n}}}},,function(e){"use strict";e.exports=function isArrayish(e){if(!e){return false}return e instanceof Array||Array.isArray(e)||e.length>=0&&e.splice instanceof Function}},function(e,r,t){"use strict";var n=t(860);var i=t(926);var u=t(932);var o=t(418);e.exports=paragraph;var s="\t";var a="\n";var f=" ";var c=4;function paragraph(e,r,t){var l=this;var p=l.options;var h=p.commonmark;var v=p.gfm;var D=l.blockTokenizers;var d=l.interruptParagraph;var g=r.indexOf(a);var m=r.length;var E;var b;var A;var C;var w;while(g=c&&A!==a){g=r.indexOf(a,g+1);continue}}b=r.slice(g+1);if(o(d,D,l,[e,b,true])){break}if(D.list.call(l,e,b,true)&&(l.inList||h||v&&!i(n.left(b).charAt(0)))){break}E=g;g=r.indexOf(a,g+1);if(g!==-1&&n(r.slice(E,g))===""){g=E;break}}b=r.slice(0,g);if(n(b)===""){e(b);return null}if(t){return true}w=e.now();b=u(b);return e(b)({type:"paragraph",children:l.tokenizeInline(b,w)})}},,function(e){"use strict";var r=1;var t=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(e,r,t){return e.slice(r,t).replace(/\S/g," ")}e.exports=function(e,n){n=n||{};var i;var u;var o=false;var s=false;var a=0;var f="";var c=n.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var l=0;l=e.expected){e.emit("done")}}},,function(e,r,t){"use strict";var n=t(617);e.exports=enter;function enter(e,r){var t=e.encode;var i=e.escape;var u=e.enterLink();if(r.referenceType!=="shortcut"&&r.referenceType!=="collapsed"){return u}e.escape=n;e.encode=n;return exit;function exit(){e.encode=t;e.escape=i;u()}}},,function(e){"use strict";e.exports=paragraph;function paragraph(e){return this.all(e).join("")}},function(e){"use strict";e.exports=bail;function bail(e){if(e){throw e}}},,function(e){"use strict";const r=e=>{let r=false;let t=false;let n=false;for(let i=0;i{if(!(typeof e==="string"||Array.isArray(e))){throw new TypeError("Expected the input to be `string | string[]`")}t=Object.assign({pascalCase:false},t);const n=e=>t.pascalCase?e.charAt(0).toUpperCase()+e.slice(1):e;if(Array.isArray(e)){e=e.map(e=>e.trim()).filter(e=>e.length).join("-")}else{e=e.trim()}if(e.length===0){return""}if(e.length===1){return t.pascalCase?e.toUpperCase():e.toLowerCase()}const i=e!==e.toLowerCase();if(i){e=r(e)}e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(e,r)=>r.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase());return n(e)};e.exports=t;e.exports.default=t},,,,,,,,function(e,r,t){"use strict";var n=t(818).codes.ERR_STREAM_PREMATURE_CLOSE;function once(e){var r=false;return function(){if(r)return;r=true;for(var t=arguments.length,n=new Array(t),i=0;i=E){return}_=r.charAt(A);if(_===f||_===l||_===p){B=_;S=false}else{S=true;y="";while(A=E){z=true}if($&&F>=$.indent){z=true}_=r.charAt(A);R=null;if(!z){if(_===f||_===l||_===p){R=_;A++;F++}else{y="";while(A=$.indent||F>E}x=false;A=k}I=r.slice(k,O);T=k===A?I:r.slice(A,O);if(R===f||R===c||R===p){if(m.thematicBreak.call(i,e,I,true)){break}}L=M;M=!x&&!n(T).length;if(z&&$){$.value=$.value.concat(N,I);P=P.concat(N,I);N=[]}else if(x){if(N.length!==0){W=true;$.value.push("");$.trail=N.concat()}$={value:[I],indent:F,trail:[]};j.push($);P=P.concat(N,I);N=[]}else if(M){if(L&&!o){break}N.push(I)}else{if(L){break}if(a(b,m,i,[e,I,true])){break}$.value=$.value.concat(N,I);P=P.concat(N,I);N=[]}A=O+1}G=e(P.join(D)).reset({type:"list",ordered:S,start:w,spread:W,children:[]});H=i.enterList();U=i.enterBlock();A=-1;C=j.length;while(++A?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};e.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:w,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:n.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===true?C:A}}},,,,function(e){"use strict";function isSpecificValue(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp?true:false}function cloneSpecificValue(e){if(e instanceof Buffer){var r=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);e.copy(r);return r}else if(e instanceof Date){return new Date(e.getTime())}else if(e instanceof RegExp){return new RegExp(e)}else{throw new Error("Unexpected situation")}}function deepCloneArray(e){var t=[];e.forEach(function(e,n){if(typeof e==="object"&&e!==null){if(Array.isArray(e)){t[n]=deepCloneArray(e)}else if(isSpecificValue(e)){t[n]=cloneSpecificValue(e)}else{t[n]=r({},e)}}else{t[n]=e}});return t}function safeGetProperty(e,r){return r==="__proto__"?undefined:e[r]}var r=e.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var e=arguments[0];var t=Array.prototype.slice.call(arguments,1);var n,i,u;t.forEach(function(t){if(typeof t!=="object"||t===null||Array.isArray(t)){return}Object.keys(t).forEach(function(u){i=safeGetProperty(e,u);n=safeGetProperty(t,u);if(n===e){return}else if(typeof n!=="object"||n===null){e[u]=n;return}else if(Array.isArray(n)){e[u]=deepCloneArray(n);return}else if(isSpecificValue(n)){e[u]=cloneSpecificValue(n);return}else if(typeof i!=="object"||i===null||Array.isArray(i)){e[u]=r({},n);return}else{e[u]=r(i,n);return}})});return e}},,function(e,r,t){"use strict";var n=t(608);var i=t(427);var u=t(263);var o=t(960);var s=t(353);e.exports=n("remark-lint:list-item-bullet-indent",listItemBulletIndent);var a=o.start;function listItemBulletIndent(e,r){var t=String(r);u(e,"list",visitor);function visitor(e){e.children.forEach(visitItems)}function visitItems(e){var n;var u;var o;if(!s(e)){n=a(e.children[0]);u=t.slice(a(e).offset,n.offset).match(/^\s*/)[0].length;if(u!==0){o="Incorrect indentation before bullet: remove "+u+" "+i("space",u);r.message(o,{line:n.line,column:n.column-u})}}}}},,,,function(e){"use strict";e.exports=list;function list(e){var r=e.ordered?this.visitOrderedItems:this.visitUnorderedItems;return r.call(this,e)}},function(e){e.exports=function(e,r,t){var n=[];var i=e.length;if(0===i)return n;var u=r<0?Math.max(0,r+i):r||0;if(t!==undefined){i=t<0?t+i:t}while(i-- >u){n[i-u]=e[i]}return n}},,function(e,r,t){"use strict";var n=t(608);var i=t(263);var u=t(960);var o=t(353);e.exports=n("remark-lint:no-table-indentation",noTableIndentation);var s="Do not indent table rows";function noTableIndentation(e,r){var t=String(r);i(e,"table",visitor);function visitor(e){if(!o(e)){e.children.forEach(each)}return i.SKIP}function each(e){var n=t.slice(u.start(e).offset,u.start(e.children[0]).offset);if(n.indexOf("|")>1){r.message(s,e)}}}},,,function(e){"use strict";e.exports=escapes;var r=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"];var t=r.concat(["~","|"]);var n=t.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);escapes.default=r;escapes.gfm=t;escapes.commonmark=n;function escapes(e){var i=e||{};if(i.commonmark){return n}return i.gfm?t:r}},,,function(e,r,t){"use strict";var n=t(263);e.exports=compact;function compact(e,r){n(e,visitor);return e;function visitor(e,t,n){var i=n?n.children:[];var u=t&&i[t-1];if(u&&e.type===u.type&&mergeable(u,r)&&mergeable(e,r)){if(e.value){u.value+=e.value}if(e.children){u.children=u.children.concat(e.children)}i.splice(t,1);if(u.position&&e.position){u.position.end=e.position.end}return t}}}function mergeable(e,r){var t;var n;if(e.type==="text"){if(!e.position){return true}t=e.position.start;n=e.position.end;return t.line!==n.line||n.column-t.column===e.value.length}return r&&e.type==="blockquote"}},,,,,,function(e,r,t){"use strict";var n=t(578);e.exports=table;var i="\t";var u="\n";var o=" ";var s="-";var a=":";var f="\\";var c="|";var l=1;var p=2;var h="left";var v="center";var D="right";function table(e,r,t){var d=this;var g;var m;var E;var b;var A;var C;var w;var F;var y;var S;var _;var B;var O;var k;var x;var R;var T;var I;var L;var M;var j;var P;if(!d.options.gfm){return}g=0;R=0;C=r.length+1;w=[];while(gM){if(R1){if(y){b+=F.slice(0,F.length-1);F=F.charAt(F.length-1)}else{b+=F;F=""}}k=e.now();e(b)({type:"tableCell",children:d.tokenizeInline(B,k)},A)}e(F+y);F="";B=""}}else{if(F){B+=F;F=""}B+=y;if(y===f&&g!==C-2){B+=T.charAt(g+1);g++}}O=false;g++}if(!x){e(u+m)}}return L}},function(e,r){"use strict";r.isInteger=(e=>{if(typeof e==="number"){return Number.isInteger(e)}if(typeof e==="string"&&e.trim()!==""){return Number.isInteger(Number(e))}return false});r.find=((e,r)=>e.nodes.find(e=>e.type===r));r.exceedsLimit=((e,t,n=1,i)=>{if(i===false)return false;if(!r.isInteger(e)||!r.isInteger(t))return false;return(Number(t)-Number(e))/Number(n)>=i});r.escapeNode=((e,r=0,t)=>{let n=e.nodes[r];if(!n)return;if(t&&n.type===t||n.type==="open"||n.type==="close"){if(n.escaped!==true){n.value="\\"+n.value;n.escaped=true}}});r.encloseBrace=(e=>{if(e.type!=="brace")return false;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}return false});r.isInvalidBrace=(e=>{if(e.type!=="brace")return false;if(e.invalid===true||e.dollar)return true;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}if(e.open!==true||e.close!==true){e.invalid=true;return true}return false});r.isOpenOrClose=(e=>{if(e.type==="open"||e.type==="close"){return true}return e.open===true||e.close===true});r.reduce=(e=>e.reduce((e,r)=>{if(r.type==="text")e.push(r.value);if(r.type==="range")r.type="text";return e},[]));r.flatten=((...e)=>{const r=[];const t=e=>{for(let n=0;n{if(typeof e!=="string"){throw new TypeError("Expected a string")}let t=r||{};let E=typeof t.maxLength==="number"?Math.min(i,t.maxLength):i;if(e.length>E){throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${E})`)}let b={type:"root",input:e,nodes:[]};let A=[b];let C=b;let w=b;let F=0;let y=e.length;let S=0;let _=0;let B;let O={};const k=()=>e[S++];const x=e=>{if(e.type==="text"&&w.type==="dot"){w.type="text"}if(w&&w.type==="text"&&e.type==="text"){w.value+=e.value;return}C.nodes.push(e);e.parent=C;e.prev=w;w=e;return e};x({type:"bos"});while(S0){if(C.ranges>0){C.ranges=0;let e=C.nodes.shift();C.nodes=[e,{type:"text",value:n(C)}]}x({type:"comma",value:B});C.commas++;continue}if(B===a&&_>0&&C.commas===0){let e=C.nodes;if(_===0||e.length===0){x({type:"text",value:B});continue}if(w.type==="dot"){C.range=[];w.value+=B;w.type="range";if(C.nodes.length!==3&&C.nodes.length!==5){C.invalid=true;C.ranges=0;w.type="text";continue}C.ranges++;C.args=[];continue}if(w.type==="range"){e.pop();let r=e[e.length-1];r.value+=w.value+B;w=r;C.ranges--;continue}x({type:"dot",value:B});continue}x({type:"text",value:B})}do{C=A.pop();if(C.type!=="root"){C.nodes.forEach(e=>{if(!e.nodes){if(e.type==="open")e.isOpen=true;if(e.type==="close")e.isClose=true;if(!e.nodes)e.type="text";e.invalid=true}});let e=A[A.length-1];let r=e.nodes.indexOf(C);e.nodes.splice(r,1,...C.nodes)}}while(A.length>0);x({type:"eos"});return b};e.exports=E},function(e,r,t){"use strict";var n=t(945);function resolveYamlBoolean(e){if(e===null)return false;var r=e.length;return r===4&&(e==="true"||e==="True"||e==="TRUE")||r===5&&(e==="false"||e==="False"||e==="FALSE")}function constructYamlBoolean(e){return e==="true"||e==="True"||e==="TRUE"}function isBoolean(e){return Object.prototype.toString.call(e)==="[object Boolean]"}e.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},,,function(e,r,t){"use strict";var n=t(940);var i=t(346);var u=t(289);var o=t(489);e.exports=log;var s="vfile-reporter";function log(e,r,t){var a=r.reporter||u;var f;if(o(a)){try{a=i(a,{cwd:r.cwd,prefix:s})}catch(e){t(new Error("Could not find reporter `"+a+"`"));return}}f=a(e.files.filter(given),n(r.reporterOptions,{quiet:r.quiet,silent:r.silent,color:r.color}));if(f){if(f.charAt(f.length-1)!=="\n"){f+="\n"}r.streamError.write(f,t)}else{t()}}function given(e){return e.data.unifiedEngineGiven}},function(e,r,t){var n=t(893).Writable;var i=t(689);var u=t(501);if(typeof Uint8Array==="undefined"){var o=t(317).Uint8Array}else{var o=Uint8Array}function ConcatStream(e,r){if(!(this instanceof ConcatStream))return new ConcatStream(e,r);if(typeof e==="function"){r=e;e={}}if(!e)e={};var t=e.encoding;var i=false;if(!t){i=true}else{t=String(t).toLowerCase();if(t==="u8"||t==="uint8"){t="uint8array"}}n.call(this,{objectMode:true});this.encoding=t;this.shouldInferEncoding=i;if(r)this.on("finish",function(){r(this.getBody())});this.body=[]}e.exports=ConcatStream;i(ConcatStream,n);ConcatStream.prototype._write=function(e,r,t){this.body.push(e);t()};ConcatStream.prototype.inferEncoding=function(e){var r=e===undefined?this.body[0]:e;if(Buffer.isBuffer(r))return"buffer";if(typeof Uint8Array!=="undefined"&&r instanceof Uint8Array)return"uint8array";if(Array.isArray(r))return"array";if(typeof r==="string")return"string";if(Object.prototype.toString.call(r)==="[object Object]")return"object";return"buffer"};ConcatStream.prototype.getBody=function(){if(!this.encoding&&this.body.length===0)return[];if(this.shouldInferEncoding)this.encoding=this.inferEncoding();if(this.encoding==="array")return arrayConcat(this.body);if(this.encoding==="string")return stringConcat(this.body);if(this.encoding==="buffer")return bufferConcat(this.body);if(this.encoding==="uint8array")return u8Concat(this.body);return this.body};var s=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"};function isArrayish(e){return/Array\]$/.test(Object.prototype.toString.call(e))}function isBufferish(e){return typeof e==="string"||isArrayish(e)||e&&typeof e.subarray==="function"}function stringConcat(e){var r=[];var t=false;for(var n=0;n`\\u0000-\\u0020]+";var i="'[^']*'";var u='"[^"]*"';var o="(?:"+n+"|"+i+"|"+u+")";var s="(?:\\s+"+t+"(?:\\s*=\\s*"+o+")?)";var a="<[A-Za-z][A-Za-z0-9\\-]*"+s+"*\\s*\\/?>";var f="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";var c="\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e";var l="<[?].*?[?]>";var p="]*>";var h="";r.openCloseTag=new RegExp("^(?:"+a+"|"+f+")");r.tag=new RegExp("^(?:"+a+"|"+f+"|"+c+"|"+l+"|"+p+"|"+h+")")},,function(e,r,t){"use strict";var n=t(8);e.exports=heading;var i="\n";var u=" ";var o="#";var s="-";var a="=";function heading(e){var r=this;var t=e.depth;var f=r.options.setext;var c=r.options.closeAtx;var l=r.all(e).join("");var p;if(f&&t<3){return l+i+n(t===1?a:s,l.length)}p=n(o,e.depth);return p+u+l+(c?u+p:"")}},,,,function(e,r,t){"use strict";var n=t(622);var i=t(747);var u=t(539);var o=t(402);var s=t(493);var a=t(940);var f=t(943);var c=t(489);var l=i.readdir;var p=i.stat;var h=n.join;var v=n.relative;var D=n.resolve;var d=n.basename;var g=n.extname;var m=o.hasMagic;e.exports=find;function find(e,r,t){expand(e,r,done);function done(e,r){if(e){t(e)}else{t(null,{oneFileMode:oneFileMode(r),files:r.output})}}}function expand(e,r,t){var n=r.cwd;var i=[];var u=0;var s=0;var a;e.forEach(each);if(!s){search(i,r,done)}function each(e){if(c(e)){if(m(e)){s++;o(e,{cwd:n},one)}else{e=v(n,D(n,e))||".";i.push(e)}}else{e.cwd=n;e.path=v(n,e.path);e.history=[e.path];i.push(e)}}function one(e,t){if(a){return}if(e){a=true;done(e)}else{u++;i=i.concat(t);if(u===s){search(i,r,done)}}}function done(e,r){if(e){t(e)}else{t(null,{input:i,output:r})}}}function search(e,r,t){var i=r.cwd;var o=r.silentlyIgnore;var p=r.nested;var v=r.extensions;var d=u().add(r.ignorePatterns);var m=[];var E=0;var b=0;e.forEach(each);if(!E){t(null,m)}return each;function each(e){var u=c(e)?g(e):e.extname;var A;if(c(e)){e=e.split("/").join(n.sep)}A=base(e);if(p&&(f(A)||A==="node_modules")){return}E++;statAndIgnore(e,a(r,{extraIgnore:d}),handle);function handle(r,t){var n=t&&t.ignored;var a=t&&t.stats&&t.stats.isDirectory();if(n&&(p||o)){return one(null,[])}if(!n&&a){return l(D(i,filePath(e)),directory)}if(p&&!a&&v.length!==0&&v.indexOf(u)===-1){return one(null,[])}e=s(e);e.cwd=i;if(n){try{e.fail("Cannot process specified file: it’s ignored")}catch(e){}}if(r&&r.code==="ENOENT"){try{e.fail(r.syscall==="stat"?"No such file or directory":r)}catch(e){}}one(null,[e])}function directory(e,t){var n;if(e){n=s(filePath(n));n.cwd=i;try{n.fail("Cannot read directory")}catch(e){}one(null,[n])}else{search(t.map(concat),a(r,{nested:true}),one)}}function one(e,r){if(r){m=m.concat(r)}b++;if(b===E){t(null,m)}}function concat(r){return h(filePath(e),r)}}}function statAndIgnore(e,r,t){var n=r.ignore;var i=r.extraIgnore;var u=D(r.cwd,filePath(e));var o=v(r.cwd,u);var s=1;var a=0;var f;var c;if(!e.contents){s++;p(u,handleStat)}n.check(u,handleIgnore);function handleStat(e,r){f=r;one(e)}function handleIgnore(e,r){c=r;one(e)}function one(e){a++;if(e){t(e);a=-1}else if(a===s){t(null,{stats:f,ignored:c||(o?i.ignores(o):false)})}}}function base(e){return c(e)?d(e):e.basename}function filePath(e){return c(e)?e:e.path}function oneFileMode(e){return e.output.length===1&&e.input.length===1&&e.output[0].path===e.input[0]}},,function(e){"use strict";e.exports=thematicBreak;var r="\t";var t="\n";var n=" ";var i="*";var u="-";var o="_";var s=3;function thematicBreak(e,a,f){var c=-1;var l=a.length+1;var p="";var h;var v;var D;var d;while(++c=s&&(!h||h===t)){p+=d;if(f){return true}return e(p)({type:"thematicBreak"})}else{return}}}},,,function(e,r,t){e.exports=globSync;globSync.GlobSync=GlobSync;var n=t(747);var i=t(302);var u=t(595);var o=u.Minimatch;var s=t(402).Glob;var a=t(669);var f=t(622);var c=t(357);var l=t(681);var p=t(856);var h=p.alphasort;var v=p.alphasorti;var D=p.setopts;var d=p.ownProp;var g=p.childrenIgnored;var m=p.isIgnored;function globSync(e,r){if(typeof r==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(e,r).found}function GlobSync(e,r){if(!e)throw new Error("must provide pattern");if(typeof r==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(e,r);D(this,e,r);if(this.noprocess)return this;var t=this.minimatch.set.length;this.matches=new Array(t);for(var n=0;nthis.maxLength)return false;if(!this.stat&&d(this.cache,r)){var i=this.cache[r];if(Array.isArray(i))i="DIR";if(!t||i==="DIR")return i;if(t&&i==="FILE")return false}var u;var o=this.statCache[r];if(!o){var s;try{s=n.lstatSync(r)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[r]=false;return false}}if(s&&s.isSymbolicLink()){try{o=n.statSync(r)}catch(e){o=s}}else{o=s}}this.statCache[r]=o;var i=true;if(o)i=o.isDirectory()?"DIR":"FILE";this.cache[r]=this.cache[r]||i;if(t&&i==="FILE")return false;return i};GlobSync.prototype._mark=function(e){return p.mark(this,e)};GlobSync.prototype._makeAbs=function(e){return p.makeAbs(this,e)}},function(e,r,t){"use strict";var n=t(608);var i=t(684);var u=t(263);var o=t(960);var s=t(353);e.exports=n("remark-lint:checkbox-content-indent",checkboxContentIndent);var a=o.start;var f=o.end;var c="Checkboxes should be followed by a single character";function checkboxContentIndent(e,r){var t=String(r);var n=i(r);u(e,"listItem",visitor);function visitor(e){var i;var u;var o;if(typeof e.checked!=="boolean"||s(e)){return}i=a(e).offset;u=(e.children.length===0?f(e):a(e.children[0])).offset;while(/[^\S\n]/.test(t.charAt(u))){u++}o=t.slice(i,u);o=o.slice(o.indexOf("]")+1);if(o.length!==1){r.message(c,{start:n.toPosition(u-o.length+1),end:n.toPosition(u)})}}}},function(e,r,t){"use strict";const n=t(87);const i=t(364);const u=process.env;let o;if(i("no-color")||i("no-colors")||i("color=false")){o=false}else if(i("color")||i("colors")||i("color=true")||i("color=always")){o=true}if("FORCE_COLOR"in u){o=u.FORCE_COLOR.length===0||parseInt(u.FORCE_COLOR,10)!==0}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(o===false){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(e&&!e.isTTY&&o!==true){return 0}const r=o?1:0;if(process.platform==="win32"){const e=n.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in u){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in u)||u.CI_NAME==="codeship"){return 1}return r}if("TEAMCITY_VERSION"in u){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(u.TEAMCITY_VERSION)?1:0}if(u.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in u){const e=parseInt((u.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(u.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(u.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(u.TERM)){return 1}if("COLORTERM"in u){return 1}if(u.TERM==="dumb"){return r}return r}function getSupportLevel(e){const r=supportsColor(e);return translateLevel(r)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},,,,,,,,,,,function(e,r,t){"use strict";e.exports=t(511)},function(e,r,t){"use strict";var n=t(784)("unified-engine:file-pipeline:parse");var i=t(999);var u=t(32);e.exports=parse;function parse(e,r){var t;if(i(r).fatal){return}if(e.treeIn){n("Not parsing already parsed document");try{e.tree=u(r.toString())}catch(e){t=r.message(new Error("Cannot read file as JSON\n"+e.message));t.fatal=true}if(r.path){r.extname=e.extensions[0]}r.contents="";return}n("Parsing `%s`",r.path);e.tree=e.processor.parse(r);n("Parsed document")}},function(e,r,t){var n=t(600);function buildGraph(){var e={};var r=Object.keys(n);for(var t=r.length,i=0;ie!==null&&typeof e==="object"&&!Array.isArray(e));r.hasRegexChars=(e=>s.test(e));r.isRegexChar=(e=>e.length===1&&r.hasRegexChars(e));r.escapeRegex=(e=>e.replace(a,"\\$1"));r.toPosixSlashes=(e=>e.replace(u,"/"));r.removeBackslashes=(e=>{return e.replace(o,e=>{return e==="\\"?"":e})});r.supportsLookbehinds=(()=>{const e=process.version.slice(1).split(".").map(Number);if(e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10){return true}return false});r.isWindows=(e=>{if(e&&typeof e.windows==="boolean"){return e.windows}return i===true||n.sep==="\\"});r.escapeLast=((e,t,n)=>{const i=e.lastIndexOf(t,n);if(i===-1)return e;if(e[i-1]==="\\")return r.escapeLast(e,t,i-1);return`${e.slice(0,i)}\\${e.slice(i)}`});r.removePrefix=((e,r={})=>{let t=e;if(t.startsWith("./")){t=t.slice(2);r.prefix="./"}return t});r.wrapOutput=((e,r={},t={})=>{const n=t.contains?"":"^";const i=t.contains?"":"$";let u=`${n}(?:${e})${i}`;if(r.negated===true){u=`(?:^(?!${u}).*$)`}return u})},function(e,r,t){"use strict";var n=t(87);function homedir(){var e=process.env;var r=e.HOME;var t=e.LOGNAME||e.USER||e.LNAME||e.USERNAME;if(process.platform==="win32"){return e.USERPROFILE||e.HOMEDRIVE+e.HOMEPATH||r||null}if(process.platform==="darwin"){return r||(t?"/Users/"+t:null)}if(process.platform==="linux"){return r||(process.getuid()===0?"/root":t?"/home/"+t:null)}return r||null}e.exports=typeof n.homedir==="function"?n.homedir:homedir},,,function(e,r,t){"use strict";var n=t(812);var i=t(51);e.exports=toVFile;function toVFile(e){if(typeof e==="string"||n(e)){e={path:String(e)}}return i(e)}},function(e,r,t){"use strict";var n=t(591);e.exports=VMessage;function VMessagePrototype(){}VMessagePrototype.prototype=Error.prototype;VMessage.prototype=new VMessagePrototype;var i=VMessage.prototype;i.file="";i.name="";i.reason="";i.message="";i.stack="";i.fatal=null;i.column=null;i.line=null;function VMessage(e,r,t){var i;var u;var o;if(typeof r==="string"){t=r;r=null}i=parseOrigin(t);u=n(r)||"1:1";o={start:{line:null,column:null},end:{line:null,column:null}};if(r&&r.position){r=r.position}if(r){if(r.start){o=r;r=r.start}else{o.start=r}}if(e.stack){this.stack=e.stack;e=e.message}this.message=e;this.name=u;this.reason=e;this.line=r?r.line:null;this.column=r?r.column:null;this.location=o;this.source=i[0];this.ruleId=i[1]}function parseOrigin(e){var r=[null,null];var t;if(typeof e==="string"){t=e.indexOf(":");if(t===-1){r[1]=e}else{r[0]=e.slice(0,t);r[1]=e.slice(t+1)}}return r}},,,,function(e,r,t){"use strict";var n=t(608);var i=t(263);var u=t(960);var o=t(353);e.exports=n("remark-lint:definition-spacing",definitionSpacing);var s=/^\s*\[((?:\\[\s\S]|[^[\]])+)]/;var a="Do not use consecutive white-space in definition labels";function definitionSpacing(e,r){var t=String(r);i(e,["definition","footnoteDefinition"],validate);function validate(e){var n=u.start(e).offset;var i=u.end(e).offset;if(!o(e)&&/[ \t\n]{2,}/.test(t.slice(n,i).match(s)[1])){r.message(a,e)}}}},,,function(e,r,t){"use strict";var n=t(536);var i=t(788);var u=t(926);var o=t(928);var s=t(542);var a=t(292);e.exports=parseEntities;var f={}.hasOwnProperty;var c=String.fromCharCode;var l=Function.prototype;var p={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:false,nonTerminated:true};var h=9;var v=10;var D=12;var d=32;var g=38;var m=59;var E=60;var b=61;var A=35;var C=88;var w=120;var F=65533;var y="named";var S="hexadecimal";var _="decimal";var B={};B[S]=16;B[_]=10;var O={};O[y]=s;O[_]=u;O[S]=o;var k=1;var x=2;var R=3;var T=4;var I=5;var L=6;var M=7;var j={};j[k]="Named character references must be terminated by a semicolon";j[x]="Numeric character references must be terminated by a semicolon";j[R]="Named character references cannot be empty";j[T]="Numeric character references cannot be empty";j[I]="Named character references must be known";j[L]="Numeric character references cannot be disallowed";j[M]="Numeric character references cannot be outside the permissible Unicode range";function parseEntities(e,r){var t={};var n;var i;if(!r){r={}}for(i in p){n=r[i];t[i]=n===null||n===undefined?p[i]:n}if(t.position.indent||t.position.start){t.indent=t.position.indent||[];t.position=t.position.start}return parse(e,t)}function parse(e,r){var t=r.additional;var u=r.nonTerminated;var o=r.text;var p=r.reference;var P=r.warning;var N=r.textContext;var $=r.referenceContext;var H=r.warningContext;var U=r.position;var W=r.indent||[];var G=e.length;var q=0;var Y=-1;var z=U.column||1;var V=U.line||1;var J="";var Z=[];var Q;var X;var K;var ee;var re;var te;var ne;var ie;var ue;var oe;var se;var ae;var fe;var ce;var le;var pe;var he;var ve;var De;if(typeof t==="string"){t=t.charCodeAt(0)}pe=now();ie=P?parseError:l;q--;G++;while(++q65535){te-=65536;oe+=c(te>>>(10&1023)|55296);te=56320|te&1023}te=oe+c(te)}}if(te){flush();pe=now();q=De-1;z+=De-fe+1;Z.push(te);he=now();he.offset++;if(p){p.call($,te,{start:pe,end:he},e.slice(fe-1,De))}pe=he}else{ee=e.slice(fe-1,De);J+=ee;z+=ee.length;q=De-1}}else{if(re===10){V++;Y++;z=0}if(re===re){J+=c(re);z++}else{flush()}}}return Z.join("");function now(){return{line:V,column:z,offset:q+(U.offset||0)}}function parseError(e,r){var t=now();t.column+=r;t.offset+=r;P.call(H,j[e],t,e)}function flush(){if(J){Z.push(J);if(o){o.call(N,J,{start:pe,end:now()})}J=""}}}function prohibited(e){return e>=55296&&e<=57343||e>1114111}function disallowed(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}},,function(e,r,t){"use strict";var n=t(940);var i=t(2);var u=t(555);var o=t(394);var s=t(617);e.exports=setOptions;var a={entities:{true:true,false:true,numbers:true,escape:true},bullet:{"*":true,"-":true,"+":true},rule:{"-":true,_:true,"*":true},listItemIndent:{tab:true,mixed:true,1:true},emphasis:{_:true,"*":true},strong:{_:true,"*":true},fence:{"`":true,"~":true}};var f={boolean:validateBoolean,string:validateString,number:validateNumber,function:validateFunction};function setOptions(e){var r=this;var t=r.options;var i;var s;if(e==null){e={}}else if(typeof e==="object"){e=n(e)}else{throw new Error("Invalid value `"+e+"` for setting `options`")}for(s in u){f[typeof u[s]](e,s,t[s],a[s])}i=e.ruleRepetition;if(i&&i<3){raise(i,"options.ruleRepetition")}r.encode=encodeFactory(String(e.entities));r.escape=o(e);r.options=e;return r}function validateBoolean(e,r,t){var n=e[r];if(n==null){n=t}if(typeof n!=="boolean"){raise(n,"options."+r)}e[r]=n}function validateNumber(e,r,t){var n=e[r];if(n==null){n=t}if(isNaN(n)){raise(n,"options."+r)}e[r]=n}function validateString(e,r,t,n){var i=e[r];if(i==null){i=t}i=String(i);if(!(i in n)){raise(i,"options."+r)}e[r]=i}function validateFunction(e,r,t){var n=e[r];if(n==null){n=t}if(typeof n!=="function"){raise(n,"options."+r)}e[r]=n}function encodeFactory(e){var r={};if(e==="false"){return s}if(e==="true"){r.useNamedReferences=true}if(e==="escape"){r.escapeOnly=true;r.useNamedReferences=true}return wrapped;function wrapped(e){return i(e,r)}}function raise(e,r){throw new Error("Invalid value `"+e+"` for setting `"+r+"`")}},,,function(e){e.exports=require("module")},function(e){e.exports={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,r,t){"use strict";var n=t(578);var i=t(829);e.exports=strikethrough;strikethrough.locator=i;var u="~";var o="~~";function strikethrough(e,r,t){var i=this;var s="";var a="";var f="";var c="";var l;var p;var h;if(!i.options.gfm||r.charAt(0)!==u||r.charAt(1)!==u||n(r.charAt(2))){return}l=1;p=r.length;h=e.now();h.column+=2;h.offset+=2;while(++l "+p.destination:""}if(!p.stats.total){h+=h?": ":"";if(p.stored){h+=g.yellow.open+"written"+g.yellow.close}else{h+="no issues found"}}if(h){f.push(h)}}else{m=g[p.label==="error"?"red":"yellow"];E=p.reason;b="";A=E.indexOf("\n");if(A!==-1){b=E.slice(A);E=E.slice(0,A)}f.push(["",padLeft(p.location,e.location),padRight(m.open+p.label+m.close,e.label),padRight(E,e.reason),padRight(p.ruleId,e.ruleId),p.source||""].join(" ").replace(l,"")+b)}}if(u.fatal||u.warn){h=[];if(u.fatal){h.push([g.red.open+c.error+g.red.close,u.fatal,plural(d.true,u.fatal)].join(" "))}if(u.warn){h.push([g.yellow.open+c.warning+g.yellow.close,u.warn,plural(d.false,u.warn)].join(" "))}h=h.join(", ");if(u.total!==u.fatal&&u.total!==u.warn){h=u.total+" messages ("+h+")"}f.push("",h)}return f.join("\n")}function applicable(e,r){var t=e.messages;var n=t.length;var i=-1;var u=[];if(r.silent){while(++i0?"Add":"Remove")+" "+Math.abs(n)+" "+i("space",n)+" between blockquote and content";r.message(u,o.start(e.children[0]))}}else{t=check(e)}}}function check(e){var r=e.children[0];var t=o.start(r).column-o.start(e).column;var n=a(r).match(/^ +/);if(n){t+=n[0].length}return t}},,function(e,r,t){"use strict";var n=t(283);e.exports=decodeEntity;var i={}.hasOwnProperty;function decodeEntity(e){return i.call(n,e)?n[e]:false}},function(e){e.exports=require("buffer")},function(e,r,t){"use strict";var n=t(608);var i=t(684);e.exports=n("remark-lint:no-tabs",noTabs);var u="Use spaces instead of hard-tabs";function noTabs(e,r){var t=String(r);var n=i(r).toPosition;var o=t.indexOf("\t");while(o!==-1){r.message(u,n(o));o=t.indexOf("\t",o+1)}}},,,function(e,r,t){"use strict";var n=t(608);var i=t(263);var u=t(960);var o=t(353);e.exports=n("remark-lint:fenced-code-flag",fencedCodeFlag);var s=u.start;var a=u.end;var f=/^ {0,3}([~`])\1{2,}/;var c="Invalid code-language flag";var l="Missing code-language flag";function fencedCodeFlag(e,r,t){var n=String(r);var u=false;var p=[];if(typeof t==="object"&&!("length"in t)){u=Boolean(t.allowEmpty);t=t.flags}if(typeof t==="object"&&"length"in t){p=String(t).split(",")}i(e,"code",visitor);function visitor(e){var t;if(!o(e)){if(e.lang){if(p.length!==0&&p.indexOf(e.lang)===-1){r.message(c,e)}}else{t=n.slice(s(e).offset,a(e).offset);if(!u&&f.test(t)){r.message(l,e)}}}}}},,function(e,r,t){const n=t(507);e.exports={isSpaceSeparator(e){return n.Space_Separator.test(e)},isIdStartChar(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||n.ID_Start.test(e)},isIdContinueChar(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||n.ID_Continue.test(e)},isDigit(e){return/[0-9]/.test(e)},isHexDigit(e){return/[0-9A-Fa-f]/.test(e)}}},,,function(e,r,t){e.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var n=t(747);var i=n.realpath;var u=n.realpathSync;var o=process.version;var s=/^v[0-5]\./.test(o);var a=t(117);function newError(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function realpath(e,r,t){if(s){return i(e,r,t)}if(typeof r==="function"){t=r;r=null}i(e,r,function(n,i){if(newError(n)){a.realpath(e,r,t)}else{t(n,i)}})}function realpathSync(e,r){if(s){return u(e,r)}try{return u(e,r)}catch(t){if(newError(t)){return a.realpathSync(e,r)}else{throw t}}}function monkeypatch(){n.realpath=realpath;n.realpathSync=realpathSync}function unmonkeypatch(){n.realpath=i;n.realpathSync=u}},,function(e){"use strict";e.exports=block;var r="\n";var t=r+r;var n=t+r;var i=t+"\x3c!----\x3e"+t;function block(e){var r=this;var u=r.options;var o=u.fences;var s=u.commonmark?i:n;var a=[];var f=e.children;var c=f.length;var l=-1;var p;var h;while(++l=r}function expand(e,r){var t=[];var u=i("{","}",e);if(!u||/\$$/.test(u.pre))return[e];var o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(u.body);var a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(u.body);var f=o||a;var c=u.body.indexOf(",")>=0;if(!f&&!c){if(u.post.match(/,.*\}/)){e=u.pre+"{"+u.body+s+u.post;return expand(e)}return[e]}var l;if(f){l=u.body.split(/\.\./)}else{l=parseCommaParts(u.body);if(l.length===1){l=expand(l[0],false).map(embrace);if(l.length===1){var p=u.post.length?expand(u.post,false):[""];return p.map(function(e){return u.pre+l[0]+e})}}}var h=u.pre;var p=u.post.length?expand(u.post,false):[""];var v;if(f){var D=numeric(l[0]);var d=numeric(l[1]);var g=Math.max(l[0].length,l[1].length);var m=l.length==3?Math.abs(numeric(l[2])):1;var E=lte;var b=d0){var y=new Array(F+1).join("0");if(C<0)w="-"+y+w.slice(1);else w=y+w}}}v.push(w)}}else{v=n(l,function(e){return expand(e,false)})}for(var S=0;S>0},ToUint32:function(e){return e>>>0}}}();var o=Math.LN2,s=Math.abs,a=Math.floor,f=Math.log,c=Math.min,l=Math.pow,p=Math.round;function configureProperties(e){if(v&&h){var r=v(e),t;for(t=0;ti)throw new RangeError("Array too large for polyfill");function makeArrayAccessor(r){h(e,r,{get:function(){return e._getter(r)},set:function(t){e._setter(r,t)},enumerable:true,configurable:false})}var r;for(r=0;r>t}function as_unsigned(e,r){var t=32-r;return e<>>t}function packI8(e){return[e&255]}function unpackI8(e){return as_signed(e[0],8)}function packU8(e){return[e&255]}function unpackU8(e){return as_unsigned(e[0],8)}function packU8Clamped(e){e=p(Number(e));return[e<0?0:e>255?255:e&255]}function packI16(e){return[e>>8&255,e&255]}function unpackI16(e){return as_signed(e[0]<<8|e[1],16)}function packU16(e){return[e>>8&255,e&255]}function unpackU16(e){return as_unsigned(e[0]<<8|e[1],16)}function packI32(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function unpackI32(e){return as_signed(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function packU32(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}function unpackU32(e){return as_unsigned(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function packIEEE754(e,r,t){var n=(1<.5)return r+1;return r%2?r+1:r}if(e!==e){u=(1<=l(2,1-n)){u=c(a(f(e)/o),1023);p=roundToEven(e/l(2,u)*l(2,t));if(p/l(2,t)>=2){u=u+1;p=1}if(u>n){u=(1<>1}}n.reverse();s=n.join("");a=(1<0){return f*l(2,c-a)*(1+p/l(2,t))}else if(p!==0){return f*l(2,-(a-1))*(p/l(2,t))}else{return f<0?-0:0}}function unpackF64(e){return unpackIEEE754(e,11,52)}function packF64(e){return packIEEE754(e,11,52)}function unpackF32(e){return unpackIEEE754(e,8,23)}function packF32(e){return packIEEE754(e,8,23)}(function(){var e=function ArrayBuffer(e){e=u.ToInt32(e);if(e<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=e;this._bytes=[];this._bytes.length=e;var r;for(r=0;rthis.buffer.byteLength){throw new RangeError("byteOffset out of range")}if(this.byteOffset%this.BYTES_PER_ELEMENT){throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.")}if(arguments.length<3){this.byteLength=this.buffer.byteLength-this.byteOffset;if(this.byteLength%this.BYTES_PER_ELEMENT){throw new RangeError("length of buffer minus byteOffset not a multiple of the element size")}this.length=this.byteLength/this.BYTES_PER_ELEMENT}else{this.length=u.ToUint32(n);this.byteLength=this.length*this.BYTES_PER_ELEMENT}if(this.byteOffset+this.byteLength>this.buffer.byteLength){throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}}else{throw new TypeError("Unexpected argument type(s)")}this.constructor=s;configureProperties(this);makeArrayAccessors(this)};s.prototype=new r;s.prototype.BYTES_PER_ELEMENT=t;s.prototype._pack=i;s.prototype._unpack=o;s.BYTES_PER_ELEMENT=t;s.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments");e=u.ToUint32(e);if(e>=this.length){return n}var r=[],t,i;for(t=0,i=this.byteOffset+e*this.BYTES_PER_ELEMENT;t=this.length){return n}var t=this._pack(r),i,o;for(i=0,o=this.byteOffset+e*this.BYTES_PER_ELEMENT;ithis.length){throw new RangeError("Offset plus length of array is out of range")}c=this.byteOffset+i*this.BYTES_PER_ELEMENT;l=t.length*this.BYTES_PER_ELEMENT;if(t.buffer===this.buffer){p=[];for(s=0,a=t.byteOffset;sthis.length){throw new RangeError("Offset plus length of array is out of range")}for(s=0;st?t:e}e=u.ToInt32(e);r=u.ToInt32(r);if(arguments.length<1){e=0}if(arguments.length<2){r=this.length}if(e<0){e=this.length+e}if(r<0){r=this.length+r}e=clamp(e,0,this.length);r=clamp(r,0,this.length);var t=r-e;if(t<0){t=0}return new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,t)};return s}var i=makeConstructor(1,packI8,unpackI8);var o=makeConstructor(1,packU8,unpackU8);var s=makeConstructor(1,packU8Clamped,unpackU8);var a=makeConstructor(2,packI16,unpackI16);var f=makeConstructor(2,packU16,unpackU16);var c=makeConstructor(4,packI32,unpackI32);var l=makeConstructor(4,packU32,unpackU32);var p=makeConstructor(4,packF32,unpackF32);var h=makeConstructor(8,packF64,unpackF64);t.Int8Array=t.Int8Array||i;t.Uint8Array=t.Uint8Array||o;t.Uint8ClampedArray=t.Uint8ClampedArray||s;t.Int16Array=t.Int16Array||a;t.Uint16Array=t.Uint16Array||f;t.Int32Array=t.Int32Array||c;t.Uint32Array=t.Uint32Array||l;t.Float32Array=t.Float32Array||p;t.Float64Array=t.Float64Array||h})();(function(){function r(e,r){return u.IsCallable(e.get)?e.get(r):e[r]}var e=function(){var e=new t.Uint16Array([4660]),n=new t.Uint8Array(e.buffer);return r(n,0)===18}();var n=function DataView(e,r,n){if(arguments.length===0){e=new t.ArrayBuffer(0)}else if(!(e instanceof t.ArrayBuffer||u.Class(e)==="ArrayBuffer")){throw new TypeError("TypeError")}this.buffer=e||new t.ArrayBuffer(0);this.byteOffset=u.ToUint32(r);if(this.byteOffset>this.buffer.byteLength){throw new RangeError("byteOffset out of range")}if(arguments.length<3){this.byteLength=this.buffer.byteLength-this.byteOffset}else{this.byteLength=u.ToUint32(n)}if(this.byteOffset+this.byteLength>this.buffer.byteLength){throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}configureProperties(this)};function makeGetter(n){return function(i,o){i=u.ToUint32(i);if(i+n.BYTES_PER_ELEMENT>this.byteLength){throw new RangeError("Array index out of range")}i+=this.byteOffset;var s=new t.Uint8Array(this.buffer,i,n.BYTES_PER_ELEMENT),a=[],f;for(f=0;fthis.byteLength){throw new RangeError("Array index out of range")}var a=new n([o]),f=new t.Uint8Array(a.buffer),c=[],l,p;for(l=0;lr.length){try{return e.apply(o,r.concat(s))}catch(e){return s(e)}}return sync(e,s).apply(o,r)}return wrap}function sync(e,r){return function(){var t;try{t=e.apply(this,arguments)}catch(e){return r(e)}if(promise(t)){t.then(function(e){r(null,e)},r)}else{t instanceof Error?r(t):r(null,t)}}}function generator(e){return e&&e.constructor&&"GeneratorFunction"==e.constructor.name}function promise(e){return e&&"function"==typeof e.then}},,,function(e,r,t){"use strict";var n=t(8);var i="\n";var u=" ";var o=":";var s="[";var a="]";var f="^";var c=4;var l=i+i;var p=n(u,c);e.exports=footnoteDefinition;function footnoteDefinition(e){var r=this.all(e).join(l+p);return s+f+(e.label||e.identifier)+a+o+u+r}},,,,function(e,r,t){"use strict";var n=t(980);var i=t(616);e.exports=linkReference;var u="[";var o="]";var s="shortcut";var a="collapsed";function linkReference(e){var r=this;var t=e.referenceType;var f=r.enterLinkReference(r,e);var c=r.all(e).join("");f();if(t===s||t===a){c=n(c,e.label||e.identifier)}return u+c+o+i(e)}},function(e){"use strict";e.exports=setextHeading;var r="\n";var t="\t";var n=" ";var i="=";var u="-";var o=3;var s=1;var a=2;function setextHeading(e,f,c){var l=this;var p=e.now();var h=f.length;var v=-1;var D="";var d;var g;var m;var E;var b;while(++v=o){v--;break}D+=m}d="";g="";while(++vu.has(n.extname(e).slice(1).toLowerCase()))},function(e){"use strict";e.exports=alphabetical;function alphabetical(e){var r=typeof e==="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}},,function(e,r,t){"use strict";var n=t(608);var i=t(263);var u=t(960);var o=t(353);e.exports=n("remark-lint:fenced-code-marker",fencedCodeMarker);var s={"`":true,"~":true,null:true};function fencedCodeMarker(e,r,t){var n=String(r);t=typeof t==="string"&&t!=="consistent"?t:null;if(s[t]!==true){r.fail("Invalid fenced code marker `"+t+"`: use either `'consistent'`, `` '`' ``, or `'~'`")}i(e,"code",visitor);function visitor(e){var i;if(!o(e)){i=n.substr(u.start(e).offset,4).trimLeft().charAt(0);if(s[i]===true){if(t){if(i!==t){r.message("Fenced code should use "+t+" as a marker",e)}}else{t=i}}}}}},,,function(e,r,t){"use strict";var n=t(747);var i=t(622);var u=t(925).silent;var o=t(92)();e.exports=loadPlugin;loadPlugin.resolve=resolvePlugin;var s=process.versions.electron!==undefined;var a=process.argv[1]||"";var f=process.env.NVM_BIN;var c=s||a.indexOf(o)===0;var l=process.platform==="win32";var p=l?"":"lib";var h=i.resolve(o,p,"node_modules");if(s&&f&&!n.existsSync(h)){h=i.resolve(f,"..",p,"node_modules")}function loadPlugin(e,r){return require(resolvePlugin(e,r)||e)}function resolvePlugin(e,r){var t=r||{};var n=t.prefix;var i=t.cwd;var o=t.global;var s;var a;var f;var l;var p;var v;var D="";if(o===null||o===undefined){o=c}if(i&&typeof i==="object"){a=i.concat()}else{a=[i||process.cwd()]}if(e.charAt(0)!=="."){if(o){a.push(h)}if(n){n=n.charAt(n.length-1)==="-"?n:n+"-";if(e.charAt(0)==="@"){v=e.indexOf("/");if(v!==-1){D=e.slice(0,v+1);e=e.slice(v+1)}}if(e.slice(0,n.length)!==n){p=D+n+e}e=D+e}}f=a.length;l=-1;while(++l{e=e.replace(u()," ");if(typeof e!=="string"||e.length===0){return 0}e=n(e);let r=0;for(let t=0;t=127&&n<=159){continue}if(n>=768&&n<=879){continue}if(n>65535){t++}r+=i(n)?2:1}return r};e.exports=o;e.exports.default=o},function(e,r,t){"use strict";var n=t(8);var i=t(613);e.exports=listItem;var u="\n";var o=" ";var s="[";var a="]";var f="x";var c=Math.ceil;var l=u+u;var p=4;function listItem(e,r,t,h){var v=this;var D=v.options.listItemIndent;var d=h||v.options.bullet;var g=e.spread==null?true:e.spread;var m=e.checked;var E=e.children;var b=E.length;var A=[];var C=-1;var w;var F;var y;while(++C0)this.tail.next=r;else this.head=r;this.tail=r;++this.length};e.unshift=function unshift(e){var r={data:e,next:this.head};if(this.length===0)this.tail=r;this.head=r;++this.length};e.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};e.clear=function clear(){this.head=this.tail=null;this.length=0};e.join=function join(e){if(this.length===0)return"";var r=this.head;var t=""+r.data;while(r=r.next){t+=e+r.data}return t};e.concat=function concat(e){if(this.length===0)return i.alloc(0);var r=i.allocUnsafe(e>>>0);var t=this.head;var n=0;while(t){copyBuffer(t.data,r,n);n+=t.data.length;t=t.next}return r};e.consume=function consume(e,r){var t;if(ei.length?i.length:e;if(u===i.length)n+=i;else n+=i.slice(0,e);e-=u;if(e===0){if(u===i.length){++t;if(r.next)this.head=r.next;else this.head=this.tail=null}else{this.head=r;r.data=i.slice(u)}break}++t}this.length-=t;return n};e._getBuffer=function _getBuffer(e){var r=i.allocUnsafe(e);var t=this.head;var n=1;t.data.copy(r);e-=t.data.length;while(t=t.next){var u=t.data;var o=e>u.length?u.length:e;u.copy(r,r.length-e,0,o);e-=o;if(e===0){if(o===u.length){++n;if(t.next)this.head=t.next;else this.head=this.tail=null}else{this.head=t;t.data=u.slice(o)}break}++n}this.length-=n;return r};e[s]=function(e,r){return o(this,_objectSpread({},r,{depth:0,customInspect:false}))};return BufferList}()},function(e){"use strict";e.exports=unorderedItems;var r="\n";var t=r+r;function unorderedItems(e){var n=this;var i=n.options.bullet;var u=n.visitors.listItem;var o=e.children;var s=o.length;var a=-1;var f=[];while(++a{r=r||process.argv;const t=e.startsWith("-")?"":e.length===1?"-":"--";const n=r.indexOf(t+e);const i=r.indexOf("--");return n!==-1&&(i===-1?true:ne&&typeof e==="object"&&!Array.isArray(e);const f=(e,r,t=false)=>{if(Array.isArray(e)){const n=e.map(e=>f(e,r,t));const i=e=>{for(const r of n){const t=r(e);if(t)return t}return false};return i}const n=a(e)&&e.tokens&&e.input;if(e===""||typeof e!=="string"&&!n){throw new TypeError("Expected pattern to be a non-empty string")}const i=r||{};const u=o.isWindows(r);const s=n?f.compileRe(e,r):f.makeRe(e,r,false,true);const c=s.state;delete s.state;let l=()=>false;if(i.ignore){const e={...r,ignore:null,onMatch:null,onResult:null};l=f(i.ignore,e,t)}const p=(t,n=false)=>{const{isMatch:o,match:a,output:p}=f.test(t,s,r,{glob:e,posix:u});const h={glob:e,state:c,regex:s,posix:u,input:t,output:p,match:a,isMatch:o};if(typeof i.onResult==="function"){i.onResult(h)}if(o===false){h.isMatch=false;return n?h:false}if(l(t)){if(typeof i.onIgnore==="function"){i.onIgnore(h)}h.isMatch=false;return n?h:false}if(typeof i.onMatch==="function"){i.onMatch(h)}return n?h:true};if(t){p.state=c}return p};f.test=((e,r,t,{glob:n,posix:i}={})=>{if(typeof e!=="string"){throw new TypeError("Expected input to be a string")}if(e===""){return{isMatch:false,output:""}}const u=t||{};const s=u.format||(i?o.toPosixSlashes:null);let a=e===n;let c=a&&s?s(e):e;if(a===false){c=s?s(e):e;a=c===n}if(a===false||u.capture===true){if(u.matchBase===true||u.basename===true){a=f.matchBase(e,r,t,i)}else{a=r.exec(c)}}return{isMatch:Boolean(a),match:a,output:c}});f.matchBase=((e,r,t,i=o.isWindows(t))=>{const u=r instanceof RegExp?r:f.makeRe(r,t);return u.test(n.basename(e))});f.isMatch=((e,r,t)=>f(r,t)(e));f.parse=((e,r)=>{if(Array.isArray(e))return e.map(e=>f.parse(e,r));return u(e,{...r,fastpaths:false})});f.scan=((e,r)=>i(e,r));f.compileRe=((e,r,t=false,n=false)=>{if(t===true){return e.output}const i=r||{};const u=i.contains?"":"^";const o=i.contains?"":"$";let s=`${u}(?:${e.output})${o}`;if(e&&e.negated===true){s=`^(?!${s}).*$`}const a=f.toRegex(s,r);if(n===true){a.state=e}return a});f.makeRe=((e,r,t=false,n=false)=>{if(!e||typeof e!=="string"){throw new TypeError("Expected a non-empty string")}const i=r||{};let o={negated:false,fastpaths:true};let s="";let a;if(e.startsWith("./")){e=e.slice(2);s=o.prefix="./"}if(i.fastpaths!==false&&(e[0]==="."||e[0]==="*")){a=u.fastpaths(e,r)}if(a===undefined){o=u(e,r);o.prefix=s+(o.prefix||"")}else{o.output=a}return f.compileRe(o,r,t,n)});f.toRegex=((e,r)=>{try{const t=r||{};return new RegExp(e,t.flags||(t.nocase?"i":""))}catch(e){if(r&&r.debug===true)throw e;return/$^/}});f.constants=s;e.exports=f},,function(e,r,t){"use strict";var n=t(784)("unified-engine:file-pipeline:configure");var i=t(999);var u=t(146);var o=t(145);var s=t(474);e.exports=configure;function configure(e,r,t,a){var f=e.configuration;var c=e.processor;if(i(r).fatal){return a()}f.load(r.path,handleConfiguration);function handleConfiguration(e,r){var i;var f;var l;var p;var h;var v;if(e){return a(e)}n("Using settings `%j`",r.settings);c.data("settings",r.settings);i=r.plugins;p=i.length;h=-1;n("Using `%d` plugins",p);while(++hisNaN(e)?{}:{depth:e};const O=u(n.stat);const k=u(n.open);const x=u(n.close);const R=u(n.lstat);const T=u(n.realpath);const I={stat:O,lstat:R};const L=new Map;const M=10;const j=new Set([69888,70400,71424,72704,73472,131328,131840,262912]);const P=(e,r)=>{const t=o.watch(e,r);return{stop:t}};function setFSEventsListener(e,r,t,n,u){let s=i.extname(e)?i.dirname(e):e;const a=i.dirname(s);let f=L.get(s);if(N(a)){s=a}const c=i.resolve(e);const l=c!==r;const p=(e,n,u)=>{if(l)e=e.replace(r,c);if(e===c||!e.indexOf(c+i.sep))t(e,n,u)};let h=false;for(const e of L.keys()){if(r.indexOf(i.resolve(e)+i.sep)===0){s=e;f=L.get(s);h=true;break}}if(f||h){f.listeners.add(p)}else{f={listeners:new Set([p]),rawEmitter:n,watcher:P(s,(e,r)=>{if(u.closed)return;const t=o.getInfo(e,r);f.listeners.forEach(n=>{n(e,r,t)});f.rawEmitter(t.event,e,t)})};L.set(s,f)}return()=>{const e=f.listeners;e.delete(p);if(!e.size){L.delete(s);if(f.watcher)return f.watcher.stop().then(()=>{f.rawEmitter=f.watcher=undefined;Object.freeze(f)})}}}const N=e=>{let r=0;for(const t of L.keys()){if(t.indexOf(e)===0){r++;if(r>=M){return true}}}return false};const $=()=>o&&L.size<128;const H=(e,r)=>{let t=0;while(!e.indexOf(r)&&(e=i.dirname(e))!==r)t++;return t};class FsEventsHandler{constructor(e){this.fsw=e}checkIgnored(e,r){const t=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,r)){t.add(e);if(r&&r.isDirectory()){t.add(e+A)}return true}t.delete(e);t.delete(e+A)}addOrChange(e,r,t,n,i,u,o,f){const c=i.has(u)?a:s;this.handleEvent(c,e,r,t,n,i,u,o,f)}async checkFd(e,r,t,n,i,u,o,s){try{const a=await k(e,_);if(this.fsw.closed)return;await x(a);if(this.fsw.closed)return;this.addOrChange(e,r,t,n,i,u,o,s)}catch(a){if(a.code==="EACCES"){this.addOrChange(e,r,t,n,i,u,o,s)}else{this.handleEvent(c,e,r,t,n,i,u,o,s)}}}handleEvent(e,r,t,n,i,u,o,a,l){if(this.fsw.closed||this.checkIgnored(r))return;if(e===c){if(a.type===E||u.has(o)){this.fsw._remove(i,o)}}else{if(e===s){if(a.type===E)this.fsw._getWatchedDir(r);if(a.type===b&&l.followSymlinks){const e=l.depth===undefined?undefined:H(t,n)+1;return this._addToFsEvents(r,false,true,e)}this.fsw._getWatchedDir(i).add(o)}const u=a.type===E?e+C:e;this.fsw._emit(u,r);if(u===f)this._addToFsEvents(r,false,true)}}_watchWithFsEvents(e,r,t,n){if(this.fsw.closed)return;if(this.fsw._isIgnored(e))return;const u=this.fsw.options;const o=async(o,s,a)=>{if(this.fsw.closed)return;if(u.depth!==undefined&&H(o,r)>u.depth)return;const f=t(i.join(e,i.relative(e,o)));if(n&&!n(f))return;const l=i.dirname(f);const p=i.basename(f);const h=this.fsw._getWatchedDir(a.type===E?f:l);if(j.has(s)||a.event===m){if(typeof u.ignored===F){let e;try{e=await O(f)}catch(e){}if(this.fsw.closed)return;if(this.checkIgnored(f,e))return;if(e){this.addOrChange(f,o,r,l,h,p,a,u)}else{this.handleEvent(c,f,o,r,l,h,p,a,u)}}else{this.checkFd(f,o,r,l,h,p,a,u)}}else{switch(a.event){case v:case D:return this.addOrChange(f,o,r,l,h,p,a,u);case d:case g:return this.checkFd(f,o,r,l,h,p,a,u)}}};const s=setFSEventsListener(e,r,o,this.fsw._emitRaw,this.fsw);this.fsw._emitReady();return s}async _handleFsEventsSymlink(e,r,t,n){if(this.fsw.closed||this.fsw._symlinkPaths.has(r))return;this.fsw._symlinkPaths.set(r,true);this.fsw._incrReadyCount();try{const r=await T(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(r)){return this.fsw._emitReady()}this.fsw._incrReadyCount();this._addToFsEvents(r||e,n=>{let u=e;if(r&&r!==w){u=n.replace(r,e)}else if(n!==w){u=i.join(e,n)}return t(u)},false,n)}catch(e){if(this.fsw._handleError(e)){return this.fsw._emitReady()}}}emitAdd(e,r,t,n,u){const o=t(e);const a=r.isDirectory();const c=this.fsw._getWatchedDir(i.dirname(o));const l=i.basename(o);if(a)this.fsw._getWatchedDir(o);if(c.has(l))return;c.add(l);if(!n.ignoreInitial||u===true){this.fsw._emit(a?f:s,o,r)}}initWatch(e,r,t,n){if(this.fsw.closed)return;const u=this._watchWithFsEvents(t.watchPath,i.resolve(e||t.watchPath),n,t.globFilter);this.fsw._addPathCloser(r,u)}async _addToFsEvents(e,r,t,n){if(this.fsw.closed){return}const u=this.fsw.options;const o=typeof r===F?r:S;const s=this.fsw._getWatchHelpers(e);try{const r=await I[s.statMethod](s.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(s.watchPath,r)){throw null}if(r.isDirectory()){if(!s.globFilter)this.emitAdd(o(e),r,o,u,t);if(n&&n>u.depth)return;this.fsw._readdirp(s.watchPath,{fileFilter:e=>s.filterPath(e),directoryFilter:e=>s.filterDir(e),...B(u.depth-(n||0))}).on(p,e=>{if(this.fsw.closed){return}if(e.stats.isDirectory()&&!s.filterPath(e))return;const r=i.join(s.watchPath,e.path);const{fullPath:n}=e;if(s.followSymlinks&&e.stats.isSymbolicLink()){const e=u.depth===undefined?undefined:H(r,i.resolve(s.watchPath))+1;this._handleFsEventsSymlink(r,n,o,e)}else{this.emitAdd(r,e.stats,o,u,t)}}).on(l,y).on(h,()=>{this.fsw._emitReady()})}else{this.emitAdd(s.watchPath,r,o,u,t);this.fsw._emitReady()}}catch(e){if(!e||this.fsw._handleError(e)){this.fsw._emitReady();this.fsw._emitReady()}}if(u.persistent&&t!==true){if(typeof r===F){this.initWatch(undefined,e,s,o)}else{let r;try{r=await T(s.watchPath)}catch(e){}this.initWatch(r,e,s,o)}}}}e.exports=FsEventsHandler;e.exports.canUse=$},,,,,,function(e,r,t){"use strict";const n=t(225);e.exports=((e,r={})=>{let t=(e,i={})=>{let u=r.escapeInvalid&&n.isInvalidBrace(i);let o=e.invalid===true&&r.escapeInvalid===true;let s="";if(e.value){if((u||o)&&n.isOpenOrClose(e)){return"\\"+e.value}return e.value}if(e.value){return e.value}if(e.nodes){for(let r of e.nodes){s+=t(r)}}return s};return t(e)})},,,function(e,r,t){"use strict";var n=t(266);var i=n();e.exports=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return i?e.replace(/^~($|\/|\\)/,i+"$1"):e}},function(e,r,t){"use strict";var n=t(945);function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(e){return typeof e==="undefined"}e.exports=new n("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},function(e,r,t){"use strict";var n=t(784)("unified-engine:file-pipeline:transform");var i=t(999);e.exports=transform;function transform(e,r,t,u){if(i(r).fatal){u()}else{n("Transforming document `%s`",r.path);e.processor.run(e.tree,r,onrun)}function onrun(r,t){n("Transformed document (error: %s)",r);e.tree=t;u(r)}}},,,,,function(e,r,t){"use strict";var n=t(310);e.exports=escape;escape.locator=n;var i="\n";var u="\\";function escape(e,r,t){var n=this;var o;var s;if(r.charAt(0)===u){o=r.charAt(1);if(n.escape.indexOf(o)!==-1){if(t){return true}if(o===i){s={type:"break"}}else{s={type:"text",value:o}}return e(u+o)(s)}}}},,function(e,r,t){"use strict";var n=t(926);var i=t(773);var u=t(578);var o=t(215);var s=t(797);e.exports=factory;var a="\t";var f="\n";var c=" ";var l="#";var p="&";var h="(";var v=")";var D="*";var d="+";var g="-";var m=".";var E=":";var b="<";var A=">";var C="[";var w="\\";var F="]";var y="_";var S="`";var _="|";var B="~";var O="!";var k={"<":"<",":":":","&":"&","|":"|","~":"~"};var x="shortcut";var R="mailto";var T="https";var I="http";var L=/\n\s*$/;function factory(e){return escape;function escape(r,t,R){var T=this;var I=e.gfm;var M=e.commonmark;var j=e.pedantic;var P=M?[m,v]:[m];var N=R&&R.children;var $=N&&N.indexOf(t);var H=N&&N[$-1];var U=N&&N[$+1];var W=r.length;var G=o(e);var q=-1;var Y=[];var z=Y;var V;var J;var Z;var Q;var X;var K;if(H){V=text(H)&&L.test(H.value)}else{V=!R||R.type==="root"||R.type==="paragraph"}while(++q0||J===F&&T.inLink||I&&J===B&&r.charAt(q+1)===B||I&&J===_&&(T.inTable||alignment(r,q))||J===y&&q>0&&q{const e=t?Promise.resolve(t).then(n.stop):Promise.resolve(undefined);t=undefined;return e}}function getInfo(e,r){return{path:e,flags:r,event:getEventType(r),type:getFileType(r),changes:getFileChanges(r)}}function getFileType(e){if(i.ItemIsFile&e)return"file";if(i.ItemIsDir&e)return"directory";if(i.ItemIsSymlink&e)return"symlink"}function anyIsTrue(e){for(let r in e){if(e[r])return true}return false}function getEventType(e){if(i.ItemRemoved&e)return"deleted";if(i.ItemRenamed&e)return"moved";if(i.ItemCreated&e)return"created";if(i.ItemModified&e)return"modified";if(i.RootChanged&e)return"root-changed";if(i.ItemCloned&e)return"cloned";if(anyIsTrue(e))return"modified";return"unknown"}function getFileChanges(e){return{inode:!!(i.ItemInodeMetaMod&e),finder:!!(i.ItemFinderInfoMod&e),access:!!(i.ItemChangeOwner&e),xattrs:!!(i.ItemXattrMod&e)}}r.watch=watch;r.getInfo=getInfo;r.constants=i},,,function(e,r,t){e.exports=glob;var n=t(747);var i=t(302);var u=t(595);var o=u.Minimatch;var s=t(689);var a=t(614).EventEmitter;var f=t(622);var c=t(357);var l=t(681);var p=t(245);var h=t(856);var v=h.alphasort;var D=h.alphasorti;var d=h.setopts;var g=h.ownProp;var m=t(674);var E=t(669);var b=h.childrenIgnored;var A=h.isIgnored;var C=t(49);function glob(e,r,t){if(typeof r==="function")t=r,r={};if(!r)r={};if(r.sync){if(t)throw new TypeError("callback provided to sync glob");return p(e,r)}return new Glob(e,r,t)}glob.sync=p;var w=glob.GlobSync=p.GlobSync;glob.glob=glob;function extend(e,r){if(r===null||typeof r!=="object"){return e}var t=Object.keys(r);var n=t.length;while(n--){e[t[n]]=r[t[n]]}return e}glob.hasMagic=function(e,r){var t=extend({},r);t.noprocess=true;var n=new Glob(e,t);var i=n.minimatch.set;if(!e)return false;if(i.length>1)return true;for(var u=0;uthis.maxLength)return r();if(!this.stat&&g(this.cache,t)){var u=this.cache[t];if(Array.isArray(u))u="DIR";if(!i||u==="DIR")return r(null,u);if(i&&u==="FILE")return r()}var o;var s=this.statCache[t];if(s!==undefined){if(s===false)return r(null,s);else{var a=s.isDirectory()?"DIR":"FILE";if(i&&a==="FILE")return r();else return r(null,a,s)}}var f=this;var c=m("stat\0"+t,lstatcb_);if(c)n.lstat(t,c);function lstatcb_(i,u){if(u&&u.isSymbolicLink()){return n.stat(t,function(n,i){if(n)f._stat2(e,t,null,u,r);else f._stat2(e,t,n,i,r)})}else{f._stat2(e,t,i,u,r)}}};Glob.prototype._stat2=function(e,r,t,n,i){if(t&&(t.code==="ENOENT"||t.code==="ENOTDIR")){this.statCache[r]=false;return i()}var u=e.slice(-1)==="/";this.statCache[r]=n;if(r.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var o=true;if(n)o=n.isDirectory()?"DIR":"FILE";this.cache[r]=this.cache[r]||o;if(u&&o==="FILE")return i();return i(null,o,n)}},,function(e,r,t){"use strict";var n=t(578);var i=t(349);e.exports=footnoteDefinition;footnoteDefinition.notInList=true;footnoteDefinition.notInBlock=true;var u="\\";var o="\n";var s="\t";var a=" ";var f="[";var c="]";var l="^";var p=":";var h=/^( {4}|\t)?/gm;function footnoteDefinition(e,r,t){var v=this;var D=v.offset;var d;var g;var m;var E;var b;var A;var C;var w;var F;var y;var S;var _;if(!v.options.footnotes){return}d=0;g=r.length;m="";E=e.now();b=E.line;while(d=0){r=r.slice(1)}if(r===".inf"){return t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(r===".nan"){return NaN}else if(r.indexOf(":")>=0){r.split(":").forEach(function(e){i.unshift(parseFloat(e,10))});r=0;n=1;i.forEach(function(e){r+=e*n;n*=60});return t*r}return t*parseFloat(r,10)}var o=/^[-+]?[0-9]+e/;function representYamlFloat(e,r){var t;if(isNaN(e)){switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(n.isNegativeZero(e)){return"-0.0"}t=e.toString(10);return o.test(t)?t.replace("e",".e"):t}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||n.isNegativeZero(e))}e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},function(e){"use strict";e.exports=interrupt;function interrupt(e,r,t,n){var i=e.length;var u=-1;var o;var s;while(++u{if(typeof r==="number"){t=r}if(n.has(e.toLowerCase())){r=n.get(e.toLowerCase());const t=e.charAt(0);const i=t===t.toUpperCase();if(i){r=t.toUpperCase()+r.slice(1)}const u=e===e.toUpperCase();if(u){r=r.toUpperCase()}}else if(typeof r!=="string"){r=(e.replace(/(?:s|x|z|ch|sh)$/i,"$&e").replace(/([^aeiou])y$/i,"$1ie")+"s").replace(/i?e?s$/i,r=>{const t=e.slice(-1)===e.slice(-1).toLowerCase();return t?r.toLowerCase():r.toUpperCase()})}return Math.abs(t)===1?e:r})},,function(e){(function(){var r;if(true){r=e.exports=format}else{}r.format=format;r.vsprintf=vsprintf;if(typeof console!=="undefined"&&typeof console.log==="function"){r.printf=printf}function printf(){console.log(format.apply(null,arguments))}function vsprintf(e,r){return format.apply(null,[e].concat(r))}function format(e){var r=1,t=[].slice.call(arguments),n=0,i=e.length,u="",o,s=false,a,f,c=false,l,p=function(){return t[r++]},h=function(){var r="";while(/\d/.test(e[n])){r+=e[n++];o=e[n]}return r.length>0?parseInt(r):null};for(;n>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,r,t){var n=r.length-1;if(n=0){if(i>0)e.lastNeed=i-1;return i}if(--n=0){if(i>0)e.lastNeed=i-2;return i}if(--n=0){if(i>0){if(i===2)i=0;else e.lastNeed=i-3}return i}return 0}function utf8CheckExtraBytes(e,r,t){if((r[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&r.length>1){if((r[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&r.length>2){if((r[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var r=this.lastTotal-this.lastNeed;var t=utf8CheckExtraBytes(this,e,r);if(t!==undefined)return t;if(this.lastNeed<=e.length){e.copy(this.lastChar,r,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,r,0,e.length);this.lastNeed-=e.length}function utf8Text(e,r){var t=utf8CheckIncomplete(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var n=e.length-(t-this.lastNeed);e.copy(this.lastChar,0,n);return e.toString("utf8",r,n)}function utf8End(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed)return r+"�";return r}function utf16Text(e,r){if((e.length-r)%2===0){var t=e.toString("utf16le",r);if(t){var n=t.charCodeAt(t.length-1);if(n>=55296&&n<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return t.slice(0,-1)}}return t}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",r,e.length-1)}function utf16End(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function base64Text(e,r){var t=(e.length-r)%3;if(t===0)return e.toString("base64",r);this.lastNeed=3-t;this.lastTotal=3;if(t===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",r,e.length-t)}function base64End(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed)return r+this.lastChar.toString("base64",0,3-this.lastNeed);return r}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},function(e,r,t){"use strict";var n=t(940);var i=t(689);e.exports=unherit;function unherit(e){var r;var t;var u;i(Of,e);i(From,Of);r=Of.prototype;for(t in r){u=r[t];if(u&&typeof u==="object"){r[t]="concat"in u?u.concat():n(u)}}return Of;function From(r){return e.apply(this,r)}function Of(){if(!(this instanceof Of)){return new From(arguments)}return e.apply(this,arguments)}}},,function(e,r,t){"use strict";const n=t(460);const i=t(225);const u=(e,r={})=>{let t=(e,u={})=>{let o=i.isInvalidBrace(u);let s=e.invalid===true&&r.escapeInvalid===true;let a=o===true||s===true;let f=r.escapeInvalid===true?"\\":"";let c="";if(e.isOpen===true){return f+e.value}if(e.isClose===true){return f+e.value}if(e.type==="open"){return a?f+e.value:"("}if(e.type==="close"){return a?f+e.value:")"}if(e.type==="comma"){return e.prev.type==="comma"?"":a?e.value:"|"}if(e.value){return e.value}if(e.nodes&&e.ranges>0){let t=i.reduce(e.nodes);let u=n(...t,{...r,wrap:false,toRegex:true});if(u.length!==0){return t.length>1&&u.length>1?`(${u})`:u}}if(e.nodes){for(let r of e.nodes){c+=t(r,e)}}return c};return t(e)};e.exports=u},function(e,r,t){"use strict";var n=t(747);var i=t(622);var u=t(784)("unified-engine:file-pipeline:file-system");var o=t(999);e.exports=fileSystem;var s=n.writeFile;var a=i.resolve;function fileSystem(e,r,t,n){var i;if(!e.output){u("Ignoring writing to file-system");return n()}if(!r.data.unifiedEngineGiven){u("Ignoring programmatically added file");return n()}i=r.path;if(!i){u("Cannot write file without a `destinationPath`");return n(new Error("Cannot write file without an output path"))}if(o(r).fatal){u("Cannot write file with a fatal error");return n()}i=a(e.cwd,i);u("Writing document to `%s`",i);r.stored=true;s(i,r.toString(),n)}},,,,,function(e,r,t){"use strict";const n=t(460);const i=t(382);const u=t(225);const o=(e="",r="",t=false)=>{let n=[];e=[].concat(e);r=[].concat(r);if(!r.length)return e;if(!e.length){return t?u.flatten(r).map(e=>`{${e}}`):r}for(let i of e){if(Array.isArray(i)){for(let e of i){n.push(o(e,r,t))}}else{for(let e of r){if(t===true&&typeof e==="string")e=`{${e}}`;n.push(Array.isArray(e)?o(i,e,t):i+e)}}}return u.flatten(n)};const s=(e,r={})=>{let t=r.rangeLimit===void 0?1e3:r.rangeLimit;let s=(e,a={})=>{e.queue=[];let f=a;let c=a.queue;while(f.type!=="brace"&&f.type!=="root"&&f.parent){f=f.parent;c=f.queue}if(e.invalid||e.dollar){c.push(o(c.pop(),i(e,r)));return}if(e.type==="brace"&&e.invalid!==true&&e.nodes.length===2){c.push(o(c.pop(),["{}"]));return}if(e.nodes&&e.ranges>0){let s=u.reduce(e.nodes);if(u.exceedsLimit(...s,r.step,t)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let a=n(...s,r);if(a.length===0){a=i(e,r)}c.push(o(c.pop(),a));e.nodes=[];return}let l=u.encloseBrace(e);let p=e.queue;let h=e;while(h.type!=="brace"&&h.type!=="root"&&h.parent){h=h.parent;p=h.queue}for(let r=0;r=s){continue}A="";while(h/i;function inlineHTML(e,r,t){var i=this;var p=r.length;var h;var v;if(r.charAt(0)!==o||p<3){return}h=r.charAt(1);if(!n(h)&&h!==s&&h!==a&&h!==f){return}v=r.match(u);if(!v){return}if(t){return true}v=v[0];if(!i.inLink&&c.test(v)){i.inLink=true}else if(i.inLink&&l.test(v)){i.inLink=false}return e(v)({type:"html",value:v})}},,,function(e,r,t){"use strict";var n=t(747);var i=t(622);var u=t(269);r.read=readSync;r.write=writeSync;function readSync(e,r){var t=u(e);t.contents=n.readFileSync(i.resolve(t.cwd,t.path),r);return t}function writeSync(e,r){var t=u(e);n.writeFileSync(i.resolve(t.cwd,t.path),t.contents||"",r)}},,,,,,,,function(e,r,t){"use strict";var n=t(740);var i=t(556);var u=t(93);var o=t(723);var s=t(910);var a=Object.prototype.hasOwnProperty;var f=1;var c=2;var l=3;var p=4;var h=1;var v=2;var D=3;var d=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var g=/[\x85\u2028\u2029]/;var m=/[,\[\]\{\}]/;var E=/^(?:!|!!|![a-z\-]+!)$/i;var b=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(e){return Object.prototype.toString.call(e)}function is_EOL(e){return e===10||e===13}function is_WHITE_SPACE(e){return e===9||e===32}function is_WS_OR_EOL(e){return e===9||e===32||e===10||e===13}function is_FLOW_INDICATOR(e){return e===44||e===91||e===93||e===123||e===125}function fromHexCode(e){var r;if(48<=e&&e<=57){return e-48}r=e|32;if(97<=r&&r<=102){return r-97+10}return-1}function escapedHexLen(e){if(e===120){return 2}if(e===117){return 4}if(e===85){return 8}return 0}function fromDecimalCode(e){if(48<=e&&e<=57){return e-48}return-1}function simpleEscapeSequence(e){return e===48?"\0":e===97?"":e===98?"\b":e===116?"\t":e===9?"\t":e===110?"\n":e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function charFromCodepoint(e){if(e<=65535){return String.fromCharCode(e)}return String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var A=new Array(256);var C=new Array(256);for(var w=0;w<256;w++){A[w]=simpleEscapeSequence(w)?1:0;C[w]=simpleEscapeSequence(w)}function State(e,r){this.input=e;this.filename=r["filename"]||null;this.schema=r["schema"]||s;this.onWarning=r["onWarning"]||null;this.legacy=r["legacy"]||false;this.json=r["json"]||false;this.listener=r["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(e,r){return new i(r,new u(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function throwError(e,r){throw generateError(e,r)}function throwWarning(e,r){if(e.onWarning){e.onWarning.call(null,generateError(e,r))}}var F={YAML:function handleYamlDirective(e,r,t){var n,i,u;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(t.length!==1){throwError(e,"YAML directive accepts exactly one argument")}n=/^([0-9]+)\.([0-9]+)$/.exec(t[0]);if(n===null){throwError(e,"ill-formed argument of the YAML directive")}i=parseInt(n[1],10);u=parseInt(n[2],10);if(i!==1){throwError(e,"unacceptable YAML version of the document")}e.version=t[0];e.checkLineBreaks=u<2;if(u!==1&&u!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,r,t){var n,i;if(t.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}n=t[0];i=t[1];if(!E.test(n)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(a.call(e.tagMap,n)){throwError(e,'there is a previously declared suffix for "'+n+'" tag handle')}if(!b.test(i)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}e.tagMap[n]=i}};function captureSegment(e,r,t,n){var i,u,o,s;if(r1){e.result+=n.repeat("\n",r-1)}}function readPlainScalar(e,r,t){var n,i,u,o,s,a,f,c,l=e.kind,p=e.result,h;h=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(h)||is_FLOW_INDICATOR(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96){return false}if(h===63||h===45){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||t&&is_FLOW_INDICATOR(i)){return false}}e.kind="scalar";e.result="";u=o=e.position;s=false;while(h!==0){if(h===58){i=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(i)||t&&is_FLOW_INDICATOR(i)){break}}else if(h===35){n=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(n)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||t&&is_FLOW_INDICATOR(h)){break}else if(is_EOL(h)){a=e.line;f=e.lineStart;c=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=r){s=true;h=e.input.charCodeAt(e.position);continue}else{e.position=o;e.line=a;e.lineStart=f;e.lineIndent=c;break}}if(s){captureSegment(e,u,o,false);writeFoldedLines(e,e.line-a);u=o=e.position;s=false}if(!is_WHITE_SPACE(h)){o=e.position+1}h=e.input.charCodeAt(++e.position)}captureSegment(e,u,o,false);if(e.result){return true}e.kind=l;e.result=p;return false}function readSingleQuotedScalar(e,r){var t,n,i;t=e.input.charCodeAt(e.position);if(t!==39){return false}e.kind="scalar";e.result="";e.position++;n=i=e.position;while((t=e.input.charCodeAt(e.position))!==0){if(t===39){captureSegment(e,n,e.position,true);t=e.input.charCodeAt(++e.position);if(t===39){n=e.position;e.position++;i=e.position}else{return true}}else if(is_EOL(t)){captureSegment(e,n,i,true);writeFoldedLines(e,skipSeparationSpace(e,false,r));n=i=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;i=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,r){var t,n,i,u,o,s;s=e.input.charCodeAt(e.position);if(s!==34){return false}e.kind="scalar";e.result="";e.position++;t=n=e.position;while((s=e.input.charCodeAt(e.position))!==0){if(s===34){captureSegment(e,t,e.position,true);e.position++;return true}else if(s===92){captureSegment(e,t,e.position,true);s=e.input.charCodeAt(++e.position);if(is_EOL(s)){skipSeparationSpace(e,false,r)}else if(s<256&&A[s]){e.result+=C[s];e.position++}else if((o=escapedHexLen(s))>0){i=o;u=0;for(;i>0;i--){s=e.input.charCodeAt(++e.position);if((o=fromHexCode(s))>=0){u=(u<<4)+o}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(u);e.position++}else{throwError(e,"unknown escape sequence")}t=n=e.position}else if(is_EOL(s)){captureSegment(e,t,n,true);writeFoldedLines(e,skipSeparationSpace(e,false,r));t=n=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;n=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,r){var t=true,n,i=e.tag,u,o=e.anchor,s,a,c,l,p,h={},v,D,d,g;g=e.input.charCodeAt(e.position);if(g===91){a=93;p=false;u=[]}else if(g===123){a=125;p=true;u={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=u}g=e.input.charCodeAt(++e.position);while(g!==0){skipSeparationSpace(e,true,r);g=e.input.charCodeAt(e.position);if(g===a){e.position++;e.tag=i;e.anchor=o;e.kind=p?"mapping":"sequence";e.result=u;return true}else if(!t){throwError(e,"missed comma between flow collection entries")}D=v=d=null;c=l=false;if(g===63){s=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(s)){c=l=true;e.position++;skipSeparationSpace(e,true,r)}}n=e.line;composeNode(e,r,f,false,true);D=e.tag;v=e.result;skipSeparationSpace(e,true,r);g=e.input.charCodeAt(e.position);if((l||e.line===n)&&g===58){c=true;g=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,r);composeNode(e,r,f,false,true);d=e.result}if(p){storeMappingPair(e,u,h,D,v,d)}else if(c){u.push(storeMappingPair(e,null,h,D,v,d))}else{u.push(v)}skipSeparationSpace(e,true,r);g=e.input.charCodeAt(e.position);if(g===44){t=true;g=e.input.charCodeAt(++e.position)}else{t=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,r){var t,i,u=h,o=false,s=false,a=r,f=0,c=false,l,p;p=e.input.charCodeAt(e.position);if(p===124){i=false}else if(p===62){i=true}else{return false}e.kind="scalar";e.result="";while(p!==0){p=e.input.charCodeAt(++e.position);if(p===43||p===45){if(h===u){u=p===43?D:v}else{throwError(e,"repeat of a chomping mode identifier")}}else if((l=fromDecimalCode(p))>=0){if(l===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!s){a=r+l-1;s=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(p)){do{p=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(p));if(p===35){do{p=e.input.charCodeAt(++e.position)}while(!is_EOL(p)&&p!==0)}}while(p!==0){readLineBreak(e);e.lineIndent=0;p=e.input.charCodeAt(e.position);while((!s||e.lineIndenta){a=e.lineIndent}if(is_EOL(p)){f++;continue}if(e.lineIndentr)&&a!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndentr){if(composeNode(e,r,p,true,i)){if(d){v=e.result}else{D=e.result}}if(!d){storeMappingPair(e,f,l,h,v,D,u,o);h=v=D=null}skipSeparationSpace(e,true,-1);m=e.input.charCodeAt(e.position)}if(e.lineIndent>r&&m!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndentr){h=1}else if(e.lineIndent===r){h=0}else if(e.lineIndentr){h=1}else if(e.lineIndent===r){h=0}else if(e.lineIndent tag; it should be "'+m.kind+'", not "'+e.kind+'"')}if(!m.resolve(e.result)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=m.construct(e.result);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}else{throwError(e,"unknown tag !<"+e.tag+">")}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||D}function readDocument(e){var r=e.position,t,n,i,u=false,o;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap={};e.anchorMap={};while((o=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);o=e.input.charCodeAt(e.position);if(e.lineIndent>0||o!==37){break}u=true;o=e.input.charCodeAt(++e.position);t=e.position;while(o!==0&&!is_WS_OR_EOL(o)){o=e.input.charCodeAt(++e.position)}n=e.input.slice(t,e.position);i=[];if(n.length<1){throwError(e,"directive name must not be less than one character in length")}while(o!==0){while(is_WHITE_SPACE(o)){o=e.input.charCodeAt(++e.position)}if(o===35){do{o=e.input.charCodeAt(++e.position)}while(o!==0&&!is_EOL(o));break}if(is_EOL(o))break;t=e.position;while(o!==0&&!is_WS_OR_EOL(o)){o=e.input.charCodeAt(++e.position)}i.push(e.input.slice(t,e.position))}if(o!==0)readLineBreak(e);if(a.call(F,n)){F[n](e,n,i)}else{throwWarning(e,'unknown document directive "'+n+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(u){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,p,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&g.test(e.input.slice(r,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.positione!==null&&typeof e==="object"&&!Array.isArray(e);const o=e=>{return r=>e===true?Number(r):String(r)};const s=e=>{return typeof e==="number"||typeof e==="string"&&e!==""};const a=e=>Number.isInteger(+e);const f=e=>{let r=`${e}`;let t=-1;if(r[0]==="-")r=r.slice(1);if(r==="0")return false;while(r[++t]==="0");return t>0};const c=(e,r,t)=>{if(typeof e==="string"||typeof r==="string"){return true}return t.stringify===true};const l=(e,r,t)=>{if(r>0){let t=e[0]==="-"?"-":"";if(t)e=e.slice(1);e=t+e.padStart(t?r-1:r,"0")}if(t===false){return String(e)}return e};const p=(e,r)=>{let t=e[0]==="-"?"-":"";if(t){e=e.slice(1);r--}while(e.length{e.negatives.sort((e,r)=>er?1:0);e.positives.sort((e,r)=>er?1:0);let t=r.capture?"":"?:";let n="";let i="";let u;if(e.positives.length){n=e.positives.join("|")}if(e.negatives.length){i=`-(${t}${e.negatives.join("|")})`}if(n&&i){u=`${n}|${i}`}else{u=n||i}if(r.wrap){return`(${t}${u})`}return u};const v=(e,r,t,n)=>{if(t){return i(e,r,{wrap:false,...n})}let u=String.fromCharCode(e);if(e===r)return u;let o=String.fromCharCode(r);return`[${u}-${o}]`};const D=(e,r,t)=>{if(Array.isArray(e)){let r=t.wrap===true;let n=t.capture?"":"?:";return r?`(${n}${e.join("|")})`:e.join("|")}return i(e,r,t)};const d=(...e)=>{return new RangeError("Invalid range arguments: "+n.inspect(...e))};const g=(e,r,t)=>{if(t.strictRanges===true)throw d([e,r]);return[]};const m=(e,r)=>{if(r.strictRanges===true){throw new TypeError(`Expected step "${e}" to be a number`)}return[]};const E=(e,r,t=1,n={})=>{let i=Number(e);let u=Number(r);if(!Number.isInteger(i)||!Number.isInteger(u)){if(n.strictRanges===true)throw d([e,r]);return[]}if(i===0)i=0;if(u===0)u=0;let s=i>u;let a=String(e);let g=String(r);let m=String(t);t=Math.max(Math.abs(t),1);let E=f(a)||f(g)||f(m);let b=E?Math.max(a.length,g.length,m.length):0;let A=E===false&&c(e,r,n)===false;let C=n.transform||o(A);if(n.toRegex&&t===1){return v(p(e,b),p(r,b),true,n)}let w={negatives:[],positives:[]};let F=e=>w[e<0?"negatives":"positives"].push(Math.abs(e));let y=[];let S=0;while(s?i>=u:i<=u){if(n.toRegex===true&&t>1){F(i)}else{y.push(l(C(i,S),b,A))}i=s?i-t:i+t;S++}if(n.toRegex===true){return t>1?h(w,n):D(y,null,{wrap:false,...n})}return y};const b=(e,r,t=1,n={})=>{if(!a(e)&&e.length>1||!a(r)&&r.length>1){return g(e,r,n)}let i=n.transform||(e=>String.fromCharCode(e));let u=`${e}`.charCodeAt(0);let o=`${r}`.charCodeAt(0);let s=u>o;let f=Math.min(u,o);let c=Math.max(u,o);if(n.toRegex&&t===1){return v(f,c,false,n)}let l=[];let p=0;while(s?u>=o:u<=o){l.push(i(u,p));u=s?u-t:u+t;p++}if(n.toRegex===true){return D(l,null,{wrap:false,options:n})}return l};const A=(e,r,t,n={})=>{if(r==null&&s(e)){return[e]}if(!s(e)||!s(r)){return g(e,r,n)}if(typeof t==="function"){return A(e,r,1,{transform:t})}if(u(t)){return A(e,r,0,t)}let i={...n};if(i.capture===true)i.wrap=true;t=t||i.step||1;if(!a(t)){if(t!=null&&!u(t))return m(t,i);return A(e,r,1,t)}if(a(e)&&a(r)){return E(e,r,t,i)}return b(e,r,Math.max(Math.abs(t),1),i)};e.exports=A},,,,,,function(e,r,t){"use strict";var n=t(818).codes.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(e,r,t){return e.highWaterMark!=null?e.highWaterMark:r?e[t]:null}function getHighWaterMark(e,r,t,i){var u=highWaterMarkFrom(r,i,t);if(u!=null){if(!(isFinite(u)&&Math.floor(u)===u)||u<0){var o=i?t:"highWaterMark";throw new n(o,u)}return Math.floor(u)}return e.objectMode?16:16*1024}e.exports={getHighWaterMark:getHighWaterMark}},,function(e,r,t){"use strict";var n=t(608);var i=t(263);var u=t(960);var o=t(353);e.exports=n("remark-lint:ordered-list-marker-style",orderedListMarkerStyle);var s=u.start;var a={")":true,".":true,null:true};function orderedListMarkerStyle(e,r,t){var n=String(r);t=typeof t!=="string"||t==="consistent"?null:t;if(a[t]!==true){r.fail("Invalid ordered list-item marker style `"+t+"`: use either `'.'` or `')'`")}i(e,"list",visitor);function visitor(e){var i=e.children;var u=e.ordered?i.length:0;var a=-1;var f;var c;while(++a2&&(l===u||l===i)&&(p===u||p===i)){s++;n--;while(s{createDebug[r]=e[r]});createDebug.instances=[];createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let r=0;for(let t=0;t{if(r==="%%"){return r}u++;const i=createDebug.formatters[n];if(typeof i==="function"){const n=e[u];r=i.call(t,n);e.splice(u,1);u--}return r});createDebug.formatArgs.call(t,e);const o=t.log||createDebug.log;o.apply(t,e)}debug.namespace=e;debug.enabled=createDebug.enabled(e);debug.useColors=createDebug.useColors();debug.color=selectColor(e);debug.destroy=destroy;debug.extend=extend;if(typeof createDebug.init==="function"){createDebug.init(debug)}createDebug.instances.push(debug);return debug}function destroy(){const e=createDebug.instances.indexOf(this);if(e!==-1){createDebug.instances.splice(e,1);return true}return false}function extend(e,r){const t=createDebug(this.namespace+(typeof r==="undefined"?":":r)+e);t.log=this.log;return t}function enable(e){createDebug.save(e);createDebug.names=[];createDebug.skips=[];let r;const t=(typeof e==="string"?e:"").split(/[\s,]+/);const n=t.length;for(r=0;r"-"+e)].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let r;let t;for(r=0,t=createDebug.skips.length;r>>=0;var i=e.byteLength-r;if(i<0){throw new RangeError("'offset' is out of bounds")}if(n===undefined){n=i}else{n>>>=0;if(n>i){throw new RangeError("'length' is out of bounds")}}return t?Buffer.from(e.slice(r,r+n)):new Buffer(new Uint8Array(e.slice(r,r+n)))}function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}return t?Buffer.from(e,r):new Buffer(e,r)}function bufferFrom(e,r,n){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,r,n)}if(typeof e==="string"){return fromString(e,r)}return t?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},,,function(e,r,t){"use strict";var n=t(747);var i=t(622);var u=t(784)("unified-engine:file-pipeline:copy");var o=t(489);e.exports=copy;var s=n.stat;var a=i.dirname;var f=i.resolve;var c=i.relative;function copy(e,r,t,n){var l=e.output;var p=t.expected>1;var h=l;var v=r.path;if(!o(h)){u("Not copying");return n()}h=f(e.cwd,h);u("Copying `%s`",v);s(h,onstatfile);function onstatfile(e,r){if(e){if(e.code!=="ENOENT"||l.charAt(l.length-1)===i.sep){return n(new Error("Cannot read output directory. Error:\n"+e.message))}s(a(h),onstatparent)}else{done(r.isDirectory())}}function onstatparent(e){if(e){n(new Error("Cannot read parent directory. Error:\n"+e.message))}else{done(false)}}function done(e){if(!e&&p){return n(new Error("Cannot write multiple files to single output: "+h))}r[e?"dirname":"path"]=c(r.cwd,h);u("Copying document from %s to %s",v,r.path);n()}}},function(e,r,t){"use strict";e.exports.plugins=[t(871),t(597),[t(290),2],[t(523),{checked:"x",unchecked:" "}],t(246),[t(137),"fenced"],t(274),t(297),[t(343),"`"],[t(941),"md"],t(154),[t(587),1],[t(865),"atx"],[t(873),"space"],t(588),t(130),t(975),t(912),t(285),t(197),[t(163),false],t(748),t(711),t(212),t(294),t(424),[t(690),[{no:"End-Of-Life",yes:"End-of-Life"},{no:"End-of-life",yes:"End-of-Life"},{no:"Github",yes:"GitHub"},{no:"hostname",yes:"host name"},{no:"[Jj]avascript",yes:"JavaScript"},{no:"Node",yes:"Node.js"},{no:"Node.JS",yes:"Node.js"},{no:"node.js",yes:"Node.js"},{no:"[Nn]ote that",yes:""},{no:"Rfc",yes:"RFC"},{no:"[Rr][Ff][Cc]\\d+",yes:"RFC "},{no:"rfc",yes:"RFC"},{no:"UNIX",yes:"Unix"},{no:"unix",yes:"Unix"},{no:"v8",yes:"V8"}]],t(652),[t(538),"*"],[t(586),"padded"],t(65),[t(30),"*"]]},,function(e){e.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;e.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;e.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},function(e,r,t){e.exports=t(546)},,,function(e){e.exports=["md","markdown","mdown","mkdn","mkd","mdwn","mkdown","ron"]},,,,,,,,,function(e,r,t){"use strict";var n=t(816);var i=t(127);var u=t(368);var o=t(259);var s=t(387);var a=t(99);var f=t(630);var c=t(504);var l=t(833);var p=t(436);e.exports=n().use(chunk(n().use(i).use(u).use(o).use(s))).use(chunk(n().use(a))).use(chunk(n().use(f).use(c).use(l).use(p)));function chunk(e){return run;function run(r,t,n,i){e.run(r,t,n,one);function one(e){var r=t.messages;var n;if(e){n=r.indexOf(e);if(n===-1){e=t.message(e);n=r.length-1}r[n].fatal=true}i()}}}},,,function(e,r,t){"use strict";var n=t(608);var i=t(684);var u=t(263);var o=t(960);var s=t(353);e.exports=n("remark-lint:checkbox-character-style",checkboxCharacterStyle);var a=o.start;var f=o.end;var c={x:true,X:true};var l={" ":true,"\t":true};var p={true:"checked",false:"unchecked"};function checkboxCharacterStyle(e,r,t){var n=String(r);var o=i(r);t=typeof t==="object"?t:{};if(t.unchecked&&l[t.unchecked]!==true){r.fail("Invalid unchecked checkbox marker `"+t.unchecked+"`: use either `'\\t'`, or `' '`")}if(t.checked&&c[t.checked]!==true){r.fail("Invalid checked checkbox marker `"+t.checked+"`: use either `'x'`, or `'X'`")}u(e,"listItem",visitor);function visitor(e){var i;var u;var c;var l;var h;var v;var D;if(typeof e.checked!=="boolean"||s(e)){return}i=p[e.checked];u=a(e).offset;c=(e.children.length===0?f(e):a(e.children[0])).offset;l=n.slice(u,c).trimRight().slice(0,-1);v=l.charAt(l.length-1);h=t[i];if(h){if(v!==h){D=i.charAt(0).toUpperCase()+i.slice(1)+" checkboxes should use `"+h+"` as a marker";r.message(D,{start:o.toPosition(u+l.length-1),end:o.toPosition(u+l.length)})}}else{t[i]=v}}}},,,function(e,r,t){"use strict";var n=t(608);var i=t(684);var u=t(263);var o=t(960);var s=t(353);e.exports=n("remark-lint:no-blockquote-without-marker",noBlockquoteWithoutMarker);var a="Missing marker in blockquote";function noBlockquoteWithoutMarker(e,r){var t=String(r);var n=i(r);var f=t.length;u(e,"blockquote",visitor);function visitor(e){var i=e.position&&e.position.indent;var u;var c;var l;var p;var h;var v;var D;if(s(e)||!i||i.length===0){return}u=o.start(e).line;c=i.length;l=-1;while(++l"){break}if(v!==" "&&v!=="\t"){r.message(a,D);break}}}}}},function(e,r,t){e.exports=t(413)},,,,,,,,,function(e){e.exports={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"}},function(e,r,t){"use strict";const n=t(265);const{CHAR_ASTERISK:i,CHAR_AT:u,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:s,CHAR_DOT:a,CHAR_EXCLAMATION_MARK:f,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:p,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:v,CHAR_QUESTION_MARK:D,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:m}=t(199);const E=e=>{return e===c||e===o};const b=e=>{if(e.isPrefix!==true){e.depth=e.isGlobstar?Infinity:1}};const A=(e,r)=>{const t=r||{};const A=e.length-1;const C=t.parts===true||t.scanToEnd===true;const w=[];const F=[];const y=[];let S=e;let _=-1;let B=0;let O=0;let k=false;let x=false;let R=false;let T=false;let I=false;let L=false;let M=false;let j=false;let P=false;let N=0;let $;let H;let U={value:"",depth:0,isGlob:false};const W=()=>_>=A;const G=()=>S.charCodeAt(_+1);const q=()=>{$=H;return S.charCodeAt(++_)};while(_0){z=S.slice(0,B);S=S.slice(B);O-=B}if(Y&&R===true&&O>0){Y=S.slice(0,O);V=S.slice(O)}else if(R===true){Y="";V=S}else{Y=S}if(Y&&Y!==""&&Y!=="/"&&Y!==S){if(E(Y.charCodeAt(Y.length-1))){Y=Y.slice(0,-1)}}if(t.unescape===true){if(V)V=n.removeBackslashes(V);if(Y&&M===true){Y=n.removeBackslashes(Y)}}const J={prefix:z,input:e,start:B,base:Y,glob:V,isBrace:k,isBracket:x,isGlob:R,isExtglob:T,isGlobstar:I,negated:j};if(t.tokens===true){J.maxDepth=0;if(!E(H)){F.push(U)}J.tokens=F}if(t.parts===true||t.tokens===true){let r;for(let n=0;nObject.defineProperty(e,r,{value:t});const f=/([0-z])-([0-z])/g;const c=e=>e.replace(f,(e,r,t)=>r.charCodeAt(0)<=t.charCodeAt(0)?e:"");const l=[[/\\?\s+$/,e=>e.indexOf("\\")===0?" ":""],[/\\\s/g,()=>" "],[/[\\^$.|*+(){]/g,e=>`\\${e}`],[/\[([^\]/]*)($|\])/g,(e,r,t)=>t==="]"?`[${c(r)}]`:`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/^(?=[^^])/,function startingReplacer(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,r,t)=>r+6`${r}[^\\/]*`],[/(\^|\\\/)?\\\*$/,(e,r)=>{const t=r?`${r}[^/]+`:"[^/]*";return`${t}(?=$|\\/$)`}],[/\\\\\\/g,()=>"\\"]];const p=Object.create(null);const h=(e,r,t)=>{const n=p[e];if(n){return n}const i=l.reduce((r,t)=>r.replace(t[0],t[1].bind(e)),e);return p[e]=t?new RegExp(i,"i"):new RegExp(i)};const v=e=>typeof e==="string";const D=e=>e&&v(e)&&!r.test(e)&&e.indexOf("#")!==0;const d=e=>e.split(i);class IgnoreRule{constructor(e,r,t,n){this.origin=e;this.pattern=r;this.negative=t;this.regex=n}}const g=(e,r)=>{const i=e;let u=false;if(e.indexOf("!")===0){u=true;e=e.substr(1)}e=e.replace(t,"!").replace(n,"#");const o=h(e,u,r);return new IgnoreRule(i,e,u,o)};const m=(e,r)=>{throw new r(e)};const E=(e,r,t)=>{if(!v(e)){return t(`path must be a string, but got \`${r}\``,TypeError)}if(!e){return t(`path must not be empty`,TypeError)}if(E.isNotRelative(e)){const e="`path.relative()`d";return t(`path should be a ${e} string, but got "${r}"`,RangeError)}return true};const b=e=>u.test(e);E.isNotRelative=b;E.convert=(e=>e);class Ignore{constructor({ignorecase:e=true}={}){this._rules=[];this._ignorecase=e;a(this,s,true);this._initCache()}_initCache(){this._ignoreCache=Object.create(null);this._testCache=Object.create(null)}_addPattern(e){if(e&&e[s]){this._rules=this._rules.concat(e._rules);this._added=true;return}if(D(e)){const r=g(e,this._ignorecase);this._added=true;this._rules.push(r)}}add(e){this._added=false;makeArray(v(e)?d(e):e).forEach(this._addPattern,this);if(this._added){this._initCache()}return this}addPattern(e){return this.add(e)}_testOne(e,r){let t=false;let n=false;this._rules.forEach(i=>{const{negative:u}=i;if(n===u&&t!==n||u&&!t&&!n&&!r){return}const o=i.regex.test(e);if(o){t=!u;n=u}});return{ignored:t,unignored:n}}_test(e,r,t,n){const i=e&&E.convert(e);E(i,e,m);return this._t(i,r,t,n)}_t(e,r,t,n){if(e in r){return r[e]}if(!n){n=e.split(o)}n.pop();if(!n.length){return r[e]=this._testOne(e,t)}const i=this._t(n.join(o)+o,r,t,n);return r[e]=i.ignored?i:this._testOne(e,t)}ignores(e){return this._test(e,this._ignoreCache,false).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return makeArray(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,true)}}const A=e=>new Ignore(e);const C=()=>false;const w=e=>E(e&&E.convert(e),e,C);A.isPathValid=w;A.default=A;e.exports=A;if(typeof process!=="undefined"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){const e=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");E.convert=e;const r=/^[a-z]:\//i;E.isNotRelative=(e=>r.test(e)||b(e))}},function(e){"use strict";e.exports=footnoteReference;var r="[";var t="]";var n="^";function footnoteReference(e){return r+n+(e.label||e.identifier)+t}},,function(e,r,t){"use strict";var n=t(341);var i=t(926);e.exports=alphanumerical;function alphanumerical(e){return n(e)||i(e)}},function(e){"use strict";e.exports=text;function text(e,r){return this.encode(this.escape(e.value,e,r),e)}},,function(e,r,t){"use strict";e.exports=Readable;var n;Readable.ReadableState=ReadableState;var i=t(614).EventEmitter;var u=function EElistenerCount(e,r){return e.listeners(r).length};var o=t(527);var s=t(293).Buffer;var a=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return s.from(e)}function _isUint8Array(e){return s.isBuffer(e)||e instanceof a}var f=t(669);var c;if(f&&f.debuglog){c=f.debuglog("stream")}else{c=function debug(){}}var l=t(359);var p=t(793);var h=t(466),v=h.getHighWaterMark;var D=t(818).codes,d=D.ERR_INVALID_ARG_TYPE,g=D.ERR_STREAM_PUSH_AFTER_EOF,m=D.ERR_METHOD_NOT_IMPLEMENTED,E=D.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;var b=t(934),A=b.emitExperimentalWarning;var C;var w;t(689)(Readable,o);var F=["error","close","destroy","pause","resume"];function prependListener(e,r,t){if(typeof e.prependListener==="function")return e.prependListener(r,t);if(!e._events||!e._events[r])e.on(r,t);else if(Array.isArray(e._events[r]))e._events[r].unshift(t);else e._events[r]=[t,e._events[r]]}function ReadableState(e,r,i){n=n||t(308);e=e||{};if(typeof i!=="boolean")i=r instanceof n;this.objectMode=!!e.objectMode;if(i)this.objectMode=this.objectMode||!!e.readableObjectMode;this.highWaterMark=v(this,e,"readableHighWaterMark",i);this.buffer=new l;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.paused=true;this.emitClose=e.emitClose!==false;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!C)C=t(432).StringDecoder;this.decoder=new C(e.encoding);this.encoding=e.encoding}}function Readable(e){n=n||t(308);if(!(this instanceof Readable))return new Readable(e);var r=this instanceof n;this._readableState=new ReadableState(e,this,r);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}o.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function set(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=p.destroy;Readable.prototype._undestroy=p.undestroy;Readable.prototype._destroy=function(e,r){r(e)};Readable.prototype.push=function(e,r){var t=this._readableState;var n;if(!t.objectMode){if(typeof e==="string"){r=r||t.defaultEncoding;if(r!==t.encoding){e=s.from(e,r);r=""}n=true}}else{n=true}return readableAddChunk(this,e,r,false,n)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,r,t,n,i){c("readableAddChunk",r);var u=e._readableState;if(r===null){u.reading=false;onEofChunk(e,u)}else{var o;if(!i)o=chunkInvalid(u,r);if(o){e.emit("error",o)}else if(u.objectMode||r&&r.length>0){if(typeof r!=="string"&&!u.objectMode&&Object.getPrototypeOf(r)!==s.prototype){r=_uint8ArrayToBuffer(r)}if(n){if(u.endEmitted)e.emit("error",new E);else addChunk(e,u,r,true)}else if(u.ended){e.emit("error",new g)}else if(u.destroyed){return false}else{u.reading=false;if(u.decoder&&!t){r=u.decoder.write(r);if(u.objectMode||r.length!==0)addChunk(e,u,r,false);else maybeReadMore(e,u)}else{addChunk(e,u,r,false)}}}else if(!n){u.reading=false;maybeReadMore(e,u)}}return!u.ended&&(u.length=y){e=y}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,r){if(e<=0||r.length===0&&r.ended)return 0;if(r.objectMode)return 1;if(e!==e){if(r.flowing&&r.length)return r.buffer.head.data.length;else return r.length}if(e>r.highWaterMark)r.highWaterMark=computeNewHighWaterMark(e);if(e<=r.length)return e;if(!r.ended){r.needReadable=true;return 0}return r.length}Readable.prototype.read=function(e){c("read",e);e=parseInt(e,10);var r=this._readableState;var t=e;if(e!==0)r.emittedReadable=false;if(e===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended)){c("read: emitReadable",r.length,r.ended);if(r.length===0&&r.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,r);if(e===0&&r.ended){if(r.length===0)endReadable(this);return null}var n=r.needReadable;c("need readable",n);if(r.length===0||r.length-e0)i=fromList(e,r);else i=null;if(i===null){r.needReadable=true;e=0}else{r.length-=e;r.awaitDrain=0}if(r.length===0){if(!r.ended)r.needReadable=true;if(t!==e&&r.ended)endReadable(this)}if(i!==null)this.emit("data",i);return i};function onEofChunk(e,r){if(r.ended)return;if(r.decoder){var t=r.decoder.end();if(t&&t.length){r.buffer.push(t);r.length+=r.objectMode?1:t.length}}r.ended=true;if(r.sync){emitReadable(e)}else{r.needReadable=false;if(!r.emittedReadable){r.emittedReadable=true;emitReadable_(e)}}}function emitReadable(e){var r=e._readableState;r.needReadable=false;if(!r.emittedReadable){c("emitReadable",r.flowing);r.emittedReadable=true;process.nextTick(emitReadable_,e)}}function emitReadable_(e){var r=e._readableState;c("emitReadable_",r.destroyed,r.length,r.ended);if(!r.destroyed&&(r.length||r.ended)){e.emit("readable")}r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark;flow(e)}function maybeReadMore(e,r){if(!r.readingMore){r.readingMore=true;process.nextTick(maybeReadMore_,e,r)}}function maybeReadMore_(e,r){while(!r.reading&&!r.ended&&(r.length1&&indexOf(n.pipes,e)!==-1)&&!a){c("false write response, pause",n.awaitDrain);n.awaitDrain++}t.pause()}}function onerror(r){c("onerror",r);unpipe();e.removeListener("error",onerror);if(u(e,"error")===0)e.emit("error",r)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){c("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){c("unpipe");t.unpipe(e)}e.emit("pipe",t);if(!n.flowing){c("pipe resume");t.resume()}return e};function pipeOnDrain(e){return function pipeOnDrainFunctionResult(){var r=e._readableState;c("pipeOnDrain",r.awaitDrain);if(r.awaitDrain)r.awaitDrain--;if(r.awaitDrain===0&&u(e,"data")){r.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var r=this._readableState;var t={hasUnpiped:false};if(r.pipesCount===0)return this;if(r.pipesCount===1){if(e&&e!==r.pipes)return this;if(!e)e=r.pipes;r.pipes=null;r.pipesCount=0;r.flowing=false;if(e)e.emit("unpipe",this,t);return this}if(!e){var n=r.pipes;var i=r.pipesCount;r.pipes=null;r.pipesCount=0;r.flowing=false;for(var u=0;u0;if(n.flowing!==false)this.resume()}else if(e==="readable"){if(!n.endEmitted&&!n.readableListening){n.readableListening=n.needReadable=true;n.flowing=false;n.emittedReadable=false;c("on readable",n.length,n.reading);if(n.length){emitReadable(this)}else if(!n.reading){process.nextTick(nReadingNextTick,this)}}}return t};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(e,r){var t=o.prototype.removeListener.call(this,e,r);if(e==="readable"){process.nextTick(updateReadableListening,this)}return t};Readable.prototype.removeAllListeners=function(e){var r=o.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===undefined){process.nextTick(updateReadableListening,this)}return r};function updateReadableListening(e){var r=e._readableState;r.readableListening=e.listenerCount("readable")>0;if(r.resumeScheduled&&!r.paused){r.flowing=true}else if(e.listenerCount("data")>0){e.resume()}}function nReadingNextTick(e){c("readable nexttick read 0");e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;if(!e.flowing){c("resume");e.flowing=!e.readableListening;resume(this,e)}e.paused=false;return this};function resume(e,r){if(!r.resumeScheduled){r.resumeScheduled=true;process.nextTick(resume_,e,r)}}function resume_(e,r){c("resume",r.reading);if(!r.reading){e.read(0)}r.resumeScheduled=false;e.emit("resume");flow(e);if(r.flowing&&!r.reading)e.read(0)}Readable.prototype.pause=function(){c("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){c("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function flow(e){var r=e._readableState;c("flow",r.flowing);while(r.flowing&&e.read()!==null){}}Readable.prototype.wrap=function(e){var r=this;var t=this._readableState;var n=false;e.on("end",function(){c("wrapped end");if(t.decoder&&!t.ended){var e=t.decoder.end();if(e&&e.length)r.push(e)}r.push(null)});e.on("data",function(i){c("wrapped data");if(t.decoder)i=t.decoder.write(i);if(t.objectMode&&(i===null||i===undefined))return;else if(!t.objectMode&&(!i||!i.length))return;var u=r.push(i);if(!u){n=true;e.pause()}});for(var i in e){if(this[i]===undefined&&typeof e[i]==="function"){this[i]=function methodWrap(r){return function methodWrapReturnFunction(){return e[r].apply(e,arguments)}}(i)}}for(var u=0;u=r.length){if(r.decoder)t=r.buffer.join("");else if(r.buffer.length===1)t=r.buffer.first();else t=r.buffer.concat(r.length);r.buffer.clear()}else{t=r.buffer.consume(e,r.decoder)}return t}function endReadable(e){var r=e._readableState;c("endReadable",r.endEmitted);if(!r.endEmitted){r.ended=true;process.nextTick(endReadableNT,r,e)}}function endReadableNT(e,r){c("endReadableNT",e.endEmitted,e.length);if(!e.endEmitted&&e.length===0){e.endEmitted=true;r.readable=false;r.emit("end")}}function indexOf(e,r){for(var t=0,n=e.length;te[t])e[t]=n});return e},[]);var o=map(e,function(e){return map(e,function(e,r){var t=String(e);if(n[r]==="."){var o=dotindex(t);var s=u[r]+(/\./.test(t)?1:2)-(i(t)-o);return t+Array(s).join(" ")}else return t})});var s=reduce(o,function(e,r){forEach(r,function(r,t){var n=i(r);if(!e[t]||n>e[t])e[t]=n});return e},[]);return map(o,function(e){return map(e,function(e,r){var t=s[r]-i(e)||0;var u=Array(Math.max(t+1,1)).join(" ");if(n[r]==="r"||n[r]==="."){return u+e}if(n[r]==="c"){return Array(Math.ceil(t/2+1)).join(" ")+e+Array(Math.floor(t/2+1)).join(" ")}return e+u}).join(t).replace(/\s+$/,"")}).join("\n")};function dotindex(e){var r=/\.[^.]*$/.exec(e);return r?r.index+1:e.length}function reduce(e,r,t){if(e.reduce)return e.reduce(r,t);var n=0;var i=arguments.length>=3?t:e[n++];for(;n{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?undefined:"g")})},,function(e,r,t){"use strict";var n=t(622);var i=t(539);var u=t(881);e.exports=Ignore;Ignore.prototype.check=check;var o=n.dirname;var s=n.relative;var a=n.resolve;function Ignore(e){this.cwd=e.cwd;this.findUp=new u({filePath:e.ignorePath,cwd:e.cwd,detect:e.detectIgnore,names:e.ignoreName?[e.ignoreName]:[],create:create})}function check(e,r){var t=this;t.findUp.load(e,done);function done(n,i){var u;if(n){r(n)}else if(i){u=s(i.filePath,a(t.cwd,e));r(null,u?i.ignores(u):false)}else{r(null,false)}}}function create(e,r){var t=i().add(String(e));t.filePath=o(r);return t}},,,,function(e){"use strict";e.exports={gfm:true,commonmark:false,pedantic:false,entities:"false",setext:false,closeAtx:false,looseTable:false,spacedTable:true,paddedTable:true,stringLength:stringLength,incrementListMarker:true,fences:false,fence:"`",bullet:"-",listItemIndent:"tab",rule:"*",ruleSpaces:true,ruleRepetition:3,strong:"*",emphasis:"_"};function stringLength(e){return e.length}},function(e){"use strict";function YAMLException(e,r){Error.call(this);this.name="YAMLException";this.reason=e;this.mark=r;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"");if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(e){var r=this.name+": ";r+=this.reason||"(unknown reason)";if(!e&&this.mark){r+=" "+this.mark.toString()}return r};e.exports=YAMLException},,function(e,r,t){"use strict";e.exports=t(366)},,function(e){"use strict";var r=[].slice;e.exports=wrap;function wrap(e,t){var n;return wrapped;function wrapped(){var t=r.call(arguments,0);var i=e.length>t.length;var u;if(i){t.push(done)}try{u=e.apply(null,t)}catch(e){if(i&&n){throw e}return done(e)}if(!i){if(u&&typeof u.then==="function"){u.then(then,done)}else if(u instanceof Error){done(u)}else{then(u)}}}function done(){if(!n){n=true;t.apply(null,arguments)}}function then(e){done(null,e)}}},,,,,,,,,,,,,,function(e,r,t){"use strict";var n=t(945);e.exports=new n("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})},,function(e){"use strict";e.exports=emphasis;var r="_";var t="*";function emphasis(e){var n=this.options.emphasis;var i=this.all(e).join("");if(this.options.pedantic&&n===r&&i.indexOf(n)!==-1){n=t}return n+i+n}},,function(e){"use strict";e.exports=whitespace;var r=String.fromCharCode;var t=/\s/;function whitespace(e){return t.test(typeof e==="number"?r(e):e.charAt(0))}},,,function(e,r,t){"use strict";var n=t(43);e.exports=new n({explicit:[t(574),t(921),t(988)]})},,,,,function(e,r,t){"use strict";var n=t(608);var i=t(263);var u=t(960);var o=t(353);e.exports=n("remark-lint:table-cell-padding",tableCellPadding);var s=u.start;var a=u.end;var f={null:true,padded:true,compact:true};function tableCellPadding(e,r,t){var n=String(r);t=typeof t==="string"&&t!=="consistent"?t:null;if(f[t]!==true){r.fail("Invalid table-cell-padding style `"+t+"`")}i(e,"table",visitor);function visitor(e){var r=e.children;var u=new Array(e.align.length);var f=o(e)?-1:r.length;var c=-1;var l=[];var p;var h;var v;var D;var d;var g;var m;var E;var b;var A;var C;while(++cn){a+=" with 1 space, not "+o;if(size(u)n){r.message("Line must be at most "+n+" characters",{line:l+1,column:p+1})}}function inline(e,r,t){var i=t.children[r+1];var u;var f;if(o(e)){return}u=s(e);f=a(e);if(u.column>n||f.column1){r=Array.prototype.slice.call(arguments)}return e(r)};if("conversion"in e){r.conversion=e.conversion}return r}function wrapRounded(e){var r=function(r){if(r===undefined||r===null){return r}if(arguments.length>1){r=Array.prototype.slice.call(arguments)}var t=e(r);if(typeof t==="object"){for(var n=t.length,i=0;i-1))throw new E(e);this._writableState.defaultEncoding=e;return this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(e,r,t){if(!e.objectMode&&e.decodeStrings!==false&&typeof r==="string"){r=o.from(r,t)}return r}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});function writeOrBuffer(e,r,t,n,i,u){if(!t){var o=decodeChunk(r,n,i);if(n!==o){t=true;i="buffer";n=o}}var s=r.objectMode?1:n.length;r.length+=s;var a=r.length1024*64){throw new TypeError("pattern is too long")}var t=this.options;if(!t.noglobstar&&e==="**")return i;if(e==="")return"";var n="";var u=!!t.nocase;var f=false;var c=[];var p=[];var v;var D=false;var d=-1;var g=-1;var m=e.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var E=this;function clearStateChar(){if(v){switch(v){case"*":n+=a;u=true;break;case"?":n+=s;u=true;break;default:n+="\\"+v;break}E.debug("clearStateChar %j %j",v,n);v=false}}for(var b=0,A=e.length,C;b-1;O--){var k=p[O];var x=n.slice(0,k.reStart);var R=n.slice(k.reStart,k.reEnd-8);var T=n.slice(k.reEnd-8,k.reEnd);var I=n.slice(k.reEnd);T+=I;var L=x.split("(").length-1;var M=I;for(b=0;b=0;o--){u=e[o];if(u)break}for(o=0;o>> no match, partial?",e,l,r,p);if(l===s)return true}return false}var v;if(typeof f==="string"){if(n.nocase){v=c.toLowerCase()===f.toLowerCase()}else{v=c===f}this.debug("string match",f,c,v)}else{v=c.match(f);this.debug("pattern match",f,c,v)}if(!v)return false}if(u===s&&o===a){return true}else if(u===s){return t}else if(o===a){var D=u===s-1&&e[u]==="";return D}throw new Error("wtf?")};function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},,function(e,r,t){"use strict";e.exports.plugins=[t(871),t(603),t(205),[t(873),"tab-size"],t(682),t(526),t(163),[t(468),"."],t(668),t(7),t(902),t(780),t(898),t(478),t(339),t(491)]},,,function(e,r,t){var n=t(885);var i={};for(var u in n){if(n.hasOwnProperty(u)){i[n[u]]=u}}var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var s in o){if(o.hasOwnProperty(s)){if(!("channels"in o[s])){throw new Error("missing channels property: "+s)}if(!("labels"in o[s])){throw new Error("missing channel labels property: "+s)}if(o[s].labels.length!==o[s].channels){throw new Error("channel and label counts mismatch: "+s)}var a=o[s].channels;var f=o[s].labels;delete o[s].channels;delete o[s].labels;Object.defineProperty(o[s],"channels",{value:a});Object.defineProperty(o[s],"labels",{value:f})}}o.rgb.hsl=function(e){var r=e[0]/255;var t=e[1]/255;var n=e[2]/255;var i=Math.min(r,t,n);var u=Math.max(r,t,n);var o=u-i;var s;var a;var f;if(u===i){s=0}else if(r===u){s=(t-n)/o}else if(t===u){s=2+(n-r)/o}else if(n===u){s=4+(r-t)/o}s=Math.min(s*60,360);if(s<0){s+=360}f=(i+u)/2;if(u===i){a=0}else if(f<=.5){a=o/(u+i)}else{a=o/(2-u-i)}return[s,a*100,f*100]};o.rgb.hsv=function(e){var r;var t;var n;var i;var u;var o=e[0]/255;var s=e[1]/255;var a=e[2]/255;var f=Math.max(o,s,a);var c=f-Math.min(o,s,a);var l=function(e){return(f-e)/6/c+1/2};if(c===0){i=u=0}else{u=c/f;r=l(o);t=l(s);n=l(a);if(o===f){i=n-t}else if(s===f){i=1/3+r-n}else if(a===f){i=2/3+t-r}if(i<0){i+=1}else if(i>1){i-=1}}return[i*360,u*100,f*100]};o.rgb.hwb=function(e){var r=e[0];var t=e[1];var n=e[2];var i=o.rgb.hsl(e)[0];var u=1/255*Math.min(r,Math.min(t,n));n=1-1/255*Math.max(r,Math.max(t,n));return[i,u*100,n*100]};o.rgb.cmyk=function(e){var r=e[0]/255;var t=e[1]/255;var n=e[2]/255;var i;var u;var o;var s;s=Math.min(1-r,1-t,1-n);i=(1-r-s)/(1-s)||0;u=(1-t-s)/(1-s)||0;o=(1-n-s)/(1-s)||0;return[i*100,u*100,o*100,s*100]};function comparativeDistance(e,r){return Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2)+Math.pow(e[2]-r[2],2)}o.rgb.keyword=function(e){var r=i[e];if(r){return r}var t=Infinity;var u;for(var o in n){if(n.hasOwnProperty(o)){var s=n[o];var a=comparativeDistance(e,s);if(a.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=r*.4124+t*.3576+n*.1805;var u=r*.2126+t*.7152+n*.0722;var o=r*.0193+t*.1192+n*.9505;return[i*100,u*100,o*100]};o.rgb.lab=function(e){var r=o.rgb.xyz(e);var t=r[0];var n=r[1];var i=r[2];var u;var s;var a;t/=95.047;n/=100;i/=108.883;t=t>.008856?Math.pow(t,1/3):7.787*t+16/116;n=n>.008856?Math.pow(n,1/3):7.787*n+16/116;i=i>.008856?Math.pow(i,1/3):7.787*i+16/116;u=116*n-16;s=500*(t-n);a=200*(n-i);return[u,s,a]};o.hsl.rgb=function(e){var r=e[0]/360;var t=e[1]/100;var n=e[2]/100;var i;var u;var o;var s;var a;if(t===0){a=n*255;return[a,a,a]}if(n<.5){u=n*(1+t)}else{u=n+t-n*t}i=2*n-u;s=[0,0,0];for(var f=0;f<3;f++){o=r+1/3*-(f-1);if(o<0){o++}if(o>1){o--}if(6*o<1){a=i+(u-i)*6*o}else if(2*o<1){a=u}else if(3*o<2){a=i+(u-i)*(2/3-o)*6}else{a=i}s[f]=a*255}return s};o.hsl.hsv=function(e){var r=e[0];var t=e[1]/100;var n=e[2]/100;var i=t;var u=Math.max(n,.01);var o;var s;n*=2;t*=n<=1?n:2-n;i*=u<=1?u:2-u;s=(n+t)/2;o=n===0?2*i/(u+i):2*t/(n+t);return[r,o*100,s*100]};o.hsv.rgb=function(e){var r=e[0]/60;var t=e[1]/100;var n=e[2]/100;var i=Math.floor(r)%6;var u=r-Math.floor(r);var o=255*n*(1-t);var s=255*n*(1-t*u);var a=255*n*(1-t*(1-u));n*=255;switch(i){case 0:return[n,a,o];case 1:return[s,n,o];case 2:return[o,n,a];case 3:return[o,s,n];case 4:return[a,o,n];case 5:return[n,o,s]}};o.hsv.hsl=function(e){var r=e[0];var t=e[1]/100;var n=e[2]/100;var i=Math.max(n,.01);var u;var o;var s;s=(2-t)*n;u=(2-t)*i;o=t*i;o/=u<=1?u:2-u;o=o||0;s/=2;return[r,o*100,s*100]};o.hwb.rgb=function(e){var r=e[0]/360;var t=e[1]/100;var n=e[2]/100;var i=t+n;var u;var o;var s;var a;if(i>1){t/=i;n/=i}u=Math.floor(6*r);o=1-n;s=6*r-u;if((u&1)!==0){s=1-s}a=t+s*(o-t);var f;var c;var l;switch(u){default:case 6:case 0:f=o;c=a;l=t;break;case 1:f=a;c=o;l=t;break;case 2:f=t;c=o;l=a;break;case 3:f=t;c=a;l=o;break;case 4:f=a;c=t;l=o;break;case 5:f=o;c=t;l=a;break}return[f*255,c*255,l*255]};o.cmyk.rgb=function(e){var r=e[0]/100;var t=e[1]/100;var n=e[2]/100;var i=e[3]/100;var u;var o;var s;u=1-Math.min(1,r*(1-i)+i);o=1-Math.min(1,t*(1-i)+i);s=1-Math.min(1,n*(1-i)+i);return[u*255,o*255,s*255]};o.xyz.rgb=function(e){var r=e[0]/100;var t=e[1]/100;var n=e[2]/100;var i;var u;var o;i=r*3.2406+t*-1.5372+n*-.4986;u=r*-.9689+t*1.8758+n*.0415;o=r*.0557+t*-.204+n*1.057;i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92;u=u>.0031308?1.055*Math.pow(u,1/2.4)-.055:u*12.92;o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92;i=Math.min(Math.max(0,i),1);u=Math.min(Math.max(0,u),1);o=Math.min(Math.max(0,o),1);return[i*255,u*255,o*255]};o.xyz.lab=function(e){var r=e[0];var t=e[1];var n=e[2];var i;var u;var o;r/=95.047;t/=100;n/=108.883;r=r>.008856?Math.pow(r,1/3):7.787*r+16/116;t=t>.008856?Math.pow(t,1/3):7.787*t+16/116;n=n>.008856?Math.pow(n,1/3):7.787*n+16/116;i=116*t-16;u=500*(r-t);o=200*(t-n);return[i,u,o]};o.lab.xyz=function(e){var r=e[0];var t=e[1];var n=e[2];var i;var u;var o;u=(r+16)/116;i=t/500+u;o=u-n/200;var s=Math.pow(u,3);var a=Math.pow(i,3);var f=Math.pow(o,3);u=s>.008856?s:(u-16/116)/7.787;i=a>.008856?a:(i-16/116)/7.787;o=f>.008856?f:(o-16/116)/7.787;i*=95.047;u*=100;o*=108.883;return[i,u,o]};o.lab.lch=function(e){var r=e[0];var t=e[1];var n=e[2];var i;var u;var o;i=Math.atan2(n,t);u=i*360/2/Math.PI;if(u<0){u+=360}o=Math.sqrt(t*t+n*n);return[r,o,u]};o.lch.lab=function(e){var r=e[0];var t=e[1];var n=e[2];var i;var u;var o;o=n/360*2*Math.PI;i=t*Math.cos(o);u=t*Math.sin(o);return[r,i,u]};o.rgb.ansi16=function(e){var r=e[0];var t=e[1];var n=e[2];var i=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];i=Math.round(i/50);if(i===0){return 30}var u=30+(Math.round(n/255)<<2|Math.round(t/255)<<1|Math.round(r/255));if(i===2){u+=60}return u};o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])};o.rgb.ansi256=function(e){var r=e[0];var t=e[1];var n=e[2];if(r===t&&t===n){if(r<8){return 16}if(r>248){return 231}return Math.round((r-8)/247*24)+232}var i=16+36*Math.round(r/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5);return i};o.ansi16.rgb=function(e){var r=e%10;if(r===0||r===7){if(e>50){r+=3.5}r=r/10.5*255;return[r,r,r]}var t=(~~(e>50)+1)*.5;var n=(r&1)*t*255;var i=(r>>1&1)*t*255;var u=(r>>2&1)*t*255;return[n,i,u]};o.ansi256.rgb=function(e){if(e>=232){var r=(e-232)*10+8;return[r,r,r]}e-=16;var t;var n=Math.floor(e/36)/5*255;var i=Math.floor((t=e%36)/6)/5*255;var u=t%6/5*255;return[n,i,u]};o.rgb.hex=function(e){var r=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255);var t=r.toString(16).toUpperCase();return"000000".substring(t.length)+t};o.hex.rgb=function(e){var r=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r){return[0,0,0]}var t=r[0];if(r[0].length===3){t=t.split("").map(function(e){return e+e}).join("")}var n=parseInt(t,16);var i=n>>16&255;var u=n>>8&255;var o=n&255;return[i,u,o]};o.rgb.hcg=function(e){var r=e[0]/255;var t=e[1]/255;var n=e[2]/255;var i=Math.max(Math.max(r,t),n);var u=Math.min(Math.min(r,t),n);var o=i-u;var s;var a;if(o<1){s=u/(1-o)}else{s=0}if(o<=0){a=0}else if(i===r){a=(t-n)/o%6}else if(i===t){a=2+(n-r)/o}else{a=4+(r-t)/o+4}a/=6;a%=1;return[a*360,o*100,s*100]};o.hsl.hcg=function(e){var r=e[1]/100;var t=e[2]/100;var n=1;var i=0;if(t<.5){n=2*r*t}else{n=2*r*(1-t)}if(n<1){i=(t-.5*n)/(1-n)}return[e[0],n*100,i*100]};o.hsv.hcg=function(e){var r=e[1]/100;var t=e[2]/100;var n=r*t;var i=0;if(n<1){i=(t-n)/(1-n)}return[e[0],n*100,i*100]};o.hcg.rgb=function(e){var r=e[0]/360;var t=e[1]/100;var n=e[2]/100;if(t===0){return[n*255,n*255,n*255]}var i=[0,0,0];var u=r%1*6;var o=u%1;var s=1-o;var a=0;switch(Math.floor(u)){case 0:i[0]=1;i[1]=o;i[2]=0;break;case 1:i[0]=s;i[1]=1;i[2]=0;break;case 2:i[0]=0;i[1]=1;i[2]=o;break;case 3:i[0]=0;i[1]=s;i[2]=1;break;case 4:i[0]=o;i[1]=0;i[2]=1;break;default:i[0]=1;i[1]=0;i[2]=s}a=(1-t)*n;return[(t*i[0]+a)*255,(t*i[1]+a)*255,(t*i[2]+a)*255]};o.hcg.hsv=function(e){var r=e[1]/100;var t=e[2]/100;var n=r+t*(1-r);var i=0;if(n>0){i=r/n}return[e[0],i*100,n*100]};o.hcg.hsl=function(e){var r=e[1]/100;var t=e[2]/100;var n=t*(1-r)+.5*r;var i=0;if(n>0&&n<.5){i=r/(2*n)}else if(n>=.5&&n<1){i=r/(2*(1-n))}return[e[0],i*100,n*100]};o.hcg.hwb=function(e){var r=e[1]/100;var t=e[2]/100;var n=r+t*(1-r);return[e[0],(n-r)*100,(1-n)*100]};o.hwb.hcg=function(e){var r=e[1]/100;var t=e[2]/100;var n=1-t;var i=n-r;var u=0;if(i<1){u=(n-i)/(1-i)}return[e[0],i*100,u*100]};o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]};o.gray.hwb=function(e){return[0,100,e[0]]};o.gray.cmyk=function(e){return[0,0,0,e[0]]};o.gray.lab=function(e){return[e[0],0,0]};o.gray.hex=function(e){var r=Math.round(e[0]/100*255)&255;var t=(r<<16)+(r<<8)+r;var n=t.toString(16).toUpperCase();return"000000".substring(n.length)+n};o.rgb.gray=function(e){var r=(e[0]+e[1]+e[2])/3;return[r/255*100]}},,,function(e,r,t){"use strict";var n=t(608);e.exports=n("remark-lint:final-newline",finalNewline);function finalNewline(e,r){var t=String(r);var n=t.length-1;if(n>-1&&t.charAt(n)!=="\n"){r.message("Missing newline character at end of file")}}},,,,,function(e,r,t){"use strict";var n=t(324);e.exports=factory;function factory(e,r){var t=e.split(":");var i=t[0];var u=t[1];var o=n(r);if(!u){u=i;i=null}attacher.displayName=e;return attacher;function attacher(e){var r=coerce(u,e);var t=r[0];var n=r[1];var s=t===2;return t?transformer:undefined;function transformer(e,r,t){var a=r.messages.length;o(e,r,n,done);function done(e){var n=r.messages;var o;if(e&&n.indexOf(e)===-1){try{r.fail(e)}catch(e){}}while(a2){throw new Error("Invalid severity `"+i+"` for `"+e+"`, "+"expected 0, 1, or 2")}n[0]=i;return n}},,,function(e,r,t){"use strict";var n=t(43);e.exports=new n({include:[t(23)]})},function(e,r,t){"use strict";var n=t(669);var i=t(156);var u=function errorEx(e,r){if(!e||e.constructor!==String){r=e||{};e=Error.name}var t=function ErrorEXError(n){if(!this){return new ErrorEXError(n)}n=n instanceof Error?n.message:n||this.message;Error.call(this,n);Error.captureStackTrace(this,t);this.name=e;Object.defineProperty(this,"message",{configurable:true,enumerable:false,get:function(){var e=n.split(/\r?\n/g);for(var t in r){if(!r.hasOwnProperty(t)){continue}var u=r[t];if("message"in u){e=u.message(this[t],e)||e;if(!i(e)){e=[e]}}}return e.join("\n")},set:function(e){n=e}});var u=null;var o=Object.getOwnPropertyDescriptor(this,"stack");var s=o.get;var a=o.value;delete o.value;delete o.writable;o.set=function(e){u=e};o.get=function(){var e=(u||(s?s.call(this):a)).split(/\r?\n+/g);if(!u){e[0]=this.name+": "+this.message}var t=1;for(var n in r){if(!r.hasOwnProperty(n)){continue}var i=r[n];if("line"in i){var o=i.line(this[n]);if(o){e.splice(t++,0," "+o)}}if("stack"in i){i.stack(this[n],e)}}return e.join("\n")};Object.defineProperty(this,"stack",o)};if(Object.setPrototypeOf){Object.setPrototypeOf(t.prototype,Error.prototype);Object.setPrototypeOf(t,Error)}else{n.inherits(t,Error)}return t};u.append=function(e,r){return{message:function(t,n){t=t||r;if(t){n[0]+=" "+e.replace("%s",t.toString())}return n}}};u.line=function(e,r){return{line:function(t){t=t||r;if(t){return e.replace("%s",t.toString())}return null}}};e.exports=u},function(e,r,t){"use strict";var n=t(8);e.exports=pad;var i="\n";var u=" ";var o=4;function pad(e,r){var t=e.split(i);var s=t.length;var a=n(u,r*o);while(s--){if(t[s].length!==0){t[s]=a+t[s]}}return t.join(i)}},function(e){e.exports=require("events")},,function(e){"use strict";e.exports=label;var r="[";var t="]";var n="shortcut";var i="collapsed";function label(e){var u=e.referenceType;if(u===n){return""}return r+(u===i?"":e.label||e.identifier)+t}},function(e){"use strict";e.exports=identity;function identity(e){return e}},,function(e,r,t){"use strict";e=t.nmd(e);const n=t(811);const i=new Map;for(const e of Object.keys(n)){i.set(e,n[e])}Object.defineProperty(e,"exports",{get(){return i}})},,function(e){"use strict";e.exports=balanced;function balanced(e,r,t){if(e instanceof RegExp)e=maybeMatch(e,t);if(r instanceof RegExp)r=maybeMatch(r,t);var n=range(e,r,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+e.length,n[1]),post:t.slice(n[1]+r.length)}}function maybeMatch(e,r){var t=r.match(e);return t?t[0]:null}balanced.range=range;function range(e,r,t){var n,i,u,o,s;var a=t.indexOf(e);var f=t.indexOf(r,a+1);var c=a;if(a>=0&&f>0){n=[];u=t.length;while(c>=0&&!s){if(c==a){n.push(c);a=t.indexOf(e,c+1)}else if(n.length==1){s=[n.pop(),f]}else{i=n.pop();if(i=0?a:f}if(n.length){s=[u,o]}}return s}},function(e){e.exports=require("path")},,,,,,,function(e,r,t){"use strict";var n=t(945);function resolveJavascriptRegExp(e){if(e===null)return false;if(e.length===0)return false;var r=e,t=/\/([gim]*)$/.exec(e),n="";if(r[0]==="/"){if(t)n=t[1];if(n.length>3)return false;if(r[r.length-n.length-1]!=="/")return false}return true}function constructJavascriptRegExp(e){var r=e,t=/\/([gim]*)$/.exec(e),n="";if(r[0]==="/"){if(t)n=t[1];r=r.slice(1,r.length-n.length-1)}return new RegExp(r,n)}function representJavascriptRegExp(e){var r="/"+e.source+"/";if(e.global)r+="g";if(e.multiline)r+="m";if(e.ignoreCase)r+="i";return r}function isRegExp(e){return Object.prototype.toString.call(e)==="[object RegExp]"}e.exports=new n("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},function(e,r,t){"use strict";var n=t(784)("unified-engine:file-pipeline:stringify");var i=t(999);var u=t(775);e.exports=stringify;function stringify(e,r){var t=e.processor;var o=e.tree;var s;if(i(r).fatal){n("Not compiling failed document");return}if(!e.output&&!e.out&&!e.alwaysStringify){n("Not compiling document without output settings");return}n("Compiling `%s`",r.path);if(e.inspect){if(r.path){r.extname=".txt"}s=u[e.color?"color":"noColor"](o)+"\n"}else if(e.treeOut){if(r.path){r.extname=".json"}s=JSON.stringify(o,null,2)+"\n"}else{s=t.stringify(o,r)}r.contents=s;n("Compiled document")}},,,function(e,r,t){"use strict";var n=t(945);function resolveYamlMerge(e){return e==="<<"||e===null}e.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},,,,,,,function(e,r,t){"use strict";var n=t(188);var i=t(64);e.exports=link;var u=" ";var o="[";var s="]";var a="(";var f=")";var c=/^[a-z][a-z+.-]+:\/?/i;function link(e){var r=this;var t=r.encode(e.url||"",e);var l=r.enterLink();var p=r.encode(r.escape(e.url||"",e));var h=r.all(e).join("");l();if(e.title==null&&c.test(t)&&p===h){return n(r.encode(e.url),true)}t=n(t);if(e.title){t+=u+i(r.encode(r.escape(e.title,e),e))}return o+h+s+a+t+f}},,function(e){"use strict";e.exports=longestStreak;function longestStreak(e,r){var t=0;var n=0;var i;var u;if(typeof r!=="string"||r.length!==1){throw new Error("Expected character")}e=String(e);u=e.indexOf(r);i=u;while(u!==-1){t++;if(u===i){if(t>n){n=t}}else{t=1}i=u+1;u=e.indexOf(r,i)}return n}},,,,function(e,r,t){"use strict";var n=t(374);var i=t(175);var u=t(51);var o=t(816);var s=t(727);e.exports=unified().freeze();var a=[].slice;var f={}.hasOwnProperty;var c=o().use(pipelineParse).use(pipelineRun).use(pipelineStringify);function pipelineParse(e,r){r.tree=e.parse(r.file)}function pipelineRun(e,r,t){e.run(r.tree,r.file,done);function done(e,n,i){if(e){t(e)}else{r.tree=n;r.file=i;t()}}}function pipelineStringify(e,r){r.file.contents=e.stringify(r.tree,r.file)}function unified(){var e=[];var r=o();var t={};var l=false;var p=-1;processor.data=data;processor.freeze=freeze;processor.attachers=e;processor.use=use;processor.parse=parse;processor.stringify=stringify;processor.run=run;processor.runSync=runSync;processor.process=process;processor.processSync=processSync;return processor;function processor(){var r=unified();var i=e.length;var u=-1;while(++u{if(e instanceof Set){e.forEach(r)}else{r(e)}};const k=(e,r,t)=>{let n=e[r];if(!(n instanceof Set)){e[r]=n=new Set([n])}n.add(t)};const x=e=>r=>{const t=e[r];if(t instanceof Set){t.clear()}else{delete e[r]}};const R=(e,r,t)=>{const n=e[r];if(n instanceof Set){n.delete(t)}else if(n===t){delete e[r]}};const T=e=>e instanceof Set?e.size===0:!e;const I=new Map;function createFsWatchInstance(e,r,t,u,o){const s=(r,n)=>{t(e);o(r,n,{watchedPath:e});if(n&&e!==n){L(i.resolve(e,n),c,i.join(e,n))}};try{return n.watch(e,r,s)}catch(e){u(e)}}const L=(e,r,t,n,i)=>{const u=I.get(e);if(!u)return;O(u[r],e=>{e(t,n,i)})};const M=(e,r,t,n)=>{const{listener:i,errHandler:u,rawEmitter:o}=n;let a=I.get(r);let f;if(!t.persistent){f=createFsWatchInstance(e,t,i,u,o);return f.close.bind(f)}if(a){k(a,c,i);k(a,l,u);k(a,p,o)}else{f=createFsWatchInstance(e,t,L.bind(null,r,c),u,L.bind(null,r,p));if(!f)return;f.on(g,async t=>{const n=L.bind(null,r,l);a.watcherUnusable=true;if(s&&t.code==="EPERM"){try{const r=await w(e,"r");await S(r);n(t)}catch(e){}}else{n(t)}});a={listeners:i,errHandlers:u,rawEmitters:o,watcher:f};I.set(r,a)}return()=>{R(a,c,i);R(a,l,u);R(a,p,o);if(T(a.listeners)){a.watcher.close();I.delete(r);h.forEach(x(a));a.watcher=undefined;Object.freeze(a)}}};const j=new Map;const P=(e,r,t,i)=>{const{listener:u,rawEmitter:o}=i;let s=j.get(r);let a=new Set;let f=new Set;const l=s&&s.options;if(l&&(l.persistentt.interval)){a=s.listeners;f=s.rawEmitters;n.unwatchFile(r);s=undefined}if(s){k(s,c,u);k(s,p,o)}else{s={listeners:u,rawEmitters:o,options:t,watcher:n.watchFile(r,t,(t,n)=>{O(s.rawEmitters,e=>{e(v,r,{curr:t,prev:n})});const i=t.mtimeMs;if(t.size!==n.size||i>n.mtimeMs||i===0){O(s.listeners,r=>r(e,t))}})};j.set(r,s)}return()=>{R(s,c,u);R(s,p,o);if(T(s.listeners)){j.delete(r);n.unwatchFile(r);s.options=s.watcher=undefined;Object.freeze(s)}}};class NodeFsHandler{constructor(e){this.fsw=e;this._boundHandleError=(r=>e._handleError(r))}_watchWithNodeFs(e,r){const t=this.fsw.options;const n=i.dirname(e);const u=i.basename(e);const s=this.fsw._getWatchedDir(n);s.add(u);const f=i.resolve(e);const c={persistent:t.persistent};if(!r)r=a;let l;if(t.usePolling){c.interval=t.enableBinaryInterval&&o(u)?t.binaryInterval:t.interval;l=P(e,f,c,{listener:r,rawEmitter:this.fsw._emitRaw})}else{l=M(e,f,c,{listener:r,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw})}return l}_handleFile(e,r,t){if(this.fsw.closed){return}const n=i.dirname(e);const u=i.basename(e);const o=this.fsw._getWatchedDir(n);let s=r;if(o.has(u))return;const a=this._watchWithNodeFs(e,async(r,t)=>{if(!this.fsw._throttle(C,e,5))return;if(!t||t.mtimeMs===0){try{const r=await F(e);if(this.fsw.closed)return;const t=r.atimeMs;const i=r.mtimeMs;if(!t||t<=i||i!==s.mtimeMs){this.fsw._emit(v,e,r)}s=r}catch(e){this.fsw._remove(n,u)}}else if(o.has(u)){const r=t.atimeMs;const n=t.mtimeMs;if(!r||r<=n||n!==s.mtimeMs){this.fsw._emit(v,e,t)}s=t}});if(!(t&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(D,e,0))return;this.fsw._emit(D,e,r)}return a}async _handleSymlink(e,r,t,n){if(this.fsw.closed){return}const i=e.fullPath;const u=this.fsw._getWatchedDir(r);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();const r=await _(t);if(this.fsw.closed)return;if(u.has(n)){if(this.fsw._symlinkPaths.get(i)!==r){this.fsw._symlinkPaths.set(i,r);this.fsw._emit(v,t,e.stats)}}else{u.add(n);this.fsw._symlinkPaths.set(i,r);this.fsw._emit(D,t,e.stats)}this.fsw._emitReady();return true}if(this.fsw._symlinkPaths.has(i)){return true}this.fsw._symlinkPaths.set(i,true)}_handleRead(e,r,t,n,u,o,s){e=i.join(e,f);if(!t.hasGlob){s=this.fsw._throttle("readdir",e,1e3);if(!s)return}const a=this.fsw._getWatchedDir(t.path);const c=new Set;let l=this.fsw._readdirp(e,{fileFilter:e=>t.filterPath(e),directoryFilter:e=>t.filterDir(e),depth:0}).on(m,async s=>{if(this.fsw.closed){l=undefined;return}const f=s.path;let p=i.join(e,f);c.add(f);if(s.stats.isSymbolicLink()&&await this._handleSymlink(s,e,p,f)){return}if(this.fsw.closed){l=undefined;return}if(f===n||!n&&!a.has(f)){this.fsw._incrReadyCount();p=i.join(u,i.relative(u,p));this._addToNodeFs(p,r,t,o+1)}}).on(g,this._boundHandleError);return new Promise(r=>l.once(E,()=>{if(this.fsw.closed){l=undefined;return}const f=s?s.clear():false;r();a.getChildren().filter(r=>{return r!==e&&!c.has(r)&&(!t.hasGlob||t.filterPath({fullPath:i.resolve(e,r)}))}).forEach(r=>{this.fsw._remove(e,r)});l=undefined;if(f)this._handleRead(e,false,t,n,u,o,s)}))}async _handleDir(e,r,t,n,u,o,s){const a=this.fsw._getWatchedDir(i.dirname(e));const f=a.has(i.basename(e));if(!(t&&this.fsw.options.ignoreInitial)&&!u&&!f){if(!o.hasGlob||o.globFilter(e))this.fsw._emit(d,e,r)}a.add(i.basename(e));this.fsw._getWatchedDir(e);let c;let l;const p=this.fsw.options.depth;if((p==null||n<=p)&&!this.fsw._symlinkPaths.has(s)){if(!u){await this._handleRead(e,t,o,u,e,n,c);if(this.fsw.closed)return}l=this._watchWithNodeFs(e,(r,t)=>{if(t&&t.mtimeMs===0)return;this._handleRead(r,false,o,u,e,n,c)})}return l}async _addToNodeFs(e,r,t,n,u){const o=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed){o();return false}const s=this.fsw._getWatchHelpers(e,n);if(!s.hasGlob&&t){s.hasGlob=t.hasGlob;s.globFilter=t.globFilter;s.filterPath=(e=>t.filterPath(e));s.filterDir=(e=>t.filterDir(e))}try{const t=await B[s.statMethod](s.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(s.watchPath,t)){o();return false}const a=this.fsw.options.followSymlinks&&!e.includes(A)&&!e.includes(b);let f;if(t.isDirectory()){const i=a?await _(e):e;if(this.fsw.closed)return;f=await this._handleDir(s.watchPath,t,r,n,u,s,i);if(this.fsw.closed)return;if(e!==i&&i!==undefined){this.fsw._symlinkPaths.set(i,true)}}else if(t.isSymbolicLink()){const u=a?await _(e):e;if(this.fsw.closed)return;const o=i.dirname(s.watchPath);this.fsw._getWatchedDir(o).add(s.watchPath);this.fsw._emit(D,s.watchPath,t);f=await this._handleDir(o,t,r,n,e,s,u);if(this.fsw.closed)return;if(u!==undefined){this.fsw._symlinkPaths.set(i.resolve(e),u)}}else{f=this._handleFile(s.watchPath,t,r)}o();this.fsw._addPathCloser(e,f);return false}catch(r){if(this.fsw._handleError(r)){o();return e}}}}e.exports=NodeFsHandler},function(e){"use strict";e.exports=locate;function locate(e,r){var t=e.indexOf("\n",r);while(t>r){if(e.charAt(t-1)!==" "){break}t--}return t}},function(e,r,t){"use strict";var n=t(608);var i=t(263);var u=t(960);var o=t(353);e.exports=n("remark-lint:rule-style",ruleStyle);var s=u.start;var a=u.end;function ruleStyle(e,r,t){var n=String(r);t=typeof t==="string"&&t!=="consistent"?t:null;if(t!==null&&/[^-_* ]/.test(t)){r.fail("Invalid preferred rule-style: provide a valid markdown rule, or `'consistent'`")}i(e,"thematicBreak",visitor);function visitor(e){var i=s(e).offset;var u=a(e).offset;var f;if(!o(e)){f=n.slice(i,u);if(t){if(f!==t){r.message("Rules should use `"+t+"`",e)}}else{t=f}}}}},,function(e,r,t){e.exports=require(t.ab+"fsevents.node")},,,,,,,,,function(e,r,t){"use strict";e=t.nmd(e);const n=t(592);const i=(e,r)=>(function(){const t=e.apply(n,arguments);return`[${t+r}m`});const u=(e,r)=>(function(){const t=e.apply(n,arguments);return`[${38+r};5;${t}m`});const o=(e,r)=>(function(){const t=e.apply(n,arguments);return`[${38+r};2;${t[0]};${t[1]};${t[2]}m`});function assembleStyles(){const e=new Map;const r={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};r.color.grey=r.color.gray;for(const t of Object.keys(r)){const n=r[t];for(const t of Object.keys(n)){const i=n[t];r[t]={open:`[${i[0]}m`,close:`[${i[1]}m`};n[t]=r[t];e.set(i[0],i[1])}Object.defineProperty(r,t,{value:n,enumerable:false});Object.defineProperty(r,"codes",{value:e,enumerable:false})}const t=e=>e;const s=(e,r,t)=>[e,r,t];r.color.close="";r.bgColor.close="";r.color.ansi={ansi:i(t,0)};r.color.ansi256={ansi256:u(t,0)};r.color.ansi16m={rgb:o(s,0)};r.bgColor.ansi={ansi:i(t,10)};r.bgColor.ansi256={ansi256:u(t,10)};r.bgColor.ansi16m={rgb:o(s,10)};for(let e of Object.keys(n)){if(typeof n[e]!=="object"){continue}const t=n[e];if(e==="ansi16"){e="ansi"}if("ansi16"in t){r.color.ansi[e]=i(t.ansi16,0);r.bgColor.ansi[e]=i(t.ansi16,10)}if("ansi256"in t){r.color.ansi256[e]=u(t.ansi256,0);r.bgColor.ansi256[e]=u(t.ansi256,10)}if("rgb"in t){r.color.ansi16m[e]=o(t.rgb,0);r.bgColor.ansi16m[e]=o(t.rgb,10)}}return r}Object.defineProperty(e,"exports",{enumerable:true,get:assembleStyles})},function(e){e.exports=[{long:"help",description:"output usage information",short:"h",type:"boolean",default:false},{long:"version",description:"output version number",short:"v",type:"boolean",default:false},{long:"output",description:"specify output location",short:"o",value:"[path]"},{long:"rc-path",description:"specify configuration file",short:"r",type:"string",value:""},{long:"ignore-path",description:"specify ignore file",short:"i",type:"string",value:""},{long:"setting",description:"specify settings",short:"s",type:"string",value:""},{long:"ext",description:"specify extensions",short:"e",type:"string",value:""},{long:"use",description:"use plugins",short:"u",type:"string",value:""},{long:"watch",description:"watch for changes and reprocess",short:"w",type:"boolean",default:false},{long:"quiet",description:"output only warnings and errors",short:"q",type:"boolean",default:false},{long:"silent",description:"output only errors",short:"S",type:"boolean",default:false},{long:"frail",description:"exit with 1 on warnings",short:"f",type:"boolean",default:false},{long:"tree",description:"specify input and output as syntax tree",short:"t",type:"boolean",default:false},{long:"report",description:"specify reporter",type:"string",value:""},{long:"file-path",description:"specify path to process as",type:"string",value:""},{long:"ignore-pattern",description:"specify ignore patterns",type:"string",value:""},{long:"tree-in",description:"specify input as syntax tree",type:"boolean"},{long:"tree-out",description:"output syntax tree",type:"boolean"},{long:"inspect",description:"output formatted syntax tree",type:"boolean"},{long:"stdout",description:"specify writing to stdout",type:"boolean",truelike:true},{long:"color",description:"specify color in report",type:"boolean",default:true},{long:"config",description:"search for configuration files",type:"boolean",default:true},{long:"ignore",description:"search for ignore files",type:"boolean",default:true}]},,,,function(e,r,t){"use strict";var n=t(608);var i=t(263);var u=t(960);var o=t(353);e.exports=n("remark-lint:hard-break-spaces",hardBreakSpaces);var s="Use two spaces for hard line breaks";function hardBreakSpaces(e,r){var t=String(r);i(e,"break",visitor);function visitor(e){var n;if(!o(e)){n=t.slice(u.start(e).offset,u.end(e).offset).split("\n",1)[0].replace(/\r$/,"");if(n.length>2){r.message(s,e)}}}}},function(e){e.exports=require("util")},function(e,r,t){"use strict";var n=t(269);var i=t(449);var u=t(803);e.exports=n;n.read=u.read;n.readSync=i.read;n.write=u.write;n.writeSync=i.write},,function(e,r,t){"use strict";e.exports=Transform;var n=t(818).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,u=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0;var a=t(308);t(689)(Transform,a);function afterTransform(e,r){var t=this._transformState;t.transforming=false;var n=t.writecb;if(n===null){return this.emit("error",new u)}t.writechunk=null;t.writecb=null;if(r!=null)this.push(r);n(e);var i=this._readableState;i.reading=false;if(i.needReadable||i.lengtht){r.splice(0,t);process.nextTick(function(){RES.apply(null,n)})}else{delete i[e]}}})}function slice(e){var r=e.length;var t=[];for(var n=0;n{});r.IDENTITY_FN=(e=>e);r.isWindows=i==="win32";r.isMacos=i==="darwin"},,,,function(e){"use strict";function posix(e){return e.charAt(0)==="/"}function win32(e){var r=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var t=r.exec(e);var n=t[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(t[2]||i)}e.exports=process.platform==="win32"?win32:posix;e.exports.posix=posix;e.exports.win32=win32},function(e,r,t){"use strict";var n=t(608);var i=t(263);var u=t(960);var o=t(353);var s=t(186);e.exports=n("remark-lint:no-auto-link-without-protocol",noAutoLinkWithoutProtocol);var a=u.start;var f=u.end;var c=/^[a-z][a-z+.-]+:\/?/i;var l="All automatic links must start with a protocol";function noAutoLinkWithoutProtocol(e,r){i(e,"link",visitor);function visitor(e){var t;if(!o(e)){t=e.children;if(a(e).column===a(t[0]).column-1&&f(e).column===f(t[t.length-1]).column+1&&!c.test(s(e))){r.message(l,e)}}}}},,function(e){"use strict";e.exports=factory;function factory(e){var r=indices(String(e));return{toPosition:offsetToPositionFactory(r),toOffset:positionToOffsetFactory(r)}}function offsetToPositionFactory(e){return offsetToPosition;function offsetToPosition(r){var t=-1;var n=e.length;if(r<0){return{}}while(++tr){return{line:t+1,column:r-(e[t-1]||0)+1,offset:r}}}return{}}}function positionToOffsetFactory(e){return positionToOffset;function positionToOffset(r){var t=r&&r.line;var n=r&&r.column;if(!isNaN(t)&&!isNaN(n)&&t-1 in e){return(e[t-2]||0)+n-1||0}return-1}}function indices(e){var r=[];var t=e.indexOf("\n");while(t!==-1){r.push(t+1);t=e.indexOf("\n",t+1)}r.push(e.length+1);return r}},function(e,r,t){"use strict";var n=t(740);var i=t(556);var u=t(910);var o=t(723);var s=Object.prototype.toString;var a=Object.prototype.hasOwnProperty;var f=9;var c=10;var l=32;var p=33;var h=34;var v=35;var D=37;var d=38;var g=39;var m=42;var E=44;var b=45;var A=58;var C=62;var w=63;var F=64;var y=91;var S=93;var _=96;var B=123;var O=124;var k=125;var x={};x[0]="\\0";x[7]="\\a";x[8]="\\b";x[9]="\\t";x[10]="\\n";x[11]="\\v";x[12]="\\f";x[13]="\\r";x[27]="\\e";x[34]='\\"';x[92]="\\\\";x[133]="\\N";x[160]="\\_";x[8232]="\\L";x[8233]="\\P";var R=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function compileStyleMap(e,r){var t,n,i,u,o,s,f;if(r===null)return{};t={};n=Object.keys(r);for(i=0,u=n.length;in&&e[l+1]!==" ";l=u}}else if(!isPrintable(o)){return j}p=p&&isPlainSafe(o)}a=a||f&&(u-l-1>n&&e[l+1]!==" ")}if(!s&&!a){return p&&!i(e)?T:I}if(t>9&&needIndentIndicator(e)){return j}return a?M:L}function writeScalar(e,r,t,n){e.dump=function(){if(r.length===0){return"''"}if(!e.noCompatMode&&R.indexOf(r)!==-1){return"'"+r+"'"}var u=e.indent*Math.max(1,t);var o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-u);var s=n||e.flowLevel>-1&&t>=e.flowLevel;function testAmbiguity(r){return testImplicitResolving(e,r)}switch(chooseScalarStyle(r,s,e.indent,o,testAmbiguity)){case T:return r;case I:return"'"+r.replace(/'/g,"''")+"'";case L:return"|"+blockHeader(r,e.indent)+dropEndingNewline(indentString(r,u));case M:return">"+blockHeader(r,e.indent)+dropEndingNewline(indentString(foldString(r,o),u));case j:return'"'+escapeString(r,o)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function blockHeader(e,r){var t=needIndentIndicator(e)?String(r):"";var n=e[e.length-1]==="\n";var i=n&&(e[e.length-2]==="\n"||e==="\n");var u=i?"+":n?"":"-";return t+u+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,r){var t=/(\n+)([^\n]*)/g;var n=function(){var n=e.indexOf("\n");n=n!==-1?n:e.length;t.lastIndex=n;return foldLine(e.slice(0,n),r)}();var i=e[0]==="\n"||e[0]===" ";var u;var o;while(o=t.exec(e)){var s=o[1],a=o[2];u=a[0]===" ";n+=s+(!i&&!u&&a!==""?"\n":"")+foldLine(a,r);i=u}return n}function foldLine(e,r){if(e===""||e[0]===" ")return e;var t=/ [^ ]/g;var n;var i=0,u,o=0,s=0;var a="";while(n=t.exec(e)){s=n.index;if(s-i>r){u=o>i?o:s;a+="\n"+e.slice(i,u);i=u+1}o=s}a+="\n";if(e.length-i>r&&o>i){a+=e.slice(i,o)+"\n"+e.slice(o+1)}else{a+=e.slice(i)}return a.slice(1)}function escapeString(e){var r="";var t,n;var i;for(var u=0;u=55296&&t<=56319){n=e.charCodeAt(u+1);if(n>=56320&&n<=57343){r+=encodeHex((t-55296)*1024+n-56320+65536);u++;continue}}i=x[t];r+=!i&&isPrintable(t)?e[u]:i||encodeHex(t)}return r}function writeFlowSequence(e,r,t){var n="",i=e.tag,u,o;for(u=0,o=t.length;u1024)c+="? ";c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,r,f,false,false)){continue}c+=e.dump;n+=c}e.tag=i;e.dump="{"+n+"}"}function writeBlockMapping(e,r,t,n){var u="",o=e.tag,s=Object.keys(t),a,f,l,p,h,v;if(e.sortKeys===true){s.sort()}else if(typeof e.sortKeys==="function"){s.sort(e.sortKeys)}else if(e.sortKeys){throw new i("sortKeys must be a boolean or a function")}for(a=0,f=s.length;a1024;if(h){if(e.dump&&c===e.dump.charCodeAt(0)){v+="?"}else{v+="? "}}v+=e.dump;if(h){v+=generateNextLine(e,r)}if(!writeNode(e,r+1,p,true,h)){continue}if(e.dump&&c===e.dump.charCodeAt(0)){v+=":"}else{v+=": "}v+=e.dump;u+=v}e.tag=o;e.dump=u||"{}"}function detectType(e,r,t){var n,u,o,f,c,l;u=t?e.explicitTypes:e.implicitTypes;for(o=0,f=u.length;o tag resolver accepts not "'+l+'" style')}e.dump=n}return true}}return false}function writeNode(e,r,t,n,u,o){e.tag=null;e.dump=t;if(!detectType(e,t,false)){detectType(e,t,true)}var a=s.call(e.dump);if(n){n=e.flowLevel<0||e.flowLevel>r}var f=a==="[object Object]"||a==="[object Array]",c,l;if(f){c=e.duplicates.indexOf(t);l=c!==-1}if(e.tag!==null&&e.tag!=="?"||l||e.indent!==2&&r>0){u=false}if(l&&e.usedDuplicates[c]){e.dump="*ref_"+c}else{if(f&&l&&!e.usedDuplicates[c]){e.usedDuplicates[c]=true}if(a==="[object Object]"){if(n&&Object.keys(e.dump).length!==0){writeBlockMapping(e,r,e.dump,u);if(l){e.dump="&ref_"+c+e.dump}}else{writeFlowMapping(e,r,e.dump);if(l){e.dump="&ref_"+c+" "+e.dump}}}else if(a==="[object Array]"){var p=e.noArrayIndent&&r>0?r-1:r;if(n&&e.dump.length!==0){writeBlockSequence(e,p,e.dump,u);if(l){e.dump="&ref_"+c+e.dump}}else{writeFlowSequence(e,p,e.dump);if(l){e.dump="&ref_"+c+" "+e.dump}}}else if(a==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,r,o)}}else{if(e.skipInvalid)return false;throw new i("unacceptable kind of an object to dump "+a)}if(e.tag!==null&&e.tag!=="?"){e.dump="!<"+e.tag+"> "+e.dump}}return true}function getDuplicateReferences(e,r){var t=[],n=[],i,u;inspectNode(e,t,n);for(i=0,u=n.length;i{const i=testProhibited(t,n);if(i){r.message(`Use "${t.yes}" instead of "${i}"`,e)}})}}},,,,,,,,,,function(e){e.exports=function(e,r){return e.replace(/(\\*)(\$([_a-z0-9]+)|\${([_a-z0-9]+)})/gi,function(e,t,n,i,u){if(!(t.length%2)){return t.substring(Math.ceil(t.length/2))+(r[i||u]||"")}else{return t.substring(1)+n}})}},,,function(e,r,t){"use strict";var n;function _defineProperty(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}var i=t(185);var u=Symbol("lastResolve");var o=Symbol("lastReject");var s=Symbol("error");var a=Symbol("ended");var f=Symbol("lastPromise");var c=Symbol("handlePromise");var l=Symbol("stream");function createIterResult(e,r){return{value:e,done:r}}function readAndResolve(e){var r=e[u];if(r!==null){var t=e[l].read();if(t!==null){e[f]=null;e[u]=null;e[o]=null;r(createIterResult(t,false))}}}function onReadable(e){process.nextTick(readAndResolve,e)}function wrapForNext(e,r){return function(t,n){e.then(function(){if(r[a]){t(createIterResult(undefined,true));return}r[c](t,n)},n)}}var p=Object.getPrototypeOf(function(){});var h=Object.setPrototypeOf((n={get stream(){return this[l]},next:function next(){var e=this;var r=this[s];if(r!==null){return Promise.reject(r)}if(this[a]){return Promise.resolve(createIterResult(undefined,true))}if(this[l].destroyed){return new Promise(function(r,t){process.nextTick(function(){if(e[s]){t(e[s])}else{r(createIterResult(undefined,true))}})})}var t=this[f];var n;if(t){n=new Promise(wrapForNext(t,this))}else{var i=this[l].read();if(i!==null){return Promise.resolve(createIterResult(i,false))}n=new Promise(this[c])}this[f]=n;return n}},_defineProperty(n,Symbol.asyncIterator,function(){return this}),_defineProperty(n,"return",function _return(){var e=this;return new Promise(function(r,t){e[l].destroy(null,function(e){if(e){t(e);return}r(createIterResult(undefined,true))})})}),n),p);var v=function createReadableStreamAsyncIterator(e){var r;var t=Object.create(h,(r={},_defineProperty(r,l,{value:e,writable:true}),_defineProperty(r,u,{value:null,writable:true}),_defineProperty(r,o,{value:null,writable:true}),_defineProperty(r,s,{value:null,writable:true}),_defineProperty(r,a,{value:e._readableState.endEmitted,writable:true}),_defineProperty(r,c,{value:function value(e,r){var n=t[l].read();if(n){t[f]=null;t[u]=null;t[o]=null;e(createIterResult(n,false))}else{t[u]=e;t[o]=r}},writable:true}),r));t[f]=null;i(e,function(e){if(e&&e.code!=="ERR_STREAM_PREMATURE_CLOSE"){var r=t[o];if(r!==null){t[f]=null;t[u]=null;t[o]=null;r(e)}t[s]=e;return}var n=t[u];if(n!==null){t[f]=null;t[u]=null;t[o]=null;n(createIterResult(undefined,true))}t[a]=true});e.on("readable",onReadable.bind(null,t));return t};e.exports=v},,function(e,r,t){"use strict";var n=t(860);var i=t(418);e.exports=blockquote;var u="\n";var o="\t";var s=" ";var a=">";function blockquote(e,r,t){var f=this;var c=f.offset;var l=f.blockTokenizers;var p=f.interruptBlockquote;var h=e.now();var v=h.line;var D=r.length;var d=[];var g=[];var m=[];var E;var b=0;var A;var C;var w;var F;var y;var S;var _;var B;while(b2&&ws(f)&&ws(c)){p=1;h=r.length-1;while(++p{if(Object.prototype.toString.call(e)!=="[object Object]"){return false}const r=Object.getPrototypeOf(e);return r===null||r===Object.getPrototypeOf({})})},,,function(e,r,t){"use strict";var n=t(622);function replaceExt(e,r){if(typeof e!=="string"){return e}if(e.length===0){return e}var t=n.basename(e,n.extname(e))+r;return n.join(n.dirname(e),t)}e.exports=replaceExt},function(e){e.exports={name:"node-lint-md-cli-rollup",description:"remark packaged for Node.js Markdown linting",version:"2.0.1",devDependencies:{"@zeit/ncc":"^0.21.0"},dependencies:{"markdown-extensions":"^1.1.1",remark:"^11.0.2","remark-lint":"^6.0.5","remark-preset-lint-node":"^1.11.0","unified-args":"^7.1.0"},main:"src/cli-entry.js",scripts:{build:"ncc build -m","build-node":"npm run build && cp dist/index.js ../lint-md.js"}}},,,,,,,function(e,r,t){"use strict";var n=t(816);var i=t(759);var u=t(96);var o=t(649);var s=t(102);var a=t(231);e.exports=n().use(i).use(u).use(o).use(s).use(a)},function(e){"use strict";e.exports=indentation;var r="\t";var t=" ";var n=1;var i=4;function indentation(e){var u=0;var o=0;var s=e.charAt(u);var a={};var f;while(s===r||s===t){f=s===r?i:n;o+=f;if(f>1){o=Math.floor(o/f)*f}a[o]=u;s=e.charAt(++u)}return{indent:o,stops:a}}},function(e){"use strict";function isNothing(e){return typeof e==="undefined"||e===null}function isObject(e){return typeof e==="object"&&e!==null}function toArray(e){if(Array.isArray(e))return e;else if(isNothing(e))return[];return[e]}function extend(e,r){var t,n,i,u;if(r){u=Object.keys(r);for(t=0,n=u.length;t-1){u.splice(o,1)}var s=t;u.forEach(function _buildSubObj(e,t){if(!e||typeof s!=="object")return;if(t===u.length-1)s[e]=r[i];if(s[e]===undefined)s[e]={};s=s[e]})}}return t};var l=r.find=function(){var e=u.join.apply(null,[].slice.call(arguments));function find(e,r){var t=u.join(e,r);try{n.statSync(t);return t}catch(t){if(u.dirname(e)!==e)return find(u.dirname(e),r)}}return find(process.cwd(),e)}},function(e,r,t){"use strict";var n=t(616);e.exports=imageReference;var i="[";var u="]";var o="!";function imageReference(e){return o+i+(this.encode(e.alt,e)||"")+u+n(e)}},function(e){"use strict";e.exports=locate;function locate(e,r){var t=e.indexOf("*",r);var n=e.indexOf("_",r);if(n===-1){return t}if(t===-1){return n}return n0;return destroyer(e,u,s,function(e){if(!i)i=e;if(e)o.forEach(call);if(u)return;o.forEach(call);n(i)})});return r.reduce(pipe)}e.exports=pipeline},function(e,r,t){"use strict";const n=t(549);e.exports=(e=>typeof e==="string"?e.replace(n(),""):e)},function(e,r,t){"use strict";e.exports=t(713)},,,,,function(e,r,t){"use strict";var n=t(78);e.exports=configure;function configure(e,r){e.configuration=new n(r)}},,function(e){var r=1e3;var t=r*60;var n=t*60;var i=n*24;var u=i*7;var o=i*365.25;e.exports=function(e,r){r=r||{};var t=typeof e;if(t==="string"&&e.length>0){return parse(e)}else if(t==="number"&&isFinite(e)){return r.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s){return}var a=parseFloat(s[1]);var f=(s[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return a*o;case"weeks":case"week":case"w":return a*u;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return undefined}}function fmtShort(e){var u=Math.abs(e);if(u>=i){return Math.round(e/i)+"d"}if(u>=n){return Math.round(e/n)+"h"}if(u>=t){return Math.round(e/t)+"m"}if(u>=r){return Math.round(e/r)+"s"}return e+"ms"}function fmtLong(e){var u=Math.abs(e);if(u>=i){return plural(e,u,i,"day")}if(u>=n){return plural(e,u,n,"hour")}if(u>=t){return plural(e,u,t,"minute")}if(u>=r){return plural(e,u,r,"second")}return e+" ms"}function plural(e,r,t,n){var i=r>=t*1.5;return Math.round(e/t)+" "+n+(i?"s":"")}},,function(e,r,t){"use strict";var n=t(846);var i=t(622).posix.dirname;var u=t(87).platform()==="win32";var o="/";var s=/\\/g;var a=/[\{\[].*[\/]*.*[\}\]]$/;var f=/(^|[^\\])([\{\[]|\([^\)]+$)/;var c=/\\([\*\?\|\[\]\(\)\{\}])/g;e.exports=function globParent(e,r){var t=Object.assign({flipBackslashes:true},r);if(t.flipBackslashes&&u&&e.indexOf(o)<0){e=e.replace(s,o)}if(a.test(e)){e+=o}e+="a";do{e=i(e)}while(n(e)||f.test(e));return e.replace(c,"$1")}},function(e,r,t){"use strict";const n=t(87);const i=t(364);const{env:u}=process;let o;if(i("no-color")||i("no-colors")||i("color=false")||i("color=never")){o=0}else if(i("color")||i("colors")||i("color=true")||i("color=always")){o=1}if("FORCE_COLOR"in u){if(u.FORCE_COLOR===true||u.FORCE_COLOR==="true"){o=1}else if(u.FORCE_COLOR===false||u.FORCE_COLOR==="false"){o=0}else{o=u.FORCE_COLOR.length===0?1:Math.min(parseInt(u.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(o===0){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(e&&!e.isTTY&&o===undefined){return 0}const r=o||0;if(u.TERM==="dumb"){return r}if(process.platform==="win32"){const e=n.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in u){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in u)||u.CI_NAME==="codeship"){return 1}return r}if("TEAMCITY_VERSION"in u){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(u.TEAMCITY_VERSION)?1:0}if(u.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in u){const e=parseInt((u.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(u.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(u.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(u.TERM)){return 1}if("COLORTERM"in u){return 1}return r}function getSupportLevel(e){const r=supportsColor(e);return translateLevel(r)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},,,,,,,,,function(e){"use strict";e.exports=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return!/[^0-9a-z\xDF-\xFF]/.test(e.toLowerCase())}},function(e,r,t){"use strict";var n=t(860);var i=t(8);var u=t(739);e.exports=indentation;var o="\t";var s="\n";var a=" ";var f="!";function indentation(e,r){var t=e.split(s);var c=t.length+1;var l=Infinity;var p=[];var h;var v;var D;var d;t.unshift(i(a,r)+f);while(c--){v=u(t[c]);p[c]=v.stops;if(n(t[c]).length===0){continue}if(v.indent){if(v.indent>0&&v.indent{let t=[];if(Array.isArray(e)){for(let n of e){let e=s.create(n,r);if(Array.isArray(e)){t.push(...e)}else{t.push(e)}}}else{t=[].concat(s.create(e,r))}if(r&&r.expand===true&&r.nodupes===true){t=[...new Set(t)]}return t};s.parse=((e,r={})=>o(e,r));s.stringify=((e,r={})=>{if(typeof e==="string"){return n(s.parse(e,r),r)}return n(e,r)});s.compile=((e,r={})=>{if(typeof e==="string"){e=s.parse(e,r)}return i(e,r)});s.expand=((e,r={})=>{if(typeof e==="string"){e=s.parse(e,r)}let t=u(e,r);if(r.noempty===true){t=t.filter(Boolean)}if(r.nodupes===true){t=[...new Set(t)]}return t});s.create=((e,r={})=>{if(e===""||e.length<3){return[e]}return r.expand!==true?s.compile(e,r):s.expand(e,r)});e.exports=s},function(e,r,t){if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=t(794)}else{e.exports=t(81)}},,,,function(e){e.exports={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"}},function(e,r,t){"use strict";const n=t(914);const i=(e,r,t)=>{if(n(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(r===void 0||e===r){return String(e)}if(n(r)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let u={relaxZeros:true,...t};if(typeof u.strictZeros==="boolean"){u.relaxZeros=u.strictZeros===false}let o=String(u.relaxZeros);let s=String(u.shorthand);let a=String(u.capture);let f=String(u.wrap);let c=e+":"+r+"="+o+s+a+f;if(i.cache.hasOwnProperty(c)){return i.cache[c].result}let l=Math.min(e,r);let p=Math.max(e,r);if(Math.abs(l-p)===1){let t=e+"|"+r;if(u.capture){return`(${t})`}if(u.wrap===false){return t}return`(?:${t})`}let h=hasPadding(e)||hasPadding(r);let v={min:e,max:r,a:l,b:p};let D=[];let d=[];if(h){v.isPadded=h;v.maxLen=String(v.max).length}if(l<0){let e=p<0?Math.abs(p):1;d=splitToPatterns(e,Math.abs(l),v,u);l=v.a=0}if(p>=0){D=splitToPatterns(l,p,v,u)}v.negatives=d;v.positives=D;v.result=collatePatterns(d,D,u);if(u.capture===true){v.result=`(${v.result})`}else if(u.wrap!==false&&D.length+d.length>1){v.result=`(?:${v.result})`}i.cache[c]=v;return v.result};function collatePatterns(e,r,t){let n=filterPatterns(e,r,"-",false,t)||[];let i=filterPatterns(r,e,"",false,t)||[];let u=filterPatterns(e,r,"-?",true,t)||[];let o=n.concat(u).concat(i);return o.join("|")}function splitToRanges(e,r){let t=1;let n=1;let i=countNines(e,t);let u=new Set([r]);while(e<=i&&i<=r){u.add(i);t+=1;i=countNines(e,t)}i=countZeros(r+1,n)-1;while(e1){s.count.pop()}s.count.push(a.count[0]);s.string=s.pattern+toQuantifier(s.count);o=r+1;continue}if(t.isPadded){f=padZeros(r,t,n)}a.string=f+a.pattern+toQuantifier(a.count);u.push(a);o=r+1;s=a}return u}function filterPatterns(e,r,t,n,i){let u=[];for(let i of e){let{string:e}=i;if(!n&&!contains(r,"string",e)){u.push(t+e)}if(n&&contains(r,"string",e)){u.push(t+e)}}return u}function zip(e,r){let t=[];for(let n=0;nr?1:r>e?-1:0}function contains(e,r,t){return e.some(e=>e[r]===t)}function countNines(e,r){return Number(String(e).slice(0,-r)+"9".repeat(r))}function countZeros(e,r){return e-e%Math.pow(10,r)}function toQuantifier(e){let[r=0,t=""]=e;if(t||r>1){return`{${r+(t?","+t:"")}}`}return""}function toCharacterClass(e,r,t){return`[${e}${r-e===1?"":"-"}${r}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,r,t){if(!r.isPadded){return e}let n=Math.abs(r.maxLen-String(e).length);let i=t.relaxZeros!==false;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${n}}`:`0{${n}}`}}}i.cache={};i.clearCache=(()=>i.cache={});e.exports=i},,,,function(e){"use strict";function destroy(e,r){var t=this;var n=this._readableState&&this._readableState.destroyed;var i=this._writableState&&this._writableState.destroyed;if(n||i){if(r){r(e)}else if(e&&(!this._writableState||!this._writableState.errorEmitted)){process.nextTick(emitErrorNT,this,e)}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,function(e){if(!r&&e){process.nextTick(emitErrorAndCloseNT,t,e);if(t._writableState){t._writableState.errorEmitted=true}}else if(r){process.nextTick(emitCloseNT,t);r(e)}else{process.nextTick(emitCloseNT,t)}});return this}function emitErrorAndCloseNT(e,r){emitErrorNT(e,r);emitCloseNT(e)}function emitCloseNT(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,r){e.emit("error",r)}e.exports={destroy:destroy,undestroy:undestroy}},function(e,r,t){r.log=log;r.formatArgs=formatArgs;r.save=save;r.load=load;r.useColors=useColors;r.storage=localstorage();r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(r){r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const t="color: "+this.color;r.splice(1,0,t,"color: inherit");let n=0;let i=0;r[0].replace(/%[a-zA-Z%]/g,e=>{if(e==="%%"){return}n++;if(e==="%c"){i=n}});r.splice(i,0,t)}function log(...e){return typeof console==="object"&&console.log&&console.log(...e)}function save(e){try{if(e){r.storage.setItem("debug",e)}else{r.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=r.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=t(486)(r);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},,,function(e,r,t){"use strict";var n=t(277);e.exports=length;var i="&";function length(e){var r;if(e.charAt(0)!==i){return 0}r=e.split(i,2).join(i);return r.length-n(r).length}},,function(e,r,t){"use strict";var n=t(547);var i=t(177);var u=t(109);var o=t(83);var s=t(827);var a=t(664);e.exports=options;var f={unknown:handleUnknownArgument,default:{},alias:{},string:[],boolean:[]};a.forEach(addEach);function options(e,r){var t=r.extensions[0];var n=r.name;var i=toCamelCase(u(e,f));var o;var c;var l;a.forEach(function(e){if(e.type==="string"&&i[e.long]===""){throw s("Missing value:%s",inspect(e).join(" "))}});c=commaSeparated(i.ext);l=reporter(i.report);o=[inspectAll(a),"","Examples:",""," # Process `input."+t+"`"," $ "+n+" input."+t+" -o output."+t,""," # Pipe"," $ "+n+" < input."+t+" > output."+t,""," # Rewrite all applicable files"," $ "+n+" . -o"].join("\n");return{helpMessage:o,cwd:r.cwd,processor:r.processor,help:i.help,version:i.version,files:i._,filePath:i.filePath,watch:i.watch,extensions:c.length===0?r.extensions:c,output:i.output,out:i.stdout,tree:i.tree,treeIn:i.treeIn,treeOut:i.treeOut,inspect:i.inspect,rcName:r.rcName,packageField:r.packageField,rcPath:i.rcPath,detectConfig:i.config,settings:settings(i.setting),ignoreName:r.ignoreName,ignorePath:i.ignorePath,ignorePatterns:commaSeparated(i.ignorePattern),detectIgnore:i.ignore,pluginPrefix:r.pluginPrefix,plugins:plugins(i.use),reporter:l[0],reporterOptions:l[1],color:i.color,silent:i.silent,quiet:i.quiet,frail:i.frail}}function addEach(e){var r=e.default;f.default[e.long]=r===undefined?null:r;if(e.type in f){f[e.type].push(e.long)}if(e.short){f.alias[e.short]=e.long}}function commaSeparated(e){return flatten(normalize(e).map(splitList))}function plugins(e){var r={};normalize(e).map(splitOptions).forEach(function(e){r[e[0]]=e[1]?parseConfig(e[1],{}):null});return r}function reporter(e){var r=normalize(e).map(splitOptions).map(function(e){return[e[0],e[1]?parseConfig(e[1],{}):null]});return r[r.length-1]||[]}function settings(e){var r={};normalize(e).forEach(function(e){parseConfig(e,r)});return r}function parseConfig(e,r){var t;var n;try{e=toCamelCase(parseJSON(e))}catch(r){n=r.message.replace(/at(?= position)/,"around");throw s("Cannot parse `%s` as JSON: %s",e,n)}for(t in e){r[t]=e[t]}return r}function handleUnknownArgument(e){if(e.charAt(0)!=="-"){return}if(e.charAt(1)==="-"){throw s("Unknown option `%s`, expected:\n%s",e,inspectAll(a))}e.slice(1).split("").forEach(each);function each(e){var r=a.length;var t=-1;var n;while(++t|$))/i;var f=/<\/(script|pre|style)>/i;var c=/^/;var p=/^<\?/;var h=/\?>/;var v=/^/;var d=/^/;var m=/^$/;var E=new RegExp(n.source+"\\s*$");function blockHtml(e,r,t){var n=this;var b=n.options.blocks.join("|");var A=new RegExp("^|$))","i");var C=r.length;var w=0;var F;var y;var S;var _;var B;var O;var k;var x=[[a,f,true],[c,l,true],[p,h,true],[v,D,true],[d,g,true],[A,m,true],[E,m,false]];while(w{if(typeof r.expandRange==="function"){return r.expandRange(...e,r)}e.sort();const t=`[${e.join("-")}]`;try{new RegExp(t)}catch(r){return e.map(e=>i.escapeRegex(e)).join("..")}return t};const l=(e,r)=>{return`Missing ${e}: "${r}" - use "\\\\${r}" to match literal characters`};const p=(e,r)=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}e=f[e]||e;const t={...r};const p=typeof t.maxLength==="number"?Math.min(u,t.maxLength):u;let h=e.length;if(h>p){throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${p}`)}const v={type:"bos",value:"",output:t.prepend||""};const D=[v];const d=t.capture?"":"?:";const g=i.isWindows(r);const m=n.globChars(g);const E=n.extglobChars(m);const{DOT_LITERAL:b,PLUS_LITERAL:A,SLASH_LITERAL:C,ONE_CHAR:w,DOTS_SLASH:F,NO_DOT:y,NO_DOT_SLASH:S,NO_DOTS_SLASH:_,QMARK:B,QMARK_NO_DOT:O,STAR:k,START_ANCHOR:x}=m;const R=e=>{return`(${d}(?:(?!${x}${e.dot?F:b}).)*?)`};const T=t.dot?"":y;const I=t.dot?B:O;let L=t.bash===true?R(t):k;if(t.capture){L=`(${L})`}if(typeof t.noext==="boolean"){t.noextglob=t.noext}const M={input:e,index:-1,start:0,dot:t.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:D};e=i.removePrefix(e,M);h=e.length;const j=[];const P=[];const N=[];let $=v;let H;const U=()=>M.index===h-1;const W=M.peek=((r=1)=>e[M.index+r]);const G=M.advance=(()=>e[++M.index]);const q=()=>e.slice(M.index+1);const Y=(e="",r=0)=>{M.consumed+=e;M.index+=r};const z=e=>{M.output+=e.output!=null?e.output:e.value;Y(e.value)};const V=()=>{let e=1;while(W()==="!"&&(W(2)!=="("||W(3)==="?")){G();M.start++;e++}if(e%2===0){return false}M.negated=true;M.start++;return true};const J=e=>{M[e]++;N.push(e)};const Z=e=>{M[e]--;N.pop()};const Q=e=>{if($.type==="globstar"){const r=M.braces>0&&(e.type==="comma"||e.type==="brace");const t=e.extglob===true||j.length&&(e.type==="pipe"||e.type==="paren");if(e.type!=="slash"&&e.type!=="paren"&&!r&&!t){M.output=M.output.slice(0,-$.output.length);$.type="star";$.value="*";$.output=L;M.output+=$.output}}if(j.length&&e.type!=="paren"&&!E[e.value]){j[j.length-1].inner+=e.value}if(e.value||e.output)z(e);if($&&$.type==="text"&&e.type==="text"){$.value+=e.value;$.output=($.output||"")+e.value;return}e.prev=$;D.push(e);$=e};const X=(e,r)=>{const n={...E[r],conditions:1,inner:""};n.prev=$;n.parens=M.parens;n.output=M.output;const i=(t.capture?"(":"")+n.open;J("parens");Q({type:e,value:r,output:M.output?"":w});Q({type:"paren",extglob:true,value:G(),output:i});j.push(n)};const K=e=>{let r=e.close+(t.capture?")":"");if(e.type==="negate"){let n=L;if(e.inner&&e.inner.length>1&&e.inner.includes("/")){n=R(t)}if(n!==L||U()||/^\)+$/.test(q())){r=e.close=`)$))${n}`}if(e.prev.type==="bos"&&U()){M.negatedExtglob=true}}Q({type:"paren",extglob:true,value:H,output:r});Z("parens")};if(t.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=false;let u=e.replace(a,(e,r,t,i,u,o)=>{if(i==="\\"){n=true;return e}if(i==="?"){if(r){return r+i+(u?B.repeat(u.length):"")}if(o===0){return I+(u?B.repeat(u.length):"")}return B.repeat(t.length)}if(i==="."){return b.repeat(t.length)}if(i==="*"){if(r){return r+i+(u?L:"")}return L}return r?e:`\\${e}`});if(n===true){if(t.unescape===true){u=u.replace(/\\/g,"")}else{u=u.replace(/\\+/g,e=>{return e.length%2===0?"\\\\":e?"\\":""})}}if(u===e&&t.contains===true){M.output=e;return M}M.output=i.wrapOutput(u,M,r);return M}while(!U()){H=G();if(H==="\0"){continue}if(H==="\\"){const e=W();if(e==="/"&&t.bash!==true){continue}if(e==="."||e===";"){continue}if(!e){H+="\\";Q({type:"text",value:H});continue}const r=/^\\+/.exec(q());let n=0;if(r&&r[0].length>2){n=r[0].length;M.index+=n;if(n%2!==0){H+="\\"}}if(t.unescape===true){H=G()||""}else{H+=G()||""}if(M.brackets===0){Q({type:"text",value:H});continue}}if(M.brackets>0&&(H!=="]"||$.value==="["||$.value==="[^")){if(t.posix!==false&&H===":"){const e=$.value.slice(1);if(e.includes("[")){$.posix=true;if(e.includes(":")){const e=$.value.lastIndexOf("[");const r=$.value.slice(0,e);const t=$.value.slice(e+2);const n=o[t];if(n){$.value=r+n;M.backtrack=true;G();if(!v.output&&D.indexOf($)===1){v.output=w}continue}}}}if(H==="["&&W()!==":"||H==="-"&&W()==="]"){H=`\\${H}`}if(H==="]"&&($.value==="["||$.value==="[^")){H=`\\${H}`}if(t.posix===true&&H==="!"&&$.value==="["){H="^"}$.value+=H;z({value:H});continue}if(M.quotes===1&&H!=='"'){H=i.escapeRegex(H);$.value+=H;z({value:H});continue}if(H==='"'){M.quotes=M.quotes===1?0:1;if(t.keepQuotes===true){Q({type:"text",value:H})}continue}if(H==="("){J("parens");Q({type:"paren",value:H});continue}if(H===")"){if(M.parens===0&&t.strictBrackets===true){throw new SyntaxError(l("opening","("))}const e=j[j.length-1];if(e&&M.parens===e.parens+1){K(j.pop());continue}Q({type:"paren",value:H,output:M.parens?")":"\\)"});Z("parens");continue}if(H==="["){if(t.nobracket===true||!q().includes("]")){if(t.nobracket!==true&&t.strictBrackets===true){throw new SyntaxError(l("closing","]"))}H=`\\${H}`}else{J("brackets")}Q({type:"bracket",value:H});continue}if(H==="]"){if(t.nobracket===true||$&&$.type==="bracket"&&$.value.length===1){Q({type:"text",value:H,output:`\\${H}`});continue}if(M.brackets===0){if(t.strictBrackets===true){throw new SyntaxError(l("opening","["))}Q({type:"text",value:H,output:`\\${H}`});continue}Z("brackets");const e=$.value.slice(1);if($.posix!==true&&e[0]==="^"&&!e.includes("/")){H=`/${H}`}$.value+=H;z({value:H});if(t.literalBrackets===false||i.hasRegexChars(e)){continue}const r=i.escapeRegex($.value);M.output=M.output.slice(0,-$.value.length);if(t.literalBrackets===true){M.output+=r;$.value=r;continue}$.value=`(${d}${r}|${$.value})`;M.output+=$.value;continue}if(H==="{"&&t.nobrace!==true){J("braces");const e={type:"brace",value:H,output:"(",outputIndex:M.output.length,tokensIndex:M.tokens.length};P.push(e);Q(e);continue}if(H==="}"){const e=P[P.length-1];if(t.nobrace===true||!e){Q({type:"text",value:H,output:H});continue}let r=")";if(e.dots===true){const e=D.slice();const n=[];for(let r=e.length-1;r>=0;r--){D.pop();if(e[r].type==="brace"){break}if(e[r].type!=="dots"){n.unshift(e[r].value)}}r=c(n,t);M.backtrack=true}if(e.comma!==true&&e.dots!==true){const t=M.output.slice(0,e.outputIndex);const n=M.tokens.slice(e.tokensIndex);e.value=e.output="\\{";H=r=`\\}`;M.output=t;for(const e of n){M.output+=e.output||e.value}}Q({type:"brace",value:H,output:r});Z("braces");P.pop();continue}if(H==="|"){if(j.length>0){j[j.length-1].conditions++}Q({type:"text",value:H});continue}if(H===","){let e=H;const r=P[P.length-1];if(r&&N[N.length-1]==="braces"){r.comma=true;e="|"}Q({type:"comma",value:H,output:e});continue}if(H==="/"){if($.type==="dot"&&M.index===M.start+1){M.start=M.index+1;M.consumed="";M.output="";D.pop();$=v;continue}Q({type:"slash",value:H,output:C});continue}if(H==="."){if(M.braces>0&&$.type==="dot"){if($.value===".")$.output=b;const e=P[P.length-1];$.type="dots";$.output+=H;$.value+=H;e.dots=true;continue}if(M.braces+M.parens===0&&$.type!=="bos"&&$.type!=="slash"){Q({type:"text",value:H,output:b});continue}Q({type:"dot",value:H,output:b});continue}if(H==="?"){const e=$&&$.value==="(";if(!e&&t.noextglob!==true&&W()==="("&&W(2)!=="?"){X("qmark",H);continue}if($&&$.type==="paren"){const e=W();let r=H;if(e==="<"&&!i.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if($.value==="("&&!/[!=<:]/.test(e)||e==="<"&&!/<([!=]|\w+>)/.test(q())){r=`\\${H}`}Q({type:"text",value:H,output:r});continue}if(t.dot!==true&&($.type==="slash"||$.type==="bos")){Q({type:"qmark",value:H,output:O});continue}Q({type:"qmark",value:H,output:B});continue}if(H==="!"){if(t.noextglob!==true&&W()==="("){if(W(2)!=="?"||!/[!=<:]/.test(W(3))){X("negate",H);continue}}if(t.nonegate!==true&&M.index===0){V();continue}}if(H==="+"){if(t.noextglob!==true&&W()==="("&&W(2)!=="?"){X("plus",H);continue}if($&&$.value==="("||t.regex===false){Q({type:"plus",value:H,output:A});continue}if($&&($.type==="bracket"||$.type==="paren"||$.type==="brace")||M.parens>0){Q({type:"plus",value:H});continue}Q({type:"plus",value:A});continue}if(H==="@"){if(t.noextglob!==true&&W()==="("&&W(2)!=="?"){Q({type:"at",extglob:true,value:H,output:""});continue}Q({type:"text",value:H});continue}if(H!=="*"){if(H==="$"||H==="^"){H=`\\${H}`}const e=s.exec(q());if(e){H+=e[0];M.index+=e[0].length}Q({type:"text",value:H});continue}if($&&($.type==="globstar"||$.star===true)){$.type="star";$.star=true;$.value+=H;$.output=L;M.backtrack=true;M.globstar=true;Y(H);continue}let r=q();if(t.noextglob!==true&&/^\([^?]/.test(r)){X("star",H);continue}if($.type==="star"){if(t.noglobstar===true){Y(H);continue}const n=$.prev;const i=n.prev;const u=n.type==="slash"||n.type==="bos";const o=i&&(i.type==="star"||i.type==="globstar");if(t.bash===true&&(!u||r[0]&&r[0]!=="/")){Q({type:"star",value:H,output:""});continue}const s=M.braces>0&&(n.type==="comma"||n.type==="brace");const a=j.length&&(n.type==="pipe"||n.type==="paren");if(!u&&n.type!=="paren"&&!s&&!a){Q({type:"star",value:H,output:""});continue}while(r.slice(0,3)==="/**"){const t=e[M.index+4];if(t&&t!=="/"){break}r=r.slice(3);Y("/**",3)}if(n.type==="bos"&&U()){$.type="globstar";$.value+=H;$.output=R(t);M.output=$.output;M.globstar=true;Y(H);continue}if(n.type==="slash"&&n.prev.type!=="bos"&&!o&&U()){M.output=M.output.slice(0,-(n.output+$.output).length);n.output=`(?:${n.output}`;$.type="globstar";$.output=R(t)+(t.strictSlashes?")":"|$)");$.value+=H;M.globstar=true;M.output+=n.output+$.output;Y(H);continue}if(n.type==="slash"&&n.prev.type!=="bos"&&r[0]==="/"){const e=r[1]!==void 0?"|$":"";M.output=M.output.slice(0,-(n.output+$.output).length);n.output=`(?:${n.output}`;$.type="globstar";$.output=`${R(t)}${C}|${C}${e})`;$.value+=H;M.output+=n.output+$.output;M.globstar=true;Y(H+G());Q({type:"slash",value:"/",output:""});continue}if(n.type==="bos"&&r[0]==="/"){$.type="globstar";$.value+=H;$.output=`(?:^|${C}|${R(t)}${C})`;M.output=$.output;M.globstar=true;Y(H+G());Q({type:"slash",value:"/",output:""});continue}M.output=M.output.slice(0,-$.output.length);$.type="globstar";$.output=R(t);$.value+=H;M.output+=$.output;M.globstar=true;Y(H);continue}const n={type:"star",value:H,output:L};if(t.bash===true){n.output=".*?";if($.type==="bos"||$.type==="slash"){n.output=T+n.output}Q(n);continue}if($&&($.type==="bracket"||$.type==="paren")&&t.regex===true){n.output=H;Q(n);continue}if(M.index===M.start||$.type==="slash"||$.type==="dot"){if($.type==="dot"){M.output+=S;$.output+=S}else if(t.dot===true){M.output+=_;$.output+=_}else{M.output+=T;$.output+=T}if(W()!=="*"){M.output+=w;$.output+=w}}Q(n)}while(M.brackets>0){if(t.strictBrackets===true)throw new SyntaxError(l("closing","]"));M.output=i.escapeLast(M.output,"[");Z("brackets")}while(M.parens>0){if(t.strictBrackets===true)throw new SyntaxError(l("closing",")"));M.output=i.escapeLast(M.output,"(");Z("parens")}while(M.braces>0){if(t.strictBrackets===true)throw new SyntaxError(l("closing","}"));M.output=i.escapeLast(M.output,"{");Z("braces")}if(t.strictSlashes!==true&&($.type==="star"||$.type==="bracket")){Q({type:"maybe_slash",value:"",output:`${C}?`})}if(M.backtrack===true){M.output="";for(const e of M.tokens){M.output+=e.output!=null?e.output:e.value;if(e.suffix){M.output+=e.suffix}}}return M};p.fastpaths=((e,r)=>{const t={...r};const o=typeof t.maxLength==="number"?Math.min(u,t.maxLength):u;const s=e.length;if(s>o){throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`)}e=f[e]||e;const a=i.isWindows(r);const{DOT_LITERAL:c,SLASH_LITERAL:l,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:v,NO_DOTS:D,NO_DOTS_SLASH:d,STAR:g,START_ANCHOR:m}=n.globChars(a);const E=t.dot?D:v;const b=t.dot?d:v;const A=t.capture?"":"?:";const C={negated:false,prefix:""};let w=t.bash===true?".*?":g;if(t.capture){w=`(${w})`}const F=e=>{if(e.noglobstar===true)return w;return`(${A}(?:(?!${m}${e.dot?h:c}).)*?)`};const y=e=>{switch(e){case"*":return`${E}${p}${w}`;case".*":return`${c}${p}${w}`;case"*.*":return`${E}${w}${c}${p}${w}`;case"*/*":return`${E}${w}${l}${p}${b}${w}`;case"**":return E+F(t);case"**/*":return`(?:${E}${F(t)}${l})?${b}${p}${w}`;case"**/*.*":return`(?:${E}${F(t)}${l})?${b}${w}${c}${p}${w}`;case"**/.*":return`(?:${E}${F(t)}${l})?${c}${p}${w}`;default:{const r=/^(.*?)\.(\w+)$/.exec(e);if(!r)return;const t=y(r[1]);if(!t)return;return t+c+r[2]}}};const S=i.removePrefix(e,C);let _=y(S);if(_&&t.strictSlashes!==true){_+=`${l}?`}return _});e.exports=p},function(e){"use strict";e.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},,function(e,r,t){"use strict";var n=t(945);function resolveYamlNull(e){if(e===null)return true;var r=e.length;return r===1&&e==="~"||r===4&&(e==="null"||e==="Null"||e==="NULL")}function constructYamlNull(){return null}function isNull(e){return e===null}e.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e){"use strict";e.exports=sort;var r={true:2,false:1,null:0,undefined:0};function sort(e){e.messages.sort(comparator);return e}function comparator(e,t){return check(e,t,"line")||check(e,t,"column")||r[t.fatal]-r[e.fatal]||compare(e,t,"source")||compare(e,t,"ruleId")||compare(e,t,"reason")||0}function check(e,r,t){return(e[t]||0)-(r[t]||0)}function compare(e,r,t){return(e[t]||"").localeCompare(r[t]||"")}},function(e){e.exports={addendum:"addenda",aircraft:"aircraft",alga:"algae",alumna:"alumnae",alumnus:"alumni",amoeba:"amoebae",analysis:"analyses",antenna:"antennae",antithesis:"antitheses",apex:"apices",appendix:"appendices",automaton:"automata",axis:"axes",bacillus:"bacilli",bacterium:"bacteria",barracks:"barracks",basis:"bases",beau:"beaux",bison:"bison",buffalo:"buffalo",bureau:"bureaus",cactus:"cacti",calf:"calves",carp:"carp",census:"censuses",chassis:"chassis",cherub:"cherubim",child:"children","château":"châteaus",cod:"cod",codex:"codices",concerto:"concerti",corpus:"corpora",crisis:"crises",criterion:"criteria",curriculum:"curricula",datum:"data",deer:"deer",diagnosis:"diagnoses",die:"dice",dwarf:"dwarfs",echo:"echoes",elf:"elves",elk:"elk",ellipsis:"ellipses",embargo:"embargoes",emphasis:"emphases",erratum:"errata","faux pas":"faux pas",fez:"fezes",firmware:"firmware",fish:"fish",focus:"foci",foot:"feet",formula:"formulae",fungus:"fungi",gallows:"gallows",genus:"genera",goose:"geese",graffito:"graffiti",grouse:"grouse",half:"halves",hero:"heroes",hoof:"hooves",hovercraft:"hovercraft",hypothesis:"hypotheses",index:"indices",kakapo:"kakapo",knife:"knives",larva:"larvae",leaf:"leaves",libretto:"libretti",life:"lives",loaf:"loaves",locus:"loci",louse:"lice",man:"men",matrix:"matrices",means:"means",medium:"media",memorandum:"memoranda",millennium:"millennia",minutia:"minutiae",moose:"moose",mouse:"mice",nebula:"nebulae",nemesis:"nemeses",neurosis:"neuroses",news:"news",nucleus:"nuclei",oasis:"oases",offspring:"offspring",opus:"opera",ovum:"ova",ox:"oxen",paralysis:"paralyses",parenthesis:"parentheses",person:"people",phenomenon:"phenomena",phylum:"phyla",pike:"pike",polyhedron:"polyhedra",potato:"potatoes",prognosis:"prognoses",quiz:"quizzes",radius:"radii",referendum:"referenda",salmon:"salmon",scarf:"scarves",self:"selves",series:"series",sheep:"sheep",shelf:"shelves",shrimp:"shrimp",spacecraft:"spacecraft",species:"species",spectrum:"spectra",squid:"squid",stimulus:"stimuli",stratum:"strata",swine:"swine",syllabus:"syllabi",symposium:"symposia",synopsis:"synopses",synthesis:"syntheses",tableau:"tableaus",that:"those",thesis:"theses",thief:"thieves",this:"these",tomato:"tomatoes",tooth:"teeth",trout:"trout",tuna:"tuna",vertebra:"vertebrae",vertex:"vertices",veto:"vetoes",vita:"vitae",vortex:"vortices",watercraft:"watercraft",wharf:"wharves",wife:"wives",wolf:"wolves",woman:"women"}},function(e){e.exports=function isBuffer(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}},,,,function(e,r,t){"use strict";var n=t(560);e.exports=trough;trough.wrap=n;var i=[].slice;function trough(){var e=[];var r={};r.run=run;r.use=use;return r;function run(){var r=-1;var t=i.call(arguments,0,-1);var u=arguments[arguments.length-1];if(typeof u!=="function"){throw new Error("Expected function as last argument, not "+u)}next.apply(null,[null].concat(t));function next(o){var s=e[++r];var a=i.call(arguments,0);var f=a.slice(1);var c=t.length;var l=-1;if(o){u(o);return}while(++lString(e));if(t>2){return`one of ${r} ${e.slice(0,t-1).join(", ")}, or `+e[t-1]}else if(t===2){return`one of ${r} ${e[0]} or ${e[1]}`}else{return`of ${r} ${e[0]}`}}else{return`of ${r} ${String(e)}`}}function startsWith(e,r,t){return e.substr(!t||t<0?0:+t,r.length)===r}function endsWith(e,r,t){if(t===undefined||t>e.length){t=e.length}return e.substring(t-r.length,t)===r}function includes(e,r,t){if(typeof t!=="number"){t=0}if(t+r.length>e.length){return false}else{return e.indexOf(r,t)!==-1}}createErrorType("ERR_INVALID_OPT_VALUE",function(e,r){return'The value "'+r+'" is invalid for option "'+e+'"'},TypeError);createErrorType("ERR_INVALID_ARG_TYPE",function(e,r,t){let n;if(typeof r==="string"&&startsWith(r,"not ")){n="must not be";r=r.replace(/^not /,"")}else{n="must be"}let i;if(endsWith(e," argument")){i=`The ${e} ${n} ${oneOf(r,"type")}`}else{const t=includes(e,".")?"property":"argument";i=`The "${e}" ${t} ${n} ${oneOf(r,"type")}`}i+=`. Received type ${typeof t}`;return i},TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");e.exports.codes=r},,function(e,r,t){"use strict";var n=t(940);var i=t(277);e.exports=factory;function factory(e){decoder.raw=decodeRaw;return decoder;function normalize(r){var t=e.offset;var n=r.line;var i=[];while(++n){if(!(n in t)){break}i.push((t[n]||0)+1)}return{start:r,indent:i}}function decoder(r,t,n){i(r,{position:normalize(t),warning:handleWarning,text:n,reference:n,textContext:e,referenceContext:e})}function decodeRaw(e,r,t){return i(e,n(t,{position:normalize(r),warning:handleWarning}))}function handleWarning(r,t,n){if(n!==3){e.file.message(r,t)}}}},,,,,,,function(e,r,t){"use strict";var n=t(429);var i=create(Error);e.exports=i;i.eval=create(EvalError);i.range=create(RangeError);i.reference=create(ReferenceError);i.syntax=create(SyntaxError);i.type=create(TypeError);i.uri=create(URIError);i.create=create;function create(e){FormattedError.displayName=e.displayName||e.name;return FormattedError;function FormattedError(r){if(r){r=n.apply(null,arguments)}return new e(r)}}},,function(e){"use strict";e.exports=locate;function locate(e,r){return e.indexOf("~~",r)}},function(e,r,t){"use strict";var n=t(277);var i=t(578);var u=t(22);e.exports=url;url.locator=u;url.notInLink=true;var o='"';var s="'";var a="(";var f=")";var c=",";var l=".";var p=":";var h=";";var v="<";var D="@";var d="[";var g="]";var m="http://";var E="https://";var b="mailto:";var A=[m,E,b];var C=A.length;function url(e,r,t){var u=this;var m;var E;var w;var F;var y;var S;var _;var B;var O;var k;var x;var R;var T;if(!u.options.gfm){return}m="";F=-1;while(++Fr?unescape(r):t))}else{throw new Error(`Invalid Chalk template style argument: ${r} (in style '${e}')`)}}return t}function parseStyle(e){t.lastIndex=0;const r=[];let n;while((n=t.exec(e))!==null){const e=n[1];if(n[2]){const t=parseArguments(e,n[2]);r.push([e].concat(t))}else{r.push([e])}}return r}function buildStyle(e,r){const t={};for(const e of r){for(const r of e.styles){t[r[0]]=e.inverse?null:r.slice(1)}}let n=e;for(const e of Object.keys(t)){if(Array.isArray(t[e])){if(!(e in n)){throw new Error(`Unknown Chalk style: ${e}`)}if(t[e].length>0){n=n[e].apply(n,t[e])}else{n=n[e]}}}return n}e.exports=((e,t)=>{const n=[];const i=[];let u=[];t.replace(r,(r,t,o,s,a,f)=>{if(t){u.push(unescape(t))}else if(s){const r=u.join("");u=[];i.push(n.length===0?r:buildStyle(e,n)(r));n.push({inverse:o,styles:parseStyle(s)})}else if(a){if(n.length===0){throw new Error("Found extraneous } in Chalk template literal")}i.push(buildStyle(e,n)(u.join("")));u=[];n.pop()}else{u.push(f)}});i.push(u.join(""));if(n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${n.length===1?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")})},function(e,r,t){"use strict";var n=t(945);var i=Object.prototype.hasOwnProperty;var u=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var r=[],t,n,o,s,a,f=e;for(t=0,n=f.length;t4&&e[3]==="\\"){var i=e[2];if((i==="?"||i===".")&&e.slice(0,2)==="\\\\"){e=e.slice(2);n="//"}}var u=e.split(/[/\\]+/);if(r!==false&&u[u.length-1]===""){u.pop()}return n+u.join("/")}},,,function(e,r,t){var n=t(741);var i=t(622).join;var u=t(203);var o="/etc";var s=process.platform==="win32";var a=s?process.env.USERPROFILE:process.env.HOME;e.exports=function(e,r,f,c){if("string"!==typeof e)throw new Error("rc(name): name *must* be string");if(!f)f=t(109)(process.argv.slice(2));r=("string"===typeof r?n.json(r):r)||{};c=c||n.parse;var l=n.env(e+"_");var p=[r];var h=[];function addConfigFile(e){if(h.indexOf(e)>=0)return;var r=n.file(e);if(r){p.push(c(r));h.push(e)}}if(!s)[i(o,e,"config"),i(o,e+"rc")].forEach(addConfigFile);if(a)[i(a,".config",e,"config"),i(a,".config",e),i(a,"."+e,"config"),i(a,"."+e+"rc")].forEach(addConfigFile);addConfigFile(n.find("."+e+"rc"));if(l.config)addConfigFile(l.config);if(f.config)addConfigFile(f.config);return u.apply(null,p.concat([l,f,h.length?{configs:h,config:h[h.length-1]}:undefined]))}},function(e,r,t){"use strict";var n=t(608);var i=t(263);var u=t(162);var o=t(353);e.exports=n("remark-lint:heading-style",headingStyle);var s=["atx","atx-closed","setext"];function headingStyle(e,r,t){t=s.indexOf(t)===-1?null:t;i(e,"heading",visitor);function visitor(e){if(!o(e)){if(t){if(u(e,t)!==t){r.message("Headings should use "+t,e)}}else{t=u(e,t)}}}}},,function(e){e.exports=require("tty")},,,,function(e,r,t){"use strict";var n=t(997);e.exports=lint;function lint(){this.use(lintMessageControl)}function lintMessageControl(){return n({name:"lint",source:"remark-lint"})}},,function(e,r,t){"use strict";var n=t(608);var i=t(427);var u=t(263);var o=t(960);var s=t(353);e.exports=n("remark-lint:list-item-indent",listItemIndent);var a=o.start;var f={"tab-size":true,mixed:true,space:true};function listItemIndent(e,r,t){var n=String(r);t=typeof t==="string"?t:"tab-size";if(f[t]!==true){r.fail("Invalid list-item indent style `"+t+"`: use either `'tab-size'`, `'space'`, or `'mixed'`")}u(e,"list",visitor);function visitor(e){var u=e.spread||e.loose;if(!s(e)){e.children.forEach(visitItem)}function visitItem(e){var o=e.children[0];var s=a(o);var f;var c;var l;var p;var h;f=n.slice(a(e).offset,s.offset).replace(/\[[x ]?]\s*$/i,"");c=f.trimRight().length;l=t==="tab-size"||t==="mixed"&&u?Math.ceil(c/4)*4:c+1;if(f.length!==l){p=l-f.length;h="Incorrect list-item indent: "+(p>0?"add":"remove")+" "+Math.abs(p)+" "+i("space",p);r.message(h,s)}}}}},,function(e,r,t){"use strict";var n=t(8);e.exports=strong;function strong(e){var r=n(this.options.strong,2);return r+this.all(e).join("")+r}},,,,,function(e,r,t){const n=t(299);let i;let u;let o;let s;let a;let f;let c;let l;let p;e.exports=function parse(e,r){i=String(e);u="start";o=[];s=0;a=1;f=0;c=undefined;l=undefined;p=undefined;do{c=lex();E[u]()}while(c.type!=="eof");if(typeof r==="function"){return internalize({"":p},"",r)}return p};function internalize(e,r,t){const n=e[r];if(n!=null&&typeof n==="object"){for(const e in n){const r=internalize(n,e,t);if(r===undefined){delete n[e]}else{n[e]=r}}}return t.call(e,r,n)}let h;let v;let D;let d;let g;function lex(){h="default";v="";D=false;d=1;for(;;){g=peek();const e=m[h]();if(e){return e}}}function peek(){if(i[s]){return String.fromCodePoint(i.codePointAt(s))}}function read(){const e=peek();if(e==="\n"){a++;f=0}else if(e){f+=e.length}else{f++}if(e){s+=e.length}return e}const m={default(){switch(g){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":read();return;case"/":read();h="comment";return;case undefined:read();return newToken("eof")}if(n.isSpaceSeparator(g)){read();return}return m[u]()},comment(){switch(g){case"*":read();h="multiLineComment";return;case"/":read();h="singleLineComment";return}throw invalidChar(read())},multiLineComment(){switch(g){case"*":read();h="multiLineCommentAsterisk";return;case undefined:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(g){case"*":read();return;case"/":read();h="default";return;case undefined:throw invalidChar(read())}read();h="multiLineComment"},singleLineComment(){switch(g){case"\n":case"\r":case"\u2028":case"\u2029":read();h="default";return;case undefined:read();return newToken("eof")}read()},value(){switch(g){case"{":case"[":return newToken("punctuator",read());case"n":read();literal("ull");return newToken("null",null);case"t":read();literal("rue");return newToken("boolean",true);case"f":read();literal("alse");return newToken("boolean",false);case"-":case"+":if(read()==="-"){d=-1}h="sign";return;case".":v=read();h="decimalPointLeading";return;case"0":v=read();h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":v=read();h="decimalInteger";return;case"I":read();literal("nfinity");return newToken("numeric",Infinity);case"N":read();literal("aN");return newToken("numeric",NaN);case'"':case"'":D=read()==='"';v="";h="string";return}throw invalidChar(read())},identifierNameStartEscape(){if(g!=="u"){throw invalidChar(read())}read();const e=unicodeEscape();switch(e){case"$":case"_":break;default:if(!n.isIdStartChar(e)){throw invalidIdentifier()}break}v+=e;h="identifierName"},identifierName(){switch(g){case"$":case"_":case"‌":case"‍":v+=read();return;case"\\":read();h="identifierNameEscape";return}if(n.isIdContinueChar(g)){v+=read();return}return newToken("identifier",v)},identifierNameEscape(){if(g!=="u"){throw invalidChar(read())}read();const e=unicodeEscape();switch(e){case"$":case"_":case"‌":case"‍":break;default:if(!n.isIdContinueChar(e)){throw invalidIdentifier()}break}v+=e;h="identifierName"},sign(){switch(g){case".":v=read();h="decimalPointLeading";return;case"0":v=read();h="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":v=read();h="decimalInteger";return;case"I":read();literal("nfinity");return newToken("numeric",d*Infinity);case"N":read();literal("aN");return newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(g){case".":v+=read();h="decimalPoint";return;case"e":case"E":v+=read();h="decimalExponent";return;case"x":case"X":v+=read();h="hexadecimal";return}return newToken("numeric",d*0)},decimalInteger(){switch(g){case".":v+=read();h="decimalPoint";return;case"e":case"E":v+=read();h="decimalExponent";return}if(n.isDigit(g)){v+=read();return}return newToken("numeric",d*Number(v))},decimalPointLeading(){if(n.isDigit(g)){v+=read();h="decimalFraction";return}throw invalidChar(read())},decimalPoint(){switch(g){case"e":case"E":v+=read();h="decimalExponent";return}if(n.isDigit(g)){v+=read();h="decimalFraction";return}return newToken("numeric",d*Number(v))},decimalFraction(){switch(g){case"e":case"E":v+=read();h="decimalExponent";return}if(n.isDigit(g)){v+=read();return}return newToken("numeric",d*Number(v))},decimalExponent(){switch(g){case"+":case"-":v+=read();h="decimalExponentSign";return}if(n.isDigit(g)){v+=read();h="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentSign(){if(n.isDigit(g)){v+=read();h="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentInteger(){if(n.isDigit(g)){v+=read();return}return newToken("numeric",d*Number(v))},hexadecimal(){if(n.isHexDigit(g)){v+=read();h="hexadecimalInteger";return}throw invalidChar(read())},hexadecimalInteger(){if(n.isHexDigit(g)){v+=read();return}return newToken("numeric",d*Number(v))},string(){switch(g){case"\\":read();v+=escape();return;case'"':if(D){read();return newToken("string",v)}v+=read();return;case"'":if(!D){read();return newToken("string",v)}v+=read();return;case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(g);break;case undefined:throw invalidChar(read())}v+=read()},start(){switch(g){case"{":case"[":return newToken("punctuator",read())}h="value"},beforePropertyName(){switch(g){case"$":case"_":v=read();h="identifierName";return;case"\\":read();h="identifierNameStartEscape";return;case"}":return newToken("punctuator",read());case'"':case"'":D=read()==='"';h="string";return}if(n.isIdStartChar(g)){v+=read();h="identifierName";return}throw invalidChar(read())},afterPropertyName(){if(g===":"){return newToken("punctuator",read())}throw invalidChar(read())},beforePropertyValue(){h="value"},afterPropertyValue(){switch(g){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if(g==="]"){return newToken("punctuator",read())}h="value"},afterArrayValue(){switch(g){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(e,r){return{type:e,value:r,line:a,column:f}}function literal(e){for(const r of e){const e=peek();if(e!==r){throw invalidChar(read())}read()}}function escape(){const e=peek();switch(e){case"b":read();return"\b";case"f":read();return"\f";case"n":read();return"\n";case"r":read();return"\r";case"t":read();return"\t";case"v":read();return"\v";case"0":read();if(n.isDigit(peek())){throw invalidChar(read())}return"\0";case"x":read();return hexEscape();case"u":read();return unicodeEscape();case"\n":case"\u2028":case"\u2029":read();return"";case"\r":read();if(peek()==="\n"){read()}return"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw invalidChar(read());case undefined:throw invalidChar(read())}return read()}function hexEscape(){let e="";let r=peek();if(!n.isHexDigit(r)){throw invalidChar(read())}e+=read();r=peek();if(!n.isHexDigit(r)){throw invalidChar(read())}e+=read();return String.fromCodePoint(parseInt(e,16))}function unicodeEscape(){let e="";let r=4;while(r-- >0){const r=peek();if(!n.isHexDigit(r)){throw invalidChar(read())}e+=read()}return String.fromCodePoint(parseInt(e,16))}const E={start(){if(c.type==="eof"){throw invalidEOF()}push()},beforePropertyName(){switch(c.type){case"identifier":case"string":l=c.value;u="afterPropertyName";return;case"punctuator":pop();return;case"eof":throw invalidEOF()}},afterPropertyName(){if(c.type==="eof"){throw invalidEOF()}u="beforePropertyValue"},beforePropertyValue(){if(c.type==="eof"){throw invalidEOF()}push()},beforeArrayValue(){if(c.type==="eof"){throw invalidEOF()}if(c.type==="punctuator"&&c.value==="]"){pop();return}push()},afterPropertyValue(){if(c.type==="eof"){throw invalidEOF()}switch(c.value){case",":u="beforePropertyName";return;case"}":pop()}},afterArrayValue(){if(c.type==="eof"){throw invalidEOF()}switch(c.value){case",":u="beforeArrayValue";return;case"]":pop()}},end(){}};function push(){let e;switch(c.type){case"punctuator":switch(c.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=c.value;break}if(p===undefined){p=e}else{const r=o[o.length-1];if(Array.isArray(r)){r.push(e)}else{r[l]=e}}if(e!==null&&typeof e==="object"){o.push(e);if(Array.isArray(e)){u="beforeArrayValue"}else{u="beforePropertyName"}}else{const e=o[o.length-1];if(e==null){u="end"}else if(Array.isArray(e)){u="afterArrayValue"}else{u="afterPropertyValue"}}}function pop(){o.pop();const e=o[o.length-1];if(e==null){u="end"}else if(Array.isArray(e)){u="afterArrayValue"}else{u="afterPropertyValue"}}function invalidChar(e){if(e===undefined){return syntaxError(`JSON5: invalid end of input at ${a}:${f}`)}return syntaxError(`JSON5: invalid character '${formatChar(e)}' at ${a}:${f}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${a}:${f}`)}function invalidIdentifier(){f-=5;return syntaxError(`JSON5: invalid identifier character at ${a}:${f}`)}function separatorChar(e){console.warn(`JSON5: '${formatChar(e)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(e){const r={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(r[e]){return r[e]}if(e<" "){const r=e.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return e}function syntaxError(e){const r=new SyntaxError(e);r.lineNumber=a;r.columnNumber=f;return r}},function(e,r,t){"use strict";var n=t(747);var i=t(622);var u=t(827);var o=t(784)("unified-engine:find-up");var s=t(145);e.exports=FindUp;var a=n.readFile;var f=i.resolve;var c=i.relative;var l=i.join;var p=i.dirname;FindUp.prototype.load=load;function FindUp(e){var r=this;var t=e.filePath;r.cache={};r.cwd=e.cwd;r.detect=e.detect;r.names=e.names;r.create=e.create;if(t){r.givenFilePath=f(e.cwd,t)}}function load(e,r){var t=this;var n=t.cache;var i=t.givenFilePath;var h=t.givenFile;var v=t.names;var D=t.create;var d=t.cwd;var g;if(i){if(h){apply(r,h)}else{h=[r];t.givenFile=h;o("Checking given file `%s`",i);a(i,loadGiven)}return}if(!t.detect){return r()}e=f(d,e);g=p(e);if(g in n){apply(r,n[g])}else{n[g]=[r];find(g)}function loadGiven(e,r){var n=t.givenFile;var s;if(e){s=u("Cannot read given file `%s`\n%s",c(d,i),e.stack);s.code="ENOENT";s.path=e.path;s.syscall=e.syscall}else{try{s=D(r,i);o("Read given file `%s`",i)}catch(e){s=u("Cannot parse given file `%s`\n%s",c(d,i),e.stack);o(e.message)}}h=s;t.givenFile=s;applyAll(n,s)}function find(r){var t=-1;var i=v.length;next();function next(){var u;if(++tt&&u0?"Remove":"Add")+" "+Math.abs(v)+" "+o("space",v)+" before this heading’s content";r.message(g,f(i[0]))}}if(s==="atx-closed"){h=c(i[i.length-1]);v=c(e).column-h.column-1-n;if(v){g="Remove "+v+" "+o("space",v)+" after this heading’s content";r.message(g,h)}}}}},,,,,,,,function(e,r,t){"use strict";var n=t(43);e.exports=n.DEFAULT=new n({include:[t(723)],explicit:[t(386),t(629),t(352)]})},,function(e,r,t){"use strict";var n=t(608);e.exports=n("remark-lint:no-file-name-consecutive-dashes",noFileNameConsecutiveDashes);var i="Do not use consecutive dashes in a file name";function noFileNameConsecutiveDashes(e,r){if(r.stem&&/-{2,}/.test(r.stem)){r.message(i)}}},function(e,r,t){"use strict";var n;try{var i=require;n=i("buffer").Buffer}catch(e){}var u=t(945);var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(e){if(e===null)return false;var r,t,n=0,i=e.length,u=o;for(t=0;t64)continue;if(r<0)return false;n+=6}return n%8===0}function constructYamlBinary(e){var r,t,i=e.replace(/[\r\n=]/g,""),u=i.length,s=o,a=0,f=[];for(r=0;r>16&255);f.push(a>>8&255);f.push(a&255)}a=a<<6|s.indexOf(i.charAt(r))}t=u%4*6;if(t===0){f.push(a>>16&255);f.push(a>>8&255);f.push(a&255)}else if(t===18){f.push(a>>10&255);f.push(a>>2&255)}else if(t===12){f.push(a>>4&255)}if(n){return n.from?n.from(f):new n(f)}return f}function representYamlBinary(e){var r="",t=0,n,i,u=e.length,s=o;for(n=0;n>18&63];r+=s[t>>12&63];r+=s[t>>6&63];r+=s[t&63]}t=(t<<8)+e[n]}i=u%3;if(i===0){r+=s[t>>18&63];r+=s[t>>12&63];r+=s[t>>6&63];r+=s[t&63]}else if(i===2){r+=s[t>>10&63];r+=s[t>>4&63];r+=s[t<<2&63];r+=s[64]}else if(i===1){r+=s[t>>2&63];r+=s[t<<4&63];r+=s[64];r+=s[64]}return r}function isBinary(e){return n&&n.isBuffer(e)}e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},function(e){"use strict";e.exports=function(e){if(typeof e==="number"){return e-e===0}if(typeof e==="string"&&e.trim()!==""){return Number.isFinite?Number.isFinite(+e):isFinite(+e)}return false}},,,function(e,r,t){e.exports=t(669).deprecate},,,,function(e,r,t){"use strict";var n=t(945);e.exports=new n("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})},,function(e,r,t){"use strict";var n=t(433);var i=t(940);var u=t(458);e.exports=parse;parse.Parser=u;function parse(e){var r=this.data("settings");var t=n(u);t.prototype.options=i(t.prototype.options,r,e);this.Parser=t}},,function(e,r,t){"use strict";const n=t(622);const i=t(282);const u=t(747);const o=(e,r,t)=>{if(typeof e!=="string"){throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof e}\``)}if(typeof r!=="string"){throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof r}\``)}try{e=u.realpathSync(e)}catch(r){if(r.code==="ENOENT"){e=n.resolve(e)}else if(t){return}else{throw r}}const o=n.join(e,"noop.js");const s=()=>i._resolveFilename(r,{id:o,filename:o,paths:i._nodeModulePaths(e)});if(t){try{return s()}catch(e){return}}return s()};e.exports=((e,r)=>o(e,r));e.exports.silent=((e,r)=>o(e,r,true))},function(e){"use strict";e.exports=decimal;function decimal(e){var r=typeof e==="string"?e.charCodeAt(0):e;return r>=48&&r<=57}},,function(e){"use strict";e.exports=hexadecimal;function hexadecimal(e){var r=typeof e==="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}},,function(e){"use strict";e.exports=markdownTable;var r=/\./;var t=/\.[^.]*$/;var n=" ";var i="\n";var u="-";var o=".";var s=":";var a="c";var f="l";var c="r";var l="|";var p=3;function markdownTable(e,t){var h=t||{};var v=h.delimiter;var D=h.start;var d=h.end;var g=h.align;var m=h.stringLength||lengthNoop;var E=0;var b=-1;var A=e.length;var C=[];var w;var F;var y;var S;var _;var B;var O;var k;var x;var R;var T;var I;g=g?g.concat():[];if(v===null||v===undefined){v=n+l+n}if(D===null||D===undefined){D=l+n}if(d===null||d===undefined){d=n+l}while(++bE){E=S.length}while(++BC[B]){C[B]=O}}}if(typeof g==="string"){g=pad(E,g).split("")}B=-1;while(++BC[B]){C[B]=k}}}b=-1;while(++bp?R:p}else{R=C[B]}w=g[B];x=w===c||w===""?u:s;x+=pad(R-2,u);x+=w!==f&&w!==""?s:u;F[B]=x}y.splice(1,0,F.join(v))}return D+y.join(d+i+D)+d}function stringify(e){return e===null||e===undefined?"":String(e)}function lengthNoop(e){return String(e).length}function pad(e,r){return new Array(e+1).join(r||n)}function dotindex(e){var r=t.exec(e);return r?r.index+1:e.length}},,function(e){"use strict";e.exports=trimTrailingLines;var r="\n";function trimTrailingLines(e){var t=String(e);var n=t.length;while(t.charAt(--n)===r){}return t.slice(0,n+1)}},,function(e){"use strict";var r=new Set;function emitExperimentalWarning(e){if(r.has(e))return;var t=e+" is an experimental feature. This feature could "+"change at any time";r.add(e);process.emitWarning(t,"ExperimentalWarning")}function noop(){}e.exports.emitExperimentalWarning=process.emitWarning?emitExperimentalWarning:noop},,function(e){"use strict";e.exports=factory;var r="\\";function factory(e,t){return unescape;function unescape(n){var i=0;var u=n.indexOf(r);var o=e[t];var s=[];var a;while(u!==-1){s.push(n.slice(i,u));i=u+1;a=n.charAt(i);if(!a||o.indexOf(a)===-1){s.push(r)}u=n.indexOf(r,i+1)}s.push(n.slice(i));return s.join("")}}},,,,function(e){e.exports=extend;var r=Object.prototype.hasOwnProperty;function extend(){var e={};for(var t=0;t0}function Chalk(e){if(!this||!(this instanceof Chalk)||this.template){const r={};applyOptions(r,e);r.template=function(){const e=[].slice.call(arguments);return chalkTag.apply(null,[r.template].concat(e))};Object.setPrototypeOf(r,Chalk.prototype);Object.setPrototypeOf(r.template,r);r.template.constructor=Chalk;return r.template}applyOptions(this,e)}if(s){i.blue.open=""}for(const e of Object.keys(i)){i[e].closeRe=new RegExp(n(i[e].close),"g");c[e]={get(){const r=i[e];return build.call(this,this._styles?this._styles.concat(r):[r],this._empty,e)}}}c.visible={get(){return build.call(this,this._styles||[],true,"visible")}};i.color.closeRe=new RegExp(n(i.color.close),"g");for(const e of Object.keys(i.color.ansi)){if(f.has(e)){continue}c[e]={get(){const r=this.level;return function(){const t=i.color[a[r]][e].apply(null,arguments);const n={open:t,close:i.color.close,closeRe:i.color.closeRe};return build.call(this,this._styles?this._styles.concat(n):[n],this._empty,e)}}}}i.bgColor.closeRe=new RegExp(n(i.bgColor.close),"g");for(const e of Object.keys(i.bgColor.ansi)){if(f.has(e)){continue}const r="bg"+e[0].toUpperCase()+e.slice(1);c[r]={get(){const r=this.level;return function(){const t=i.bgColor[a[r]][e].apply(null,arguments);const n={open:t,close:i.bgColor.close,closeRe:i.bgColor.closeRe};return build.call(this,this._styles?this._styles.concat(n):[n],this._empty,e)}}}}const l=Object.defineProperties(()=>{},c);function build(e,r,t){const n=function(){return applyStyle.apply(n,arguments)};n._styles=e;n._empty=r;const i=this;Object.defineProperty(n,"level",{enumerable:true,get(){return i.level},set(e){i.level=e}});Object.defineProperty(n,"enabled",{enumerable:true,get(){return i.enabled},set(e){i.enabled=e}});n.hasGrey=this.hasGrey||t==="gray"||t==="grey";n.__proto__=l;return n}function applyStyle(){const e=arguments;const r=e.length;let t=String(arguments[0]);if(r===0){return""}if(r>1){for(let n=1;ni){return false}}return check(e,n,t)&&check(e,g)}function isKnown(e,r,t){var n=a?a.indexOf(e)!==-1:true;if(!n){p.warn("Unknown rule: cannot "+r+" `'"+e+"'`",t)}return n}function getState(e){var r=e?d[e]:g;if(r&&r.length!==0){return r[r.length-1].state}if(!e){return!f}if(f){return c.indexOf(e)!==-1}return l.indexOf(e)===-1}function toggle(e,r,t){var n=t?d[t]:g;var i;var u;if(!n){n=[];d[t]=n}u=getState(t);i=r;if(i!==u){n.push({state:i,position:e})}if(!t){for(t in d){toggle(e,r,t)}}}function check(e,r,t){var n=r&&r.length;var i=-1;var u;while(--n>i){u=r[n];if(!u.position||!u.position.line||!u.position.column){continue}if(u.position.line=e){return}if(o){s.push({start:i,end:e});o=false}i=e}}},,,,function(e,r,t){"use strict";var n=t(797);e.exports=copy;var i="&";var u=/[-!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~_]/;function copy(e,r){var t=e.length;var o=r.length;var s=[];var a=0;var f=0;var c;while(f0){t=Math.min(10,Math.floor(t));a=" ".substr(0,t)}}else if(typeof t==="string"){a=t.substr(0,10)}return serializeProperty("",{"":e});function serializeProperty(e,r){let t=r[e];if(t!=null){if(typeof t.toJSON5==="function"){t=t.toJSON5(e)}else if(typeof t.toJSON==="function"){t=t.toJSON(e)}}if(s){t=s.call(r,e,t)}if(t instanceof Number){t=Number(t)}else if(t instanceof String){t=String(t)}else if(t instanceof Boolean){t=t.valueOf()}switch(t){case null:return"null";case true:return"true";case false:return"false"}if(typeof t==="string"){return quoteString(t,false)}if(typeof t==="number"){return String(t)}if(typeof t==="object"){return Array.isArray(t)?serializeArray(t):serializeObject(t)}return undefined}function quoteString(e){const r={"'":.1,'"':.2};const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let i="";for(let u=0;ur[e]=0){throw TypeError("Converting circular structure to JSON5")}i.push(e);let r=u;u=u+a;let t=o||Object.keys(e);let n=[];for(const r of t){const t=serializeProperty(r,e);if(t!==undefined){let e=serializeKey(r)+":";if(a!==""){e+=" "}e+=t;n.push(e)}}let s;if(n.length===0){s="{}"}else{let e;if(a===""){e=n.join(",");s="{"+e+"}"}else{let t=",\n"+u;e=n.join(t);s="{\n"+u+e+",\n"+r+"}"}}i.pop();u=r;return s}function serializeKey(e){if(e.length===0){return quoteString(e,true)}const r=String.fromCodePoint(e.codePointAt(0));if(!n.isIdStartChar(r)){return quoteString(e,true)}for(let t=r.length;t=0){throw TypeError("Converting circular structure to JSON5")}i.push(e);let r=u;u=u+a;let t=[];for(let r=0;r2)t=r.call(arguments,1);if(e){try{n=u.throw(e)}catch(e){return exit(e)}}if(!e){try{n=u.next(t)}catch(e){return exit(e)}}if(n.done)return exit(null,n.value);n.value=toThunk(n.value,i);if("function"==typeof n.value){var o=false;try{n.value.call(i,function(){if(o)return;o=true;next.apply(i,arguments)})}catch(e){setImmediate(function(){if(o)return;o=true;next(e)})}return}next(new TypeError("You may only yield a function, promise, generator, array, or object, "+'but the following was passed: "'+String(n.value)+'"'))}}}function toThunk(e,r){if(isGeneratorFunction(e)){return co(e.call(r))}if(isGenerator(e)){return co(e)}if(isPromise(e)){return promiseToThunk(e)}if("function"==typeof e){return e}if(isObject(e)||Array.isArray(e)){return objectToThunk.call(r,e)}return e}function objectToThunk(e){var r=this;var t=Array.isArray(e);return function(n){var i=Object.keys(e);var u=i.length;var o=t?new Array(u):new e.constructor;var s;if(!u){setImmediate(function(){n(null,o)});return}if(!t){for(var a=0;a params.length; + var result; + + if (callback) { + params.push(done); + } + + try { + result = fn.apply(null, params); + } catch (error) { + // Well, this is quite the pickle. + // `fn` received a callback and invoked it (thus continuing the pipeline), + // but later also threw an error. + // We’re not about to restart the pipeline again, so the only thing left + // to do is to throw the thing instead. + if (callback && invoked) { + throw error + } + + return done(error) + } + + if (!callback) { + if (result && typeof result.then === 'function') { + result.then(then, done); + } else if (result instanceof Error) { + done(result); + } else { + then(result); + } + } + } + + // Invoke `next`, only once. + function done() { + if (!invoked) { + invoked = true; + + callback.apply(null, arguments); + } + } + + // Invoke `done` with one value. + // Tracks if an error is passed, too. + function then(value) { + done(null, value); + } +} + +var trough_1 = trough; + +trough.wrap = wrap_1; + +var slice$1 = [].slice; + +// Create new middleware. +function trough() { + var fns = []; + var middleware = {}; + + middleware.run = run; + middleware.use = use; + + return middleware + + // Run `fns`. Last argument must be a completion handler. + function run() { + var index = -1; + var input = slice$1.call(arguments, 0, -1); + var done = arguments[arguments.length - 1]; + + if (typeof done !== 'function') { + throw new Error('Expected function as last argument, not ' + done) + } + + next.apply(null, [null].concat(input)); + + // Run the next `fn`, if any. + function next(err) { + var fn = fns[++index]; + var params = slice$1.call(arguments, 0); + var values = params.slice(1); + var length = input.length; + var pos = -1; + + if (err) { + done(err); + return + } + + // Copy non-nully input into values. + while (++pos < length) { + if (values[pos] === null || values[pos] === undefined) { + values[pos] = input[pos]; + } + } + + input = values; + + // Next or done. + if (fn) { + wrap_1(fn, next).apply(null, input); + } else { + done.apply(null, [null].concat(input)); + } + } + } + + // Add `fn` to the list. + function use(fn) { + if (typeof fn !== 'function') { + throw new Error('Expected `fn` to be a function, not ' + fn) + } + + fns.push(fn); + + return middleware + } +} + +function commonjsRequire () { + throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); +} + +function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +function getCjsExportFromNamespace (n) { + return n && n['default'] || n; +} + +function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); +} + + +function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); +} + + +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; +} + + +function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; +} + + +function repeat(string, count) { + var result = '', cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; +} + + +function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); +} + + +var isNothing_1 = isNothing; +var isObject_1 = isObject; +var toArray_1 = toArray; +var repeat_1 = repeat; +var isNegativeZero_1 = isNegativeZero; +var extend_1 = extend; + +var common = { + isNothing: isNothing_1, + isObject: isObject_1, + toArray: toArray_1, + repeat: repeat_1, + isNegativeZero: isNegativeZero_1, + extend: extend_1 +}; + +// YAML error class. http://stackoverflow.com/questions/8458984 + +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } +} + + +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ': '; + + result += this.reason || '(unknown reason)'; + + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } + + return result; +}; + + +var exception = YAMLException; + +function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; +} + + +Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + + if (!this.buffer) return null; + + indent = indent || 4; + maxLength = maxLength || 75; + + head = ''; + start = this.position; + + while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > (maxLength / 2 - 1)) { + head = ' ... '; + start += 5; + break; + } + } + + tail = ''; + end = this.position; + + while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > (maxLength / 2 - 1)) { + tail = ' ... '; + end -= 5; + break; + } + } + + snippet = this.buffer.slice(start, end); + + return common.repeat(' ', indent) + head + snippet + tail + '\n' + + common.repeat(' ', indent + this.position - start + head.length) + '^'; +}; + + +Mark.prototype.toString = function toString(compact) { + var snippet, where = ''; + + if (this.name) { + where += 'in "' + this.name + '" '; + } + + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + + if (!compact) { + snippet = this.getSnippet(); + + if (snippet) { + where += ':\n' + snippet; + } + } + + return where; +}; + + +var mark = Mark; + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +var type = Type; + +/*eslint-disable max-len*/ + + + + + + +function compileList(schema, name, result) { + var exclude = []; + + schema.include.forEach(function (includedSchema) { + result = compileList(includedSchema, name, result); + }); + + schema[name].forEach(function (currentType) { + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); + } + }); + + result.push(currentType); + }); + + return result.filter(function (type, index) { + return exclude.indexOf(index) === -1; + }); +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + + function collectType(type) { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + + this.implicit.forEach(function (type) { + if (type.loadKind && type.loadKind !== 'scalar') { + throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + }); + + this.compiledImplicit = compileList(this, 'implicit', []); + this.compiledExplicit = compileList(this, 'explicit', []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); +} + + +Schema.DEFAULT = null; + + +Schema.create = function createSchema() { + var schemas, types; + + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; + + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + + default: + throw new exception('Wrong number of arguments for Schema.create function'); + } + + schemas = common.toArray(schemas); + types = common.toArray(types); + + if (!schemas.every(function (schema) { return schema instanceof Schema; })) { + throw new exception('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); + } + + if (!types.every(function (type$1) { return type$1 instanceof type; })) { + throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + return new Schema({ + include: schemas, + explicit: types + }); +}; + + +var schema = Schema; + +var str = new type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); + +var seq = new type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); + +var map = new type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); + +var failsafe = new schema({ + explicit: [ + str, + seq, + map + ] +}); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +var _null = new type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; } + }, + defaultStyle: 'lowercase' +}); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +var bool = new type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 8 + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 10 (except 0) or base 60 + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch === ':') break; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + // if !base60 - done; + if (ch !== ':') return true; + + // base60 almost not used, no needs to optimize + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + + if (value.indexOf(':') !== -1) { + value.split(':').forEach(function (v) { + digits.unshift(parseInt(v, 10)); + }); + + value = 0; + base = 1; + + digits.forEach(function (d) { + value += (d * base); + base *= 60; + }); + + return sign * value; + + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +var int_1 = new type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // 20:59 + '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign, base, digits; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + digits = []; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + + } else if (value.indexOf(':') >= 0) { + value.split(':').forEach(function (v) { + digits.unshift(parseFloat(v, 10)); + }); + + value = 0.0; + base = 1; + + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); + + return sign * value; + + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +var float_1 = new type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); + +var json = new schema({ + include: [ + failsafe + ], + implicit: [ + _null, + bool, + int_1, + float_1 + ] +}); + +var core = new schema({ + include: [ + json + ] +}); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +var timestamp = new type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +var merge = new type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); + +/*eslint-disable no-bitwise*/ + +var NodeBuffer; + +try { + // A trick for browserified version, to not include `Buffer` shim + var _require = commonjsRequire; + NodeBuffer = _require('buffer').Buffer; +} catch (__) {} + + + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + // Wrap into Buffer for NodeJS and leave Array for browser + if (NodeBuffer) { + // Support node 6.+ Buffer API when available + return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + } + + return result; +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); +} + +var binary = new type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +var omap = new type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); + +var _toString$1 = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString$1.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +var pairs = new type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); + +var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty$1.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +var set = new type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); + +var default_safe = new schema({ + include: [ + core + ], + implicit: [ + timestamp, + merge + ], + explicit: [ + binary, + omap, + pairs, + set + ] +}); + +function resolveJavascriptUndefined() { + return true; +} + +function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; +} + +function representJavascriptUndefined() { + return ''; +} + +function isUndefined(object) { + return typeof object === 'undefined'; +} + +var _undefined = new type('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined +}); + +function resolveJavascriptRegExp(data) { + if (data === null) return false; + if (data.length === 0) return false; + + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // if regexp starts with '/' it can have modifiers and must be properly closed + // `/foo/gim` - modifiers tail can be maximum 3 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + + if (modifiers.length > 3) return false; + // if expression starts with /, is should be properly terminated + if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; + } + + return true; +} + +function constructJavascriptRegExp(data) { + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // `/foo/gim` - tail can be maximum 4 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + + return new RegExp(regexp, modifiers); +} + +function representJavascriptRegExp(object /*, style*/) { + var result = '/' + object.source + '/'; + + if (object.global) result += 'g'; + if (object.multiline) result += 'm'; + if (object.ignoreCase) result += 'i'; + + return result; +} + +function isRegExp(object) { + return Object.prototype.toString.call(object) === '[object RegExp]'; +} + +var regexp = new type('tag:yaml.org,2002:js/regexp', { + kind: 'scalar', + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp +}); + +var esprima; + +// Browserified version does not have esprima +// +// 1. For node.js just require module as deps +// 2. For browser try to require mudule via external AMD system. +// If not found - try to fallback to window.esprima. If not +// found too - then fail to parse. +// +try { + // workaround to exclude package from browserify list. + var _require$1 = commonjsRequire; + esprima = _require$1('esprima'); +} catch (_) { + /*global window */ + if (typeof window !== 'undefined') esprima = window.esprima; +} + + + +function resolveJavascriptFunction(data) { + if (data === null) return false; + + try { + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }); + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + (ast.body[0].expression.type !== 'ArrowFunctionExpression' && + ast.body[0].expression.type !== 'FunctionExpression')) { + return false; + } + + return true; + } catch (err) { + return false; + } +} + +function constructJavascriptFunction(data) { + /*jslint evil:true*/ + + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }), + params = [], + body; + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + (ast.body[0].expression.type !== 'ArrowFunctionExpression' && + ast.body[0].expression.type !== 'FunctionExpression')) { + throw new Error('Failed to resolve function'); + } + + ast.body[0].expression.params.forEach(function (param) { + params.push(param.name); + }); + + body = ast.body[0].expression.body.range; + + // Esprima's ranges include the first '{' and the last '}' characters on + // function expressions. So cut them out. + if (ast.body[0].expression.body.type === 'BlockStatement') { + /*eslint-disable no-new-func*/ + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); + } + // ES6 arrow functions can omit the BlockStatement. In that case, just return + // the body. + /*eslint-disable no-new-func*/ + return new Function(params, 'return ' + source.slice(body[0], body[1])); +} + +function representJavascriptFunction(object /*, style*/) { + return object.toString(); +} + +function isFunction(object) { + return Object.prototype.toString.call(object) === '[object Function]'; +} + +var _function = new type('tag:yaml.org,2002:js/function', { + kind: 'scalar', + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction +}); + +var default_full = schema.DEFAULT = new schema({ + include: [ + default_safe + ], + explicit: [ + _undefined, + regexp, + _function + ] +}); + +/*eslint-disable max-len,no-use-before-define*/ + + + + + + + + +var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function _class(obj) { return Object.prototype.toString.call(obj); } + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || default_full; + this.onWarning = options['onWarning'] || null; + this.legacy = options['legacy'] || false; + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + return new exception( + message, + new mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty$2.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty$2.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty$2.call(overridableKeys, keyNode) && + _hasOwnProperty$2.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = {}, + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _pos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = {}, + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + _pos = state.position; + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else { + break; // Reading is done. Go to the epilogue. + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if (state.lineIndent > nodeIndent && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty$2.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag !== null && state.tag !== '!') { + if (state.tag === '?') { + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only assigned to plain scalars. So, it isn't + // needed to check for 'kind' conformity. + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty$2.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty$2.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll(input, iterator, options) { + var documents = loadDocuments(input, options), index, length; + + if (typeof iterator !== 'function') { + return documents; + } + + for (index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new exception('expected a single document in the stream, but found more'); +} + + +function safeLoadAll(input, output, options) { + if (typeof output === 'function') { + loadAll(input, output, common.extend({ schema: default_safe }, options)); + } else { + return loadAll(input, common.extend({ schema: default_safe }, options)); + } +} + + +function safeLoad(input, options) { + return load(input, common.extend({ schema: default_safe }, options)); +} + + +var loadAll_1 = loadAll; +var load_1 = load; +var safeLoadAll_1 = safeLoadAll; +var safeLoad_1 = safeLoad; + +var loader = { + loadAll: loadAll_1, + load: load_1, + safeLoadAll: safeLoadAll_1, + safeLoad: safeLoad_1 +}; + +/*eslint-disable no-use-before-define*/ + + + + + + +var _toString$2 = Object.prototype.toString; +var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; + +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty$3.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new exception('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + +function State$1(options) { + this.schema = options['schema'] || default_full; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// Simplified test for values allowed after the first character in plain style. +function isPlainSafe(c) { + // Uses a subset of nb-char - c-flow-indicator - ":" - "#" + // where nb-char ::= c-printable - b-char - c-byte-order-mark. + return isPrintable(c) && c !== 0xFEFF + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // - ":" - "#" + && c !== CHAR_COLON + && c !== CHAR_SHARP; +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + return isPrintable(c) && c !== 0xFEFF + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +// Determines whether block indentation indicator is required. +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(string.charCodeAt(0)) + && !isWhitespace(string.charCodeAt(string.length - 1)); + + if (singleLineOnly) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + return plain && !testAmbiguousType(string) + ? STYLE_PLAIN : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey) { + state.dump = (function () { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && + DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string) + '"'; + default: + throw new exception('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char, nextChar; + var escapeSeq; + + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). + if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { + // Combine the surrogate pair and store it escaped. + result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); + // Advance index one extra since we already used that char here. + i++; continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) + ? string[i] + : escapeSeq || encodeHex(char); + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = state.condenseFlow ? '"' : ''; + + if (index !== 0) pairBuffer += ', '; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new exception('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + state.tag = explicit ? type.tag : '?'; + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString$2.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty$3.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString$2.call(state.dump); + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level; + if (block && (state.dump.length !== 0)) { + writeBlockSequence(state, arrayLevel, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, arrayLevel, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) return false; + throw new exception('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + state.dump = '!<' + state.tag + '> ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump(input, options) { + options = options || {}; + + var state = new State$1(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; + + return ''; +} + +function safeDump(input, options) { + return dump(input, common.extend({ schema: default_safe }, options)); +} + +var dump_1 = dump; +var safeDump_1 = safeDump; + +var dumper = { + dump: dump_1, + safeDump: safeDump_1 +}; + +function deprecated(name) { + return function () { + throw new Error('Function ' + name + ' is deprecated and cannot be used.'); + }; +} + + +var Type$1 = type; +var Schema$1 = schema; +var FAILSAFE_SCHEMA = failsafe; +var JSON_SCHEMA = json; +var CORE_SCHEMA = core; +var DEFAULT_SAFE_SCHEMA = default_safe; +var DEFAULT_FULL_SCHEMA = default_full; +var load$1 = loader.load; +var loadAll$1 = loader.loadAll; +var safeLoad$1 = loader.safeLoad; +var safeLoadAll$1 = loader.safeLoadAll; +var dump$1 = dumper.dump; +var safeDump$1 = dumper.safeDump; +var YAMLException$1 = exception; + +// Deprecated schema names from JS-YAML 2.0.x +var MINIMAL_SCHEMA = failsafe; +var SAFE_SCHEMA = default_safe; +var DEFAULT_SCHEMA = default_full; + +// Deprecated functions from JS-YAML 1.x.x +var scan = deprecated('scan'); +var parse = deprecated('parse'); +var compose = deprecated('compose'); +var addConstructor = deprecated('addConstructor'); + +var jsYaml = { + Type: Type$1, + Schema: Schema$1, + FAILSAFE_SCHEMA: FAILSAFE_SCHEMA, + JSON_SCHEMA: JSON_SCHEMA, + CORE_SCHEMA: CORE_SCHEMA, + DEFAULT_SAFE_SCHEMA: DEFAULT_SAFE_SCHEMA, + DEFAULT_FULL_SCHEMA: DEFAULT_FULL_SCHEMA, + load: load$1, + loadAll: loadAll$1, + safeLoad: safeLoad$1, + safeLoadAll: safeLoadAll$1, + dump: dump$1, + safeDump: safeDump$1, + YAMLException: YAMLException$1, + MINIMAL_SCHEMA: MINIMAL_SCHEMA, + SAFE_SCHEMA: SAFE_SCHEMA, + DEFAULT_SCHEMA: DEFAULT_SCHEMA, + scan: scan, + parse: parse, + compose: compose, + addConstructor: addConstructor +}; + +var jsYaml$1 = jsYaml; + +var isArrayish = function isArrayish(obj) { + if (!obj) { + return false; + } + + return obj instanceof Array || Array.isArray(obj) || + (obj.length >= 0 && obj.splice instanceof Function); +}; + +var errorEx = function errorEx(name, properties) { + if (!name || name.constructor !== String) { + properties = name || {}; + name = Error.name; + } + + var errorExError = function ErrorEXError(message) { + if (!this) { + return new ErrorEXError(message); + } + + message = message instanceof Error + ? message.message + : (message || this.message); + + Error.call(this, message); + Error.captureStackTrace(this, errorExError); + + this.name = name; + + Object.defineProperty(this, 'message', { + configurable: true, + enumerable: false, + get: function () { + var newMessage = message.split(/\r?\n/g); + + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('message' in modifier) { + newMessage = modifier.message(this[key], newMessage) || newMessage; + if (!isArrayish(newMessage)) { + newMessage = [newMessage]; + } + } + } + + return newMessage.join('\n'); + }, + set: function (v) { + message = v; + } + }); + + var overwrittenStack = null; + + var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; + + stackDescriptor.set = function (newstack) { + overwrittenStack = newstack; + }; + + stackDescriptor.get = function () { + var stack = (overwrittenStack || ((stackGetter) + ? stackGetter.call(this) + : stackValue)).split(/\r?\n+/g); + + // starting in Node 7, the stack builder caches the message. + // just replace it. + if (!overwrittenStack) { + stack[0] = this.name + ': ' + this.message; + } + + var lineCount = 1; + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('line' in modifier) { + var line = modifier.line(this[key]); + if (line) { + stack.splice(lineCount++, 0, ' ' + line); + } + } + + if ('stack' in modifier) { + modifier.stack(this[key], stack); + } + } + + return stack.join('\n'); + }; + + Object.defineProperty(this, 'stack', stackDescriptor); + }; + + if (Object.setPrototypeOf) { + Object.setPrototypeOf(errorExError.prototype, Error.prototype); + Object.setPrototypeOf(errorExError, Error); + } else { + util$1.inherits(errorExError, Error); + } + + return errorExError; +}; + +errorEx.append = function (str, def) { + return { + message: function (v, message) { + v = v || def; + + if (v) { + message[0] += ' ' + str.replace('%s', v.toString()); + } + + return message; + } + }; +}; + +errorEx.line = function (str, def) { + return { + line: function (v) { + v = v || def; + + if (v) { + return str.replace('%s', v.toString()); + } + + return null; + } + }; +}; + +var errorEx_1 = errorEx; + +var jsonParseBetterErrors = parseJson; +function parseJson (txt, reviver, context) { + context = context || 20; + try { + return JSON.parse(txt, reviver) + } catch (e) { + if (typeof txt !== 'string') { + const isEmptyArray = Array.isArray(txt) && txt.length === 0; + const errorMessage = 'Cannot parse ' + + (isEmptyArray ? 'an empty array' : String(txt)); + throw new TypeError(errorMessage) + } + const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i); + const errIdx = syntaxErr + ? +syntaxErr[1] + : e.message.match(/^Unexpected end of JSON.*/i) + ? txt.length - 1 + : null; + if (errIdx != null) { + const start = errIdx <= context + ? 0 + : errIdx - context; + const end = errIdx + context >= txt.length + ? txt.length + : errIdx + context; + e.message += ` while parsing near '${ + start === 0 ? '' : '...' + }${txt.slice(start, end)}${ + end === txt.length ? '' : '...' + }'`; + } else { + e.message += ` while parsing '${txt.slice(0, context * 2)}'`; + } + throw e + } +} + +const JSONError = errorEx_1('JSONError', { + fileName: errorEx_1.append('in %s') +}); + +var parseJson$1 = (input, reviver, filename) => { + if (typeof reviver === 'string') { + filename = reviver; + reviver = null; + } + + try { + try { + return JSON.parse(input, reviver); + } catch (err) { + jsonParseBetterErrors(input, reviver); + + throw err; + } + } catch (err) { + err.message = err.message.replace(/\n/g, ''); + + const jsonErr = new JSONError(err); + if (filename) { + jsonErr.fileName = filename; + } + + throw jsonErr; + } +}; + +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +var ms = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse$1(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse$1(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = ms; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * Active `debug` instances. + */ + createDebug.instances = []; + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return match; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = createDebug.enabled(namespace); + debug.useColors = createDebug.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + debug.extend = extend; + // Debug.formatArgs = formatArgs; + // debug.rawLog = rawLog; + + // env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + createDebug.instances.push(debug); + + return debug; + } + + function destroy() { + const index = createDebug.instances.indexOf(this); + if (index !== -1) { + createDebug.instances.splice(index, 1); + return true; + } + return false; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + + for (i = 0; i < createDebug.instances.length; i++) { + const instance = createDebug.instances[i]; + instance.enabled = createDebug.enabled(instance.namespace); + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +var common$1 = setup; + +var browser = createCommonjsModule(function (module, exports) { +/* eslint-env browser */ + +/** + * This is the web browser implementation of `debug()`. + */ + +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ +function log(...args) { + // This hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return typeof console === 'object' && + console.log && + console.log(...args); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +module.exports = common$1(exports); + +const {formatters} = module.exports; + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; +}); +var browser_1 = browser.log; +var browser_2 = browser.formatArgs; +var browser_3 = browser.save; +var browser_4 = browser.load; +var browser_5 = browser.useColors; +var browser_6 = browser.storage; +var browser_7 = browser.colors; + +var hasFlag = (flag, argv) => { + argv = argv || process.argv; + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const pos = argv.indexOf(prefix + flag); + const terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; + +const env = process.env; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = true; +} +if ('FORCE_COLOR' in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + + const min = forceColor ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(process.versions.node.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); +} + +var supportsColor_1 = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; + +var node = createCommonjsModule(function (module, exports) { +/** + * Module dependencies. + */ + + + + +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = supportsColor_1; + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + +/** + * Invokes `util.format()` with the specified arguments and writes to stderr. + */ + +function log(...args) { + return process.stderr.write(util$1.format(...args) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = common$1(exports); + +const {formatters} = module.exports; + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util$1.inspect(v, this.inspectOpts) + .replace(/\s*\n\s*/g, ' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util$1.inspect(v, this.inspectOpts); +}; +}); +var node_1 = node.init; +var node_2 = node.log; +var node_3 = node.formatArgs; +var node_4 = node.save; +var node_5 = node.load; +var node_6 = node.useColors; +var node_7 = node.colors; +var node_8 = node.inspectOpts; + +var src = createCommonjsModule(function (module) { +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = browser; +} else { + module.exports = node; +} +}); + +const resolveFrom = (fromDirectory, moduleId, silent) => { + if (typeof fromDirectory !== 'string') { + throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDirectory}\``); + } + + if (typeof moduleId !== 'string') { + throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``); + } + + try { + fromDirectory = fs$1.realpathSync(fromDirectory); + } catch (error) { + if (error.code === 'ENOENT') { + fromDirectory = path$1.resolve(fromDirectory); + } else if (silent) { + return; + } else { + throw error; + } + } + + const fromFile = path$1.join(fromDirectory, 'noop.js'); + + const resolveFileName = () => module$1._resolveFilename(moduleId, { + id: fromFile, + filename: fromFile, + paths: module$1._nodeModulePaths(fromDirectory) + }); + + if (silent) { + try { + return resolveFileName(); + } catch (error) { + return; + } + } + + return resolveFileName(); +}; + +var resolveFrom_1 = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleId); +var silent = (fromDirectory, moduleId) => resolveFrom(fromDirectory, moduleId, true); +resolveFrom_1.silent = silent; + +var ini = createCommonjsModule(function (module, exports) { +exports.parse = exports.decode = decode; + +exports.stringify = exports.encode = encode; + +exports.safe = safe; +exports.unsafe = unsafe; + +var eol = typeof process !== 'undefined' && + process.platform === 'win32' ? '\r\n' : '\n'; + +function encode (obj, opt) { + var children = []; + var out = ''; + + if (typeof opt === 'string') { + opt = { + section: opt, + whitespace: false + }; + } else { + opt = opt || {}; + opt.whitespace = opt.whitespace === true; + } + + var separator = opt.whitespace ? ' = ' : '='; + + Object.keys(obj).forEach(function (k, _, __) { + var val = obj[k]; + if (val && Array.isArray(val)) { + val.forEach(function (item) { + out += safe(k + '[]') + separator + safe(item) + '\n'; + }); + } else if (val && typeof val === 'object') { + children.push(k); + } else { + out += safe(k) + separator + safe(val) + eol; + } + }); + + if (opt.section && out.length) { + out = '[' + safe(opt.section) + ']' + eol + out; + } + + children.forEach(function (k, _, __) { + var nk = dotSplit(k).join('\\.'); + var section = (opt.section ? opt.section + '.' : '') + nk; + var child = encode(obj[k], { + section: section, + whitespace: opt.whitespace + }); + if (out.length && child.length) { + out += eol; + } + out += child; + }); + + return out +} + +function dotSplit (str) { + return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') + .replace(/\\\./g, '\u0001') + .split(/\./).map(function (part) { + return part.replace(/\1/g, '\\.') + .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001') + }) +} + +function decode (str) { + var out = {}; + var p = out; + var section = null; + // section |key = value + var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i; + var lines = str.split(/[\r\n]+/g); + + lines.forEach(function (line, _, __) { + if (!line || line.match(/^\s*[;#]/)) return + var match = line.match(re); + if (!match) return + if (match[1] !== undefined) { + section = unsafe(match[1]); + p = out[section] = out[section] || {}; + return + } + var key = unsafe(match[2]); + var value = match[3] ? unsafe(match[4]) : true; + switch (value) { + case 'true': + case 'false': + case 'null': value = JSON.parse(value); + } + + // Convert keys with '[]' suffix to an array + if (key.length > 2 && key.slice(-2) === '[]') { + key = key.substring(0, key.length - 2); + if (!p[key]) { + p[key] = []; + } else if (!Array.isArray(p[key])) { + p[key] = [p[key]]; + } + } + + // safeguard against resetting a previously defined + // array by accidentally forgetting the brackets + if (Array.isArray(p[key])) { + p[key].push(value); + } else { + p[key] = value; + } + }); + + // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} + // use a filter to return the keys that have to be deleted. + Object.keys(out).filter(function (k, _, __) { + if (!out[k] || + typeof out[k] !== 'object' || + Array.isArray(out[k])) { + return false + } + // see if the parent section is also an object. + // if so, add it to that, and mark this one for deletion + var parts = dotSplit(k); + var p = out; + var l = parts.pop(); + var nl = l.replace(/\\\./g, '.'); + parts.forEach(function (part, _, __) { + if (!p[part] || typeof p[part] !== 'object') p[part] = {}; + p = p[part]; + }); + if (p === out && nl === l) { + return false + } + p[nl] = out[k]; + return true + }).forEach(function (del, _, __) { + delete out[del]; + }); + + return out +} + +function isQuoted (val) { + return (val.charAt(0) === '"' && val.slice(-1) === '"') || + (val.charAt(0) === "'" && val.slice(-1) === "'") +} + +function safe (val) { + return (typeof val !== 'string' || + val.match(/[=\r\n]/) || + val.match(/^\[/) || + (val.length > 1 && + isQuoted(val)) || + val !== val.trim()) + ? JSON.stringify(val) + : val.replace(/;/g, '\\;').replace(/#/g, '\\#') +} + +function unsafe (val, doUnesc) { + val = (val || '').trim(); + if (isQuoted(val)) { + // remove the single quotes before calling JSON.parse + if (val.charAt(0) === "'") { + val = val.substr(1, val.length - 2); + } + try { val = JSON.parse(val); } catch (_) {} + } else { + // walk the val to find the first not-escaped ; character + var esc = false; + var unesc = ''; + for (var i = 0, l = val.length; i < l; i++) { + var c = val.charAt(i); + if (esc) { + if ('\\;#'.indexOf(c) !== -1) { + unesc += c; + } else { + unesc += '\\' + c; + } + esc = false; + } else if (';#'.indexOf(c) !== -1) { + break + } else if (c === '\\') { + esc = true; + } else { + unesc += c; + } + } + if (esc) { + unesc += '\\'; + } + return unesc.trim() + } + return val +} +}); +var ini_1 = ini.parse; +var ini_2 = ini.decode; +var ini_3 = ini.stringify; +var ini_4 = ini.encode; +var ini_5 = ini.safe; +var ini_6 = ini.unsafe; + +var singleComment = 1; +var multiComment = 2; + +function stripWithoutWhitespace() { + return ''; +} + +function stripWithWhitespace(str, start, end) { + return str.slice(start, end).replace(/\S/g, ' '); +} + +var stripJsonComments = function (str, opts) { + opts = opts || {}; + + var currentChar; + var nextChar; + var insideString = false; + var insideComment = false; + var offset = 0; + var ret = ''; + var strip = opts.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; + + for (var i = 0; i < str.length; i++) { + currentChar = str[i]; + nextChar = str[i + 1]; + + if (!insideComment && currentChar === '"') { + var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\'; + if (!escaped) { + insideString = !insideString; + } + } + + if (insideString) { + continue; + } + + if (!insideComment && currentChar + nextChar === '//') { + ret += str.slice(offset, i); + offset = i; + insideComment = singleComment; + i++; + } else if (insideComment === singleComment && currentChar + nextChar === '\r\n') { + i++; + insideComment = false; + ret += strip(str, offset, i); + offset = i; + continue; + } else if (insideComment === singleComment && currentChar === '\n') { + insideComment = false; + ret += strip(str, offset, i); + offset = i; + } else if (!insideComment && currentChar + nextChar === '/*') { + ret += str.slice(offset, i); + offset = i; + insideComment = multiComment; + i++; + continue; + } else if (insideComment === multiComment && currentChar + nextChar === '*/') { + i++; + insideComment = false; + ret += strip(str, offset, i + 1); + offset = i + 1; + continue; + } + } + + return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset)); +}; + +var utils = createCommonjsModule(function (module, exports) { + + + + + +var parse = exports.parse = function (content) { + + //if it ends in .json or starts with { then it must be json. + //must be done this way, because ini accepts everything. + //can't just try and parse it and let it throw if it's not ini. + //everything is ini. even json with a syntax error. + + if(/^\s*{/.test(content)) + return JSON.parse(stripJsonComments(content)) + return ini.parse(content) + +}; + +var file = exports.file = function () { + var args = [].slice.call(arguments).filter(function (arg) { return arg != null }); + + //path.join breaks if it's a not a string, so just skip this. + for(var i in args) + if('string' !== typeof args[i]) + return + + var file = path$1.join.apply(null, args); + try { + return fs$1.readFileSync(file,'utf-8') + } catch (err) { + return + } +}; + +var json = exports.json = function () { + var content = file.apply(null, arguments); + return content ? parse(content) : null +}; + +var env = exports.env = function (prefix, env) { + env = env || process.env; + var obj = {}; + var l = prefix.length; + for(var k in env) { + if(k.toLowerCase().indexOf(prefix.toLowerCase()) === 0) { + + var keypath = k.substring(l).split('__'); + + // Trim empty strings from keypath array + var _emptyStringIndex; + while ((_emptyStringIndex=keypath.indexOf('')) > -1) { + keypath.splice(_emptyStringIndex, 1); + } + + var cursor = obj; + keypath.forEach(function _buildSubObj(_subkey,i){ + + // (check for _subkey first so we ignore empty strings) + // (check for cursor to avoid assignment to primitive objects) + if (!_subkey || typeof cursor !== 'object') + return + + // If this is the last key, just stuff the value in there + // Assigns actual value from env variable to final key + // (unless it's just an empty string- in that case use the last valid key) + if (i === keypath.length-1) + cursor[_subkey] = env[k]; + + + // Build sub-object if nothing already exists at the keypath + if (cursor[_subkey] === undefined) + cursor[_subkey] = {}; + + // Increment cursor used to track the object at the current depth + cursor = cursor[_subkey]; + + }); + + } + + } + + return obj +}; + +var find = exports.find = function () { + var rel = path$1.join.apply(null, [].slice.call(arguments)); + + function find(start, rel) { + var file = path$1.join(start, rel); + try { + fs$1.statSync(file); + return file + } catch (err) { + if(path$1.dirname(start) !== start) // root + return find(path$1.dirname(start), rel) + } + } + return find(process.cwd(), rel) +}; +}); +var utils_1 = utils.parse; +var utils_2 = utils.file; +var utils_3 = utils.json; +var utils_4 = utils.env; +var utils_5 = utils.find; + +var deepExtend_1 = createCommonjsModule(function (module) { + +function isSpecificValue(val) { + return ( + val instanceof Buffer + || val instanceof Date + || val instanceof RegExp + ) ? true : false; +} + +function cloneSpecificValue(val) { + if (val instanceof Buffer) { + var x = Buffer.alloc + ? Buffer.alloc(val.length) + : new Buffer(val.length); + val.copy(x); + return x; + } else if (val instanceof Date) { + return new Date(val.getTime()); + } else if (val instanceof RegExp) { + return new RegExp(val); + } else { + throw new Error('Unexpected situation'); + } +} + +/** + * Recursive cloning array. + */ +function deepCloneArray(arr) { + var clone = []; + arr.forEach(function (item, index) { + if (typeof item === 'object' && item !== null) { + if (Array.isArray(item)) { + clone[index] = deepCloneArray(item); + } else if (isSpecificValue(item)) { + clone[index] = cloneSpecificValue(item); + } else { + clone[index] = deepExtend({}, item); + } + } else { + clone[index] = item; + } + }); + return clone; +} + +function safeGetProperty(object, property) { + return property === '__proto__' ? undefined : object[property]; +} + +/** + * Extening object that entered in first argument. + * + * Returns extended object or false if have no target object or incorrect type. + * + * If you wish to clone source object (without modify it), just use empty new + * object as first argument, like this: + * deepExtend({}, yourObj_1, [yourObj_N]); + */ +var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) { + if (arguments.length < 1 || typeof arguments[0] !== 'object') { + return false; + } + + if (arguments.length < 2) { + return arguments[0]; + } + + var target = arguments[0]; + + // convert arguments to array and cut off target object + var args = Array.prototype.slice.call(arguments, 1); + + var val, src; + + args.forEach(function (obj) { + // skip argument if isn't an object, is null, or is an array + if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) { + return; + } + + Object.keys(obj).forEach(function (key) { + src = safeGetProperty(target, key); // source value + val = safeGetProperty(obj, key); // new value + + // recursion prevention + if (val === target) { + return; + + /** + * if new value isn't object then just overwrite by new value + * instead of extending. + */ + } else if (typeof val !== 'object' || val === null) { + target[key] = val; + return; + + // just clone arrays (and recursive clone objects inside) + } else if (Array.isArray(val)) { + target[key] = deepCloneArray(val); + return; + + // custom cloning and overwrite for specific objects + } else if (isSpecificValue(val)) { + target[key] = cloneSpecificValue(val); + return; + + // overwrite by new value if source isn't object or array + } else if (typeof src !== 'object' || src === null || Array.isArray(src)) { + target[key] = deepExtend({}, val); + return; + + // source value and new value is objects both, extending... + } else { + target[key] = deepExtend(src, val); + return; + } + }); + }); + + return target; +}; +}); + +var minimist = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {}, unknownFn: null }; + + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } + + if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { + flags.allBools = true; + } else { + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + if (aliases[key]) { + flags.strings[aliases[key]] = true; + } + }); + + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } + + function argDefined(key, arg) { + return (flags.allBools && /^--[^=]+$/.test(arg)) || + flags.strings[key] || flags.bools[key] || aliases[key]; + } + + function setArg (key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } + + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } + } + + function aliasIsBoolean(key) { + return aliases[key].some(function (x) { + return flags.bools[x]; + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + var key = m[1]; + var value = m[2]; + if (flags.bools[key]) { + value = value !== 'false'; + } + setArg(key, value, arg); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false, arg); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && !flags.allBools + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, next, arg); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next, arg); + continue; + } + + if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { + setArg(letters[j], next.split('=')[1], arg); + broken = true; + break; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next, arg); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2), arg); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, args[i+1], arg); + i++; + } + else if (args[i+1] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + } + else { + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + if (opts['--']) { + argv['--'] = new Array(); + notFlags.forEach(function(key) { + argv['--'].push(key); + }); + } + else { + notFlags.forEach(function(key) { + argv._.push(key); + }); + } + + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + +var join = path$1.join; + +var etc = '/etc'; +var win = process.platform === "win32"; +var home = win + ? process.env.USERPROFILE + : process.env.HOME; + +var rc = function (name, defaults, argv, parse) { + if('string' !== typeof name) + throw new Error('rc(name): name *must* be string') + if(!argv) + argv = minimist(process.argv.slice(2)); + defaults = ( + 'string' === typeof defaults + ? utils.json(defaults) : defaults + ) || {}; + + parse = parse || utils.parse; + + var env = utils.env(name + '_'); + + var configs = [defaults]; + var configFiles = []; + function addConfigFile (file) { + if (configFiles.indexOf(file) >= 0) return + var fileConfig = utils.file(file); + if (fileConfig) { + configs.push(parse(fileConfig)); + configFiles.push(file); + } + } + + // which files do we look at? + if (!win) + [join(etc, name, 'config'), + join(etc, name + 'rc')].forEach(addConfigFile); + if (home) + [join(home, '.config', name, 'config'), + join(home, '.config', name), + join(home, '.' + name, 'config'), + join(home, '.' + name + 'rc')].forEach(addConfigFile); + addConfigFile(utils.find('.'+name+'rc')); + if (env.config) addConfigFile(env.config); + if (argv.config) addConfigFile(argv.config); + + return deepExtend_1.apply(null, configs.concat([ + env, + argv, + configFiles.length ? {configs: configFiles, config: configFiles[configFiles.length - 1]} : undefined, + ])) +}; + +function homedir() { + var env = process.env; + var home = env.HOME; + var user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME; + + if (process.platform === 'win32') { + return env.USERPROFILE || env.HOMEDRIVE + env.HOMEPATH || home || null; + } + + if (process.platform === 'darwin') { + return home || (user ? '/Users/' + user : null); + } + + if (process.platform === 'linux') { + return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); + } + + return home || null; +} + +var osHomedir = typeof os.homedir === 'function' ? os.homedir : homedir; + +var home$1 = osHomedir(); + +var untildify = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return home$1 ? str.replace(/^~($|\/|\\)/, home$1 + '$1') : str; +}; + +var shellsubstitute = function (s, vars) { + return s.replace(/(\\*)(\$([_a-z0-9]+)|\${([_a-z0-9]+)})/ig, function (_, escape, varExpression, variable, bracedVariable) { + if (!(escape.length % 2)) { + return escape.substring(Math.ceil(escape.length / 2)) + (vars[variable || bracedVariable] || ''); + } else { + return escape.substring(1) + varExpression; + } + }); +}; + +var npmPrefix = function () { + var rcPrefix = rc('npm', null, []).prefix; + + if (rcPrefix) { + return untildify(shellsubstitute(rcPrefix, process.env)); + } + else if (process.platform == 'win32') { + return path$1.dirname(process.execPath); + } + else { + return path$1.resolve(process.execPath, '../..'); + } +}; + +var resolve = resolveFrom_1.silent; +var npmPrefix$1 = npmPrefix(); + +var loadPlugin_1 = loadPlugin; +loadPlugin.resolve = resolvePlugin; + +var electron = process.versions.electron !== undefined; +var argv = process.argv[1] || /* istanbul ignore next */ ''; +var nvm = process.env.NVM_BIN; +var globally = electron || argv.indexOf(npmPrefix$1) === 0; +var windows = process.platform === 'win32'; +var prefix = windows ? /* istanbul ignore next */ '' : 'lib'; +var globals = path$1.resolve(npmPrefix$1, prefix, 'node_modules'); + +// If we’re in Electron, we’re running in a modified Node that cannot really +// install global node modules. To find the actual modules, the user has to +// either set `prefix` in their `.npmrc` (which is picked up by `npm-prefix`). +// Most people don’t do that, and some use NVM instead to manage different +// versions of Node. Luckily NVM leaks some environment variables that we can +// pick up on to try and detect the actual modules. +/* istanbul ignore next */ +if (electron && nvm && !fs$1.existsSync(globals)) { + globals = path$1.resolve(nvm, '..', prefix, 'node_modules'); +} + +// Load the plug-in found using `resolvePlugin`. +function loadPlugin(name, options) { + return commonjsRequire(resolvePlugin(name, options) || name) +} + +// Find a plugin. +// +// See also: +// +// +// +// Uses the standard node module loading strategy to find $name in each given +// `cwd` (and optionally the global `node_modules` directory). +// +// If a prefix is given and $name is not a path, `$prefix-$name` is also +// searched (preferring these over non-prefixed modules). +function resolvePlugin(name, options) { + var settings = options || {}; + var prefix = settings.prefix; + var cwd = settings.cwd; + var global = settings.global; + var filePath; + var sources; + var length; + var index; + var plugin; + var slash; + var scope = ''; + + if (global === null || global === undefined) { + global = globally; + } + + if (cwd && typeof cwd === 'object') { + sources = cwd.concat(); + } else { + sources = [cwd || process.cwd()]; + } + + // Non-path. + if (name.charAt(0) !== '.') { + if (global) { + sources.push(globals); + } + + // Unprefix module. + if (prefix) { + prefix = prefix.charAt(prefix.length - 1) === '-' ? prefix : prefix + '-'; + + // Scope? + if (name.charAt(0) === '@') { + slash = name.indexOf('/'); + + // Let’s keep the algorithm simple. No need to care if this is a + // “valid” scope (I think?). But we do check for the slash. + if (slash !== -1) { + scope = name.slice(0, slash + 1); + name = name.slice(slash + 1); + } + } + + if (name.slice(0, prefix.length) !== prefix) { + plugin = scope + prefix + name; + } + + name = scope + name; + } + } + + length = sources.length; + index = -1; + + while (++index < length) { + cwd = sources[index]; + filePath = (plugin && resolve(cwd, plugin)) || resolve(cwd, name); + + if (filePath) { + return filePath + } + } + + return null +} + +var format = createCommonjsModule(function (module) { +(function() { + + //// Export the API + var namespace; + + // CommonJS / Node module + { + namespace = module.exports = format; + } + + namespace.format = format; + namespace.vsprintf = vsprintf; + + if (typeof console !== 'undefined' && typeof console.log === 'function') { + namespace.printf = printf; + } + + function printf(/* ... */) { + console.log(format.apply(null, arguments)); + } + + function vsprintf(fmt, replacements) { + return format.apply(null, [fmt].concat(replacements)); + } + + function format(fmt) { + var argIndex = 1 // skip initial format argument + , args = [].slice.call(arguments) + , i = 0 + , n = fmt.length + , result = '' + , c + , escaped = false + , arg + , tmp + , leadingZero = false + , precision + , nextArg = function() { return args[argIndex++]; } + , slurpNumber = function() { + var digits = ''; + while (/\d/.test(fmt[i])) { + digits += fmt[i++]; + c = fmt[i]; + } + return digits.length > 0 ? parseInt(digits) : null; + } + ; + for (; i < n; ++i) { + c = fmt[i]; + if (escaped) { + escaped = false; + if (c == '.') { + leadingZero = false; + c = fmt[++i]; + } + else if (c == '0' && fmt[i + 1] == '.') { + leadingZero = true; + i += 2; + c = fmt[i]; + } + else { + leadingZero = true; + } + precision = slurpNumber(); + switch (c) { + case 'b': // number in binary + result += parseInt(nextArg(), 10).toString(2); + break; + case 'c': // character + arg = nextArg(); + if (typeof arg === 'string' || arg instanceof String) + result += arg; + else + result += String.fromCharCode(parseInt(arg, 10)); + break; + case 'd': // number in decimal + result += parseInt(nextArg(), 10); + break; + case 'f': // floating point number + tmp = String(parseFloat(nextArg()).toFixed(precision || 6)); + result += leadingZero ? tmp : tmp.replace(/^0/, ''); + break; + case 'j': // JSON + result += JSON.stringify(nextArg()); + break; + case 'o': // number in octal + result += '0' + parseInt(nextArg(), 10).toString(8); + break; + case 's': // string + result += nextArg(); + break; + case 'x': // lowercase hexadecimal + result += '0x' + parseInt(nextArg(), 10).toString(16); + break; + case 'X': // uppercase hexadecimal + result += '0x' + parseInt(nextArg(), 10).toString(16).toUpperCase(); + break; + default: + result += c; + break; + } + } else if (c === '%') { + escaped = true; + } else { + result += c; + } + } + return result; + } + +}()); +}); + +var fault = create(Error); + +var fault_1 = fault; + +fault.eval = create(EvalError); +fault.range = create(RangeError); +fault.reference = create(ReferenceError); +fault.syntax = create(SyntaxError); +fault.type = create(TypeError); +fault.uri = create(URIError); + +fault.create = create; + +// Create a new `EConstructor`, with the formatted `format` as a first argument. +function create(EConstructor) { + FormattedError.displayName = EConstructor.displayName || EConstructor.name; + + return FormattedError + + function FormattedError(format$1) { + if (format$1) { + format$1 = format.apply(null, arguments); + } + + return new EConstructor(format$1) + } +} + +var immutable = extend$1; + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend$1() { + var target = {}; + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target +} + +var isObject$1 = function isObject(x) { + return typeof x === "object" && x !== null; +}; + +var toString = Object.prototype.toString; + +var xIsString = isString; + +function isString(obj) { + return toString.call(obj) === "[object String]" +} + +var debug = src('unified-engine:find-up'); + + +var findUp = FindUp; + +var read = fs$1.readFile; +var resolve$1 = path$1.resolve; +var relative = path$1.relative; +var join$1 = path$1.join; +var dirname = path$1.dirname; + +FindUp.prototype.load = load$2; + +function FindUp(options) { + var self = this; + var fp = options.filePath; + + self.cache = {}; + self.cwd = options.cwd; + self.detect = options.detect; + self.names = options.names; + self.create = options.create; + + if (fp) { + self.givenFilePath = resolve$1(options.cwd, fp); + } +} + +function load$2(filePath, callback) { + var self = this; + var cache = self.cache; + var givenFilePath = self.givenFilePath; + var givenFile = self.givenFile; + var names = self.names; + var create = self.create; + var cwd = self.cwd; + var parent; + + if (givenFilePath) { + if (givenFile) { + apply(callback, givenFile); + } else { + givenFile = [callback]; + self.givenFile = givenFile; + debug('Checking given file `%s`', givenFilePath); + read(givenFilePath, loadGiven); + } + + return + } + + if (!self.detect) { + return callback() + } + + filePath = resolve$1(cwd, filePath); + parent = dirname(filePath); + + if (parent in cache) { + apply(callback, cache[parent]); + } else { + cache[parent] = [callback]; + find(parent); + } + + function loadGiven(error, buf) { + var cbs = self.givenFile; + var result; + + if (error) { + result = fault_1( + 'Cannot read given file `%s`\n%s', + relative(cwd, givenFilePath), + error.stack + ); + result.code = 'ENOENT'; + result.path = error.path; + result.syscall = error.syscall; + } else { + try { + result = create(buf, givenFilePath); + debug('Read given file `%s`', givenFilePath); + } catch (error2) { + result = fault_1( + 'Cannot parse given file `%s`\n%s', + relative(cwd, givenFilePath), + error2.stack + ); + debug(error2.message); + } + } + + givenFile = result; + self.givenFile = result; + applyAll(cbs, result); + } + + function find(directory) { + var index = -1; + var length = names.length; + + next(); + + function next() { + var parent; + + // Try to read the next file. + // We do not use `readdir` because on huge directories, that could be + // *very* slow. + if (++index < length) { + read(join$1(directory, names[index]), done); + } else { + parent = dirname(directory); + + if (directory === parent) { + debug('No files found for `%s`', filePath); + found(); + } else if (parent in cache) { + apply(found, cache[parent]); + } else { + cache[parent] = [found]; + find(parent); + } + } + } + + function done(error, buf) { + var name = names[index]; + var fp = join$1(directory, name); + var contents; + + /* istanbul ignore if - Hard to test. */ + if (error) { + if (error.code === 'ENOENT') { + return next() + } + + error = fault_1( + 'Cannot read file `%s`\n%s', + relative(cwd, fp), + error.message + ); + debug(error.message); + return found(error) + } + + try { + contents = create(buf, fp); + } catch (error2) { + return found( + fault_1('Cannot parse file `%s`\n%s', relative(cwd, fp), error2.message) + ) + } + + /* istanbul ignore else - maybe used in the future. */ + if (contents) { + debug('Read file `%s`', fp); + found(null, contents); + } else { + next(); + } + } + + function found(error, result) { + var cbs = cache[directory]; + cache[directory] = error || result; + applyAll(cbs, error || result); + } + } + + function applyAll(cbs, result) { + var index = cbs.length; + + while (index--) { + apply(cbs[index], result); + } + } + + function apply(cb, result) { + if (isObject$1(result) && typeof result[0] === 'function') { + result.push(cb); + } else if (result instanceof Error) { + cb(result); + } else { + cb(null, result); + } + } +} + +var configuration = createCommonjsModule(function (module) { + + + + + +var debug = src('unified-engine:configuration'); +var resolve = loadPlugin_1.resolve; + + + + + + +module.exports = Config; + +var own = {}.hasOwnProperty; +var extname = path$1.extname; +var basename = path$1.basename; +var dirname = path$1.dirname; +var relative = path$1.relative; + +var loaders = { + '.json': loadJSON, + '.js': loadScript, + '.yaml': loadYAML, + '.yml': loadYAML +}; + +var defaultLoader = loadJSON; + +Config.prototype.load = load; + +function Config(options) { + var rcName = options.rcName; + var packageField = options.packageField; + var names = []; + + this.cwd = options.cwd; + this.packageField = options.packageField; + this.pluginPrefix = options.pluginPrefix; + this.configTransform = options.configTransform; + this.defaultConfig = options.defaultConfig; + + if (rcName) { + names.push(rcName, rcName + '.js', rcName + '.yml', rcName + '.yaml'); + debug('Looking for `%s` configuration files', names); + } + + if (packageField) { + names.push('package.json'); + debug('Looking for `%s` fields in `package.json` files', packageField); + } + + this.given = {settings: options.settings, plugins: options.plugins}; + this.create = create.bind(this); + + this.findUp = new findUp({ + filePath: options.rcPath, + cwd: options.cwd, + detect: options.detectConfig, + names: names, + create: this.create + }); +} + +function load(filePath, callback) { + var searchPath = filePath || path$1.resolve(this.cwd, 'stdin.js'); + var self = this; + + self.findUp.load(searchPath, done); + + function done(error, res) { + if (error || res) { + return callback(error, res) + } + + callback(null, self.create()); + } +} + +function create(buf, filePath) { + var self = this; + var transform = self.configTransform; + var defaults = self.defaultConfig; + var fn = (filePath && loaders[extname(filePath)]) || defaultLoader; + var options = {prefix: self.pluginPrefix, cwd: self.cwd}; + var result = {settings: {}, plugins: []}; + var contents = buf ? fn.apply(self, arguments) : undefined; + + if (transform && contents !== undefined) { + contents = transform(contents, filePath); + } + + // Exit if we did find a `package.json`, but it does not have configuration. + if (buf && contents === undefined && basename(filePath) === 'package.json') { + return + } + + if (contents === undefined) { + if (defaults) { + merge(result, defaults, null, immutable(options, {root: self.cwd})); + } + } else { + merge(result, contents, null, immutable(options, {root: dirname(filePath)})); + } + + merge(result, self.given, null, immutable(options, {root: self.cwd})); + + return result +} + +// Basically `Module.prototype.load`, but for a buffer instead of a file path. +function loadScript(buf, filePath) { + var submodule = module$1._cache[filePath]; + + if (!submodule) { + submodule = new module$1(filePath, module); + submodule.filename = filePath; + submodule.paths = module$1._nodeModulePaths(dirname(filePath)); + submodule._compile(String(buf), filePath); + submodule.loaded = true; + module$1._cache[filePath] = submodule; + } + + return submodule.exports +} + +function loadYAML(buf, filePath) { + return jsYaml$1.safeLoad(buf, {filename: basename(filePath)}) +} + +function loadJSON(buf, filePath) { + var result = parseJson$1(buf, filePath); + + if (basename(filePath) === 'package.json') { + result = result[this.packageField]; + } + + return result +} + +function merge(target, raw, val, options) { + var root = options.root; + var cwd = options.cwd; + var prefix = options.prefix; + + if (isObject$1(raw)) { + addPreset(raw); + } else { + throw new Error('Expected preset, not `' + raw + '`') + } + + return target + + function addPreset(result) { + var plugins = result.plugins; + + if (plugins === null || plugins === undefined) ; else if (isObject$1(plugins)) { + if ('length' in plugins) { + addEach(plugins); + } else { + addIn(plugins); + } + } else { + throw new Error( + 'Expected a list or object of plugins, not `' + plugins + '`' + ) + } + + target.settings = immutable(target.settings, result.settings); + } + + function addEach(result) { + var length = result.length; + var index = -1; + var value; + + while (++index < length) { + value = result[index]; + + if (isObject$1(value) && 'length' in value) { + use.apply(null, value); + } else { + use(value); + } + } + } + + function addIn(result) { + var key; + + for (key in result) { + use(key, result[key]); + } + } + + function use(usable, value) { + if (xIsString(usable)) { + addModule(usable, value); + } else if (typeof usable === 'function') { + addPlugin(usable, value); + } else { + merge(target, usable, value, options); + } + } + + function addModule(id, value) { + var fp = resolve(id, {cwd: root, prefix: prefix}); + var res; + + if (fp) { + try { + res = commonjsRequire(fp); + } catch (error) { + throw fault_1( + 'Cannot parse script `%s`\n%s', + relative(root, fp), + error.stack + ) + } + + try { + if (typeof res === 'function') { + addPlugin(res, value); + } else { + merge(target, res, value, immutable(options, {root: dirname(fp)})); + } + } catch (error) { + throw fault_1( + 'Error: Expected preset or plugin, not %s, at `%s`', + res, + relative(root, fp) + ) + } + } else { + fp = relative(cwd, path$1.resolve(root, id)); + addPlugin( + failingModule(fp, new Error('Could not find module `' + id + '`')), + value + ); + } + } + + function addPlugin(result, value) { + var entry = find(target.plugins, result); + + if (entry) { + reconfigure(entry, value); + } else { + target.plugins.push([result, value]); + } + } +} + +function reconfigure(entry, value) { + if (value !== false && entry[1] !== false && isObject$1(value)) { + value = immutable(entry[1], value); + } + + entry[1] = value; +} + +function find(entries, plugin) { + var length = entries.length; + var index = -1; + var entry; + + while (++index < length) { + entry = entries[index]; + + if (entry[0] === plugin) { + return entry + } + } +} + +function failingModule(id, error) { + var cache = failingModule.cache || (failingModule.cache = {}); + var submodule = own.call(cache, id) ? cache[id] : (cache[id] = fail); + return submodule + function fail() { + throw error + } +} +}); + +var configure_1 = configure; + +function configure(context, settings) { + context.configuration = new configuration(settings); +} + +// A simple implementation of make-array +function makeArray (subject) { + return Array.isArray(subject) + ? subject + : [subject] +} + +const REGEX_TEST_BLANK_LINE = /^\s+$/; +const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; +const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; +const REGEX_SPLITALL_CRLF = /\r?\n/g; +// /foo, +// ./foo, +// ../foo, +// . +// .. +const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + +const SLASH = '/'; +const KEY_IGNORE = typeof Symbol !== 'undefined' + ? Symbol.for('node-ignore') + /* istanbul ignore next */ + : 'node-ignore'; + +const define = (object, key, value) => + Object.defineProperty(object, key, {value}); + +const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; + +// Sanitize the range of a regular expression +// The cases are complicated, see test cases for details +const sanitizeRange = range => range.replace( + REGEX_REGEXP_RANGE, + (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) + ? match + // Invalid range (out of order) which is ok for gitignore rules but + // fatal for JavaScript regular expression, so eliminate it. + : '' +); + +// > If the pattern ends with a slash, +// > it is removed for the purpose of the following description, +// > but it would only find a match with a directory. +// > In other words, foo/ will match a directory foo and paths underneath it, +// > but will not match a regular file or a symbolic link foo +// > (this is consistent with the way how pathspec works in general in Git). +// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' +// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call +// you could use option `mark: true` with `glob` + +// '`foo/`' should not continue with the '`..`' +const REPLACERS = [ + + // > Trailing spaces are ignored unless they are quoted with backslash ("\") + [ + // (a\ ) -> (a ) + // (a ) -> (a) + // (a \ ) -> (a ) + /\\?\s+$/, + match => match.indexOf('\\') === 0 + ? ' ' + : '' + ], + + // replace (\ ) with ' ' + [ + /\\\s/g, + () => ' ' + ], + + // Escape metacharacters + // which is written down by users but means special for regular expressions. + + // > There are 12 characters with special meanings: + // > - the backslash \, + // > - the caret ^, + // > - the dollar sign $, + // > - the period or dot ., + // > - the vertical bar or pipe symbol |, + // > - the question mark ?, + // > - the asterisk or star *, + // > - the plus sign +, + // > - the opening parenthesis (, + // > - the closing parenthesis ), + // > - and the opening square bracket [, + // > - the opening curly brace {, + // > These special characters are often called "metacharacters". + [ + /[\\^$.|*+(){]/g, + match => `\\${match}` + ], + + [ + // > [abc] matches any character inside the brackets + // > (in this case a, b, or c); + /\[([^\]/]*)($|\])/g, + (match, p1, p2) => p2 === ']' + ? `[${sanitizeRange(p1)}]` + : `\\${match}` + ], + + [ + // > a question mark (?) matches a single character + /(?!\\)\?/g, + () => '[^/]' + ], + + // leading slash + [ + + // > A leading slash matches the beginning of the pathname. + // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". + // A leading slash matches the beginning of the pathname + /^\//, + () => '^' + ], + + // replace special metacharacter slash after the leading slash + [ + /\//g, + () => '\\/' + ], + + [ + // > A leading "**" followed by a slash means match in all directories. + // > For example, "**/foo" matches file or directory "foo" anywhere, + // > the same as pattern "foo". + // > "**/foo/bar" matches file or directory "bar" anywhere that is directly + // > under directory "foo". + // Notice that the '*'s have been replaced as '\\*' + /^\^*\\\*\\\*\\\//, + + // '**/foo' <-> 'foo' + () => '^(?:.*\\/)?' + ], + + // ending + [ + // 'js' will not match 'js.' + // 'ab' will not match 'abc' + /(?:[^*])$/, + + // WTF! + // https://git-scm.com/docs/gitignore + // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) + // which re-fixes #24, #38 + + // > If there is a separator at the end of the pattern then the pattern + // > will only match directories, otherwise the pattern can match both + // > files and directories. + + // 'js*' will not match 'a.js' + // 'js/' will not match 'a.js' + // 'js' will match 'a.js' and 'a.js/' + match => /\/$/.test(match) + // foo/ will not match 'foo' + ? `${match}$` + // foo matches 'foo' and 'foo/' + : `${match}(?=$|\\/$)` + ], + + // starting + [ + // there will be no leading '/' + // (which has been replaced by section "leading slash") + // If starts with '**', adding a '^' to the regular expression also works + /^(?=[^^])/, + function startingReplacer () { + // If has a slash `/` at the beginning or middle + return !/\/(?!$)/.test(this) + // > Prior to 2.22.1 + // > If the pattern does not contain a slash /, + // > Git treats it as a shell glob pattern + // Actually, if there is only a trailing slash, + // git also treats it as a shell glob pattern + + // After 2.22.1 (compatible but clearer) + // > If there is a separator at the beginning or middle (or both) + // > of the pattern, then the pattern is relative to the directory + // > level of the particular .gitignore file itself. + // > Otherwise the pattern may also match at any level below + // > the .gitignore level. + ? '(?:^|\\/)' + + // > Otherwise, Git treats the pattern as a shell glob suitable for + // > consumption by fnmatch(3) + : '^' + } + ], + + // two globstars + [ + // Use lookahead assertions so that we could match more than one `'/**'` + /\\\/\\\*\\\*(?=\\\/|$)/g, + + // Zero, one or several directories + // should not use '*', or it will be replaced by the next replacer + + // Check if it is not the last `'/**'` + (_, index, str) => index + 6 < str.length + + // case: /**/ + // > A slash followed by two consecutive asterisks then a slash matches + // > zero or more directories. + // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. + // '/**/' + ? '(?:\\/[^\\/]+)*' + + // case: /** + // > A trailing `"/**"` matches everything inside. + + // #21: everything inside but it should not include the current folder + : '\\/.+' + ], + + // intermediate wildcards + [ + // Never replace escaped '*' + // ignore rule '\*' will match the path '*' + + // 'abc.*/' -> go + // 'abc.*' -> skip this rule + /(^|[^\\]+)\\\*(?=.+)/g, + + // '*.js' matches '.js' + // '*.js' doesn't match 'abc' + (_, p1) => `${p1}[^\\/]*` + ], + + // trailing wildcard + [ + /(\^|\\\/)?\\\*$/, + (_, p1) => { + const prefix = p1 + // '\^': + // '/*' does not match '' + // '/*' does not match everything + + // '\\\/': + // 'abc/*' does not match 'abc/' + ? `${p1}[^/]+` + + // 'a*' matches 'a' + // 'a*' matches 'aa' + : '[^/]*'; + + return `${prefix}(?=$|\\/$)` + } + ], + + [ + // unescape + /\\\\\\/g, + () => '\\' + ] +]; + +// A simple cache, because an ignore rule only has only one certain meaning +const regexCache = Object.create(null); + +// @param {pattern} +const makeRegex = (pattern, negative, ignorecase) => { + const r = regexCache[pattern]; + if (r) { + return r + } + + // const replacers = negative + // ? NEGATIVE_REPLACERS + // : POSITIVE_REPLACERS + + const source = REPLACERS.reduce( + (prev, current) => prev.replace(current[0], current[1].bind(pattern)), + pattern + ); + + return regexCache[pattern] = ignorecase + ? new RegExp(source, 'i') + : new RegExp(source) +}; + +const isString$1 = subject => typeof subject === 'string'; + +// > A blank line matches no files, so it can serve as a separator for readability. +const checkPattern = pattern => pattern + && isString$1(pattern) + && !REGEX_TEST_BLANK_LINE.test(pattern) + + // > A line starting with # serves as a comment. + && pattern.indexOf('#') !== 0; + +const splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF); + +class IgnoreRule { + constructor ( + origin, + pattern, + negative, + regex + ) { + this.origin = origin; + this.pattern = pattern; + this.negative = negative; + this.regex = regex; + } +} + +const createRule = (pattern, ignorecase) => { + const origin = pattern; + let negative = false; + + // > An optional prefix "!" which negates the pattern; + if (pattern.indexOf('!') === 0) { + negative = true; + pattern = pattern.substr(1); + } + + pattern = pattern + // > Put a backslash ("\") in front of the first "!" for patterns that + // > begin with a literal "!", for example, `"\!important!.txt"`. + .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') + // > Put a backslash ("\") in front of the first hash for patterns that + // > begin with a hash. + .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#'); + + const regex = makeRegex(pattern, negative, ignorecase); + + return new IgnoreRule( + origin, + pattern, + negative, + regex + ) +}; + +const throwError$1 = (message, Ctor) => { + throw new Ctor(message) +}; + +const checkPath = (path, originalPath, doThrow) => { + if (!isString$1(path)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ) + } + + // We don't know if we should ignore '', so throw + if (!path) { + return doThrow(`path must not be empty`, TypeError) + } + + // Check if it is a relative path + if (checkPath.isNotRelative(path)) { + const r = '`path.relative()`d'; + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ) + } + + return true +}; + +const isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path); + +checkPath.isNotRelative = isNotRelative; +checkPath.convert = p => p; + +class Ignore { + constructor ({ + ignorecase = true + } = {}) { + this._rules = []; + this._ignorecase = ignorecase; + define(this, KEY_IGNORE, true); + this._initCache(); + } + + _initCache () { + this._ignoreCache = Object.create(null); + this._testCache = Object.create(null); + } + + _addPattern (pattern) { + // #32 + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return + } + + if (checkPattern(pattern)) { + const rule = createRule(pattern, this._ignorecase); + this._added = true; + this._rules.push(rule); + } + } + + // @param {Array | string | Ignore} pattern + add (pattern) { + this._added = false; + + makeArray( + isString$1(pattern) + ? splitPattern(pattern) + : pattern + ).forEach(this._addPattern, this); + + // Some rules have just added to the ignore, + // making the behavior changed. + if (this._added) { + this._initCache(); + } + + return this + } + + // legacy + addPattern (pattern) { + return this.add(pattern) + } + + // | ignored : unignored + // negative | 0:0 | 0:1 | 1:0 | 1:1 + // -------- | ------- | ------- | ------- | -------- + // 0 | TEST | TEST | SKIP | X + // 1 | TESTIF | SKIP | TEST | X + + // - SKIP: always skip + // - TEST: always test + // - TESTIF: only test if checkUnignored + // - X: that never happen + + // @param {boolean} whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + + // @returns {TestResult} true if a file is ignored + _testOne (path, checkUnignored) { + let ignored = false; + let unignored = false; + + this._rules.forEach(rule => { + const {negative} = rule; + if ( + unignored === negative && ignored !== unignored + || negative && !ignored && !unignored && !checkUnignored + ) { + return + } + + const matched = rule.regex.test(path); + + if (matched) { + ignored = !negative; + unignored = negative; + } + }); + + return { + ignored, + unignored + } + } + + // @returns {TestResult} + _test (originalPath, cache, checkUnignored, slices) { + const path = originalPath + // Supports nullable path + && checkPath.convert(originalPath); + + checkPath(path, originalPath, throwError$1); + + return this._t(path, cache, checkUnignored, slices) + } + + _t (path, cache, checkUnignored, slices) { + if (path in cache) { + return cache[path] + } + + if (!slices) { + // path/to/a.js + // ['path', 'to', 'a.js'] + slices = path.split(SLASH); + } + + slices.pop(); + + // If the path has no parent directory, just test it + if (!slices.length) { + return cache[path] = this._testOne(path, checkUnignored) + } + + const parent = this._t( + slices.join(SLASH) + SLASH, + cache, + checkUnignored, + slices + ); + + // If the path contains a parent directory, check the parent first + return cache[path] = parent.ignored + // > It is not possible to re-include a file if a parent directory of + // > that file is excluded. + ? parent + : this._testOne(path, checkUnignored) + } + + ignores (path) { + return this._test(path, this._ignoreCache, false).ignored + } + + createFilter () { + return path => !this.ignores(path) + } + + filter (paths) { + return makeArray(paths).filter(this.createFilter()) + } + + // @returns {TestResult} + test (path) { + return this._test(path, this._testCache, true) + } +} + +const factory = options => new Ignore(options); + +const returnFalse = () => false; + +const isPathValid = path => + checkPath(path && checkPath.convert(path), path, returnFalse); + +factory.isPathValid = isPathValid; + +// Fixes typescript +factory.default = factory; + +var ignore = factory; + +// Windows +// -------------------------------------------------------------- +/* istanbul ignore if */ +if ( + // Detect `process` so that it can run in browsers. + typeof process !== 'undefined' + && ( + process.env && process.env.IGNORE_TEST_WIN32 + || process.platform === 'win32' + ) +) { + /* eslint no-control-regex: "off" */ + const makePosix = str => /^\\\\\?\\/.test(str) + || /["<>|\u0000-\u001F]+/u.test(str) + ? str + : str.replace(/\\/g, '/'); + + checkPath.convert = makePosix; + + // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' + // 'd:\\foo' + const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = path => + REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) + || isNotRelative(path); +} + +var ignore$1 = Ignore$1; + +Ignore$1.prototype.check = check; + +var dirname$1 = path$1.dirname; +var relative$1 = path$1.relative; +var resolve$2 = path$1.resolve; + +function Ignore$1(options) { + this.cwd = options.cwd; + + this.findUp = new findUp({ + filePath: options.ignorePath, + cwd: options.cwd, + detect: options.detectIgnore, + names: options.ignoreName ? [options.ignoreName] : [], + create: create$1 + }); +} + +function check(filePath, callback) { + var self = this; + + self.findUp.load(filePath, done); + + function done(error, ignore) { + var normal; + + if (error) { + callback(error); + } else if (ignore) { + normal = relative$1(ignore.filePath, resolve$2(self.cwd, filePath)); + callback(null, normal ? ignore.ignores(normal) : false); + } else { + callback(null, false); + } + } +} + +function create$1(buf, filePath) { + var ignore$1 = ignore().add(String(buf)); + ignore$1.filePath = dirname$1(filePath); + return ignore$1 +} + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + + +var isWindows = process.platform === 'win32'; + + +// JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +var normalize = path$1.normalize; + +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} + +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +var realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = path$1.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs$1.lstatSync(base); + knownHard[base] = true; + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } + + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs$1.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs$1.statSync(base); + linkTarget = fs$1.readlinkSync(base); + } + resolvedLink = path$1.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + + // resolve the link, then start over + p = path$1.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + + return p; +}; + + +var realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } + + // make p is absolute + p = path$1.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs$1.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs$1.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); + + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs$1.stat(base, function(err) { + if (err) return cb(err); + + fs$1.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + + var resolvedLink = path$1.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = path$1.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; + +var old = { + realpathSync: realpathSync, + realpath: realpath +}; + +var fs_realpath = realpath$1; +realpath$1.realpath = realpath$1; +realpath$1.sync = realpathSync$1; +realpath$1.realpathSync = realpathSync$1; +realpath$1.monkeypatch = monkeypatch; +realpath$1.unmonkeypatch = unmonkeypatch; + + +var origRealpath = fs$1.realpath; +var origRealpathSync = fs$1.realpathSync; + +var version = process.version; +var ok = /^v[0-5]\./.test(version); + + +function newError (er) { + return er && er.syscall === 'realpath' && ( + er.code === 'ELOOP' || + er.code === 'ENOMEM' || + er.code === 'ENAMETOOLONG' + ) +} + +function realpath$1 (p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb) + } + + if (typeof cache === 'function') { + cb = cache; + cache = null; + } + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb); + } else { + cb(er, result); + } + }); +} + +function realpathSync$1 (p, cache) { + if (ok) { + return origRealpathSync(p, cache) + } + + try { + return origRealpathSync(p, cache) + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache) + } else { + throw er + } + } +} + +function monkeypatch () { + fs$1.realpath = realpath$1; + fs$1.realpathSync = realpathSync$1; +} + +function unmonkeypatch () { + fs$1.realpath = origRealpath; + fs$1.realpathSync = origRealpathSync; +} + +var concatMap = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +var balancedMatch = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} + +var braceExpansion = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balancedMatch('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balancedMatch('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + +var minimatch_1 = minimatch; +minimatch.Minimatch = Minimatch; + +var path = { sep: '/' }; +try { + path = path$1; +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +}; + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]'; + +// * => any number of characters +var star = qmark + '*?'; + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'; + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'; + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!'); + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true; + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/; + +minimatch.filter = filter; +function filter (pattern, options) { + options = options || {}; + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {}; + b = b || {}; + var t = {}; + Object.keys(b).forEach(function (k) { + t[k] = b[k]; + }); + Object.keys(a).forEach(function (k) { + t[k] = a[k]; + }); + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch; + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + }; + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + }; + + return m +}; + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +}; + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {}; + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {}; + pattern = pattern.trim(); + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/'); + } + + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + + // make the set of regexps etc. + this.make(); +} + +Minimatch.prototype.debug = function () {}; + +Minimatch.prototype.make = make; +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern; + var options = this.options; + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true; + return + } + if (!pattern) { + this.empty = true; + return + } + + // step 1: figure out negation, etc. + this.parseNegate(); + + // step 2: expand braces + var set = this.globSet = this.braceExpand(); + + if (options.debug) this.debug = console.error; + + this.debug(this.pattern, set); + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }); + + this.debug(this.pattern, set); + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this); + + this.debug(this.pattern, set); + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }); + + this.debug(this.pattern, set); + + this.set = set; +} + +Minimatch.prototype.parseNegate = parseNegate; +function parseNegate () { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate; + negateOffset++; + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +}; + +Minimatch.prototype.braceExpand = braceExpand; + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern; + + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return braceExpansion(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse$2; +var SUBPARSE = {}; +function parse$2 (pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long') + } + + var options = this.options; + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = ''; + var hasMagic = !!options.nocase; + var escaping = false; + // ? => one single character + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)'; + var self = this; + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star; + hasMagic = true; + break + case '?': + re += qmark; + hasMagic = true; + break + default: + re += '\\' + stateChar; + break + } + self.debug('clearStateChar %j %j', stateChar, re); + stateChar = false; + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c); + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c; + escaping = false; + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar(); + escaping = true; + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c); + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class'); + if (c === '!' && i === classStart + 1) c = '^'; + re += c; + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar); + clearStateChar(); + stateChar = c; + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar(); + continue + + case '(': + if (inClass) { + re += '('; + continue + } + + if (!stateChar) { + re += '\\('; + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:'; + this.debug('plType %j %j', stateChar, re); + stateChar = false; + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)'; + continue + } + + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close; + if (pl.type === '!') { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|'; + escaping = false; + continue + } + + clearStateChar(); + re += '|'; + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar(); + + if (inClass) { + re += '\\' + c; + continue + } + + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c; + escaping = false; + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i); + try { + RegExp('[' + cs + ']'); + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue + } + } + + // finish up the class. + hasMagic = true; + inClass = false; + re += c; + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar(); + + if (escaping) { + // no need + escaping = false; + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\'; + } + + re += c; + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + '\\[' + sp[0]; + hasMagic = hasMagic || sp[1]; + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug('setting tail', re, pl); + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\'; + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }); + + this.debug('tail=%j\n %s', tail, tail, pl, re); + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type; + + hasMagic = true; + re = re.slice(0, pl.reStart) + t + '\\(' + tail; + } + + // handle trailing things that only matter at the very end. + clearStateChar(); + if (escaping) { + // trailing \\ + re += '\\\\'; + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false; + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true; + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + + nlLast += nlAfter; + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ''); + } + nlAfter = cleanAfter; + + var dollar = ''; + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$'; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re; + } + + if (addPatternStart) { + re = patternStart + re; + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : ''; + try { + var regExp = new RegExp('^' + re + '$', flags); + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern; + regExp._src = re; + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +}; + +Minimatch.prototype.makeRe = makeRe; +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set; + + if (!set.length) { + this.regexp = false; + return this.regexp + } + var options = this.options; + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot; + var flags = options.nocase ? 'i' : ''; + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|'); + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$'; + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$'; + + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function (f) { + return mm.match(f) + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list +}; + +Minimatch.prototype.match = match; +function match (f, partial) { + this.debug('match', f, this.pattern); + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options; + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/'); + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit); + this.debug(this.pattern, 'split', f); + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set; + this.debug(this.pattern, 'set', set); + + // Find the basename of the path by looking for the last non-empty segment + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options; + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }); + + this.debug('matchOne', file.length, pattern.length); + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop'); + var p = pattern[pi]; + var f = file[fi]; + + this.debug(pattern, p, f); + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]); + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug('** at the end'); + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr]; + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee); + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee); + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr); + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue'); + fr++; + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr); + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit; + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase(); + } else { + hit = f === p; + } + this.debug('string match', p, f, hit); + } else { + hit = f.match(p); + this.debug('pattern match', p, f, hit); + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === ''); + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +}; + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} + +var inherits_browser = createCommonjsModule(function (module) { +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + }; +} +}); + +var inherits = createCommonjsModule(function (module) { +try { + var util = util$1; + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = inherits_browser; +} +}); + +function posix(path) { + return path.charAt(0) === '/'; +} + +function win32(path) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); + + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} + +var pathIsAbsolute = process.platform === 'win32' ? win32 : posix; +var posix_1 = posix; +var win32_1 = win32; +pathIsAbsolute.posix = posix_1; +pathIsAbsolute.win32 = win32_1; + +var alphasort_1 = alphasort; +var alphasorti_1 = alphasorti; +var setopts_1 = setopts; +var ownProp_1 = ownProp; +var makeAbs_1 = makeAbs; +var finish_1 = finish; +var mark_1 = mark$1; +var isIgnored_1 = isIgnored; +var childrenIgnored_1 = childrenIgnored; + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + + + + +var Minimatch$1 = minimatch_1.Minimatch; + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || []; + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore]; + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap); + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null; + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, ''); + gmatcher = new Minimatch$1(gpattern, { dot: true }); + } + + return { + matcher: new Minimatch$1(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {}; + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern; + } + + self.silent = !!options.silent; + self.pattern = pattern; + self.strict = options.strict !== false; + self.realpath = !!options.realpath; + self.realpathCache = options.realpathCache || Object.create(null); + self.follow = !!options.follow; + self.dot = !!options.dot; + self.mark = !!options.mark; + self.nodir = !!options.nodir; + if (self.nodir) + self.mark = true; + self.sync = !!options.sync; + self.nounique = !!options.nounique; + self.nonull = !!options.nonull; + self.nosort = !!options.nosort; + self.nocase = !!options.nocase; + self.stat = !!options.stat; + self.noprocess = !!options.noprocess; + self.absolute = !!options.absolute; + + self.maxLength = options.maxLength || Infinity; + self.cache = options.cache || Object.create(null); + self.statCache = options.statCache || Object.create(null); + self.symlinks = options.symlinks || Object.create(null); + + setupIgnores(self, options); + + self.changedCwd = false; + var cwd = process.cwd(); + if (!ownProp(options, "cwd")) + self.cwd = cwd; + else { + self.cwd = path$1.resolve(options.cwd); + self.changedCwd = self.cwd !== cwd; + } + + self.root = options.root || path$1.resolve(self.cwd, "/"); + self.root = path$1.resolve(self.root); + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/"); + + // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + self.cwdAbs = pathIsAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd); + if (process.platform === "win32") + self.cwdAbs = self.cwdAbs.replace(/\\/g, "/"); + self.nomount = !!options.nomount; + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true; + options.nocomment = true; + + self.minimatch = new Minimatch$1(pattern, options); + self.options = self.minimatch.options; +} + +function finish (self) { + var nou = self.nounique; + var all = nou ? [] : Object.create(null); + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i]; + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i]; + if (nou) + all.push(literal); + else + all[literal] = true; + } + } else { + // had matches + var m = Object.keys(matches); + if (nou) + all.push.apply(all, m); + else + m.forEach(function (m) { + all[m] = true; + }); + } + } + + if (!nou) + all = Object.keys(all); + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort); + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]); + } + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !(/\/$/.test(e)); + var c = self.cache[e] || self.cache[makeAbs(self, e)]; + if (notDir && c) + notDir = c !== 'DIR' && !Array.isArray(c); + return notDir + }); + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }); + + self.found = all; +} + +function mark$1 (self, p) { + var abs = makeAbs(self, p); + var c = self.cache[abs]; + var m = p; + if (c) { + var isDir = c === 'DIR' || Array.isArray(c); + var slash = p.slice(-1) === '/'; + + if (isDir && !slash) + m += '/'; + else if (!isDir && slash) + m = m.slice(0, -1); + + if (m !== p) { + var mabs = makeAbs(self, m); + self.statCache[mabs] = self.statCache[abs]; + self.cache[mabs] = self.cache[abs]; + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f; + if (f.charAt(0) === '/') { + abs = path$1.join(self.root, f); + } else if (pathIsAbsolute(f) || f === '') { + abs = f; + } else if (self.changedCwd) { + abs = path$1.resolve(self.cwd, f); + } else { + abs = path$1.resolve(f); + } + + if (process.platform === 'win32') + abs = abs.replace(/\\/g, '/'); + + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +var common$2 = { + alphasort: alphasort_1, + alphasorti: alphasorti_1, + setopts: setopts_1, + ownProp: ownProp_1, + makeAbs: makeAbs_1, + finish: finish_1, + mark: mark_1, + isIgnored: isIgnored_1, + childrenIgnored: childrenIgnored_1 +}; + +var sync = globSync; +globSync.GlobSync = GlobSync; +var setopts$1 = common$2.setopts; +var ownProp$1 = common$2.ownProp; +var childrenIgnored$1 = common$2.childrenIgnored; +var isIgnored$1 = common$2.isIgnored; + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts$1(this, pattern, options); + + if (this.noprocess) + return this + + var n = this.minimatch.set.length; + this.matches = new Array(n); + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false); + } + this._finish(); +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync); + if (this.realpath) { + var self = this; + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null); + for (var p in matchset) { + try { + p = self._makeAbs(p); + var real = fs_realpath.realpathSync(p, self.realpathCache); + set[real] = true; + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true; + else + throw er + } + } + }); + } + common$2.finish(this); +}; + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync); + + // Get the first [n] parts of pattern that are all strings. + var n = 0; + while (typeof pattern[n] === 'string') { + n ++; + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix; + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index); + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null; + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/'); + break + } + + var remain = pattern.slice(n); + + // get the list of entries. + var read; + if (prefix === null) + read = '.'; + else if (pathIsAbsolute(prefix) || pathIsAbsolute(pattern.join('/'))) { + if (!prefix || !pathIsAbsolute(prefix)) + prefix = '/' + prefix; + read = prefix; + } else + read = prefix; + + var abs = this._makeAbs(read); + + //if ignored, skip processing + if (childrenIgnored$1(this, read)) + return + + var isGlobStar = remain[0] === minimatch_1.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar); +}; + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === '.'; + + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== '.' || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + + var len = matchedEntries.length; + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e; + else + e = prefix + e; + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path$1.join(this.root, e); + } + this._emitMatch(index, e); + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift(); + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) + newPattern = [prefix, e]; + else + newPattern = [e]; + this._process(newPattern.concat(remain), index, inGlobStar); + } +}; + + +GlobSync.prototype._emitMatch = function (index, e) { + if (isIgnored$1(this, e)) + return + + var abs = this._makeAbs(e); + + if (this.mark) + e = this._mark(e); + + if (this.absolute) { + e = abs; + } + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs]; + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true; + + if (this.stat) + this._stat(e); +}; + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries; + var lstat; + try { + lstat = fs$1.lstatSync(abs); + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null + } + } + + var isSym = lstat && lstat.isSymbolicLink(); + this.symlinks[abs] = isSym; + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = 'FILE'; + else + entries = this._readdir(abs, false); + + return entries +}; + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + + if (inGlobStar && !ownProp$1(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp$1(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs$1.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er); + return null + } +}; + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i]; + if (abs === '/') + e = abs + e; + else + e = abs + '/' + e; + this.cache[e] = true; + } + } + + this.cache[abs] = entries; + + // mark and cache dir-ness + return entries +}; + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f); + this.cache[abs] = 'FILE'; + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd); + error.path = this.cwd; + error.code = er.code; + throw error + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false; + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false; + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er); + break + } +}; + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar); + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [ prefix ] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false); + + var len = entries.length; + var isSym = this.symlinks[abs]; + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true); + + var below = gspref.concat(entries[i], remain); + this._process(below, index, true); + } +}; + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix); + + if (!this.matches[index]) + this.matches[index] = Object.create(null); + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && pathIsAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === '/') { + prefix = path$1.join(this.root, prefix); + } else { + prefix = path$1.resolve(this.root, prefix); + if (trail) + prefix += '/'; + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/'); + + // Mark this as a match + this._emitMatch(index, prefix); +}; + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === '/'; + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp$1(this.cache, abs)) { + var c = this.cache[abs]; + + if (Array.isArray(c)) + c = 'DIR'; + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + var stat = this.statCache[abs]; + if (!stat) { + var lstat; + try { + lstat = fs$1.lstatSync(abs); + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false; + return false + } + } + + if (lstat && lstat.isSymbolicLink()) { + try { + stat = fs$1.statSync(abs); + } catch (er) { + stat = lstat; + } + } else { + stat = lstat; + } + } + + this.statCache[abs] = stat; + + var c = true; + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE'; + + this.cache[abs] = this.cache[abs] || c; + + if (needDir && c === 'FILE') + return false + + return c +}; + +GlobSync.prototype._mark = function (p) { + return common$2.mark(this, p) +}; + +GlobSync.prototype._makeAbs = function (f) { + return common$2.makeAbs(this, f) +}; + +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +var wrappy_1 = wrappy; +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k]; + }); + + return wrapper + + function wrapper() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + var ret = fn.apply(this, args); + var cb = args[args.length-1]; + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k]; + }); + } + return ret + } +} + +var once_1 = wrappy_1(once); +var strict = wrappy_1(onceStrict); + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }); + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }); +}); + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true; + return f.value = fn.apply(this, arguments) + }; + f.called = false; + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true; + return f.value = fn.apply(this, arguments) + }; + var name = fn.name || 'Function wrapped with `once`'; + f.onceError = name + " shouldn't be called more than once"; + f.called = false; + return f +} +once_1.strict = strict; + +var reqs = Object.create(null); + + +var inflight_1 = wrappy_1(inflight); + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb); + return null + } else { + reqs[key] = [cb]; + return makeres(key) + } +} + +function makeres (key) { + return once_1(function RES () { + var cbs = reqs[key]; + var len = cbs.length; + var args = slice$2(arguments); + + // XXX It's somewhat ambiguous whether a new callback added in this + // pass should be queued for later execution if something in the + // list of callbacks throws, or if it should just be discarded. + // However, it's such an edge case that it hardly matters, and either + // choice is likely as surprising as the other. + // As it happens, we do go ahead and schedule it for later execution. + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args); + } + } finally { + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len); + process.nextTick(function () { + RES.apply(null, args); + }); + } else { + delete reqs[key]; + } + } + }) +} + +function slice$2 (args) { + var length = args.length; + var array = []; + + for (var i = 0; i < length; i++) array[i] = args[i]; + return array +} + +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +var glob_1 = glob; + +var EE = events.EventEmitter; +var setopts$2 = common$2.setopts; +var ownProp$2 = common$2.ownProp; + + +var childrenIgnored$2 = common$2.childrenIgnored; +var isIgnored$2 = common$2.isIgnored; + + + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {}; + if (!options) options = {}; + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return sync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = sync; +var GlobSync$1 = glob.GlobSync = sync.GlobSync; + +// old api surface +glob.glob = glob; + +function extend$2 (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend$2({}, options_); + options.noprocess = true; + + var g = new Glob(pattern, options); + var set = g.minimatch.set; + + if (!pattern) + return false + + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +}; + +glob.Glob = Glob; +inherits(Glob, EE); +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options; + options = null; + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync$1(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts$2(this, pattern, options); + this._didRealPath = false; + + // process each pattern in the minimatch set + var n = this.minimatch.set.length; + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n); + + if (typeof cb === 'function') { + cb = once_1(cb); + this.on('error', cb); + this.on('end', function (matches) { + cb(null, matches); + }); + } + + var self = this; + this._processing = 0; + + this._emitQueue = []; + this._processQueue = []; + this.paused = false; + + if (this.noprocess) + return this + + if (n === 0) + return done() + + var sync = true; + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done); + } + sync = false; + + function done () { + --self._processing; + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish(); + }); + } else { + self._finish(); + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob); + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common$2.finish(this); + this.emit('end', this.found); +}; + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true; + + var n = this.matches.length; + if (n === 0) + return this._finish() + + var self = this; + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next); + + function next () { + if (--n === 0) + self._finish(); + } +}; + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index]; + if (!matchset) + return cb() + + var found = Object.keys(matchset); + var self = this; + var n = found.length; + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null); + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p); + fs_realpath.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true; + else if (er.syscall === 'stat') + set[p] = true; + else + self.emit('error', er); // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set; + cb(); + } + }); + }); +}; + +Glob.prototype._mark = function (p) { + return common$2.mark(this, p) +}; + +Glob.prototype._makeAbs = function (f) { + return common$2.makeAbs(this, f) +}; + +Glob.prototype.abort = function () { + this.aborted = true; + this.emit('abort'); +}; + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true; + this.emit('pause'); + } +}; + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume'); + this.paused = false; + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0); + this._emitQueue.length = 0; + for (var i = 0; i < eq.length; i ++) { + var e = eq[i]; + this._emitMatch(e[0], e[1]); + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0); + this._processQueue.length = 0; + for (var i = 0; i < pq.length; i ++) { + var p = pq[i]; + this._processing--; + this._process(p[0], p[1], p[2], p[3]); + } + } + } +}; + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob); + assert(typeof cb === 'function'); + + if (this.aborted) + return + + this._processing++; + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]); + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0; + while (typeof pattern[n] === 'string') { + n ++; + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix; + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb); + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null; + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/'); + break + } + + var remain = pattern.slice(n); + + // get the list of entries. + var read; + if (prefix === null) + read = '.'; + else if (pathIsAbsolute(prefix) || pathIsAbsolute(pattern.join('/'))) { + if (!prefix || !pathIsAbsolute(prefix)) + prefix = '/' + prefix; + read = prefix; + } else + read = prefix; + + var abs = this._makeAbs(read); + + //if ignored, skip _processing + if (childrenIgnored$2(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch_1.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); +}; + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this; + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }); +}; + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === '.'; + + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== '.' || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length; + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null); + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e; + else + e = prefix + e; + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path$1.join(this.root, e); + } + this._emitMatch(index, e); + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift(); + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e; + else + e = prefix + e; + } + this._process([e].concat(remain), index, inGlobStar, cb); + } + cb(); +}; + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (isIgnored$2(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]); + return + } + + var abs = pathIsAbsolute(e) ? e : this._makeAbs(e); + + if (this.mark) + e = this._mark(e); + + if (this.absolute) + e = abs; + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs]; + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true; + + var st = this.statCache[abs]; + if (st) + this.emit('stat', e, st); + + this.emit('match', e); +}; + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs; + var self = this; + var lstatcb = inflight_1(lstatkey, lstatcb_); + + if (lstatcb) + fs$1.lstat(abs, lstatcb); + + function lstatcb_ (er, lstat) { + if (er && er.code === 'ENOENT') + return cb() + + var isSym = lstat && lstat.isSymbolicLink(); + self.symlinks[abs] = isSym; + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) { + self.cache[abs] = 'FILE'; + cb(); + } else + self._readdir(abs, false, cb); + } +}; + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight_1('readdir\0'+abs+'\0'+inGlobStar, cb); + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp$2(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp$2(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + fs$1.readdir(abs, readdirCb(this, abs, cb)); +}; + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb); + else + self._readdirEntries(abs, entries, cb); + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i]; + if (abs === '/') + e = abs + e; + else + e = abs + '/' + e; + this.cache[e] = true; + } + } + + this.cache[abs] = entries; + return cb(null, entries) +}; + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f); + this.cache[abs] = 'FILE'; + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd); + error.path = this.cwd; + error.code = er.code; + this.emit('error', error); + this.abort(); + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false; + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false; + if (this.strict) { + this.emit('error', er); + // If the error is handled, then we abort + // if not, we threw out of here + this.abort(); + } + if (!this.silent) + console.error('glob error', er); + break + } + + return cb() +}; + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this; + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); +}; + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [ prefix ] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb); + + var isSym = this.symlinks[abs]; + var len = entries.length; + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true, cb); + + var below = gspref.concat(entries[i], remain); + this._process(below, index, true, cb); + } + + cb(); +}; + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this; + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb); + }); +}; +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null); + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && pathIsAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === '/') { + prefix = path$1.join(this.root, prefix); + } else { + prefix = path$1.resolve(this.root, prefix); + if (trail) + prefix += '/'; + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/'); + + // Mark this as a match + this._emitMatch(index, prefix); + cb(); +}; + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === '/'; + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp$2(this.cache, abs)) { + var c = this.cache[abs]; + + if (Array.isArray(c)) + c = 'DIR'; + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + var stat = this.statCache[abs]; + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE'; + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this; + var statcb = inflight_1('stat\0' + abs, lstatcb_); + if (statcb) + fs$1.lstat(abs, statcb); + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs$1.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb); + else + self._stat2(f, abs, er, stat, cb); + }) + } else { + self._stat2(f, abs, er, lstat, cb); + } + } +}; + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false; + return cb() + } + + var needDir = f.slice(-1) === '/'; + this.statCache[abs] = stat; + + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) + return cb(null, false, stat) + + var c = true; + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE'; + this.cache[abs] = this.cache[abs] || c; + + if (needDir && c === 'FILE') + return cb() + + return cb(null, c, stat) +}; + +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +var isBuffer = function isBuffer (obj) { + return obj != null && obj.constructor != null && + typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +}; + +var own = {}.hasOwnProperty; + +var unistUtilStringifyPosition = stringify; + +function stringify(value) { + // Nothing. + if (!value || typeof value !== 'object') { + return '' + } + + // Node. + if (own.call(value, 'position') || own.call(value, 'type')) { + return position(value.position) + } + + // Position. + if (own.call(value, 'start') || own.call(value, 'end')) { + return position(value) + } + + // Point. + if (own.call(value, 'line') || own.call(value, 'column')) { + return point(value) + } + + // ? + return '' +} + +function point(point) { + if (!point || typeof point !== 'object') { + point = {}; + } + + return index(point.line) + ':' + index(point.column) +} + +function position(pos) { + if (!pos || typeof pos !== 'object') { + pos = {}; + } + + return point(pos.start) + '-' + point(pos.end) +} + +function index(value) { + return value && typeof value === 'number' ? value : 1 +} + +var vfileMessage = VMessage; + +// Inherit from `Error#`. +function VMessagePrototype() {} +VMessagePrototype.prototype = Error.prototype; +VMessage.prototype = new VMessagePrototype(); + +// Message properties. +var proto = VMessage.prototype; + +proto.file = ''; +proto.name = ''; +proto.reason = ''; +proto.message = ''; +proto.stack = ''; +proto.fatal = null; +proto.column = null; +proto.line = null; + +// Construct a new VMessage. +// +// Note: We cannot invoke `Error` on the created context, as that adds readonly +// `line` and `column` attributes on Safari 9, thus throwing and failing the +// data. +function VMessage(reason, position, origin) { + var parts; + var range; + var location; + + if (typeof position === 'string') { + origin = position; + position = null; + } + + parts = parseOrigin(origin); + range = unistUtilStringifyPosition(position) || '1:1'; + + location = { + start: {line: null, column: null}, + end: {line: null, column: null} + }; + + // Node. + if (position && position.position) { + position = position.position; + } + + if (position) { + // Position. + if (position.start) { + location = position; + position = position.start; + } else { + // Point. + location.start = position; + } + } + + if (reason.stack) { + this.stack = reason.stack; + reason = reason.message; + } + + this.message = reason; + this.name = range; + this.reason = reason; + this.line = position ? position.line : null; + this.column = position ? position.column : null; + this.location = location; + this.source = parts[0]; + this.ruleId = parts[1]; +} + +function parseOrigin(origin) { + var result = [null, null]; + var index; + + if (typeof origin === 'string') { + index = origin.indexOf(':'); + + if (index === -1) { + result[1] = origin; + } else { + result[0] = origin.slice(0, index); + result[1] = origin.slice(index + 1); + } + } + + return result +} + +function replaceExt(npath, ext) { + if (typeof npath !== 'string') { + return npath; + } + + if (npath.length === 0) { + return npath; + } + + var nFileName = path$1.basename(npath, path$1.extname(npath)) + ext; + return path$1.join(path$1.dirname(npath), nFileName); +} + +var replaceExt_1 = replaceExt; + +var core$1 = VFile; + +var own$1 = {}.hasOwnProperty; +var proto$1 = VFile.prototype; + +// Order of setting (least specific to most), we need this because otherwise +// `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a +// stem can be set. +var order = ['history', 'path', 'basename', 'stem', 'extname', 'dirname']; + +proto$1.toString = toString$1; + +// Access full path (`~/index.min.js`). +Object.defineProperty(proto$1, 'path', {get: getPath, set: setPath}); + +// Access parent path (`~`). +Object.defineProperty(proto$1, 'dirname', {get: getDirname, set: setDirname}); + +// Access basename (`index.min.js`). +Object.defineProperty(proto$1, 'basename', {get: getBasename, set: setBasename}); + +// Access extname (`.js`). +Object.defineProperty(proto$1, 'extname', {get: getExtname, set: setExtname}); + +// Access stem (`index.min`). +Object.defineProperty(proto$1, 'stem', {get: getStem, set: setStem}); + +// Construct a new file. +function VFile(options) { + var prop; + var index; + var length; + + if (!options) { + options = {}; + } else if (typeof options === 'string' || isBuffer(options)) { + options = {contents: options}; + } else if ('message' in options && 'messages' in options) { + return options + } + + if (!(this instanceof VFile)) { + return new VFile(options) + } + + this.data = {}; + this.messages = []; + this.history = []; + this.cwd = process.cwd(); + + // Set path related properties in the correct order. + index = -1; + length = order.length; + + while (++index < length) { + prop = order[index]; + + if (own$1.call(options, prop)) { + this[prop] = options[prop]; + } + } + + // Set non-path related properties. + for (prop in options) { + if (order.indexOf(prop) === -1) { + this[prop] = options[prop]; + } + } +} + +function getPath() { + return this.history[this.history.length - 1] +} + +function setPath(path) { + assertNonEmpty(path, 'path'); + + if (path !== this.path) { + this.history.push(path); + } +} + +function getDirname() { + return typeof this.path === 'string' ? path$1.dirname(this.path) : undefined +} + +function setDirname(dirname) { + assertPath(this.path, 'dirname'); + this.path = path$1.join(dirname || '', this.basename); +} + +function getBasename() { + return typeof this.path === 'string' ? path$1.basename(this.path) : undefined +} + +function setBasename(basename) { + assertNonEmpty(basename, 'basename'); + assertPart(basename, 'basename'); + this.path = path$1.join(this.dirname || '', basename); +} + +function getExtname() { + return typeof this.path === 'string' ? path$1.extname(this.path) : undefined +} + +function setExtname(extname) { + var ext = extname || ''; + + assertPart(ext, 'extname'); + assertPath(this.path, 'extname'); + + if (ext) { + if (ext.charAt(0) !== '.') { + throw new Error('`extname` must start with `.`') + } + + if (ext.indexOf('.', 1) !== -1) { + throw new Error('`extname` cannot contain multiple dots') + } + } + + this.path = replaceExt_1(this.path, ext); +} + +function getStem() { + return typeof this.path === 'string' + ? path$1.basename(this.path, this.extname) + : undefined +} + +function setStem(stem) { + assertNonEmpty(stem, 'stem'); + assertPart(stem, 'stem'); + this.path = path$1.join(this.dirname || '', stem + (this.extname || '')); +} + +// Get the value of the file. +function toString$1(encoding) { + var value = this.contents || ''; + return isBuffer(value) ? value.toString(encoding) : String(value) +} + +// Assert that `part` is not a path (i.e., does not contain `path.sep`). +function assertPart(part, name) { + if (part.indexOf(path$1.sep) !== -1) { + throw new Error( + '`' + name + '` cannot be a path: did not expect `' + path$1.sep + '`' + ) + } +} + +// Assert that `part` is not empty. +function assertNonEmpty(part, name) { + if (!part) { + throw new Error('`' + name + '` cannot be empty') + } +} + +// Assert `path` exists. +function assertPath(path, name) { + if (!path) { + throw new Error('Setting `' + name + '` requires `path` to be set too') + } +} + +var vfile = core$1; + +var proto$2 = core$1.prototype; + +proto$2.message = message; +proto$2.info = info; +proto$2.fail = fail; + +// Create a message with `reason` at `position`. +// When an error is passed in as `reason`, copies the stack. +function message(reason, position, origin) { + var filePath = this.path; + var message = new vfileMessage(reason, position, origin); + + if (filePath) { + message.name = filePath + ':' + message.name; + message.file = filePath; + } + + message.fatal = false; + + this.messages.push(message); + + return message +} + +// Fail: creates a vmessage, associates it with the file, and throws it. +function fail() { + var message = this.message.apply(this, arguments); + + message.fatal = true; + + throw message +} + +// Info: creates a vmessage, associates it with the file, and marks the fatality +// as null. +function info() { + var message = this.message.apply(this, arguments); + + message.fatal = null; + + return message +} + +var core$2 = toVFile; + +// Create a virtual file from a description. If `options` is a string or a +// buffer, it’s used as the path. In all other cases, the options are passed +// through to `vfile()`. +function toVFile(options) { + if (typeof options === 'string' || isBuffer(options)) { + options = {path: String(options)}; + } + + return vfile(options) +} + +var read$1 = readSync; +var write = writeSync; + +// Create a virtual file and read it in, synchronously. +function readSync(description, options) { + var file = core$2(description); + file.contents = fs$1.readFileSync(path$1.resolve(file.cwd, file.path), options); + return file +} + +// Create a virtual file and write it out, synchronously. +function writeSync(description, options) { + var file = core$2(description); + fs$1.writeFileSync( + path$1.resolve(file.cwd, file.path), + file.contents || '', + options + ); +} + +var sync$1 = { + read: read$1, + write: write +}; + +var read_1 = read$2; +var write_1 = write$1; + +// Create a virtual file and read it in, asynchronously. +function read$2(description, options, callback) { + var file = core$2(description); + + if (!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + return new Promise(executor) + } + + executor(resolve, callback); + + function resolve(result) { + callback(null, result); + } + + function executor(resolve, reject) { + var fp; + + try { + fp = path$1.resolve(file.cwd, file.path); + } catch (error) { + return reject(error) + } + + fs$1.readFile(fp, options, done); + + function done(error, res) { + if (error) { + reject(error); + } else { + file.contents = res; + resolve(file); + } + } + } +} + +// Create a virtual file and write it out, asynchronously. +function write$1(description, options, callback) { + var file = core$2(description); + + // Weird, right? Otherwise `fs` doesn’t accept it. + if (!callback && typeof options === 'function') { + callback = options; + options = undefined; + } + + if (!callback) { + return new Promise(executor) + } + + executor(resolve, callback); + + function resolve(result) { + callback(null, result); + } + + function executor(resolve, reject) { + var fp; + + try { + fp = path$1.resolve(file.cwd, file.path); + } catch (error) { + return reject(error) + } + + fs$1.writeFile(fp, file.contents || '', options, done); + + function done(error) { + if (error) { + reject(error); + } else { + resolve(); + } + } + } +} + +var async = { + read: read_1, + write: write_1 +}; + +var fs = core$2; + +core$2.read = async.read; +core$2.readSync = sync$1.read; +core$2.write = async.write; +core$2.writeSync = sync$1.write; + +var toVfile = fs; + +var isHidden = hidden; + +function hidden(filename) { + if (typeof filename !== 'string') { + throw new Error('Expected string') + } + + return filename.charAt(0) === '.' +} + +var readdir = fs$1.readdir; +var stat = fs$1.stat; +var join$2 = path$1.join; +var relative$2 = path$1.relative; +var resolve$3 = path$1.resolve; +var basename = path$1.basename; +var extname = path$1.extname; +var magic = glob_1.hasMagic; + +var finder = find; + +// Search `patterns`, a mix of globs, paths, and files. +function find(input, options, callback) { + expand$1(input, options, done); + + function done(error, result) { + /* istanbul ignore if - glob errors are unusual. + * other errors are on the vfile results. */ + if (error) { + callback(error); + } else { + callback(null, {oneFileMode: oneFileMode(result), files: result.output}); + } + } +} + +// Expand the given glob patterns, search given and found directories, and map +// to vfiles. +function expand$1(input, options, next) { + var cwd = options.cwd; + var paths = []; + var actual = 0; + var expected = 0; + var failed; + + input.forEach(each); + + if (!expected) { + search(paths, options, done); + } + + function each(file) { + if (xIsString(file)) { + if (magic(file)) { + expected++; + glob_1(file, {cwd: cwd}, one); + } else { + // `relative` to make the paths canonical. + file = relative$2(cwd, resolve$3(cwd, file)) || '.'; + paths.push(file); + } + } else { + file.cwd = cwd; + file.path = relative$2(cwd, file.path); + file.history = [file.path]; + paths.push(file); + } + } + + function one(error, files) { + /* istanbul ignore if - Glob errors are unusual. */ + if (failed) { + return + } + + /* istanbul ignore if - Glob errors are unusual. */ + if (error) { + failed = true; + done(error); + } else { + actual++; + paths = paths.concat(files); + + if (actual === expected) { + search(paths, options, done); + } + } + } + + function done(error, files) { + /* istanbul ignore if - `search` currently does not give errors. */ + if (error) { + next(error); + } else { + next(null, {input: paths, output: files}); + } + } +} + +// Search `paths`. +function search(input, options, next) { + var cwd = options.cwd; + var silent = options.silentlyIgnore; + var nested = options.nested; + var extensions = options.extensions; + var extraIgnore = ignore().add(options.ignorePatterns); + var files = []; + var expected = 0; + var actual = 0; + + input.forEach(each); + + if (!expected) { + next(null, files); + } + + return each + + function each(file) { + var ext = xIsString(file) ? extname(file) : file.extname; + var part; + + // Normalise globs. + if (xIsString(file)) { + file = file.split('/').join(path$1.sep); + } + + part = base(file); + + if (nested && (isHidden(part) || part === 'node_modules')) { + return + } + + expected++; + + statAndIgnore(file, immutable(options, {extraIgnore: extraIgnore}), handle); + + function handle(error, result) { + var ignored = result && result.ignored; + var dir = result && result.stats && result.stats.isDirectory(); + + if (ignored && (nested || silent)) { + return one(null, []) + } + + if (!ignored && dir) { + return readdir(resolve$3(cwd, filePath(file)), directory) + } + + if ( + nested && + !dir && + extensions.length !== 0 && + extensions.indexOf(ext) === -1 + ) { + return one(null, []) + } + + file = toVfile(file); + file.cwd = cwd; + + if (ignored) { + try { + file.fail('Cannot process specified file: it’s ignored'); + } catch (error2) {} + } + + if (error && error.code === 'ENOENT') { + try { + file.fail( + error.syscall === 'stat' ? 'No such file or directory' : error + ); + } catch (error2) {} + } + + one(null, [file]); + } + + function directory(error, basenames) { + var file; + + /* istanbul ignore if - Should not happen often: the directory is `stat`ed + * first, which was ok, but reading it is not. */ + if (error) { + file = toVfile(filePath(file)); + file.cwd = cwd; + + try { + file.fail('Cannot read directory'); + } catch (error2) {} + + one(null, [file]); + } else { + search(basenames.map(concat), immutable(options, {nested: true}), one); + } + } + + // Error is never given. Always given `results`. + function one(_, results) { + /* istanbul ignore else - Always given. */ + if (results) { + files = files.concat(results); + } + + actual++; + + if (actual === expected) { + next(null, files); + } + } + + function concat(value) { + return join$2(filePath(file), value) + } + } +} + +function statAndIgnore(file, options, callback) { + var ignore = options.ignore; + var extraIgnore = options.extraIgnore; + var fp = resolve$3(options.cwd, filePath(file)); + var normal = relative$2(options.cwd, fp); + var expected = 1; + var actual = 0; + var stats; + var ignored; + + if (!file.contents) { + expected++; + stat(fp, handleStat); + } + + ignore.check(fp, handleIgnore); + + function handleStat(error, value) { + stats = value; + one(error); + } + + function handleIgnore(error, value) { + ignored = value; + one(error); + } + + function one(error) { + actual++; + + if (error) { + callback(error); + actual = -1; + } else if (actual === expected) { + callback(null, { + stats: stats, + ignored: ignored || (normal ? extraIgnore.ignores(normal) : false) + }); + } + } +} + +function base(file) { + return xIsString(file) ? basename(file) : file.basename +} + +function filePath(file) { + return xIsString(file) ? file : file.path +} + +function oneFileMode(result) { + return ( + result.output.length === 1 && + result.input.length === 1 && + result.output[0].path === result.input[0] + ) +} + +var fileSystem_1 = fileSystem; + +// Find files from the file-system. +function fileSystem(context, settings, next) { + var input = context.files; + + if (input.length === 0) { + next(); + } else { + finder( + input, + { + cwd: settings.cwd, + extensions: settings.extensions, + silentlyIgnore: settings.silentlyIgnore, + ignorePatterns: settings.ignorePatterns, + ignore: new ignore$1({ + cwd: settings.cwd, + detectIgnore: settings.detectIgnore, + ignoreName: settings.ignoreName, + ignorePath: settings.ignorePath + }) + }, + onfound + ); + } + + function onfound(error, result) { + var output = result.files; + + // Sort alphabetically. + // Everything is unique so we do not care about cases where left and right + // are equal. + output.sort(sortAlphabetically); + + // Mark as given. + // This allows outputting files, which can be pretty dangerous, so it’s + // “hidden”. + output.forEach(markAsGiven); + + context.files = output; + + // If `out` was not set, detect it based on whether one file was given. + if (settings.out === null || settings.out === undefined) { + settings.out = result.oneFileMode; + } + + next(error); + } + + function markAsGiven(file) { + file.data.unifiedEngineGiven = true; + } + + function sortAlphabetically(left, right) { + return left.path < right.path ? -1 : 1 + } +} + +var toString$2 = Object.prototype.toString; + +var isModern = ( + typeof Buffer.alloc === 'function' && + typeof Buffer.allocUnsafe === 'function' && + typeof Buffer.from === 'function' +); + +function isArrayBuffer (input) { + return toString$2.call(input).slice(8, -1) === 'ArrayBuffer' +} + +function fromArrayBuffer (obj, byteOffset, length) { + byteOffset >>>= 0; + + var maxLength = obj.byteLength - byteOffset; + + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds") + } + + if (length === undefined) { + length = maxLength; + } else { + length >>>= 0; + + if (length > maxLength) { + throw new RangeError("'length' is out of bounds") + } + } + + return isModern + ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) + : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8'; + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + return isModern + ? Buffer.from(string, encoding) + : new Buffer(string, encoding) +} + +function bufferFrom (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + return isModern + ? Buffer.from(value) + : new Buffer(value) +} + +var bufferFrom_1 = bufferFrom; + +var typedarray = createCommonjsModule(function (module, exports) { +var undefined$1 = (void 0); // Paranoia + +// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to +// create, and consume so much memory, that the browser appears frozen. +var MAX_ARRAY_LENGTH = 1e5; + +// Approximations of internal ECMAScript conversion functions +var ECMAScript = (function() { + // Stash a copy in case other scripts modify these + var opts = Object.prototype.toString, + ophop = Object.prototype.hasOwnProperty; + + return { + // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues: + Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); }, + HasProperty: function(o, p) { return p in o; }, + HasOwnProperty: function(o, p) { return ophop.call(o, p); }, + IsCallable: function(o) { return typeof o === 'function'; }, + ToInt32: function(v) { return v >> 0; }, + ToUint32: function(v) { return v >>> 0; } + }; +}()); + +// Snapshot intrinsics +var LN2 = Math.LN2, + abs = Math.abs, + floor = Math.floor, + log = Math.log, + min = Math.min, + pow = Math.pow, + round = Math.round; + +// ES5: lock down object properties +function configureProperties(obj) { + if (getOwnPropNames && defineProp) { + var props = getOwnPropNames(obj), i; + for (i = 0; i < props.length; i += 1) { + defineProp(obj, props[i], { + value: obj[props[i]], + writable: false, + enumerable: false, + configurable: false + }); + } + } +} + +// emulate ES5 getter/setter API using legacy APIs +// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx +// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but +// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless) +var defineProp; +if (Object.defineProperty && (function() { + try { + Object.defineProperty({}, 'x', {}); + return true; + } catch (e) { + return false; + } + })()) { + defineProp = Object.defineProperty; +} else { + defineProp = function(o, p, desc) { + if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object"); + if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); } + if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); } + if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; } + return o; + }; +} + +var getOwnPropNames = Object.getOwnPropertyNames || function (o) { + if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object"); + var props = [], p; + for (p in o) { + if (ECMAScript.HasOwnProperty(o, p)) { + props.push(p); + } + } + return props; +}; + +// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value) +// for index in 0 ... obj.length +function makeArrayAccessors(obj) { + if (!defineProp) { return; } + + if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill"); + + function makeArrayAccessor(index) { + defineProp(obj, index, { + 'get': function() { return obj._getter(index); }, + 'set': function(v) { obj._setter(index, v); }, + enumerable: true, + configurable: false + }); + } + + var i; + for (i = 0; i < obj.length; i += 1) { + makeArrayAccessor(i); + } +} + +// Internal conversion functions: +// pack() - take a number (interpreted as Type), output a byte array +// unpack() - take a byte array, output a Type-like number + +function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; } +function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; } + +function packI8(n) { return [n & 0xff]; } +function unpackI8(bytes) { return as_signed(bytes[0], 8); } + +function packU8(n) { return [n & 0xff]; } +function unpackU8(bytes) { return as_unsigned(bytes[0], 8); } + +function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; } + +function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; } +function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); } + +function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; } +function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); } + +function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } +function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } + +function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } +function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } + +function packIEEE754(v, ebits, fbits) { + + var bias = (1 << (ebits - 1)) - 1, + s, e, f, i, bits, str, bytes; + + function roundToEven(n) { + var w = floor(n), f = n - w; + if (f < 0.5) + return w; + if (f > 0.5) + return w + 1; + return w % 2 ? w + 1 : w; + } + + // Compute sign, exponent, fraction + if (v !== v) { + // NaN + // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping + e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0; + } else if (v === Infinity || v === -Infinity) { + e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0; + } else if (v === 0) { + e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0; + } else { + s = v < 0; + v = abs(v); + + if (v >= pow(2, 1 - bias)) { + e = min(floor(log(v) / LN2), 1023); + f = roundToEven(v / pow(2, e) * pow(2, fbits)); + if (f / pow(2, fbits) >= 2) { + e = e + 1; + f = 1; + } + if (e > bias) { + // Overflow + e = (1 << ebits) - 1; + f = 0; + } else { + // Normalized + e = e + bias; + f = f - pow(2, fbits); + } + } else { + // Denormalized + e = 0; + f = roundToEven(v / pow(2, 1 - bias - fbits)); + } + } + + // Pack sign, exponent, fraction + bits = []; + for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); } + for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); } + bits.push(s ? 1 : 0); + bits.reverse(); + str = bits.join(''); + + // Bits to bytes + bytes = []; + while (str.length) { + bytes.push(parseInt(str.substring(0, 8), 2)); + str = str.substring(8); + } + return bytes; +} + +function unpackIEEE754(bytes, ebits, fbits) { + + // Bytes to bits + var bits = [], i, j, b, str, + bias, s, e, f; + + for (i = bytes.length; i; i -= 1) { + b = bytes[i - 1]; + for (j = 8; j; j -= 1) { + bits.push(b % 2 ? 1 : 0); b = b >> 1; + } + } + bits.reverse(); + str = bits.join(''); + + // Unpack sign, exponent, fraction + bias = (1 << (ebits - 1)) - 1; + s = parseInt(str.substring(0, 1), 2) ? -1 : 1; + e = parseInt(str.substring(1, 1 + ebits), 2); + f = parseInt(str.substring(1 + ebits), 2); + + // Produce number + if (e === (1 << ebits) - 1) { + return f !== 0 ? NaN : s * Infinity; + } else if (e > 0) { + // Normalized + return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); + } else if (f !== 0) { + // Denormalized + return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); + } else { + return s < 0 ? -0 : 0; + } +} + +function unpackF64(b) { return unpackIEEE754(b, 11, 52); } +function packF64(v) { return packIEEE754(v, 11, 52); } +function unpackF32(b) { return unpackIEEE754(b, 8, 23); } +function packF32(v) { return packIEEE754(v, 8, 23); } + + +// +// 3 The ArrayBuffer Type +// + +(function() { + + /** @constructor */ + var ArrayBuffer = function ArrayBuffer(length) { + length = ECMAScript.ToInt32(length); + if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer'); + + this.byteLength = length; + this._bytes = []; + this._bytes.length = length; + + var i; + for (i = 0; i < this.byteLength; i += 1) { + this._bytes[i] = 0; + } + + configureProperties(this); + }; + + exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer; + + // + // 4 The ArrayBufferView Type + // + + // NOTE: this constructor is not exported + /** @constructor */ + var ArrayBufferView = function ArrayBufferView() { + //this.buffer = null; + //this.byteOffset = 0; + //this.byteLength = 0; + }; + + // + // 5 The Typed Array View Types + // + + function makeConstructor(bytesPerElement, pack, unpack) { + // Each TypedArray type requires a distinct constructor instance with + // identical logic, which this produces. + + var ctor; + ctor = function(buffer, byteOffset, length) { + var array, sequence, i, s; + + if (!arguments.length || typeof arguments[0] === 'number') { + // Constructor(unsigned long length) + this.length = ECMAScript.ToInt32(arguments[0]); + if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer'); + + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer(this.byteLength); + this.byteOffset = 0; + } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) { + // Constructor(TypedArray array) + array = arguments[0]; + + this.length = array.length; + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer(this.byteLength); + this.byteOffset = 0; + + for (i = 0; i < this.length; i += 1) { + this._setter(i, array._getter(i)); + } + } else if (typeof arguments[0] === 'object' && + !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { + // Constructor(sequence array) + sequence = arguments[0]; + + this.length = ECMAScript.ToUint32(sequence.length); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer(this.byteLength); + this.byteOffset = 0; + + for (i = 0; i < this.length; i += 1) { + s = sequence[i]; + this._setter(i, Number(s)); + } + } else if (typeof arguments[0] === 'object' && + (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { + // Constructor(ArrayBuffer buffer, + // optional unsigned long byteOffset, optional unsigned long length) + this.buffer = buffer; + + this.byteOffset = ECMAScript.ToUint32(byteOffset); + if (this.byteOffset > this.buffer.byteLength) { + throw new RangeError("byteOffset out of range"); + } + + if (this.byteOffset % this.BYTES_PER_ELEMENT) { + // The given byteOffset must be a multiple of the element + // size of the specific type, otherwise an exception is raised. + throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size."); + } + + if (arguments.length < 3) { + this.byteLength = this.buffer.byteLength - this.byteOffset; + + if (this.byteLength % this.BYTES_PER_ELEMENT) { + throw new RangeError("length of buffer minus byteOffset not a multiple of the element size"); + } + this.length = this.byteLength / this.BYTES_PER_ELEMENT; + } else { + this.length = ECMAScript.ToUint32(length); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + } + + if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { + throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); + } + } else { + throw new TypeError("Unexpected argument type(s)"); + } + + this.constructor = ctor; + + configureProperties(this); + makeArrayAccessors(this); + }; + + ctor.prototype = new ArrayBufferView(); + ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement; + ctor.prototype._pack = pack; + ctor.prototype._unpack = unpack; + ctor.BYTES_PER_ELEMENT = bytesPerElement; + + // getter type (unsigned long index); + ctor.prototype._getter = function(index) { + if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); + + index = ECMAScript.ToUint32(index); + if (index >= this.length) { + return undefined$1; + } + + var bytes = [], i, o; + for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; + i < this.BYTES_PER_ELEMENT; + i += 1, o += 1) { + bytes.push(this.buffer._bytes[o]); + } + return this._unpack(bytes); + }; + + // NONSTANDARD: convenience alias for getter: type get(unsigned long index); + ctor.prototype.get = ctor.prototype._getter; + + // setter void (unsigned long index, type value); + ctor.prototype._setter = function(index, value) { + if (arguments.length < 2) throw new SyntaxError("Not enough arguments"); + + index = ECMAScript.ToUint32(index); + if (index >= this.length) { + return undefined$1; + } + + var bytes = this._pack(value), i, o; + for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; + i < this.BYTES_PER_ELEMENT; + i += 1, o += 1) { + this.buffer._bytes[o] = bytes[i]; + } + }; + + // void set(TypedArray array, optional unsigned long offset); + // void set(sequence array, optional unsigned long offset); + ctor.prototype.set = function(index, value) { + if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); + var array, sequence, offset, len, + i, s, d, + byteOffset, byteLength, tmp; + + if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) { + // void set(TypedArray array, optional unsigned long offset); + array = arguments[0]; + offset = ECMAScript.ToUint32(arguments[1]); + + if (offset + array.length > this.length) { + throw new RangeError("Offset plus length of array is out of range"); + } + + byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; + byteLength = array.length * this.BYTES_PER_ELEMENT; + + if (array.buffer === this.buffer) { + tmp = []; + for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { + tmp[i] = array.buffer._bytes[s]; + } + for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { + this.buffer._bytes[d] = tmp[i]; + } + } else { + for (i = 0, s = array.byteOffset, d = byteOffset; + i < byteLength; i += 1, s += 1, d += 1) { + this.buffer._bytes[d] = array.buffer._bytes[s]; + } + } + } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') { + // void set(sequence array, optional unsigned long offset); + sequence = arguments[0]; + len = ECMAScript.ToUint32(sequence.length); + offset = ECMAScript.ToUint32(arguments[1]); + + if (offset + len > this.length) { + throw new RangeError("Offset plus length of array is out of range"); + } + + for (i = 0; i < len; i += 1) { + s = sequence[i]; + this._setter(offset + i, Number(s)); + } + } else { + throw new TypeError("Unexpected argument type(s)"); + } + }; + + // TypedArray subarray(long begin, optional long end); + ctor.prototype.subarray = function(start, end) { + function clamp(v, min, max) { return v < min ? min : v > max ? max : v; } + + start = ECMAScript.ToInt32(start); + end = ECMAScript.ToInt32(end); + + if (arguments.length < 1) { start = 0; } + if (arguments.length < 2) { end = this.length; } + + if (start < 0) { start = this.length + start; } + if (end < 0) { end = this.length + end; } + + start = clamp(start, 0, this.length); + end = clamp(end, 0, this.length); + + var len = end - start; + if (len < 0) { + len = 0; + } + + return new this.constructor( + this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len); + }; + + return ctor; + } + + var Int8Array = makeConstructor(1, packI8, unpackI8); + var Uint8Array = makeConstructor(1, packU8, unpackU8); + var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8); + var Int16Array = makeConstructor(2, packI16, unpackI16); + var Uint16Array = makeConstructor(2, packU16, unpackU16); + var Int32Array = makeConstructor(4, packI32, unpackI32); + var Uint32Array = makeConstructor(4, packU32, unpackU32); + var Float32Array = makeConstructor(4, packF32, unpackF32); + var Float64Array = makeConstructor(8, packF64, unpackF64); + + exports.Int8Array = exports.Int8Array || Int8Array; + exports.Uint8Array = exports.Uint8Array || Uint8Array; + exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray; + exports.Int16Array = exports.Int16Array || Int16Array; + exports.Uint16Array = exports.Uint16Array || Uint16Array; + exports.Int32Array = exports.Int32Array || Int32Array; + exports.Uint32Array = exports.Uint32Array || Uint32Array; + exports.Float32Array = exports.Float32Array || Float32Array; + exports.Float64Array = exports.Float64Array || Float64Array; +}()); + +// +// 6 The DataView View Type +// + +(function() { + function r(array, index) { + return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index]; + } + + var IS_BIG_ENDIAN = (function() { + var u16array = new(exports.Uint16Array)([0x1234]), + u8array = new(exports.Uint8Array)(u16array.buffer); + return r(u8array, 0) === 0x12; + }()); + + // Constructor(ArrayBuffer buffer, + // optional unsigned long byteOffset, + // optional unsigned long byteLength) + /** @constructor */ + var DataView = function DataView(buffer, byteOffset, byteLength) { + if (arguments.length === 0) { + buffer = new exports.ArrayBuffer(0); + } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) { + throw new TypeError("TypeError"); + } + + this.buffer = buffer || new exports.ArrayBuffer(0); + + this.byteOffset = ECMAScript.ToUint32(byteOffset); + if (this.byteOffset > this.buffer.byteLength) { + throw new RangeError("byteOffset out of range"); + } + + if (arguments.length < 3) { + this.byteLength = this.buffer.byteLength - this.byteOffset; + } else { + this.byteLength = ECMAScript.ToUint32(byteLength); + } + + if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { + throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); + } + + configureProperties(this); + }; + + function makeGetter(arrayType) { + return function(byteOffset, littleEndian) { + + byteOffset = ECMAScript.ToUint32(byteOffset); + + if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { + throw new RangeError("Array index out of range"); + } + byteOffset += this.byteOffset; + + var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), + bytes = [], i; + for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { + bytes.push(r(uint8Array, i)); + } + + if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { + bytes.reverse(); + } + + return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0); + }; + } + + DataView.prototype.getUint8 = makeGetter(exports.Uint8Array); + DataView.prototype.getInt8 = makeGetter(exports.Int8Array); + DataView.prototype.getUint16 = makeGetter(exports.Uint16Array); + DataView.prototype.getInt16 = makeGetter(exports.Int16Array); + DataView.prototype.getUint32 = makeGetter(exports.Uint32Array); + DataView.prototype.getInt32 = makeGetter(exports.Int32Array); + DataView.prototype.getFloat32 = makeGetter(exports.Float32Array); + DataView.prototype.getFloat64 = makeGetter(exports.Float64Array); + + function makeSetter(arrayType) { + return function(byteOffset, value, littleEndian) { + + byteOffset = ECMAScript.ToUint32(byteOffset); + if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { + throw new RangeError("Array index out of range"); + } + + // Get bytes + var typeArray = new arrayType([value]), + byteArray = new exports.Uint8Array(typeArray.buffer), + bytes = [], i, byteView; + + for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { + bytes.push(r(byteArray, i)); + } + + // Flip if necessary + if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { + bytes.reverse(); + } + + // Write them + byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); + byteView.set(bytes); + }; + } + + DataView.prototype.setUint8 = makeSetter(exports.Uint8Array); + DataView.prototype.setInt8 = makeSetter(exports.Int8Array); + DataView.prototype.setUint16 = makeSetter(exports.Uint16Array); + DataView.prototype.setInt16 = makeSetter(exports.Int16Array); + DataView.prototype.setUint32 = makeSetter(exports.Uint32Array); + DataView.prototype.setInt32 = makeSetter(exports.Int32Array); + DataView.prototype.setFloat32 = makeSetter(exports.Float32Array); + DataView.prototype.setFloat64 = makeSetter(exports.Float64Array); + + exports.DataView = exports.DataView || DataView; + +}()); +}); +var typedarray_1 = typedarray.ArrayBuffer; +var typedarray_2 = typedarray.Int8Array; +var typedarray_3 = typedarray.Uint8Array; +var typedarray_4 = typedarray.Uint8ClampedArray; +var typedarray_5 = typedarray.Int16Array; +var typedarray_6 = typedarray.Uint16Array; +var typedarray_7 = typedarray.Int32Array; +var typedarray_8 = typedarray.Uint32Array; +var typedarray_9 = typedarray.Float32Array; +var typedarray_10 = typedarray.Float64Array; +var typedarray_11 = typedarray.DataView; + +var Writable = stream.Writable; + + + +if (typeof Uint8Array === 'undefined') { + var U8 = typedarray.Uint8Array; +} else { + var U8 = Uint8Array; +} + +function ConcatStream(opts, cb) { + if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb) + + if (typeof opts === 'function') { + cb = opts; + opts = {}; + } + if (!opts) opts = {}; + + var encoding = opts.encoding; + var shouldInferEncoding = false; + + if (!encoding) { + shouldInferEncoding = true; + } else { + encoding = String(encoding).toLowerCase(); + if (encoding === 'u8' || encoding === 'uint8') { + encoding = 'uint8array'; + } + } + + Writable.call(this, { objectMode: true }); + + this.encoding = encoding; + this.shouldInferEncoding = shouldInferEncoding; + + if (cb) this.on('finish', function () { cb(this.getBody()); }); + this.body = []; +} + +var concatStream = ConcatStream; +inherits(ConcatStream, Writable); + +ConcatStream.prototype._write = function(chunk, enc, next) { + this.body.push(chunk); + next(); +}; + +ConcatStream.prototype.inferEncoding = function (buff) { + var firstBuffer = buff === undefined ? this.body[0] : buff; + if (Buffer.isBuffer(firstBuffer)) return 'buffer' + if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array' + if (Array.isArray(firstBuffer)) return 'array' + if (typeof firstBuffer === 'string') return 'string' + if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object' + return 'buffer' +}; + +ConcatStream.prototype.getBody = function () { + if (!this.encoding && this.body.length === 0) return [] + if (this.shouldInferEncoding) this.encoding = this.inferEncoding(); + if (this.encoding === 'array') return arrayConcat(this.body) + if (this.encoding === 'string') return stringConcat(this.body) + if (this.encoding === 'buffer') return bufferConcat(this.body) + if (this.encoding === 'uint8array') return u8Concat(this.body) + return this.body +}; + +function isArrayish$1 (arr) { + return /Array\]$/.test(Object.prototype.toString.call(arr)) +} + +function isBufferish (p) { + return typeof p === 'string' || isArrayish$1(p) || (p && typeof p.subarray === 'function') +} + +function stringConcat (parts) { + var strings = []; + for (var i = 0; i < parts.length; i++) { + var p = parts[i]; + if (typeof p === 'string') { + strings.push(p); + } else if (Buffer.isBuffer(p)) { + strings.push(p); + } else if (isBufferish(p)) { + strings.push(bufferFrom_1(p)); + } else { + strings.push(bufferFrom_1(String(p))); + } + } + if (Buffer.isBuffer(parts[0])) { + strings = Buffer.concat(strings); + strings = strings.toString('utf8'); + } else { + strings = strings.join(''); + } + return strings +} + +function bufferConcat (parts) { + var bufs = []; + for (var i = 0; i < parts.length; i++) { + var p = parts[i]; + if (Buffer.isBuffer(p)) { + bufs.push(p); + } else if (isBufferish(p)) { + bufs.push(bufferFrom_1(p)); + } else { + bufs.push(bufferFrom_1(String(p))); + } + } + return Buffer.concat(bufs) +} + +function arrayConcat (parts) { + var res = []; + for (var i = 0; i < parts.length; i++) { + res.push.apply(res, parts[i]); + } + return res +} + +function u8Concat (parts) { + var len = 0; + for (var i = 0; i < parts.length; i++) { + if (typeof parts[i] === 'string') { + parts[i] = bufferFrom_1(parts[i]); + } + len += parts[i].length; + } + var u8 = new U8(len); + for (var i = 0, offset = 0; i < parts.length; i++) { + var part = parts[i]; + for (var j = 0; j < part.length; j++) { + u8[offset++] = part[j]; + } + } + return u8 +} + +var debug$1 = src('unified-engine:file-set-pipeline:stdin'); + + + +var stdin_1 = stdin; + +function stdin(context, settings, next) { + var streamIn = settings.streamIn; + var error; + + if (settings.files && settings.files.length !== 0) { + debug$1('Ignoring `streamIn`'); + + if (settings.filePath) { + error = new Error( + 'Do not pass both `--file-path` and real files.\nDid you mean to pass stdin instead of files?' + ); + } + + next(error); + + return + } + + if (streamIn.isTTY) { + debug$1('Cannot read from `tty` stream'); + next(new Error('No input')); + + return + } + + debug$1('Reading from `streamIn`'); + + streamIn.pipe(concatStream({encoding: 'string'}, read)); + + function read(value) { + var file = toVfile(settings.filePath || undefined); + + debug$1('Read from `streamIn`'); + + file.cwd = settings.cwd; + file.contents = value; + file.data.unifiedEngineGiven = true; + file.data.unifiedEngineStreamIn = true; + + context.files = [file]; + + // If `out` was not set, set `out`. + settings.out = + settings.out === null || settings.out === undefined ? true : settings.out; + + next(); + } +} + +var inherits$1 = util$1.inherits; + + + + +var fileSet = FileSet; + +// FileSet constructor. +function FileSet() { + var self = this; + + self.files = []; + self.origins = []; + + self.expected = 0; + self.actual = 0; + + self.pipeline = trough_1(); + self.plugins = []; + + events.init.call(self); + + self.on('one', one.bind(self)); +} + +// Events. +inherits$1(FileSet, events.EventEmitter); + +// Expose methods. +FileSet.prototype.valueOf = valueOf; +FileSet.prototype.use = use; +FileSet.prototype.add = add; + +// Create an array representation of `fileSet`. +function valueOf() { + return this.files +} + +// Attach middleware to the pipeline on `fileSet`. +function use(plugin) { + var self = this; + var pipeline = self.pipeline; + var duplicate = false; + + if (plugin && plugin.pluginId) { + duplicate = self.plugins.some(matches); + } + + if (!duplicate && self.plugins.indexOf(plugin) !== -1) { + duplicate = true; + } + + if (!duplicate) { + self.plugins.push(plugin); + pipeline.use(plugin); + } + + return self + + function matches(fn) { + return fn.pluginId === plugin.pluginId + } +} + +// Add a file to be processed. +// Ignores duplicate files (based on the `filePath` at time of addition). +// Only runs `file-pipeline` on files which have not `failed` before addition. +function add(file) { + var self = this; + var origin; + + if (xIsString(file)) { + file = toVfile(file); + } + + // Prevent files from being added multiple times. + origin = file.history[0]; + + if (self.origins.indexOf(origin) !== -1) { + return self + } + + self.origins.push(origin); + + // Add. + self.valueOf().push(file); + self.expected++; + + // Force an asynchronous operation. + // This ensures that files which fall through the file pipeline immediately + // (such as, when already fatally failed) still queue up correctly. + setImmediate(add); + + return self + + function add() { + self.emit('add', file); + } +} + +// Utility invoked when a single file has completed it's pipeline, triggering +// `done` when all files are complete. +function one() { + var self = this; + + self.actual++; + + if (self.actual >= self.expected) { + self.emit('done'); + } +} + +var debug$2 = src('unified-engine:file-pipeline:read'); + + +var read_1$1 = read$3; + +var resolve$4 = path$1.resolve; +var readFile = fs$1.readFile; + +// Fill a file with its contents when not already filled. +function read$3(context, file, fileSet, next) { + var filePath = file.path; + + if (file.contents || file.data.unifiedEngineStreamIn) { + debug$2('Not reading file `%s` with contents', filePath); + next(); + } else if (vfileStatistics(file).fatal) { + debug$2('Not reading failed file `%s`', filePath); + next(); + } else { + filePath = resolve$4(context.cwd, filePath); + + debug$2('Reading `%s` in `%s`', filePath, 'utf8'); + readFile(filePath, 'utf8', onread); + } + + function onread(error, contents) { + debug$2('Read `%s` (error: %s)', filePath, error); + + file.contents = contents || ''; + + next(error); + } +} + +var fnName = function (fn) { + if (typeof fn !== 'function') { + throw new TypeError('Expected a function'); + } + + return fn.displayName || fn.name || (/function ([^\(]+)?\(/.exec(fn.toString()) || [])[1] || null; +}; + +/** + * Has own property. + * + * @type {Function} + */ + +var has = Object.prototype.hasOwnProperty; + +/** + * To string. + * + * @type {Function} + */ + +var toString$3 = Object.prototype.toString; + +/** + * Test whether a value is "empty". + * + * @param {Mixed} val + * @return {Boolean} + */ + +function isEmpty(val) { + // Null and Undefined... + if (val == null) return true + + // Booleans... + if ('boolean' == typeof val) return false + + // Numbers... + if ('number' == typeof val) return val === 0 + + // Strings... + if ('string' == typeof val) return val.length === 0 + + // Functions... + if ('function' == typeof val) return val.length === 0 + + // Arrays... + if (Array.isArray(val)) return val.length === 0 + + // Errors... + if (val instanceof Error) return val.message === '' + + // Objects... + if (val.toString == toString$3) { + switch (val.toString()) { + + // Maps, Sets, Files and Errors... + case '[object File]': + case '[object Map]': + case '[object Set]': { + return val.size === 0 + } + + // Plain objects... + case '[object Object]': { + for (var key in val) { + if (has.call(val, key)) return false + } + + return true + } + } + } + + // Anything else... + return false +} + +/** + * Export `isEmpty`. + * + * @type {Function} + */ + +var lib = isEmpty; + +var debug$3 = src('unified-engine:file-pipeline:configure'); + + + + + +var configure_1$1 = configure$1; + +// Collect configuration for a file based on the context. +function configure$1(context, file, fileSet, next) { + var config = context.configuration; + var processor = context.processor; + + if (vfileStatistics(file).fatal) { + return next() + } + + config.load(file.path, handleConfiguration); + + function handleConfiguration(error, configuration) { + var plugins; + var options; + var plugin; + var length; + var index; + var name; + + if (error) { + return next(error) + } + + // Store configuration on the context object. + debug$3('Using settings `%j`', configuration.settings); + processor.data('settings', configuration.settings); + + plugins = configuration.plugins; + length = plugins.length; + index = -1; + + debug$3('Using `%d` plugins', length); + + while (++index < length) { + plugin = plugins[index][0]; + options = plugins[index][1]; + + if (options === false) { + continue + } + + // Allow for default arguments in es2020. + if (options === null || (isObject$1(options) && lib(options))) { + options = undefined; + } + + name = fnName(plugin) || 'function'; + debug$3('Using plugin `%s`, with options `%j`', name, options); + + try { + processor.use(plugin, options, fileSet); + } catch (error2) { + /* istanbul ignore next - Should not happen anymore! */ + return next(error2) + } + } + + next(); + } +} + +var debug$4 = src('unified-engine:file-pipeline:parse'); + + + +var parse_1 = parse$3; + +// Fill a file with a tree. +function parse$3(context, file) { + var message; + + if (vfileStatistics(file).fatal) { + return + } + + if (context.treeIn) { + debug$4('Not parsing already parsed document'); + + try { + context.tree = parseJson$1(file.toString()); + } catch (error) { + message = file.message( + new Error('Cannot read file as JSON\n' + error.message) + ); + message.fatal = true; + } + + // Add the preferred extension to ensure the file, when compiled, is correctly + // recognised. + // Only add it if there is a path — not if the file is for example stdin. + if (file.path) { + file.extname = context.extensions[0]; + } + + file.contents = ''; + + return + } + + debug$4('Parsing `%s`', file.path); + + context.tree = context.processor.parse(file); + + debug$4('Parsed document'); +} + +var debug$5 = src('unified-engine:file-pipeline:transform'); + + +var transform_1 = transform; + +// Transform the tree associated with a file with configured plugins. +function transform(context, file, fileSet, next) { + if (vfileStatistics(file).fatal) { + next(); + } else { + debug$5('Transforming document `%s`', file.path); + context.processor.run(context.tree, file, onrun); + } + + function onrun(error, node) { + debug$5('Transformed document (error: %s)', error); + context.tree = node; + next(error); + } +} + +var debug$6 = src('unified-engine:file-pipeline:queue'); + + +var queue_1 = queue; + +// Queue all files which came this far. +// When the last file gets here, run the file-set pipeline and flush the queue. +function queue(context, file, fileSet, next) { + var origin = file.history[0]; + var map = fileSet.complete; + var complete = true; + + if (!map) { + map = {}; + fileSet.complete = map; + } + + debug$6('Queueing `%s`', origin); + + map[origin] = next; + + fileSet.valueOf().forEach(each); + + if (!complete) { + debug$6('Not flushing: some files cannot be flushed'); + return + } + + fileSet.complete = {}; + + fileSet.pipeline.run(fileSet, done); + + function each(file) { + var key = file.history[0]; + + if (vfileStatistics(file).fatal) { + return + } + + if (typeof map[key] === 'function') { + debug$6('`%s` can be flushed', key); + } else { + debug$6('Interupting flush: `%s` is not finished', key); + complete = false; + } + } + + function done(error) { + debug$6('Flushing: all files can be flushed'); + + // Flush. + for (origin in map) { + map[origin](error); + } + } +} + +// Detect color support. +var color = true; + +try { + color = 'inspect' in util$1; +} catch (error) { + /* istanbul ignore next - browser */ + color = false; +} + +var unistUtilInspect = color ? inspect : /* istanbul ignore next */ noColor; + +inspect.color = inspect; +noColor.color = inspect; +inspect.noColor = noColor; +noColor.noColor = noColor; + +var dim = ansiColor(2, 22); +var yellow = ansiColor(33, 39); +var green = ansiColor(32, 39); + +// Define ANSII color removal functionality. +var colorExpression = new RegExp( + '(?:' + + '(?:\\u001b\\[)|' + + '\\u009b' + + ')' + + '(?:' + + '(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m]' + + ')|' + + '\\u001b[A-M]', + 'g' +); + +// Standard keys defined by unist: https://github.com/syntax-tree/unist. +// We don’t ignore `data` though. +var ignore$2 = ['type', 'value', 'children', 'position']; + +// Inspects a node, without using color. +function noColor(node, pad) { + return stripColor(inspect(node, pad)) +} + +// Inspects a node. +function inspect(node, pad) { + var result; + var children; + var index; + var length; + + if (node && Boolean(node.length) && typeof node !== 'string') { + length = node.length; + index = -1; + result = []; + + while (++index < length) { + result[index] = inspect(node[index]); + } + + return result.join('\n') + } + + if (!node || !node.type) { + return String(node) + } + + result = [formatNode(node)]; + children = node.children; + length = children && children.length; + index = -1; + + if (!length) { + return result[0] + } + + if (!pad || typeof pad === 'number') { + pad = ''; + } + + while (++index < length) { + node = children[index]; + + if (index === length - 1) { + result.push(formatNesting(pad + '└─ ') + inspect(node, pad + ' ')); + } else { + result.push(formatNesting(pad + '├─ ') + inspect(node, pad + '│ ')); + } + } + + return result.join('\n') +} + +// Colored nesting formatter. +function formatNesting(value) { + return dim(value) +} + +// Compile a single position. +function compile(pos) { + var values = []; + + if (!pos) { + return null + } + + values = [[pos.line || 1, pos.column || 1].join(':')]; + + if ('offset' in pos) { + values.push(String(pos.offset || 0)); + } + + return values +} + +// Compile a location. +function stringify$1(start, end) { + var values = []; + var positions = []; + var offsets = []; + + add(start); + add(end); + + if (positions.length !== 0) { + values.push(positions.join('-')); + } + + if (offsets.length !== 0) { + values.push(offsets.join('-')); + } + + return values.join(', ') + + // Add a position. + function add(position) { + var tuple = compile(position); + + if (tuple) { + positions.push(tuple[0]); + + if (tuple[1]) { + offsets.push(tuple[1]); + } + } + } +} + +// Colored node formatter. +function formatNode(node) { + var log = node.type; + var location = node.position || {}; + var position = stringify$1(location.start, location.end); + var key; + var values = []; + var value; + + if (node.children) { + log += dim('[') + yellow(node.children.length) + dim(']'); + } else if (typeof node.value === 'string') { + log += dim(': ') + green(JSON.stringify(node.value)); + } + + if (position) { + log += ' (' + position + ')'; + } + + for (key in node) { + value = node[key]; + + if ( + ignore$2.indexOf(key) !== -1 || + value === null || + value === undefined || + (typeof value === 'object' && lib(value)) + ) { + continue + } + + values.push('[' + key + '=' + JSON.stringify(value) + ']'); + } + + if (values.length !== 0) { + log += ' ' + values.join(''); + } + + return log +} + +// Remove ANSI colour from `value`. +function stripColor(value) { + return value.replace(colorExpression, '') +} + +// Factory to wrap values in ANSI colours. +function ansiColor(open, close) { + return color + + function color(value) { + return '\u001B[' + open + 'm' + value + '\u001B[' + close + 'm' + } +} + +var debug$7 = src('unified-engine:file-pipeline:stringify'); + + + +var stringify_1 = stringify$2; + +// Stringify a tree. +function stringify$2(context, file) { + var processor = context.processor; + var tree = context.tree; + var value; + + if (vfileStatistics(file).fatal) { + debug$7('Not compiling failed document'); + return + } + + if (!context.output && !context.out && !context.alwaysStringify) { + debug$7('Not compiling document without output settings'); + return + } + + debug$7('Compiling `%s`', file.path); + + if (context.inspect) { + // Add a `txt` extension if there is a path. + if (file.path) { + file.extname = '.txt'; + } + + value = unistUtilInspect[context.color ? 'color' : 'noColor'](tree) + '\n'; + } else if (context.treeOut) { + // Add a `json` extension to ensure the file is correctly seen as JSON. + // Only add it if there is a path — not if the file is for example stdin. + if (file.path) { + file.extname = '.json'; + } + + // Add the line feed to create a valid UNIX file. + value = JSON.stringify(tree, null, 2) + '\n'; + } else { + value = processor.stringify(tree, file); + } + + file.contents = value; + + debug$7('Compiled document'); +} + +var debug$8 = src('unified-engine:file-pipeline:copy'); + + +var copy_1 = copy; + +var stat$1 = fs$1.stat; +var dirname$2 = path$1.dirname; +var resolve$5 = path$1.resolve; +var relative$3 = path$1.relative; + +// Move a file. +function copy(context, file, fileSet, next) { + var output = context.output; + var multi = fileSet.expected > 1; + var outpath = output; + var currentPath = file.path; + + if (!xIsString(outpath)) { + debug$8('Not copying'); + return next() + } + + outpath = resolve$5(context.cwd, outpath); + + debug$8('Copying `%s`', currentPath); + + stat$1(outpath, onstatfile); + + function onstatfile(error, stats) { + if (error) { + if ( + error.code !== 'ENOENT' || + output.charAt(output.length - 1) === path$1.sep + ) { + return next( + new Error('Cannot read output directory. Error:\n' + error.message) + ) + } + + stat$1(dirname$2(outpath), onstatparent); + } else { + done(stats.isDirectory()); + } + } + + // This is either given an error, or the parent exists which is a directory, + // but we should keep the basename of the given file. + function onstatparent(error) { + if (error) { + next(new Error('Cannot read parent directory. Error:\n' + error.message)); + } else { + done(false); + } + } + + function done(directory) { + if (!directory && multi) { + return next( + new Error('Cannot write multiple files to single output: ' + outpath) + ) + } + + file[directory ? 'dirname' : 'path'] = relative$3(file.cwd, outpath); + + debug$8('Copying document from %s to %s', currentPath, file.path); + + next(); + } +} + +var debug$9 = src('unified-engine:file-pipeline:stdout'); + + +var stdout_1 = stdout; + +// Write a virtual file to `streamOut`. +// Ignored when `output` is given, more than one file was processed, or `out` +// is false. +function stdout(context, file, fileSet, next) { + if (!file.data.unifiedEngineGiven) { + debug$9('Ignoring programmatically added file'); + next(); + } else if (vfileStatistics(file).fatal || context.output || !context.out) { + debug$9('Ignoring writing to `streamOut`'); + next(); + } else { + debug$9('Writing document to `streamOut`'); + context.streamOut.write(file.toString(), next); + } +} + +var debug$a = src('unified-engine:file-pipeline:file-system'); + + +var fileSystem_1$1 = fileSystem$1; + +var writeFile = fs$1.writeFile; +var resolve$6 = path$1.resolve; + +// Write a virtual file to the file-system. +// Ignored when `output` is not given. +function fileSystem$1(context, file, fileSet, next) { + var destinationPath; + + if (!context.output) { + debug$a('Ignoring writing to file-system'); + return next() + } + + if (!file.data.unifiedEngineGiven) { + debug$a('Ignoring programmatically added file'); + return next() + } + + destinationPath = file.path; + + if (!destinationPath) { + debug$a('Cannot write file without a `destinationPath`'); + return next(new Error('Cannot write file without an output path')) + } + + if (vfileStatistics(file).fatal) { + debug$a('Cannot write file with a fatal error'); + return next() + } + + destinationPath = resolve$6(context.cwd, destinationPath); + debug$a('Writing document to `%s`', destinationPath); + + file.stored = true; + + writeFile(destinationPath, file.toString(), next); +} + +// This pipeline ensures each of the pipes always runs: even if the read pipe +// fails, queue and write run. +var filePipeline = trough_1() + .use( + chunk( + trough_1() + .use(read_1$1) + .use(configure_1$1) + .use(parse_1) + .use(transform_1) + ) + ) + .use(chunk(trough_1().use(queue_1))) + .use( + chunk( + trough_1() + .use(stringify_1) + .use(copy_1) + .use(stdout_1) + .use(fileSystem_1$1) + ) + ); + +// Factory to run a pipe. +// Wraps a pipe to trigger an error on the `file` in `context`, but still call +// `next`. +function chunk(pipe) { + return run + + // Run the bound bound pipe and handles any errors. + function run(context, file, fileSet, next) { + pipe.run(context, file, fileSet, one); + + function one(error) { + var messages = file.messages; + var index; + + if (error) { + index = messages.indexOf(error); + + if (index === -1) { + error = file.message(error); + index = messages.length - 1; + } + + messages[index].fatal = true; + } + + next(); + } + } +} + +var transform_1$1 = transform$1; + +// Transform all files. +function transform$1(context, settings, next) { + var fileSet$1 = new fileSet(); + + context.fileSet = fileSet$1; + + fileSet$1.on('add', add).on('done', next); + + if (context.files.length === 0) { + next(); + } else { + context.files.forEach(fileSet$1.add, fileSet$1); + } + + function add(file) { + filePipeline.run( + { + configuration: context.configuration, + processor: settings.processor(), + cwd: settings.cwd, + extensions: settings.extensions, + pluginPrefix: settings.pluginPrefix, + treeIn: settings.treeIn, + treeOut: settings.treeOut, + inspect: settings.inspect, + color: settings.color, + out: settings.out, + output: settings.output, + streamOut: settings.streamOut, + alwaysStringify: settings.alwaysStringify + }, + file, + fileSet$1, + done + ); + + function done(error) { + /* istanbul ignore next - Does not occur as all failures in `filePipeLine` + * are failed on each file. + * Still, just to ensure things work in the future, we add an extra + * check. */ + if (error) { + error = file.message(error); + error.fatal = true; + } + + fileSet$1.emit('one', file); + } + } +} + +const {env: env$1} = process; + +let forceColor$1; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false') || + hasFlag('color=never')) { + forceColor$1 = 0; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor$1 = 1; +} +if ('FORCE_COLOR' in env$1) { + if (env$1.FORCE_COLOR === true || env$1.FORCE_COLOR === 'true') { + forceColor$1 = 1; + } else if (env$1.FORCE_COLOR === false || env$1.FORCE_COLOR === 'false') { + forceColor$1 = 0; + } else { + forceColor$1 = env$1.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env$1.FORCE_COLOR, 10), 3); + } +} + +function translateLevel$1(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor$1(stream) { + if (forceColor$1 === 0) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor$1 === undefined) { + return 0; + } + + const min = forceColor$1 || 0; + + if (env$1.TERM === 'dumb') { + return min; + } + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(process.versions.node.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env$1) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env$1) || env$1.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env$1) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env$1.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env$1) { + const version = parseInt((env$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env$1.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env$1.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) { + return 1; + } + + if ('COLORTERM' in env$1) { + return 1; + } + + return min; +} + +function getSupportLevel$1(stream) { + const level = supportsColor$1(stream); + return translateLevel$1(level); +} + +var supportsColor_1$1 = { + supportsColor: getSupportLevel$1, + stdout: getSupportLevel$1(process.stdout), + stderr: getSupportLevel$1(process.stderr) +}; + +var ansiRegex = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; + +var stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; + +/* eslint-disable yoda */ + +const isFullwidthCodePoint = codePoint => { + if (Number.isNaN(codePoint)) { + return false; + } + + // Code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if ( + codePoint >= 0x1100 && ( + codePoint <= 0x115F || // Hangul Jamo + codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET + codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + (0x3250 <= codePoint && codePoint <= 0x4DBF) || + // CJK Unified Ideographs .. Yi Radicals + (0x4E00 <= codePoint && codePoint <= 0xA4C6) || + // Hangul Jamo Extended-A + (0xA960 <= codePoint && codePoint <= 0xA97C) || + // Hangul Syllables + (0xAC00 <= codePoint && codePoint <= 0xD7A3) || + // CJK Compatibility Ideographs + (0xF900 <= codePoint && codePoint <= 0xFAFF) || + // Vertical Forms + (0xFE10 <= codePoint && codePoint <= 0xFE19) || + // CJK Compatibility Forms .. Small Form Variants + (0xFE30 <= codePoint && codePoint <= 0xFE6B) || + // Halfwidth and Fullwidth Forms + (0xFF01 <= codePoint && codePoint <= 0xFF60) || + (0xFFE0 <= codePoint && codePoint <= 0xFFE6) || + // Kana Supplement + (0x1B000 <= codePoint && codePoint <= 0x1B001) || + // Enclosed Ideographic Supplement + (0x1F200 <= codePoint && codePoint <= 0x1F251) || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + (0x20000 <= codePoint && codePoint <= 0x3FFFD) + ) + ) { + return true; + } + + return false; +}; + +var isFullwidthCodePoint_1 = isFullwidthCodePoint; +var default_1 = isFullwidthCodePoint; +isFullwidthCodePoint_1.default = default_1; + +var emojiRegex = function () { + // https://mths.be/emoji + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; +}; + +const stringWidth = string => { + string = string.replace(emojiRegex(), ' '); + + if (typeof string !== 'string' || string.length === 0) { + return 0; + } + + string = stripAnsi(string); + + let width = 0; + + for (let i = 0; i < string.length; i++) { + const code = string.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint_1(code) ? 2 : 1; + } + + return width; +}; + +var stringWidth_1 = stringWidth; +// TODO: remove this in the next major version +var default_1$1 = stringWidth; +stringWidth_1.default = default_1$1; + +/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +/** + * Results cache + */ + +var res = ''; +var cache; + +/** + * Expose `repeat` + */ + +var repeatString = repeat$1; + +/** + * Repeat the given `string` the specified `number` + * of times. + * + * **Example:** + * + * ```js + * var repeat = require('repeat-string'); + * repeat('A', 5); + * //=> AAAAA + * ``` + * + * @param {String} `string` The string to repeat + * @param {Number} `number` The number of times to repeat the string + * @return {String} Repeated string + * @api public + */ + +function repeat$1(str, num) { + if (typeof str !== 'string') { + throw new TypeError('expected a string'); + } + + // cover common, quick use cases + if (num === 1) return str; + if (num === 2) return str + str; + + var max = str.length * num; + if (cache !== str || typeof cache === 'undefined') { + cache = str; + res = ''; + } else if (res.length >= max) { + return res.substr(0, max); + } + + while (max > res.length && num > 1) { + if (num & 1) { + res += str; + } + + num >>= 1; + str += str; + } + + res += str; + res = res.substr(0, max); + return res; +} + +var vfileSort = sort; + +var severities = { + true: 2, + false: 1, + null: 0, + undefined: 0 +}; + +function sort(file) { + file.messages.sort(comparator); + return file +} + +function comparator(a, b) { + return ( + check$1(a, b, 'line') || + check$1(a, b, 'column') || + severities[b.fatal] - severities[a.fatal] || + compare(a, b, 'source') || + compare(a, b, 'ruleId') || + compare(a, b, 'reason') || + 0 + ) +} + +function check$1(a, b, property) { + return (a[property] || 0) - (b[property] || 0) +} + +function compare(a, b, property) { + return (a[property] || '').localeCompare(b[property] || '') +} + +var supported = supportsColor_1$1.stderr.hasBasic; + + + + + + +var vfileReporter = reporter; + +// Check which characters should be used. +var windows$1 = process.platform === 'win32'; +// `log-symbols` without chalk: +/* istanbul ignore next - Windows. */ +var chars = windows$1 ? {error: '×', warning: '‼'} : {error: '✖', warning: '⚠'}; + +// Match trailing white-space. +var trailing = /\s*$/; + +// Default filename. +var DEFAULT = ''; + +var noop = {open: '', close: ''}; + +var colors = { + underline: {open: '\u001B[4m', close: '\u001B[24m'}, + red: {open: '\u001B[31m', close: '\u001B[39m'}, + yellow: {open: '\u001B[33m', close: '\u001B[39m'}, + green: {open: '\u001B[32m', close: '\u001B[39m'} +}; + +var noops = { + underline: noop, + red: noop, + yellow: noop, + green: noop +}; + +var labels = { + true: 'error', + false: 'warning', + null: 'info', + undefined: 'info' +}; + +// Report a file’s messages. +function reporter(files, options) { + var settings = options || {}; + var one; + + if (!files) { + return '' + } + + // Error. + if ('name' in files && 'message' in files) { + return String(files.stack || files) + } + + // One file. + if (!('length' in files)) { + one = true; + files = [files]; + } + + return compile$1(parse$4(filter$1(files, settings), settings), one, settings) +} + +function filter$1(files, options) { + var result = []; + var length = files.length; + var index = -1; + var file; + + if (!options.quiet && !options.silent) { + return files.concat() + } + + while (++index < length) { + file = files[index]; + + if (applicable(file, options).length !== 0) { + result.push(file); + } + } + + return result +} + +function parse$4(files, options) { + var length = files.length; + var index = -1; + var rows = []; + var all = []; + var locationSize = 0; + var labelSize = 0; + var reasonSize = 0; + var ruleIdSize = 0; + var file; + var destination; + var origin; + var messages; + var offset; + var count; + var message; + var loc; + var reason; + var label; + var id; + + while (++index < length) { + file = files[index]; + destination = file.path; + origin = file.history[0] || destination; + messages = vfileSort({messages: applicable(file, options)}).messages; + + if (rows.length !== 0 && rows[rows.length - 1].type !== 'header') { + rows.push({type: 'separator'}); + } + + rows.push({ + type: 'header', + origin: origin, + destination: destination, + name: origin || options.defaultName || DEFAULT, + stored: Boolean(file.stored), + moved: Boolean(file.stored && destination !== origin), + stats: vfileStatistics(messages) + }); + + offset = -1; + count = messages.length; + + while (++offset < count) { + message = messages[offset]; + id = message.ruleId || ''; + reason = message.stack || message.message; + loc = message.location; + loc = unistUtilStringifyPosition(loc.end.line && loc.end.column ? loc : loc.start); + + if (options.verbose && message.note) { + reason += '\n' + message.note; + } + + label = labels[message.fatal]; + + rows.push({ + location: loc, + label: label, + reason: reason, + ruleId: id, + source: message.source + }); + + locationSize = Math.max(realLength(loc), locationSize); + labelSize = Math.max(realLength(label), labelSize); + reasonSize = Math.max(realLength(reason), reasonSize); + ruleIdSize = Math.max(realLength(id), ruleIdSize); + } + + all = all.concat(messages); + } + + return { + rows: rows, + statistics: vfileStatistics(all), + location: locationSize, + label: labelSize, + reason: reasonSize, + ruleId: ruleIdSize + } +} + +// eslint-disable-next-line complexity +function compile$1(map, one, options) { + var enabled = options.color; + var all = map.statistics; + var rows = map.rows; + var length = rows.length; + var index = -1; + var lines = []; + var row; + var line; + var style; + var color; + var reason; + var rest; + var position; + + if (enabled === null || enabled === undefined) { + enabled = supported; + } + + style = enabled ? colors : noops; + + while (++index < length) { + row = rows[index]; + + if (row.type === 'separator') { + lines.push(''); + } else if (row.type === 'header') { + if (one && !options.defaultName && !row.origin) { + line = ''; + } else { + color = + style[row.stats.fatal ? 'red' : row.stats.total ? 'yellow' : 'green']; + line = + style.underline.open + + color.open + + row.name + + color.close + + style.underline.close; + line += row.moved ? ' > ' + row.destination : ''; + } + + if (!row.stats.total) { + line += line ? ': ' : ''; + + if (row.stored) { + line += style.yellow.open + 'written' + style.yellow.close; + } else { + line += 'no issues found'; + } + } + + if (line) { + lines.push(line); + } + } else { + color = style[row.label === 'error' ? 'red' : 'yellow']; + + reason = row.reason; + rest = ''; + position = reason.indexOf('\n'); + + if (position !== -1) { + rest = reason.slice(position); + reason = reason.slice(0, position); + } + + lines.push( + [ + '', + padLeft(row.location, map.location), + padRight(color.open + row.label + color.close, map.label), + padRight(reason, map.reason), + padRight(row.ruleId, map.ruleId), + row.source || '' + ] + .join(' ') + .replace(trailing, '') + rest + ); + } + } + + if (all.fatal || all.warn) { + line = []; + + if (all.fatal) { + line.push( + [ + style.red.open + chars.error + style.red.close, + all.fatal, + plural$1(labels.true, all.fatal) + ].join(' ') + ); + } + + if (all.warn) { + line.push( + [ + style.yellow.open + chars.warning + style.yellow.close, + all.warn, + plural$1(labels.false, all.warn) + ].join(' ') + ); + } + + line = line.join(', '); + + if (all.total !== all.fatal && all.total !== all.warn) { + line = all.total + ' messages (' + line + ')'; + } + + lines.push('', line); + } + + return lines.join('\n') +} + +function applicable(file, options) { + var messages = file.messages; + var length = messages.length; + var index = -1; + var result = []; + + if (options.silent) { + while (++index < length) { + if (messages[index].fatal) { + result.push(messages[index]); + } + } + } else { + result = messages.concat(); + } + + return result +} + +// Get the length of `value`, ignoring ANSI sequences. +function realLength(value) { + var length = value.indexOf('\n'); + return stringWidth_1(length === -1 ? value : value.slice(0, length)) +} + +// Pad `value` on the left. +function padLeft(value, minimum) { + return repeatString(' ', minimum - realLength(value)) + value +} + +// Pad `value` on the right. +function padRight(value, minimum) { + return value + repeatString(' ', minimum - realLength(value)) +} + +function plural$1(value, count) { + return count === 1 ? value : value + 's' +} + +var log_1 = log; + +var prefix$1 = 'vfile-reporter'; + +function log(context, settings, next) { + var reporter = settings.reporter || vfileReporter; + var diagnostics; + + if (xIsString(reporter)) { + try { + reporter = loadPlugin_1(reporter, {cwd: settings.cwd, prefix: prefix$1}); + } catch (error) { + next(new Error('Could not find reporter `' + reporter + '`')); + return + } + } + + diagnostics = reporter( + context.files.filter(given), + immutable(settings.reporterOptions, { + quiet: settings.quiet, + silent: settings.silent, + color: settings.color + }) + ); + + if (diagnostics) { + if (diagnostics.charAt(diagnostics.length - 1) !== '\n') { + diagnostics += '\n'; + } + + settings.streamError.write(diagnostics, next); + } else { + next(); + } +} + +function given(file) { + return file.data.unifiedEngineGiven +} + +var fileSetPipeline = trough_1() + .use(configure_1) + .use(fileSystem_1) + .use(stdin_1) + .use(transform_1$1) + .use(log_1); + +var PassThrough = stream.PassThrough; + + + +var lib$1 = run; + +// Run the file set pipeline once. +// `callback` is invoked with a fatal error, or with a status code (`0` on +// success, `1` on failure). +function run(options, callback) { + var settings = {}; + var stdin = new PassThrough(); + var tree; + var detectConfig; + var hasConfig; + var detectIgnore; + var hasIgnore; + + try { + stdin = process.stdin; + } catch (error) { + // Obscure bug in Node (seen on Windows). + // See: , + // . + } + + if (!callback) { + throw new Error('Missing `callback`') + } + + if (!options || !options.processor) { + return next(new Error('Missing `processor`')) + } + + // Processor. + settings.processor = options.processor; + + // Path to run as. + settings.cwd = options.cwd || process.cwd(); + + // Input. + settings.files = options.files || []; + settings.extensions = (options.extensions || []).map(extension); + + settings.filePath = options.filePath || null; + settings.streamIn = options.streamIn || stdin; + + // Output. + settings.streamOut = options.streamOut || process.stdout; + settings.streamError = options.streamError || process.stderr; + settings.alwaysStringify = options.alwaysStringify; + settings.output = options.output; + settings.out = options.out; + + // Null overwrites config settings, `undefined` does not. + if (settings.output === null || settings.output === undefined) { + settings.output = undefined; + } + + if (settings.output && settings.out) { + return next(new Error('Cannot accept both `output` and `out`')) + } + + // Process phase management. + tree = options.tree || false; + + settings.treeIn = options.treeIn; + settings.treeOut = options.treeOut; + settings.inspect = options.inspect; + + if (settings.treeIn === null || settings.treeIn === undefined) { + settings.treeIn = tree; + } + + if (settings.treeOut === null || settings.treeOut === undefined) { + settings.treeOut = tree; + } + + // Configuration. + detectConfig = options.detectConfig; + hasConfig = Boolean(options.rcName || options.packageField); + + if (detectConfig && !hasConfig) { + return next( + new Error('Missing `rcName` or `packageField` with `detectConfig`') + ) + } + + settings.detectConfig = + detectConfig === null || detectConfig === undefined + ? hasConfig + : detectConfig; + settings.rcName = options.rcName || null; + settings.rcPath = options.rcPath || null; + settings.packageField = options.packageField || null; + settings.settings = options.settings || {}; + settings.configTransform = options.configTransform; + settings.defaultConfig = options.defaultConfig; + + // Ignore. + detectIgnore = options.detectIgnore; + hasIgnore = Boolean(options.ignoreName); + + settings.detectIgnore = + detectIgnore === null || detectIgnore === undefined + ? hasIgnore + : detectIgnore; + settings.ignoreName = options.ignoreName || null; + settings.ignorePath = options.ignorePath || null; + settings.ignorePatterns = options.ignorePatterns || []; + settings.silentlyIgnore = Boolean(options.silentlyIgnore); + + if (detectIgnore && !hasIgnore) { + return next(new Error('Missing `ignoreName` with `detectIgnore`')) + } + + // Plugins. + settings.pluginPrefix = options.pluginPrefix || null; + settings.plugins = options.plugins || {}; + + // Reporting. + settings.reporter = options.reporter || null; + settings.reporterOptions = options.reporterOptions || null; + settings.color = options.color || false; + settings.silent = options.silent || false; + settings.quiet = options.quiet || false; + settings.frail = options.frail || false; + + // Process. + fileSetPipeline.run({files: options.files || []}, settings, next); + + function next(error, context) { + var stats = vfileStatistics((context || {}).files); + var failed = Boolean( + settings.frail ? stats.fatal || stats.warn : stats.fatal + ); + + if (error) { + callback(error); + } else { + callback(null, failed ? 1 : 0, context); + } + } +} + +function extension(ext) { + return ext.charAt(0) === '.' ? ext : '.' + ext +} + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +var escapeStringRegexp = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; + +var colorName = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; + +var conversions = createCommonjsModule(function (module) { +/* MIT license */ + + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +var reverseKeywords = {}; +for (var key in colorName) { + if (colorName.hasOwnProperty(key)) { + reverseKeywords[colorName[key]] = key; + } +} + +var convert = module.exports = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +// hide .channels and .labels properties +for (var model in convert) { + if (convert.hasOwnProperty(model)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + var channels = convert[model].channels; + var labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); + } +} + +convert.rgb.hsl = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + var rdif; + var gdif; + var bdif; + var h; + var s; + + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var v = Math.max(r, g, b); + var diff = v - Math.min(r, g, b); + var diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +/** + * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + * */ +function comparativeDistance(x, y) { + return ( + Math.pow(x[0] - y[0], 2) + + Math.pow(x[1] - y[1], 2) + + Math.pow(x[2] - y[2], 2) + ); +} + +convert.rgb.keyword = function (rgb) { + var reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + var currentClosestDistance = Infinity; + var currentClosestKeyword; + + for (var keyword in colorName) { + if (colorName.hasOwnProperty(keyword)) { + var value = colorName[keyword]; + + // Compute comparative distance + var distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return colorName[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + + // assume sRGB + r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); + g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); + b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); + + var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + t1 = 2 * l - t2; + + rgb = [0, 0, 0]; + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - (s * f)); + var t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; + + // wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + n = wh + f * (v - wh); // linear interpolation + + var r; + var g; + var b; + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // assume sRGB + r = r > 0.0031308 + ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + var ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + + // we use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + var ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + var color = args % 10; + + // handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + var mult = (~~(args > 50) + 1) * 0.5; + var r = ((color & 1) * mult) * 255; + var g = (((color >> 1) & 1) * mult) * 255; + var b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // handle greyscale + if (args >= 232) { + var c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + var rem; + var r = Math.floor(args / 36) / 5 * 255; + var g = Math.floor((rem = args % 36) / 6) / 5 * 255; + var b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + var integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + var colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(function (char) { + return char + char; + }).join(''); + } + + var integer = parseInt(colorString, 16); + var r = (integer >> 16) & 0xFF; + var g = (integer >> 8) & 0xFF; + var b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = (max - min); + var grayscale; + var hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + + if (l < 0.5) { + c = 2.0 * s * l; + } else { + c = 2.0 * s * (1.0 - l); + } + + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + + var c = s * v; + var f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + var pure = [0, 0, 0]; + var hi = (h % 1) * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var v = c + g * (1.0 - c); + var f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var l = g * (1.0 - c) + 0.5 * c; + var s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = convert.gray.hsv = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + var val = Math.round(gray[0] / 100 * 255) & 0xFF; + var integer = (val << 16) + (val << 8) + val; + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; +}); +var conversions_1 = conversions.rgb; +var conversions_2 = conversions.hsl; +var conversions_3 = conversions.hsv; +var conversions_4 = conversions.hwb; +var conversions_5 = conversions.cmyk; +var conversions_6 = conversions.xyz; +var conversions_7 = conversions.lab; +var conversions_8 = conversions.lch; +var conversions_9 = conversions.hex; +var conversions_10 = conversions.keyword; +var conversions_11 = conversions.ansi16; +var conversions_12 = conversions.ansi256; +var conversions_13 = conversions.hcg; +var conversions_14 = conversions.apple; +var conversions_15 = conversions.gray; + +/* + this function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + var graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + var models = Object.keys(conversions); + + for (var len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; // unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + var path = [graph[toModel].parent, toModel]; + var fn = conversions[graph[toModel].parent][toModel]; + + var cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +var route = function (fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + + var models = Object.keys(graph); + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + + if (node.parent === null) { + // no possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + +var convert = {}; + +var models = Object.keys(conversions); + +function wrapRaw(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + return fn(args); + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + var result = fn(args); + + // we're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(function (fromModel) { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + var routes = route(fromModel); + var routeModels = Object.keys(routes); + + routeModels.forEach(function (toModel) { + var fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +var colorConvert = convert; + +var ansiStyles = createCommonjsModule(function (module) { + + +const wrapAnsi16 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => function () { + const rgb = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + + // Bright color + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Fix humans + styles.color.grey = styles.color.gray; + + for (const groupName of Object.keys(styles)) { + const group = styles[groupName]; + + for (const styleName of Object.keys(group)) { + const style = group[styleName]; + + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + } + + const ansi2ansi = n => n; + const rgb2rgb = (r, g, b) => [r, g, b]; + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + styles.color.ansi = { + ansi: wrapAnsi16(ansi2ansi, 0) + }; + styles.color.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 0) + }; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + + styles.bgColor.ansi = { + ansi: wrapAnsi16(ansi2ansi, 10) + }; + styles.bgColor.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 10) + }; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + + for (let key of Object.keys(colorConvert)) { + if (typeof colorConvert[key] !== 'object') { + continue; + } + + const suite = colorConvert[key]; + + if (key === 'ansi16') { + key = 'ansi'; + } + + if ('ansi16' in suite) { + styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); + styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); + } + + if ('ansi256' in suite) { + styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); + styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); + } + + if ('rgb' in suite) { + styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); + styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); + } + } + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); +}); + +const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; +const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; +const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; +const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + +const ESCAPES = new Map([ + ['n', '\n'], + ['r', '\r'], + ['t', '\t'], + ['b', '\b'], + ['f', '\f'], + ['v', '\v'], + ['0', '\0'], + ['\\', '\\'], + ['e', '\u001B'], + ['a', '\u0007'] +]); + +function unescape(c) { + if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES.get(c) || c; +} + +function parseArguments(name, args) { + const results = []; + const chunks = args.trim().split(/\s*,\s*/g); + let matches; + + for (const chunk of chunks) { + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if ((matches = chunk.match(STRING_REGEX))) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + + return results; +} + +function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + + const results = []; + let matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + + if (matches[2]) { + const args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; +} + +function buildStyle(chalk, styles) { + const enabled = {}; + + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } + + let current = chalk; + for (const styleName of Object.keys(enabled)) { + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; +} + +var templates = (chalk, tmp) => { + const styles = []; + const chunks = []; + let chunk = []; + + // eslint-disable-next-line max-params + tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + const str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({inverse, styles: parseStyle(style)}); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + + chunks.push(chunk.join('')); + + if (styles.length > 0) { + const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMsg); + } + + return chunks.join(''); +}; + +var chalk = createCommonjsModule(function (module) { + + +const stdoutColor = supportsColor_1.stdout; + + + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); +} + +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const self = this; + + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; + + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return templates(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); + +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports.default = module.exports; // For TypeScript +}); +var chalk_1 = chalk.supportsColor; + +const WIN_SLASH = '\\\\/'; +const WIN_NO_SLASH = `[^${WIN_SLASH}]`; + +/** + * Posix glob regex + */ + +const DOT_LITERAL = '\\.'; +const PLUS_LITERAL = '\\+'; +const QMARK_LITERAL = '\\?'; +const SLASH_LITERAL = '\\/'; +const ONE_CHAR = '(?=.)'; +const QMARK = '[^/]'; +const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; +const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; +const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; +const NO_DOT = `(?!${DOT_LITERAL})`; +const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; +const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; +const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; +const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; +const STAR = `${QMARK}*?`; + +const POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR +}; + +/** + * Windows glob regex + */ + +const WINDOWS_CHARS = { + ...POSIX_CHARS, + + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` +}; + +/** + * POSIX Bracket Regex + */ + +const POSIX_REGEX_SOURCE = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; + +var constants = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE, + + // regular expressions + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + + // Replace globs with equivalent patterns to reduce parsing time. + REPLACEMENTS: { + '***': '*', + '**/**': '**', + '**/**/**': '**' + }, + + // Digits + CHAR_0: 48, /* 0 */ + CHAR_9: 57, /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 65, /* A */ + CHAR_LOWERCASE_A: 97, /* a */ + CHAR_UPPERCASE_Z: 90, /* Z */ + CHAR_LOWERCASE_Z: 122, /* z */ + + CHAR_LEFT_PARENTHESES: 40, /* ( */ + CHAR_RIGHT_PARENTHESES: 41, /* ) */ + + CHAR_ASTERISK: 42, /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: 38, /* & */ + CHAR_AT: 64, /* @ */ + CHAR_BACKWARD_SLASH: 92, /* \ */ + CHAR_CARRIAGE_RETURN: 13, /* \r */ + CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ + CHAR_COLON: 58, /* : */ + CHAR_COMMA: 44, /* , */ + CHAR_DOT: 46, /* . */ + CHAR_DOUBLE_QUOTE: 34, /* " */ + CHAR_EQUAL: 61, /* = */ + CHAR_EXCLAMATION_MARK: 33, /* ! */ + CHAR_FORM_FEED: 12, /* \f */ + CHAR_FORWARD_SLASH: 47, /* / */ + CHAR_GRAVE_ACCENT: 96, /* ` */ + CHAR_HASH: 35, /* # */ + CHAR_HYPHEN_MINUS: 45, /* - */ + CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ + CHAR_LEFT_CURLY_BRACE: 123, /* { */ + CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ + CHAR_LINE_FEED: 10, /* \n */ + CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ + CHAR_PERCENT: 37, /* % */ + CHAR_PLUS: 43, /* + */ + CHAR_QUESTION_MARK: 63, /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ + CHAR_RIGHT_CURLY_BRACE: 125, /* } */ + CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ + CHAR_SEMICOLON: 59, /* ; */ + CHAR_SINGLE_QUOTE: 39, /* ' */ + CHAR_SPACE: 32, /* */ + CHAR_TAB: 9, /* \t */ + CHAR_UNDERSCORE: 95, /* _ */ + CHAR_VERTICAL_LINE: 124, /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ + + SEP: path$1.sep, + + /** + * Create EXTGLOB_CHARS + */ + + extglobChars(chars) { + return { + '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, + '?': { type: 'qmark', open: '(?:', close: ')?' }, + '+': { type: 'plus', open: '(?:', close: ')+' }, + '*': { type: 'star', open: '(?:', close: ')*' }, + '@': { type: 'at', open: '(?:', close: ')' } + }; + }, + + /** + * Create GLOB_CHARS + */ + + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } +}; + +var utils$1 = createCommonjsModule(function (module, exports) { + + +const win32 = process.platform === 'win32'; +const { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL +} = constants; + +exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); +exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); +exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); +exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); +exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); + +exports.removeBackslashes = str => { + return str.replace(REGEX_REMOVE_BACKSLASH, match => { + return match === '\\' ? '' : match; + }); +}; + +exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split('.').map(Number); + if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { + return true; + } + return false; +}; + +exports.isWindows = options => { + if (options && typeof options.windows === 'boolean') { + return options.windows; + } + return win32 === true || path$1.sep === '\\'; +}; + +exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; +}; + +exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith('./')) { + output = output.slice(2); + state.prefix = './'; + } + return output; +}; + +exports.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? '' : '^'; + const append = options.contains ? '' : '$'; + + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; +}; +}); +var utils_1$1 = utils$1.isObject; +var utils_2$1 = utils$1.hasRegexChars; +var utils_3$1 = utils$1.isRegexChar; +var utils_4$1 = utils$1.escapeRegex; +var utils_5$1 = utils$1.toPosixSlashes; +var utils_6 = utils$1.removeBackslashes; +var utils_7 = utils$1.supportsLookbehinds; +var utils_8 = utils$1.isWindows; +var utils_9 = utils$1.escapeLast; +var utils_10 = utils$1.removePrefix; +var utils_11 = utils$1.wrapOutput; + +const { + CHAR_ASTERISK: CHAR_ASTERISK$1, /* * */ + CHAR_AT, /* @ */ + CHAR_BACKWARD_SLASH, /* \ */ + CHAR_COMMA: CHAR_COMMA$1, /* , */ + CHAR_DOT, /* . */ + CHAR_EXCLAMATION_MARK, /* ! */ + CHAR_FORWARD_SLASH, /* / */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET$1, /* [ */ + CHAR_PLUS, /* + */ + CHAR_QUESTION_MARK, /* ? */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET$1 /* ] */ +} = constants; + +const isPathSeparator = code => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; +}; + +const depth = token => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } +}; + +/** + * Quickly scans a glob pattern and returns an object with a handful of + * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), + * `glob` (the actual pattern), and `negated` (true if the path starts with `!`). + * + * ```js + * const pm = require('picomatch'); + * console.log(pm.scan('foo/bar/*.js')); + * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an object with tokens and regex source string. + * @api public + */ + +const scan$1 = (input, options) => { + const opts = options || {}; + + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: '', depth: 0, isGlob: false }; + + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + + while (index < length) { + code = advance(); + let next; + + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (braceEscaped !== true && code === CHAR_COMMA$1) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { value: '', depth: 0, isGlob: false }; + + if (finished === true) continue; + if (prev === CHAR_DOT && index === (start + 1)) { + start += 2; + continue; + } + + lastIndex = index + 1; + continue; + } + + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS + || code === CHAR_AT + || code === CHAR_ASTERISK$1 + || code === CHAR_QUESTION_MARK + || code === CHAR_EXCLAMATION_MARK; + + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + + if (code === CHAR_ASTERISK$1) { + if (prev === CHAR_ASTERISK$1) isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_LEFT_SQUARE_BRACKET$1) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET$1) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + } + } + + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + } + } + + if (isGlob === true) { + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + } + + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + + let base = str; + let prefix = ''; + let glob = ''; + + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ''; + glob = str; + } else { + base = str; + } + + if (base && base !== '' && base !== '/' && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + + if (opts.unescape === true) { + if (glob) glob = utils$1.removeBackslashes(glob); + + if (base && backslashes === true) { + base = utils$1.removeBackslashes(base); + } + } + + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated + }; + + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== '') { + parts.push(value); + } + prevIndex = i; + } + + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + + state.slashes = slashes; + state.parts = parts; + } + + return state; +}; + +var scan_1 = scan$1; + +/** + * Constants + */ + +const { + MAX_LENGTH, + POSIX_REGEX_SOURCE: POSIX_REGEX_SOURCE$1, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS +} = constants; + +/** + * Helpers + */ + +const expandRange = (args, options) => { + if (typeof options.expandRange === 'function') { + return options.expandRange(...args, options); + } + + args.sort(); + const value = `[${args.join('-')}]`; + + try { + /* eslint-disable-next-line no-new */ + new RegExp(value); + } catch (ex) { + return args.map(v => utils$1.escapeRegex(v)).join('..'); + } + + return value; +}; + +/** + * Create the message for a syntax error + */ + +const syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; +}; + +/** + * Parse the given input string. + * @param {String} input + * @param {Object} options + * @return {Object} + */ + +const parse$5 = (input, options) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + input = REPLACEMENTS[input] || input; + + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + const bos = { type: 'bos', value: '', output: opts.prepend || '' }; + const tokens = [bos]; + + const capture = opts.capture ? '' : '?:'; + const win32 = utils$1.isWindows(options); + + // create constants based on platform, for windows or posix + const PLATFORM_CHARS = constants.globChars(win32); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + + const globstar = (opts) => { + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const nodot = opts.dot ? '' : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + // minimatch options support + if (typeof opts.noext === 'boolean') { + opts.noextglob = opts.noext; + } + + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: '', + output: '', + prefix: '', + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + + input = utils$1.removePrefix(input, state); + len = input.length; + + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + + /** + * Tokenizing helpers + */ + + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index]; + const remaining = () => input.slice(state.index + 1); + const consume = (value = '', num = 0) => { + state.consumed += value; + state.index += num; + }; + const append = token => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + + const negate = () => { + let count = 1; + + while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { + advance(); + state.start++; + count++; + } + + if (count % 2 === 0) { + return false; + } + + state.negated = true; + state.start++; + return true; + }; + + const increment = type => { + state[type]++; + stack.push(type); + }; + + const decrement = type => { + state[type]--; + stack.pop(); + }; + + /** + * Push tokens onto the tokens array. This helper speeds up + * tokenizing by 1) helping us avoid backtracking as much as possible, + * and 2) helping us avoid creating extra tokens when consecutive + * characters are plain text. This improves performance and simplifies + * lookbehinds. + */ + + const push = tok => { + if (prev.type === 'globstar') { + const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); + const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); + + if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = 'star'; + prev.value = '*'; + prev.output = star; + state.output += prev.output; + } + } + + if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) { + extglobs[extglobs.length - 1].inner += tok.value; + } + + if (tok.value || tok.output) append(tok); + if (prev && prev.type === 'text' && tok.type === 'text') { + prev.value += tok.value; + prev.output = (prev.output || '') + tok.value; + return; + } + + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + + const extglobOpen = (type, value) => { + const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; + + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? '(' : '') + token.open; + + increment('parens'); + + + push({ type, value, output: state.output ? '' : ONE_CHAR }); + push({ type: 'paren', extglob: true, value: advance(), output }); + extglobs.push(token); + }; + + const extglobClose = token => { + let output = token.close + (opts.capture ? ')' : ''); + + if (token.type === 'negate') { + let extglobStar = star; + + if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { + extglobStar = globstar(opts); + } + + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + + if (token.prev.type === 'bos' && eos()) { + state.negatedExtglob = true; + } + } + + push({ type: 'paren', extglob: true, value, output }); + decrement('parens'); + }; + + /** + * Fast paths + */ + + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === '\\') { + backslashes = true; + return m; + } + + if (first === '?') { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ''); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); + } + return QMARK.repeat(chars.length); + } + + if (first === '.') { + return DOT_LITERAL.repeat(chars.length); + } + + if (first === '*') { + if (esc) { + return esc + first + (rest ? star : ''); + } + return star; + } + return esc ? m : `\\${m}`; + }); + + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ''); + } else { + output = output.replace(/\\+/g, m => { + return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); + }); + } + } + + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + + state.output = utils$1.wrapOutput(output, state, options); + return state; + } + + /** + * Tokenize input until we reach end-of-string + */ + + while (!eos()) { + value = advance(); + + if (value === '\u0000') { + continue; + } + + /** + * Escaped characters + */ + + if (value === '\\') { + const next = peek(); + + if (next === '/' && opts.bash !== true) { + continue; + } + + if (next === '.' || next === ';') { + continue; + } + + if (!next) { + value += '\\'; + push({ type: 'text', value }); + continue; + } + + // collapse slashes to reduce potential for exploits + const match = /^\\+/.exec(remaining()); + let slashes = 0; + + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += '\\'; + } + } + + if (opts.unescape === true) { + value = advance() || ''; + } else { + value += advance() || ''; + } + + if (state.brackets === 0) { + push({ type: 'text', value }); + continue; + } + } + + /** + * If we're inside a regex character class, continue + * until we reach the closing bracket. + */ + + if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { + if (opts.posix !== false && value === ':') { + const inner = prev.value.slice(1); + if (inner.includes('[')) { + prev.posix = true; + + if (inner.includes(':')) { + const idx = prev.value.lastIndexOf('['); + const pre = prev.value.slice(0, idx); + const rest = prev.value.slice(idx + 2); + const posix = POSIX_REGEX_SOURCE$1[rest]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + + if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { + value = `\\${value}`; + } + + if (value === ']' && (prev.value === '[' || prev.value === '[^')) { + value = `\\${value}`; + } + + if (opts.posix === true && value === '!' && prev.value === '[') { + value = '^'; + } + + prev.value += value; + append({ value }); + continue; + } + + /** + * If we're inside a quoted string, continue + * until we reach the closing double quote. + */ + + if (state.quotes === 1 && value !== '"') { + value = utils$1.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + + /** + * Double quotes + */ + + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: 'text', value }); + } + continue; + } + + /** + * Parentheses + */ + + if (value === '(') { + increment('parens'); + push({ type: 'paren', value }); + continue; + } + + if (value === ')') { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '(')); + } + + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + + push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); + decrement('parens'); + continue; + } + + /** + * Square brackets + */ + + if (value === '[') { + if (opts.nobracket === true || !remaining().includes(']')) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('closing', ']')); + } + + value = `\\${value}`; + } else { + increment('brackets'); + } + + push({ type: 'bracket', value }); + continue; + } + + if (value === ']') { + if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '[')); + } + + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + decrement('brackets'); + + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { + value = `/${value}`; + } + + prev.value += value; + append({ value }); + + // when literal brackets are explicitly disabled + // assume we should match with a regex character class + if (opts.literalBrackets === false || utils$1.hasRegexChars(prevValue)) { + continue; + } + + const escaped = utils$1.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + + // when literal brackets are explicitly enabled + // assume we should escape the brackets to match literal characters + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + + // when the user specifies nothing, try to match both + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + + /** + * Braces + */ + + if (value === '{' && opts.nobrace !== true) { + increment('braces'); + + const open = { + type: 'brace', + value, + output: '(', + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + + braces.push(open); + push(open); + continue; + } + + if (value === '}') { + const brace = braces[braces.length - 1]; + + if (opts.nobrace === true || !brace) { + push({ type: 'text', value, output: value }); + continue; + } + + let output = ')'; + + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === 'brace') { + break; + } + if (arr[i].type !== 'dots') { + range.unshift(arr[i].value); + } + } + + output = expandRange(range, opts); + state.backtrack = true; + } + + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = '\\{'; + value = output = `\\}`; + state.output = out; + for (const t of toks) { + state.output += (t.output || t.value); + } + } + + push({ type: 'brace', value, output }); + decrement('braces'); + braces.pop(); + continue; + } + + /** + * Pipes + */ + + if (value === '|') { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: 'text', value }); + continue; + } + + /** + * Commas + */ + + if (value === ',') { + let output = value; + + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === 'braces') { + brace.comma = true; + output = '|'; + } + + push({ type: 'comma', value, output }); + continue; + } + + /** + * Slashes + */ + + if (value === '/') { + // if the beginning of the glob is "./", advance the start + // to the current index, and don't add the "./" characters + // to the state. This greatly simplifies lookbehinds when + // checking for BOS characters like "!" and "." (not "./") + if (prev.type === 'dot' && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ''; + state.output = ''; + tokens.pop(); + prev = bos; // reset "prev" to the first token + continue; + } + + push({ type: 'slash', value, output: SLASH_LITERAL }); + continue; + } + + /** + * Dots + */ + + if (value === '.') { + if (state.braces > 0 && prev.type === 'dot') { + if (prev.value === '.') prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = 'dots'; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + + if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { + push({ type: 'text', value, output: DOT_LITERAL }); + continue; + } + + push({ type: 'dot', value, output: DOT_LITERAL }); + continue; + } + + /** + * Question marks + */ + + if (value === '?') { + const isGroup = prev && prev.value === '('; + if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('qmark', value); + continue; + } + + if (prev && prev.type === 'paren') { + const next = peek(); + let output = value; + + if (next === '<' && !utils$1.supportsLookbehinds()) { + throw new Error('Node.js v10 or higher is required for regex lookbehinds'); + } + + if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { + output = `\\${value}`; + } + + push({ type: 'text', value, output }); + continue; + } + + if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { + push({ type: 'qmark', value, output: QMARK_NO_DOT }); + continue; + } + + push({ type: 'qmark', value, output: QMARK }); + continue; + } + + /** + * Exclamation + */ + + if (value === '!') { + if (opts.noextglob !== true && peek() === '(') { + if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { + extglobOpen('negate', value); + continue; + } + } + + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + + /** + * Plus + */ + + if (value === '+') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('plus', value); + continue; + } + + if ((prev && prev.value === '(') || opts.regex === false) { + push({ type: 'plus', value, output: PLUS_LITERAL }); + continue; + } + + if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { + push({ type: 'plus', value }); + continue; + } + + push({ type: 'plus', value: PLUS_LITERAL }); + continue; + } + + /** + * Plain text + */ + + if (value === '@') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + push({ type: 'at', extglob: true, value, output: '' }); + continue; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Plain text + */ + + if (value !== '*') { + if (value === '$' || value === '^') { + value = `\\${value}`; + } + + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Stars + */ + + if (prev && (prev.type === 'globstar' || prev.star === true)) { + prev.type = 'star'; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen('star', value); + continue; + } + + if (prev.type === 'star') { + if (opts.noglobstar === true) { + consume(value); + continue; + } + + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === 'slash' || prior.type === 'bos'; + const afterStar = before && (before.type === 'star' || before.type === 'globstar'); + + if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { + push({ type: 'star', value, output: '' }); + continue; + } + + const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); + const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); + if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { + push({ type: 'star', value, output: '' }); + continue; + } + + // strip consecutive `/**/` + while (rest.slice(0, 3) === '/**') { + const after = input[state.index + 4]; + if (after && after !== '/') { + break; + } + rest = rest.slice(3); + consume('/**', 3); + } + + if (prior.type === 'bos' && eos()) { + prev.type = 'globstar'; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { + const end = rest[1] !== void 0 ? '|$' : ''; + + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + + state.output += prior.output + prev.output; + state.globstar = true; + + consume(value + advance()); + + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + if (prior.type === 'bos' && rest[0] === '/') { + prev.type = 'globstar'; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + // remove single star from output + state.output = state.output.slice(0, -prev.output.length); + + // reset previous token to globstar + prev.type = 'globstar'; + prev.output = globstar(opts); + prev.value += value; + + // reset output with globstar + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + + const token = { type: 'star', value, output: star }; + + if (opts.bash === true) { + token.output = '.*?'; + if (prev.type === 'bos' || prev.type === 'slash') { + token.output = nodot + token.output; + } + push(token); + continue; + } + + if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { + token.output = value; + push(token); + continue; + } + + if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { + if (prev.type === 'dot') { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + + } else { + state.output += nodot; + prev.output += nodot; + } + + if (peek() !== '*') { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + + push(token); + } + + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); + state.output = utils$1.escapeLast(state.output, '['); + decrement('brackets'); + } + + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); + state.output = utils$1.escapeLast(state.output, '('); + decrement('parens'); + } + + while (state.braces > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); + state.output = utils$1.escapeLast(state.output, '{'); + decrement('braces'); + } + + if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { + push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); + } + + // rebuild the output if we had to backtrack at any point + if (state.backtrack === true) { + state.output = ''; + + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + + if (token.suffix) { + state.output += token.suffix; + } + } + } + + return state; +}; + +/** + * Fast paths for creating regular expressions for common glob patterns. + * This can significantly speed up processing and has very little downside + * impact when none of the fast paths match. + */ + +parse$5.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + input = REPLACEMENTS[input] || input; + const win32 = utils$1.isWindows(options); + + // create constants based on platform, for windows or posix + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(win32); + + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? '' : '?:'; + const state = { negated: false, prefix: '' }; + let star = opts.bash === true ? '.*?' : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + const globstar = (opts) => { + if (opts.noglobstar === true) return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const create = str => { + switch (str) { + case '*': + return `${nodot}${ONE_CHAR}${star}`; + + case '.*': + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*.*': + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*/*': + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + + case '**': + return nodot + globstar(opts); + + case '**/*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + + case '**/*.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '**/.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) return; + + const source = create(match[1]); + if (!source) return; + + return source + DOT_LITERAL + match[2]; + } + } + }; + + const output = utils$1.removePrefix(input, state); + let source = create(output); + + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + + return source; +}; + +var parse_1$1 = parse$5; + +const isObject$2 = val => val && typeof val === 'object' && !Array.isArray(val); + +/** + * Creates a matcher function from one or more glob patterns. The + * returned function takes a string to match as its first argument, + * and returns true if the string is a match. The returned matcher + * function also takes a boolean as the second argument that, when true, + * returns an object with additional information. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch(glob[, options]); + * + * const isMatch = picomatch('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @name picomatch + * @param {String|Array} `globs` One or more glob patterns. + * @param {Object=} `options` + * @return {Function=} Returns a matcher function. + * @api public + */ + +const picomatch = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map(input => picomatch(input, options, returnState)); + const arrayMatcher = str => { + for (const isMatch of fns) { + const state = isMatch(str); + if (state) return state; + } + return false; + }; + return arrayMatcher; + } + + const isState = isObject$2(glob) && glob.tokens && glob.input; + + if (glob === '' || (typeof glob !== 'string' && !isState)) { + throw new TypeError('Expected pattern to be a non-empty string'); + } + + const opts = options || {}; + const posix = utils$1.isWindows(options); + const regex = isState + ? picomatch.compileRe(glob, options) + : picomatch.makeRe(glob, options, false, true); + + const state = regex.state; + delete regex.state; + + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); + } + + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match, isMatch }; + + if (typeof opts.onResult === 'function') { + opts.onResult(result); + } + + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + + if (isIgnored(input)) { + if (typeof opts.onIgnore === 'function') { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + + if (typeof opts.onMatch === 'function') { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + + if (returnState) { + matcher.state = state; + } + + return matcher; +}; + +/** + * Test `input` with the given `regex`. This is used by the main + * `picomatch()` function to test the input string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.test(input, regex[, options]); + * + * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); + * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } + * ``` + * @param {String} `input` String to test. + * @param {RegExp} `regex` + * @return {Object} Returns an object with matching info. + * @api public + */ + +picomatch.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected input to be a string'); + } + + if (input === '') { + return { isMatch: false, output: '' }; + } + + const opts = options || {}; + const format = opts.format || (posix ? utils$1.toPosixSlashes : null); + let match = input === glob; + let output = (match && format) ? format(input) : input; + + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch.matchBase(input, regex, options, posix); + } else { + match = regex.exec(output); + } + } + + return { isMatch: Boolean(match), match, output }; +}; + +/** + * Match the basename of a filepath. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.matchBase(input, glob[, options]); + * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true + * ``` + * @param {String} `input` String to test. + * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). + * @return {Boolean} + * @api public + */ + +picomatch.matchBase = (input, glob, options, posix = utils$1.isWindows(options)) => { + const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); + return regex.test(path$1.basename(input)); +}; + +/** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.isMatch(string, patterns[, options]); + * + * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String|Array} str The string to test. + * @param {String|Array} patterns One or more glob patterns to use for matching. + * @param {Object} [options] See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + +/** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const picomatch = require('picomatch'); + * const result = picomatch.parse(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as a regex source string. + * @api public + */ + +picomatch.parse = (pattern, options) => { + if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); + return parse_1$1(pattern, { ...options, fastpaths: false }); +}; + +/** + * Scan a glob pattern to separate the pattern into segments. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.scan(input[, options]); + * + * const result = picomatch.scan('!./foo/*.js'); + * console.log(result); + * { prefix: '!./', + * input: '!./foo/*.js', + * start: 3, + * base: 'foo', + * glob: '*.js', + * isBrace: false, + * isBracket: false, + * isGlob: true, + * isExtglob: false, + * isGlobstar: false, + * negated: true } + * ``` + * @param {String} `input` Glob pattern to scan. + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + +picomatch.scan = (input, options) => scan_1(input, options); + +/** + * Create a regular expression from a glob pattern. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.makeRe(input[, options]); + * + * console.log(picomatch.makeRe('*.js')); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `input` A glob pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +picomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return parsed.output; + } + + const opts = options || {}; + const prepend = opts.contains ? '' : '^'; + const append = opts.contains ? '' : '$'; + + let source = `${prepend}(?:${parsed.output})${append}`; + if (parsed && parsed.negated === true) { + source = `^(?!${source}).*$`; + } + + const regex = picomatch.toRegex(source, options); + if (returnState === true) { + regex.state = parsed; + } + + return regex; +}; + +picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => { + if (!input || typeof input !== 'string') { + throw new TypeError('Expected a non-empty string'); + } + + const opts = options || {}; + let parsed = { negated: false, fastpaths: true }; + let prefix = ''; + let output; + + if (input.startsWith('./')) { + input = input.slice(2); + prefix = parsed.prefix = './'; + } + + if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { + output = parse_1$1.fastpaths(input, options); + } + + if (output === undefined) { + parsed = parse_1$1(input, options); + parsed.prefix = prefix + (parsed.prefix || ''); + } else { + parsed.output = output; + } + + return picomatch.compileRe(parsed, options, returnOutput, returnState); +}; + +/** + * Create a regular expression from the given regex source string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.toRegex(source[, options]); + * + * const { output } = picomatch.parse('*.js'); + * console.log(picomatch.toRegex(output)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `source` Regular expression source string. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +picomatch.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); + } catch (err) { + if (options && options.debug === true) throw err; + return /$^/; + } +}; + +/** + * Picomatch constants. + * @return {Object} + */ + +picomatch.constants = constants; + +/** + * Expose "picomatch" + */ + +var picomatch_1 = picomatch; + +var picomatch$1 = picomatch_1; + +const { Readable } = stream; + +const { promisify } = util$1; + + +const readdir$1 = promisify(fs$1.readdir); +const stat$2 = promisify(fs$1.stat); +const lstat = promisify(fs$1.lstat); + +/** + * @typedef {Object} EntryInfo + * @property {String} path + * @property {String} fullPath + * @property {fs.Stats=} stats + * @property {fs.Dirent=} dirent + * @property {String} basename + */ + +const BANG = '!'; +const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP']); +const FILE_TYPE = 'files'; +const DIR_TYPE = 'directories'; +const FILE_DIR_TYPE = 'files_directories'; +const EVERYTHING_TYPE = 'all'; +const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; + +const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code); + +const normalizeFilter = filter => { + if (filter === undefined) return; + if (typeof filter === 'function') return filter; + + if (typeof filter === 'string') { + const glob = picomatch$1(filter.trim()); + return entry => glob(entry.basename); + } + + if (Array.isArray(filter)) { + const positive = []; + const negative = []; + for (const item of filter) { + const trimmed = item.trim(); + if (trimmed.charAt(0) === BANG) { + negative.push(picomatch$1(trimmed.slice(1))); + } else { + positive.push(picomatch$1(trimmed)); + } + } + + if (negative.length > 0) { + if (positive.length > 0) { + return entry => + positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename)); + } + return entry => !negative.some(f => f(entry.basename)); + } + return entry => positive.some(f => f(entry.basename)); + } +}; + +class ReaddirpStream extends Readable { + static get defaultOptions() { + return { + root: '.', + /* eslint-disable no-unused-vars */ + fileFilter: (path) => true, + directoryFilter: (path) => true, + /* eslint-enable no-unused-vars */ + type: FILE_TYPE, + lstat: false, + depth: 2147483648, + alwaysStat: false + }; + } + + constructor(options = {}) { + super({ + objectMode: true, + autoDestroy: true, + highWaterMark: options.highWaterMark || 4096 + }); + const opts = { ...ReaddirpStream.defaultOptions, ...options }; + const { root, type } = opts; + + this._fileFilter = normalizeFilter(opts.fileFilter); + this._directoryFilter = normalizeFilter(opts.directoryFilter); + + const statMethod = opts.lstat ? lstat : stat$2; + // Use bigint stats if it's windows and stat() supports options (node 10+). + if (process.platform === 'win32' && stat$2.length === 3) { + this._stat = path => statMethod(path, { bigint: true }); + } else { + this._stat = statMethod; + } + + this._maxDepth = opts.depth; + this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); + this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); + this._wantsEverything = type === EVERYTHING_TYPE; + this._root = path$1.resolve(root); + this._isDirent = ('Dirent' in fs$1) && !opts.alwaysStat; + this._statsProp = this._isDirent ? 'dirent' : 'stats'; + this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; + + // Launch stream with one parent, the root dir. + try { + this.parents = [this._exploreDir(root, 1)]; + } catch (error) { + this.destroy(error); + } + this.reading = false; + this.parent = undefined; + } + + async _read(batch) { + if (this.reading) return; + this.reading = true; + + try { + while (!this.destroyed && batch > 0) { + const { path, depth, files = [] } = this.parent || {}; + + if (files.length > 0) { + const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path)); + for (const entry of await Promise.all(slice)) { + if (this._isDirAndMatchesFilter(entry)) { + if (depth <= this._maxDepth) { + this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); + } + + if (this._wantsDir) { + this.push(entry); + batch--; + } + } else if (this._isFileAndMatchesFilter(entry)) { + if (this._wantsFile) { + this.push(entry); + batch--; + } + } + } + } else { + const parent = this.parents.pop(); + if (!parent) { + this.push(null); + break; + } + this.parent = await parent; + } + } + } catch (error) { + this.destroy(error); + } finally { + this.reading = false; + } + } + + async _exploreDir(path, depth) { + let files; + try { + files = await readdir$1(path, this._rdOptions); + } catch (error) { + this._onError(error); + } + return {files, depth, path}; + } + + async _formatEntry(dirent, path) { + const basename = this._isDirent ? dirent.name : dirent; + const fullPath = path$1.resolve(path$1.join(path, basename)); + const entry = {path: path$1.relative(this._root, fullPath), fullPath, basename}; + try { + entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath); + } catch (err) { + this._onError(err); + } + return entry; + } + + _onError(err) { + if (isNormalFlowError(err) && !this.destroyed) { + this.emit('warn', err); + } else { + throw err; + } + } + + _isDirAndMatchesFilter(entry) { + // entry may be undefined, because a warning or an error were emitted + // and the statsProp is undefined + const stats = entry && entry[this._statsProp]; + return stats && stats.isDirectory() && this._directoryFilter(entry); + } + + _isFileAndMatchesFilter(entry) { + const stats = entry && entry[this._statsProp]; + const isFileType = stats && ( + (this._wantsEverything && !stats.isDirectory()) || + (stats.isFile() || stats.isSymbolicLink()) + ); + return isFileType && this._fileFilter(entry); + } +} + +/** + * @typedef {Object} ReaddirpArguments + * @property {Function=} fileFilter + * @property {Function=} directoryFilter + * @property {String=} type + * @property {Number=} depth + * @property {String=} root + * @property {Boolean=} lstat + * @property {Boolean=} bigint + */ + +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param {String} root Root directory + * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth + */ +const readdirp = (root, options = {}) => { + let type = options.entryType || options.type; + if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility + if (type) options.type = type; + if (!root) { + throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); + } else if (typeof root !== 'string') { + throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); + } else if (type && !ALL_TYPES.includes(type)) { + throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); + } + + options.root = root; + return new ReaddirpStream(options); +}; + +const readdirpPromise = (root, options = {}) => { + return new Promise((resolve, reject) => { + const files = []; + readdirp(root, options) + .on('data', entry => files.push(entry)) + .on('end', () => resolve(files)) + .on('error', error => reject(error)); + }); +}; + +readdirp.promise = readdirpPromise; +readdirp.ReaddirpStream = ReaddirpStream; +readdirp.default = readdirp; + +var readdirp_1 = readdirp; + +/*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */ + +var normalizePath = function(path, stripTrailing) { + if (typeof path !== 'string') { + throw new TypeError('expected path to be a string'); + } + + if (path === '\\' || path === '/') return '/'; + + var len = path.length; + if (len <= 1) return path; + + // ensure that win32 namespaces has two leading slashes, so that the path is + // handled properly by the win32 version of path.parse() after being normalized + // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces + var prefix = ''; + if (len > 4 && path[3] === '\\') { + var ch = path[2]; + if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { + path = path.slice(2); + prefix = '//'; + } + } + + var segs = path.split(/[/\\]+/); + if (stripTrailing !== false && segs[segs.length - 1] === '') { + segs.pop(); + } + return prefix + segs.join('/'); +}; + +var anymatch_1 = createCommonjsModule(function (module, exports) { + +Object.defineProperty(exports, "__esModule", { value: true }); + + + + +/** + * @typedef {(testString: string) => boolean} AnymatchFn + * @typedef {string|RegExp|AnymatchFn} AnymatchPattern + * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher + */ +const BANG = '!'; +const DEFAULT_OPTIONS = {returnIndex: false}; +const arrify = (item) => Array.isArray(item) ? item : [item]; + +/** + * @param {AnymatchPattern} matcher + * @param {object} options + * @returns {AnymatchFn} + */ +const createPattern = (matcher, options) => { + if (typeof matcher === 'function') { + return matcher; + } + if (typeof matcher === 'string') { + const glob = picomatch$1(matcher, options); + return (string) => matcher === string || glob(string); + } + if (matcher instanceof RegExp) { + return (string) => matcher.test(string); + } + return (string) => false; +}; + +/** + * @param {Array} patterns + * @param {Array} negPatterns + * @param {String|Array} args + * @param {Boolean} returnIndex + * @returns {boolean|number} + */ +const matchPatterns = (patterns, negPatterns, args, returnIndex) => { + const isList = Array.isArray(args); + const _path = isList ? args[0] : args; + if (!isList && typeof _path !== 'string') { + throw new TypeError('anymatch: second argument must be a string: got ' + + Object.prototype.toString.call(_path)) + } + const path = normalizePath(_path); + + for (let index = 0; index < negPatterns.length; index++) { + const nglob = negPatterns[index]; + if (nglob(path)) { + return returnIndex ? -1 : false; + } + } + + const applied = isList && [path].concat(args.slice(1)); + for (let index = 0; index < patterns.length; index++) { + const pattern = patterns[index]; + if (isList ? pattern(...applied) : pattern(path)) { + return returnIndex ? index : true; + } + } + + return returnIndex ? -1 : false; +}; + +/** + * @param {AnymatchMatcher} matchers + * @param {Array|string} testString + * @param {object} options + * @returns {boolean|number|Function} + */ +const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => { + if (matchers == null) { + throw new TypeError('anymatch: specify first argument'); + } + const opts = typeof options === 'boolean' ? {returnIndex: options} : options; + const returnIndex = opts.returnIndex || false; + + // Early cache for matchers. + const mtchers = arrify(matchers); + const negatedGlobs = mtchers + .filter(item => typeof item === 'string' && item.charAt(0) === BANG) + .map(item => item.slice(1)) + .map(item => picomatch$1(item, opts)); + const patterns = mtchers.map(matcher => createPattern(matcher, opts)); + + if (testString == null) { + return (testString, ri = false) => { + const returnIndex = typeof ri === 'boolean' ? ri : false; + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); + } + } + + return matchPatterns(patterns, negatedGlobs, testString, returnIndex); +}; + +anymatch.default = anymatch; +module.exports = anymatch; +}); + +unwrapExports(anymatch_1); + +/*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +var isExtglob = function isExtglob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + var match; + while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + + return false; +}; + +/*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + +var chars$1 = { '{': '}', '(': ')', '[': ']'}; +var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; +var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/; + +var isGlob = function isGlob(str, options) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) { + return true; + } + + var regex = strictRegex; + var match; + + // optionally relax regex + if (options && options.strict === false) { + regex = relaxedRegex; + } + + while ((match = regex.exec(str))) { + if (match[2]) return true; + var idx = match.index + match[0].length; + + // if an open bracket/brace/paren is escaped, + // set the index to the next closing character + var open = match[1]; + var close = open ? chars$1[open] : null; + if (open && close) { + var n = str.indexOf(close, idx); + if (n !== -1) { + idx = n + 1; + } + } + + str = str.slice(idx); + } + return false; +}; + +var pathPosixDirname = path$1.posix.dirname; +var isWin32 = os.platform() === 'win32'; + +var slash = '/'; +var backslash = /\\/g; +var enclosure = /[\{\[].*[\/]*.*[\}\]]$/; +var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; +var escaped = /\\([\*\?\|\[\]\(\)\{\}])/g; + +/** + * @param {string} str + * @param {Object} opts + * @param {boolean} [opts.flipBackslashes=true] + */ +var globParent = function globParent(str, opts) { + var options = Object.assign({ flipBackslashes: true }, opts); + + // flip windows path separators + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); + } + + // special case for strings ending in enclosure containing path separator + if (enclosure.test(str)) { + str += slash; + } + + // preserves full path in case of trailing path separator + str += 'a'; + + // remove path parts that are globby + do { + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); + + // remove escape chars and return result + return str.replace(escaped, '$1'); +}; + +var utils$2 = createCommonjsModule(function (module, exports) { + +exports.isInteger = num => { + if (typeof num === 'number') { + return Number.isInteger(num); + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isInteger(Number(num)); + } + return false; +}; + +/** + * Find a node of the given type + */ + +exports.find = (node, type) => node.nodes.find(node => node.type === type); + +/** + * Find a node of the given type + */ + +exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return ((Number(max) - Number(min)) / Number(step)) >= limit; +}; + +/** + * Escape the given node with '\\' before node.value + */ + +exports.escapeNode = (block, n = 0, type) => { + let node = block.nodes[n]; + if (!node) return; + + if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { + if (node.escaped !== true) { + node.value = '\\' + node.value; + node.escaped = true; + } + } +}; + +/** + * Returns true if the given brace node should be enclosed in literal braces + */ + +exports.encloseBrace = node => { + if (node.type !== 'brace') return false; + if ((node.commas >> 0 + node.ranges >> 0) === 0) { + node.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a brace node is invalid. + */ + +exports.isInvalidBrace = block => { + if (block.type !== 'brace') return false; + if (block.invalid === true || block.dollar) return true; + if ((block.commas >> 0 + block.ranges >> 0) === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a node is an open or close node + */ + +exports.isOpenOrClose = node => { + if (node.type === 'open' || node.type === 'close') { + return true; + } + return node.open === true || node.close === true; +}; + +/** + * Reduce an array of text nodes. + */ + +exports.reduce = nodes => nodes.reduce((acc, node) => { + if (node.type === 'text') acc.push(node.value); + if (node.type === 'range') node.type = 'text'; + return acc; +}, []); + +/** + * Flatten an array + */ + +exports.flatten = (...args) => { + const result = []; + const flat = arr => { + for (let i = 0; i < arr.length; i++) { + let ele = arr[i]; + Array.isArray(ele) ? flat(ele) : ele !== void 0 && result.push(ele); + } + return result; + }; + flat(args); + return result; +}; +}); +var utils_1$2 = utils$2.isInteger; +var utils_2$2 = utils$2.find; +var utils_3$2 = utils$2.exceedsLimit; +var utils_4$2 = utils$2.escapeNode; +var utils_5$2 = utils$2.encloseBrace; +var utils_6$1 = utils$2.isInvalidBrace; +var utils_7$1 = utils$2.isOpenOrClose; +var utils_8$1 = utils$2.reduce; +var utils_9$1 = utils$2.flatten; + +var stringify$3 = (ast, options = {}) => { + let stringify = (node, parent = {}) => { + let invalidBlock = options.escapeInvalid && utils$2.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ''; + + if (node.value) { + if ((invalidBlock || invalidNode) && utils$2.isOpenOrClose(node)) { + return '\\' + node.value; + } + return node.value; + } + + if (node.value) { + return node.value; + } + + if (node.nodes) { + for (let child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + + return stringify(ast); +}; + +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ + +var isNumber$1 = function(num) { + if (typeof num === 'number') { + return num - num === 0; + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); + } + return false; +}; + +const toRegexRange = (min, max, options) => { + if (isNumber$1(min) === false) { + throw new TypeError('toRegexRange: expected the first argument to be a number'); + } + + if (max === void 0 || min === max) { + return String(min); + } + + if (isNumber$1(max) === false) { + throw new TypeError('toRegexRange: expected the second argument to be a number.'); + } + + let opts = { relaxZeros: true, ...options }; + if (typeof opts.strictZeros === 'boolean') { + opts.relaxZeros = opts.strictZeros === false; + } + + let relax = String(opts.relaxZeros); + let shorthand = String(opts.shorthand); + let capture = String(opts.capture); + let wrap = String(opts.wrap); + let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap; + + if (toRegexRange.cache.hasOwnProperty(cacheKey)) { + return toRegexRange.cache[cacheKey].result; + } + + let a = Math.min(min, max); + let b = Math.max(min, max); + + if (Math.abs(a - b) === 1) { + let result = min + '|' + max; + if (opts.capture) { + return `(${result})`; + } + if (opts.wrap === false) { + return result; + } + return `(?:${result})`; + } + + let isPadded = hasPadding(min) || hasPadding(max); + let state = { min, max, a, b }; + let positives = []; + let negatives = []; + + if (isPadded) { + state.isPadded = isPadded; + state.maxLen = String(state.max).length; + } + + if (a < 0) { + let newMin = b < 0 ? Math.abs(b) : 1; + negatives = splitToPatterns(newMin, Math.abs(a), state, opts); + a = state.a = 0; + } + + if (b >= 0) { + positives = splitToPatterns(a, b, state, opts); + } + + state.negatives = negatives; + state.positives = positives; + state.result = collatePatterns(negatives, positives); + + if (opts.capture === true) { + state.result = `(${state.result})`; + } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) { + state.result = `(?:${state.result})`; + } + + toRegexRange.cache[cacheKey] = state; + return state.result; +}; + +function collatePatterns(neg, pos, options) { + let onlyNegative = filterPatterns(neg, pos, '-', false) || []; + let onlyPositive = filterPatterns(pos, neg, '', false) || []; + let intersected = filterPatterns(neg, pos, '-?', true) || []; + let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); + return subpatterns.join('|'); +} + +function splitToRanges(min, max) { + let nines = 1; + let zeros = 1; + + let stop = countNines(min, nines); + let stops = new Set([max]); + + while (min <= stop && stop <= max) { + stops.add(stop); + nines += 1; + stop = countNines(min, nines); + } + + stop = countZeros(max + 1, zeros) - 1; + + while (min < stop && stop <= max) { + stops.add(stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + + stops = [...stops]; + stops.sort(compare$1); + return stops; +} + +/** + * Convert a range to a regex pattern + * @param {Number} `start` + * @param {Number} `stop` + * @return {String} + */ + +function rangeToPattern(start, stop, options) { + if (start === stop) { + return { pattern: start, count: [], digits: 0 }; + } + + let zipped = zip(start, stop); + let digits = zipped.length; + let pattern = ''; + let count = 0; + + for (let i = 0; i < digits; i++) { + let [startDigit, stopDigit] = zipped[i]; + + if (startDigit === stopDigit) { + pattern += startDigit; + + } else if (startDigit !== '0' || stopDigit !== '9') { + pattern += toCharacterClass(startDigit, stopDigit); + + } else { + count++; + } + } + + if (count) { + pattern += options.shorthand === true ? '\\d' : '[0-9]'; + } + + return { pattern, count: [count], digits }; +} + +function splitToPatterns(min, max, tok, options) { + let ranges = splitToRanges(min, max); + let tokens = []; + let start = min; + let prev; + + for (let i = 0; i < ranges.length; i++) { + let max = ranges[i]; + let obj = rangeToPattern(String(start), String(max), options); + let zeros = ''; + + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.count.length > 1) { + prev.count.pop(); + } + + prev.count.push(obj.count[0]); + prev.string = prev.pattern + toQuantifier(prev.count); + start = max + 1; + continue; + } + + if (tok.isPadded) { + zeros = padZeros(max, tok, options); + } + + obj.string = zeros + obj.pattern + toQuantifier(obj.count); + tokens.push(obj); + start = max + 1; + prev = obj; + } + + return tokens; +} + +function filterPatterns(arr, comparison, prefix, intersection, options) { + let result = []; + + for (let ele of arr) { + let { string } = ele; + + // only push if _both_ are negative... + if (!intersection && !contains(comparison, 'string', string)) { + result.push(prefix + string); + } + + // or _both_ are positive + if (intersection && contains(comparison, 'string', string)) { + result.push(prefix + string); + } + } + return result; +} + +/** + * Zip strings + */ + +function zip(a, b) { + let arr = []; + for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); + return arr; +} + +function compare$1(a, b) { + return a > b ? 1 : b > a ? -1 : 0; +} + +function contains(arr, key, val) { + return arr.some(ele => ele[key] === val); +} + +function countNines(min, len) { + return Number(String(min).slice(0, -len) + '9'.repeat(len)); +} + +function countZeros(integer, zeros) { + return integer - (integer % Math.pow(10, zeros)); +} + +function toQuantifier(digits) { + let [start = 0, stop = ''] = digits; + if (stop || start > 1) { + return `{${start + (stop ? ',' + stop : '')}}`; + } + return ''; +} + +function toCharacterClass(a, b, options) { + return `[${a}${(b - a === 1) ? '' : '-'}${b}]`; +} + +function hasPadding(str) { + return /^-?(0+)\d/.test(str); +} + +function padZeros(value, tok, options) { + if (!tok.isPadded) { + return value; + } + + let diff = Math.abs(tok.maxLen - String(value).length); + let relax = options.relaxZeros !== false; + + switch (diff) { + case 0: + return ''; + case 1: + return relax ? '0?' : '0'; + case 2: + return relax ? '0{0,2}' : '00'; + default: { + return relax ? `0{0,${diff}}` : `0{${diff}}`; + } + } +} + +/** + * Cache + */ + +toRegexRange.cache = {}; +toRegexRange.clearCache = () => (toRegexRange.cache = {}); + +/** + * Expose `toRegexRange` + */ + +var toRegexRange_1 = toRegexRange; + +const isObject$3 = val => val !== null && typeof val === 'object' && !Array.isArray(val); + +const transform$2 = toNumber => { + return value => toNumber === true ? Number(value) : String(value); +}; + +const isValidValue = value => { + return typeof value === 'number' || (typeof value === 'string' && value !== ''); +}; + +const isNumber$2 = num => Number.isInteger(+num); + +const zeros = input => { + let value = `${input}`; + let index = -1; + if (value[0] === '-') value = value.slice(1); + if (value === '0') return false; + while (value[++index] === '0'); + return index > 0; +}; + +const stringify$4 = (start, end, options) => { + if (typeof start === 'string' || typeof end === 'string') { + return true; + } + return options.stringify === true; +}; + +const pad = (input, maxLength, toNumber) => { + if (maxLength > 0) { + let dash = input[0] === '-' ? '-' : ''; + if (dash) input = input.slice(1); + input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); + } + if (toNumber === false) { + return String(input); + } + return input; +}; + +const toMaxLen = (input, maxLength) => { + let negative = input[0] === '-' ? '-' : ''; + if (negative) { + input = input.slice(1); + maxLength--; + } + while (input.length < maxLength) input = '0' + input; + return negative ? ('-' + input) : input; +}; + +const toSequence = (parts, options) => { + parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + + let prefix = options.capture ? '' : '?:'; + let positives = ''; + let negatives = ''; + let result; + + if (parts.positives.length) { + positives = parts.positives.join('|'); + } + + if (parts.negatives.length) { + negatives = `-(${prefix}${parts.negatives.join('|')})`; + } + + if (positives && negatives) { + result = `${positives}|${negatives}`; + } else { + result = positives || negatives; + } + + if (options.wrap) { + return `(${prefix}${result})`; + } + + return result; +}; + +const toRange = (a, b, isNumbers, options) => { + if (isNumbers) { + return toRegexRange_1(a, b, { wrap: false, ...options }); + } + + let start = String.fromCharCode(a); + if (a === b) return start; + + let stop = String.fromCharCode(b); + return `[${start}-${stop}]`; +}; + +const toRegex = (start, end, options) => { + if (Array.isArray(start)) { + let wrap = options.wrap === true; + let prefix = options.capture ? '' : '?:'; + return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); + } + return toRegexRange_1(start, end, options); +}; + +const rangeError = (...args) => { + return new RangeError('Invalid range arguments: ' + util$1.inspect(...args)); +}; + +const invalidRange = (start, end, options) => { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; +}; + +const invalidStep = (step, options) => { + if (options.strictRanges === true) { + throw new TypeError(`Expected step "${step}" to be a number`); + } + return []; +}; + +const fillNumbers = (start, end, step = 1, options = {}) => { + let a = Number(start); + let b = Number(end); + + if (!Number.isInteger(a) || !Number.isInteger(b)) { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; + } + + // fix negative zero + if (a === 0) a = 0; + if (b === 0) b = 0; + + let descending = a > b; + let startString = String(start); + let endString = String(end); + let stepString = String(step); + step = Math.max(Math.abs(step), 1); + + let padded = zeros(startString) || zeros(endString) || zeros(stepString); + let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; + let toNumber = padded === false && stringify$4(start, end, options) === false; + let format = options.transform || transform$2(toNumber); + + if (options.toRegex && step === 1) { + return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); + } + + let parts = { negatives: [], positives: [] }; + let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + if (options.toRegex === true && step > 1) { + push(a); + } else { + range.push(pad(format(a, index), maxLen, toNumber)); + } + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return step > 1 + ? toSequence(parts, options) + : toRegex(range, null, { wrap: false, ...options }); + } + + return range; +}; + +const fillLetters = (start, end, step = 1, options = {}) => { + if ((!isNumber$2(start) && start.length > 1) || (!isNumber$2(end) && end.length > 1)) { + return invalidRange(start, end, options); + } + + + let format = options.transform || (val => String.fromCharCode(val)); + let a = `${start}`.charCodeAt(0); + let b = `${end}`.charCodeAt(0); + + let descending = a > b; + let min = Math.min(a, b); + let max = Math.max(a, b); + + if (options.toRegex && step === 1) { + return toRange(min, max, false, options); + } + + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + range.push(format(a, index)); + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return toRegex(range, null, { wrap: false, options }); + } + + return range; +}; + +const fill = (start, end, step, options = {}) => { + if (end == null && isValidValue(start)) { + return [start]; + } + + if (!isValidValue(start) || !isValidValue(end)) { + return invalidRange(start, end, options); + } + + if (typeof step === 'function') { + return fill(start, end, 1, { transform: step }); + } + + if (isObject$3(step)) { + return fill(start, end, 0, step); + } + + let opts = { ...options }; + if (opts.capture === true) opts.wrap = true; + step = step || opts.step || 1; + + if (!isNumber$2(step)) { + if (step != null && !isObject$3(step)) return invalidStep(step, opts); + return fill(start, end, 1, step); + } + + if (isNumber$2(start) && isNumber$2(end)) { + return fillNumbers(start, end, step, opts); + } + + return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); +}; + +var fillRange = fill; + +const compile$2 = (ast, options = {}) => { + let walk = (node, parent = {}) => { + let invalidBlock = utils$2.isInvalidBrace(parent); + let invalidNode = node.invalid === true && options.escapeInvalid === true; + let invalid = invalidBlock === true || invalidNode === true; + let prefix = options.escapeInvalid === true ? '\\' : ''; + let output = ''; + + if (node.isOpen === true) { + return prefix + node.value; + } + if (node.isClose === true) { + return prefix + node.value; + } + + if (node.type === 'open') { + return invalid ? (prefix + node.value) : '('; + } + + if (node.type === 'close') { + return invalid ? (prefix + node.value) : ')'; + } + + if (node.type === 'comma') { + return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|'); + } + + if (node.value) { + return node.value; + } + + if (node.nodes && node.ranges > 0) { + let args = utils$2.reduce(node.nodes); + let range = fillRange(...args, { ...options, wrap: false, toRegex: true }); + + if (range.length !== 0) { + return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + } + + if (node.nodes) { + for (let child of node.nodes) { + output += walk(child, node); + } + } + return output; + }; + + return walk(ast); +}; + +var compile_1 = compile$2; + +const append = (queue = '', stash = '', enclose = false) => { + let result = []; + + queue = [].concat(queue); + stash = [].concat(stash); + + if (!stash.length) return queue; + if (!queue.length) { + return enclose ? utils$2.flatten(stash).map(ele => `{${ele}}`) : stash; + } + + for (let item of queue) { + if (Array.isArray(item)) { + for (let value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele)); + } + } + } + return utils$2.flatten(result); +}; + +const expand$2 = (ast, options = {}) => { + let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit; + + let walk = (node, parent = {}) => { + node.queue = []; + + let p = parent; + let q = parent.queue; + + while (p.type !== 'brace' && p.type !== 'root' && p.parent) { + p = p.parent; + q = p.queue; + } + + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify$3(node, options))); + return; + } + + if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ['{}'])); + return; + } + + if (node.nodes && node.ranges > 0) { + let args = utils$2.reduce(node.nodes); + + if (utils$2.exceedsLimit(...args, options.step, rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + + let range = fillRange(...args, options); + if (range.length === 0) { + range = stringify$3(node, options); + } + + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + + let enclose = utils$2.encloseBrace(node); + let queue = node.queue; + let block = node; + + while (block.type !== 'brace' && block.type !== 'root' && block.parent) { + block = block.parent; + queue = block.queue; + } + + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i]; + + if (child.type === 'comma' && node.type === 'brace') { + if (i === 1) queue.push(''); + queue.push(''); + continue; + } + + if (child.type === 'close') { + q.push(append(q.pop(), queue, enclose)); + continue; + } + + if (child.value && child.type !== 'open') { + queue.push(append(queue.pop(), child.value)); + continue; + } + + if (child.nodes) { + walk(child, node); + } + } + + return queue; + }; + + return utils$2.flatten(walk(ast)); +}; + +var expand_1 = expand$2; + +var constants$1 = { + MAX_LENGTH: 1024 * 64, + + // Digits + CHAR_0: '0', /* 0 */ + CHAR_9: '9', /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 'A', /* A */ + CHAR_LOWERCASE_A: 'a', /* a */ + CHAR_UPPERCASE_Z: 'Z', /* Z */ + CHAR_LOWERCASE_Z: 'z', /* z */ + + CHAR_LEFT_PARENTHESES: '(', /* ( */ + CHAR_RIGHT_PARENTHESES: ')', /* ) */ + + CHAR_ASTERISK: '*', /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: '&', /* & */ + CHAR_AT: '@', /* @ */ + CHAR_BACKSLASH: '\\', /* \ */ + CHAR_BACKTICK: '`', /* ` */ + CHAR_CARRIAGE_RETURN: '\r', /* \r */ + CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ + CHAR_COLON: ':', /* : */ + CHAR_COMMA: ',', /* , */ + CHAR_DOLLAR: '$', /* . */ + CHAR_DOT: '.', /* . */ + CHAR_DOUBLE_QUOTE: '"', /* " */ + CHAR_EQUAL: '=', /* = */ + CHAR_EXCLAMATION_MARK: '!', /* ! */ + CHAR_FORM_FEED: '\f', /* \f */ + CHAR_FORWARD_SLASH: '/', /* / */ + CHAR_HASH: '#', /* # */ + CHAR_HYPHEN_MINUS: '-', /* - */ + CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ + CHAR_LEFT_CURLY_BRACE: '{', /* { */ + CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ + CHAR_LINE_FEED: '\n', /* \n */ + CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ + CHAR_PERCENT: '%', /* % */ + CHAR_PLUS: '+', /* + */ + CHAR_QUESTION_MARK: '?', /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ + CHAR_RIGHT_CURLY_BRACE: '}', /* } */ + CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ + CHAR_SEMICOLON: ';', /* ; */ + CHAR_SINGLE_QUOTE: '\'', /* ' */ + CHAR_SPACE: ' ', /* */ + CHAR_TAB: '\t', /* \t */ + CHAR_UNDERSCORE: '_', /* _ */ + CHAR_VERTICAL_LINE: '|', /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ +}; + +/** + * Constants + */ + +const { + MAX_LENGTH: MAX_LENGTH$1, + CHAR_BACKSLASH, /* \ */ + CHAR_BACKTICK, /* ` */ + CHAR_COMMA: CHAR_COMMA$2, /* , */ + CHAR_DOT: CHAR_DOT$1, /* . */ + CHAR_LEFT_PARENTHESES: CHAR_LEFT_PARENTHESES$1, /* ( */ + CHAR_RIGHT_PARENTHESES: CHAR_RIGHT_PARENTHESES$1, /* ) */ + CHAR_LEFT_CURLY_BRACE: CHAR_LEFT_CURLY_BRACE$1, /* { */ + CHAR_RIGHT_CURLY_BRACE: CHAR_RIGHT_CURLY_BRACE$1, /* } */ + CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET$2, /* [ */ + CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET$2, /* ] */ + CHAR_DOUBLE_QUOTE: CHAR_DOUBLE_QUOTE$1, /* " */ + CHAR_SINGLE_QUOTE: CHAR_SINGLE_QUOTE$1, /* ' */ + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE +} = constants$1; + +/** + * parse + */ + +const parse$6 = (input, options = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + let opts = options || {}; + let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH$1, opts.maxLength) : MAX_LENGTH$1; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + + let ast = { type: 'root', input, nodes: [] }; + let stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + let length = input.length; + let index = 0; + let depth = 0; + let value; + + /** + * Helpers + */ + + const advance = () => input[index++]; + const push = node => { + if (node.type === 'text' && prev.type === 'dot') { + prev.type = 'text'; + } + + if (prev && prev.type === 'text' && node.type === 'text') { + prev.value += node.value; + return; + } + + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + + push({ type: 'bos' }); + + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); + + /** + * Invalid chars + */ + + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } + + /** + * Escaped chars + */ + + if (value === CHAR_BACKSLASH) { + push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); + continue; + } + + /** + * Right square bracket (literal): ']' + */ + + if (value === CHAR_RIGHT_SQUARE_BRACKET$2) { + push({ type: 'text', value: '\\' + value }); + continue; + } + + /** + * Left square bracket: '[' + */ + + if (value === CHAR_LEFT_SQUARE_BRACKET$2) { + brackets++; + let next; + + while (index < length && (next = advance())) { + value += next; + + if (next === CHAR_LEFT_SQUARE_BRACKET$2) { + brackets++; + continue; + } + + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET$2) { + brackets--; + + if (brackets === 0) { + break; + } + } + } + + push({ type: 'text', value }); + continue; + } + + /** + * Parentheses + */ + + if (value === CHAR_LEFT_PARENTHESES$1) { + block = push({ type: 'paren', nodes: [] }); + stack.push(block); + push({ type: 'text', value }); + continue; + } + + if (value === CHAR_RIGHT_PARENTHESES$1) { + if (block.type !== 'paren') { + push({ type: 'text', value }); + continue; + } + block = stack.pop(); + push({ type: 'text', value }); + block = stack[stack.length - 1]; + continue; + } + + /** + * Quotes: '|"|` + */ + + if (value === CHAR_DOUBLE_QUOTE$1 || value === CHAR_SINGLE_QUOTE$1 || value === CHAR_BACKTICK) { + let open = value; + let next; + + if (options.keepQuotes !== true) { + value = ''; + } + + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } + + value += next; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Left curly brace: '{' + */ + + if (value === CHAR_LEFT_CURLY_BRACE$1) { + depth++; + + let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; + let brace = { + type: 'brace', + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; + + block = push(brace); + stack.push(block); + push({ type: 'open', value }); + continue; + } + + /** + * Right curly brace: '}' + */ + + if (value === CHAR_RIGHT_CURLY_BRACE$1) { + if (block.type !== 'brace') { + push({ type: 'text', value }); + continue; + } + + let type = 'close'; + block = stack.pop(); + block.close = true; + + push({ type, value }); + depth--; + + block = stack[stack.length - 1]; + continue; + } + + /** + * Comma: ',' + */ + + if (value === CHAR_COMMA$2 && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + let open = block.nodes.shift(); + block.nodes = [open, { type: 'text', value: stringify$3(block) }]; + } + + push({ type: 'comma', value }); + block.commas++; + continue; + } + + /** + * Dot: '.' + */ + + if (value === CHAR_DOT$1 && depth > 0 && block.commas === 0) { + let siblings = block.nodes; + + if (depth === 0 || siblings.length === 0) { + push({ type: 'text', value }); + continue; + } + + if (prev.type === 'dot') { + block.range = []; + prev.value += value; + prev.type = 'range'; + + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = 'text'; + continue; + } + + block.ranges++; + block.args = []; + continue; + } + + if (prev.type === 'range') { + siblings.pop(); + + let before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + + push({ type: 'dot', value }); + continue; + } + + /** + * Text + */ + + push({ type: 'text', value }); + } + + // Mark imbalanced braces and brackets as invalid + do { + block = stack.pop(); + + if (block.type !== 'root') { + block.nodes.forEach(node => { + if (!node.nodes) { + if (node.type === 'open') node.isOpen = true; + if (node.type === 'close') node.isClose = true; + if (!node.nodes) node.type = 'text'; + node.invalid = true; + } + }); + + // get the location of the block on parent.nodes (block's siblings) + let parent = stack[stack.length - 1]; + let index = parent.nodes.indexOf(block); + // replace the (invalid) block with it's nodes + parent.nodes.splice(index, 1, ...block.nodes); + } + } while (stack.length > 0); + + push({ type: 'eos' }); + return ast; +}; + +var parse_1$2 = parse$6; + +/** + * Expand the given pattern or create a regex-compatible string. + * + * ```js + * const braces = require('braces'); + * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] + * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +const braces = (input, options = {}) => { + let output = []; + + if (Array.isArray(input)) { + for (let pattern of input) { + let result = braces.create(pattern, options); + if (Array.isArray(result)) { + output.push(...result); + } else { + output.push(result); + } + } + } else { + output = [].concat(braces.create(input, options)); + } + + if (options && options.expand === true && options.nodupes === true) { + output = [...new Set(output)]; + } + return output; +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * // braces.parse(pattern, [, options]); + * const ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * ``` + * @param {String} pattern Brace pattern to parse + * @param {Object} options + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = (input, options = {}) => parse_1$2(input, options); + +/** + * Creates a braces string from an AST, or an AST node. + * + * ```js + * const braces = require('braces'); + * let ast = braces.parse('foo/{a,b}/bar'); + * console.log(stringify(ast.nodes[2])); //=> '{a,b}' + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.stringify = (input, options = {}) => { + if (typeof input === 'string') { + return stringify$3(braces.parse(input, options), options); + } + return stringify$3(input, options); +}; + +/** + * Compiles a brace pattern into a regex-compatible, optimized string. + * This method is called by the main [braces](#braces) function by default. + * + * ```js + * const braces = require('braces'); + * console.log(braces.compile('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.compile = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + return compile_1(input, options); +}; + +/** + * Expands a brace pattern into an array. This method is called by the + * main [braces](#braces) function when `options.expand` is true. Before + * using this method it's recommended that you read the [performance notes](#performance)) + * and advantages of using [.compile](#compile) instead. + * + * ```js + * const braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + + let result = expand_1(input, options); + + // filter out empty strings if specified + if (options.noempty === true) { + result = result.filter(Boolean); + } + + // filter out duplicates if specified + if (options.nodupes === true) { + result = [...new Set(result)]; + } + + return result; +}; + +/** + * Processes a brace pattern and returns either an expanded array + * (if `options.expand` is true), a highly optimized regex-compatible string. + * This method is called by the main [braces](#braces) function. + * + * ```js + * const braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = (input, options = {}) => { + if (input === '' || input.length < 3) { + return [input]; + } + + return options.expand !== true + ? braces.compile(input, options) + : braces.expand(input, options); +}; + +/** + * Expose "braces" + */ + +var braces_1 = braces; + +var binaryExtensions = [ + "3dm", + "3ds", + "3g2", + "3gp", + "7z", + "a", + "aac", + "adp", + "ai", + "aif", + "aiff", + "alz", + "ape", + "apk", + "ar", + "arj", + "asf", + "au", + "avi", + "bak", + "baml", + "bh", + "bin", + "bk", + "bmp", + "btif", + "bz2", + "bzip2", + "cab", + "caf", + "cgm", + "class", + "cmx", + "cpio", + "cr2", + "cur", + "dat", + "dcm", + "deb", + "dex", + "djvu", + "dll", + "dmg", + "dng", + "doc", + "docm", + "docx", + "dot", + "dotm", + "dra", + "DS_Store", + "dsk", + "dts", + "dtshd", + "dvb", + "dwg", + "dxf", + "ecelp4800", + "ecelp7470", + "ecelp9600", + "egg", + "eol", + "eot", + "epub", + "exe", + "f4v", + "fbs", + "fh", + "fla", + "flac", + "fli", + "flv", + "fpx", + "fst", + "fvt", + "g3", + "gh", + "gif", + "graffle", + "gz", + "gzip", + "h261", + "h263", + "h264", + "icns", + "ico", + "ief", + "img", + "ipa", + "iso", + "jar", + "jpeg", + "jpg", + "jpgv", + "jpm", + "jxr", + "key", + "ktx", + "lha", + "lib", + "lvp", + "lz", + "lzh", + "lzma", + "lzo", + "m3u", + "m4a", + "m4v", + "mar", + "mdi", + "mht", + "mid", + "midi", + "mj2", + "mka", + "mkv", + "mmr", + "mng", + "mobi", + "mov", + "movie", + "mp3", + "mp4", + "mp4a", + "mpeg", + "mpg", + "mpga", + "mxu", + "nef", + "npx", + "numbers", + "nupkg", + "o", + "oga", + "ogg", + "ogv", + "otf", + "pages", + "pbm", + "pcx", + "pdb", + "pdf", + "pea", + "pgm", + "pic", + "png", + "pnm", + "pot", + "potm", + "potx", + "ppa", + "ppam", + "ppm", + "pps", + "ppsm", + "ppsx", + "ppt", + "pptm", + "pptx", + "psd", + "pya", + "pyc", + "pyo", + "pyv", + "qt", + "rar", + "ras", + "raw", + "resources", + "rgb", + "rip", + "rlc", + "rmf", + "rmvb", + "rtf", + "rz", + "s3m", + "s7z", + "scpt", + "sgi", + "shar", + "sil", + "sketch", + "slk", + "smv", + "snk", + "so", + "stl", + "suo", + "sub", + "swf", + "tar", + "tbz", + "tbz2", + "tga", + "tgz", + "thmx", + "tif", + "tiff", + "tlz", + "ttc", + "ttf", + "txz", + "udf", + "uvh", + "uvi", + "uvm", + "uvp", + "uvs", + "uvu", + "viv", + "vob", + "war", + "wav", + "wax", + "wbmp", + "wdp", + "weba", + "webm", + "webp", + "whl", + "wim", + "wm", + "wma", + "wmv", + "wmx", + "woff", + "woff2", + "wrm", + "wvx", + "xbm", + "xif", + "xla", + "xlam", + "xls", + "xlsb", + "xlsm", + "xlsx", + "xlt", + "xltm", + "xltx", + "xm", + "xmind", + "xpi", + "xpm", + "xwd", + "xz", + "z", + "zip", + "zipx" +]; + +var binaryExtensions$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': binaryExtensions +}); + +var require$$0 = getCjsExportFromNamespace(binaryExtensions$1); + +var binaryExtensions$2 = require$$0; + +const extensions = new Set(binaryExtensions$2); + +var isBinaryPath = filePath => extensions.has(path$1.extname(filePath).slice(1).toLowerCase()); + +var constants$2 = createCommonjsModule(function (module, exports) { + +const {sep} = path$1; +const {platform} = process; + +exports.EV_ALL = 'all'; +exports.EV_READY = 'ready'; +exports.EV_ADD = 'add'; +exports.EV_CHANGE = 'change'; +exports.EV_ADD_DIR = 'addDir'; +exports.EV_UNLINK = 'unlink'; +exports.EV_UNLINK_DIR = 'unlinkDir'; +exports.EV_RAW = 'raw'; +exports.EV_ERROR = 'error'; + +exports.STR_DATA = 'data'; +exports.STR_END = 'end'; +exports.STR_CLOSE = 'close'; + +exports.FSEVENT_CREATED = 'created'; +exports.FSEVENT_MODIFIED = 'modified'; +exports.FSEVENT_DELETED = 'deleted'; +exports.FSEVENT_MOVED = 'moved'; +exports.FSEVENT_CLONED = 'cloned'; +exports.FSEVENT_UNKNOWN = 'unknown'; +exports.FSEVENT_TYPE_DIRECTORY = 'directory'; +exports.FSEVENT_TYPE_SYMLINK = 'symlink'; + +exports.KEY_LISTENERS = 'listeners'; +exports.KEY_ERR = 'errHandlers'; +exports.KEY_RAW = 'rawEmitters'; +exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW]; + +exports.DOT_SLASH = `.${sep}`; + +exports.BACK_SLASH_RE = /\\/g; +exports.DOUBLE_SLASH_RE = /\/\//; +exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/; +exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/; +exports.REPLACER_RE = /^\.[/\\]/; + +exports.SLASH = '/'; +exports.BRACE_START = '{'; +exports.BANG = '!'; +exports.ONE_DOT = '.'; +exports.TWO_DOTS = '..'; +exports.STAR = '*'; +exports.GLOBSTAR = '**'; +exports.ROOT_GLOBSTAR = '/**/*'; +exports.SLASH_GLOBSTAR = '/**'; +exports.DIR_SUFFIX = 'Dir'; +exports.ANYMATCH_OPTS = {dot: true}; +exports.STRING_TYPE = 'string'; +exports.FUNCTION_TYPE = 'function'; +exports.EMPTY_STR = ''; +exports.EMPTY_FN = () => {}; +exports.IDENTITY_FN = val => val; + +exports.isWindows = platform === 'win32'; +exports.isMacos = platform === 'darwin'; +}); +var constants_1 = constants$2.EV_ALL; +var constants_2 = constants$2.EV_READY; +var constants_3 = constants$2.EV_ADD; +var constants_4 = constants$2.EV_CHANGE; +var constants_5 = constants$2.EV_ADD_DIR; +var constants_6 = constants$2.EV_UNLINK; +var constants_7 = constants$2.EV_UNLINK_DIR; +var constants_8 = constants$2.EV_RAW; +var constants_9 = constants$2.EV_ERROR; +var constants_10 = constants$2.STR_DATA; +var constants_11 = constants$2.STR_END; +var constants_12 = constants$2.STR_CLOSE; +var constants_13 = constants$2.FSEVENT_CREATED; +var constants_14 = constants$2.FSEVENT_MODIFIED; +var constants_15 = constants$2.FSEVENT_DELETED; +var constants_16 = constants$2.FSEVENT_MOVED; +var constants_17 = constants$2.FSEVENT_CLONED; +var constants_18 = constants$2.FSEVENT_UNKNOWN; +var constants_19 = constants$2.FSEVENT_TYPE_DIRECTORY; +var constants_20 = constants$2.FSEVENT_TYPE_SYMLINK; +var constants_21 = constants$2.KEY_LISTENERS; +var constants_22 = constants$2.KEY_ERR; +var constants_23 = constants$2.KEY_RAW; +var constants_24 = constants$2.HANDLER_KEYS; +var constants_25 = constants$2.DOT_SLASH; +var constants_26 = constants$2.BACK_SLASH_RE; +var constants_27 = constants$2.DOUBLE_SLASH_RE; +var constants_28 = constants$2.SLASH_OR_BACK_SLASH_RE; +var constants_29 = constants$2.DOT_RE; +var constants_30 = constants$2.REPLACER_RE; +var constants_31 = constants$2.SLASH; +var constants_32 = constants$2.BRACE_START; +var constants_33 = constants$2.BANG; +var constants_34 = constants$2.ONE_DOT; +var constants_35 = constants$2.TWO_DOTS; +var constants_36 = constants$2.STAR; +var constants_37 = constants$2.GLOBSTAR; +var constants_38 = constants$2.ROOT_GLOBSTAR; +var constants_39 = constants$2.SLASH_GLOBSTAR; +var constants_40 = constants$2.DIR_SUFFIX; +var constants_41 = constants$2.ANYMATCH_OPTS; +var constants_42 = constants$2.STRING_TYPE; +var constants_43 = constants$2.FUNCTION_TYPE; +var constants_44 = constants$2.EMPTY_STR; +var constants_45 = constants$2.EMPTY_FN; +var constants_46 = constants$2.IDENTITY_FN; +var constants_47 = constants$2.isWindows; +var constants_48 = constants$2.isMacos; + +const { promisify: promisify$1 } = util$1; + +const { + isWindows: isWindows$1, + EMPTY_FN, + EMPTY_STR, + KEY_LISTENERS, + KEY_ERR, + KEY_RAW, + HANDLER_KEYS, + EV_CHANGE, + EV_ADD, + EV_ADD_DIR, + EV_ERROR, + STR_DATA, + STR_END, + BRACE_START, + STAR: STAR$1 +} = constants$2; + +const THROTTLE_MODE_WATCH = 'watch'; + +const open = promisify$1(fs$1.open); +const stat$3 = promisify$1(fs$1.stat); +const lstat$1 = promisify$1(fs$1.lstat); +const close = promisify$1(fs$1.close); +const fsrealpath = promisify$1(fs$1.realpath); + +const statMethods = { lstat: lstat$1, stat: stat$3 }; + +// TODO: emit errors properly. Example: EMFILE on Macos. +const foreach = (val, fn) => { + if (val instanceof Set) { + val.forEach(fn); + } else { + fn(val); + } +}; + +const addAndConvert = (main, prop, item) => { + let container = main[prop]; + if (!(container instanceof Set)) { + main[prop] = container = new Set([container]); + } + container.add(item); +}; + +const clearItem = cont => key => { + const set = cont[key]; + if (set instanceof Set) { + set.clear(); + } else { + delete cont[key]; + } +}; + +const delFromSet = (main, prop, item) => { + const container = main[prop]; + if (container instanceof Set) { + container.delete(item); + } else if (container === item) { + delete main[prop]; + } +}; + +const isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val; + +/** + * @typedef {String} Path + */ + +// fs_watch helpers + +// object to hold per-process fs_watch instances +// (may be shared across chokidar FSWatcher instances) + +/** + * @typedef {Object} FsWatchContainer + * @property {Set} listeners + * @property {Set} errHandlers + * @property {Set} rawEmitters + * @property {fs.FSWatcher=} watcher + * @property {Boolean=} watcherUnusable + */ + +/** + * @type {Map} + */ +const FsWatchInstances = new Map(); + +/** + * Instantiates the fs_watch interface + * @param {String} path to be watched + * @param {Object} options to be passed to fs_watch + * @param {Function} listener main event handler + * @param {Function} errHandler emits info about errors + * @param {Function} emitRaw emits raw event data + * @returns {fs.FSWatcher} new fsevents instance + */ +function createFsWatchInstance(path, options, listener, errHandler, emitRaw) { + const handleEvent = (rawEvent, evPath) => { + listener(path); + emitRaw(rawEvent, evPath, {watchedPath: path}); + + // emit based on events occurring for files from a directory's watcher in + // case the file's watcher misses it (and rely on throttling to de-dupe) + if (evPath && path !== evPath) { + fsWatchBroadcast( + path$1.resolve(path, evPath), KEY_LISTENERS, path$1.join(path, evPath) + ); + } + }; + try { + return fs$1.watch(path, options, handleEvent); + } catch (error) { + errHandler(error); + } +} + +/** + * Helper for passing fs_watch event data to a collection of listeners + * @param {Path} fullPath absolute path bound to fs_watch instance + * @param {String} type listener type + * @param {*=} val1 arguments to be passed to listeners + * @param {*=} val2 + * @param {*=} val3 + */ +const fsWatchBroadcast = (fullPath, type, val1, val2, val3) => { + const cont = FsWatchInstances.get(fullPath); + if (!cont) return; + foreach(cont[type], (listener) => { + listener(val1, val2, val3); + }); +}; + +/** + * Instantiates the fs_watch interface or binds listeners + * to an existing one covering the same file system entry + * @param {String} path + * @param {String} fullPath absolute path + * @param {Object} options to be passed to fs_watch + * @param {Object} handlers container for event listener functions + */ +const setFsWatchListener = (path, fullPath, options, handlers) => { + const {listener, errHandler, rawEmitter} = handlers; + let cont = FsWatchInstances.get(fullPath); + + /** @type {fs.FSWatcher=} */ + let watcher; + if (!options.persistent) { + watcher = createFsWatchInstance( + path, options, listener, errHandler, rawEmitter + ); + return watcher.close.bind(watcher); + } + if (cont) { + addAndConvert(cont, KEY_LISTENERS, listener); + addAndConvert(cont, KEY_ERR, errHandler); + addAndConvert(cont, KEY_RAW, rawEmitter); + } else { + watcher = createFsWatchInstance( + path, + options, + fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), + errHandler, // no need to use broadcast here + fsWatchBroadcast.bind(null, fullPath, KEY_RAW) + ); + if (!watcher) return; + watcher.on(EV_ERROR, async (error) => { + const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR); + cont.watcherUnusable = true; // documented since Node 10.4.1 + // Workaround for https://github.com/joyent/node/issues/4337 + if (isWindows$1 && error.code === 'EPERM') { + try { + const fd = await open(path, 'r'); + await close(fd); + broadcastErr(error); + } catch (err) {} + } else { + broadcastErr(error); + } + }); + cont = { + listeners: listener, + errHandlers: errHandler, + rawEmitters: rawEmitter, + watcher + }; + FsWatchInstances.set(fullPath, cont); + } + // const index = cont.listeners.indexOf(listener); + + // removes this instance's listeners and closes the underlying fs_watch + // instance if there are no more listeners left + return () => { + delFromSet(cont, KEY_LISTENERS, listener); + delFromSet(cont, KEY_ERR, errHandler); + delFromSet(cont, KEY_RAW, rawEmitter); + if (isEmptySet(cont.listeners)) { + // Check to protect against issue gh-730. + // if (cont.watcherUnusable) { + cont.watcher.close(); + // } + FsWatchInstances.delete(fullPath); + HANDLER_KEYS.forEach(clearItem(cont)); + cont.watcher = undefined; + Object.freeze(cont); + } + }; +}; + +// fs_watchFile helpers + +// object to hold per-process fs_watchFile instances +// (may be shared across chokidar FSWatcher instances) +const FsWatchFileInstances = new Map(); + +/** + * Instantiates the fs_watchFile interface or binds listeners + * to an existing one covering the same file system entry + * @param {String} path to be watched + * @param {String} fullPath absolute path + * @param {Object} options options to be passed to fs_watchFile + * @param {Object} handlers container for event listener functions + * @returns {Function} closer + */ +const setFsWatchFileListener = (path, fullPath, options, handlers) => { + const {listener, rawEmitter} = handlers; + let cont = FsWatchFileInstances.get(fullPath); + + /* eslint-disable no-unused-vars, prefer-destructuring */ + let listeners = new Set(); + let rawEmitters = new Set(); + + const copts = cont && cont.options; + if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) { + // "Upgrade" the watcher to persistence or a quicker interval. + // This creates some unlikely edge case issues if the user mixes + // settings in a very weird way, but solving for those cases + // doesn't seem worthwhile for the added complexity. + listeners = cont.listeners; + rawEmitters = cont.rawEmitters; + fs$1.unwatchFile(fullPath); + cont = undefined; + } + + /* eslint-enable no-unused-vars, prefer-destructuring */ + + if (cont) { + addAndConvert(cont, KEY_LISTENERS, listener); + addAndConvert(cont, KEY_RAW, rawEmitter); + } else { + // TODO + // listeners.add(listener); + // rawEmitters.add(rawEmitter); + cont = { + listeners: listener, + rawEmitters: rawEmitter, + options, + watcher: fs$1.watchFile(fullPath, options, (curr, prev) => { + foreach(cont.rawEmitters, (rawEmitter) => { + rawEmitter(EV_CHANGE, fullPath, {curr, prev}); + }); + const currmtime = curr.mtimeMs; + if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) { + foreach(cont.listeners, (listener) => listener(path, curr)); + } + }) + }; + FsWatchFileInstances.set(fullPath, cont); + } + // const index = cont.listeners.indexOf(listener); + + // Removes this instance's listeners and closes the underlying fs_watchFile + // instance if there are no more listeners left. + return () => { + delFromSet(cont, KEY_LISTENERS, listener); + delFromSet(cont, KEY_RAW, rawEmitter); + if (isEmptySet(cont.listeners)) { + FsWatchFileInstances.delete(fullPath); + fs$1.unwatchFile(fullPath); + cont.options = cont.watcher = undefined; + Object.freeze(cont); + } + }; +}; + +/** + * @mixin + */ +class NodeFsHandler { + +/** + * @param {import("../index").FSWatcher} fsW + */ +constructor(fsW) { + this.fsw = fsW; + this._boundHandleError = (error) => fsW._handleError(error); +} + +/** + * Watch file for changes with fs_watchFile or fs_watch. + * @param {String} path to file or dir + * @param {Function} listener on fs change + * @returns {Function} closer for the watcher instance + */ +_watchWithNodeFs(path, listener) { + const opts = this.fsw.options; + const directory = path$1.dirname(path); + const basename = path$1.basename(path); + const parent = this.fsw._getWatchedDir(directory); + parent.add(basename); + const absolutePath = path$1.resolve(path); + const options = {persistent: opts.persistent}; + if (!listener) listener = EMPTY_FN; + + let closer; + if (opts.usePolling) { + options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ? + opts.binaryInterval : opts.interval; + closer = setFsWatchFileListener(path, absolutePath, options, { + listener, + rawEmitter: this.fsw._emitRaw + }); + } else { + closer = setFsWatchListener(path, absolutePath, options, { + listener, + errHandler: this._boundHandleError, + rawEmitter: this.fsw._emitRaw + }); + } + return closer; +} + +/** + * Watch a file and emit add event if warranted. + * @param {Path} file Path + * @param {fs.Stats} stats result of fs_stat + * @param {Boolean} initialAdd was the file added at watch instantiation? + * @returns {Function} closer for the watcher instance + */ +_handleFile(file, stats, initialAdd) { + if (this.fsw.closed) { + return; + } + const dirname = path$1.dirname(file); + const basename = path$1.basename(file); + const parent = this.fsw._getWatchedDir(dirname); + // stats is always present + let prevStats = stats; + + // if the file is already being watched, do nothing + if (parent.has(basename)) return; + + // kick off the watcher + const closer = this._watchWithNodeFs(file, async (path, newStats) => { + if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return; + if (!newStats || newStats.mtimeMs === 0) { + try { + const newStats = await stat$3(file); + if (this.fsw.closed) return; + // Check that change event was not fired because of changed only accessTime. + const at = newStats.atimeMs; + const mt = newStats.mtimeMs; + if (!at || at <= mt || mt !== prevStats.mtimeMs) { + this.fsw._emit(EV_CHANGE, file, newStats); + } + prevStats = newStats; + } catch (error) { + // Fix issues where mtime is null but file is still present + this.fsw._remove(dirname, basename); + } + // add is about to be emitted if file not already tracked in parent + } else if (parent.has(basename)) { + // Check that change event was not fired because of changed only accessTime. + const at = newStats.atimeMs; + const mt = newStats.mtimeMs; + if (!at || at <= mt || mt !== prevStats.mtimeMs) { + this.fsw._emit(EV_CHANGE, file, newStats); + } + prevStats = newStats; + } + }); + + // emit an add event if we're supposed to + if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) { + if (!this.fsw._throttle(EV_ADD, file, 0)) return; + this.fsw._emit(EV_ADD, file, stats); + } + + return closer; +} + +/** + * Handle symlinks encountered while reading a dir. + * @param {Object} entry returned by readdirp + * @param {String} directory path of dir being read + * @param {String} path of this item + * @param {String} item basename of this item + * @returns {Promise} true if no more processing is needed for this entry. + */ +async _handleSymlink(entry, directory, path, item) { + if (this.fsw.closed) { + return; + } + const full = entry.fullPath; + const dir = this.fsw._getWatchedDir(directory); + + if (!this.fsw.options.followSymlinks) { + // watch symlink directly (don't follow) and detect changes + this.fsw._incrReadyCount(); + const linkPath = await fsrealpath(path); + if (this.fsw.closed) return; + if (dir.has(item)) { + if (this.fsw._symlinkPaths.get(full) !== linkPath) { + this.fsw._symlinkPaths.set(full, linkPath); + this.fsw._emit(EV_CHANGE, path, entry.stats); + } + } else { + dir.add(item); + this.fsw._symlinkPaths.set(full, linkPath); + this.fsw._emit(EV_ADD, path, entry.stats); + } + this.fsw._emitReady(); + return true; + } + + // don't follow the same symlink more than once + if (this.fsw._symlinkPaths.has(full)) { + return true; + } + + this.fsw._symlinkPaths.set(full, true); +} + +_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { + // Normalize the directory name on Windows + directory = path$1.join(directory, EMPTY_STR); + + if (!wh.hasGlob) { + throttler = this.fsw._throttle('readdir', directory, 1000); + if (!throttler) return; + } + + const previous = this.fsw._getWatchedDir(wh.path); + const current = new Set(); + + let stream = this.fsw._readdirp(directory, { + fileFilter: entry => wh.filterPath(entry), + directoryFilter: entry => wh.filterDir(entry), + depth: 0 + }).on(STR_DATA, async (entry) => { + if (this.fsw.closed) { + stream = undefined; + return; + } + const item = entry.path; + let path = path$1.join(directory, item); + current.add(item); + + if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) { + return; + } + + if (this.fsw.closed) { + stream = undefined; + return; + } + // Files that present in current directory snapshot + // but absent in previous are added to watch list and + // emit `add` event. + if (item === target || !target && !previous.has(item)) { + this.fsw._incrReadyCount(); + + // ensure relativeness of path is preserved in case of watcher reuse + path = path$1.join(dir, path$1.relative(dir, path)); + + this._addToNodeFs(path, initialAdd, wh, depth + 1); + } + }).on(EV_ERROR, this._boundHandleError); + + return new Promise(resolve => + stream.once(STR_END, () => { + if (this.fsw.closed) { + stream = undefined; + return; + } + const wasThrottled = throttler ? throttler.clear() : false; + + resolve(); + + // Files that absent in current directory snapshot + // but present in previous emit `remove` event + // and are removed from @watched[directory]. + previous.getChildren().filter((item) => { + return item !== directory && + !current.has(item) && + // in case of intersecting globs; + // a path may have been filtered out of this readdir, but + // shouldn't be removed because it matches a different glob + (!wh.hasGlob || wh.filterPath({ + fullPath: path$1.resolve(directory, item) + })); + }).forEach((item) => { + this.fsw._remove(directory, item); + }); + + stream = undefined; + + // one more time for any missed in case changes came in extremely quickly + if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler); + }) + ); +} + +/** + * Read directory to add / remove files from `@watched` list and re-read it on change. + * @param {String} dir fs path + * @param {fs.Stats} stats + * @param {Boolean} initialAdd + * @param {Number} depth relative to user-supplied path + * @param {String} target child path targeted for watch + * @param {Object} wh Common watch helpers for this path + * @param {String} realpath + * @returns {Promise} closer for the watcher instance. + */ +async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) { + const parentDir = this.fsw._getWatchedDir(path$1.dirname(dir)); + const tracked = parentDir.has(path$1.basename(dir)); + if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) { + if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats); + } + + // ensure dir is tracked (harmless if redundant) + parentDir.add(path$1.basename(dir)); + this.fsw._getWatchedDir(dir); + let throttler; + let closer; + + const oDepth = this.fsw.options.depth; + if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) { + if (!target) { + await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler); + if (this.fsw.closed) return; + } + + closer = this._watchWithNodeFs(dir, (dirPath, stats) => { + // if current directory is removed, do nothing + if (stats && stats.mtimeMs === 0) return; + + this._handleRead(dirPath, false, wh, target, dir, depth, throttler); + }); + } + return closer; +} + +/** + * Handle added file, directory, or glob pattern. + * Delegates call to _handleFile / _handleDir after checks. + * @param {String} path to file or ir + * @param {Boolean} initialAdd was the file added at watch instantiation? + * @param {Object} priorWh depth relative to user-supplied path + * @param {Number} depth Child path actually targeted for watch + * @param {String=} target Child path actually targeted for watch + * @returns {Promise} + */ +async _addToNodeFs(path, initialAdd, priorWh, depth, target) { + const ready = this.fsw._emitReady; + if (this.fsw._isIgnored(path) || this.fsw.closed) { + ready(); + return false; + } + + const wh = this.fsw._getWatchHelpers(path, depth); + if (!wh.hasGlob && priorWh) { + wh.hasGlob = priorWh.hasGlob; + wh.globFilter = priorWh.globFilter; + wh.filterPath = entry => priorWh.filterPath(entry); + wh.filterDir = entry => priorWh.filterDir(entry); + } + + // evaluate what is at the path we're being asked to watch + try { + const stats = await statMethods[wh.statMethod](wh.watchPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(wh.watchPath, stats)) { + ready(); + return false; + } + + const follow = this.fsw.options.followSymlinks && !path.includes(STAR$1) && !path.includes(BRACE_START); + let closer; + if (stats.isDirectory()) { + const targetPath = follow ? await fsrealpath(path) : path; + if (this.fsw.closed) return; + closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath); + if (this.fsw.closed) return; + // preserve this symlink's target path + if (path !== targetPath && targetPath !== undefined) { + this.fsw._symlinkPaths.set(targetPath, true); + } + } else if (stats.isSymbolicLink()) { + const targetPath = follow ? await fsrealpath(path) : path; + if (this.fsw.closed) return; + const parent = path$1.dirname(wh.watchPath); + this.fsw._getWatchedDir(parent).add(wh.watchPath); + this.fsw._emit(EV_ADD, wh.watchPath, stats); + closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath); + if (this.fsw.closed) return; + + // preserve this symlink's target path + if (targetPath !== undefined) { + this.fsw._symlinkPaths.set(path$1.resolve(path), targetPath); + } + } else { + closer = this._handleFile(wh.watchPath, stats, initialAdd); + } + ready(); + + this.fsw._addPathCloser(path, closer); + return false; + + } catch (error) { + if (this.fsw._handleError(error)) { + ready(); + return path; + } + } +} + +} + +var nodefsHandler = NodeFsHandler; + +const { promisify: promisify$2 } = util$1; + +let fsevents; +try { + fsevents = undefined; +} catch (error) { + if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error); +} + +if (fsevents) { + // TODO: real check + const mtch = process.version.match(/v(\d+)\.(\d+)/); + if (mtch && mtch[1] && mtch[2]) { + const maj = Number.parseInt(mtch[1], 10); + const min = Number.parseInt(mtch[2], 10); + if (maj === 8 && min < 16) { + fsevents = undefined; + } + } +} + +const { + EV_ADD: EV_ADD$1, + EV_CHANGE: EV_CHANGE$1, + EV_ADD_DIR: EV_ADD_DIR$1, + EV_UNLINK, + EV_ERROR: EV_ERROR$1, + STR_DATA: STR_DATA$1, + STR_END: STR_END$1, + FSEVENT_CREATED, + FSEVENT_MODIFIED, + FSEVENT_DELETED, + FSEVENT_MOVED, + // FSEVENT_CLONED, + FSEVENT_UNKNOWN, + FSEVENT_TYPE_DIRECTORY, + FSEVENT_TYPE_SYMLINK, + + ROOT_GLOBSTAR, + DIR_SUFFIX, + DOT_SLASH, + FUNCTION_TYPE, + EMPTY_FN: EMPTY_FN$1, + IDENTITY_FN +} = constants$2; +const FS_MODE_READ = 'r'; + +const Depth = (value) => isNaN(value) ? {} : {depth: value}; + +const stat$4 = promisify$2(fs$1.stat); +const open$1 = promisify$2(fs$1.open); +const close$1 = promisify$2(fs$1.close); +const lstat$2 = promisify$2(fs$1.lstat); +const realpath$2 = promisify$2(fs$1.realpath); + +const statMethods$1 = { stat: stat$4, lstat: lstat$2 }; + +/** + * @typedef {String} Path + */ + +/** + * @typedef {Object} FsEventsWatchContainer + * @property {Set} listeners + * @property {Function} rawEmitter + * @property {{stop: Function}} watcher + */ + +// fsevents instance helper functions +/** + * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances) + * @type {Map} + */ +const FSEventsWatchers = new Map(); + +// Threshold of duplicate path prefixes at which to start +// consolidating going forward +const consolidateThreshhold = 10; + +const wrongEventFlags = new Set([ + 69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912 +]); + +/** + * Instantiates the fsevents interface + * @param {Path} path path to be watched + * @param {Function} callback called when fsevents is bound and ready + * @returns {{stop: Function}} new fsevents instance + */ +const createFSEventsInstance = (path, callback) => { + const stop = fsevents.watch(path, callback); + return {stop}; +}; + +/** + * Instantiates the fsevents interface or binds listeners to an existing one covering + * the same file tree. + * @param {Path} path - to be watched + * @param {Path} realPath - real path for symlinks + * @param {Function} listener - called when fsevents emits events + * @param {Function} rawEmitter - passes data to listeners of the 'raw' event + * @returns {Function} closer + */ +function setFSEventsListener(path, realPath, listener, rawEmitter, fsw) { + let watchPath = path$1.extname(path) ? path$1.dirname(path) : path; + const parentPath = path$1.dirname(watchPath); + let cont = FSEventsWatchers.get(watchPath); + + // If we've accumulated a substantial number of paths that + // could have been consolidated by watching one directory + // above the current one, create a watcher on the parent + // path instead, so that we do consolidate going forward. + if (couldConsolidate(parentPath)) { + watchPath = parentPath; + } + + const resolvedPath = path$1.resolve(path); + const hasSymlink = resolvedPath !== realPath; + + const filteredListener = (fullPath, flags, info) => { + if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath); + if ( + fullPath === resolvedPath || + !fullPath.indexOf(resolvedPath + path$1.sep) + ) listener(fullPath, flags, info); + }; + + // check if there is already a watcher on a parent path + // modifies `watchPath` to the parent path when it finds a match + let watchedParent = false; + for (const watchedPath of FSEventsWatchers.keys()) { + if (realPath.indexOf(path$1.resolve(watchedPath) + path$1.sep) === 0) { + watchPath = watchedPath; + cont = FSEventsWatchers.get(watchPath); + watchedParent = true; + break; + } + } + + if (cont || watchedParent) { + cont.listeners.add(filteredListener); + } else { + cont = { + listeners: new Set([filteredListener]), + rawEmitter, + watcher: createFSEventsInstance(watchPath, (fullPath, flags) => { + if (fsw.closed) return; + const info = fsevents.getInfo(fullPath, flags); + cont.listeners.forEach(list => { + list(fullPath, flags, info); + }); + + cont.rawEmitter(info.event, fullPath, info); + }) + }; + FSEventsWatchers.set(watchPath, cont); + } + + // removes this instance's listeners and closes the underlying fsevents + // instance if there are no more listeners left + return () => { + const lst = cont.listeners; + + lst.delete(filteredListener); + if (!lst.size) { + FSEventsWatchers.delete(watchPath); + if (cont.watcher) return cont.watcher.stop().then(() => { + cont.rawEmitter = cont.watcher = undefined; + Object.freeze(cont); + }); + } + }; +} + +// Decide whether or not we should start a new higher-level +// parent watcher +const couldConsolidate = (path) => { + let count = 0; + for (const watchPath of FSEventsWatchers.keys()) { + if (watchPath.indexOf(path) === 0) { + count++; + if (count >= consolidateThreshhold) { + return true; + } + } + } + + return false; +}; + +// returns boolean indicating whether fsevents can be used +const canUse = () => fsevents && FSEventsWatchers.size < 128; + +// determines subdirectory traversal levels from root to path +const calcDepth = (path, root) => { + let i = 0; + while (!path.indexOf(root) && (path = path$1.dirname(path)) !== root) i++; + return i; +}; + +/** + * @mixin + */ +class FsEventsHandler { + +/** + * @param {import('../index').FSWatcher} fsw + */ +constructor(fsw) { + this.fsw = fsw; +} +checkIgnored(path, stats) { + const ipaths = this.fsw._ignoredPaths; + if (this.fsw._isIgnored(path, stats)) { + ipaths.add(path); + if (stats && stats.isDirectory()) { + ipaths.add(path + ROOT_GLOBSTAR); + } + return true; + } + + ipaths.delete(path); + ipaths.delete(path + ROOT_GLOBSTAR); +} + +addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) { + const event = watchedDir.has(item) ? EV_CHANGE$1 : EV_ADD$1; + this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts); +} + +async checkFd(path, fullPath, realPath, parent, watchedDir, item, info, opts) { + try { + const fd = await open$1(path, FS_MODE_READ); + if (this.fsw.closed) return; + await close$1(fd); + if (this.fsw.closed) return; + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } catch (error) { + if (error.code === 'EACCES') { + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } else { + this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } +} + +handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) { + if (this.fsw.closed || this.checkIgnored(path)) return; + + if (event === EV_UNLINK) { + // suppress unlink events on never before seen files + if (info.type === FSEVENT_TYPE_DIRECTORY || watchedDir.has(item)) { + this.fsw._remove(parent, item); + } + } else { + if (event === EV_ADD$1) { + // track new directories + if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path); + + if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) { + // push symlinks back to the top of the stack to get handled + const curDepth = opts.depth === undefined ? + undefined : calcDepth(fullPath, realPath) + 1; + return this._addToFsEvents(path, false, true, curDepth); + } + + // track new paths + // (other than symlinks being followed, which will be tracked soon) + this.fsw._getWatchedDir(parent).add(item); + } + /** + * @type {'add'|'addDir'|'unlink'|'unlinkDir'} + */ + const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event; + this.fsw._emit(eventName, path); + if (eventName === EV_ADD_DIR$1) this._addToFsEvents(path, false, true); + } +} + +/** + * Handle symlinks encountered during directory scan + * @param {String} watchPath - file/dir path to be watched with fsevents + * @param {String} realPath - real path (in case of symlinks) + * @param {Function} transform - path transformer + * @param {Function} globFilter - path filter in case a glob pattern was provided + * @returns {Function} closer for the watcher instance +*/ +_watchWithFsEvents(watchPath, realPath, transform, globFilter) { + if (this.fsw.closed) return; + if (this.fsw._isIgnored(watchPath)) return; + const opts = this.fsw.options; + const watchCallback = async (fullPath, flags, info) => { + if (this.fsw.closed) return; + if ( + opts.depth !== undefined && + calcDepth(fullPath, realPath) > opts.depth + ) return; + const path = transform(path$1.join( + watchPath, path$1.relative(watchPath, fullPath) + )); + if (globFilter && !globFilter(path)) return; + // ensure directories are tracked + const parent = path$1.dirname(path); + const item = path$1.basename(path); + const watchedDir = this.fsw._getWatchedDir( + info.type === FSEVENT_TYPE_DIRECTORY ? path : parent + ); + + // correct for wrong events emitted + if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) { + if (typeof opts.ignored === FUNCTION_TYPE) { + let stats; + try { + stats = await stat$4(path); + } catch (error) {} + if (this.fsw.closed) return; + if (this.checkIgnored(path, stats)) return; + if (stats) { + this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } else { + this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } else { + this.checkFd(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } else { + switch (info.event) { + case FSEVENT_CREATED: + case FSEVENT_MODIFIED: + return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts); + case FSEVENT_DELETED: + case FSEVENT_MOVED: + return this.checkFd(path, fullPath, realPath, parent, watchedDir, item, info, opts); + } + } + }; + + const closer = setFSEventsListener( + watchPath, + realPath, + watchCallback, + this.fsw._emitRaw, + this.fsw + ); + + this.fsw._emitReady(); + return closer; +} + +/** + * Handle symlinks encountered during directory scan + * @param {String} linkPath path to symlink + * @param {String} fullPath absolute path to the symlink + * @param {Function} transform pre-existing path transformer + * @param {Number} curDepth level of subdirectories traversed to where symlink is + * @returns {Promise} + */ +async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) { + // don't follow the same symlink more than once + if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return; + + this.fsw._symlinkPaths.set(fullPath, true); + this.fsw._incrReadyCount(); + + try { + const linkTarget = await realpath$2(linkPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(linkTarget)) { + return this.fsw._emitReady(); + } + + this.fsw._incrReadyCount(); + + // add the linkTarget for watching with a wrapper for transform + // that causes emitted paths to incorporate the link's path + this._addToFsEvents(linkTarget || linkPath, (path) => { + let aliasedPath = linkPath; + if (linkTarget && linkTarget !== DOT_SLASH) { + aliasedPath = path.replace(linkTarget, linkPath); + } else if (path !== DOT_SLASH) { + aliasedPath = path$1.join(linkPath, path); + } + return transform(aliasedPath); + }, false, curDepth); + } catch(error) { + if (this.fsw._handleError(error)) { + return this.fsw._emitReady(); + } + } +} + +/** + * + * @param {Path} newPath + * @param {fs.Stats} stats + */ +emitAdd(newPath, stats, processPath, opts, forceAdd) { + const pp = processPath(newPath); + const isDir = stats.isDirectory(); + const dirObj = this.fsw._getWatchedDir(path$1.dirname(pp)); + const base = path$1.basename(pp); + + // ensure empty dirs get tracked + if (isDir) this.fsw._getWatchedDir(pp); + if (dirObj.has(base)) return; + dirObj.add(base); + + if (!opts.ignoreInitial || forceAdd === true) { + this.fsw._emit(isDir ? EV_ADD_DIR$1 : EV_ADD$1, pp, stats); + } +} + +initWatch(realPath, path, wh, processPath) { + if (this.fsw.closed) return; + const closer = this._watchWithFsEvents( + wh.watchPath, + path$1.resolve(realPath || wh.watchPath), + processPath, + wh.globFilter + ); + this.fsw._addPathCloser(path, closer); +} + +/** + * Handle added path with fsevents + * @param {String} path file/dir path or glob pattern + * @param {Function|Boolean=} transform converts working path to what the user expects + * @param {Boolean=} forceAdd ensure add is emitted + * @param {Number=} priorDepth Level of subdirectories already traversed. + * @returns {Promise} + */ +async _addToFsEvents(path, transform, forceAdd, priorDepth) { + if (this.fsw.closed) { + return; + } + const opts = this.fsw.options; + const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN; + + const wh = this.fsw._getWatchHelpers(path); + + // evaluate what is at the path we're being asked to watch + try { + const stats = await statMethods$1[wh.statMethod](wh.watchPath); + if (this.fsw.closed) return; + if (this.fsw._isIgnored(wh.watchPath, stats)) { + throw null; + } + if (stats.isDirectory()) { + // emit addDir unless this is a glob parent + if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd); + + // don't recurse further if it would exceed depth setting + if (priorDepth && priorDepth > opts.depth) return; + + // scan the contents of the dir + this.fsw._readdirp(wh.watchPath, { + fileFilter: entry => wh.filterPath(entry), + directoryFilter: entry => wh.filterDir(entry), + ...Depth(opts.depth - (priorDepth || 0)) + }).on(STR_DATA$1, (entry) => { + // need to check filterPath on dirs b/c filterDir is less restrictive + if (this.fsw.closed) { + return; + } + if (entry.stats.isDirectory() && !wh.filterPath(entry)) return; + + const joinedPath = path$1.join(wh.watchPath, entry.path); + const {fullPath} = entry; + + if (wh.followSymlinks && entry.stats.isSymbolicLink()) { + // preserve the current depth here since it can't be derived from + // real paths past the symlink + const curDepth = opts.depth === undefined ? + undefined : calcDepth(joinedPath, path$1.resolve(wh.watchPath)) + 1; + + this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth); + } else { + this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd); + } + }).on(EV_ERROR$1, EMPTY_FN$1).on(STR_END$1, () => { + this.fsw._emitReady(); + }); + } else { + this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd); + this.fsw._emitReady(); + } + } catch (error) { + if (!error || this.fsw._handleError(error)) { + // TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__- + this.fsw._emitReady(); + this.fsw._emitReady(); + } + } + + if (opts.persistent && forceAdd !== true) { + if (typeof transform === FUNCTION_TYPE) { + // realpath has already been resolved + this.initWatch(undefined, path, wh, processPath); + } else { + let realPath; + try { + realPath = await realpath$2(wh.watchPath); + } catch (e) {} + this.initWatch(realPath, path, wh, processPath); + } + } +} + +} + +var fseventsHandler = FsEventsHandler; +var canUse_1 = canUse; +fseventsHandler.canUse = canUse_1; + +const { EventEmitter } = events; + + +const { promisify: promisify$3 } = util$1; + +const anymatch = anymatch_1.default; + + + + + + + +const { + EV_ALL, + EV_READY, + EV_ADD: EV_ADD$2, + EV_CHANGE: EV_CHANGE$2, + EV_UNLINK: EV_UNLINK$1, + EV_ADD_DIR: EV_ADD_DIR$2, + EV_UNLINK_DIR, + EV_RAW, + EV_ERROR: EV_ERROR$2, + + STR_CLOSE, + STR_END: STR_END$2, + + BACK_SLASH_RE, + DOUBLE_SLASH_RE, + SLASH_OR_BACK_SLASH_RE, + DOT_RE, + REPLACER_RE, + + SLASH: SLASH$1, + BRACE_START: BRACE_START$1, + BANG: BANG$1, + ONE_DOT, + TWO_DOTS, + GLOBSTAR: GLOBSTAR$1, + SLASH_GLOBSTAR, + ANYMATCH_OPTS, + STRING_TYPE, + FUNCTION_TYPE: FUNCTION_TYPE$1, + EMPTY_STR: EMPTY_STR$1, + EMPTY_FN: EMPTY_FN$2, + + isWindows: isWindows$2, + isMacos +} = constants$2; + +const stat$5 = promisify$3(fs$1.stat); +const readdir$2 = promisify$3(fs$1.readdir); + +/** + * @typedef {String} Path + * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName + * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType + */ + +/** + * + * @typedef {Object} WatchHelpers + * @property {Boolean} followSymlinks + * @property {'stat'|'lstat'} statMethod + * @property {Path} path + * @property {Path} watchPath + * @property {Function} entryPath + * @property {Boolean} hasGlob + * @property {Object} globFilter + * @property {Function} filterPath + * @property {Function} filterDir + */ + +const arrify = (value = []) => Array.isArray(value) ? value : [value]; +const flatten = (list, result = []) => { + list.forEach(item => { + if (Array.isArray(item)) { + flatten(item, result); + } else { + result.push(item); + } + }); + return result; +}; + +const unifyPaths = (paths_) => { + /** + * @type {Array} + */ + const paths = flatten(arrify(paths_)); + if (!paths.every(p => typeof p === STRING_TYPE)) { + throw new TypeError(`Non-string provided as watch path: ${paths}`); + } + return paths.map(normalizePathToUnix); +}; + +const toUnix = (string) => { + let str = string.replace(BACK_SLASH_RE, SLASH$1); + while (str.match(DOUBLE_SLASH_RE)) { + str = str.replace(DOUBLE_SLASH_RE, SLASH$1); + } + return str; +}; + +// Our version of upath.normalize +// TODO: this is not equal to path-normalize module - investigate why +const normalizePathToUnix = (path) => toUnix(path$1.normalize(toUnix(path))); + +const normalizeIgnored = (cwd = EMPTY_STR$1) => (path) => { + if (typeof path !== STRING_TYPE) return path; + return normalizePathToUnix(path$1.isAbsolute(path) ? path : path$1.join(cwd, path)); +}; + +const getAbsolutePath = (path, cwd) => { + if (path$1.isAbsolute(path)) { + return path; + } + if (path.startsWith(BANG$1)) { + return BANG$1 + path$1.join(cwd, path.slice(1)); + } + return path$1.join(cwd, path); +}; + +const undef = (opts, key) => opts[key] === undefined; + +/** + * Directory entry. + * @property {Path} path + * @property {Set} items + */ +class DirEntry { + /** + * @param {Path} dir + * @param {Function} removeWatcher + */ + constructor(dir, removeWatcher) { + this.path = dir; + this._removeWatcher = removeWatcher; + /** @type {Set} */ + this.items = new Set(); + } + + add(item) { + const {items} = this; + if (!items) return; + if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item); + } + + async remove(item) { + const {items} = this; + if (!items) return; + items.delete(item); + + if (!items.size) { + const dir = this.path; + try { + await readdir$2(dir); + } catch (err) { + this._removeWatcher(path$1.dirname(dir), path$1.basename(dir)); + } + } + } + + has(item) { + const {items} = this; + if (!items) return; + return items.has(item); + } + + /** + * @returns {Array} + */ + getChildren() { + const {items} = this; + if (!items) return; + return [...items.values()]; + } + + dispose() { + this.items.clear(); + delete this.path; + delete this._removeWatcher; + delete this.items; + Object.freeze(this); + } +} + +const STAT_METHOD_F = 'stat'; +const STAT_METHOD_L = 'lstat'; +class WatchHelper { + constructor(path, watchPath, follow, fsw) { + this.fsw = fsw; + this.path = path = path.replace(REPLACER_RE, EMPTY_STR$1); + this.watchPath = watchPath; + this.fullWatchPath = path$1.resolve(watchPath); + this.hasGlob = watchPath !== path; + /** @type {object|boolean} */ + if (path === EMPTY_STR$1) this.hasGlob = false; + this.globSymlink = this.hasGlob && follow ? undefined : false; + this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false; + this.dirParts = this.getDirParts(path); + this.dirParts.forEach((parts) => { + if (parts.length > 1) parts.pop(); + }); + this.followSymlinks = follow; + this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L; + } + + checkGlobSymlink(entry) { + // only need to resolve once + // first entry should always have entry.parentDir === EMPTY_STR + if (this.globSymlink === undefined) { + this.globSymlink = entry.fullParentDir === this.fullWatchPath ? + false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath}; + } + + if (this.globSymlink) { + return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath); + } + + return entry.fullPath; + } + + entryPath(entry) { + return path$1.join(this.watchPath, + path$1.relative(this.watchPath, this.checkGlobSymlink(entry)) + ); + } + + filterPath(entry) { + const {stats} = entry; + if (stats && stats.isSymbolicLink()) return this.filterDir(entry); + const resolvedPath = this.entryPath(entry); + const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE$1 ? + this.globFilter(resolvedPath) : true; + return matchesGlob && + this.fsw._isntIgnored(resolvedPath, stats) && + this.fsw._hasReadPermissions(stats); + } + + getDirParts(path) { + if (!this.hasGlob) return []; + const parts = []; + const expandedPath = path.includes(BRACE_START$1) ? braces_1.expand(path) : [path]; + expandedPath.forEach((path) => { + parts.push(path$1.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE)); + }); + return parts; + } + + filterDir(entry) { + if (this.hasGlob) { + const entryParts = this.getDirParts(this.checkGlobSymlink(entry)); + let globstar = false; + this.unmatchedGlob = !this.dirParts.some((parts) => { + return parts.every((part, i) => { + if (part === GLOBSTAR$1) globstar = true; + return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS); + }); + }); + } + return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats); + } +} + +/** + * Watches files & directories for changes. Emitted events: + * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` + * + * new FSWatcher() + * .add(directories) + * .on('add', path => log('File', path, 'was added')) + */ +class FSWatcher extends EventEmitter { +// Not indenting methods for history sake; for now. +constructor(_opts) { + super(); + + const opts = {}; + if (_opts) Object.assign(opts, _opts); // for frozen objects + + /** @type {Map} */ + this._watched = new Map(); + /** @type {Map} */ + this._closers = new Map(); + /** @type {Set} */ + this._ignoredPaths = new Set(); + + /** @type {Map} */ + this._throttled = new Map(); + + /** @type {Map} */ + this._symlinkPaths = new Map(); + + this._streams = new Set(); + this.closed = false; + + // Set up default options. + if (undef(opts, 'persistent')) opts.persistent = true; + if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false; + if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false; + if (undef(opts, 'interval')) opts.interval = 100; + if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300; + if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false; + opts.enableBinaryInterval = opts.binaryInterval !== opts.interval; + + // Enable fsevents on OS X when polling isn't explicitly enabled. + if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling; + + // If we can't use fsevents, ensure the options reflect it's disabled. + const canUseFsEvents = fseventsHandler.canUse(); + if (!canUseFsEvents) opts.useFsEvents = false; + + // Use polling on Mac if not using fsevents. + // Other platforms use non-polling fs_watch. + if (undef(opts, 'usePolling') && !opts.useFsEvents) { + opts.usePolling = isMacos; + } + + // Global override (useful for end-developers that need to force polling for all + // instances of chokidar, regardless of usage/dependency depth) + const envPoll = process.env.CHOKIDAR_USEPOLLING; + if (envPoll !== undefined) { + const envLower = envPoll.toLowerCase(); + + if (envLower === 'false' || envLower === '0') { + opts.usePolling = false; + } else if (envLower === 'true' || envLower === '1') { + opts.usePolling = true; + } else { + opts.usePolling = !!envLower; + } + } + const envInterval = process.env.CHOKIDAR_INTERVAL; + if (envInterval) { + opts.interval = Number.parseInt(envInterval, 10); + } + + // Editor atomic write normalization enabled by default with fs.watch + if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents; + if (opts.atomic) this._pendingUnlinks = new Map(); + + if (undef(opts, 'followSymlinks')) opts.followSymlinks = true; + + if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false; + if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {}; + const awf = opts.awaitWriteFinish; + if (awf) { + if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000; + if (!awf.pollInterval) awf.pollInterval = 100; + this._pendingWrites = new Map(); + } + if (opts.ignored) opts.ignored = arrify(opts.ignored); + + let readyCalls = 0; + this._emitReady = () => { + readyCalls++; + if (readyCalls >= this._readyCount) { + this._emitReady = EMPTY_FN$2; + this._readyEmitted = true; + // use process.nextTick to allow time for listener to be bound + process.nextTick(() => this.emit(EV_READY)); + } + }; + this._emitRaw = (...args) => this.emit(EV_RAW, ...args); + this._readyEmitted = false; + this.options = opts; + + // Initialize with proper watcher. + if (opts.useFsEvents) { + this._fsEventsHandler = new fseventsHandler(this); + } else { + this._nodeFsHandler = new nodefsHandler(this); + } + + // You’re frozen when your heart’s not open. + Object.freeze(opts); +} + +// Public methods + +/** + * Adds paths to be watched on an existing FSWatcher instance + * @param {Path|Array} paths_ + * @param {String=} _origAdd private; for handling non-existent paths to be watched + * @param {Boolean=} _internal private; indicates a non-user add + * @returns {FSWatcher} for chaining + */ +add(paths_, _origAdd, _internal) { + const {cwd, disableGlobbing} = this.options; + this.closed = false; + let paths = unifyPaths(paths_); + if (cwd) { + paths = paths.map((path) => { + const absPath = getAbsolutePath(path, cwd); + + // Check `path` instead of `absPath` because the cwd portion can't be a glob + if (disableGlobbing || !isGlob(path)) { + return absPath; + } + return normalizePath(absPath); + }); + } + + // set aside negated glob strings + paths = paths.filter((path) => { + if (path.startsWith(BANG$1)) { + this._ignoredPaths.add(path.slice(1)); + return false; + } + + // if a path is being added that was previously ignored, stop ignoring it + this._ignoredPaths.delete(path); + this._ignoredPaths.delete(path + SLASH_GLOBSTAR); + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = undefined; + + return true; + }); + + if (this.options.useFsEvents && this._fsEventsHandler) { + if (!this._readyCount) this._readyCount = paths.length; + if (this.options.persistent) this._readyCount *= 2; + paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path)); + } else { + if (!this._readyCount) this._readyCount = 0; + this._readyCount += paths.length; + Promise.all( + paths.map(async path => { + const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd); + if (res) this._emitReady(); + return res; + }) + ).then(results => { + if (this.closed) return; + results.filter(item => item).forEach(item => { + this.add(path$1.dirname(item), path$1.basename(_origAdd || item)); + }); + }); + } + + return this; +} + +/** + * Close watchers or start ignoring events from specified paths. + * @param {Path|Array} paths_ - string or array of strings, file/directory paths and/or globs + * @returns {FSWatcher} for chaining +*/ +unwatch(paths_) { + if (this.closed) return this; + const paths = unifyPaths(paths_); + const {cwd} = this.options; + + paths.forEach((path) => { + // convert to absolute path unless relative path already matches + if (!path$1.isAbsolute(path) && !this._closers.has(path)) { + if (cwd) path = path$1.join(cwd, path); + path = path$1.resolve(path); + } + + this._closePath(path); + + this._ignoredPaths.add(path); + if (this._watched.has(path)) { + this._ignoredPaths.add(path + SLASH_GLOBSTAR); + } + + // reset the cached userIgnored anymatch fn + // to make ignoredPaths changes effective + this._userIgnored = undefined; + }); + + return this; +} + +/** + * Close watchers and remove all listeners from watched paths. + * @returns {Promise}. +*/ +close() { + if (this.closed) return this; + this.closed = true; + + // Memory management. + this.removeAllListeners(); + const closers = []; + this._closers.forEach(closerList => closerList.forEach(closer => { + const promise = closer(); + if (promise instanceof Promise) closers.push(promise); + })); + this._streams.forEach(stream => stream.destroy()); + this._userIgnored = undefined; + this._readyCount = 0; + this._readyEmitted = false; + this._watched.forEach(dirent => dirent.dispose()); + ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => { + this[`_${key}`].clear(); + }); + return closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve(); +} + +/** + * Expose list of watched paths + * @returns {Object} for chaining +*/ +getWatched() { + const watchList = {}; + this._watched.forEach((entry, dir) => { + const key = this.options.cwd ? path$1.relative(this.options.cwd, dir) : dir; + watchList[key || ONE_DOT] = entry.getChildren().sort(); + }); + return watchList; +} + +emitWithAll(event, args) { + this.emit(...args); + if (event !== EV_ERROR$2) this.emit(EV_ALL, ...args); +} + +// Common helpers +// -------------- + +/** + * Normalize and emit events. + * Calling _emit DOES NOT MEAN emit() would be called! + * @param {EventName} event Type of event + * @param {Path} path File or directory path + * @param {*=} val1 arguments to be passed with event + * @param {*=} val2 + * @param {*=} val3 + * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag + */ +async _emit(event, path, val1, val2, val3) { + if (this.closed) return; + + const opts = this.options; + if (isWindows$2) path = path$1.normalize(path); + if (opts.cwd) path = path$1.relative(opts.cwd, path); + /** @type Array */ + const args = [event, path]; + if (val3 !== undefined) args.push(val1, val2, val3); + else if (val2 !== undefined) args.push(val1, val2); + else if (val1 !== undefined) args.push(val1); + + const awf = opts.awaitWriteFinish; + let pw; + if (awf && (pw = this._pendingWrites.get(path))) { + pw.lastChange = new Date(); + return this; + } + + if (opts.atomic) { + if (event === EV_UNLINK$1) { + this._pendingUnlinks.set(path, args); + setTimeout(() => { + this._pendingUnlinks.forEach((entry, path) => { + this.emit(...entry); + this.emit(EV_ALL, ...entry); + this._pendingUnlinks.delete(path); + }); + }, typeof opts.atomic === 'number' ? opts.atomic : 100); + return this; + } + if (event === EV_ADD$2 && this._pendingUnlinks.has(path)) { + event = args[0] = EV_CHANGE$2; + this._pendingUnlinks.delete(path); + } + } + + if (awf && (event === EV_ADD$2 || event === EV_CHANGE$2) && this._readyEmitted) { + const awfEmit = (err, stats) => { + if (err) { + event = args[0] = EV_ERROR$2; + args[1] = err; + this.emitWithAll(event, args); + } else if (stats) { + // if stats doesn't exist the file must have been deleted + if (args.length > 2) { + args[2] = stats; + } else { + args.push(stats); + } + this.emitWithAll(event, args); + } + }; + + this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit); + return this; + } + + if (event === EV_CHANGE$2) { + const isThrottled = !this._throttle(EV_CHANGE$2, path, 50); + if (isThrottled) return this; + } + + if (opts.alwaysStat && val1 === undefined && + (event === EV_ADD$2 || event === EV_ADD_DIR$2 || event === EV_CHANGE$2) + ) { + const fullPath = opts.cwd ? path$1.join(opts.cwd, path) : path; + try { + const stats = await stat$5(fullPath); + // Suppress event when fs_stat fails, to avoid sending undefined 'stat' + if (!stats) return; + args.push(stats); + this.emitWithAll(event, args); + } catch (err) {} + } else { + this.emitWithAll(event, args); + } + + return this; +} + +/** + * Common handler for errors + * @param {Error} error + * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag + */ +_handleError(error) { + const code = error && error.code; + if (error && code !== 'ENOENT' && code !== 'ENOTDIR' && + (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES')) + ) { + this.emit(EV_ERROR$2, error); + } + return error || this.closed; +} + +/** + * Helper utility for throttling + * @param {ThrottleType} actionType type being throttled + * @param {Path} path being acted upon + * @param {Number} timeout duration of time to suppress duplicate actions + * @returns {Object|false} tracking object or false if action should be suppressed + */ +_throttle(actionType, path, timeout) { + if (!this._throttled.has(actionType)) { + this._throttled.set(actionType, new Map()); + } + + /** @type {Map} */ + const action = this._throttled.get(actionType); + /** @type {Object} */ + const actionPath = action.get(path); + + if (actionPath) { + actionPath.count++; + return false; + } + + let timeoutObject; + const clear = () => { + const item = action.get(path); + const count = item ? item.count : 0; + action.delete(path); + clearTimeout(timeoutObject); + if (item) clearTimeout(item.timeoutObject); + return count; + }; + timeoutObject = setTimeout(clear, timeout); + const thr = {timeoutObject, clear, count: 0}; + action.set(path, thr); + return thr; +} + +_incrReadyCount() { + return this._readyCount++; +} + +/** + * Awaits write operation to finish. + * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback. + * @param {Path} path being acted upon + * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished + * @param {EventName} event + * @param {Function} awfEmit Callback to be called when ready for event to be emitted. + */ +_awaitWriteFinish(path, threshold, event, awfEmit) { + let timeoutHandler; + + let fullPath = path; + if (this.options.cwd && !path$1.isAbsolute(path)) { + fullPath = path$1.join(this.options.cwd, path); + } + + const now = new Date(); + + const awaitWriteFinish = (prevStat) => { + fs$1.stat(fullPath, (err, curStat) => { + if (err || !this._pendingWrites.has(path)) { + if (err && err.code !== 'ENOENT') awfEmit(err); + return; + } + + const now = Number(new Date()); + + if (prevStat && curStat.size !== prevStat.size) { + this._pendingWrites.get(path).lastChange = now; + } + const pw = this._pendingWrites.get(path); + const df = now - pw.lastChange; + + if (df >= threshold) { + this._pendingWrites.delete(path); + awfEmit(undefined, curStat); + } else { + timeoutHandler = setTimeout( + awaitWriteFinish, + this.options.awaitWriteFinish.pollInterval, + curStat + ); + } + }); + }; + + if (!this._pendingWrites.has(path)) { + this._pendingWrites.set(path, { + lastChange: now, + cancelWait: () => { + this._pendingWrites.delete(path); + clearTimeout(timeoutHandler); + return event; + } + }); + timeoutHandler = setTimeout( + awaitWriteFinish, + this.options.awaitWriteFinish.pollInterval + ); + } +} + +_getGlobIgnored() { + return [...this._ignoredPaths.values()]; +} + +/** + * Determines whether user has asked to ignore this path. + * @param {Path} path filepath or dir + * @param {fs.Stats=} stats result of fs.stat + * @returns {Boolean} + */ +_isIgnored(path, stats) { + if (this.options.atomic && DOT_RE.test(path)) return true; + if (!this._userIgnored) { + const {cwd} = this.options; + const ign = this.options.ignored; + + const ignored = ign && ign.map(normalizeIgnored(cwd)); + const paths = arrify(ignored) + .filter((path) => typeof path === STRING_TYPE && !isGlob(path)) + .map((path) => path + SLASH_GLOBSTAR); + const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths); + this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS); + } + + return this._userIgnored([path, stats]); +} + +_isntIgnored(path, stat) { + return !this._isIgnored(path, stat); +} + +/** + * Provides a set of common helpers and properties relating to symlink and glob handling. + * @param {Path} path file, directory, or glob pattern being watched + * @param {Number=} depth at any depth > 0, this isn't a glob + * @returns {WatchHelper} object containing helpers for this path + */ +_getWatchHelpers(path, depth) { + const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path); + const follow = this.options.followSymlinks; + + return new WatchHelper(path, watchPath, follow, this); +} + +// Directory helpers +// ----------------- + +/** + * Provides directory tracking objects + * @param {String} directory path of the directory + * @returns {DirEntry} the directory's tracking object + */ +_getWatchedDir(directory) { + if (!this._boundRemove) this._boundRemove = this._remove.bind(this); + const dir = path$1.resolve(directory); + if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove)); + return this._watched.get(dir); +} + +// File helpers +// ------------ + +/** + * Check for read permissions. + * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405 + * @param {fs.Stats} stats - object, result of fs_stat + * @returns {Boolean} indicates whether the file can be read +*/ +_hasReadPermissions(stats) { + if (this.options.ignorePermissionErrors) return true; + + // stats.mode may be bigint + const md = stats && Number.parseInt(stats.mode, 10); + const st = md & 0o777; + const it = Number.parseInt(st.toString(8)[0], 10); + return Boolean(4 & it); +} + +/** + * Handles emitting unlink events for + * files and directories, and via recursion, for + * files and directories within directories that are unlinked + * @param {String} directory within which the following item is located + * @param {String} item base path of item/directory + * @returns {void} +*/ +_remove(directory, item) { + // if what is being deleted is a directory, get that directory's paths + // for recursive deleting and cleaning of watched object + // if it is not a directory, nestedDirectoryChildren will be empty array + const path = path$1.join(directory, item); + const fullPath = path$1.resolve(path); + const isDirectory = this._watched.has(path) || this._watched.has(fullPath); + + // prevent duplicate handling in case of arriving here nearly simultaneously + // via multiple paths (such as _handleFile and _handleDir) + if (!this._throttle('remove', path, 100)) return; + + // if the only watched file is removed, watch for its return + if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) { + this.add(directory, item, true); + } + + // This will create a new entry in the watched object in either case + // so we got to do the directory check beforehand + const wp = this._getWatchedDir(path); + const nestedDirectoryChildren = wp.getChildren(); + + // Recursively remove children directories / files. + nestedDirectoryChildren.forEach(nested => this._remove(path, nested)); + + // Check if item was on the watched list and remove it + const parent = this._getWatchedDir(directory); + const wasTracked = parent.has(item); + parent.remove(item); + + // If we wait for this file to be fully written, cancel the wait. + let relPath = path; + if (this.options.cwd) relPath = path$1.relative(this.options.cwd, path); + if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) { + const event = this._pendingWrites.get(relPath).cancelWait(); + if (event === EV_ADD$2) return; + } + + // The Entry will either be a directory that just got removed + // or a bogus entry to a file, in either case we have to remove it + this._watched.delete(path); + this._watched.delete(fullPath); + const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK$1; + if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path); + + // Avoid conflicts if we later create another file with the same name + if (!this.options.useFsEvents) { + this._closePath(path); + } +} + +/** + * + * @param {Path} path + */ +_closePath(path) { + const closers = this._closers.get(path); + if (!closers) return; + closers.forEach(closer => closer()); + this._closers.delete(path); + const dir = path$1.dirname(path); + this._getWatchedDir(dir).remove(path$1.basename(path)); +} + +/** + * + * @param {Path} path + * @param {Function} closer + */ +_addPathCloser(path, closer) { + if (!closer) return; + let list = this._closers.get(path); + if (!list) { + list = []; + this._closers.set(path, list); + } + list.push(closer); +} + +_readdirp(root, opts) { + if (this.closed) return; + const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts}; + let stream = readdirp_1(root, options); + this._streams.add(stream); + stream.once(STR_CLOSE, () => { + stream = undefined; + }); + stream.once(STR_END$2, () => { + if (stream) { + this._streams.delete(stream); + stream = undefined; + } + }); + return stream; +} + +} + +// Export FSWatcher class +var FSWatcher_1 = FSWatcher; + +/** + * Instantiates watcher with paths to be tracked. + * @param {String|Array} paths file/directory paths and/or globs + * @param {Object=} options chokidar opts + * @returns an instance of FSWatcher for chaining. + */ +const watch = (paths, options) => { + const watcher = new FSWatcher(options); + watcher.add(paths); + return watcher; +}; + +var watch_1 = watch; + +var chokidar = { + FSWatcher: FSWatcher_1, + watch: watch_1 +}; + +var textTable = function (rows_, opts) { + if (!opts) opts = {}; + var hsep = opts.hsep === undefined ? ' ' : opts.hsep; + var align = opts.align || []; + var stringLength = opts.stringLength + || function (s) { return String(s).length; } + ; + + var dotsizes = reduce(rows_, function (acc, row) { + forEach(row, function (c, ix) { + var n = dotindex(c); + if (!acc[ix] || n > acc[ix]) acc[ix] = n; + }); + return acc; + }, []); + + var rows = map$1(rows_, function (row) { + return map$1(row, function (c_, ix) { + var c = String(c_); + if (align[ix] === '.') { + var index = dotindex(c); + var size = dotsizes[ix] + (/\./.test(c) ? 1 : 2) + - (stringLength(c) - index) + ; + return c + Array(size).join(' '); + } + else return c; + }); + }); + + var sizes = reduce(rows, function (acc, row) { + forEach(row, function (c, ix) { + var n = stringLength(c); + if (!acc[ix] || n > acc[ix]) acc[ix] = n; + }); + return acc; + }, []); + + return map$1(rows, function (row) { + return map$1(row, function (c, ix) { + var n = (sizes[ix] - stringLength(c)) || 0; + var s = Array(Math.max(n + 1, 1)).join(' '); + if (align[ix] === 'r' || align[ix] === '.') { + return s + c; + } + if (align[ix] === 'c') { + return Array(Math.ceil(n / 2 + 1)).join(' ') + + c + Array(Math.floor(n / 2 + 1)).join(' ') + ; + } + + return c + s; + }).join(hsep).replace(/\s+$/, ''); + }).join('\n'); +}; + +function dotindex (c) { + var m = /\.[^.]*$/.exec(c); + return m ? m.index + 1 : c.length; +} + +function reduce (xs, f, init) { + if (xs.reduce) return xs.reduce(f, init); + var i = 0; + var acc = arguments.length >= 3 ? init : xs[i++]; + for (; i < xs.length; i++) { + f(acc, xs[i], i); + } + return acc; +} + +function forEach (xs, f) { + if (xs.forEach) return xs.forEach(f); + for (var i = 0; i < xs.length; i++) { + f.call(xs, xs[i], i); + } +} + +function map$1 (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f.call(xs, xs[i], i)); + } + return res; +} + +const preserveCamelCase = string => { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + + for (let i = 0; i < string.length; i++) { + const character = string[i]; + + if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { + string = string.slice(0, i) + '-' + string.slice(i); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + i++; + } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { + string = string.slice(0, i - 1) + '-' + string.slice(i - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; + } + } + + return string; +}; + +const camelCase = (input, options) => { + if (!(typeof input === 'string' || Array.isArray(input))) { + throw new TypeError('Expected the input to be `string | string[]`'); + } + + options = Object.assign({ + pascalCase: false + }, options); + + const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; + + if (Array.isArray(input)) { + input = input.map(x => x.trim()) + .filter(x => x.length) + .join('-'); + } else { + input = input.trim(); + } + + if (input.length === 0) { + return ''; + } + + if (input.length === 1) { + return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); + } + + const hasUpperCase = input !== input.toLowerCase(); + + if (hasUpperCase) { + input = preserveCamelCase(input); + } + + input = input + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()) + .replace(/\d+(\w|$)/g, m => m.toUpperCase()); + + return postProcess(input); +}; + +var camelcase = camelCase; +// TODO: Remove this for the next major release +var default_1$2 = camelCase; +camelcase.default = default_1$2; + +// This is a generated file. Do not edit. +var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; +var ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; +var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; + +var unicode = { + Space_Separator: Space_Separator, + ID_Start: ID_Start, + ID_Continue: ID_Continue +}; + +var util = { + isSpaceSeparator (c) { + return unicode.Space_Separator.test(c) + }, + + isIdStartChar (c) { + return ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c === '$') || (c === '_') || + unicode.ID_Start.test(c) + ) + }, + + isIdContinueChar (c) { + return ( + (c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + (c === '$') || (c === '_') || + (c === '\u200C') || (c === '\u200D') || + unicode.ID_Continue.test(c) + ) + }, + + isDigit (c) { + return /[0-9]/.test(c) + }, + + isHexDigit (c) { + return /[0-9A-Fa-f]/.test(c) + }, +}; + +let source; +let parseState; +let stack; +let pos; +let line; +let column; +let token; +let key; +let root; + +var parse$7 = function parse (text, reviver) { + source = String(text); + parseState = 'start'; + stack = []; + pos = 0; + line = 1; + column = 0; + token = undefined; + key = undefined; + root = undefined; + + do { + token = lex(); + + // This code is unreachable. + // if (!parseStates[parseState]) { + // throw invalidParseState() + // } + + parseStates[parseState](); + } while (token.type !== 'eof') + + if (typeof reviver === 'function') { + return internalize({'': root}, '', reviver) + } + + return root +}; + +function internalize (holder, name, reviver) { + const value = holder[name]; + if (value != null && typeof value === 'object') { + for (const key in value) { + const replacement = internalize(value, key, reviver); + if (replacement === undefined) { + delete value[key]; + } else { + value[key] = replacement; + } + } + } + + return reviver.call(holder, name, value) +} + +let lexState; +let buffer; +let doubleQuote; +let sign; +let c; + +function lex () { + lexState = 'default'; + buffer = ''; + doubleQuote = false; + sign = 1; + + for (;;) { + c = peek(); + + // This code is unreachable. + // if (!lexStates[lexState]) { + // throw invalidLexState(lexState) + // } + + const token = lexStates[lexState](); + if (token) { + return token + } + } +} + +function peek () { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)) + } +} + +function read$4 () { + const c = peek(); + + if (c === '\n') { + line++; + column = 0; + } else if (c) { + column += c.length; + } else { + column++; + } + + if (c) { + pos += c.length; + } + + return c +} + +const lexStates = { + default () { + switch (c) { + case '\t': + case '\v': + case '\f': + case ' ': + case '\u00A0': + case '\uFEFF': + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read$4(); + return + + case '/': + read$4(); + lexState = 'comment'; + return + + case undefined: + read$4(); + return newToken('eof') + } + + if (util.isSpaceSeparator(c)) { + read$4(); + return + } + + // This code is unreachable. + // if (!lexStates[parseState]) { + // throw invalidLexState(parseState) + // } + + return lexStates[parseState]() + }, + + comment () { + switch (c) { + case '*': + read$4(); + lexState = 'multiLineComment'; + return + + case '/': + read$4(); + lexState = 'singleLineComment'; + return + } + + throw invalidChar(read$4()) + }, + + multiLineComment () { + switch (c) { + case '*': + read$4(); + lexState = 'multiLineCommentAsterisk'; + return + + case undefined: + throw invalidChar(read$4()) + } + + read$4(); + }, + + multiLineCommentAsterisk () { + switch (c) { + case '*': + read$4(); + return + + case '/': + read$4(); + lexState = 'default'; + return + + case undefined: + throw invalidChar(read$4()) + } + + read$4(); + lexState = 'multiLineComment'; + }, + + singleLineComment () { + switch (c) { + case '\n': + case '\r': + case '\u2028': + case '\u2029': + read$4(); + lexState = 'default'; + return + + case undefined: + read$4(); + return newToken('eof') + } + + read$4(); + }, + + value () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read$4()) + + case 'n': + read$4(); + literal('ull'); + return newToken('null', null) + + case 't': + read$4(); + literal('rue'); + return newToken('boolean', true) + + case 'f': + read$4(); + literal('alse'); + return newToken('boolean', false) + + case '-': + case '+': + if (read$4() === '-') { + sign = -1; + } + + lexState = 'sign'; + return + + case '.': + buffer = read$4(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read$4(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read$4(); + lexState = 'decimalInteger'; + return + + case 'I': + read$4(); + literal('nfinity'); + return newToken('numeric', Infinity) + + case 'N': + read$4(); + literal('aN'); + return newToken('numeric', NaN) + + case '"': + case "'": + doubleQuote = (read$4() === '"'); + buffer = ''; + lexState = 'string'; + return + } + + throw invalidChar(read$4()) + }, + + identifierNameStartEscape () { + if (c !== 'u') { + throw invalidChar(read$4()) + } + + read$4(); + const u = unicodeEscape(); + switch (u) { + case '$': + case '_': + break + + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + identifierName () { + switch (c) { + case '$': + case '_': + case '\u200C': + case '\u200D': + buffer += read$4(); + return + + case '\\': + read$4(); + lexState = 'identifierNameEscape'; + return + } + + if (util.isIdContinueChar(c)) { + buffer += read$4(); + return + } + + return newToken('identifier', buffer) + }, + + identifierNameEscape () { + if (c !== 'u') { + throw invalidChar(read$4()) + } + + read$4(); + const u = unicodeEscape(); + switch (u) { + case '$': + case '_': + case '\u200C': + case '\u200D': + break + + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier() + } + + break + } + + buffer += u; + lexState = 'identifierName'; + }, + + sign () { + switch (c) { + case '.': + buffer = read$4(); + lexState = 'decimalPointLeading'; + return + + case '0': + buffer = read$4(); + lexState = 'zero'; + return + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + buffer = read$4(); + lexState = 'decimalInteger'; + return + + case 'I': + read$4(); + literal('nfinity'); + return newToken('numeric', sign * Infinity) + + case 'N': + read$4(); + literal('aN'); + return newToken('numeric', NaN) + } + + throw invalidChar(read$4()) + }, + + zero () { + switch (c) { + case '.': + buffer += read$4(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read$4(); + lexState = 'decimalExponent'; + return + + case 'x': + case 'X': + buffer += read$4(); + lexState = 'hexadecimal'; + return + } + + return newToken('numeric', sign * 0) + }, + + decimalInteger () { + switch (c) { + case '.': + buffer += read$4(); + lexState = 'decimalPoint'; + return + + case 'e': + case 'E': + buffer += read$4(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read$4(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalPointLeading () { + if (util.isDigit(c)) { + buffer += read$4(); + lexState = 'decimalFraction'; + return + } + + throw invalidChar(read$4()) + }, + + decimalPoint () { + switch (c) { + case 'e': + case 'E': + buffer += read$4(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read$4(); + lexState = 'decimalFraction'; + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalFraction () { + switch (c) { + case 'e': + case 'E': + buffer += read$4(); + lexState = 'decimalExponent'; + return + } + + if (util.isDigit(c)) { + buffer += read$4(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + decimalExponent () { + switch (c) { + case '+': + case '-': + buffer += read$4(); + lexState = 'decimalExponentSign'; + return + } + + if (util.isDigit(c)) { + buffer += read$4(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read$4()) + }, + + decimalExponentSign () { + if (util.isDigit(c)) { + buffer += read$4(); + lexState = 'decimalExponentInteger'; + return + } + + throw invalidChar(read$4()) + }, + + decimalExponentInteger () { + if (util.isDigit(c)) { + buffer += read$4(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + hexadecimal () { + if (util.isHexDigit(c)) { + buffer += read$4(); + lexState = 'hexadecimalInteger'; + return + } + + throw invalidChar(read$4()) + }, + + hexadecimalInteger () { + if (util.isHexDigit(c)) { + buffer += read$4(); + return + } + + return newToken('numeric', sign * Number(buffer)) + }, + + string () { + switch (c) { + case '\\': + read$4(); + buffer += escape(); + return + + case '"': + if (doubleQuote) { + read$4(); + return newToken('string', buffer) + } + + buffer += read$4(); + return + + case "'": + if (!doubleQuote) { + read$4(); + return newToken('string', buffer) + } + + buffer += read$4(); + return + + case '\n': + case '\r': + throw invalidChar(read$4()) + + case '\u2028': + case '\u2029': + separatorChar(c); + break + + case undefined: + throw invalidChar(read$4()) + } + + buffer += read$4(); + }, + + start () { + switch (c) { + case '{': + case '[': + return newToken('punctuator', read$4()) + + // This code is unreachable since the default lexState handles eof. + // case undefined: + // return newToken('eof') + } + + lexState = 'value'; + }, + + beforePropertyName () { + switch (c) { + case '$': + case '_': + buffer = read$4(); + lexState = 'identifierName'; + return + + case '\\': + read$4(); + lexState = 'identifierNameStartEscape'; + return + + case '}': + return newToken('punctuator', read$4()) + + case '"': + case "'": + doubleQuote = (read$4() === '"'); + lexState = 'string'; + return + } + + if (util.isIdStartChar(c)) { + buffer += read$4(); + lexState = 'identifierName'; + return + } + + throw invalidChar(read$4()) + }, + + afterPropertyName () { + if (c === ':') { + return newToken('punctuator', read$4()) + } + + throw invalidChar(read$4()) + }, + + beforePropertyValue () { + lexState = 'value'; + }, + + afterPropertyValue () { + switch (c) { + case ',': + case '}': + return newToken('punctuator', read$4()) + } + + throw invalidChar(read$4()) + }, + + beforeArrayValue () { + if (c === ']') { + return newToken('punctuator', read$4()) + } + + lexState = 'value'; + }, + + afterArrayValue () { + switch (c) { + case ',': + case ']': + return newToken('punctuator', read$4()) + } + + throw invalidChar(read$4()) + }, + + end () { + // This code is unreachable since it's handled by the default lexState. + // if (c === undefined) { + // read() + // return newToken('eof') + // } + + throw invalidChar(read$4()) + }, +}; + +function newToken (type, value) { + return { + type, + value, + line, + column, + } +} + +function literal (s) { + for (const c of s) { + const p = peek(); + + if (p !== c) { + throw invalidChar(read$4()) + } + + read$4(); + } +} + +function escape () { + const c = peek(); + switch (c) { + case 'b': + read$4(); + return '\b' + + case 'f': + read$4(); + return '\f' + + case 'n': + read$4(); + return '\n' + + case 'r': + read$4(); + return '\r' + + case 't': + read$4(); + return '\t' + + case 'v': + read$4(); + return '\v' + + case '0': + read$4(); + if (util.isDigit(peek())) { + throw invalidChar(read$4()) + } + + return '\0' + + case 'x': + read$4(); + return hexEscape() + + case 'u': + read$4(); + return unicodeEscape() + + case '\n': + case '\u2028': + case '\u2029': + read$4(); + return '' + + case '\r': + read$4(); + if (peek() === '\n') { + read$4(); + } + + return '' + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + throw invalidChar(read$4()) + + case undefined: + throw invalidChar(read$4()) + } + + return read$4() +} + +function hexEscape () { + let buffer = ''; + let c = peek(); + + if (!util.isHexDigit(c)) { + throw invalidChar(read$4()) + } + + buffer += read$4(); + + c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read$4()) + } + + buffer += read$4(); + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +function unicodeEscape () { + let buffer = ''; + let count = 4; + + while (count-- > 0) { + const c = peek(); + if (!util.isHexDigit(c)) { + throw invalidChar(read$4()) + } + + buffer += read$4(); + } + + return String.fromCodePoint(parseInt(buffer, 16)) +} + +const parseStates = { + start () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforePropertyName () { + switch (token.type) { + case 'identifier': + case 'string': + key = token.value; + parseState = 'afterPropertyName'; + return + + case 'punctuator': + // This code is unreachable since it's handled by the lexState. + // if (token.value !== '}') { + // throw invalidToken() + // } + + pop(); + return + + case 'eof': + throw invalidEOF() + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterPropertyName () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator' || token.value !== ':') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + parseState = 'beforePropertyValue'; + }, + + beforePropertyValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + push(); + }, + + beforeArrayValue () { + if (token.type === 'eof') { + throw invalidEOF() + } + + if (token.type === 'punctuator' && token.value === ']') { + pop(); + return + } + + push(); + }, + + afterPropertyValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforePropertyName'; + return + + case '}': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + afterArrayValue () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'punctuator') { + // throw invalidToken() + // } + + if (token.type === 'eof') { + throw invalidEOF() + } + + switch (token.value) { + case ',': + parseState = 'beforeArrayValue'; + return + + case ']': + pop(); + } + + // This code is unreachable since it's handled by the lexState. + // throw invalidToken() + }, + + end () { + // This code is unreachable since it's handled by the lexState. + // if (token.type !== 'eof') { + // throw invalidToken() + // } + }, +}; + +function push () { + let value; + + switch (token.type) { + case 'punctuator': + switch (token.value) { + case '{': + value = {}; + break + + case '[': + value = []; + break + } + + break + + case 'null': + case 'boolean': + case 'numeric': + case 'string': + value = token.value; + break + + // This code is unreachable. + // default: + // throw invalidToken() + } + + if (root === undefined) { + root = value; + } else { + const parent = stack[stack.length - 1]; + if (Array.isArray(parent)) { + parent.push(value); + } else { + parent[key] = value; + } + } + + if (value !== null && typeof value === 'object') { + stack.push(value); + + if (Array.isArray(value)) { + parseState = 'beforeArrayValue'; + } else { + parseState = 'beforePropertyName'; + } + } else { + const current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } + } +} + +function pop () { + stack.pop(); + + const current = stack[stack.length - 1]; + if (current == null) { + parseState = 'end'; + } else if (Array.isArray(current)) { + parseState = 'afterArrayValue'; + } else { + parseState = 'afterPropertyValue'; + } +} + +// This code is unreachable. +// function invalidParseState () { +// return new Error(`JSON5: invalid parse state '${parseState}'`) +// } + +// This code is unreachable. +// function invalidLexState (state) { +// return new Error(`JSON5: invalid lex state '${state}'`) +// } + +function invalidChar (c) { + if (c === undefined) { + return syntaxError$1(`JSON5: invalid end of input at ${line}:${column}`) + } + + return syntaxError$1(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +} + +function invalidEOF () { + return syntaxError$1(`JSON5: invalid end of input at ${line}:${column}`) +} + +// This code is unreachable. +// function invalidToken () { +// if (token.type === 'eof') { +// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) +// } + +// const c = String.fromCodePoint(token.value.codePointAt(0)) +// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) +// } + +function invalidIdentifier () { + column -= 5; + return syntaxError$1(`JSON5: invalid identifier character at ${line}:${column}`) +} + +function separatorChar (c) { + console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`); +} + +function formatChar (c) { + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + if (replacements[c]) { + return replacements[c] + } + + if (c < ' ') { + const hexString = c.charCodeAt(0).toString(16); + return '\\x' + ('00' + hexString).substring(hexString.length) + } + + return c +} + +function syntaxError$1 (message) { + const err = new SyntaxError(message); + err.lineNumber = line; + err.columnNumber = column; + return err +} + +var stringify$5 = function stringify (value, replacer, space) { + const stack = []; + let indent = ''; + let propertyList; + let replacerFunc; + let gap = ''; + let quote; + + if ( + replacer != null && + typeof replacer === 'object' && + !Array.isArray(replacer) + ) { + space = replacer.space; + quote = replacer.quote; + replacer = replacer.replacer; + } + + if (typeof replacer === 'function') { + replacerFunc = replacer; + } else if (Array.isArray(replacer)) { + propertyList = []; + for (const v of replacer) { + let item; + + if (typeof v === 'string') { + item = v; + } else if ( + typeof v === 'number' || + v instanceof String || + v instanceof Number + ) { + item = String(v); + } + + if (item !== undefined && propertyList.indexOf(item) < 0) { + propertyList.push(item); + } + } + } + + if (space instanceof Number) { + space = Number(space); + } else if (space instanceof String) { + space = String(space); + } + + if (typeof space === 'number') { + if (space > 0) { + space = Math.min(10, Math.floor(space)); + gap = ' '.substr(0, space); + } + } else if (typeof space === 'string') { + gap = space.substr(0, 10); + } + + return serializeProperty('', {'': value}) + + function serializeProperty (key, holder) { + let value = holder[key]; + if (value != null) { + if (typeof value.toJSON5 === 'function') { + value = value.toJSON5(key); + } else if (typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + } + + if (replacerFunc) { + value = replacerFunc.call(holder, key, value); + } + + if (value instanceof Number) { + value = Number(value); + } else if (value instanceof String) { + value = String(value); + } else if (value instanceof Boolean) { + value = value.valueOf(); + } + + switch (value) { + case null: return 'null' + case true: return 'true' + case false: return 'false' + } + + if (typeof value === 'string') { + return quoteString(value) + } + + if (typeof value === 'number') { + return String(value) + } + + if (typeof value === 'object') { + return Array.isArray(value) ? serializeArray(value) : serializeObject(value) + } + + return undefined + } + + function quoteString (value) { + const quotes = { + "'": 0.1, + '"': 0.2, + }; + + const replacements = { + "'": "\\'", + '"': '\\"', + '\\': '\\\\', + '\b': '\\b', + '\f': '\\f', + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\v': '\\v', + '\0': '\\0', + '\u2028': '\\u2028', + '\u2029': '\\u2029', + }; + + let product = ''; + + for (let i = 0; i < value.length; i++) { + const c = value[i]; + switch (c) { + case "'": + case '"': + quotes[c]++; + product += c; + continue + + case '\0': + if (util.isDigit(value[i + 1])) { + product += '\\x00'; + continue + } + } + + if (replacements[c]) { + product += replacements[c]; + continue + } + + if (c < ' ') { + let hexString = c.charCodeAt(0).toString(16); + product += '\\x' + ('00' + hexString).substring(hexString.length); + continue + } + + product += c; + } + + const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b); + + product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]); + + return quoteChar + product + quoteChar + } + + function serializeObject (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + let stepback = indent; + indent = indent + gap; + + let keys = propertyList || Object.keys(value); + let partial = []; + for (const key of keys) { + const propertyString = serializeProperty(key, value); + if (propertyString !== undefined) { + let member = serializeKey(key) + ':'; + if (gap !== '') { + member += ' '; + } + member += propertyString; + partial.push(member); + } + } + + let final; + if (partial.length === 0) { + final = '{}'; + } else { + let properties; + if (gap === '') { + properties = partial.join(','); + final = '{' + properties + '}'; + } else { + let separator = ',\n' + indent; + properties = partial.join(separator); + final = '{\n' + indent + properties + ',\n' + stepback + '}'; + } + } + + stack.pop(); + indent = stepback; + return final + } + + function serializeKey (key) { + if (key.length === 0) { + return quoteString(key) + } + + const firstChar = String.fromCodePoint(key.codePointAt(0)); + if (!util.isIdStartChar(firstChar)) { + return quoteString(key) + } + + for (let i = firstChar.length; i < key.length; i++) { + if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { + return quoteString(key) + } + } + + return key + } + + function serializeArray (value) { + if (stack.indexOf(value) >= 0) { + throw TypeError('Converting circular structure to JSON5') + } + + stack.push(value); + + let stepback = indent; + indent = indent + gap; + + let partial = []; + for (let i = 0; i < value.length; i++) { + const propertyString = serializeProperty(String(i), value); + partial.push((propertyString !== undefined) ? propertyString : 'null'); + } + + let final; + if (partial.length === 0) { + final = '[]'; + } else { + if (gap === '') { + let properties = partial.join(','); + final = '[' + properties + ']'; + } else { + let separator = ',\n' + indent; + let properties = partial.join(separator); + final = '[\n' + indent + properties + ',\n' + stepback + ']'; + } + } + + stack.pop(); + indent = stepback; + return final + } +}; + +const JSON5 = { + parse: parse$7, + stringify: stringify$5, +}; + +var lib$2 = JSON5; + +var dist = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': lib$2 +}); + +var schema$1 = [ + { + long: "help", + description: "output usage information", + short: "h", + type: "boolean", + "default": false + }, + { + long: "version", + description: "output version number", + short: "v", + type: "boolean", + "default": false + }, + { + long: "output", + description: "specify output location", + short: "o", + value: "[path]" + }, + { + long: "rc-path", + description: "specify configuration file", + short: "r", + type: "string", + value: "" + }, + { + long: "ignore-path", + description: "specify ignore file", + short: "i", + type: "string", + value: "" + }, + { + long: "setting", + description: "specify settings", + short: "s", + type: "string", + value: "" + }, + { + long: "ext", + description: "specify extensions", + short: "e", + type: "string", + value: "" + }, + { + long: "use", + description: "use plugins", + short: "u", + type: "string", + value: "" + }, + { + long: "watch", + description: "watch for changes and reprocess", + short: "w", + type: "boolean", + "default": false + }, + { + long: "quiet", + description: "output only warnings and errors", + short: "q", + type: "boolean", + "default": false + }, + { + long: "silent", + description: "output only errors", + short: "S", + type: "boolean", + "default": false + }, + { + long: "frail", + description: "exit with 1 on warnings", + short: "f", + type: "boolean", + "default": false + }, + { + long: "tree", + description: "specify input and output as syntax tree", + short: "t", + type: "boolean", + "default": false + }, + { + long: "report", + description: "specify reporter", + type: "string", + value: "" + }, + { + long: "file-path", + description: "specify path to process as", + type: "string", + value: "" + }, + { + long: "ignore-pattern", + description: "specify ignore patterns", + type: "string", + value: "" + }, + { + long: "tree-in", + description: "specify input as syntax tree", + type: "boolean" + }, + { + long: "tree-out", + description: "output syntax tree", + type: "boolean" + }, + { + long: "inspect", + description: "output formatted syntax tree", + type: "boolean" + }, + { + long: "stdout", + description: "specify writing to stdout", + type: "boolean", + truelike: true + }, + { + long: "color", + description: "specify color in report", + type: "boolean", + "default": true + }, + { + long: "config", + description: "search for configuration files", + type: "boolean", + "default": true + }, + { + long: "ignore", + description: "search for ignore files", + type: "boolean", + "default": true + } +]; + +var schema$2 = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': schema$1 +}); + +var json5 = getCjsExportFromNamespace(dist); + +var schema$3 = getCjsExportFromNamespace(schema$2); + +var options_1 = options; + +// Schema for `minimist`. +var minischema = { + unknown: handleUnknownArgument, + default: {}, + alias: {}, + string: [], + boolean: [] +}; + +schema$3.forEach(addEach); + +// Parse CLI options. +function options(flags, configuration) { + var extension = configuration.extensions[0]; + var name = configuration.name; + var config = toCamelCase(minimist(flags, minischema)); + var help; + var ext; + var report; + + schema$3.forEach(function(option) { + if (option.type === 'string' && config[option.long] === '') { + throw fault_1('Missing value:%s', inspect$1(option).join(' ')) + } + }); + + ext = commaSeparated(config.ext); + report = reporter$1(config.report); + + help = [ + inspectAll(schema$3), + '', + 'Examples:', + '', + ' # Process `input.' + extension + '`', + ' $ ' + name + ' input.' + extension + ' -o output.' + extension, + '', + ' # Pipe', + ' $ ' + name + ' < input.' + extension + ' > output.' + extension, + '', + ' # Rewrite all applicable files', + ' $ ' + name + ' . -o' + ].join('\n'); + + return { + helpMessage: help, + // “hidden” feature, makes testing easier. + cwd: configuration.cwd, + processor: configuration.processor, + help: config.help, + version: config.version, + files: config._, + filePath: config.filePath, + watch: config.watch, + extensions: ext.length === 0 ? configuration.extensions : ext, + output: config.output, + out: config.stdout, + tree: config.tree, + treeIn: config.treeIn, + treeOut: config.treeOut, + inspect: config.inspect, + rcName: configuration.rcName, + packageField: configuration.packageField, + rcPath: config.rcPath, + detectConfig: config.config, + settings: settings(config.setting), + ignoreName: configuration.ignoreName, + ignorePath: config.ignorePath, + ignorePatterns: commaSeparated(config.ignorePattern), + detectIgnore: config.ignore, + pluginPrefix: configuration.pluginPrefix, + plugins: plugins(config.use), + reporter: report[0], + reporterOptions: report[1], + color: config.color, + silent: config.silent, + quiet: config.quiet, + frail: config.frail + } +} + +function addEach(option) { + var value = option.default; + + minischema.default[option.long] = value === undefined ? null : value; + + if (option.type in minischema) { + minischema[option.type].push(option.long); + } + + if (option.short) { + minischema.alias[option.short] = option.long; + } +} + +// Parse `extensions`. +function commaSeparated(value) { + return flatten$1(normalize$1(value).map(splitList)) +} + +// Parse `plugins`. +function plugins(value) { + var result = {}; + + normalize$1(value) + .map(splitOptions) + .forEach(function(value) { + result[value[0]] = value[1] ? parseConfig(value[1], {}) : null; + }); + + return result +} + +// Parse `reporter`: only one is accepted. +function reporter$1(value) { + var all = normalize$1(value) + .map(splitOptions) + .map(function(value) { + return [value[0], value[1] ? parseConfig(value[1], {}) : null] + }); + + return all[all.length - 1] || [] +} + +// Parse `settings`. +function settings(value) { + var cache = {}; + + normalize$1(value).forEach(function(value) { + parseConfig(value, cache); + }); + + return cache +} + +// Parse configuration. +function parseConfig(flags, cache) { + var flag; + var message; + + try { + flags = toCamelCase(parseJSON(flags)); + } catch (error) { + // Fix position + message = error.message.replace(/at(?= position)/, 'around'); + + throw fault_1('Cannot parse `%s` as JSON: %s', flags, message) + } + + for (flag in flags) { + cache[flag] = flags[flag]; + } + + return cache +} + +// Handle an unknown flag. +function handleUnknownArgument(flag) { + // Glob. + if (flag.charAt(0) !== '-') { + return + } + + // Long options, always unknown. + if (flag.charAt(1) === '-') { + throw fault_1('Unknown option `%s`, expected:\n%s', flag, inspectAll(schema$3)) + } + + // Short options, can be grouped. + flag + .slice(1) + .split('') + .forEach(each); + + function each(key) { + var length = schema$3.length; + var index = -1; + var option; + + while (++index < length) { + option = schema$3[index]; + + if (option.short === key) { + return + } + } + + throw fault_1( + 'Unknown short option `-%s`, expected:\n%s', + key, + inspectAll(schema$3.filter(short)) + ) + } + + function short(option) { + return option.short + } +} + +// Inspect all `options`. +function inspectAll(options) { + return textTable(options.map(inspect$1)) +} + +// Inspect one `option`. +function inspect$1(option) { + var description = option.description; + var long = option.long; + + if (option.default === true || option.truelike) { + description += ' (on by default)'; + long = '[no-]' + long; + } + + return [ + '', + option.short ? '-' + option.short : '', + '--' + long + (option.value ? ' ' + option.value : ''), + description + ] +} + +// Normalize `value`. +function normalize$1(value) { + if (!value) { + return [] + } + + if (typeof value === 'string') { + return [value] + } + + return flatten$1(value.map(normalize$1)) +} + +// Flatten `values`. +function flatten$1(values) { + return [].concat.apply([], values) +} + +function splitOptions(value) { + return value.split('=') +} + +function splitList(value) { + return value.split(',') +} + +// Transform the keys on an object to camel-case, recursivly. +function toCamelCase(object) { + var result = {}; + var value; + var key; + + for (key in object) { + value = object[key]; + + if (value && typeof value === 'object' && !('length' in value)) { + value = toCamelCase(value); + } + + result[camelcase(key)] = value; + } + + return result +} + +// Parse a (lazy?) JSON config. +function parseJSON(value) { + return json5.parse('{' + value + '}') +} + +var lib$3 = start; + +var noop$1 = Function.prototype; + +// Fake TTY stream. +var ttyStream = new stream.Readable(); +ttyStream.isTTY = true; + +// Exit, lazily, with the correct exit status code. +var exitStatus = 0; + +process.on('exit', onexit); + +// Handle uncaught errors, such as from unexpected async behaviour. +process.on('uncaughtException', fail$1); + +// Start the CLI. +function start(cliConfig) { + var config; + var output; + var watcher; + + try { + config = options_1(process.argv.slice(2), cliConfig); + } catch (error) { + return fail$1(error, true) + } + + if (config.help) { + process.stdout.write( + [ + 'Usage: ' + cliConfig.name + ' [options] [path | glob ...]', + '', + ' ' + cliConfig.description, + '', + 'Options:', + '', + config.helpMessage, + '' + ].join('\n'), + noop$1 + ); + + return + } + + if (config.version) { + process.stdout.write(cliConfig.version + '\n', noop$1); + + return + } + + // Modify `config` for watching. + if (config.watch) { + output = config.output; + + // Do not read from stdin(4). + config.streamIn = ttyStream; + + // Do not write to stdout(4). + config.out = false; + + process.stderr.write( + chalk.bold('Watching...') + ' (press CTRL+C to exit)\n', + noop$1 + ); + + // Prevent infinite loop if set to regeneration. + if (output === true) { + config.output = false; + + process.stderr.write( + chalk.yellow('Note') + ': Ignoring `--output` until exit.\n', + noop$1 + ); + } + } + + // Initial run. + lib$1(config, done); + + // Handle complete run. + function done(err, code, context) { + if (err) { + clean(); + fail$1(err); + } else { + exitStatus = code; + + if (config.watch && !watcher) { + subscribe(context); + } + } + } + + // Clean the watcher. + function clean() { + if (watcher) { + watcher.close(); + watcher = null; + } + } + + // Subscribe a chokidar watcher to all processed files. + function subscribe(context) { + watcher = chokidar + .watch(context.fileSet.origins, {cwd: config.cwd, ignoreInitial: true}) + .on('error', done) + .on('change', onchange); + + process.on('SIGINT', onsigint); + + function onchange(filePath) { + config.files = [filePath]; + + lib$1(config, done); + } + + function onsigint() { + // Hide the `^C` in terminal. + process.stderr.write('\n', noop$1); + + clean(); + + // Do another process if `output` specified regeneration. + if (output === true) { + config.output = output; + config.watch = false; + lib$1(config, done); + } + } + } +} + +// Print an error, optionally with stack. +function fail$1(err, pretty) { + var message = + (pretty ? String(err).trim() : err.stack) || + /* istanbul ignore next - Old versions of Node */ err; + + exitStatus = 1; + + process.stderr.write(message.trim() + '\n', noop$1); +} + +function onexit() { + /* eslint-disable unicorn/no-process-exit */ + process.exit(exitStatus); + /* eslint-enable unicorn/no-process-exit */ +} + +var unifiedArgs = lib$3; + +var markdownExtensions = [ + "md", + "markdown", + "mdown", + "mkdn", + "mkd", + "mdwn", + "mkdown", + "ron" +]; + +var markdownExtensions$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': markdownExtensions +}); + +var require$$0$1 = getCjsExportFromNamespace(markdownExtensions$1); + +var markdownExtensions$2 = require$$0$1; + +var hasOwn = Object.prototype.hasOwnProperty; +var toStr = Object.prototype.toString; +var defineProperty = Object.defineProperty; +var gOPD = Object.getOwnPropertyDescriptor; + +var isArray$1 = function isArray(arr) { + if (typeof Array.isArray === 'function') { + return Array.isArray(arr); + } + + return toStr.call(arr) === '[object Array]'; +}; + +var isPlainObject = function isPlainObject(obj) { + if (!obj || toStr.call(obj) !== '[object Object]') { + return false; + } + + var hasOwnConstructor = hasOwn.call(obj, 'constructor'); + var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); + // Not own constructor property must be Object + if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + var key; + for (key in obj) { /**/ } + + return typeof key === 'undefined' || hasOwn.call(obj, key); +}; + +// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target +var setProperty = function setProperty(target, options) { + if (defineProperty && options.name === '__proto__') { + defineProperty(target, options.name, { + enumerable: true, + configurable: true, + value: options.newValue, + writable: true + }); + } else { + target[options.name] = options.newValue; + } +}; + +// Return undefined instead of __proto__ if '__proto__' is not an own property +var getProperty = function getProperty(obj, name) { + if (name === '__proto__') { + if (!hasOwn.call(obj, name)) { + return void 0; + } else if (gOPD) { + // In early versions of node, obj['__proto__'] is buggy when obj has + // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. + return gOPD(obj, name).value; + } + } + + return obj[name]; +}; + +var extend$3 = function extend() { + var options, name, src, copy, copyIsArray, clone; + var target = arguments[0]; + var i = 1; + var length = arguments.length; + var deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + if (target == null || (typeof target !== 'object' && typeof target !== 'function')) { + target = {}; + } + + for (; i < length; ++i) { + options = arguments[i]; + // Only deal with non-null/undefined values + if (options != null) { + // Extend the base object + for (name in options) { + src = getProperty(target, name); + copy = getProperty(options, name); + + // Prevent never-ending loop + if (target !== copy) { + // Recurse if we're merging plain objects or arrays + if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray$1(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray$1(src) ? src : []; + } else { + clone = src && isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); + + // Don't bring in undefined values + } else if (typeof copy !== 'undefined') { + setProperty(target, { name: name, newValue: copy }); + } + } + } + } + } + + // Return the modified object + return target; +}; + +var bail_1 = bail; + +function bail(err) { + if (err) { + throw err + } +} + +var isPlainObj = value => { + if (Object.prototype.toString.call(value) !== '[object Object]') { + return false; + } + + const prototype = Object.getPrototypeOf(value); + return prototype === null || prototype === Object.getPrototypeOf({}); +}; + +// Expose a frozen processor. +var unified_1 = unified().freeze(); + +var slice$3 = [].slice; +var own$2 = {}.hasOwnProperty; + +// Process pipeline. +var pipeline = trough_1() + .use(pipelineParse) + .use(pipelineRun) + .use(pipelineStringify); + +function pipelineParse(p, ctx) { + ctx.tree = p.parse(ctx.file); +} + +function pipelineRun(p, ctx, next) { + p.run(ctx.tree, ctx.file, done); + + function done(err, tree, file) { + if (err) { + next(err); + } else { + ctx.tree = tree; + ctx.file = file; + next(); + } + } +} + +function pipelineStringify(p, ctx) { + ctx.file.contents = p.stringify(ctx.tree, ctx.file); +} + +// Function to create the first processor. +function unified() { + var attachers = []; + var transformers = trough_1(); + var namespace = {}; + var frozen = false; + var freezeIndex = -1; + + // Data management. + processor.data = data; + + // Lock. + processor.freeze = freeze; + + // Plugins. + processor.attachers = attachers; + processor.use = use; + + // API. + processor.parse = parse; + processor.stringify = stringify; + processor.run = run; + processor.runSync = runSync; + processor.process = process; + processor.processSync = processSync; + + // Expose. + return processor + + // Create a new processor based on the processor in the current scope. + function processor() { + var destination = unified(); + var length = attachers.length; + var index = -1; + + while (++index < length) { + destination.use.apply(null, attachers[index]); + } + + destination.data(extend$3(true, {}, namespace)); + + return destination + } + + // Freeze: used to signal a processor that has finished configuration. + // + // For example, take unified itself: it’s frozen. + // Plugins should not be added to it. + // Rather, it should be extended, by invoking it, before modifying it. + // + // In essence, always invoke this when exporting a processor. + function freeze() { + var values; + var plugin; + var options; + var transformer; + + if (frozen) { + return processor + } + + while (++freezeIndex < attachers.length) { + values = attachers[freezeIndex]; + plugin = values[0]; + options = values[1]; + transformer = null; + + if (options === false) { + continue + } + + if (options === true) { + values[1] = undefined; + } + + transformer = plugin.apply(processor, values.slice(1)); + + if (typeof transformer === 'function') { + transformers.use(transformer); + } + } + + frozen = true; + freezeIndex = Infinity; + + return processor + } + + // Data management. + // Getter / setter for processor-specific informtion. + function data(key, value) { + if (typeof key === 'string') { + // Set `key`. + if (arguments.length === 2) { + assertUnfrozen('data', frozen); + + namespace[key] = value; + + return processor + } + + // Get `key`. + return (own$2.call(namespace, key) && namespace[key]) || null + } + + // Set space. + if (key) { + assertUnfrozen('data', frozen); + namespace = key; + return processor + } + + // Get space. + return namespace + } + + // Plugin management. + // + // Pass it: + // * an attacher and options, + // * a preset, + // * a list of presets, attachers, and arguments (list of attachers and + // options). + function use(value) { + var settings; + + assertUnfrozen('use', frozen); + + if (value === null || value === undefined) ; else if (typeof value === 'function') { + addPlugin.apply(null, arguments); + } else if (typeof value === 'object') { + if ('length' in value) { + addList(value); + } else { + addPreset(value); + } + } else { + throw new Error('Expected usable value, not `' + value + '`') + } + + if (settings) { + namespace.settings = extend$3(namespace.settings || {}, settings); + } + + return processor + + function addPreset(result) { + addList(result.plugins); + + if (result.settings) { + settings = extend$3(settings || {}, result.settings); + } + } + + function add(value) { + if (typeof value === 'function') { + addPlugin(value); + } else if (typeof value === 'object') { + if ('length' in value) { + addPlugin.apply(null, value); + } else { + addPreset(value); + } + } else { + throw new Error('Expected usable value, not `' + value + '`') + } + } + + function addList(plugins) { + var length; + var index; + + if (plugins === null || plugins === undefined) ; else if (typeof plugins === 'object' && 'length' in plugins) { + length = plugins.length; + index = -1; + + while (++index < length) { + add(plugins[index]); + } + } else { + throw new Error('Expected a list of plugins, not `' + plugins + '`') + } + } + + function addPlugin(plugin, value) { + var entry = find(plugin); + + if (entry) { + if (isPlainObj(entry[1]) && isPlainObj(value)) { + value = extend$3(entry[1], value); + } + + entry[1] = value; + } else { + attachers.push(slice$3.call(arguments)); + } + } + } + + function find(plugin) { + var length = attachers.length; + var index = -1; + var entry; + + while (++index < length) { + entry = attachers[index]; + + if (entry[0] === plugin) { + return entry + } + } + } + + // Parse a file (in string or vfile representation) into a unist node using + // the `Parser` on the processor. + function parse(doc) { + var file = vfile(doc); + var Parser; + + freeze(); + Parser = processor.Parser; + assertParser('parse', Parser); + + if (newable(Parser, 'parse')) { + return new Parser(String(file), file).parse() + } + + return Parser(String(file), file) // eslint-disable-line new-cap + } + + // Run transforms on a unist node representation of a file (in string or + // vfile representation), async. + function run(node, file, cb) { + assertNode(node); + freeze(); + + if (!cb && typeof file === 'function') { + cb = file; + file = null; + } + + if (!cb) { + return new Promise(executor) + } + + executor(null, cb); + + function executor(resolve, reject) { + transformers.run(node, vfile(file), done); + + function done(err, tree, file) { + tree = tree || node; + if (err) { + reject(err); + } else if (resolve) { + resolve(tree); + } else { + cb(null, tree, file); + } + } + } + } + + // Run transforms on a unist node representation of a file (in string or + // vfile representation), sync. + function runSync(node, file) { + var complete = false; + var result; + + run(node, file, done); + + assertDone('runSync', 'run', complete); + + return result + + function done(err, tree) { + complete = true; + bail_1(err); + result = tree; + } + } + + // Stringify a unist node representation of a file (in string or vfile + // representation) into a string using the `Compiler` on the processor. + function stringify(node, doc) { + var file = vfile(doc); + var Compiler; + + freeze(); + Compiler = processor.Compiler; + assertCompiler('stringify', Compiler); + assertNode(node); + + if (newable(Compiler, 'compile')) { + return new Compiler(node, file).compile() + } + + return Compiler(node, file) // eslint-disable-line new-cap + } + + // Parse a file (in string or vfile representation) into a unist node using + // the `Parser` on the processor, then run transforms on that node, and + // compile the resulting node using the `Compiler` on the processor, and + // store that result on the vfile. + function process(doc, cb) { + freeze(); + assertParser('process', processor.Parser); + assertCompiler('process', processor.Compiler); + + if (!cb) { + return new Promise(executor) + } + + executor(null, cb); + + function executor(resolve, reject) { + var file = vfile(doc); + + pipeline.run(processor, {file: file}, done); + + function done(err) { + if (err) { + reject(err); + } else if (resolve) { + resolve(file); + } else { + cb(null, file); + } + } + } + } + + // Process the given document (in string or vfile representation), sync. + function processSync(doc) { + var complete = false; + var file; + + freeze(); + assertParser('processSync', processor.Parser); + assertCompiler('processSync', processor.Compiler); + file = vfile(doc); + + process(file, done); + + assertDone('processSync', 'process', complete); + + return file + + function done(err) { + complete = true; + bail_1(err); + } + } +} + +// Check if `value` is a constructor. +function newable(value, name) { + return ( + typeof value === 'function' && + value.prototype && + // A function with keys in its prototype is probably a constructor. + // Classes’ prototype methods are not enumerable, so we check if some value + // exists in the prototype. + (keys(value.prototype) || name in value.prototype) + ) +} + +// Check if `value` is an object with keys. +function keys(value) { + var key; + for (key in value) { + return true + } + + return false +} + +// Assert a parser is available. +function assertParser(name, Parser) { + if (typeof Parser !== 'function') { + throw new Error('Cannot `' + name + '` without `Parser`') + } +} + +// Assert a compiler is available. +function assertCompiler(name, Compiler) { + if (typeof Compiler !== 'function') { + throw new Error('Cannot `' + name + '` without `Compiler`') + } +} + +// Assert the processor is not frozen. +function assertUnfrozen(name, frozen) { + if (frozen) { + throw new Error( + 'Cannot invoke `' + + name + + '` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.' + ) + } +} + +// Assert `node` is a unist node. +function assertNode(node) { + if (!node || typeof node.type !== 'string') { + throw new Error('Expected node, got `' + node + '`') + } +} + +// Assert that `complete` is `true`. +function assertDone(name, asyncName, complete) { + if (!complete) { + throw new Error( + '`' + name + '` finished async. Use `' + asyncName + '` instead' + ) + } +} + +var unherit_1 = unherit; + +// Create a custom constructor which can be modified without affecting the +// original class. +function unherit(Super) { + var result; + var key; + var value; + + inherits(Of, Super); + inherits(From, Of); + + // Clone values. + result = Of.prototype; + + for (key in result) { + value = result[key]; + + if (value && typeof value === 'object') { + result[key] = 'concat' in value ? value.concat() : immutable(value); + } + } + + return Of + + // Constructor accepting a single argument, which itself is an `arguments` + // object. + function From(parameters) { + return Super.apply(this, parameters) + } + + // Constructor accepting variadic arguments. + function Of() { + if (!(this instanceof Of)) { + return new From(arguments) + } + + return Super.apply(this, arguments) + } +} + +var stateToggle = factory$1; + +// Construct a state `toggler`: a function which inverses `property` in context +// based on its current value. +// The by `toggler` returned function restores that value. +function factory$1(key, state, ctx) { + return enter + + function enter() { + var context = ctx || this; + var current = context[key]; + + context[key] = !state; + + return exit + + function exit() { + context[key] = current; + } + } +} + +var vfileLocation = factory$2; + +function factory$2(file) { + var contents = indices(String(file)); + + return { + toPosition: offsetToPositionFactory(contents), + toOffset: positionToOffsetFactory(contents) + } +} + +// Factory to get the line and column-based `position` for `offset` in the bound +// indices. +function offsetToPositionFactory(indices) { + return offsetToPosition + + // Get the line and column-based `position` for `offset` in the bound indices. + function offsetToPosition(offset) { + var index = -1; + var length = indices.length; + + if (offset < 0) { + return {} + } + + while (++index < length) { + if (indices[index] > offset) { + return { + line: index + 1, + column: offset - (indices[index - 1] || 0) + 1, + offset: offset + } + } + } + + return {} + } +} + +// Factory to get the `offset` for a line and column-based `position` in the +// bound indices. +function positionToOffsetFactory(indices) { + return positionToOffset + + // Get the `offset` for a line and column-based `position` in the bound + // indices. + function positionToOffset(position) { + var line = position && position.line; + var column = position && position.column; + + if (!isNaN(line) && !isNaN(column) && line - 1 in indices) { + return (indices[line - 2] || 0) + column - 1 || 0 + } + + return -1 + } +} + +// Get indices of line-breaks in `value`. +function indices(value) { + var result = []; + var index = value.indexOf('\n'); + + while (index !== -1) { + result.push(index + 1); + index = value.indexOf('\n', index + 1); + } + + result.push(value.length + 1); + + return result +} + +var _unescape = factory$3; + +var backslash$1 = '\\'; + +// Factory to de-escape a value, based on a list at `key` in `ctx`. +function factory$3(ctx, key) { + return unescape + + // De-escape a string using the expression at `key` in `ctx`. + function unescape(value) { + var prev = 0; + var index = value.indexOf(backslash$1); + var escape = ctx[key]; + var queue = []; + var character; + + while (index !== -1) { + queue.push(value.slice(prev, index)); + prev = index + 1; + character = value.charAt(prev); + + // If the following character is not a valid escape, add the slash. + if (!character || escape.indexOf(character) === -1) { + queue.push(backslash$1); + } + + index = value.indexOf(backslash$1, prev + 1); + } + + queue.push(value.slice(prev)); + + return queue.join('') + } +} + +const AElig = "Æ"; +const AMP = "&"; +const Aacute = "Á"; +const Acirc = "Â"; +const Agrave = "À"; +const Aring = "Å"; +const Atilde = "Ã"; +const Auml = "Ä"; +const COPY = "©"; +const Ccedil = "Ç"; +const ETH = "Ð"; +const Eacute = "É"; +const Ecirc = "Ê"; +const Egrave = "È"; +const Euml = "Ë"; +const GT = ">"; +const Iacute = "Í"; +const Icirc = "Î"; +const Igrave = "Ì"; +const Iuml = "Ï"; +const LT = "<"; +const Ntilde = "Ñ"; +const Oacute = "Ó"; +const Ocirc = "Ô"; +const Ograve = "Ò"; +const Oslash = "Ø"; +const Otilde = "Õ"; +const Ouml = "Ö"; +const QUOT = "\""; +const REG = "®"; +const THORN = "Þ"; +const Uacute = "Ú"; +const Ucirc = "Û"; +const Ugrave = "Ù"; +const Uuml = "Ü"; +const Yacute = "Ý"; +const aacute = "á"; +const acirc = "â"; +const acute = "´"; +const aelig = "æ"; +const agrave = "à"; +const amp = "&"; +const aring = "å"; +const atilde = "ã"; +const auml = "ä"; +const brvbar = "¦"; +const ccedil = "ç"; +const cedil = "¸"; +const cent = "¢"; +const copy$1 = "©"; +const curren = "¤"; +const deg = "°"; +const divide = "÷"; +const eacute = "é"; +const ecirc = "ê"; +const egrave = "è"; +const eth = "ð"; +const euml = "ë"; +const frac12 = "½"; +const frac14 = "¼"; +const frac34 = "¾"; +const gt = ">"; +const iacute = "í"; +const icirc = "î"; +const iexcl = "¡"; +const igrave = "ì"; +const iquest = "¿"; +const iuml = "ï"; +const laquo = "«"; +const lt = "<"; +const macr = "¯"; +const micro = "µ"; +const middot = "·"; +const nbsp = " "; +const not = "¬"; +const ntilde = "ñ"; +const oacute = "ó"; +const ocirc = "ô"; +const ograve = "ò"; +const ordf = "ª"; +const ordm = "º"; +const oslash = "ø"; +const otilde = "õ"; +const ouml = "ö"; +const para = "¶"; +const plusmn = "±"; +const pound = "£"; +const quot = "\""; +const raquo = "»"; +const reg = "®"; +const sect = "§"; +const shy = "­"; +const sup1 = "¹"; +const sup2 = "²"; +const sup3 = "³"; +const szlig = "ß"; +const thorn = "þ"; +const times = "×"; +const uacute = "ú"; +const ucirc = "û"; +const ugrave = "ù"; +const uml = "¨"; +const uuml = "ü"; +const yacute = "ý"; +const yen = "¥"; +const yuml = "ÿ"; +var index$1 = { + AElig: AElig, + AMP: AMP, + Aacute: Aacute, + Acirc: Acirc, + Agrave: Agrave, + Aring: Aring, + Atilde: Atilde, + Auml: Auml, + COPY: COPY, + Ccedil: Ccedil, + ETH: ETH, + Eacute: Eacute, + Ecirc: Ecirc, + Egrave: Egrave, + Euml: Euml, + GT: GT, + Iacute: Iacute, + Icirc: Icirc, + Igrave: Igrave, + Iuml: Iuml, + LT: LT, + Ntilde: Ntilde, + Oacute: Oacute, + Ocirc: Ocirc, + Ograve: Ograve, + Oslash: Oslash, + Otilde: Otilde, + Ouml: Ouml, + QUOT: QUOT, + REG: REG, + THORN: THORN, + Uacute: Uacute, + Ucirc: Ucirc, + Ugrave: Ugrave, + Uuml: Uuml, + Yacute: Yacute, + aacute: aacute, + acirc: acirc, + acute: acute, + aelig: aelig, + agrave: agrave, + amp: amp, + aring: aring, + atilde: atilde, + auml: auml, + brvbar: brvbar, + ccedil: ccedil, + cedil: cedil, + cent: cent, + copy: copy$1, + curren: curren, + deg: deg, + divide: divide, + eacute: eacute, + ecirc: ecirc, + egrave: egrave, + eth: eth, + euml: euml, + frac12: frac12, + frac14: frac14, + frac34: frac34, + gt: gt, + iacute: iacute, + icirc: icirc, + iexcl: iexcl, + igrave: igrave, + iquest: iquest, + iuml: iuml, + laquo: laquo, + lt: lt, + macr: macr, + micro: micro, + middot: middot, + nbsp: nbsp, + not: not, + ntilde: ntilde, + oacute: oacute, + ocirc: ocirc, + ograve: ograve, + ordf: ordf, + ordm: ordm, + oslash: oslash, + otilde: otilde, + ouml: ouml, + para: para, + plusmn: plusmn, + pound: pound, + quot: quot, + raquo: raquo, + reg: reg, + sect: sect, + shy: shy, + sup1: sup1, + sup2: sup2, + sup3: sup3, + szlig: szlig, + thorn: thorn, + times: times, + uacute: uacute, + ucirc: ucirc, + ugrave: ugrave, + uml: uml, + uuml: uuml, + yacute: yacute, + yen: yen, + yuml: yuml +}; + +var characterEntitiesLegacy = /*#__PURE__*/Object.freeze({ + __proto__: null, + AElig: AElig, + AMP: AMP, + Aacute: Aacute, + Acirc: Acirc, + Agrave: Agrave, + Aring: Aring, + Atilde: Atilde, + Auml: Auml, + COPY: COPY, + Ccedil: Ccedil, + ETH: ETH, + Eacute: Eacute, + Ecirc: Ecirc, + Egrave: Egrave, + Euml: Euml, + GT: GT, + Iacute: Iacute, + Icirc: Icirc, + Igrave: Igrave, + Iuml: Iuml, + LT: LT, + Ntilde: Ntilde, + Oacute: Oacute, + Ocirc: Ocirc, + Ograve: Ograve, + Oslash: Oslash, + Otilde: Otilde, + Ouml: Ouml, + QUOT: QUOT, + REG: REG, + THORN: THORN, + Uacute: Uacute, + Ucirc: Ucirc, + Ugrave: Ugrave, + Uuml: Uuml, + Yacute: Yacute, + aacute: aacute, + acirc: acirc, + acute: acute, + aelig: aelig, + agrave: agrave, + amp: amp, + aring: aring, + atilde: atilde, + auml: auml, + brvbar: brvbar, + ccedil: ccedil, + cedil: cedil, + cent: cent, + copy: copy$1, + curren: curren, + deg: deg, + divide: divide, + eacute: eacute, + ecirc: ecirc, + egrave: egrave, + eth: eth, + euml: euml, + frac12: frac12, + frac14: frac14, + frac34: frac34, + gt: gt, + iacute: iacute, + icirc: icirc, + iexcl: iexcl, + igrave: igrave, + iquest: iquest, + iuml: iuml, + laquo: laquo, + lt: lt, + macr: macr, + micro: micro, + middot: middot, + nbsp: nbsp, + not: not, + ntilde: ntilde, + oacute: oacute, + ocirc: ocirc, + ograve: ograve, + ordf: ordf, + ordm: ordm, + oslash: oslash, + otilde: otilde, + ouml: ouml, + para: para, + plusmn: plusmn, + pound: pound, + quot: quot, + raquo: raquo, + reg: reg, + sect: sect, + shy: shy, + sup1: sup1, + sup2: sup2, + sup3: sup3, + szlig: szlig, + thorn: thorn, + times: times, + uacute: uacute, + ucirc: ucirc, + ugrave: ugrave, + uml: uml, + uuml: uuml, + yacute: yacute, + yen: yen, + yuml: yuml, + 'default': index$1 +}); + +var index$2 = { + "0": "�", + "128": "€", + "130": "‚", + "131": "ƒ", + "132": "„", + "133": "…", + "134": "†", + "135": "‡", + "136": "ˆ", + "137": "‰", + "138": "Š", + "139": "‹", + "140": "Œ", + "142": "Ž", + "145": "‘", + "146": "’", + "147": "“", + "148": "”", + "149": "•", + "150": "–", + "151": "—", + "152": "˜", + "153": "™", + "154": "š", + "155": "›", + "156": "œ", + "158": "ž", + "159": "Ÿ" +}; + +var characterReferenceInvalid = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': index$2 +}); + +var isDecimal = decimal; + +// Check if the given character code, or the character code at the first +// character, is decimal. +function decimal(character) { + var code = typeof character === 'string' ? character.charCodeAt(0) : character; + + return code >= 48 && code <= 57 /* 0-9 */ +} + +var isHexadecimal = hexadecimal; + +// Check if the given character code, or the character code at the first +// character, is hexadecimal. +function hexadecimal(character) { + var code = typeof character === 'string' ? character.charCodeAt(0) : character; + + return ( + (code >= 97 /* a */ && code <= 102) /* z */ || + (code >= 65 /* A */ && code <= 70) /* Z */ || + (code >= 48 /* A */ && code <= 57) /* Z */ + ) +} + +var isAlphabetical = alphabetical; + +// Check if the given character code, or the character code at the first +// character, is alphabetical. +function alphabetical(character) { + var code = typeof character === 'string' ? character.charCodeAt(0) : character; + + return ( + (code >= 97 && code <= 122) /* a-z */ || + (code >= 65 && code <= 90) /* A-Z */ + ) +} + +var isAlphanumerical = alphanumerical; + +// Check if the given character code, or the character code at the first +// character, is alphanumerical. +function alphanumerical(character) { + return isAlphabetical(character) || isDecimal(character) +} + +const AEli = "Æ"; +const AElig$1 = "Æ"; +const AM = "&"; +const AMP$1 = "&"; +const Aacut = "Á"; +const Aacute$1 = "Á"; +const Abreve = "Ă"; +const Acir = "Â"; +const Acirc$1 = "Â"; +const Acy = "А"; +const Afr = "𝔄"; +const Agrav = "À"; +const Agrave$1 = "À"; +const Alpha = "Α"; +const Amacr = "Ā"; +const And = "⩓"; +const Aogon = "Ą"; +const Aopf = "𝔸"; +const ApplyFunction = "⁡"; +const Arin = "Å"; +const Aring$1 = "Å"; +const Ascr = "𝒜"; +const Assign = "≔"; +const Atild = "Ã"; +const Atilde$1 = "Ã"; +const Aum = "Ä"; +const Auml$1 = "Ä"; +const Backslash = "∖"; +const Barv = "⫧"; +const Barwed = "⌆"; +const Bcy = "Б"; +const Because = "∵"; +const Bernoullis = "ℬ"; +const Beta = "Β"; +const Bfr = "𝔅"; +const Bopf = "𝔹"; +const Breve = "˘"; +const Bscr = "ℬ"; +const Bumpeq = "≎"; +const CHcy = "Ч"; +const COP = "©"; +const COPY$1 = "©"; +const Cacute = "Ć"; +const Cap = "⋒"; +const CapitalDifferentialD = "ⅅ"; +const Cayleys = "ℭ"; +const Ccaron = "Č"; +const Ccedi = "Ç"; +const Ccedil$1 = "Ç"; +const Ccirc = "Ĉ"; +const Cconint = "∰"; +const Cdot = "Ċ"; +const Cedilla = "¸"; +const CenterDot = "·"; +const Cfr = "ℭ"; +const Chi = "Χ"; +const CircleDot = "⊙"; +const CircleMinus = "⊖"; +const CirclePlus = "⊕"; +const CircleTimes = "⊗"; +const ClockwiseContourIntegral = "∲"; +const CloseCurlyDoubleQuote = "”"; +const CloseCurlyQuote = "’"; +const Colon = "∷"; +const Colone = "⩴"; +const Congruent = "≡"; +const Conint = "∯"; +const ContourIntegral = "∮"; +const Copf = "ℂ"; +const Coproduct = "∐"; +const CounterClockwiseContourIntegral = "∳"; +const Cross = "⨯"; +const Cscr = "𝒞"; +const Cup = "⋓"; +const CupCap = "≍"; +const DD = "ⅅ"; +const DDotrahd = "⤑"; +const DJcy = "Ђ"; +const DScy = "Ѕ"; +const DZcy = "Џ"; +const Dagger = "‡"; +const Darr = "↡"; +const Dashv = "⫤"; +const Dcaron = "Ď"; +const Dcy = "Д"; +const Del = "∇"; +const Delta = "Δ"; +const Dfr = "𝔇"; +const DiacriticalAcute = "´"; +const DiacriticalDot = "˙"; +const DiacriticalDoubleAcute = "˝"; +const DiacriticalGrave = "`"; +const DiacriticalTilde = "˜"; +const Diamond = "⋄"; +const DifferentialD = "ⅆ"; +const Dopf = "𝔻"; +const Dot = "¨"; +const DotDot = "⃜"; +const DotEqual = "≐"; +const DoubleContourIntegral = "∯"; +const DoubleDot = "¨"; +const DoubleDownArrow = "⇓"; +const DoubleLeftArrow = "⇐"; +const DoubleLeftRightArrow = "⇔"; +const DoubleLeftTee = "⫤"; +const DoubleLongLeftArrow = "⟸"; +const DoubleLongLeftRightArrow = "⟺"; +const DoubleLongRightArrow = "⟹"; +const DoubleRightArrow = "⇒"; +const DoubleRightTee = "⊨"; +const DoubleUpArrow = "⇑"; +const DoubleUpDownArrow = "⇕"; +const DoubleVerticalBar = "∥"; +const DownArrow = "↓"; +const DownArrowBar = "⤓"; +const DownArrowUpArrow = "⇵"; +const DownBreve = "̑"; +const DownLeftRightVector = "⥐"; +const DownLeftTeeVector = "⥞"; +const DownLeftVector = "↽"; +const DownLeftVectorBar = "⥖"; +const DownRightTeeVector = "⥟"; +const DownRightVector = "⇁"; +const DownRightVectorBar = "⥗"; +const DownTee = "⊤"; +const DownTeeArrow = "↧"; +const Downarrow = "⇓"; +const Dscr = "𝒟"; +const Dstrok = "Đ"; +const ENG = "Ŋ"; +const ET = "Ð"; +const ETH$1 = "Ð"; +const Eacut = "É"; +const Eacute$1 = "É"; +const Ecaron = "Ě"; +const Ecir = "Ê"; +const Ecirc$1 = "Ê"; +const Ecy = "Э"; +const Edot = "Ė"; +const Efr = "𝔈"; +const Egrav = "È"; +const Egrave$1 = "È"; +const Element = "∈"; +const Emacr = "Ē"; +const EmptySmallSquare = "◻"; +const EmptyVerySmallSquare = "▫"; +const Eogon = "Ę"; +const Eopf = "𝔼"; +const Epsilon = "Ε"; +const Equal = "⩵"; +const EqualTilde = "≂"; +const Equilibrium = "⇌"; +const Escr = "ℰ"; +const Esim = "⩳"; +const Eta = "Η"; +const Eum = "Ë"; +const Euml$1 = "Ë"; +const Exists = "∃"; +const ExponentialE = "ⅇ"; +const Fcy = "Ф"; +const Ffr = "𝔉"; +const FilledSmallSquare = "◼"; +const FilledVerySmallSquare = "▪"; +const Fopf = "𝔽"; +const ForAll = "∀"; +const Fouriertrf = "ℱ"; +const Fscr = "ℱ"; +const GJcy = "Ѓ"; +const G = ">"; +const GT$1 = ">"; +const Gamma = "Γ"; +const Gammad = "Ϝ"; +const Gbreve = "Ğ"; +const Gcedil = "Ģ"; +const Gcirc = "Ĝ"; +const Gcy = "Г"; +const Gdot = "Ġ"; +const Gfr = "𝔊"; +const Gg = "⋙"; +const Gopf = "𝔾"; +const GreaterEqual = "≥"; +const GreaterEqualLess = "⋛"; +const GreaterFullEqual = "≧"; +const GreaterGreater = "⪢"; +const GreaterLess = "≷"; +const GreaterSlantEqual = "⩾"; +const GreaterTilde = "≳"; +const Gscr = "𝒢"; +const Gt = "≫"; +const HARDcy = "Ъ"; +const Hacek = "ˇ"; +const Hat = "^"; +const Hcirc = "Ĥ"; +const Hfr = "ℌ"; +const HilbertSpace = "ℋ"; +const Hopf = "ℍ"; +const HorizontalLine = "─"; +const Hscr = "ℋ"; +const Hstrok = "Ħ"; +const HumpDownHump = "≎"; +const HumpEqual = "≏"; +const IEcy = "Е"; +const IJlig = "IJ"; +const IOcy = "Ё"; +const Iacut = "Í"; +const Iacute$1 = "Í"; +const Icir = "Î"; +const Icirc$1 = "Î"; +const Icy = "И"; +const Idot = "İ"; +const Ifr = "ℑ"; +const Igrav = "Ì"; +const Igrave$1 = "Ì"; +const Im = "ℑ"; +const Imacr = "Ī"; +const ImaginaryI = "ⅈ"; +const Implies = "⇒"; +const Int = "∬"; +const Integral = "∫"; +const Intersection = "⋂"; +const InvisibleComma = "⁣"; +const InvisibleTimes = "⁢"; +const Iogon = "Į"; +const Iopf = "𝕀"; +const Iota = "Ι"; +const Iscr = "ℐ"; +const Itilde = "Ĩ"; +const Iukcy = "І"; +const Ium = "Ï"; +const Iuml$1 = "Ï"; +const Jcirc = "Ĵ"; +const Jcy = "Й"; +const Jfr = "𝔍"; +const Jopf = "𝕁"; +const Jscr = "𝒥"; +const Jsercy = "Ј"; +const Jukcy = "Є"; +const KHcy = "Х"; +const KJcy = "Ќ"; +const Kappa = "Κ"; +const Kcedil = "Ķ"; +const Kcy = "К"; +const Kfr = "𝔎"; +const Kopf = "𝕂"; +const Kscr = "𝒦"; +const LJcy = "Љ"; +const L = "<"; +const LT$1 = "<"; +const Lacute = "Ĺ"; +const Lambda = "Λ"; +const Lang = "⟪"; +const Laplacetrf = "ℒ"; +const Larr = "↞"; +const Lcaron = "Ľ"; +const Lcedil = "Ļ"; +const Lcy = "Л"; +const LeftAngleBracket = "⟨"; +const LeftArrow = "←"; +const LeftArrowBar = "⇤"; +const LeftArrowRightArrow = "⇆"; +const LeftCeiling = "⌈"; +const LeftDoubleBracket = "⟦"; +const LeftDownTeeVector = "⥡"; +const LeftDownVector = "⇃"; +const LeftDownVectorBar = "⥙"; +const LeftFloor = "⌊"; +const LeftRightArrow = "↔"; +const LeftRightVector = "⥎"; +const LeftTee = "⊣"; +const LeftTeeArrow = "↤"; +const LeftTeeVector = "⥚"; +const LeftTriangle = "⊲"; +const LeftTriangleBar = "⧏"; +const LeftTriangleEqual = "⊴"; +const LeftUpDownVector = "⥑"; +const LeftUpTeeVector = "⥠"; +const LeftUpVector = "↿"; +const LeftUpVectorBar = "⥘"; +const LeftVector = "↼"; +const LeftVectorBar = "⥒"; +const Leftarrow = "⇐"; +const Leftrightarrow = "⇔"; +const LessEqualGreater = "⋚"; +const LessFullEqual = "≦"; +const LessGreater = "≶"; +const LessLess = "⪡"; +const LessSlantEqual = "⩽"; +const LessTilde = "≲"; +const Lfr = "𝔏"; +const Ll = "⋘"; +const Lleftarrow = "⇚"; +const Lmidot = "Ŀ"; +const LongLeftArrow = "⟵"; +const LongLeftRightArrow = "⟷"; +const LongRightArrow = "⟶"; +const Longleftarrow = "⟸"; +const Longleftrightarrow = "⟺"; +const Longrightarrow = "⟹"; +const Lopf = "𝕃"; +const LowerLeftArrow = "↙"; +const LowerRightArrow = "↘"; +const Lscr = "ℒ"; +const Lsh = "↰"; +const Lstrok = "Ł"; +const Lt = "≪"; +const Mcy = "М"; +const MediumSpace = " "; +const Mellintrf = "ℳ"; +const Mfr = "𝔐"; +const MinusPlus = "∓"; +const Mopf = "𝕄"; +const Mscr = "ℳ"; +const Mu = "Μ"; +const NJcy = "Њ"; +const Nacute = "Ń"; +const Ncaron = "Ň"; +const Ncedil = "Ņ"; +const Ncy = "Н"; +const NegativeMediumSpace = "​"; +const NegativeThickSpace = "​"; +const NegativeThinSpace = "​"; +const NegativeVeryThinSpace = "​"; +const NestedGreaterGreater = "≫"; +const NestedLessLess = "≪"; +const NewLine = "\n"; +const Nfr = "𝔑"; +const NoBreak = "⁠"; +const NonBreakingSpace = " "; +const Nopf = "ℕ"; +const Not = "⫬"; +const NotCongruent = "≢"; +const NotCupCap = "≭"; +const NotDoubleVerticalBar = "∦"; +const NotElement = "∉"; +const NotEqual = "≠"; +const NotEqualTilde = "≂̸"; +const NotExists = "∄"; +const NotGreater = "≯"; +const NotGreaterEqual = "≱"; +const NotGreaterFullEqual = "≧̸"; +const NotGreaterGreater = "≫̸"; +const NotGreaterLess = "≹"; +const NotGreaterSlantEqual = "⩾̸"; +const NotGreaterTilde = "≵"; +const NotHumpDownHump = "≎̸"; +const NotHumpEqual = "≏̸"; +const NotLeftTriangle = "⋪"; +const NotLeftTriangleBar = "⧏̸"; +const NotLeftTriangleEqual = "⋬"; +const NotLess = "≮"; +const NotLessEqual = "≰"; +const NotLessGreater = "≸"; +const NotLessLess = "≪̸"; +const NotLessSlantEqual = "⩽̸"; +const NotLessTilde = "≴"; +const NotNestedGreaterGreater = "⪢̸"; +const NotNestedLessLess = "⪡̸"; +const NotPrecedes = "⊀"; +const NotPrecedesEqual = "⪯̸"; +const NotPrecedesSlantEqual = "⋠"; +const NotReverseElement = "∌"; +const NotRightTriangle = "⋫"; +const NotRightTriangleBar = "⧐̸"; +const NotRightTriangleEqual = "⋭"; +const NotSquareSubset = "⊏̸"; +const NotSquareSubsetEqual = "⋢"; +const NotSquareSuperset = "⊐̸"; +const NotSquareSupersetEqual = "⋣"; +const NotSubset = "⊂⃒"; +const NotSubsetEqual = "⊈"; +const NotSucceeds = "⊁"; +const NotSucceedsEqual = "⪰̸"; +const NotSucceedsSlantEqual = "⋡"; +const NotSucceedsTilde = "≿̸"; +const NotSuperset = "⊃⃒"; +const NotSupersetEqual = "⊉"; +const NotTilde = "≁"; +const NotTildeEqual = "≄"; +const NotTildeFullEqual = "≇"; +const NotTildeTilde = "≉"; +const NotVerticalBar = "∤"; +const Nscr = "𝒩"; +const Ntild = "Ñ"; +const Ntilde$1 = "Ñ"; +const Nu = "Ν"; +const OElig = "Œ"; +const Oacut = "Ó"; +const Oacute$1 = "Ó"; +const Ocir = "Ô"; +const Ocirc$1 = "Ô"; +const Ocy = "О"; +const Odblac = "Ő"; +const Ofr = "𝔒"; +const Ograv = "Ò"; +const Ograve$1 = "Ò"; +const Omacr = "Ō"; +const Omega = "Ω"; +const Omicron = "Ο"; +const Oopf = "𝕆"; +const OpenCurlyDoubleQuote = "“"; +const OpenCurlyQuote = "‘"; +const Or = "⩔"; +const Oscr = "𝒪"; +const Oslas = "Ø"; +const Oslash$1 = "Ø"; +const Otild = "Õ"; +const Otilde$1 = "Õ"; +const Otimes = "⨷"; +const Oum = "Ö"; +const Ouml$1 = "Ö"; +const OverBar = "‾"; +const OverBrace = "⏞"; +const OverBracket = "⎴"; +const OverParenthesis = "⏜"; +const PartialD = "∂"; +const Pcy = "П"; +const Pfr = "𝔓"; +const Phi = "Φ"; +const Pi = "Π"; +const PlusMinus = "±"; +const Poincareplane = "ℌ"; +const Popf = "ℙ"; +const Pr = "⪻"; +const Precedes = "≺"; +const PrecedesEqual = "⪯"; +const PrecedesSlantEqual = "≼"; +const PrecedesTilde = "≾"; +const Prime = "″"; +const Product = "∏"; +const Proportion = "∷"; +const Proportional = "∝"; +const Pscr = "𝒫"; +const Psi = "Ψ"; +const QUO = "\""; +const QUOT$1 = "\""; +const Qfr = "𝔔"; +const Qopf = "ℚ"; +const Qscr = "𝒬"; +const RBarr = "⤐"; +const RE = "®"; +const REG$1 = "®"; +const Racute = "Ŕ"; +const Rang = "⟫"; +const Rarr = "↠"; +const Rarrtl = "⤖"; +const Rcaron = "Ř"; +const Rcedil = "Ŗ"; +const Rcy = "Р"; +const Re = "ℜ"; +const ReverseElement = "∋"; +const ReverseEquilibrium = "⇋"; +const ReverseUpEquilibrium = "⥯"; +const Rfr = "ℜ"; +const Rho = "Ρ"; +const RightAngleBracket = "⟩"; +const RightArrow = "→"; +const RightArrowBar = "⇥"; +const RightArrowLeftArrow = "⇄"; +const RightCeiling = "⌉"; +const RightDoubleBracket = "⟧"; +const RightDownTeeVector = "⥝"; +const RightDownVector = "⇂"; +const RightDownVectorBar = "⥕"; +const RightFloor = "⌋"; +const RightTee = "⊢"; +const RightTeeArrow = "↦"; +const RightTeeVector = "⥛"; +const RightTriangle = "⊳"; +const RightTriangleBar = "⧐"; +const RightTriangleEqual = "⊵"; +const RightUpDownVector = "⥏"; +const RightUpTeeVector = "⥜"; +const RightUpVector = "↾"; +const RightUpVectorBar = "⥔"; +const RightVector = "⇀"; +const RightVectorBar = "⥓"; +const Rightarrow = "⇒"; +const Ropf = "ℝ"; +const RoundImplies = "⥰"; +const Rrightarrow = "⇛"; +const Rscr = "ℛ"; +const Rsh = "↱"; +const RuleDelayed = "⧴"; +const SHCHcy = "Щ"; +const SHcy = "Ш"; +const SOFTcy = "Ь"; +const Sacute = "Ś"; +const Sc = "⪼"; +const Scaron = "Š"; +const Scedil = "Ş"; +const Scirc = "Ŝ"; +const Scy = "С"; +const Sfr = "𝔖"; +const ShortDownArrow = "↓"; +const ShortLeftArrow = "←"; +const ShortRightArrow = "→"; +const ShortUpArrow = "↑"; +const Sigma = "Σ"; +const SmallCircle = "∘"; +const Sopf = "𝕊"; +const Sqrt = "√"; +const Square = "□"; +const SquareIntersection = "⊓"; +const SquareSubset = "⊏"; +const SquareSubsetEqual = "⊑"; +const SquareSuperset = "⊐"; +const SquareSupersetEqual = "⊒"; +const SquareUnion = "⊔"; +const Sscr = "𝒮"; +const Star = "⋆"; +const Sub = "⋐"; +const Subset = "⋐"; +const SubsetEqual = "⊆"; +const Succeeds = "≻"; +const SucceedsEqual = "⪰"; +const SucceedsSlantEqual = "≽"; +const SucceedsTilde = "≿"; +const SuchThat = "∋"; +const Sum = "∑"; +const Sup = "⋑"; +const Superset = "⊃"; +const SupersetEqual = "⊇"; +const Supset = "⋑"; +const THOR = "Þ"; +const THORN$1 = "Þ"; +const TRADE = "™"; +const TSHcy = "Ћ"; +const TScy = "Ц"; +const Tab = "\t"; +const Tau = "Τ"; +const Tcaron = "Ť"; +const Tcedil = "Ţ"; +const Tcy = "Т"; +const Tfr = "𝔗"; +const Therefore = "∴"; +const Theta = "Θ"; +const ThickSpace = "  "; +const ThinSpace = " "; +const Tilde = "∼"; +const TildeEqual = "≃"; +const TildeFullEqual = "≅"; +const TildeTilde = "≈"; +const Topf = "𝕋"; +const TripleDot = "⃛"; +const Tscr = "𝒯"; +const Tstrok = "Ŧ"; +const Uacut = "Ú"; +const Uacute$1 = "Ú"; +const Uarr = "↟"; +const Uarrocir = "⥉"; +const Ubrcy = "Ў"; +const Ubreve = "Ŭ"; +const Ucir = "Û"; +const Ucirc$1 = "Û"; +const Ucy = "У"; +const Udblac = "Ű"; +const Ufr = "𝔘"; +const Ugrav = "Ù"; +const Ugrave$1 = "Ù"; +const Umacr = "Ū"; +const UnderBar = "_"; +const UnderBrace = "⏟"; +const UnderBracket = "⎵"; +const UnderParenthesis = "⏝"; +const Union = "⋃"; +const UnionPlus = "⊎"; +const Uogon = "Ų"; +const Uopf = "𝕌"; +const UpArrow = "↑"; +const UpArrowBar = "⤒"; +const UpArrowDownArrow = "⇅"; +const UpDownArrow = "↕"; +const UpEquilibrium = "⥮"; +const UpTee = "⊥"; +const UpTeeArrow = "↥"; +const Uparrow = "⇑"; +const Updownarrow = "⇕"; +const UpperLeftArrow = "↖"; +const UpperRightArrow = "↗"; +const Upsi = "ϒ"; +const Upsilon = "Υ"; +const Uring = "Ů"; +const Uscr = "𝒰"; +const Utilde = "Ũ"; +const Uum = "Ü"; +const Uuml$1 = "Ü"; +const VDash = "⊫"; +const Vbar = "⫫"; +const Vcy = "В"; +const Vdash = "⊩"; +const Vdashl = "⫦"; +const Vee = "⋁"; +const Verbar = "‖"; +const Vert = "‖"; +const VerticalBar = "∣"; +const VerticalLine = "|"; +const VerticalSeparator = "❘"; +const VerticalTilde = "≀"; +const VeryThinSpace = " "; +const Vfr = "𝔙"; +const Vopf = "𝕍"; +const Vscr = "𝒱"; +const Vvdash = "⊪"; +const Wcirc = "Ŵ"; +const Wedge = "⋀"; +const Wfr = "𝔚"; +const Wopf = "𝕎"; +const Wscr = "𝒲"; +const Xfr = "𝔛"; +const Xi = "Ξ"; +const Xopf = "𝕏"; +const Xscr = "𝒳"; +const YAcy = "Я"; +const YIcy = "Ї"; +const YUcy = "Ю"; +const Yacut = "Ý"; +const Yacute$1 = "Ý"; +const Ycirc = "Ŷ"; +const Ycy = "Ы"; +const Yfr = "𝔜"; +const Yopf = "𝕐"; +const Yscr = "𝒴"; +const Yuml = "Ÿ"; +const ZHcy = "Ж"; +const Zacute = "Ź"; +const Zcaron = "Ž"; +const Zcy = "З"; +const Zdot = "Ż"; +const ZeroWidthSpace = "​"; +const Zeta = "Ζ"; +const Zfr = "ℨ"; +const Zopf = "ℤ"; +const Zscr = "𝒵"; +const aacut = "á"; +const aacute$1 = "á"; +const abreve = "ă"; +const ac = "∾"; +const acE = "∾̳"; +const acd = "∿"; +const acir = "â"; +const acirc$1 = "â"; +const acut = "´"; +const acute$1 = "´"; +const acy = "а"; +const aeli = "æ"; +const aelig$1 = "æ"; +const af = "⁡"; +const afr = "𝔞"; +const agrav = "à"; +const agrave$1 = "à"; +const alefsym = "ℵ"; +const aleph = "ℵ"; +const alpha = "α"; +const amacr = "ā"; +const amalg = "⨿"; +const am = "&"; +const amp$1 = "&"; +const and = "∧"; +const andand = "⩕"; +const andd = "⩜"; +const andslope = "⩘"; +const andv = "⩚"; +const ang = "∠"; +const ange = "⦤"; +const angle = "∠"; +const angmsd = "∡"; +const angmsdaa = "⦨"; +const angmsdab = "⦩"; +const angmsdac = "⦪"; +const angmsdad = "⦫"; +const angmsdae = "⦬"; +const angmsdaf = "⦭"; +const angmsdag = "⦮"; +const angmsdah = "⦯"; +const angrt = "∟"; +const angrtvb = "⊾"; +const angrtvbd = "⦝"; +const angsph = "∢"; +const angst = "Å"; +const angzarr = "⍼"; +const aogon = "ą"; +const aopf = "𝕒"; +const ap = "≈"; +const apE = "⩰"; +const apacir = "⩯"; +const ape = "≊"; +const apid = "≋"; +const apos = "'"; +const approx = "≈"; +const approxeq = "≊"; +const arin = "å"; +const aring$1 = "å"; +const ascr = "𝒶"; +const ast = "*"; +const asymp = "≈"; +const asympeq = "≍"; +const atild = "ã"; +const atilde$1 = "ã"; +const aum = "ä"; +const auml$1 = "ä"; +const awconint = "∳"; +const awint = "⨑"; +const bNot = "⫭"; +const backcong = "≌"; +const backepsilon = "϶"; +const backprime = "‵"; +const backsim = "∽"; +const backsimeq = "⋍"; +const barvee = "⊽"; +const barwed = "⌅"; +const barwedge = "⌅"; +const bbrk = "⎵"; +const bbrktbrk = "⎶"; +const bcong = "≌"; +const bcy = "б"; +const bdquo = "„"; +const becaus = "∵"; +const because = "∵"; +const bemptyv = "⦰"; +const bepsi = "϶"; +const bernou = "ℬ"; +const beta = "β"; +const beth = "ℶ"; +const between = "≬"; +const bfr = "𝔟"; +const bigcap = "⋂"; +const bigcirc = "◯"; +const bigcup = "⋃"; +const bigodot = "⨀"; +const bigoplus = "⨁"; +const bigotimes = "⨂"; +const bigsqcup = "⨆"; +const bigstar = "★"; +const bigtriangledown = "▽"; +const bigtriangleup = "△"; +const biguplus = "⨄"; +const bigvee = "⋁"; +const bigwedge = "⋀"; +const bkarow = "⤍"; +const blacklozenge = "⧫"; +const blacksquare = "▪"; +const blacktriangle = "▴"; +const blacktriangledown = "▾"; +const blacktriangleleft = "◂"; +const blacktriangleright = "▸"; +const blank = "␣"; +const blk12 = "▒"; +const blk14 = "░"; +const blk34 = "▓"; +const block = "█"; +const bne = "=⃥"; +const bnequiv = "≡⃥"; +const bnot = "⌐"; +const bopf = "𝕓"; +const bot = "⊥"; +const bottom = "⊥"; +const bowtie = "⋈"; +const boxDL = "╗"; +const boxDR = "╔"; +const boxDl = "╖"; +const boxDr = "╓"; +const boxH = "═"; +const boxHD = "╦"; +const boxHU = "╩"; +const boxHd = "╤"; +const boxHu = "╧"; +const boxUL = "╝"; +const boxUR = "╚"; +const boxUl = "╜"; +const boxUr = "╙"; +const boxV = "║"; +const boxVH = "╬"; +const boxVL = "╣"; +const boxVR = "╠"; +const boxVh = "╫"; +const boxVl = "╢"; +const boxVr = "╟"; +const boxbox = "⧉"; +const boxdL = "╕"; +const boxdR = "╒"; +const boxdl = "┐"; +const boxdr = "┌"; +const boxh = "─"; +const boxhD = "╥"; +const boxhU = "╨"; +const boxhd = "┬"; +const boxhu = "┴"; +const boxminus = "⊟"; +const boxplus = "⊞"; +const boxtimes = "⊠"; +const boxuL = "╛"; +const boxuR = "╘"; +const boxul = "┘"; +const boxur = "└"; +const boxv = "│"; +const boxvH = "╪"; +const boxvL = "╡"; +const boxvR = "╞"; +const boxvh = "┼"; +const boxvl = "┤"; +const boxvr = "├"; +const bprime = "‵"; +const breve = "˘"; +const brvba = "¦"; +const brvbar$1 = "¦"; +const bscr = "𝒷"; +const bsemi = "⁏"; +const bsim = "∽"; +const bsime = "⋍"; +const bsol = "\\"; +const bsolb = "⧅"; +const bsolhsub = "⟈"; +const bull = "•"; +const bullet = "•"; +const bump = "≎"; +const bumpE = "⪮"; +const bumpe = "≏"; +const bumpeq = "≏"; +const cacute = "ć"; +const cap = "∩"; +const capand = "⩄"; +const capbrcup = "⩉"; +const capcap = "⩋"; +const capcup = "⩇"; +const capdot = "⩀"; +const caps = "∩︀"; +const caret = "⁁"; +const caron = "ˇ"; +const ccaps = "⩍"; +const ccaron = "č"; +const ccedi = "ç"; +const ccedil$1 = "ç"; +const ccirc = "ĉ"; +const ccups = "⩌"; +const ccupssm = "⩐"; +const cdot = "ċ"; +const cedi = "¸"; +const cedil$1 = "¸"; +const cemptyv = "⦲"; +const cen = "¢"; +const cent$1 = "¢"; +const centerdot = "·"; +const cfr = "𝔠"; +const chcy = "ч"; +const check$2 = "✓"; +const checkmark = "✓"; +const chi = "χ"; +const cir = "○"; +const cirE = "⧃"; +const circ = "ˆ"; +const circeq = "≗"; +const circlearrowleft = "↺"; +const circlearrowright = "↻"; +const circledR = "®"; +const circledS = "Ⓢ"; +const circledast = "⊛"; +const circledcirc = "⊚"; +const circleddash = "⊝"; +const cire = "≗"; +const cirfnint = "⨐"; +const cirmid = "⫯"; +const cirscir = "⧂"; +const clubs = "♣"; +const clubsuit = "♣"; +const colon = ":"; +const colone = "≔"; +const coloneq = "≔"; +const comma = ","; +const commat = "@"; +const comp = "∁"; +const compfn = "∘"; +const complement = "∁"; +const complexes = "ℂ"; +const cong = "≅"; +const congdot = "⩭"; +const conint = "∮"; +const copf = "𝕔"; +const coprod = "∐"; +const cop = "©"; +const copy$2 = "©"; +const copysr = "℗"; +const crarr = "↵"; +const cross = "✗"; +const cscr = "𝒸"; +const csub = "⫏"; +const csube = "⫑"; +const csup = "⫐"; +const csupe = "⫒"; +const ctdot = "⋯"; +const cudarrl = "⤸"; +const cudarrr = "⤵"; +const cuepr = "⋞"; +const cuesc = "⋟"; +const cularr = "↶"; +const cularrp = "⤽"; +const cup = "∪"; +const cupbrcap = "⩈"; +const cupcap = "⩆"; +const cupcup = "⩊"; +const cupdot = "⊍"; +const cupor = "⩅"; +const cups = "∪︀"; +const curarr = "↷"; +const curarrm = "⤼"; +const curlyeqprec = "⋞"; +const curlyeqsucc = "⋟"; +const curlyvee = "⋎"; +const curlywedge = "⋏"; +const curre = "¤"; +const curren$1 = "¤"; +const curvearrowleft = "↶"; +const curvearrowright = "↷"; +const cuvee = "⋎"; +const cuwed = "⋏"; +const cwconint = "∲"; +const cwint = "∱"; +const cylcty = "⌭"; +const dArr = "⇓"; +const dHar = "⥥"; +const dagger = "†"; +const daleth = "ℸ"; +const darr = "↓"; +const dash = "‐"; +const dashv = "⊣"; +const dbkarow = "⤏"; +const dblac = "˝"; +const dcaron = "ď"; +const dcy = "д"; +const dd = "ⅆ"; +const ddagger = "‡"; +const ddarr = "⇊"; +const ddotseq = "⩷"; +const de = "°"; +const deg$1 = "°"; +const delta = "δ"; +const demptyv = "⦱"; +const dfisht = "⥿"; +const dfr = "𝔡"; +const dharl = "⇃"; +const dharr = "⇂"; +const diam = "⋄"; +const diamond = "⋄"; +const diamondsuit = "♦"; +const diams = "♦"; +const die = "¨"; +const digamma = "ϝ"; +const disin = "⋲"; +const div = "÷"; +const divid = "÷"; +const divide$1 = "÷"; +const divideontimes = "⋇"; +const divonx = "⋇"; +const djcy = "ђ"; +const dlcorn = "⌞"; +const dlcrop = "⌍"; +const dollar = "$"; +const dopf = "𝕕"; +const dot = "˙"; +const doteq = "≐"; +const doteqdot = "≑"; +const dotminus = "∸"; +const dotplus = "∔"; +const dotsquare = "⊡"; +const doublebarwedge = "⌆"; +const downarrow = "↓"; +const downdownarrows = "⇊"; +const downharpoonleft = "⇃"; +const downharpoonright = "⇂"; +const drbkarow = "⤐"; +const drcorn = "⌟"; +const drcrop = "⌌"; +const dscr = "𝒹"; +const dscy = "ѕ"; +const dsol = "⧶"; +const dstrok = "đ"; +const dtdot = "⋱"; +const dtri = "▿"; +const dtrif = "▾"; +const duarr = "⇵"; +const duhar = "⥯"; +const dwangle = "⦦"; +const dzcy = "џ"; +const dzigrarr = "⟿"; +const eDDot = "⩷"; +const eDot = "≑"; +const eacut = "é"; +const eacute$1 = "é"; +const easter = "⩮"; +const ecaron = "ě"; +const ecir = "ê"; +const ecirc$1 = "ê"; +const ecolon = "≕"; +const ecy = "э"; +const edot = "ė"; +const ee = "ⅇ"; +const efDot = "≒"; +const efr = "𝔢"; +const eg = "⪚"; +const egrav = "è"; +const egrave$1 = "è"; +const egs = "⪖"; +const egsdot = "⪘"; +const el = "⪙"; +const elinters = "⏧"; +const ell = "ℓ"; +const els = "⪕"; +const elsdot = "⪗"; +const emacr = "ē"; +const empty = "∅"; +const emptyset = "∅"; +const emptyv = "∅"; +const emsp13 = " "; +const emsp14 = " "; +const emsp = " "; +const eng = "ŋ"; +const ensp = " "; +const eogon = "ę"; +const eopf = "𝕖"; +const epar = "⋕"; +const eparsl = "⧣"; +const eplus = "⩱"; +const epsi = "ε"; +const epsilon = "ε"; +const epsiv = "ϵ"; +const eqcirc = "≖"; +const eqcolon = "≕"; +const eqsim = "≂"; +const eqslantgtr = "⪖"; +const eqslantless = "⪕"; +const equals = "="; +const equest = "≟"; +const equiv = "≡"; +const equivDD = "⩸"; +const eqvparsl = "⧥"; +const erDot = "≓"; +const erarr = "⥱"; +const escr = "ℯ"; +const esdot = "≐"; +const esim = "≂"; +const eta = "η"; +const et = "ð"; +const eth$1 = "ð"; +const eum = "ë"; +const euml$1 = "ë"; +const euro = "€"; +const excl = "!"; +const exist = "∃"; +const expectation = "ℰ"; +const exponentiale = "ⅇ"; +const fallingdotseq = "≒"; +const fcy = "ф"; +const female = "♀"; +const ffilig = "ffi"; +const fflig = "ff"; +const ffllig = "ffl"; +const ffr = "𝔣"; +const filig = "fi"; +const fjlig = "fj"; +const flat = "♭"; +const fllig = "fl"; +const fltns = "▱"; +const fnof = "ƒ"; +const fopf = "𝕗"; +const forall = "∀"; +const fork = "⋔"; +const forkv = "⫙"; +const fpartint = "⨍"; +const frac1 = "¼"; +const frac12$1 = "½"; +const frac13 = "⅓"; +const frac14$1 = "¼"; +const frac15 = "⅕"; +const frac16 = "⅙"; +const frac18 = "⅛"; +const frac23 = "⅔"; +const frac25 = "⅖"; +const frac3 = "¾"; +const frac34$1 = "¾"; +const frac35 = "⅗"; +const frac38 = "⅜"; +const frac45 = "⅘"; +const frac56 = "⅚"; +const frac58 = "⅝"; +const frac78 = "⅞"; +const frasl = "⁄"; +const frown = "⌢"; +const fscr = "𝒻"; +const gE = "≧"; +const gEl = "⪌"; +const gacute = "ǵ"; +const gamma = "γ"; +const gammad = "ϝ"; +const gap = "⪆"; +const gbreve = "ğ"; +const gcirc = "ĝ"; +const gcy = "г"; +const gdot = "ġ"; +const ge = "≥"; +const gel = "⋛"; +const geq = "≥"; +const geqq = "≧"; +const geqslant = "⩾"; +const ges = "⩾"; +const gescc = "⪩"; +const gesdot = "⪀"; +const gesdoto = "⪂"; +const gesdotol = "⪄"; +const gesl = "⋛︀"; +const gesles = "⪔"; +const gfr = "𝔤"; +const gg = "≫"; +const ggg = "⋙"; +const gimel = "ℷ"; +const gjcy = "ѓ"; +const gl = "≷"; +const glE = "⪒"; +const gla = "⪥"; +const glj = "⪤"; +const gnE = "≩"; +const gnap = "⪊"; +const gnapprox = "⪊"; +const gne = "⪈"; +const gneq = "⪈"; +const gneqq = "≩"; +const gnsim = "⋧"; +const gopf = "𝕘"; +const grave = "`"; +const gscr = "ℊ"; +const gsim = "≳"; +const gsime = "⪎"; +const gsiml = "⪐"; +const g = ">"; +const gt$1 = ">"; +const gtcc = "⪧"; +const gtcir = "⩺"; +const gtdot = "⋗"; +const gtlPar = "⦕"; +const gtquest = "⩼"; +const gtrapprox = "⪆"; +const gtrarr = "⥸"; +const gtrdot = "⋗"; +const gtreqless = "⋛"; +const gtreqqless = "⪌"; +const gtrless = "≷"; +const gtrsim = "≳"; +const gvertneqq = "≩︀"; +const gvnE = "≩︀"; +const hArr = "⇔"; +const hairsp = " "; +const half = "½"; +const hamilt = "ℋ"; +const hardcy = "ъ"; +const harr = "↔"; +const harrcir = "⥈"; +const harrw = "↭"; +const hbar = "ℏ"; +const hcirc = "ĥ"; +const hearts = "♥"; +const heartsuit = "♥"; +const hellip = "…"; +const hercon = "⊹"; +const hfr = "𝔥"; +const hksearow = "⤥"; +const hkswarow = "⤦"; +const hoarr = "⇿"; +const homtht = "∻"; +const hookleftarrow = "↩"; +const hookrightarrow = "↪"; +const hopf = "𝕙"; +const horbar = "―"; +const hscr = "𝒽"; +const hslash = "ℏ"; +const hstrok = "ħ"; +const hybull = "⁃"; +const hyphen = "‐"; +const iacut = "í"; +const iacute$1 = "í"; +const ic = "⁣"; +const icir = "î"; +const icirc$1 = "î"; +const icy = "и"; +const iecy = "е"; +const iexc = "¡"; +const iexcl$1 = "¡"; +const iff = "⇔"; +const ifr = "𝔦"; +const igrav = "ì"; +const igrave$1 = "ì"; +const ii = "ⅈ"; +const iiiint = "⨌"; +const iiint = "∭"; +const iinfin = "⧜"; +const iiota = "℩"; +const ijlig = "ij"; +const imacr = "ī"; +const image = "ℑ"; +const imagline = "ℐ"; +const imagpart = "ℑ"; +const imath = "ı"; +const imof = "⊷"; +const imped = "Ƶ"; +const incare = "℅"; +const infin = "∞"; +const infintie = "⧝"; +const inodot = "ı"; +const int = "∫"; +const intcal = "⊺"; +const integers = "ℤ"; +const intercal = "⊺"; +const intlarhk = "⨗"; +const intprod = "⨼"; +const iocy = "ё"; +const iogon = "į"; +const iopf = "𝕚"; +const iota = "ι"; +const iprod = "⨼"; +const iques = "¿"; +const iquest$1 = "¿"; +const iscr = "𝒾"; +const isin = "∈"; +const isinE = "⋹"; +const isindot = "⋵"; +const isins = "⋴"; +const isinsv = "⋳"; +const isinv = "∈"; +const it = "⁢"; +const itilde = "ĩ"; +const iukcy = "і"; +const ium = "ï"; +const iuml$1 = "ï"; +const jcirc = "ĵ"; +const jcy = "й"; +const jfr = "𝔧"; +const jmath = "ȷ"; +const jopf = "𝕛"; +const jscr = "𝒿"; +const jsercy = "ј"; +const jukcy = "є"; +const kappa = "κ"; +const kappav = "ϰ"; +const kcedil = "ķ"; +const kcy = "к"; +const kfr = "𝔨"; +const kgreen = "ĸ"; +const khcy = "х"; +const kjcy = "ќ"; +const kopf = "𝕜"; +const kscr = "𝓀"; +const lAarr = "⇚"; +const lArr = "⇐"; +const lAtail = "⤛"; +const lBarr = "⤎"; +const lE = "≦"; +const lEg = "⪋"; +const lHar = "⥢"; +const lacute = "ĺ"; +const laemptyv = "⦴"; +const lagran = "ℒ"; +const lambda = "λ"; +const lang = "⟨"; +const langd = "⦑"; +const langle = "⟨"; +const lap = "⪅"; +const laqu = "«"; +const laquo$1 = "«"; +const larr = "←"; +const larrb = "⇤"; +const larrbfs = "⤟"; +const larrfs = "⤝"; +const larrhk = "↩"; +const larrlp = "↫"; +const larrpl = "⤹"; +const larrsim = "⥳"; +const larrtl = "↢"; +const lat = "⪫"; +const latail = "⤙"; +const late = "⪭"; +const lates = "⪭︀"; +const lbarr = "⤌"; +const lbbrk = "❲"; +const lbrace = "{"; +const lbrack = "["; +const lbrke = "⦋"; +const lbrksld = "⦏"; +const lbrkslu = "⦍"; +const lcaron = "ľ"; +const lcedil = "ļ"; +const lceil = "⌈"; +const lcub = "{"; +const lcy = "л"; +const ldca = "⤶"; +const ldquo = "“"; +const ldquor = "„"; +const ldrdhar = "⥧"; +const ldrushar = "⥋"; +const ldsh = "↲"; +const le = "≤"; +const leftarrow = "←"; +const leftarrowtail = "↢"; +const leftharpoondown = "↽"; +const leftharpoonup = "↼"; +const leftleftarrows = "⇇"; +const leftrightarrow = "↔"; +const leftrightarrows = "⇆"; +const leftrightharpoons = "⇋"; +const leftrightsquigarrow = "↭"; +const leftthreetimes = "⋋"; +const leg = "⋚"; +const leq = "≤"; +const leqq = "≦"; +const leqslant = "⩽"; +const les = "⩽"; +const lescc = "⪨"; +const lesdot = "⩿"; +const lesdoto = "⪁"; +const lesdotor = "⪃"; +const lesg = "⋚︀"; +const lesges = "⪓"; +const lessapprox = "⪅"; +const lessdot = "⋖"; +const lesseqgtr = "⋚"; +const lesseqqgtr = "⪋"; +const lessgtr = "≶"; +const lesssim = "≲"; +const lfisht = "⥼"; +const lfloor = "⌊"; +const lfr = "𝔩"; +const lg = "≶"; +const lgE = "⪑"; +const lhard = "↽"; +const lharu = "↼"; +const lharul = "⥪"; +const lhblk = "▄"; +const ljcy = "љ"; +const ll = "≪"; +const llarr = "⇇"; +const llcorner = "⌞"; +const llhard = "⥫"; +const lltri = "◺"; +const lmidot = "ŀ"; +const lmoust = "⎰"; +const lmoustache = "⎰"; +const lnE = "≨"; +const lnap = "⪉"; +const lnapprox = "⪉"; +const lne = "⪇"; +const lneq = "⪇"; +const lneqq = "≨"; +const lnsim = "⋦"; +const loang = "⟬"; +const loarr = "⇽"; +const lobrk = "⟦"; +const longleftarrow = "⟵"; +const longleftrightarrow = "⟷"; +const longmapsto = "⟼"; +const longrightarrow = "⟶"; +const looparrowleft = "↫"; +const looparrowright = "↬"; +const lopar = "⦅"; +const lopf = "𝕝"; +const loplus = "⨭"; +const lotimes = "⨴"; +const lowast = "∗"; +const lowbar = "_"; +const loz = "◊"; +const lozenge = "◊"; +const lozf = "⧫"; +const lpar = "("; +const lparlt = "⦓"; +const lrarr = "⇆"; +const lrcorner = "⌟"; +const lrhar = "⇋"; +const lrhard = "⥭"; +const lrm = "‎"; +const lrtri = "⊿"; +const lsaquo = "‹"; +const lscr = "𝓁"; +const lsh = "↰"; +const lsim = "≲"; +const lsime = "⪍"; +const lsimg = "⪏"; +const lsqb = "["; +const lsquo = "‘"; +const lsquor = "‚"; +const lstrok = "ł"; +const l = "<"; +const lt$1 = "<"; +const ltcc = "⪦"; +const ltcir = "⩹"; +const ltdot = "⋖"; +const lthree = "⋋"; +const ltimes = "⋉"; +const ltlarr = "⥶"; +const ltquest = "⩻"; +const ltrPar = "⦖"; +const ltri = "◃"; +const ltrie = "⊴"; +const ltrif = "◂"; +const lurdshar = "⥊"; +const luruhar = "⥦"; +const lvertneqq = "≨︀"; +const lvnE = "≨︀"; +const mDDot = "∺"; +const mac = "¯"; +const macr$1 = "¯"; +const male = "♂"; +const malt = "✠"; +const maltese = "✠"; +const map$2 = "↦"; +const mapsto = "↦"; +const mapstodown = "↧"; +const mapstoleft = "↤"; +const mapstoup = "↥"; +const marker = "▮"; +const mcomma = "⨩"; +const mcy = "м"; +const mdash = "—"; +const measuredangle = "∡"; +const mfr = "𝔪"; +const mho = "℧"; +const micr = "µ"; +const micro$1 = "µ"; +const mid = "∣"; +const midast = "*"; +const midcir = "⫰"; +const middo = "·"; +const middot$1 = "·"; +const minus = "−"; +const minusb = "⊟"; +const minusd = "∸"; +const minusdu = "⨪"; +const mlcp = "⫛"; +const mldr = "…"; +const mnplus = "∓"; +const models$1 = "⊧"; +const mopf = "𝕞"; +const mp = "∓"; +const mscr = "𝓂"; +const mstpos = "∾"; +const mu = "μ"; +const multimap = "⊸"; +const mumap = "⊸"; +const nGg = "⋙̸"; +const nGt = "≫⃒"; +const nGtv = "≫̸"; +const nLeftarrow = "⇍"; +const nLeftrightarrow = "⇎"; +const nLl = "⋘̸"; +const nLt = "≪⃒"; +const nLtv = "≪̸"; +const nRightarrow = "⇏"; +const nVDash = "⊯"; +const nVdash = "⊮"; +const nabla = "∇"; +const nacute = "ń"; +const nang = "∠⃒"; +const nap = "≉"; +const napE = "⩰̸"; +const napid = "≋̸"; +const napos = "ʼn"; +const napprox = "≉"; +const natur = "♮"; +const natural = "♮"; +const naturals = "ℕ"; +const nbs = " "; +const nbsp$1 = " "; +const nbump = "≎̸"; +const nbumpe = "≏̸"; +const ncap = "⩃"; +const ncaron = "ň"; +const ncedil = "ņ"; +const ncong = "≇"; +const ncongdot = "⩭̸"; +const ncup = "⩂"; +const ncy = "н"; +const ndash = "–"; +const ne = "≠"; +const neArr = "⇗"; +const nearhk = "⤤"; +const nearr = "↗"; +const nearrow = "↗"; +const nedot = "≐̸"; +const nequiv = "≢"; +const nesear = "⤨"; +const nesim = "≂̸"; +const nexist = "∄"; +const nexists = "∄"; +const nfr = "𝔫"; +const ngE = "≧̸"; +const nge = "≱"; +const ngeq = "≱"; +const ngeqq = "≧̸"; +const ngeqslant = "⩾̸"; +const nges = "⩾̸"; +const ngsim = "≵"; +const ngt = "≯"; +const ngtr = "≯"; +const nhArr = "⇎"; +const nharr = "↮"; +const nhpar = "⫲"; +const ni = "∋"; +const nis = "⋼"; +const nisd = "⋺"; +const niv = "∋"; +const njcy = "њ"; +const nlArr = "⇍"; +const nlE = "≦̸"; +const nlarr = "↚"; +const nldr = "‥"; +const nle = "≰"; +const nleftarrow = "↚"; +const nleftrightarrow = "↮"; +const nleq = "≰"; +const nleqq = "≦̸"; +const nleqslant = "⩽̸"; +const nles = "⩽̸"; +const nless = "≮"; +const nlsim = "≴"; +const nlt = "≮"; +const nltri = "⋪"; +const nltrie = "⋬"; +const nmid = "∤"; +const nopf = "𝕟"; +const no = "¬"; +const not$1 = "¬"; +const notin = "∉"; +const notinE = "⋹̸"; +const notindot = "⋵̸"; +const notinva = "∉"; +const notinvb = "⋷"; +const notinvc = "⋶"; +const notni = "∌"; +const notniva = "∌"; +const notnivb = "⋾"; +const notnivc = "⋽"; +const npar = "∦"; +const nparallel = "∦"; +const nparsl = "⫽⃥"; +const npart = "∂̸"; +const npolint = "⨔"; +const npr = "⊀"; +const nprcue = "⋠"; +const npre = "⪯̸"; +const nprec = "⊀"; +const npreceq = "⪯̸"; +const nrArr = "⇏"; +const nrarr = "↛"; +const nrarrc = "⤳̸"; +const nrarrw = "↝̸"; +const nrightarrow = "↛"; +const nrtri = "⋫"; +const nrtrie = "⋭"; +const nsc = "⊁"; +const nsccue = "⋡"; +const nsce = "⪰̸"; +const nscr = "𝓃"; +const nshortmid = "∤"; +const nshortparallel = "∦"; +const nsim = "≁"; +const nsime = "≄"; +const nsimeq = "≄"; +const nsmid = "∤"; +const nspar = "∦"; +const nsqsube = "⋢"; +const nsqsupe = "⋣"; +const nsub = "⊄"; +const nsubE = "⫅̸"; +const nsube = "⊈"; +const nsubset = "⊂⃒"; +const nsubseteq = "⊈"; +const nsubseteqq = "⫅̸"; +const nsucc = "⊁"; +const nsucceq = "⪰̸"; +const nsup = "⊅"; +const nsupE = "⫆̸"; +const nsupe = "⊉"; +const nsupset = "⊃⃒"; +const nsupseteq = "⊉"; +const nsupseteqq = "⫆̸"; +const ntgl = "≹"; +const ntild = "ñ"; +const ntilde$1 = "ñ"; +const ntlg = "≸"; +const ntriangleleft = "⋪"; +const ntrianglelefteq = "⋬"; +const ntriangleright = "⋫"; +const ntrianglerighteq = "⋭"; +const nu = "ν"; +const num = "#"; +const numero = "№"; +const numsp = " "; +const nvDash = "⊭"; +const nvHarr = "⤄"; +const nvap = "≍⃒"; +const nvdash = "⊬"; +const nvge = "≥⃒"; +const nvgt = ">⃒"; +const nvinfin = "⧞"; +const nvlArr = "⤂"; +const nvle = "≤⃒"; +const nvlt = "<⃒"; +const nvltrie = "⊴⃒"; +const nvrArr = "⤃"; +const nvrtrie = "⊵⃒"; +const nvsim = "∼⃒"; +const nwArr = "⇖"; +const nwarhk = "⤣"; +const nwarr = "↖"; +const nwarrow = "↖"; +const nwnear = "⤧"; +const oS = "Ⓢ"; +const oacut = "ó"; +const oacute$1 = "ó"; +const oast = "⊛"; +const ocir = "ô"; +const ocirc$1 = "ô"; +const ocy = "о"; +const odash = "⊝"; +const odblac = "ő"; +const odiv = "⨸"; +const odot = "⊙"; +const odsold = "⦼"; +const oelig = "œ"; +const ofcir = "⦿"; +const ofr = "𝔬"; +const ogon = "˛"; +const ograv = "ò"; +const ograve$1 = "ò"; +const ogt = "⧁"; +const ohbar = "⦵"; +const ohm = "Ω"; +const oint = "∮"; +const olarr = "↺"; +const olcir = "⦾"; +const olcross = "⦻"; +const oline = "‾"; +const olt = "⧀"; +const omacr = "ō"; +const omega = "ω"; +const omicron = "ο"; +const omid = "⦶"; +const ominus = "⊖"; +const oopf = "𝕠"; +const opar = "⦷"; +const operp = "⦹"; +const oplus = "⊕"; +const or = "∨"; +const orarr = "↻"; +const ord = "º"; +const order$1 = "ℴ"; +const orderof = "ℴ"; +const ordf$1 = "ª"; +const ordm$1 = "º"; +const origof = "⊶"; +const oror = "⩖"; +const orslope = "⩗"; +const orv = "⩛"; +const oscr = "ℴ"; +const oslas = "ø"; +const oslash$1 = "ø"; +const osol = "⊘"; +const otild = "õ"; +const otilde$1 = "õ"; +const otimes = "⊗"; +const otimesas = "⨶"; +const oum = "ö"; +const ouml$1 = "ö"; +const ovbar = "⌽"; +const par = "¶"; +const para$1 = "¶"; +const parallel = "∥"; +const parsim = "⫳"; +const parsl = "⫽"; +const part = "∂"; +const pcy = "п"; +const percnt = "%"; +const period = "."; +const permil = "‰"; +const perp = "⊥"; +const pertenk = "‱"; +const pfr = "𝔭"; +const phi = "φ"; +const phiv = "ϕ"; +const phmmat = "ℳ"; +const phone = "☎"; +const pi = "π"; +const pitchfork = "⋔"; +const piv = "ϖ"; +const planck = "ℏ"; +const planckh = "ℎ"; +const plankv = "ℏ"; +const plus = "+"; +const plusacir = "⨣"; +const plusb = "⊞"; +const pluscir = "⨢"; +const plusdo = "∔"; +const plusdu = "⨥"; +const pluse = "⩲"; +const plusm = "±"; +const plusmn$1 = "±"; +const plussim = "⨦"; +const plustwo = "⨧"; +const pm = "±"; +const pointint = "⨕"; +const popf = "𝕡"; +const poun = "£"; +const pound$1 = "£"; +const pr = "≺"; +const prE = "⪳"; +const prap = "⪷"; +const prcue = "≼"; +const pre = "⪯"; +const prec = "≺"; +const precapprox = "⪷"; +const preccurlyeq = "≼"; +const preceq = "⪯"; +const precnapprox = "⪹"; +const precneqq = "⪵"; +const precnsim = "⋨"; +const precsim = "≾"; +const prime = "′"; +const primes = "ℙ"; +const prnE = "⪵"; +const prnap = "⪹"; +const prnsim = "⋨"; +const prod = "∏"; +const profalar = "⌮"; +const profline = "⌒"; +const profsurf = "⌓"; +const prop = "∝"; +const propto = "∝"; +const prsim = "≾"; +const prurel = "⊰"; +const pscr = "𝓅"; +const psi = "ψ"; +const puncsp = " "; +const qfr = "𝔮"; +const qint = "⨌"; +const qopf = "𝕢"; +const qprime = "⁗"; +const qscr = "𝓆"; +const quaternions = "ℍ"; +const quatint = "⨖"; +const quest = "?"; +const questeq = "≟"; +const quo = "\""; +const quot$1 = "\""; +const rAarr = "⇛"; +const rArr = "⇒"; +const rAtail = "⤜"; +const rBarr = "⤏"; +const rHar = "⥤"; +const race = "∽̱"; +const racute = "ŕ"; +const radic = "√"; +const raemptyv = "⦳"; +const rang = "⟩"; +const rangd = "⦒"; +const range$1 = "⦥"; +const rangle = "⟩"; +const raqu = "»"; +const raquo$1 = "»"; +const rarr = "→"; +const rarrap = "⥵"; +const rarrb = "⇥"; +const rarrbfs = "⤠"; +const rarrc = "⤳"; +const rarrfs = "⤞"; +const rarrhk = "↪"; +const rarrlp = "↬"; +const rarrpl = "⥅"; +const rarrsim = "⥴"; +const rarrtl = "↣"; +const rarrw = "↝"; +const ratail = "⤚"; +const ratio = "∶"; +const rationals = "ℚ"; +const rbarr = "⤍"; +const rbbrk = "❳"; +const rbrace = "}"; +const rbrack = "]"; +const rbrke = "⦌"; +const rbrksld = "⦎"; +const rbrkslu = "⦐"; +const rcaron = "ř"; +const rcedil = "ŗ"; +const rceil = "⌉"; +const rcub = "}"; +const rcy = "р"; +const rdca = "⤷"; +const rdldhar = "⥩"; +const rdquo = "”"; +const rdquor = "”"; +const rdsh = "↳"; +const real = "ℜ"; +const realine = "ℛ"; +const realpart = "ℜ"; +const reals = "ℝ"; +const rect = "▭"; +const re = "®"; +const reg$1 = "®"; +const rfisht = "⥽"; +const rfloor = "⌋"; +const rfr = "𝔯"; +const rhard = "⇁"; +const rharu = "⇀"; +const rharul = "⥬"; +const rho = "ρ"; +const rhov = "ϱ"; +const rightarrow = "→"; +const rightarrowtail = "↣"; +const rightharpoondown = "⇁"; +const rightharpoonup = "⇀"; +const rightleftarrows = "⇄"; +const rightleftharpoons = "⇌"; +const rightrightarrows = "⇉"; +const rightsquigarrow = "↝"; +const rightthreetimes = "⋌"; +const ring = "˚"; +const risingdotseq = "≓"; +const rlarr = "⇄"; +const rlhar = "⇌"; +const rlm = "‏"; +const rmoust = "⎱"; +const rmoustache = "⎱"; +const rnmid = "⫮"; +const roang = "⟭"; +const roarr = "⇾"; +const robrk = "⟧"; +const ropar = "⦆"; +const ropf = "𝕣"; +const roplus = "⨮"; +const rotimes = "⨵"; +const rpar = ")"; +const rpargt = "⦔"; +const rppolint = "⨒"; +const rrarr = "⇉"; +const rsaquo = "›"; +const rscr = "𝓇"; +const rsh = "↱"; +const rsqb = "]"; +const rsquo = "’"; +const rsquor = "’"; +const rthree = "⋌"; +const rtimes = "⋊"; +const rtri = "▹"; +const rtrie = "⊵"; +const rtrif = "▸"; +const rtriltri = "⧎"; +const ruluhar = "⥨"; +const rx = "℞"; +const sacute = "ś"; +const sbquo = "‚"; +const sc = "≻"; +const scE = "⪴"; +const scap = "⪸"; +const scaron = "š"; +const sccue = "≽"; +const sce = "⪰"; +const scedil = "ş"; +const scirc = "ŝ"; +const scnE = "⪶"; +const scnap = "⪺"; +const scnsim = "⋩"; +const scpolint = "⨓"; +const scsim = "≿"; +const scy = "с"; +const sdot = "⋅"; +const sdotb = "⊡"; +const sdote = "⩦"; +const seArr = "⇘"; +const searhk = "⤥"; +const searr = "↘"; +const searrow = "↘"; +const sec = "§"; +const sect$1 = "§"; +const semi = ";"; +const seswar = "⤩"; +const setminus = "∖"; +const setmn = "∖"; +const sext = "✶"; +const sfr = "𝔰"; +const sfrown = "⌢"; +const sharp = "♯"; +const shchcy = "щ"; +const shcy = "ш"; +const shortmid = "∣"; +const shortparallel = "∥"; +const sh = "­"; +const shy$1 = "­"; +const sigma = "σ"; +const sigmaf = "ς"; +const sigmav = "ς"; +const sim = "∼"; +const simdot = "⩪"; +const sime = "≃"; +const simeq = "≃"; +const simg = "⪞"; +const simgE = "⪠"; +const siml = "⪝"; +const simlE = "⪟"; +const simne = "≆"; +const simplus = "⨤"; +const simrarr = "⥲"; +const slarr = "←"; +const smallsetminus = "∖"; +const smashp = "⨳"; +const smeparsl = "⧤"; +const smid = "∣"; +const smile = "⌣"; +const smt = "⪪"; +const smte = "⪬"; +const smtes = "⪬︀"; +const softcy = "ь"; +const sol = "/"; +const solb = "⧄"; +const solbar = "⌿"; +const sopf = "𝕤"; +const spades = "♠"; +const spadesuit = "♠"; +const spar = "∥"; +const sqcap = "⊓"; +const sqcaps = "⊓︀"; +const sqcup = "⊔"; +const sqcups = "⊔︀"; +const sqsub = "⊏"; +const sqsube = "⊑"; +const sqsubset = "⊏"; +const sqsubseteq = "⊑"; +const sqsup = "⊐"; +const sqsupe = "⊒"; +const sqsupset = "⊐"; +const sqsupseteq = "⊒"; +const squ = "□"; +const square = "□"; +const squarf = "▪"; +const squf = "▪"; +const srarr = "→"; +const sscr = "𝓈"; +const ssetmn = "∖"; +const ssmile = "⌣"; +const sstarf = "⋆"; +const star$1 = "☆"; +const starf = "★"; +const straightepsilon = "ϵ"; +const straightphi = "ϕ"; +const strns = "¯"; +const sub = "⊂"; +const subE = "⫅"; +const subdot = "⪽"; +const sube = "⊆"; +const subedot = "⫃"; +const submult = "⫁"; +const subnE = "⫋"; +const subne = "⊊"; +const subplus = "⪿"; +const subrarr = "⥹"; +const subset = "⊂"; +const subseteq = "⊆"; +const subseteqq = "⫅"; +const subsetneq = "⊊"; +const subsetneqq = "⫋"; +const subsim = "⫇"; +const subsub = "⫕"; +const subsup = "⫓"; +const succ = "≻"; +const succapprox = "⪸"; +const succcurlyeq = "≽"; +const succeq = "⪰"; +const succnapprox = "⪺"; +const succneqq = "⪶"; +const succnsim = "⋩"; +const succsim = "≿"; +const sum = "∑"; +const sung = "♪"; +const sup = "⊃"; +const sup1$1 = "¹"; +const sup2$1 = "²"; +const sup3$1 = "³"; +const supE = "⫆"; +const supdot = "⪾"; +const supdsub = "⫘"; +const supe = "⊇"; +const supedot = "⫄"; +const suphsol = "⟉"; +const suphsub = "⫗"; +const suplarr = "⥻"; +const supmult = "⫂"; +const supnE = "⫌"; +const supne = "⊋"; +const supplus = "⫀"; +const supset = "⊃"; +const supseteq = "⊇"; +const supseteqq = "⫆"; +const supsetneq = "⊋"; +const supsetneqq = "⫌"; +const supsim = "⫈"; +const supsub = "⫔"; +const supsup = "⫖"; +const swArr = "⇙"; +const swarhk = "⤦"; +const swarr = "↙"; +const swarrow = "↙"; +const swnwar = "⤪"; +const szli = "ß"; +const szlig$1 = "ß"; +const target = "⌖"; +const tau = "τ"; +const tbrk = "⎴"; +const tcaron = "ť"; +const tcedil = "ţ"; +const tcy = "т"; +const tdot = "⃛"; +const telrec = "⌕"; +const tfr = "𝔱"; +const there4 = "∴"; +const therefore = "∴"; +const theta = "θ"; +const thetasym = "ϑ"; +const thetav = "ϑ"; +const thickapprox = "≈"; +const thicksim = "∼"; +const thinsp = " "; +const thkap = "≈"; +const thksim = "∼"; +const thor = "þ"; +const thorn$1 = "þ"; +const tilde = "˜"; +const time = "×"; +const times$1 = "×"; +const timesb = "⊠"; +const timesbar = "⨱"; +const timesd = "⨰"; +const tint = "∭"; +const toea = "⤨"; +const top = "⊤"; +const topbot = "⌶"; +const topcir = "⫱"; +const topf = "𝕥"; +const topfork = "⫚"; +const tosa = "⤩"; +const tprime = "‴"; +const trade = "™"; +const triangle = "▵"; +const triangledown = "▿"; +const triangleleft = "◃"; +const trianglelefteq = "⊴"; +const triangleq = "≜"; +const triangleright = "▹"; +const trianglerighteq = "⊵"; +const tridot = "◬"; +const trie = "≜"; +const triminus = "⨺"; +const triplus = "⨹"; +const trisb = "⧍"; +const tritime = "⨻"; +const trpezium = "⏢"; +const tscr = "𝓉"; +const tscy = "ц"; +const tshcy = "ћ"; +const tstrok = "ŧ"; +const twixt = "≬"; +const twoheadleftarrow = "↞"; +const twoheadrightarrow = "↠"; +const uArr = "⇑"; +const uHar = "⥣"; +const uacut = "ú"; +const uacute$1 = "ú"; +const uarr = "↑"; +const ubrcy = "ў"; +const ubreve = "ŭ"; +const ucir = "û"; +const ucirc$1 = "û"; +const ucy = "у"; +const udarr = "⇅"; +const udblac = "ű"; +const udhar = "⥮"; +const ufisht = "⥾"; +const ufr = "𝔲"; +const ugrav = "ù"; +const ugrave$1 = "ù"; +const uharl = "↿"; +const uharr = "↾"; +const uhblk = "▀"; +const ulcorn = "⌜"; +const ulcorner = "⌜"; +const ulcrop = "⌏"; +const ultri = "◸"; +const umacr = "ū"; +const um = "¨"; +const uml$1 = "¨"; +const uogon = "ų"; +const uopf = "𝕦"; +const uparrow = "↑"; +const updownarrow = "↕"; +const upharpoonleft = "↿"; +const upharpoonright = "↾"; +const uplus = "⊎"; +const upsi = "υ"; +const upsih = "ϒ"; +const upsilon = "υ"; +const upuparrows = "⇈"; +const urcorn = "⌝"; +const urcorner = "⌝"; +const urcrop = "⌎"; +const uring = "ů"; +const urtri = "◹"; +const uscr = "𝓊"; +const utdot = "⋰"; +const utilde = "ũ"; +const utri = "▵"; +const utrif = "▴"; +const uuarr = "⇈"; +const uum = "ü"; +const uuml$1 = "ü"; +const uwangle = "⦧"; +const vArr = "⇕"; +const vBar = "⫨"; +const vBarv = "⫩"; +const vDash = "⊨"; +const vangrt = "⦜"; +const varepsilon = "ϵ"; +const varkappa = "ϰ"; +const varnothing = "∅"; +const varphi = "ϕ"; +const varpi = "ϖ"; +const varpropto = "∝"; +const varr = "↕"; +const varrho = "ϱ"; +const varsigma = "ς"; +const varsubsetneq = "⊊︀"; +const varsubsetneqq = "⫋︀"; +const varsupsetneq = "⊋︀"; +const varsupsetneqq = "⫌︀"; +const vartheta = "ϑ"; +const vartriangleleft = "⊲"; +const vartriangleright = "⊳"; +const vcy = "в"; +const vdash = "⊢"; +const vee = "∨"; +const veebar = "⊻"; +const veeeq = "≚"; +const vellip = "⋮"; +const verbar = "|"; +const vert = "|"; +const vfr = "𝔳"; +const vltri = "⊲"; +const vnsub = "⊂⃒"; +const vnsup = "⊃⃒"; +const vopf = "𝕧"; +const vprop = "∝"; +const vrtri = "⊳"; +const vscr = "𝓋"; +const vsubnE = "⫋︀"; +const vsubne = "⊊︀"; +const vsupnE = "⫌︀"; +const vsupne = "⊋︀"; +const vzigzag = "⦚"; +const wcirc = "ŵ"; +const wedbar = "⩟"; +const wedge = "∧"; +const wedgeq = "≙"; +const weierp = "℘"; +const wfr = "𝔴"; +const wopf = "𝕨"; +const wp = "℘"; +const wr = "≀"; +const wreath = "≀"; +const wscr = "𝓌"; +const xcap = "⋂"; +const xcirc = "◯"; +const xcup = "⋃"; +const xdtri = "▽"; +const xfr = "𝔵"; +const xhArr = "⟺"; +const xharr = "⟷"; +const xi = "ξ"; +const xlArr = "⟸"; +const xlarr = "⟵"; +const xmap = "⟼"; +const xnis = "⋻"; +const xodot = "⨀"; +const xopf = "𝕩"; +const xoplus = "⨁"; +const xotime = "⨂"; +const xrArr = "⟹"; +const xrarr = "⟶"; +const xscr = "𝓍"; +const xsqcup = "⨆"; +const xuplus = "⨄"; +const xutri = "△"; +const xvee = "⋁"; +const xwedge = "⋀"; +const yacut = "ý"; +const yacute$1 = "ý"; +const yacy = "я"; +const ycirc = "ŷ"; +const ycy = "ы"; +const ye = "¥"; +const yen$1 = "¥"; +const yfr = "𝔶"; +const yicy = "ї"; +const yopf = "𝕪"; +const yscr = "𝓎"; +const yucy = "ю"; +const yum = "ÿ"; +const yuml$1 = "ÿ"; +const zacute = "ź"; +const zcaron = "ž"; +const zcy = "з"; +const zdot = "ż"; +const zeetrf = "ℨ"; +const zeta = "ζ"; +const zfr = "𝔷"; +const zhcy = "ж"; +const zigrarr = "⇝"; +const zopf = "𝕫"; +const zscr = "𝓏"; +const zwj = "‍"; +const zwnj = "‌"; +var index$3 = { + AEli: AEli, + AElig: AElig$1, + AM: AM, + AMP: AMP$1, + Aacut: Aacut, + Aacute: Aacute$1, + Abreve: Abreve, + Acir: Acir, + Acirc: Acirc$1, + Acy: Acy, + Afr: Afr, + Agrav: Agrav, + Agrave: Agrave$1, + Alpha: Alpha, + Amacr: Amacr, + And: And, + Aogon: Aogon, + Aopf: Aopf, + ApplyFunction: ApplyFunction, + Arin: Arin, + Aring: Aring$1, + Ascr: Ascr, + Assign: Assign, + Atild: Atild, + Atilde: Atilde$1, + Aum: Aum, + Auml: Auml$1, + Backslash: Backslash, + Barv: Barv, + Barwed: Barwed, + Bcy: Bcy, + Because: Because, + Bernoullis: Bernoullis, + Beta: Beta, + Bfr: Bfr, + Bopf: Bopf, + Breve: Breve, + Bscr: Bscr, + Bumpeq: Bumpeq, + CHcy: CHcy, + COP: COP, + COPY: COPY$1, + Cacute: Cacute, + Cap: Cap, + CapitalDifferentialD: CapitalDifferentialD, + Cayleys: Cayleys, + Ccaron: Ccaron, + Ccedi: Ccedi, + Ccedil: Ccedil$1, + Ccirc: Ccirc, + Cconint: Cconint, + Cdot: Cdot, + Cedilla: Cedilla, + CenterDot: CenterDot, + Cfr: Cfr, + Chi: Chi, + CircleDot: CircleDot, + CircleMinus: CircleMinus, + CirclePlus: CirclePlus, + CircleTimes: CircleTimes, + ClockwiseContourIntegral: ClockwiseContourIntegral, + CloseCurlyDoubleQuote: CloseCurlyDoubleQuote, + CloseCurlyQuote: CloseCurlyQuote, + Colon: Colon, + Colone: Colone, + Congruent: Congruent, + Conint: Conint, + ContourIntegral: ContourIntegral, + Copf: Copf, + Coproduct: Coproduct, + CounterClockwiseContourIntegral: CounterClockwiseContourIntegral, + Cross: Cross, + Cscr: Cscr, + Cup: Cup, + CupCap: CupCap, + DD: DD, + DDotrahd: DDotrahd, + DJcy: DJcy, + DScy: DScy, + DZcy: DZcy, + Dagger: Dagger, + Darr: Darr, + Dashv: Dashv, + Dcaron: Dcaron, + Dcy: Dcy, + Del: Del, + Delta: Delta, + Dfr: Dfr, + DiacriticalAcute: DiacriticalAcute, + DiacriticalDot: DiacriticalDot, + DiacriticalDoubleAcute: DiacriticalDoubleAcute, + DiacriticalGrave: DiacriticalGrave, + DiacriticalTilde: DiacriticalTilde, + Diamond: Diamond, + DifferentialD: DifferentialD, + Dopf: Dopf, + Dot: Dot, + DotDot: DotDot, + DotEqual: DotEqual, + DoubleContourIntegral: DoubleContourIntegral, + DoubleDot: DoubleDot, + DoubleDownArrow: DoubleDownArrow, + DoubleLeftArrow: DoubleLeftArrow, + DoubleLeftRightArrow: DoubleLeftRightArrow, + DoubleLeftTee: DoubleLeftTee, + DoubleLongLeftArrow: DoubleLongLeftArrow, + DoubleLongLeftRightArrow: DoubleLongLeftRightArrow, + DoubleLongRightArrow: DoubleLongRightArrow, + DoubleRightArrow: DoubleRightArrow, + DoubleRightTee: DoubleRightTee, + DoubleUpArrow: DoubleUpArrow, + DoubleUpDownArrow: DoubleUpDownArrow, + DoubleVerticalBar: DoubleVerticalBar, + DownArrow: DownArrow, + DownArrowBar: DownArrowBar, + DownArrowUpArrow: DownArrowUpArrow, + DownBreve: DownBreve, + DownLeftRightVector: DownLeftRightVector, + DownLeftTeeVector: DownLeftTeeVector, + DownLeftVector: DownLeftVector, + DownLeftVectorBar: DownLeftVectorBar, + DownRightTeeVector: DownRightTeeVector, + DownRightVector: DownRightVector, + DownRightVectorBar: DownRightVectorBar, + DownTee: DownTee, + DownTeeArrow: DownTeeArrow, + Downarrow: Downarrow, + Dscr: Dscr, + Dstrok: Dstrok, + ENG: ENG, + ET: ET, + ETH: ETH$1, + Eacut: Eacut, + Eacute: Eacute$1, + Ecaron: Ecaron, + Ecir: Ecir, + Ecirc: Ecirc$1, + Ecy: Ecy, + Edot: Edot, + Efr: Efr, + Egrav: Egrav, + Egrave: Egrave$1, + Element: Element, + Emacr: Emacr, + EmptySmallSquare: EmptySmallSquare, + EmptyVerySmallSquare: EmptyVerySmallSquare, + Eogon: Eogon, + Eopf: Eopf, + Epsilon: Epsilon, + Equal: Equal, + EqualTilde: EqualTilde, + Equilibrium: Equilibrium, + Escr: Escr, + Esim: Esim, + Eta: Eta, + Eum: Eum, + Euml: Euml$1, + Exists: Exists, + ExponentialE: ExponentialE, + Fcy: Fcy, + Ffr: Ffr, + FilledSmallSquare: FilledSmallSquare, + FilledVerySmallSquare: FilledVerySmallSquare, + Fopf: Fopf, + ForAll: ForAll, + Fouriertrf: Fouriertrf, + Fscr: Fscr, + GJcy: GJcy, + G: G, + GT: GT$1, + Gamma: Gamma, + Gammad: Gammad, + Gbreve: Gbreve, + Gcedil: Gcedil, + Gcirc: Gcirc, + Gcy: Gcy, + Gdot: Gdot, + Gfr: Gfr, + Gg: Gg, + Gopf: Gopf, + GreaterEqual: GreaterEqual, + GreaterEqualLess: GreaterEqualLess, + GreaterFullEqual: GreaterFullEqual, + GreaterGreater: GreaterGreater, + GreaterLess: GreaterLess, + GreaterSlantEqual: GreaterSlantEqual, + GreaterTilde: GreaterTilde, + Gscr: Gscr, + Gt: Gt, + HARDcy: HARDcy, + Hacek: Hacek, + Hat: Hat, + Hcirc: Hcirc, + Hfr: Hfr, + HilbertSpace: HilbertSpace, + Hopf: Hopf, + HorizontalLine: HorizontalLine, + Hscr: Hscr, + Hstrok: Hstrok, + HumpDownHump: HumpDownHump, + HumpEqual: HumpEqual, + IEcy: IEcy, + IJlig: IJlig, + IOcy: IOcy, + Iacut: Iacut, + Iacute: Iacute$1, + Icir: Icir, + Icirc: Icirc$1, + Icy: Icy, + Idot: Idot, + Ifr: Ifr, + Igrav: Igrav, + Igrave: Igrave$1, + Im: Im, + Imacr: Imacr, + ImaginaryI: ImaginaryI, + Implies: Implies, + Int: Int, + Integral: Integral, + Intersection: Intersection, + InvisibleComma: InvisibleComma, + InvisibleTimes: InvisibleTimes, + Iogon: Iogon, + Iopf: Iopf, + Iota: Iota, + Iscr: Iscr, + Itilde: Itilde, + Iukcy: Iukcy, + Ium: Ium, + Iuml: Iuml$1, + Jcirc: Jcirc, + Jcy: Jcy, + Jfr: Jfr, + Jopf: Jopf, + Jscr: Jscr, + Jsercy: Jsercy, + Jukcy: Jukcy, + KHcy: KHcy, + KJcy: KJcy, + Kappa: Kappa, + Kcedil: Kcedil, + Kcy: Kcy, + Kfr: Kfr, + Kopf: Kopf, + Kscr: Kscr, + LJcy: LJcy, + L: L, + LT: LT$1, + Lacute: Lacute, + Lambda: Lambda, + Lang: Lang, + Laplacetrf: Laplacetrf, + Larr: Larr, + Lcaron: Lcaron, + Lcedil: Lcedil, + Lcy: Lcy, + LeftAngleBracket: LeftAngleBracket, + LeftArrow: LeftArrow, + LeftArrowBar: LeftArrowBar, + LeftArrowRightArrow: LeftArrowRightArrow, + LeftCeiling: LeftCeiling, + LeftDoubleBracket: LeftDoubleBracket, + LeftDownTeeVector: LeftDownTeeVector, + LeftDownVector: LeftDownVector, + LeftDownVectorBar: LeftDownVectorBar, + LeftFloor: LeftFloor, + LeftRightArrow: LeftRightArrow, + LeftRightVector: LeftRightVector, + LeftTee: LeftTee, + LeftTeeArrow: LeftTeeArrow, + LeftTeeVector: LeftTeeVector, + LeftTriangle: LeftTriangle, + LeftTriangleBar: LeftTriangleBar, + LeftTriangleEqual: LeftTriangleEqual, + LeftUpDownVector: LeftUpDownVector, + LeftUpTeeVector: LeftUpTeeVector, + LeftUpVector: LeftUpVector, + LeftUpVectorBar: LeftUpVectorBar, + LeftVector: LeftVector, + LeftVectorBar: LeftVectorBar, + Leftarrow: Leftarrow, + Leftrightarrow: Leftrightarrow, + LessEqualGreater: LessEqualGreater, + LessFullEqual: LessFullEqual, + LessGreater: LessGreater, + LessLess: LessLess, + LessSlantEqual: LessSlantEqual, + LessTilde: LessTilde, + Lfr: Lfr, + Ll: Ll, + Lleftarrow: Lleftarrow, + Lmidot: Lmidot, + LongLeftArrow: LongLeftArrow, + LongLeftRightArrow: LongLeftRightArrow, + LongRightArrow: LongRightArrow, + Longleftarrow: Longleftarrow, + Longleftrightarrow: Longleftrightarrow, + Longrightarrow: Longrightarrow, + Lopf: Lopf, + LowerLeftArrow: LowerLeftArrow, + LowerRightArrow: LowerRightArrow, + Lscr: Lscr, + Lsh: Lsh, + Lstrok: Lstrok, + Lt: Lt, + "Map": "⤅", + Mcy: Mcy, + MediumSpace: MediumSpace, + Mellintrf: Mellintrf, + Mfr: Mfr, + MinusPlus: MinusPlus, + Mopf: Mopf, + Mscr: Mscr, + Mu: Mu, + NJcy: NJcy, + Nacute: Nacute, + Ncaron: Ncaron, + Ncedil: Ncedil, + Ncy: Ncy, + NegativeMediumSpace: NegativeMediumSpace, + NegativeThickSpace: NegativeThickSpace, + NegativeThinSpace: NegativeThinSpace, + NegativeVeryThinSpace: NegativeVeryThinSpace, + NestedGreaterGreater: NestedGreaterGreater, + NestedLessLess: NestedLessLess, + NewLine: NewLine, + Nfr: Nfr, + NoBreak: NoBreak, + NonBreakingSpace: NonBreakingSpace, + Nopf: Nopf, + Not: Not, + NotCongruent: NotCongruent, + NotCupCap: NotCupCap, + NotDoubleVerticalBar: NotDoubleVerticalBar, + NotElement: NotElement, + NotEqual: NotEqual, + NotEqualTilde: NotEqualTilde, + NotExists: NotExists, + NotGreater: NotGreater, + NotGreaterEqual: NotGreaterEqual, + NotGreaterFullEqual: NotGreaterFullEqual, + NotGreaterGreater: NotGreaterGreater, + NotGreaterLess: NotGreaterLess, + NotGreaterSlantEqual: NotGreaterSlantEqual, + NotGreaterTilde: NotGreaterTilde, + NotHumpDownHump: NotHumpDownHump, + NotHumpEqual: NotHumpEqual, + NotLeftTriangle: NotLeftTriangle, + NotLeftTriangleBar: NotLeftTriangleBar, + NotLeftTriangleEqual: NotLeftTriangleEqual, + NotLess: NotLess, + NotLessEqual: NotLessEqual, + NotLessGreater: NotLessGreater, + NotLessLess: NotLessLess, + NotLessSlantEqual: NotLessSlantEqual, + NotLessTilde: NotLessTilde, + NotNestedGreaterGreater: NotNestedGreaterGreater, + NotNestedLessLess: NotNestedLessLess, + NotPrecedes: NotPrecedes, + NotPrecedesEqual: NotPrecedesEqual, + NotPrecedesSlantEqual: NotPrecedesSlantEqual, + NotReverseElement: NotReverseElement, + NotRightTriangle: NotRightTriangle, + NotRightTriangleBar: NotRightTriangleBar, + NotRightTriangleEqual: NotRightTriangleEqual, + NotSquareSubset: NotSquareSubset, + NotSquareSubsetEqual: NotSquareSubsetEqual, + NotSquareSuperset: NotSquareSuperset, + NotSquareSupersetEqual: NotSquareSupersetEqual, + NotSubset: NotSubset, + NotSubsetEqual: NotSubsetEqual, + NotSucceeds: NotSucceeds, + NotSucceedsEqual: NotSucceedsEqual, + NotSucceedsSlantEqual: NotSucceedsSlantEqual, + NotSucceedsTilde: NotSucceedsTilde, + NotSuperset: NotSuperset, + NotSupersetEqual: NotSupersetEqual, + NotTilde: NotTilde, + NotTildeEqual: NotTildeEqual, + NotTildeFullEqual: NotTildeFullEqual, + NotTildeTilde: NotTildeTilde, + NotVerticalBar: NotVerticalBar, + Nscr: Nscr, + Ntild: Ntild, + Ntilde: Ntilde$1, + Nu: Nu, + OElig: OElig, + Oacut: Oacut, + Oacute: Oacute$1, + Ocir: Ocir, + Ocirc: Ocirc$1, + Ocy: Ocy, + Odblac: Odblac, + Ofr: Ofr, + Ograv: Ograv, + Ograve: Ograve$1, + Omacr: Omacr, + Omega: Omega, + Omicron: Omicron, + Oopf: Oopf, + OpenCurlyDoubleQuote: OpenCurlyDoubleQuote, + OpenCurlyQuote: OpenCurlyQuote, + Or: Or, + Oscr: Oscr, + Oslas: Oslas, + Oslash: Oslash$1, + Otild: Otild, + Otilde: Otilde$1, + Otimes: Otimes, + Oum: Oum, + Ouml: Ouml$1, + OverBar: OverBar, + OverBrace: OverBrace, + OverBracket: OverBracket, + OverParenthesis: OverParenthesis, + PartialD: PartialD, + Pcy: Pcy, + Pfr: Pfr, + Phi: Phi, + Pi: Pi, + PlusMinus: PlusMinus, + Poincareplane: Poincareplane, + Popf: Popf, + Pr: Pr, + Precedes: Precedes, + PrecedesEqual: PrecedesEqual, + PrecedesSlantEqual: PrecedesSlantEqual, + PrecedesTilde: PrecedesTilde, + Prime: Prime, + Product: Product, + Proportion: Proportion, + Proportional: Proportional, + Pscr: Pscr, + Psi: Psi, + QUO: QUO, + QUOT: QUOT$1, + Qfr: Qfr, + Qopf: Qopf, + Qscr: Qscr, + RBarr: RBarr, + RE: RE, + REG: REG$1, + Racute: Racute, + Rang: Rang, + Rarr: Rarr, + Rarrtl: Rarrtl, + Rcaron: Rcaron, + Rcedil: Rcedil, + Rcy: Rcy, + Re: Re, + ReverseElement: ReverseElement, + ReverseEquilibrium: ReverseEquilibrium, + ReverseUpEquilibrium: ReverseUpEquilibrium, + Rfr: Rfr, + Rho: Rho, + RightAngleBracket: RightAngleBracket, + RightArrow: RightArrow, + RightArrowBar: RightArrowBar, + RightArrowLeftArrow: RightArrowLeftArrow, + RightCeiling: RightCeiling, + RightDoubleBracket: RightDoubleBracket, + RightDownTeeVector: RightDownTeeVector, + RightDownVector: RightDownVector, + RightDownVectorBar: RightDownVectorBar, + RightFloor: RightFloor, + RightTee: RightTee, + RightTeeArrow: RightTeeArrow, + RightTeeVector: RightTeeVector, + RightTriangle: RightTriangle, + RightTriangleBar: RightTriangleBar, + RightTriangleEqual: RightTriangleEqual, + RightUpDownVector: RightUpDownVector, + RightUpTeeVector: RightUpTeeVector, + RightUpVector: RightUpVector, + RightUpVectorBar: RightUpVectorBar, + RightVector: RightVector, + RightVectorBar: RightVectorBar, + Rightarrow: Rightarrow, + Ropf: Ropf, + RoundImplies: RoundImplies, + Rrightarrow: Rrightarrow, + Rscr: Rscr, + Rsh: Rsh, + RuleDelayed: RuleDelayed, + SHCHcy: SHCHcy, + SHcy: SHcy, + SOFTcy: SOFTcy, + Sacute: Sacute, + Sc: Sc, + Scaron: Scaron, + Scedil: Scedil, + Scirc: Scirc, + Scy: Scy, + Sfr: Sfr, + ShortDownArrow: ShortDownArrow, + ShortLeftArrow: ShortLeftArrow, + ShortRightArrow: ShortRightArrow, + ShortUpArrow: ShortUpArrow, + Sigma: Sigma, + SmallCircle: SmallCircle, + Sopf: Sopf, + Sqrt: Sqrt, + Square: Square, + SquareIntersection: SquareIntersection, + SquareSubset: SquareSubset, + SquareSubsetEqual: SquareSubsetEqual, + SquareSuperset: SquareSuperset, + SquareSupersetEqual: SquareSupersetEqual, + SquareUnion: SquareUnion, + Sscr: Sscr, + Star: Star, + Sub: Sub, + Subset: Subset, + SubsetEqual: SubsetEqual, + Succeeds: Succeeds, + SucceedsEqual: SucceedsEqual, + SucceedsSlantEqual: SucceedsSlantEqual, + SucceedsTilde: SucceedsTilde, + SuchThat: SuchThat, + Sum: Sum, + Sup: Sup, + Superset: Superset, + SupersetEqual: SupersetEqual, + Supset: Supset, + THOR: THOR, + THORN: THORN$1, + TRADE: TRADE, + TSHcy: TSHcy, + TScy: TScy, + Tab: Tab, + Tau: Tau, + Tcaron: Tcaron, + Tcedil: Tcedil, + Tcy: Tcy, + Tfr: Tfr, + Therefore: Therefore, + Theta: Theta, + ThickSpace: ThickSpace, + ThinSpace: ThinSpace, + Tilde: Tilde, + TildeEqual: TildeEqual, + TildeFullEqual: TildeFullEqual, + TildeTilde: TildeTilde, + Topf: Topf, + TripleDot: TripleDot, + Tscr: Tscr, + Tstrok: Tstrok, + Uacut: Uacut, + Uacute: Uacute$1, + Uarr: Uarr, + Uarrocir: Uarrocir, + Ubrcy: Ubrcy, + Ubreve: Ubreve, + Ucir: Ucir, + Ucirc: Ucirc$1, + Ucy: Ucy, + Udblac: Udblac, + Ufr: Ufr, + Ugrav: Ugrav, + Ugrave: Ugrave$1, + Umacr: Umacr, + UnderBar: UnderBar, + UnderBrace: UnderBrace, + UnderBracket: UnderBracket, + UnderParenthesis: UnderParenthesis, + Union: Union, + UnionPlus: UnionPlus, + Uogon: Uogon, + Uopf: Uopf, + UpArrow: UpArrow, + UpArrowBar: UpArrowBar, + UpArrowDownArrow: UpArrowDownArrow, + UpDownArrow: UpDownArrow, + UpEquilibrium: UpEquilibrium, + UpTee: UpTee, + UpTeeArrow: UpTeeArrow, + Uparrow: Uparrow, + Updownarrow: Updownarrow, + UpperLeftArrow: UpperLeftArrow, + UpperRightArrow: UpperRightArrow, + Upsi: Upsi, + Upsilon: Upsilon, + Uring: Uring, + Uscr: Uscr, + Utilde: Utilde, + Uum: Uum, + Uuml: Uuml$1, + VDash: VDash, + Vbar: Vbar, + Vcy: Vcy, + Vdash: Vdash, + Vdashl: Vdashl, + Vee: Vee, + Verbar: Verbar, + Vert: Vert, + VerticalBar: VerticalBar, + VerticalLine: VerticalLine, + VerticalSeparator: VerticalSeparator, + VerticalTilde: VerticalTilde, + VeryThinSpace: VeryThinSpace, + Vfr: Vfr, + Vopf: Vopf, + Vscr: Vscr, + Vvdash: Vvdash, + Wcirc: Wcirc, + Wedge: Wedge, + Wfr: Wfr, + Wopf: Wopf, + Wscr: Wscr, + Xfr: Xfr, + Xi: Xi, + Xopf: Xopf, + Xscr: Xscr, + YAcy: YAcy, + YIcy: YIcy, + YUcy: YUcy, + Yacut: Yacut, + Yacute: Yacute$1, + Ycirc: Ycirc, + Ycy: Ycy, + Yfr: Yfr, + Yopf: Yopf, + Yscr: Yscr, + Yuml: Yuml, + ZHcy: ZHcy, + Zacute: Zacute, + Zcaron: Zcaron, + Zcy: Zcy, + Zdot: Zdot, + ZeroWidthSpace: ZeroWidthSpace, + Zeta: Zeta, + Zfr: Zfr, + Zopf: Zopf, + Zscr: Zscr, + aacut: aacut, + aacute: aacute$1, + abreve: abreve, + ac: ac, + acE: acE, + acd: acd, + acir: acir, + acirc: acirc$1, + acut: acut, + acute: acute$1, + acy: acy, + aeli: aeli, + aelig: aelig$1, + af: af, + afr: afr, + agrav: agrav, + agrave: agrave$1, + alefsym: alefsym, + aleph: aleph, + alpha: alpha, + amacr: amacr, + amalg: amalg, + am: am, + amp: amp$1, + and: and, + andand: andand, + andd: andd, + andslope: andslope, + andv: andv, + ang: ang, + ange: ange, + angle: angle, + angmsd: angmsd, + angmsdaa: angmsdaa, + angmsdab: angmsdab, + angmsdac: angmsdac, + angmsdad: angmsdad, + angmsdae: angmsdae, + angmsdaf: angmsdaf, + angmsdag: angmsdag, + angmsdah: angmsdah, + angrt: angrt, + angrtvb: angrtvb, + angrtvbd: angrtvbd, + angsph: angsph, + angst: angst, + angzarr: angzarr, + aogon: aogon, + aopf: aopf, + ap: ap, + apE: apE, + apacir: apacir, + ape: ape, + apid: apid, + apos: apos, + approx: approx, + approxeq: approxeq, + arin: arin, + aring: aring$1, + ascr: ascr, + ast: ast, + asymp: asymp, + asympeq: asympeq, + atild: atild, + atilde: atilde$1, + aum: aum, + auml: auml$1, + awconint: awconint, + awint: awint, + bNot: bNot, + backcong: backcong, + backepsilon: backepsilon, + backprime: backprime, + backsim: backsim, + backsimeq: backsimeq, + barvee: barvee, + barwed: barwed, + barwedge: barwedge, + bbrk: bbrk, + bbrktbrk: bbrktbrk, + bcong: bcong, + bcy: bcy, + bdquo: bdquo, + becaus: becaus, + because: because, + bemptyv: bemptyv, + bepsi: bepsi, + bernou: bernou, + beta: beta, + beth: beth, + between: between, + bfr: bfr, + bigcap: bigcap, + bigcirc: bigcirc, + bigcup: bigcup, + bigodot: bigodot, + bigoplus: bigoplus, + bigotimes: bigotimes, + bigsqcup: bigsqcup, + bigstar: bigstar, + bigtriangledown: bigtriangledown, + bigtriangleup: bigtriangleup, + biguplus: biguplus, + bigvee: bigvee, + bigwedge: bigwedge, + bkarow: bkarow, + blacklozenge: blacklozenge, + blacksquare: blacksquare, + blacktriangle: blacktriangle, + blacktriangledown: blacktriangledown, + blacktriangleleft: blacktriangleleft, + blacktriangleright: blacktriangleright, + blank: blank, + blk12: blk12, + blk14: blk14, + blk34: blk34, + block: block, + bne: bne, + bnequiv: bnequiv, + bnot: bnot, + bopf: bopf, + bot: bot, + bottom: bottom, + bowtie: bowtie, + boxDL: boxDL, + boxDR: boxDR, + boxDl: boxDl, + boxDr: boxDr, + boxH: boxH, + boxHD: boxHD, + boxHU: boxHU, + boxHd: boxHd, + boxHu: boxHu, + boxUL: boxUL, + boxUR: boxUR, + boxUl: boxUl, + boxUr: boxUr, + boxV: boxV, + boxVH: boxVH, + boxVL: boxVL, + boxVR: boxVR, + boxVh: boxVh, + boxVl: boxVl, + boxVr: boxVr, + boxbox: boxbox, + boxdL: boxdL, + boxdR: boxdR, + boxdl: boxdl, + boxdr: boxdr, + boxh: boxh, + boxhD: boxhD, + boxhU: boxhU, + boxhd: boxhd, + boxhu: boxhu, + boxminus: boxminus, + boxplus: boxplus, + boxtimes: boxtimes, + boxuL: boxuL, + boxuR: boxuR, + boxul: boxul, + boxur: boxur, + boxv: boxv, + boxvH: boxvH, + boxvL: boxvL, + boxvR: boxvR, + boxvh: boxvh, + boxvl: boxvl, + boxvr: boxvr, + bprime: bprime, + breve: breve, + brvba: brvba, + brvbar: brvbar$1, + bscr: bscr, + bsemi: bsemi, + bsim: bsim, + bsime: bsime, + bsol: bsol, + bsolb: bsolb, + bsolhsub: bsolhsub, + bull: bull, + bullet: bullet, + bump: bump, + bumpE: bumpE, + bumpe: bumpe, + bumpeq: bumpeq, + cacute: cacute, + cap: cap, + capand: capand, + capbrcup: capbrcup, + capcap: capcap, + capcup: capcup, + capdot: capdot, + caps: caps, + caret: caret, + caron: caron, + ccaps: ccaps, + ccaron: ccaron, + ccedi: ccedi, + ccedil: ccedil$1, + ccirc: ccirc, + ccups: ccups, + ccupssm: ccupssm, + cdot: cdot, + cedi: cedi, + cedil: cedil$1, + cemptyv: cemptyv, + cen: cen, + cent: cent$1, + centerdot: centerdot, + cfr: cfr, + chcy: chcy, + check: check$2, + checkmark: checkmark, + chi: chi, + cir: cir, + cirE: cirE, + circ: circ, + circeq: circeq, + circlearrowleft: circlearrowleft, + circlearrowright: circlearrowright, + circledR: circledR, + circledS: circledS, + circledast: circledast, + circledcirc: circledcirc, + circleddash: circleddash, + cire: cire, + cirfnint: cirfnint, + cirmid: cirmid, + cirscir: cirscir, + clubs: clubs, + clubsuit: clubsuit, + colon: colon, + colone: colone, + coloneq: coloneq, + comma: comma, + commat: commat, + comp: comp, + compfn: compfn, + complement: complement, + complexes: complexes, + cong: cong, + congdot: congdot, + conint: conint, + copf: copf, + coprod: coprod, + cop: cop, + copy: copy$2, + copysr: copysr, + crarr: crarr, + cross: cross, + cscr: cscr, + csub: csub, + csube: csube, + csup: csup, + csupe: csupe, + ctdot: ctdot, + cudarrl: cudarrl, + cudarrr: cudarrr, + cuepr: cuepr, + cuesc: cuesc, + cularr: cularr, + cularrp: cularrp, + cup: cup, + cupbrcap: cupbrcap, + cupcap: cupcap, + cupcup: cupcup, + cupdot: cupdot, + cupor: cupor, + cups: cups, + curarr: curarr, + curarrm: curarrm, + curlyeqprec: curlyeqprec, + curlyeqsucc: curlyeqsucc, + curlyvee: curlyvee, + curlywedge: curlywedge, + curre: curre, + curren: curren$1, + curvearrowleft: curvearrowleft, + curvearrowright: curvearrowright, + cuvee: cuvee, + cuwed: cuwed, + cwconint: cwconint, + cwint: cwint, + cylcty: cylcty, + dArr: dArr, + dHar: dHar, + dagger: dagger, + daleth: daleth, + darr: darr, + dash: dash, + dashv: dashv, + dbkarow: dbkarow, + dblac: dblac, + dcaron: dcaron, + dcy: dcy, + dd: dd, + ddagger: ddagger, + ddarr: ddarr, + ddotseq: ddotseq, + de: de, + deg: deg$1, + delta: delta, + demptyv: demptyv, + dfisht: dfisht, + dfr: dfr, + dharl: dharl, + dharr: dharr, + diam: diam, + diamond: diamond, + diamondsuit: diamondsuit, + diams: diams, + die: die, + digamma: digamma, + disin: disin, + div: div, + divid: divid, + divide: divide$1, + divideontimes: divideontimes, + divonx: divonx, + djcy: djcy, + dlcorn: dlcorn, + dlcrop: dlcrop, + dollar: dollar, + dopf: dopf, + dot: dot, + doteq: doteq, + doteqdot: doteqdot, + dotminus: dotminus, + dotplus: dotplus, + dotsquare: dotsquare, + doublebarwedge: doublebarwedge, + downarrow: downarrow, + downdownarrows: downdownarrows, + downharpoonleft: downharpoonleft, + downharpoonright: downharpoonright, + drbkarow: drbkarow, + drcorn: drcorn, + drcrop: drcrop, + dscr: dscr, + dscy: dscy, + dsol: dsol, + dstrok: dstrok, + dtdot: dtdot, + dtri: dtri, + dtrif: dtrif, + duarr: duarr, + duhar: duhar, + dwangle: dwangle, + dzcy: dzcy, + dzigrarr: dzigrarr, + eDDot: eDDot, + eDot: eDot, + eacut: eacut, + eacute: eacute$1, + easter: easter, + ecaron: ecaron, + ecir: ecir, + ecirc: ecirc$1, + ecolon: ecolon, + ecy: ecy, + edot: edot, + ee: ee, + efDot: efDot, + efr: efr, + eg: eg, + egrav: egrav, + egrave: egrave$1, + egs: egs, + egsdot: egsdot, + el: el, + elinters: elinters, + ell: ell, + els: els, + elsdot: elsdot, + emacr: emacr, + empty: empty, + emptyset: emptyset, + emptyv: emptyv, + emsp13: emsp13, + emsp14: emsp14, + emsp: emsp, + eng: eng, + ensp: ensp, + eogon: eogon, + eopf: eopf, + epar: epar, + eparsl: eparsl, + eplus: eplus, + epsi: epsi, + epsilon: epsilon, + epsiv: epsiv, + eqcirc: eqcirc, + eqcolon: eqcolon, + eqsim: eqsim, + eqslantgtr: eqslantgtr, + eqslantless: eqslantless, + equals: equals, + equest: equest, + equiv: equiv, + equivDD: equivDD, + eqvparsl: eqvparsl, + erDot: erDot, + erarr: erarr, + escr: escr, + esdot: esdot, + esim: esim, + eta: eta, + et: et, + eth: eth$1, + eum: eum, + euml: euml$1, + euro: euro, + excl: excl, + exist: exist, + expectation: expectation, + exponentiale: exponentiale, + fallingdotseq: fallingdotseq, + fcy: fcy, + female: female, + ffilig: ffilig, + fflig: fflig, + ffllig: ffllig, + ffr: ffr, + filig: filig, + fjlig: fjlig, + flat: flat, + fllig: fllig, + fltns: fltns, + fnof: fnof, + fopf: fopf, + forall: forall, + fork: fork, + forkv: forkv, + fpartint: fpartint, + frac1: frac1, + frac12: frac12$1, + frac13: frac13, + frac14: frac14$1, + frac15: frac15, + frac16: frac16, + frac18: frac18, + frac23: frac23, + frac25: frac25, + frac3: frac3, + frac34: frac34$1, + frac35: frac35, + frac38: frac38, + frac45: frac45, + frac56: frac56, + frac58: frac58, + frac78: frac78, + frasl: frasl, + frown: frown, + fscr: fscr, + gE: gE, + gEl: gEl, + gacute: gacute, + gamma: gamma, + gammad: gammad, + gap: gap, + gbreve: gbreve, + gcirc: gcirc, + gcy: gcy, + gdot: gdot, + ge: ge, + gel: gel, + geq: geq, + geqq: geqq, + geqslant: geqslant, + ges: ges, + gescc: gescc, + gesdot: gesdot, + gesdoto: gesdoto, + gesdotol: gesdotol, + gesl: gesl, + gesles: gesles, + gfr: gfr, + gg: gg, + ggg: ggg, + gimel: gimel, + gjcy: gjcy, + gl: gl, + glE: glE, + gla: gla, + glj: glj, + gnE: gnE, + gnap: gnap, + gnapprox: gnapprox, + gne: gne, + gneq: gneq, + gneqq: gneqq, + gnsim: gnsim, + gopf: gopf, + grave: grave, + gscr: gscr, + gsim: gsim, + gsime: gsime, + gsiml: gsiml, + g: g, + gt: gt$1, + gtcc: gtcc, + gtcir: gtcir, + gtdot: gtdot, + gtlPar: gtlPar, + gtquest: gtquest, + gtrapprox: gtrapprox, + gtrarr: gtrarr, + gtrdot: gtrdot, + gtreqless: gtreqless, + gtreqqless: gtreqqless, + gtrless: gtrless, + gtrsim: gtrsim, + gvertneqq: gvertneqq, + gvnE: gvnE, + hArr: hArr, + hairsp: hairsp, + half: half, + hamilt: hamilt, + hardcy: hardcy, + harr: harr, + harrcir: harrcir, + harrw: harrw, + hbar: hbar, + hcirc: hcirc, + hearts: hearts, + heartsuit: heartsuit, + hellip: hellip, + hercon: hercon, + hfr: hfr, + hksearow: hksearow, + hkswarow: hkswarow, + hoarr: hoarr, + homtht: homtht, + hookleftarrow: hookleftarrow, + hookrightarrow: hookrightarrow, + hopf: hopf, + horbar: horbar, + hscr: hscr, + hslash: hslash, + hstrok: hstrok, + hybull: hybull, + hyphen: hyphen, + iacut: iacut, + iacute: iacute$1, + ic: ic, + icir: icir, + icirc: icirc$1, + icy: icy, + iecy: iecy, + iexc: iexc, + iexcl: iexcl$1, + iff: iff, + ifr: ifr, + igrav: igrav, + igrave: igrave$1, + ii: ii, + iiiint: iiiint, + iiint: iiint, + iinfin: iinfin, + iiota: iiota, + ijlig: ijlig, + imacr: imacr, + image: image, + imagline: imagline, + imagpart: imagpart, + imath: imath, + imof: imof, + imped: imped, + "in": "∈", + incare: incare, + infin: infin, + infintie: infintie, + inodot: inodot, + int: int, + intcal: intcal, + integers: integers, + intercal: intercal, + intlarhk: intlarhk, + intprod: intprod, + iocy: iocy, + iogon: iogon, + iopf: iopf, + iota: iota, + iprod: iprod, + iques: iques, + iquest: iquest$1, + iscr: iscr, + isin: isin, + isinE: isinE, + isindot: isindot, + isins: isins, + isinsv: isinsv, + isinv: isinv, + it: it, + itilde: itilde, + iukcy: iukcy, + ium: ium, + iuml: iuml$1, + jcirc: jcirc, + jcy: jcy, + jfr: jfr, + jmath: jmath, + jopf: jopf, + jscr: jscr, + jsercy: jsercy, + jukcy: jukcy, + kappa: kappa, + kappav: kappav, + kcedil: kcedil, + kcy: kcy, + kfr: kfr, + kgreen: kgreen, + khcy: khcy, + kjcy: kjcy, + kopf: kopf, + kscr: kscr, + lAarr: lAarr, + lArr: lArr, + lAtail: lAtail, + lBarr: lBarr, + lE: lE, + lEg: lEg, + lHar: lHar, + lacute: lacute, + laemptyv: laemptyv, + lagran: lagran, + lambda: lambda, + lang: lang, + langd: langd, + langle: langle, + lap: lap, + laqu: laqu, + laquo: laquo$1, + larr: larr, + larrb: larrb, + larrbfs: larrbfs, + larrfs: larrfs, + larrhk: larrhk, + larrlp: larrlp, + larrpl: larrpl, + larrsim: larrsim, + larrtl: larrtl, + lat: lat, + latail: latail, + late: late, + lates: lates, + lbarr: lbarr, + lbbrk: lbbrk, + lbrace: lbrace, + lbrack: lbrack, + lbrke: lbrke, + lbrksld: lbrksld, + lbrkslu: lbrkslu, + lcaron: lcaron, + lcedil: lcedil, + lceil: lceil, + lcub: lcub, + lcy: lcy, + ldca: ldca, + ldquo: ldquo, + ldquor: ldquor, + ldrdhar: ldrdhar, + ldrushar: ldrushar, + ldsh: ldsh, + le: le, + leftarrow: leftarrow, + leftarrowtail: leftarrowtail, + leftharpoondown: leftharpoondown, + leftharpoonup: leftharpoonup, + leftleftarrows: leftleftarrows, + leftrightarrow: leftrightarrow, + leftrightarrows: leftrightarrows, + leftrightharpoons: leftrightharpoons, + leftrightsquigarrow: leftrightsquigarrow, + leftthreetimes: leftthreetimes, + leg: leg, + leq: leq, + leqq: leqq, + leqslant: leqslant, + les: les, + lescc: lescc, + lesdot: lesdot, + lesdoto: lesdoto, + lesdotor: lesdotor, + lesg: lesg, + lesges: lesges, + lessapprox: lessapprox, + lessdot: lessdot, + lesseqgtr: lesseqgtr, + lesseqqgtr: lesseqqgtr, + lessgtr: lessgtr, + lesssim: lesssim, + lfisht: lfisht, + lfloor: lfloor, + lfr: lfr, + lg: lg, + lgE: lgE, + lhard: lhard, + lharu: lharu, + lharul: lharul, + lhblk: lhblk, + ljcy: ljcy, + ll: ll, + llarr: llarr, + llcorner: llcorner, + llhard: llhard, + lltri: lltri, + lmidot: lmidot, + lmoust: lmoust, + lmoustache: lmoustache, + lnE: lnE, + lnap: lnap, + lnapprox: lnapprox, + lne: lne, + lneq: lneq, + lneqq: lneqq, + lnsim: lnsim, + loang: loang, + loarr: loarr, + lobrk: lobrk, + longleftarrow: longleftarrow, + longleftrightarrow: longleftrightarrow, + longmapsto: longmapsto, + longrightarrow: longrightarrow, + looparrowleft: looparrowleft, + looparrowright: looparrowright, + lopar: lopar, + lopf: lopf, + loplus: loplus, + lotimes: lotimes, + lowast: lowast, + lowbar: lowbar, + loz: loz, + lozenge: lozenge, + lozf: lozf, + lpar: lpar, + lparlt: lparlt, + lrarr: lrarr, + lrcorner: lrcorner, + lrhar: lrhar, + lrhard: lrhard, + lrm: lrm, + lrtri: lrtri, + lsaquo: lsaquo, + lscr: lscr, + lsh: lsh, + lsim: lsim, + lsime: lsime, + lsimg: lsimg, + lsqb: lsqb, + lsquo: lsquo, + lsquor: lsquor, + lstrok: lstrok, + l: l, + lt: lt$1, + ltcc: ltcc, + ltcir: ltcir, + ltdot: ltdot, + lthree: lthree, + ltimes: ltimes, + ltlarr: ltlarr, + ltquest: ltquest, + ltrPar: ltrPar, + ltri: ltri, + ltrie: ltrie, + ltrif: ltrif, + lurdshar: lurdshar, + luruhar: luruhar, + lvertneqq: lvertneqq, + lvnE: lvnE, + mDDot: mDDot, + mac: mac, + macr: macr$1, + male: male, + malt: malt, + maltese: maltese, + map: map$2, + mapsto: mapsto, + mapstodown: mapstodown, + mapstoleft: mapstoleft, + mapstoup: mapstoup, + marker: marker, + mcomma: mcomma, + mcy: mcy, + mdash: mdash, + measuredangle: measuredangle, + mfr: mfr, + mho: mho, + micr: micr, + micro: micro$1, + mid: mid, + midast: midast, + midcir: midcir, + middo: middo, + middot: middot$1, + minus: minus, + minusb: minusb, + minusd: minusd, + minusdu: minusdu, + mlcp: mlcp, + mldr: mldr, + mnplus: mnplus, + models: models$1, + mopf: mopf, + mp: mp, + mscr: mscr, + mstpos: mstpos, + mu: mu, + multimap: multimap, + mumap: mumap, + nGg: nGg, + nGt: nGt, + nGtv: nGtv, + nLeftarrow: nLeftarrow, + nLeftrightarrow: nLeftrightarrow, + nLl: nLl, + nLt: nLt, + nLtv: nLtv, + nRightarrow: nRightarrow, + nVDash: nVDash, + nVdash: nVdash, + nabla: nabla, + nacute: nacute, + nang: nang, + nap: nap, + napE: napE, + napid: napid, + napos: napos, + napprox: napprox, + natur: natur, + natural: natural, + naturals: naturals, + nbs: nbs, + nbsp: nbsp$1, + nbump: nbump, + nbumpe: nbumpe, + ncap: ncap, + ncaron: ncaron, + ncedil: ncedil, + ncong: ncong, + ncongdot: ncongdot, + ncup: ncup, + ncy: ncy, + ndash: ndash, + ne: ne, + neArr: neArr, + nearhk: nearhk, + nearr: nearr, + nearrow: nearrow, + nedot: nedot, + nequiv: nequiv, + nesear: nesear, + nesim: nesim, + nexist: nexist, + nexists: nexists, + nfr: nfr, + ngE: ngE, + nge: nge, + ngeq: ngeq, + ngeqq: ngeqq, + ngeqslant: ngeqslant, + nges: nges, + ngsim: ngsim, + ngt: ngt, + ngtr: ngtr, + nhArr: nhArr, + nharr: nharr, + nhpar: nhpar, + ni: ni, + nis: nis, + nisd: nisd, + niv: niv, + njcy: njcy, + nlArr: nlArr, + nlE: nlE, + nlarr: nlarr, + nldr: nldr, + nle: nle, + nleftarrow: nleftarrow, + nleftrightarrow: nleftrightarrow, + nleq: nleq, + nleqq: nleqq, + nleqslant: nleqslant, + nles: nles, + nless: nless, + nlsim: nlsim, + nlt: nlt, + nltri: nltri, + nltrie: nltrie, + nmid: nmid, + nopf: nopf, + no: no, + not: not$1, + notin: notin, + notinE: notinE, + notindot: notindot, + notinva: notinva, + notinvb: notinvb, + notinvc: notinvc, + notni: notni, + notniva: notniva, + notnivb: notnivb, + notnivc: notnivc, + npar: npar, + nparallel: nparallel, + nparsl: nparsl, + npart: npart, + npolint: npolint, + npr: npr, + nprcue: nprcue, + npre: npre, + nprec: nprec, + npreceq: npreceq, + nrArr: nrArr, + nrarr: nrarr, + nrarrc: nrarrc, + nrarrw: nrarrw, + nrightarrow: nrightarrow, + nrtri: nrtri, + nrtrie: nrtrie, + nsc: nsc, + nsccue: nsccue, + nsce: nsce, + nscr: nscr, + nshortmid: nshortmid, + nshortparallel: nshortparallel, + nsim: nsim, + nsime: nsime, + nsimeq: nsimeq, + nsmid: nsmid, + nspar: nspar, + nsqsube: nsqsube, + nsqsupe: nsqsupe, + nsub: nsub, + nsubE: nsubE, + nsube: nsube, + nsubset: nsubset, + nsubseteq: nsubseteq, + nsubseteqq: nsubseteqq, + nsucc: nsucc, + nsucceq: nsucceq, + nsup: nsup, + nsupE: nsupE, + nsupe: nsupe, + nsupset: nsupset, + nsupseteq: nsupseteq, + nsupseteqq: nsupseteqq, + ntgl: ntgl, + ntild: ntild, + ntilde: ntilde$1, + ntlg: ntlg, + ntriangleleft: ntriangleleft, + ntrianglelefteq: ntrianglelefteq, + ntriangleright: ntriangleright, + ntrianglerighteq: ntrianglerighteq, + nu: nu, + num: num, + numero: numero, + numsp: numsp, + nvDash: nvDash, + nvHarr: nvHarr, + nvap: nvap, + nvdash: nvdash, + nvge: nvge, + nvgt: nvgt, + nvinfin: nvinfin, + nvlArr: nvlArr, + nvle: nvle, + nvlt: nvlt, + nvltrie: nvltrie, + nvrArr: nvrArr, + nvrtrie: nvrtrie, + nvsim: nvsim, + nwArr: nwArr, + nwarhk: nwarhk, + nwarr: nwarr, + nwarrow: nwarrow, + nwnear: nwnear, + oS: oS, + oacut: oacut, + oacute: oacute$1, + oast: oast, + ocir: ocir, + ocirc: ocirc$1, + ocy: ocy, + odash: odash, + odblac: odblac, + odiv: odiv, + odot: odot, + odsold: odsold, + oelig: oelig, + ofcir: ofcir, + ofr: ofr, + ogon: ogon, + ograv: ograv, + ograve: ograve$1, + ogt: ogt, + ohbar: ohbar, + ohm: ohm, + oint: oint, + olarr: olarr, + olcir: olcir, + olcross: olcross, + oline: oline, + olt: olt, + omacr: omacr, + omega: omega, + omicron: omicron, + omid: omid, + ominus: ominus, + oopf: oopf, + opar: opar, + operp: operp, + oplus: oplus, + or: or, + orarr: orarr, + ord: ord, + order: order$1, + orderof: orderof, + ordf: ordf$1, + ordm: ordm$1, + origof: origof, + oror: oror, + orslope: orslope, + orv: orv, + oscr: oscr, + oslas: oslas, + oslash: oslash$1, + osol: osol, + otild: otild, + otilde: otilde$1, + otimes: otimes, + otimesas: otimesas, + oum: oum, + ouml: ouml$1, + ovbar: ovbar, + par: par, + para: para$1, + parallel: parallel, + parsim: parsim, + parsl: parsl, + part: part, + pcy: pcy, + percnt: percnt, + period: period, + permil: permil, + perp: perp, + pertenk: pertenk, + pfr: pfr, + phi: phi, + phiv: phiv, + phmmat: phmmat, + phone: phone, + pi: pi, + pitchfork: pitchfork, + piv: piv, + planck: planck, + planckh: planckh, + plankv: plankv, + plus: plus, + plusacir: plusacir, + plusb: plusb, + pluscir: pluscir, + plusdo: plusdo, + plusdu: plusdu, + pluse: pluse, + plusm: plusm, + plusmn: plusmn$1, + plussim: plussim, + plustwo: plustwo, + pm: pm, + pointint: pointint, + popf: popf, + poun: poun, + pound: pound$1, + pr: pr, + prE: prE, + prap: prap, + prcue: prcue, + pre: pre, + prec: prec, + precapprox: precapprox, + preccurlyeq: preccurlyeq, + preceq: preceq, + precnapprox: precnapprox, + precneqq: precneqq, + precnsim: precnsim, + precsim: precsim, + prime: prime, + primes: primes, + prnE: prnE, + prnap: prnap, + prnsim: prnsim, + prod: prod, + profalar: profalar, + profline: profline, + profsurf: profsurf, + prop: prop, + propto: propto, + prsim: prsim, + prurel: prurel, + pscr: pscr, + psi: psi, + puncsp: puncsp, + qfr: qfr, + qint: qint, + qopf: qopf, + qprime: qprime, + qscr: qscr, + quaternions: quaternions, + quatint: quatint, + quest: quest, + questeq: questeq, + quo: quo, + quot: quot$1, + rAarr: rAarr, + rArr: rArr, + rAtail: rAtail, + rBarr: rBarr, + rHar: rHar, + race: race, + racute: racute, + radic: radic, + raemptyv: raemptyv, + rang: rang, + rangd: rangd, + range: range$1, + rangle: rangle, + raqu: raqu, + raquo: raquo$1, + rarr: rarr, + rarrap: rarrap, + rarrb: rarrb, + rarrbfs: rarrbfs, + rarrc: rarrc, + rarrfs: rarrfs, + rarrhk: rarrhk, + rarrlp: rarrlp, + rarrpl: rarrpl, + rarrsim: rarrsim, + rarrtl: rarrtl, + rarrw: rarrw, + ratail: ratail, + ratio: ratio, + rationals: rationals, + rbarr: rbarr, + rbbrk: rbbrk, + rbrace: rbrace, + rbrack: rbrack, + rbrke: rbrke, + rbrksld: rbrksld, + rbrkslu: rbrkslu, + rcaron: rcaron, + rcedil: rcedil, + rceil: rceil, + rcub: rcub, + rcy: rcy, + rdca: rdca, + rdldhar: rdldhar, + rdquo: rdquo, + rdquor: rdquor, + rdsh: rdsh, + real: real, + realine: realine, + realpart: realpart, + reals: reals, + rect: rect, + re: re, + reg: reg$1, + rfisht: rfisht, + rfloor: rfloor, + rfr: rfr, + rhard: rhard, + rharu: rharu, + rharul: rharul, + rho: rho, + rhov: rhov, + rightarrow: rightarrow, + rightarrowtail: rightarrowtail, + rightharpoondown: rightharpoondown, + rightharpoonup: rightharpoonup, + rightleftarrows: rightleftarrows, + rightleftharpoons: rightleftharpoons, + rightrightarrows: rightrightarrows, + rightsquigarrow: rightsquigarrow, + rightthreetimes: rightthreetimes, + ring: ring, + risingdotseq: risingdotseq, + rlarr: rlarr, + rlhar: rlhar, + rlm: rlm, + rmoust: rmoust, + rmoustache: rmoustache, + rnmid: rnmid, + roang: roang, + roarr: roarr, + robrk: robrk, + ropar: ropar, + ropf: ropf, + roplus: roplus, + rotimes: rotimes, + rpar: rpar, + rpargt: rpargt, + rppolint: rppolint, + rrarr: rrarr, + rsaquo: rsaquo, + rscr: rscr, + rsh: rsh, + rsqb: rsqb, + rsquo: rsquo, + rsquor: rsquor, + rthree: rthree, + rtimes: rtimes, + rtri: rtri, + rtrie: rtrie, + rtrif: rtrif, + rtriltri: rtriltri, + ruluhar: ruluhar, + rx: rx, + sacute: sacute, + sbquo: sbquo, + sc: sc, + scE: scE, + scap: scap, + scaron: scaron, + sccue: sccue, + sce: sce, + scedil: scedil, + scirc: scirc, + scnE: scnE, + scnap: scnap, + scnsim: scnsim, + scpolint: scpolint, + scsim: scsim, + scy: scy, + sdot: sdot, + sdotb: sdotb, + sdote: sdote, + seArr: seArr, + searhk: searhk, + searr: searr, + searrow: searrow, + sec: sec, + sect: sect$1, + semi: semi, + seswar: seswar, + setminus: setminus, + setmn: setmn, + sext: sext, + sfr: sfr, + sfrown: sfrown, + sharp: sharp, + shchcy: shchcy, + shcy: shcy, + shortmid: shortmid, + shortparallel: shortparallel, + sh: sh, + shy: shy$1, + sigma: sigma, + sigmaf: sigmaf, + sigmav: sigmav, + sim: sim, + simdot: simdot, + sime: sime, + simeq: simeq, + simg: simg, + simgE: simgE, + siml: siml, + simlE: simlE, + simne: simne, + simplus: simplus, + simrarr: simrarr, + slarr: slarr, + smallsetminus: smallsetminus, + smashp: smashp, + smeparsl: smeparsl, + smid: smid, + smile: smile, + smt: smt, + smte: smte, + smtes: smtes, + softcy: softcy, + sol: sol, + solb: solb, + solbar: solbar, + sopf: sopf, + spades: spades, + spadesuit: spadesuit, + spar: spar, + sqcap: sqcap, + sqcaps: sqcaps, + sqcup: sqcup, + sqcups: sqcups, + sqsub: sqsub, + sqsube: sqsube, + sqsubset: sqsubset, + sqsubseteq: sqsubseteq, + sqsup: sqsup, + sqsupe: sqsupe, + sqsupset: sqsupset, + sqsupseteq: sqsupseteq, + squ: squ, + square: square, + squarf: squarf, + squf: squf, + srarr: srarr, + sscr: sscr, + ssetmn: ssetmn, + ssmile: ssmile, + sstarf: sstarf, + star: star$1, + starf: starf, + straightepsilon: straightepsilon, + straightphi: straightphi, + strns: strns, + sub: sub, + subE: subE, + subdot: subdot, + sube: sube, + subedot: subedot, + submult: submult, + subnE: subnE, + subne: subne, + subplus: subplus, + subrarr: subrarr, + subset: subset, + subseteq: subseteq, + subseteqq: subseteqq, + subsetneq: subsetneq, + subsetneqq: subsetneqq, + subsim: subsim, + subsub: subsub, + subsup: subsup, + succ: succ, + succapprox: succapprox, + succcurlyeq: succcurlyeq, + succeq: succeq, + succnapprox: succnapprox, + succneqq: succneqq, + succnsim: succnsim, + succsim: succsim, + sum: sum, + sung: sung, + sup: sup, + sup1: sup1$1, + sup2: sup2$1, + sup3: sup3$1, + supE: supE, + supdot: supdot, + supdsub: supdsub, + supe: supe, + supedot: supedot, + suphsol: suphsol, + suphsub: suphsub, + suplarr: suplarr, + supmult: supmult, + supnE: supnE, + supne: supne, + supplus: supplus, + supset: supset, + supseteq: supseteq, + supseteqq: supseteqq, + supsetneq: supsetneq, + supsetneqq: supsetneqq, + supsim: supsim, + supsub: supsub, + supsup: supsup, + swArr: swArr, + swarhk: swarhk, + swarr: swarr, + swarrow: swarrow, + swnwar: swnwar, + szli: szli, + szlig: szlig$1, + target: target, + tau: tau, + tbrk: tbrk, + tcaron: tcaron, + tcedil: tcedil, + tcy: tcy, + tdot: tdot, + telrec: telrec, + tfr: tfr, + there4: there4, + therefore: therefore, + theta: theta, + thetasym: thetasym, + thetav: thetav, + thickapprox: thickapprox, + thicksim: thicksim, + thinsp: thinsp, + thkap: thkap, + thksim: thksim, + thor: thor, + thorn: thorn$1, + tilde: tilde, + time: time, + times: times$1, + timesb: timesb, + timesbar: timesbar, + timesd: timesd, + tint: tint, + toea: toea, + top: top, + topbot: topbot, + topcir: topcir, + topf: topf, + topfork: topfork, + tosa: tosa, + tprime: tprime, + trade: trade, + triangle: triangle, + triangledown: triangledown, + triangleleft: triangleleft, + trianglelefteq: trianglelefteq, + triangleq: triangleq, + triangleright: triangleright, + trianglerighteq: trianglerighteq, + tridot: tridot, + trie: trie, + triminus: triminus, + triplus: triplus, + trisb: trisb, + tritime: tritime, + trpezium: trpezium, + tscr: tscr, + tscy: tscy, + tshcy: tshcy, + tstrok: tstrok, + twixt: twixt, + twoheadleftarrow: twoheadleftarrow, + twoheadrightarrow: twoheadrightarrow, + uArr: uArr, + uHar: uHar, + uacut: uacut, + uacute: uacute$1, + uarr: uarr, + ubrcy: ubrcy, + ubreve: ubreve, + ucir: ucir, + ucirc: ucirc$1, + ucy: ucy, + udarr: udarr, + udblac: udblac, + udhar: udhar, + ufisht: ufisht, + ufr: ufr, + ugrav: ugrav, + ugrave: ugrave$1, + uharl: uharl, + uharr: uharr, + uhblk: uhblk, + ulcorn: ulcorn, + ulcorner: ulcorner, + ulcrop: ulcrop, + ultri: ultri, + umacr: umacr, + um: um, + uml: uml$1, + uogon: uogon, + uopf: uopf, + uparrow: uparrow, + updownarrow: updownarrow, + upharpoonleft: upharpoonleft, + upharpoonright: upharpoonright, + uplus: uplus, + upsi: upsi, + upsih: upsih, + upsilon: upsilon, + upuparrows: upuparrows, + urcorn: urcorn, + urcorner: urcorner, + urcrop: urcrop, + uring: uring, + urtri: urtri, + uscr: uscr, + utdot: utdot, + utilde: utilde, + utri: utri, + utrif: utrif, + uuarr: uuarr, + uum: uum, + uuml: uuml$1, + uwangle: uwangle, + vArr: vArr, + vBar: vBar, + vBarv: vBarv, + vDash: vDash, + vangrt: vangrt, + varepsilon: varepsilon, + varkappa: varkappa, + varnothing: varnothing, + varphi: varphi, + varpi: varpi, + varpropto: varpropto, + varr: varr, + varrho: varrho, + varsigma: varsigma, + varsubsetneq: varsubsetneq, + varsubsetneqq: varsubsetneqq, + varsupsetneq: varsupsetneq, + varsupsetneqq: varsupsetneqq, + vartheta: vartheta, + vartriangleleft: vartriangleleft, + vartriangleright: vartriangleright, + vcy: vcy, + vdash: vdash, + vee: vee, + veebar: veebar, + veeeq: veeeq, + vellip: vellip, + verbar: verbar, + vert: vert, + vfr: vfr, + vltri: vltri, + vnsub: vnsub, + vnsup: vnsup, + vopf: vopf, + vprop: vprop, + vrtri: vrtri, + vscr: vscr, + vsubnE: vsubnE, + vsubne: vsubne, + vsupnE: vsupnE, + vsupne: vsupne, + vzigzag: vzigzag, + wcirc: wcirc, + wedbar: wedbar, + wedge: wedge, + wedgeq: wedgeq, + weierp: weierp, + wfr: wfr, + wopf: wopf, + wp: wp, + wr: wr, + wreath: wreath, + wscr: wscr, + xcap: xcap, + xcirc: xcirc, + xcup: xcup, + xdtri: xdtri, + xfr: xfr, + xhArr: xhArr, + xharr: xharr, + xi: xi, + xlArr: xlArr, + xlarr: xlarr, + xmap: xmap, + xnis: xnis, + xodot: xodot, + xopf: xopf, + xoplus: xoplus, + xotime: xotime, + xrArr: xrArr, + xrarr: xrarr, + xscr: xscr, + xsqcup: xsqcup, + xuplus: xuplus, + xutri: xutri, + xvee: xvee, + xwedge: xwedge, + yacut: yacut, + yacute: yacute$1, + yacy: yacy, + ycirc: ycirc, + ycy: ycy, + ye: ye, + yen: yen$1, + yfr: yfr, + yicy: yicy, + yopf: yopf, + yscr: yscr, + yucy: yucy, + yum: yum, + yuml: yuml$1, + zacute: zacute, + zcaron: zcaron, + zcy: zcy, + zdot: zdot, + zeetrf: zeetrf, + zeta: zeta, + zfr: zfr, + zhcy: zhcy, + zigrarr: zigrarr, + zopf: zopf, + zscr: zscr, + zwj: zwj, + zwnj: zwnj +}; + +var characterEntities = /*#__PURE__*/Object.freeze({ + __proto__: null, + AEli: AEli, + AElig: AElig$1, + AM: AM, + AMP: AMP$1, + Aacut: Aacut, + Aacute: Aacute$1, + Abreve: Abreve, + Acir: Acir, + Acirc: Acirc$1, + Acy: Acy, + Afr: Afr, + Agrav: Agrav, + Agrave: Agrave$1, + Alpha: Alpha, + Amacr: Amacr, + And: And, + Aogon: Aogon, + Aopf: Aopf, + ApplyFunction: ApplyFunction, + Arin: Arin, + Aring: Aring$1, + Ascr: Ascr, + Assign: Assign, + Atild: Atild, + Atilde: Atilde$1, + Aum: Aum, + Auml: Auml$1, + Backslash: Backslash, + Barv: Barv, + Barwed: Barwed, + Bcy: Bcy, + Because: Because, + Bernoullis: Bernoullis, + Beta: Beta, + Bfr: Bfr, + Bopf: Bopf, + Breve: Breve, + Bscr: Bscr, + Bumpeq: Bumpeq, + CHcy: CHcy, + COP: COP, + COPY: COPY$1, + Cacute: Cacute, + Cap: Cap, + CapitalDifferentialD: CapitalDifferentialD, + Cayleys: Cayleys, + Ccaron: Ccaron, + Ccedi: Ccedi, + Ccedil: Ccedil$1, + Ccirc: Ccirc, + Cconint: Cconint, + Cdot: Cdot, + Cedilla: Cedilla, + CenterDot: CenterDot, + Cfr: Cfr, + Chi: Chi, + CircleDot: CircleDot, + CircleMinus: CircleMinus, + CirclePlus: CirclePlus, + CircleTimes: CircleTimes, + ClockwiseContourIntegral: ClockwiseContourIntegral, + CloseCurlyDoubleQuote: CloseCurlyDoubleQuote, + CloseCurlyQuote: CloseCurlyQuote, + Colon: Colon, + Colone: Colone, + Congruent: Congruent, + Conint: Conint, + ContourIntegral: ContourIntegral, + Copf: Copf, + Coproduct: Coproduct, + CounterClockwiseContourIntegral: CounterClockwiseContourIntegral, + Cross: Cross, + Cscr: Cscr, + Cup: Cup, + CupCap: CupCap, + DD: DD, + DDotrahd: DDotrahd, + DJcy: DJcy, + DScy: DScy, + DZcy: DZcy, + Dagger: Dagger, + Darr: Darr, + Dashv: Dashv, + Dcaron: Dcaron, + Dcy: Dcy, + Del: Del, + Delta: Delta, + Dfr: Dfr, + DiacriticalAcute: DiacriticalAcute, + DiacriticalDot: DiacriticalDot, + DiacriticalDoubleAcute: DiacriticalDoubleAcute, + DiacriticalGrave: DiacriticalGrave, + DiacriticalTilde: DiacriticalTilde, + Diamond: Diamond, + DifferentialD: DifferentialD, + Dopf: Dopf, + Dot: Dot, + DotDot: DotDot, + DotEqual: DotEqual, + DoubleContourIntegral: DoubleContourIntegral, + DoubleDot: DoubleDot, + DoubleDownArrow: DoubleDownArrow, + DoubleLeftArrow: DoubleLeftArrow, + DoubleLeftRightArrow: DoubleLeftRightArrow, + DoubleLeftTee: DoubleLeftTee, + DoubleLongLeftArrow: DoubleLongLeftArrow, + DoubleLongLeftRightArrow: DoubleLongLeftRightArrow, + DoubleLongRightArrow: DoubleLongRightArrow, + DoubleRightArrow: DoubleRightArrow, + DoubleRightTee: DoubleRightTee, + DoubleUpArrow: DoubleUpArrow, + DoubleUpDownArrow: DoubleUpDownArrow, + DoubleVerticalBar: DoubleVerticalBar, + DownArrow: DownArrow, + DownArrowBar: DownArrowBar, + DownArrowUpArrow: DownArrowUpArrow, + DownBreve: DownBreve, + DownLeftRightVector: DownLeftRightVector, + DownLeftTeeVector: DownLeftTeeVector, + DownLeftVector: DownLeftVector, + DownLeftVectorBar: DownLeftVectorBar, + DownRightTeeVector: DownRightTeeVector, + DownRightVector: DownRightVector, + DownRightVectorBar: DownRightVectorBar, + DownTee: DownTee, + DownTeeArrow: DownTeeArrow, + Downarrow: Downarrow, + Dscr: Dscr, + Dstrok: Dstrok, + ENG: ENG, + ET: ET, + ETH: ETH$1, + Eacut: Eacut, + Eacute: Eacute$1, + Ecaron: Ecaron, + Ecir: Ecir, + Ecirc: Ecirc$1, + Ecy: Ecy, + Edot: Edot, + Efr: Efr, + Egrav: Egrav, + Egrave: Egrave$1, + Element: Element, + Emacr: Emacr, + EmptySmallSquare: EmptySmallSquare, + EmptyVerySmallSquare: EmptyVerySmallSquare, + Eogon: Eogon, + Eopf: Eopf, + Epsilon: Epsilon, + Equal: Equal, + EqualTilde: EqualTilde, + Equilibrium: Equilibrium, + Escr: Escr, + Esim: Esim, + Eta: Eta, + Eum: Eum, + Euml: Euml$1, + Exists: Exists, + ExponentialE: ExponentialE, + Fcy: Fcy, + Ffr: Ffr, + FilledSmallSquare: FilledSmallSquare, + FilledVerySmallSquare: FilledVerySmallSquare, + Fopf: Fopf, + ForAll: ForAll, + Fouriertrf: Fouriertrf, + Fscr: Fscr, + GJcy: GJcy, + G: G, + GT: GT$1, + Gamma: Gamma, + Gammad: Gammad, + Gbreve: Gbreve, + Gcedil: Gcedil, + Gcirc: Gcirc, + Gcy: Gcy, + Gdot: Gdot, + Gfr: Gfr, + Gg: Gg, + Gopf: Gopf, + GreaterEqual: GreaterEqual, + GreaterEqualLess: GreaterEqualLess, + GreaterFullEqual: GreaterFullEqual, + GreaterGreater: GreaterGreater, + GreaterLess: GreaterLess, + GreaterSlantEqual: GreaterSlantEqual, + GreaterTilde: GreaterTilde, + Gscr: Gscr, + Gt: Gt, + HARDcy: HARDcy, + Hacek: Hacek, + Hat: Hat, + Hcirc: Hcirc, + Hfr: Hfr, + HilbertSpace: HilbertSpace, + Hopf: Hopf, + HorizontalLine: HorizontalLine, + Hscr: Hscr, + Hstrok: Hstrok, + HumpDownHump: HumpDownHump, + HumpEqual: HumpEqual, + IEcy: IEcy, + IJlig: IJlig, + IOcy: IOcy, + Iacut: Iacut, + Iacute: Iacute$1, + Icir: Icir, + Icirc: Icirc$1, + Icy: Icy, + Idot: Idot, + Ifr: Ifr, + Igrav: Igrav, + Igrave: Igrave$1, + Im: Im, + Imacr: Imacr, + ImaginaryI: ImaginaryI, + Implies: Implies, + Int: Int, + Integral: Integral, + Intersection: Intersection, + InvisibleComma: InvisibleComma, + InvisibleTimes: InvisibleTimes, + Iogon: Iogon, + Iopf: Iopf, + Iota: Iota, + Iscr: Iscr, + Itilde: Itilde, + Iukcy: Iukcy, + Ium: Ium, + Iuml: Iuml$1, + Jcirc: Jcirc, + Jcy: Jcy, + Jfr: Jfr, + Jopf: Jopf, + Jscr: Jscr, + Jsercy: Jsercy, + Jukcy: Jukcy, + KHcy: KHcy, + KJcy: KJcy, + Kappa: Kappa, + Kcedil: Kcedil, + Kcy: Kcy, + Kfr: Kfr, + Kopf: Kopf, + Kscr: Kscr, + LJcy: LJcy, + L: L, + LT: LT$1, + Lacute: Lacute, + Lambda: Lambda, + Lang: Lang, + Laplacetrf: Laplacetrf, + Larr: Larr, + Lcaron: Lcaron, + Lcedil: Lcedil, + Lcy: Lcy, + LeftAngleBracket: LeftAngleBracket, + LeftArrow: LeftArrow, + LeftArrowBar: LeftArrowBar, + LeftArrowRightArrow: LeftArrowRightArrow, + LeftCeiling: LeftCeiling, + LeftDoubleBracket: LeftDoubleBracket, + LeftDownTeeVector: LeftDownTeeVector, + LeftDownVector: LeftDownVector, + LeftDownVectorBar: LeftDownVectorBar, + LeftFloor: LeftFloor, + LeftRightArrow: LeftRightArrow, + LeftRightVector: LeftRightVector, + LeftTee: LeftTee, + LeftTeeArrow: LeftTeeArrow, + LeftTeeVector: LeftTeeVector, + LeftTriangle: LeftTriangle, + LeftTriangleBar: LeftTriangleBar, + LeftTriangleEqual: LeftTriangleEqual, + LeftUpDownVector: LeftUpDownVector, + LeftUpTeeVector: LeftUpTeeVector, + LeftUpVector: LeftUpVector, + LeftUpVectorBar: LeftUpVectorBar, + LeftVector: LeftVector, + LeftVectorBar: LeftVectorBar, + Leftarrow: Leftarrow, + Leftrightarrow: Leftrightarrow, + LessEqualGreater: LessEqualGreater, + LessFullEqual: LessFullEqual, + LessGreater: LessGreater, + LessLess: LessLess, + LessSlantEqual: LessSlantEqual, + LessTilde: LessTilde, + Lfr: Lfr, + Ll: Ll, + Lleftarrow: Lleftarrow, + Lmidot: Lmidot, + LongLeftArrow: LongLeftArrow, + LongLeftRightArrow: LongLeftRightArrow, + LongRightArrow: LongRightArrow, + Longleftarrow: Longleftarrow, + Longleftrightarrow: Longleftrightarrow, + Longrightarrow: Longrightarrow, + Lopf: Lopf, + LowerLeftArrow: LowerLeftArrow, + LowerRightArrow: LowerRightArrow, + Lscr: Lscr, + Lsh: Lsh, + Lstrok: Lstrok, + Lt: Lt, + Mcy: Mcy, + MediumSpace: MediumSpace, + Mellintrf: Mellintrf, + Mfr: Mfr, + MinusPlus: MinusPlus, + Mopf: Mopf, + Mscr: Mscr, + Mu: Mu, + NJcy: NJcy, + Nacute: Nacute, + Ncaron: Ncaron, + Ncedil: Ncedil, + Ncy: Ncy, + NegativeMediumSpace: NegativeMediumSpace, + NegativeThickSpace: NegativeThickSpace, + NegativeThinSpace: NegativeThinSpace, + NegativeVeryThinSpace: NegativeVeryThinSpace, + NestedGreaterGreater: NestedGreaterGreater, + NestedLessLess: NestedLessLess, + NewLine: NewLine, + Nfr: Nfr, + NoBreak: NoBreak, + NonBreakingSpace: NonBreakingSpace, + Nopf: Nopf, + Not: Not, + NotCongruent: NotCongruent, + NotCupCap: NotCupCap, + NotDoubleVerticalBar: NotDoubleVerticalBar, + NotElement: NotElement, + NotEqual: NotEqual, + NotEqualTilde: NotEqualTilde, + NotExists: NotExists, + NotGreater: NotGreater, + NotGreaterEqual: NotGreaterEqual, + NotGreaterFullEqual: NotGreaterFullEqual, + NotGreaterGreater: NotGreaterGreater, + NotGreaterLess: NotGreaterLess, + NotGreaterSlantEqual: NotGreaterSlantEqual, + NotGreaterTilde: NotGreaterTilde, + NotHumpDownHump: NotHumpDownHump, + NotHumpEqual: NotHumpEqual, + NotLeftTriangle: NotLeftTriangle, + NotLeftTriangleBar: NotLeftTriangleBar, + NotLeftTriangleEqual: NotLeftTriangleEqual, + NotLess: NotLess, + NotLessEqual: NotLessEqual, + NotLessGreater: NotLessGreater, + NotLessLess: NotLessLess, + NotLessSlantEqual: NotLessSlantEqual, + NotLessTilde: NotLessTilde, + NotNestedGreaterGreater: NotNestedGreaterGreater, + NotNestedLessLess: NotNestedLessLess, + NotPrecedes: NotPrecedes, + NotPrecedesEqual: NotPrecedesEqual, + NotPrecedesSlantEqual: NotPrecedesSlantEqual, + NotReverseElement: NotReverseElement, + NotRightTriangle: NotRightTriangle, + NotRightTriangleBar: NotRightTriangleBar, + NotRightTriangleEqual: NotRightTriangleEqual, + NotSquareSubset: NotSquareSubset, + NotSquareSubsetEqual: NotSquareSubsetEqual, + NotSquareSuperset: NotSquareSuperset, + NotSquareSupersetEqual: NotSquareSupersetEqual, + NotSubset: NotSubset, + NotSubsetEqual: NotSubsetEqual, + NotSucceeds: NotSucceeds, + NotSucceedsEqual: NotSucceedsEqual, + NotSucceedsSlantEqual: NotSucceedsSlantEqual, + NotSucceedsTilde: NotSucceedsTilde, + NotSuperset: NotSuperset, + NotSupersetEqual: NotSupersetEqual, + NotTilde: NotTilde, + NotTildeEqual: NotTildeEqual, + NotTildeFullEqual: NotTildeFullEqual, + NotTildeTilde: NotTildeTilde, + NotVerticalBar: NotVerticalBar, + Nscr: Nscr, + Ntild: Ntild, + Ntilde: Ntilde$1, + Nu: Nu, + OElig: OElig, + Oacut: Oacut, + Oacute: Oacute$1, + Ocir: Ocir, + Ocirc: Ocirc$1, + Ocy: Ocy, + Odblac: Odblac, + Ofr: Ofr, + Ograv: Ograv, + Ograve: Ograve$1, + Omacr: Omacr, + Omega: Omega, + Omicron: Omicron, + Oopf: Oopf, + OpenCurlyDoubleQuote: OpenCurlyDoubleQuote, + OpenCurlyQuote: OpenCurlyQuote, + Or: Or, + Oscr: Oscr, + Oslas: Oslas, + Oslash: Oslash$1, + Otild: Otild, + Otilde: Otilde$1, + Otimes: Otimes, + Oum: Oum, + Ouml: Ouml$1, + OverBar: OverBar, + OverBrace: OverBrace, + OverBracket: OverBracket, + OverParenthesis: OverParenthesis, + PartialD: PartialD, + Pcy: Pcy, + Pfr: Pfr, + Phi: Phi, + Pi: Pi, + PlusMinus: PlusMinus, + Poincareplane: Poincareplane, + Popf: Popf, + Pr: Pr, + Precedes: Precedes, + PrecedesEqual: PrecedesEqual, + PrecedesSlantEqual: PrecedesSlantEqual, + PrecedesTilde: PrecedesTilde, + Prime: Prime, + Product: Product, + Proportion: Proportion, + Proportional: Proportional, + Pscr: Pscr, + Psi: Psi, + QUO: QUO, + QUOT: QUOT$1, + Qfr: Qfr, + Qopf: Qopf, + Qscr: Qscr, + RBarr: RBarr, + RE: RE, + REG: REG$1, + Racute: Racute, + Rang: Rang, + Rarr: Rarr, + Rarrtl: Rarrtl, + Rcaron: Rcaron, + Rcedil: Rcedil, + Rcy: Rcy, + Re: Re, + ReverseElement: ReverseElement, + ReverseEquilibrium: ReverseEquilibrium, + ReverseUpEquilibrium: ReverseUpEquilibrium, + Rfr: Rfr, + Rho: Rho, + RightAngleBracket: RightAngleBracket, + RightArrow: RightArrow, + RightArrowBar: RightArrowBar, + RightArrowLeftArrow: RightArrowLeftArrow, + RightCeiling: RightCeiling, + RightDoubleBracket: RightDoubleBracket, + RightDownTeeVector: RightDownTeeVector, + RightDownVector: RightDownVector, + RightDownVectorBar: RightDownVectorBar, + RightFloor: RightFloor, + RightTee: RightTee, + RightTeeArrow: RightTeeArrow, + RightTeeVector: RightTeeVector, + RightTriangle: RightTriangle, + RightTriangleBar: RightTriangleBar, + RightTriangleEqual: RightTriangleEqual, + RightUpDownVector: RightUpDownVector, + RightUpTeeVector: RightUpTeeVector, + RightUpVector: RightUpVector, + RightUpVectorBar: RightUpVectorBar, + RightVector: RightVector, + RightVectorBar: RightVectorBar, + Rightarrow: Rightarrow, + Ropf: Ropf, + RoundImplies: RoundImplies, + Rrightarrow: Rrightarrow, + Rscr: Rscr, + Rsh: Rsh, + RuleDelayed: RuleDelayed, + SHCHcy: SHCHcy, + SHcy: SHcy, + SOFTcy: SOFTcy, + Sacute: Sacute, + Sc: Sc, + Scaron: Scaron, + Scedil: Scedil, + Scirc: Scirc, + Scy: Scy, + Sfr: Sfr, + ShortDownArrow: ShortDownArrow, + ShortLeftArrow: ShortLeftArrow, + ShortRightArrow: ShortRightArrow, + ShortUpArrow: ShortUpArrow, + Sigma: Sigma, + SmallCircle: SmallCircle, + Sopf: Sopf, + Sqrt: Sqrt, + Square: Square, + SquareIntersection: SquareIntersection, + SquareSubset: SquareSubset, + SquareSubsetEqual: SquareSubsetEqual, + SquareSuperset: SquareSuperset, + SquareSupersetEqual: SquareSupersetEqual, + SquareUnion: SquareUnion, + Sscr: Sscr, + Star: Star, + Sub: Sub, + Subset: Subset, + SubsetEqual: SubsetEqual, + Succeeds: Succeeds, + SucceedsEqual: SucceedsEqual, + SucceedsSlantEqual: SucceedsSlantEqual, + SucceedsTilde: SucceedsTilde, + SuchThat: SuchThat, + Sum: Sum, + Sup: Sup, + Superset: Superset, + SupersetEqual: SupersetEqual, + Supset: Supset, + THOR: THOR, + THORN: THORN$1, + TRADE: TRADE, + TSHcy: TSHcy, + TScy: TScy, + Tab: Tab, + Tau: Tau, + Tcaron: Tcaron, + Tcedil: Tcedil, + Tcy: Tcy, + Tfr: Tfr, + Therefore: Therefore, + Theta: Theta, + ThickSpace: ThickSpace, + ThinSpace: ThinSpace, + Tilde: Tilde, + TildeEqual: TildeEqual, + TildeFullEqual: TildeFullEqual, + TildeTilde: TildeTilde, + Topf: Topf, + TripleDot: TripleDot, + Tscr: Tscr, + Tstrok: Tstrok, + Uacut: Uacut, + Uacute: Uacute$1, + Uarr: Uarr, + Uarrocir: Uarrocir, + Ubrcy: Ubrcy, + Ubreve: Ubreve, + Ucir: Ucir, + Ucirc: Ucirc$1, + Ucy: Ucy, + Udblac: Udblac, + Ufr: Ufr, + Ugrav: Ugrav, + Ugrave: Ugrave$1, + Umacr: Umacr, + UnderBar: UnderBar, + UnderBrace: UnderBrace, + UnderBracket: UnderBracket, + UnderParenthesis: UnderParenthesis, + Union: Union, + UnionPlus: UnionPlus, + Uogon: Uogon, + Uopf: Uopf, + UpArrow: UpArrow, + UpArrowBar: UpArrowBar, + UpArrowDownArrow: UpArrowDownArrow, + UpDownArrow: UpDownArrow, + UpEquilibrium: UpEquilibrium, + UpTee: UpTee, + UpTeeArrow: UpTeeArrow, + Uparrow: Uparrow, + Updownarrow: Updownarrow, + UpperLeftArrow: UpperLeftArrow, + UpperRightArrow: UpperRightArrow, + Upsi: Upsi, + Upsilon: Upsilon, + Uring: Uring, + Uscr: Uscr, + Utilde: Utilde, + Uum: Uum, + Uuml: Uuml$1, + VDash: VDash, + Vbar: Vbar, + Vcy: Vcy, + Vdash: Vdash, + Vdashl: Vdashl, + Vee: Vee, + Verbar: Verbar, + Vert: Vert, + VerticalBar: VerticalBar, + VerticalLine: VerticalLine, + VerticalSeparator: VerticalSeparator, + VerticalTilde: VerticalTilde, + VeryThinSpace: VeryThinSpace, + Vfr: Vfr, + Vopf: Vopf, + Vscr: Vscr, + Vvdash: Vvdash, + Wcirc: Wcirc, + Wedge: Wedge, + Wfr: Wfr, + Wopf: Wopf, + Wscr: Wscr, + Xfr: Xfr, + Xi: Xi, + Xopf: Xopf, + Xscr: Xscr, + YAcy: YAcy, + YIcy: YIcy, + YUcy: YUcy, + Yacut: Yacut, + Yacute: Yacute$1, + Ycirc: Ycirc, + Ycy: Ycy, + Yfr: Yfr, + Yopf: Yopf, + Yscr: Yscr, + Yuml: Yuml, + ZHcy: ZHcy, + Zacute: Zacute, + Zcaron: Zcaron, + Zcy: Zcy, + Zdot: Zdot, + ZeroWidthSpace: ZeroWidthSpace, + Zeta: Zeta, + Zfr: Zfr, + Zopf: Zopf, + Zscr: Zscr, + aacut: aacut, + aacute: aacute$1, + abreve: abreve, + ac: ac, + acE: acE, + acd: acd, + acir: acir, + acirc: acirc$1, + acut: acut, + acute: acute$1, + acy: acy, + aeli: aeli, + aelig: aelig$1, + af: af, + afr: afr, + agrav: agrav, + agrave: agrave$1, + alefsym: alefsym, + aleph: aleph, + alpha: alpha, + amacr: amacr, + amalg: amalg, + am: am, + amp: amp$1, + and: and, + andand: andand, + andd: andd, + andslope: andslope, + andv: andv, + ang: ang, + ange: ange, + angle: angle, + angmsd: angmsd, + angmsdaa: angmsdaa, + angmsdab: angmsdab, + angmsdac: angmsdac, + angmsdad: angmsdad, + angmsdae: angmsdae, + angmsdaf: angmsdaf, + angmsdag: angmsdag, + angmsdah: angmsdah, + angrt: angrt, + angrtvb: angrtvb, + angrtvbd: angrtvbd, + angsph: angsph, + angst: angst, + angzarr: angzarr, + aogon: aogon, + aopf: aopf, + ap: ap, + apE: apE, + apacir: apacir, + ape: ape, + apid: apid, + apos: apos, + approx: approx, + approxeq: approxeq, + arin: arin, + aring: aring$1, + ascr: ascr, + ast: ast, + asymp: asymp, + asympeq: asympeq, + atild: atild, + atilde: atilde$1, + aum: aum, + auml: auml$1, + awconint: awconint, + awint: awint, + bNot: bNot, + backcong: backcong, + backepsilon: backepsilon, + backprime: backprime, + backsim: backsim, + backsimeq: backsimeq, + barvee: barvee, + barwed: barwed, + barwedge: barwedge, + bbrk: bbrk, + bbrktbrk: bbrktbrk, + bcong: bcong, + bcy: bcy, + bdquo: bdquo, + becaus: becaus, + because: because, + bemptyv: bemptyv, + bepsi: bepsi, + bernou: bernou, + beta: beta, + beth: beth, + between: between, + bfr: bfr, + bigcap: bigcap, + bigcirc: bigcirc, + bigcup: bigcup, + bigodot: bigodot, + bigoplus: bigoplus, + bigotimes: bigotimes, + bigsqcup: bigsqcup, + bigstar: bigstar, + bigtriangledown: bigtriangledown, + bigtriangleup: bigtriangleup, + biguplus: biguplus, + bigvee: bigvee, + bigwedge: bigwedge, + bkarow: bkarow, + blacklozenge: blacklozenge, + blacksquare: blacksquare, + blacktriangle: blacktriangle, + blacktriangledown: blacktriangledown, + blacktriangleleft: blacktriangleleft, + blacktriangleright: blacktriangleright, + blank: blank, + blk12: blk12, + blk14: blk14, + blk34: blk34, + block: block, + bne: bne, + bnequiv: bnequiv, + bnot: bnot, + bopf: bopf, + bot: bot, + bottom: bottom, + bowtie: bowtie, + boxDL: boxDL, + boxDR: boxDR, + boxDl: boxDl, + boxDr: boxDr, + boxH: boxH, + boxHD: boxHD, + boxHU: boxHU, + boxHd: boxHd, + boxHu: boxHu, + boxUL: boxUL, + boxUR: boxUR, + boxUl: boxUl, + boxUr: boxUr, + boxV: boxV, + boxVH: boxVH, + boxVL: boxVL, + boxVR: boxVR, + boxVh: boxVh, + boxVl: boxVl, + boxVr: boxVr, + boxbox: boxbox, + boxdL: boxdL, + boxdR: boxdR, + boxdl: boxdl, + boxdr: boxdr, + boxh: boxh, + boxhD: boxhD, + boxhU: boxhU, + boxhd: boxhd, + boxhu: boxhu, + boxminus: boxminus, + boxplus: boxplus, + boxtimes: boxtimes, + boxuL: boxuL, + boxuR: boxuR, + boxul: boxul, + boxur: boxur, + boxv: boxv, + boxvH: boxvH, + boxvL: boxvL, + boxvR: boxvR, + boxvh: boxvh, + boxvl: boxvl, + boxvr: boxvr, + bprime: bprime, + breve: breve, + brvba: brvba, + brvbar: brvbar$1, + bscr: bscr, + bsemi: bsemi, + bsim: bsim, + bsime: bsime, + bsol: bsol, + bsolb: bsolb, + bsolhsub: bsolhsub, + bull: bull, + bullet: bullet, + bump: bump, + bumpE: bumpE, + bumpe: bumpe, + bumpeq: bumpeq, + cacute: cacute, + cap: cap, + capand: capand, + capbrcup: capbrcup, + capcap: capcap, + capcup: capcup, + capdot: capdot, + caps: caps, + caret: caret, + caron: caron, + ccaps: ccaps, + ccaron: ccaron, + ccedi: ccedi, + ccedil: ccedil$1, + ccirc: ccirc, + ccups: ccups, + ccupssm: ccupssm, + cdot: cdot, + cedi: cedi, + cedil: cedil$1, + cemptyv: cemptyv, + cen: cen, + cent: cent$1, + centerdot: centerdot, + cfr: cfr, + chcy: chcy, + check: check$2, + checkmark: checkmark, + chi: chi, + cir: cir, + cirE: cirE, + circ: circ, + circeq: circeq, + circlearrowleft: circlearrowleft, + circlearrowright: circlearrowright, + circledR: circledR, + circledS: circledS, + circledast: circledast, + circledcirc: circledcirc, + circleddash: circleddash, + cire: cire, + cirfnint: cirfnint, + cirmid: cirmid, + cirscir: cirscir, + clubs: clubs, + clubsuit: clubsuit, + colon: colon, + colone: colone, + coloneq: coloneq, + comma: comma, + commat: commat, + comp: comp, + compfn: compfn, + complement: complement, + complexes: complexes, + cong: cong, + congdot: congdot, + conint: conint, + copf: copf, + coprod: coprod, + cop: cop, + copy: copy$2, + copysr: copysr, + crarr: crarr, + cross: cross, + cscr: cscr, + csub: csub, + csube: csube, + csup: csup, + csupe: csupe, + ctdot: ctdot, + cudarrl: cudarrl, + cudarrr: cudarrr, + cuepr: cuepr, + cuesc: cuesc, + cularr: cularr, + cularrp: cularrp, + cup: cup, + cupbrcap: cupbrcap, + cupcap: cupcap, + cupcup: cupcup, + cupdot: cupdot, + cupor: cupor, + cups: cups, + curarr: curarr, + curarrm: curarrm, + curlyeqprec: curlyeqprec, + curlyeqsucc: curlyeqsucc, + curlyvee: curlyvee, + curlywedge: curlywedge, + curre: curre, + curren: curren$1, + curvearrowleft: curvearrowleft, + curvearrowright: curvearrowright, + cuvee: cuvee, + cuwed: cuwed, + cwconint: cwconint, + cwint: cwint, + cylcty: cylcty, + dArr: dArr, + dHar: dHar, + dagger: dagger, + daleth: daleth, + darr: darr, + dash: dash, + dashv: dashv, + dbkarow: dbkarow, + dblac: dblac, + dcaron: dcaron, + dcy: dcy, + dd: dd, + ddagger: ddagger, + ddarr: ddarr, + ddotseq: ddotseq, + de: de, + deg: deg$1, + delta: delta, + demptyv: demptyv, + dfisht: dfisht, + dfr: dfr, + dharl: dharl, + dharr: dharr, + diam: diam, + diamond: diamond, + diamondsuit: diamondsuit, + diams: diams, + die: die, + digamma: digamma, + disin: disin, + div: div, + divid: divid, + divide: divide$1, + divideontimes: divideontimes, + divonx: divonx, + djcy: djcy, + dlcorn: dlcorn, + dlcrop: dlcrop, + dollar: dollar, + dopf: dopf, + dot: dot, + doteq: doteq, + doteqdot: doteqdot, + dotminus: dotminus, + dotplus: dotplus, + dotsquare: dotsquare, + doublebarwedge: doublebarwedge, + downarrow: downarrow, + downdownarrows: downdownarrows, + downharpoonleft: downharpoonleft, + downharpoonright: downharpoonright, + drbkarow: drbkarow, + drcorn: drcorn, + drcrop: drcrop, + dscr: dscr, + dscy: dscy, + dsol: dsol, + dstrok: dstrok, + dtdot: dtdot, + dtri: dtri, + dtrif: dtrif, + duarr: duarr, + duhar: duhar, + dwangle: dwangle, + dzcy: dzcy, + dzigrarr: dzigrarr, + eDDot: eDDot, + eDot: eDot, + eacut: eacut, + eacute: eacute$1, + easter: easter, + ecaron: ecaron, + ecir: ecir, + ecirc: ecirc$1, + ecolon: ecolon, + ecy: ecy, + edot: edot, + ee: ee, + efDot: efDot, + efr: efr, + eg: eg, + egrav: egrav, + egrave: egrave$1, + egs: egs, + egsdot: egsdot, + el: el, + elinters: elinters, + ell: ell, + els: els, + elsdot: elsdot, + emacr: emacr, + empty: empty, + emptyset: emptyset, + emptyv: emptyv, + emsp13: emsp13, + emsp14: emsp14, + emsp: emsp, + eng: eng, + ensp: ensp, + eogon: eogon, + eopf: eopf, + epar: epar, + eparsl: eparsl, + eplus: eplus, + epsi: epsi, + epsilon: epsilon, + epsiv: epsiv, + eqcirc: eqcirc, + eqcolon: eqcolon, + eqsim: eqsim, + eqslantgtr: eqslantgtr, + eqslantless: eqslantless, + equals: equals, + equest: equest, + equiv: equiv, + equivDD: equivDD, + eqvparsl: eqvparsl, + erDot: erDot, + erarr: erarr, + escr: escr, + esdot: esdot, + esim: esim, + eta: eta, + et: et, + eth: eth$1, + eum: eum, + euml: euml$1, + euro: euro, + excl: excl, + exist: exist, + expectation: expectation, + exponentiale: exponentiale, + fallingdotseq: fallingdotseq, + fcy: fcy, + female: female, + ffilig: ffilig, + fflig: fflig, + ffllig: ffllig, + ffr: ffr, + filig: filig, + fjlig: fjlig, + flat: flat, + fllig: fllig, + fltns: fltns, + fnof: fnof, + fopf: fopf, + forall: forall, + fork: fork, + forkv: forkv, + fpartint: fpartint, + frac1: frac1, + frac12: frac12$1, + frac13: frac13, + frac14: frac14$1, + frac15: frac15, + frac16: frac16, + frac18: frac18, + frac23: frac23, + frac25: frac25, + frac3: frac3, + frac34: frac34$1, + frac35: frac35, + frac38: frac38, + frac45: frac45, + frac56: frac56, + frac58: frac58, + frac78: frac78, + frasl: frasl, + frown: frown, + fscr: fscr, + gE: gE, + gEl: gEl, + gacute: gacute, + gamma: gamma, + gammad: gammad, + gap: gap, + gbreve: gbreve, + gcirc: gcirc, + gcy: gcy, + gdot: gdot, + ge: ge, + gel: gel, + geq: geq, + geqq: geqq, + geqslant: geqslant, + ges: ges, + gescc: gescc, + gesdot: gesdot, + gesdoto: gesdoto, + gesdotol: gesdotol, + gesl: gesl, + gesles: gesles, + gfr: gfr, + gg: gg, + ggg: ggg, + gimel: gimel, + gjcy: gjcy, + gl: gl, + glE: glE, + gla: gla, + glj: glj, + gnE: gnE, + gnap: gnap, + gnapprox: gnapprox, + gne: gne, + gneq: gneq, + gneqq: gneqq, + gnsim: gnsim, + gopf: gopf, + grave: grave, + gscr: gscr, + gsim: gsim, + gsime: gsime, + gsiml: gsiml, + g: g, + gt: gt$1, + gtcc: gtcc, + gtcir: gtcir, + gtdot: gtdot, + gtlPar: gtlPar, + gtquest: gtquest, + gtrapprox: gtrapprox, + gtrarr: gtrarr, + gtrdot: gtrdot, + gtreqless: gtreqless, + gtreqqless: gtreqqless, + gtrless: gtrless, + gtrsim: gtrsim, + gvertneqq: gvertneqq, + gvnE: gvnE, + hArr: hArr, + hairsp: hairsp, + half: half, + hamilt: hamilt, + hardcy: hardcy, + harr: harr, + harrcir: harrcir, + harrw: harrw, + hbar: hbar, + hcirc: hcirc, + hearts: hearts, + heartsuit: heartsuit, + hellip: hellip, + hercon: hercon, + hfr: hfr, + hksearow: hksearow, + hkswarow: hkswarow, + hoarr: hoarr, + homtht: homtht, + hookleftarrow: hookleftarrow, + hookrightarrow: hookrightarrow, + hopf: hopf, + horbar: horbar, + hscr: hscr, + hslash: hslash, + hstrok: hstrok, + hybull: hybull, + hyphen: hyphen, + iacut: iacut, + iacute: iacute$1, + ic: ic, + icir: icir, + icirc: icirc$1, + icy: icy, + iecy: iecy, + iexc: iexc, + iexcl: iexcl$1, + iff: iff, + ifr: ifr, + igrav: igrav, + igrave: igrave$1, + ii: ii, + iiiint: iiiint, + iiint: iiint, + iinfin: iinfin, + iiota: iiota, + ijlig: ijlig, + imacr: imacr, + image: image, + imagline: imagline, + imagpart: imagpart, + imath: imath, + imof: imof, + imped: imped, + incare: incare, + infin: infin, + infintie: infintie, + inodot: inodot, + int: int, + intcal: intcal, + integers: integers, + intercal: intercal, + intlarhk: intlarhk, + intprod: intprod, + iocy: iocy, + iogon: iogon, + iopf: iopf, + iota: iota, + iprod: iprod, + iques: iques, + iquest: iquest$1, + iscr: iscr, + isin: isin, + isinE: isinE, + isindot: isindot, + isins: isins, + isinsv: isinsv, + isinv: isinv, + it: it, + itilde: itilde, + iukcy: iukcy, + ium: ium, + iuml: iuml$1, + jcirc: jcirc, + jcy: jcy, + jfr: jfr, + jmath: jmath, + jopf: jopf, + jscr: jscr, + jsercy: jsercy, + jukcy: jukcy, + kappa: kappa, + kappav: kappav, + kcedil: kcedil, + kcy: kcy, + kfr: kfr, + kgreen: kgreen, + khcy: khcy, + kjcy: kjcy, + kopf: kopf, + kscr: kscr, + lAarr: lAarr, + lArr: lArr, + lAtail: lAtail, + lBarr: lBarr, + lE: lE, + lEg: lEg, + lHar: lHar, + lacute: lacute, + laemptyv: laemptyv, + lagran: lagran, + lambda: lambda, + lang: lang, + langd: langd, + langle: langle, + lap: lap, + laqu: laqu, + laquo: laquo$1, + larr: larr, + larrb: larrb, + larrbfs: larrbfs, + larrfs: larrfs, + larrhk: larrhk, + larrlp: larrlp, + larrpl: larrpl, + larrsim: larrsim, + larrtl: larrtl, + lat: lat, + latail: latail, + late: late, + lates: lates, + lbarr: lbarr, + lbbrk: lbbrk, + lbrace: lbrace, + lbrack: lbrack, + lbrke: lbrke, + lbrksld: lbrksld, + lbrkslu: lbrkslu, + lcaron: lcaron, + lcedil: lcedil, + lceil: lceil, + lcub: lcub, + lcy: lcy, + ldca: ldca, + ldquo: ldquo, + ldquor: ldquor, + ldrdhar: ldrdhar, + ldrushar: ldrushar, + ldsh: ldsh, + le: le, + leftarrow: leftarrow, + leftarrowtail: leftarrowtail, + leftharpoondown: leftharpoondown, + leftharpoonup: leftharpoonup, + leftleftarrows: leftleftarrows, + leftrightarrow: leftrightarrow, + leftrightarrows: leftrightarrows, + leftrightharpoons: leftrightharpoons, + leftrightsquigarrow: leftrightsquigarrow, + leftthreetimes: leftthreetimes, + leg: leg, + leq: leq, + leqq: leqq, + leqslant: leqslant, + les: les, + lescc: lescc, + lesdot: lesdot, + lesdoto: lesdoto, + lesdotor: lesdotor, + lesg: lesg, + lesges: lesges, + lessapprox: lessapprox, + lessdot: lessdot, + lesseqgtr: lesseqgtr, + lesseqqgtr: lesseqqgtr, + lessgtr: lessgtr, + lesssim: lesssim, + lfisht: lfisht, + lfloor: lfloor, + lfr: lfr, + lg: lg, + lgE: lgE, + lhard: lhard, + lharu: lharu, + lharul: lharul, + lhblk: lhblk, + ljcy: ljcy, + ll: ll, + llarr: llarr, + llcorner: llcorner, + llhard: llhard, + lltri: lltri, + lmidot: lmidot, + lmoust: lmoust, + lmoustache: lmoustache, + lnE: lnE, + lnap: lnap, + lnapprox: lnapprox, + lne: lne, + lneq: lneq, + lneqq: lneqq, + lnsim: lnsim, + loang: loang, + loarr: loarr, + lobrk: lobrk, + longleftarrow: longleftarrow, + longleftrightarrow: longleftrightarrow, + longmapsto: longmapsto, + longrightarrow: longrightarrow, + looparrowleft: looparrowleft, + looparrowright: looparrowright, + lopar: lopar, + lopf: lopf, + loplus: loplus, + lotimes: lotimes, + lowast: lowast, + lowbar: lowbar, + loz: loz, + lozenge: lozenge, + lozf: lozf, + lpar: lpar, + lparlt: lparlt, + lrarr: lrarr, + lrcorner: lrcorner, + lrhar: lrhar, + lrhard: lrhard, + lrm: lrm, + lrtri: lrtri, + lsaquo: lsaquo, + lscr: lscr, + lsh: lsh, + lsim: lsim, + lsime: lsime, + lsimg: lsimg, + lsqb: lsqb, + lsquo: lsquo, + lsquor: lsquor, + lstrok: lstrok, + l: l, + lt: lt$1, + ltcc: ltcc, + ltcir: ltcir, + ltdot: ltdot, + lthree: lthree, + ltimes: ltimes, + ltlarr: ltlarr, + ltquest: ltquest, + ltrPar: ltrPar, + ltri: ltri, + ltrie: ltrie, + ltrif: ltrif, + lurdshar: lurdshar, + luruhar: luruhar, + lvertneqq: lvertneqq, + lvnE: lvnE, + mDDot: mDDot, + mac: mac, + macr: macr$1, + male: male, + malt: malt, + maltese: maltese, + map: map$2, + mapsto: mapsto, + mapstodown: mapstodown, + mapstoleft: mapstoleft, + mapstoup: mapstoup, + marker: marker, + mcomma: mcomma, + mcy: mcy, + mdash: mdash, + measuredangle: measuredangle, + mfr: mfr, + mho: mho, + micr: micr, + micro: micro$1, + mid: mid, + midast: midast, + midcir: midcir, + middo: middo, + middot: middot$1, + minus: minus, + minusb: minusb, + minusd: minusd, + minusdu: minusdu, + mlcp: mlcp, + mldr: mldr, + mnplus: mnplus, + models: models$1, + mopf: mopf, + mp: mp, + mscr: mscr, + mstpos: mstpos, + mu: mu, + multimap: multimap, + mumap: mumap, + nGg: nGg, + nGt: nGt, + nGtv: nGtv, + nLeftarrow: nLeftarrow, + nLeftrightarrow: nLeftrightarrow, + nLl: nLl, + nLt: nLt, + nLtv: nLtv, + nRightarrow: nRightarrow, + nVDash: nVDash, + nVdash: nVdash, + nabla: nabla, + nacute: nacute, + nang: nang, + nap: nap, + napE: napE, + napid: napid, + napos: napos, + napprox: napprox, + natur: natur, + natural: natural, + naturals: naturals, + nbs: nbs, + nbsp: nbsp$1, + nbump: nbump, + nbumpe: nbumpe, + ncap: ncap, + ncaron: ncaron, + ncedil: ncedil, + ncong: ncong, + ncongdot: ncongdot, + ncup: ncup, + ncy: ncy, + ndash: ndash, + ne: ne, + neArr: neArr, + nearhk: nearhk, + nearr: nearr, + nearrow: nearrow, + nedot: nedot, + nequiv: nequiv, + nesear: nesear, + nesim: nesim, + nexist: nexist, + nexists: nexists, + nfr: nfr, + ngE: ngE, + nge: nge, + ngeq: ngeq, + ngeqq: ngeqq, + ngeqslant: ngeqslant, + nges: nges, + ngsim: ngsim, + ngt: ngt, + ngtr: ngtr, + nhArr: nhArr, + nharr: nharr, + nhpar: nhpar, + ni: ni, + nis: nis, + nisd: nisd, + niv: niv, + njcy: njcy, + nlArr: nlArr, + nlE: nlE, + nlarr: nlarr, + nldr: nldr, + nle: nle, + nleftarrow: nleftarrow, + nleftrightarrow: nleftrightarrow, + nleq: nleq, + nleqq: nleqq, + nleqslant: nleqslant, + nles: nles, + nless: nless, + nlsim: nlsim, + nlt: nlt, + nltri: nltri, + nltrie: nltrie, + nmid: nmid, + nopf: nopf, + no: no, + not: not$1, + notin: notin, + notinE: notinE, + notindot: notindot, + notinva: notinva, + notinvb: notinvb, + notinvc: notinvc, + notni: notni, + notniva: notniva, + notnivb: notnivb, + notnivc: notnivc, + npar: npar, + nparallel: nparallel, + nparsl: nparsl, + npart: npart, + npolint: npolint, + npr: npr, + nprcue: nprcue, + npre: npre, + nprec: nprec, + npreceq: npreceq, + nrArr: nrArr, + nrarr: nrarr, + nrarrc: nrarrc, + nrarrw: nrarrw, + nrightarrow: nrightarrow, + nrtri: nrtri, + nrtrie: nrtrie, + nsc: nsc, + nsccue: nsccue, + nsce: nsce, + nscr: nscr, + nshortmid: nshortmid, + nshortparallel: nshortparallel, + nsim: nsim, + nsime: nsime, + nsimeq: nsimeq, + nsmid: nsmid, + nspar: nspar, + nsqsube: nsqsube, + nsqsupe: nsqsupe, + nsub: nsub, + nsubE: nsubE, + nsube: nsube, + nsubset: nsubset, + nsubseteq: nsubseteq, + nsubseteqq: nsubseteqq, + nsucc: nsucc, + nsucceq: nsucceq, + nsup: nsup, + nsupE: nsupE, + nsupe: nsupe, + nsupset: nsupset, + nsupseteq: nsupseteq, + nsupseteqq: nsupseteqq, + ntgl: ntgl, + ntild: ntild, + ntilde: ntilde$1, + ntlg: ntlg, + ntriangleleft: ntriangleleft, + ntrianglelefteq: ntrianglelefteq, + ntriangleright: ntriangleright, + ntrianglerighteq: ntrianglerighteq, + nu: nu, + num: num, + numero: numero, + numsp: numsp, + nvDash: nvDash, + nvHarr: nvHarr, + nvap: nvap, + nvdash: nvdash, + nvge: nvge, + nvgt: nvgt, + nvinfin: nvinfin, + nvlArr: nvlArr, + nvle: nvle, + nvlt: nvlt, + nvltrie: nvltrie, + nvrArr: nvrArr, + nvrtrie: nvrtrie, + nvsim: nvsim, + nwArr: nwArr, + nwarhk: nwarhk, + nwarr: nwarr, + nwarrow: nwarrow, + nwnear: nwnear, + oS: oS, + oacut: oacut, + oacute: oacute$1, + oast: oast, + ocir: ocir, + ocirc: ocirc$1, + ocy: ocy, + odash: odash, + odblac: odblac, + odiv: odiv, + odot: odot, + odsold: odsold, + oelig: oelig, + ofcir: ofcir, + ofr: ofr, + ogon: ogon, + ograv: ograv, + ograve: ograve$1, + ogt: ogt, + ohbar: ohbar, + ohm: ohm, + oint: oint, + olarr: olarr, + olcir: olcir, + olcross: olcross, + oline: oline, + olt: olt, + omacr: omacr, + omega: omega, + omicron: omicron, + omid: omid, + ominus: ominus, + oopf: oopf, + opar: opar, + operp: operp, + oplus: oplus, + or: or, + orarr: orarr, + ord: ord, + order: order$1, + orderof: orderof, + ordf: ordf$1, + ordm: ordm$1, + origof: origof, + oror: oror, + orslope: orslope, + orv: orv, + oscr: oscr, + oslas: oslas, + oslash: oslash$1, + osol: osol, + otild: otild, + otilde: otilde$1, + otimes: otimes, + otimesas: otimesas, + oum: oum, + ouml: ouml$1, + ovbar: ovbar, + par: par, + para: para$1, + parallel: parallel, + parsim: parsim, + parsl: parsl, + part: part, + pcy: pcy, + percnt: percnt, + period: period, + permil: permil, + perp: perp, + pertenk: pertenk, + pfr: pfr, + phi: phi, + phiv: phiv, + phmmat: phmmat, + phone: phone, + pi: pi, + pitchfork: pitchfork, + piv: piv, + planck: planck, + planckh: planckh, + plankv: plankv, + plus: plus, + plusacir: plusacir, + plusb: plusb, + pluscir: pluscir, + plusdo: plusdo, + plusdu: plusdu, + pluse: pluse, + plusm: plusm, + plusmn: plusmn$1, + plussim: plussim, + plustwo: plustwo, + pm: pm, + pointint: pointint, + popf: popf, + poun: poun, + pound: pound$1, + pr: pr, + prE: prE, + prap: prap, + prcue: prcue, + pre: pre, + prec: prec, + precapprox: precapprox, + preccurlyeq: preccurlyeq, + preceq: preceq, + precnapprox: precnapprox, + precneqq: precneqq, + precnsim: precnsim, + precsim: precsim, + prime: prime, + primes: primes, + prnE: prnE, + prnap: prnap, + prnsim: prnsim, + prod: prod, + profalar: profalar, + profline: profline, + profsurf: profsurf, + prop: prop, + propto: propto, + prsim: prsim, + prurel: prurel, + pscr: pscr, + psi: psi, + puncsp: puncsp, + qfr: qfr, + qint: qint, + qopf: qopf, + qprime: qprime, + qscr: qscr, + quaternions: quaternions, + quatint: quatint, + quest: quest, + questeq: questeq, + quo: quo, + quot: quot$1, + rAarr: rAarr, + rArr: rArr, + rAtail: rAtail, + rBarr: rBarr, + rHar: rHar, + race: race, + racute: racute, + radic: radic, + raemptyv: raemptyv, + rang: rang, + rangd: rangd, + range: range$1, + rangle: rangle, + raqu: raqu, + raquo: raquo$1, + rarr: rarr, + rarrap: rarrap, + rarrb: rarrb, + rarrbfs: rarrbfs, + rarrc: rarrc, + rarrfs: rarrfs, + rarrhk: rarrhk, + rarrlp: rarrlp, + rarrpl: rarrpl, + rarrsim: rarrsim, + rarrtl: rarrtl, + rarrw: rarrw, + ratail: ratail, + ratio: ratio, + rationals: rationals, + rbarr: rbarr, + rbbrk: rbbrk, + rbrace: rbrace, + rbrack: rbrack, + rbrke: rbrke, + rbrksld: rbrksld, + rbrkslu: rbrkslu, + rcaron: rcaron, + rcedil: rcedil, + rceil: rceil, + rcub: rcub, + rcy: rcy, + rdca: rdca, + rdldhar: rdldhar, + rdquo: rdquo, + rdquor: rdquor, + rdsh: rdsh, + real: real, + realine: realine, + realpart: realpart, + reals: reals, + rect: rect, + re: re, + reg: reg$1, + rfisht: rfisht, + rfloor: rfloor, + rfr: rfr, + rhard: rhard, + rharu: rharu, + rharul: rharul, + rho: rho, + rhov: rhov, + rightarrow: rightarrow, + rightarrowtail: rightarrowtail, + rightharpoondown: rightharpoondown, + rightharpoonup: rightharpoonup, + rightleftarrows: rightleftarrows, + rightleftharpoons: rightleftharpoons, + rightrightarrows: rightrightarrows, + rightsquigarrow: rightsquigarrow, + rightthreetimes: rightthreetimes, + ring: ring, + risingdotseq: risingdotseq, + rlarr: rlarr, + rlhar: rlhar, + rlm: rlm, + rmoust: rmoust, + rmoustache: rmoustache, + rnmid: rnmid, + roang: roang, + roarr: roarr, + robrk: robrk, + ropar: ropar, + ropf: ropf, + roplus: roplus, + rotimes: rotimes, + rpar: rpar, + rpargt: rpargt, + rppolint: rppolint, + rrarr: rrarr, + rsaquo: rsaquo, + rscr: rscr, + rsh: rsh, + rsqb: rsqb, + rsquo: rsquo, + rsquor: rsquor, + rthree: rthree, + rtimes: rtimes, + rtri: rtri, + rtrie: rtrie, + rtrif: rtrif, + rtriltri: rtriltri, + ruluhar: ruluhar, + rx: rx, + sacute: sacute, + sbquo: sbquo, + sc: sc, + scE: scE, + scap: scap, + scaron: scaron, + sccue: sccue, + sce: sce, + scedil: scedil, + scirc: scirc, + scnE: scnE, + scnap: scnap, + scnsim: scnsim, + scpolint: scpolint, + scsim: scsim, + scy: scy, + sdot: sdot, + sdotb: sdotb, + sdote: sdote, + seArr: seArr, + searhk: searhk, + searr: searr, + searrow: searrow, + sec: sec, + sect: sect$1, + semi: semi, + seswar: seswar, + setminus: setminus, + setmn: setmn, + sext: sext, + sfr: sfr, + sfrown: sfrown, + sharp: sharp, + shchcy: shchcy, + shcy: shcy, + shortmid: shortmid, + shortparallel: shortparallel, + sh: sh, + shy: shy$1, + sigma: sigma, + sigmaf: sigmaf, + sigmav: sigmav, + sim: sim, + simdot: simdot, + sime: sime, + simeq: simeq, + simg: simg, + simgE: simgE, + siml: siml, + simlE: simlE, + simne: simne, + simplus: simplus, + simrarr: simrarr, + slarr: slarr, + smallsetminus: smallsetminus, + smashp: smashp, + smeparsl: smeparsl, + smid: smid, + smile: smile, + smt: smt, + smte: smte, + smtes: smtes, + softcy: softcy, + sol: sol, + solb: solb, + solbar: solbar, + sopf: sopf, + spades: spades, + spadesuit: spadesuit, + spar: spar, + sqcap: sqcap, + sqcaps: sqcaps, + sqcup: sqcup, + sqcups: sqcups, + sqsub: sqsub, + sqsube: sqsube, + sqsubset: sqsubset, + sqsubseteq: sqsubseteq, + sqsup: sqsup, + sqsupe: sqsupe, + sqsupset: sqsupset, + sqsupseteq: sqsupseteq, + squ: squ, + square: square, + squarf: squarf, + squf: squf, + srarr: srarr, + sscr: sscr, + ssetmn: ssetmn, + ssmile: ssmile, + sstarf: sstarf, + star: star$1, + starf: starf, + straightepsilon: straightepsilon, + straightphi: straightphi, + strns: strns, + sub: sub, + subE: subE, + subdot: subdot, + sube: sube, + subedot: subedot, + submult: submult, + subnE: subnE, + subne: subne, + subplus: subplus, + subrarr: subrarr, + subset: subset, + subseteq: subseteq, + subseteqq: subseteqq, + subsetneq: subsetneq, + subsetneqq: subsetneqq, + subsim: subsim, + subsub: subsub, + subsup: subsup, + succ: succ, + succapprox: succapprox, + succcurlyeq: succcurlyeq, + succeq: succeq, + succnapprox: succnapprox, + succneqq: succneqq, + succnsim: succnsim, + succsim: succsim, + sum: sum, + sung: sung, + sup: sup, + sup1: sup1$1, + sup2: sup2$1, + sup3: sup3$1, + supE: supE, + supdot: supdot, + supdsub: supdsub, + supe: supe, + supedot: supedot, + suphsol: suphsol, + suphsub: suphsub, + suplarr: suplarr, + supmult: supmult, + supnE: supnE, + supne: supne, + supplus: supplus, + supset: supset, + supseteq: supseteq, + supseteqq: supseteqq, + supsetneq: supsetneq, + supsetneqq: supsetneqq, + supsim: supsim, + supsub: supsub, + supsup: supsup, + swArr: swArr, + swarhk: swarhk, + swarr: swarr, + swarrow: swarrow, + swnwar: swnwar, + szli: szli, + szlig: szlig$1, + target: target, + tau: tau, + tbrk: tbrk, + tcaron: tcaron, + tcedil: tcedil, + tcy: tcy, + tdot: tdot, + telrec: telrec, + tfr: tfr, + there4: there4, + therefore: therefore, + theta: theta, + thetasym: thetasym, + thetav: thetav, + thickapprox: thickapprox, + thicksim: thicksim, + thinsp: thinsp, + thkap: thkap, + thksim: thksim, + thor: thor, + thorn: thorn$1, + tilde: tilde, + time: time, + times: times$1, + timesb: timesb, + timesbar: timesbar, + timesd: timesd, + tint: tint, + toea: toea, + top: top, + topbot: topbot, + topcir: topcir, + topf: topf, + topfork: topfork, + tosa: tosa, + tprime: tprime, + trade: trade, + triangle: triangle, + triangledown: triangledown, + triangleleft: triangleleft, + trianglelefteq: trianglelefteq, + triangleq: triangleq, + triangleright: triangleright, + trianglerighteq: trianglerighteq, + tridot: tridot, + trie: trie, + triminus: triminus, + triplus: triplus, + trisb: trisb, + tritime: tritime, + trpezium: trpezium, + tscr: tscr, + tscy: tscy, + tshcy: tshcy, + tstrok: tstrok, + twixt: twixt, + twoheadleftarrow: twoheadleftarrow, + twoheadrightarrow: twoheadrightarrow, + uArr: uArr, + uHar: uHar, + uacut: uacut, + uacute: uacute$1, + uarr: uarr, + ubrcy: ubrcy, + ubreve: ubreve, + ucir: ucir, + ucirc: ucirc$1, + ucy: ucy, + udarr: udarr, + udblac: udblac, + udhar: udhar, + ufisht: ufisht, + ufr: ufr, + ugrav: ugrav, + ugrave: ugrave$1, + uharl: uharl, + uharr: uharr, + uhblk: uhblk, + ulcorn: ulcorn, + ulcorner: ulcorner, + ulcrop: ulcrop, + ultri: ultri, + umacr: umacr, + um: um, + uml: uml$1, + uogon: uogon, + uopf: uopf, + uparrow: uparrow, + updownarrow: updownarrow, + upharpoonleft: upharpoonleft, + upharpoonright: upharpoonright, + uplus: uplus, + upsi: upsi, + upsih: upsih, + upsilon: upsilon, + upuparrows: upuparrows, + urcorn: urcorn, + urcorner: urcorner, + urcrop: urcrop, + uring: uring, + urtri: urtri, + uscr: uscr, + utdot: utdot, + utilde: utilde, + utri: utri, + utrif: utrif, + uuarr: uuarr, + uum: uum, + uuml: uuml$1, + uwangle: uwangle, + vArr: vArr, + vBar: vBar, + vBarv: vBarv, + vDash: vDash, + vangrt: vangrt, + varepsilon: varepsilon, + varkappa: varkappa, + varnothing: varnothing, + varphi: varphi, + varpi: varpi, + varpropto: varpropto, + varr: varr, + varrho: varrho, + varsigma: varsigma, + varsubsetneq: varsubsetneq, + varsubsetneqq: varsubsetneqq, + varsupsetneq: varsupsetneq, + varsupsetneqq: varsupsetneqq, + vartheta: vartheta, + vartriangleleft: vartriangleleft, + vartriangleright: vartriangleright, + vcy: vcy, + vdash: vdash, + vee: vee, + veebar: veebar, + veeeq: veeeq, + vellip: vellip, + verbar: verbar, + vert: vert, + vfr: vfr, + vltri: vltri, + vnsub: vnsub, + vnsup: vnsup, + vopf: vopf, + vprop: vprop, + vrtri: vrtri, + vscr: vscr, + vsubnE: vsubnE, + vsubne: vsubne, + vsupnE: vsupnE, + vsupne: vsupne, + vzigzag: vzigzag, + wcirc: wcirc, + wedbar: wedbar, + wedge: wedge, + wedgeq: wedgeq, + weierp: weierp, + wfr: wfr, + wopf: wopf, + wp: wp, + wr: wr, + wreath: wreath, + wscr: wscr, + xcap: xcap, + xcirc: xcirc, + xcup: xcup, + xdtri: xdtri, + xfr: xfr, + xhArr: xhArr, + xharr: xharr, + xi: xi, + xlArr: xlArr, + xlarr: xlarr, + xmap: xmap, + xnis: xnis, + xodot: xodot, + xopf: xopf, + xoplus: xoplus, + xotime: xotime, + xrArr: xrArr, + xrarr: xrarr, + xscr: xscr, + xsqcup: xsqcup, + xuplus: xuplus, + xutri: xutri, + xvee: xvee, + xwedge: xwedge, + yacut: yacut, + yacute: yacute$1, + yacy: yacy, + ycirc: ycirc, + ycy: ycy, + ye: ye, + yen: yen$1, + yfr: yfr, + yicy: yicy, + yopf: yopf, + yscr: yscr, + yucy: yucy, + yum: yum, + yuml: yuml$1, + zacute: zacute, + zcaron: zcaron, + zcy: zcy, + zdot: zdot, + zeetrf: zeetrf, + zeta: zeta, + zfr: zfr, + zhcy: zhcy, + zigrarr: zigrarr, + zopf: zopf, + zscr: zscr, + zwj: zwj, + zwnj: zwnj, + 'default': index$3 +}); + +var characterEntities$1 = getCjsExportFromNamespace(characterEntities); + +var decodeEntity_1 = decodeEntity; + +var own$3 = {}.hasOwnProperty; + +function decodeEntity(characters) { + return own$3.call(characterEntities$1, characters) + ? characterEntities$1[characters] + : false +} + +var legacy = getCjsExportFromNamespace(characterEntitiesLegacy); + +var invalid = getCjsExportFromNamespace(characterReferenceInvalid); + +var parseEntities_1 = parseEntities; + +var own$4 = {}.hasOwnProperty; +var fromCharCode = String.fromCharCode; +var noop$2 = Function.prototype; + +// Default settings. +var defaults = { + warning: null, + reference: null, + text: null, + warningContext: null, + referenceContext: null, + textContext: null, + position: {}, + additional: null, + attribute: false, + nonTerminated: true +}; + +// Characters. +var tab = 9; // '\t' +var lineFeed = 10; // '\n' +var formFeed = 12; // '\f' +var space = 32; // ' ' +var ampersand = 38; // '&' +var semicolon = 59; // ';' +var lessThan = 60; // '<' +var equalsTo = 61; // '=' +var numberSign = 35; // '#' +var uppercaseX = 88; // 'X' +var lowercaseX = 120; // 'x' +var replacementCharacter = 65533; // '�' + +// Reference types. +var name = 'named'; +var hexa = 'hexadecimal'; +var deci = 'decimal'; + +// Map of bases. +var bases = {}; + +bases[hexa] = 16; +bases[deci] = 10; + +// Map of types to tests. +// Each type of character reference accepts different characters. +// This test is used to detect whether a reference has ended (as the semicolon +// is not strictly needed). +var tests = {}; + +tests[name] = isAlphanumerical; +tests[deci] = isDecimal; +tests[hexa] = isHexadecimal; + +// Warning types. +var namedNotTerminated = 1; +var numericNotTerminated = 2; +var namedEmpty = 3; +var numericEmpty = 4; +var namedUnknown = 5; +var numericDisallowed = 6; +var numericProhibited = 7; + +// Warning messages. +var messages = {}; + +messages[namedNotTerminated] = + 'Named character references must be terminated by a semicolon'; +messages[numericNotTerminated] = + 'Numeric character references must be terminated by a semicolon'; +messages[namedEmpty] = 'Named character references cannot be empty'; +messages[numericEmpty] = 'Numeric character references cannot be empty'; +messages[namedUnknown] = 'Named character references must be known'; +messages[numericDisallowed] = + 'Numeric character references cannot be disallowed'; +messages[numericProhibited] = + 'Numeric character references cannot be outside the permissible Unicode range'; + +// Wrap to ensure clean parameters are given to `parse`. +function parseEntities(value, options) { + var settings = {}; + var option; + var key; + + if (!options) { + options = {}; + } + + for (key in defaults) { + option = options[key]; + settings[key] = + option === null || option === undefined ? defaults[key] : option; + } + + if (settings.position.indent || settings.position.start) { + settings.indent = settings.position.indent || []; + settings.position = settings.position.start; + } + + return parse$8(value, settings) +} + +// Parse entities. +// eslint-disable-next-line complexity +function parse$8(value, settings) { + var additional = settings.additional; + var nonTerminated = settings.nonTerminated; + var handleText = settings.text; + var handleReference = settings.reference; + var handleWarning = settings.warning; + var textContext = settings.textContext; + var referenceContext = settings.referenceContext; + var warningContext = settings.warningContext; + var pos = settings.position; + var indent = settings.indent || []; + var length = value.length; + var index = 0; + var lines = -1; + var column = pos.column || 1; + var line = pos.line || 1; + var queue = ''; + var result = []; + var entityCharacters; + var namedEntity; + var terminated; + var characters; + var character; + var reference; + var following; + var warning; + var reason; + var output; + var entity; + var begin; + var start; + var type; + var test; + var prev; + var next; + var diff; + var end; + + if (typeof additional === 'string') { + additional = additional.charCodeAt(0); + } + + // Cache the current point. + prev = now(); + + // Wrap `handleWarning`. + warning = handleWarning ? parseError : noop$2; + + // Ensure the algorithm walks over the first character and the end (inclusive). + index--; + length++; + + while (++index < length) { + // If the previous character was a newline. + if (character === lineFeed) { + column = indent[lines] || 1; + } + + character = value.charCodeAt(index); + + if (character === ampersand) { + following = value.charCodeAt(index + 1); + + // The behaviour depends on the identity of the next character. + if ( + following === tab || + following === lineFeed || + following === formFeed || + following === space || + following === ampersand || + following === lessThan || + following !== following || + (additional && following === additional) + ) { + // Not a character reference. + // No characters are consumed, and nothing is returned. + // This is not an error, either. + queue += fromCharCode(character); + column++; + + continue + } + + start = index + 1; + begin = start; + end = start; + + if (following === numberSign) { + // Numerical entity. + end = ++begin; + + // The behaviour further depends on the next character. + following = value.charCodeAt(end); + + if (following === uppercaseX || following === lowercaseX) { + // ASCII hex digits. + type = hexa; + end = ++begin; + } else { + // ASCII digits. + type = deci; + } + } else { + // Named entity. + type = name; + } + + entityCharacters = ''; + entity = ''; + characters = ''; + test = tests[type]; + end--; + + while (++end < length) { + following = value.charCodeAt(end); + + if (!test(following)) { + break + } + + characters += fromCharCode(following); + + // Check if we can match a legacy named reference. + // If so, we cache that as the last viable named reference. + // This ensures we do not need to walk backwards later. + if (type === name && own$4.call(legacy, characters)) { + entityCharacters = characters; + entity = legacy[characters]; + } + } + + terminated = value.charCodeAt(end) === semicolon; + + if (terminated) { + end++; + + namedEntity = type === name ? decodeEntity_1(characters) : false; + + if (namedEntity) { + entityCharacters = characters; + entity = namedEntity; + } + } + + diff = 1 + end - start; + + if (!terminated && !nonTerminated) ; else if (!characters) { + // An empty (possible) entity is valid, unless it’s numeric (thus an + // ampersand followed by an octothorp). + if (type !== name) { + warning(numericEmpty, diff); + } + } else if (type === name) { + // An ampersand followed by anything unknown, and not terminated, is + // invalid. + if (terminated && !entity) { + warning(namedUnknown, 1); + } else { + // If theres something after an entity name which is not known, cap + // the reference. + if (entityCharacters !== characters) { + end = begin + entityCharacters.length; + diff = 1 + end - begin; + terminated = false; + } + + // If the reference is not terminated, warn. + if (!terminated) { + reason = entityCharacters ? namedNotTerminated : namedEmpty; + + if (settings.attribute) { + following = value.charCodeAt(end); + + if (following === equalsTo) { + warning(reason, diff); + entity = null; + } else if (isAlphanumerical(following)) { + entity = null; + } else { + warning(reason, diff); + } + } else { + warning(reason, diff); + } + } + } + + reference = entity; + } else { + if (!terminated) { + // All non-terminated numeric entities are not rendered, and trigger a + // warning. + warning(numericNotTerminated, diff); + } + + // When terminated and number, parse as either hexadecimal or decimal. + reference = parseInt(characters, bases[type]); + + // Trigger a warning when the parsed number is prohibited, and replace + // with replacement character. + if (prohibited(reference)) { + warning(numericProhibited, diff); + reference = fromCharCode(replacementCharacter); + } else if (reference in invalid) { + // Trigger a warning when the parsed number is disallowed, and replace + // by an alternative. + warning(numericDisallowed, diff); + reference = invalid[reference]; + } else { + // Parse the number. + output = ''; + + // Trigger a warning when the parsed number should not be used. + if (disallowed(reference)) { + warning(numericDisallowed, diff); + } + + // Stringify the number. + if (reference > 0xffff) { + reference -= 0x10000; + output += fromCharCode((reference >>> (10 & 0x3ff)) | 0xd800); + reference = 0xdc00 | (reference & 0x3ff); + } + + reference = output + fromCharCode(reference); + } + } + + // Found it! + // First eat the queued characters as normal text, then eat an entity. + if (reference) { + flush(); + + prev = now(); + index = end - 1; + column += end - start + 1; + result.push(reference); + next = now(); + next.offset++; + + if (handleReference) { + handleReference.call( + referenceContext, + reference, + {start: prev, end: next}, + value.slice(start - 1, end) + ); + } + + prev = next; + } else { + // If we could not find a reference, queue the checked characters (as + // normal characters), and move the pointer to their end. + // This is possible because we can be certain neither newlines nor + // ampersands are included. + characters = value.slice(start - 1, end); + queue += characters; + column += characters.length; + index = end - 1; + } + } else { + // Handle anything other than an ampersand, including newlines and EOF. + if ( + character === 10 // Line feed + ) { + line++; + lines++; + column = 0; + } + + if (character === character) { + queue += fromCharCode(character); + column++; + } else { + flush(); + } + } + } + + // Return the reduced nodes, and any possible warnings. + return result.join('') + + // Get current position. + function now() { + return { + line: line, + column: column, + offset: index + (pos.offset || 0) + } + } + + // “Throw” a parse-error: a warning. + function parseError(code, offset) { + var position = now(); + + position.column += offset; + position.offset += offset; + + handleWarning.call(warningContext, messages[code], position, code); + } + + // Flush `queue` (normal text). + // Macro invoked before each entity and at the end of `value`. + // Does nothing when `queue` is empty. + function flush() { + if (queue) { + result.push(queue); + + if (handleText) { + handleText.call(textContext, queue, {start: prev, end: now()}); + } + + queue = ''; + } + } +} + +// Check if `character` is outside the permissible unicode range. +function prohibited(code) { + return (code >= 0xd800 && code <= 0xdfff) || code > 0x10ffff +} + +// Check if `character` is disallowed. +function disallowed(code) { + return ( + (code >= 0x0001 && code <= 0x0008) || + code === 0x000b || + (code >= 0x000d && code <= 0x001f) || + (code >= 0x007f && code <= 0x009f) || + (code >= 0xfdd0 && code <= 0xfdef) || + (code & 0xffff) === 0xffff || + (code & 0xffff) === 0xfffe + ) +} + +var decode = factory$4; + +// Factory to create an entity decoder. +function factory$4(ctx) { + decoder.raw = decodeRaw; + + return decoder + + // Normalize `position` to add an `indent`. + function normalize(position) { + var offsets = ctx.offset; + var line = position.line; + var result = []; + + while (++line) { + if (!(line in offsets)) { + break + } + + result.push((offsets[line] || 0) + 1); + } + + return {start: position, indent: result} + } + + // Decode `value` (at `position`) into text-nodes. + function decoder(value, position, handler) { + parseEntities_1(value, { + position: normalize(position), + warning: handleWarning, + text: handler, + reference: handler, + textContext: ctx, + referenceContext: ctx + }); + } + + // Decode `value` (at `position`) into a string. + function decodeRaw(value, position, options) { + return parseEntities_1( + value, + immutable(options, {position: normalize(position), warning: handleWarning}) + ) + } + + // Handle a warning. + // See for the warnings. + function handleWarning(reason, position, code) { + if (code !== 3) { + ctx.file.message(reason, position); + } + } +} + +var tokenizer = factory$5; + +// Construct a tokenizer. This creates both `tokenizeInline` and `tokenizeBlock`. +function factory$5(type) { + return tokenize + + // Tokenizer for a bound `type`. + function tokenize(value, location) { + var self = this; + var offset = self.offset; + var tokens = []; + var methods = self[type + 'Methods']; + var tokenizers = self[type + 'Tokenizers']; + var line = location.line; + var column = location.column; + var index; + var length; + var method; + var name; + var matched; + var valueLength; + + // Trim white space only lines. + if (!value) { + return tokens + } + + // Expose on `eat`. + eat.now = now; + eat.file = self.file; + + // Sync initial offset. + updatePosition(''); + + // Iterate over `value`, and iterate over all tokenizers. When one eats + // something, re-iterate with the remaining value. If no tokenizer eats, + // something failed (should not happen) and an exception is thrown. + while (value) { + index = -1; + length = methods.length; + matched = false; + + while (++index < length) { + name = methods[index]; + method = tokenizers[name]; + + if ( + method && + /* istanbul ignore next */ (!method.onlyAtStart || self.atStart) && + (!method.notInList || !self.inList) && + (!method.notInBlock || !self.inBlock) && + (!method.notInLink || !self.inLink) + ) { + valueLength = value.length; + + method.apply(self, [eat, value]); + + matched = valueLength !== value.length; + + if (matched) { + break + } + } + } + + /* istanbul ignore if */ + if (!matched) { + self.file.fail(new Error('Infinite loop'), eat.now()); + } + } + + self.eof = now(); + + return tokens + + // Update line, column, and offset based on `value`. + function updatePosition(subvalue) { + var lastIndex = -1; + var index = subvalue.indexOf('\n'); + + while (index !== -1) { + line++; + lastIndex = index; + index = subvalue.indexOf('\n', index + 1); + } + + if (lastIndex === -1) { + column += subvalue.length; + } else { + column = subvalue.length - lastIndex; + } + + if (line in offset) { + if (lastIndex !== -1) { + column += offset[line]; + } else if (column <= offset[line]) { + column = offset[line] + 1; + } + } + } + + // Get offset. Called before the first character is eaten to retrieve the + // range’s offsets. + function getOffset() { + var indentation = []; + var pos = line + 1; + + // Done. Called when the last character is eaten to retrieve the range’s + // offsets. + return function() { + var last = line + 1; + + while (pos < last) { + indentation.push((offset[pos] || 0) + 1); + + pos++; + } + + return indentation + } + } + + // Get the current position. + function now() { + var pos = {line: line, column: column}; + + pos.offset = self.toOffset(pos); + + return pos + } + + // Store position information for a node. + function Position(start) { + this.start = start; + this.end = now(); + } + + // Throw when a value is incorrectly eaten. This shouldn’t happen but will + // throw on new, incorrect rules. + function validateEat(subvalue) { + /* istanbul ignore if */ + if (value.slice(0, subvalue.length) !== subvalue) { + // Capture stack-trace. + self.file.fail( + new Error( + 'Incorrectly eaten value: please report this warning on https://git.io/vg5Ft' + ), + now() + ); + } + } + + // Mark position and patch `node.position`. + function position() { + var before = now(); + + return update + + // Add the position to a node. + function update(node, indent) { + var prev = node.position; + var start = prev ? prev.start : before; + var combined = []; + var n = prev && prev.end.line; + var l = before.line; + + node.position = new Position(start); + + // If there was already a `position`, this node was merged. Fixing + // `start` wasn’t hard, but the indent is different. Especially + // because some information, the indent between `n` and `l` wasn’t + // tracked. Luckily, that space is (should be?) empty, so we can + // safely check for it now. + if (prev && indent && prev.indent) { + combined = prev.indent; + + if (n < l) { + while (++n < l) { + combined.push((offset[n] || 0) + 1); + } + + combined.push(before.column); + } + + indent = combined.concat(indent); + } + + node.position.indent = indent || []; + + return node + } + } + + // Add `node` to `parent`s children or to `tokens`. Performs merges where + // possible. + function add(node, parent) { + var children = parent ? parent.children : tokens; + var prev = children[children.length - 1]; + var fn; + + if ( + prev && + node.type === prev.type && + (node.type === 'text' || node.type === 'blockquote') && + mergeable(prev) && + mergeable(node) + ) { + fn = node.type === 'text' ? mergeText : mergeBlockquote; + node = fn.call(self, prev, node); + } + + if (node !== prev) { + children.push(node); + } + + if (self.atStart && tokens.length !== 0) { + self.exitStart(); + } + + return node + } + + // Remove `subvalue` from `value`. `subvalue` must be at the start of + // `value`. + function eat(subvalue) { + var indent = getOffset(); + var pos = position(); + var current = now(); + + validateEat(subvalue); + + apply.reset = reset; + reset.test = test; + apply.test = test; + + value = value.slice(subvalue.length); + + updatePosition(subvalue); + + indent = indent(); + + return apply + + // Add the given arguments, add `position` to the returned node, and + // return the node. + function apply(node, parent) { + return pos(add(pos(node), parent), indent) + } + + // Functions just like apply, but resets the content: the line and + // column are reversed, and the eaten value is re-added. This is + // useful for nodes with a single type of content, such as lists and + // tables. See `apply` above for what parameters are expected. + function reset() { + var node = apply.apply(null, arguments); + + line = current.line; + column = current.column; + value = subvalue + value; + + return node + } + + // Test the position, after eating, and reverse to a not-eaten state. + function test() { + var result = pos({}); + + line = current.line; + column = current.column; + value = subvalue + value; + + return result.position + } + } + } +} + +// Check whether a node is mergeable with adjacent nodes. +function mergeable(node) { + var start; + var end; + + if (node.type !== 'text' || !node.position) { + return true + } + + start = node.position.start; + end = node.position.end; + + // Only merge nodes which occupy the same size as their `value`. + return ( + start.line !== end.line || end.column - start.column === node.value.length + ) +} + +// Merge two text nodes: `node` into `prev`. +function mergeText(prev, node) { + prev.value += node.value; + + return prev +} + +// Merge two blockquotes: `node` into `prev`, unless in CommonMark or gfm modes. +function mergeBlockquote(prev, node) { + if (this.options.commonmark || this.options.gfm) { + return node + } + + prev.children = prev.children.concat(node.children); + + return prev +} + +var markdownEscapes = escapes; + +var defaults$1 = [ + '\\', + '`', + '*', + '{', + '}', + '[', + ']', + '(', + ')', + '#', + '+', + '-', + '.', + '!', + '_', + '>' +]; + +var gfm = defaults$1.concat(['~', '|']); + +var commonmark = gfm.concat([ + '\n', + '"', + '$', + '%', + '&', + "'", + ',', + '/', + ':', + ';', + '<', + '=', + '?', + '@', + '^' +]); + +escapes.default = defaults$1; +escapes.gfm = gfm; +escapes.commonmark = commonmark; + +// Get markdown escapes. +function escapes(options) { + var settings = options || {}; + + if (settings.commonmark) { + return commonmark + } + + return settings.gfm ? gfm : defaults$1 +} + +var blockElements = [ + 'address', + 'article', + 'aside', + 'base', + 'basefont', + 'blockquote', + 'body', + 'caption', + 'center', + 'col', + 'colgroup', + 'dd', + 'details', + 'dialog', + 'dir', + 'div', + 'dl', + 'dt', + 'fieldset', + 'figcaption', + 'figure', + 'footer', + 'form', + 'frame', + 'frameset', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'head', + 'header', + 'hgroup', + 'hr', + 'html', + 'iframe', + 'legend', + 'li', + 'link', + 'main', + 'menu', + 'menuitem', + 'meta', + 'nav', + 'noframes', + 'ol', + 'optgroup', + 'option', + 'p', + 'param', + 'pre', + 'section', + 'source', + 'title', + 'summary', + 'table', + 'tbody', + 'td', + 'tfoot', + 'th', + 'thead', + 'title', + 'tr', + 'track', + 'ul' +]; + +var defaults$2 = { + position: true, + gfm: true, + commonmark: false, + footnotes: false, + pedantic: false, + blocks: blockElements +}; + +var setOptions_1 = setOptions; + +function setOptions(options) { + var self = this; + var current = self.options; + var key; + var value; + + if (options == null) { + options = {}; + } else if (typeof options === 'object') { + options = immutable(options); + } else { + throw new Error('Invalid value `' + options + '` for setting `options`') + } + + for (key in defaults$2) { + value = options[key]; + + if (value == null) { + value = current[key]; + } + + if ( + (key !== 'blocks' && typeof value !== 'boolean') || + (key === 'blocks' && typeof value !== 'object') + ) { + throw new Error( + 'Invalid value `' + value + '` for setting `options.' + key + '`' + ) + } + + options[key] = value; + } + + self.options = options; + self.escape = markdownEscapes(options); + + return self +} + +var convert_1 = convert$1; + +function convert$1(test) { + if (typeof test === 'string') { + return typeFactory(test) + } + + if (test === null || test === undefined) { + return ok$1 + } + + if (typeof test === 'object') { + return ('length' in test ? anyFactory : matchesFactory)(test) + } + + if (typeof test === 'function') { + return test + } + + throw new Error('Expected function, string, or object as test') +} + +function convertAll(tests) { + var results = []; + var length = tests.length; + var index = -1; + + while (++index < length) { + results[index] = convert$1(tests[index]); + } + + return results +} + +// Utility assert each property in `test` is represented in `node`, and each +// values are strictly equal. +function matchesFactory(test) { + return matches + + function matches(node) { + var key; + + for (key in test) { + if (node[key] !== test[key]) { + return false + } + } + + return true + } +} + +function anyFactory(tests) { + var checks = convertAll(tests); + var length = checks.length; + + return matches + + function matches() { + var index = -1; + + while (++index < length) { + if (checks[index].apply(this, arguments)) { + return true + } + } + + return false + } +} + +// Utility to convert a string into a function which checks a given node’s type +// for said string. +function typeFactory(test) { + return type + + function type(node) { + return Boolean(node && node.type === test) + } +} + +// Utility to return true. +function ok$1() { + return true +} + +var unistUtilVisitParents = visitParents; + + + +var CONTINUE = true; +var SKIP = 'skip'; +var EXIT = false; + +visitParents.CONTINUE = CONTINUE; +visitParents.SKIP = SKIP; +visitParents.EXIT = EXIT; + +function visitParents(tree, test, visitor, reverse) { + var is; + + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + is = convert_1(test); + + one(tree, null, []); + + // Visit a single node. + function one(node, index, parents) { + var result = []; + var subresult; + + if (!test || is(node, index, parents[parents.length - 1] || null)) { + result = toResult(visitor(node, parents)); + + if (result[0] === EXIT) { + return result + } + } + + if (node.children && result[0] !== SKIP) { + subresult = toResult(all(node.children, parents.concat(node))); + return subresult[0] === EXIT ? subresult : result + } + + return result + } + + // Visit children in `parent`. + function all(children, parents) { + var min = -1; + var step = reverse ? -1 : 1; + var index = (reverse ? children.length : min) + step; + var result; + + while (index > min && index < children.length) { + result = one(children[index], index, parents); + + if (result[0] === EXIT) { + return result + } + + index = typeof result[1] === 'number' ? result[1] : index + step; + } + } +} + +function toResult(value) { + if (value !== null && typeof value === 'object' && 'length' in value) { + return value + } + + if (typeof value === 'number') { + return [CONTINUE, value] + } + + return [value] +} + +var unistUtilVisit = visit; + + + +var CONTINUE$1 = unistUtilVisitParents.CONTINUE; +var SKIP$1 = unistUtilVisitParents.SKIP; +var EXIT$1 = unistUtilVisitParents.EXIT; + +visit.CONTINUE = CONTINUE$1; +visit.SKIP = SKIP$1; +visit.EXIT = EXIT$1; + +function visit(tree, test, visitor, reverse) { + if (typeof test === 'function' && typeof visitor !== 'function') { + reverse = visitor; + visitor = test; + test = null; + } + + unistUtilVisitParents(tree, test, overload, reverse); + + function overload(node, parents) { + var parent = parents[parents.length - 1]; + var index = parent ? parent.children.indexOf(node) : null; + return visitor(node, index, parent) + } +} + +var unistUtilRemovePosition = removePosition; + +function removePosition(node, force) { + unistUtilVisit(node, force ? hard : soft); + return node +} + +function hard(node) { + delete node.position; +} + +function soft(node) { + node.position = undefined; +} + +var parse_1$3 = parse$9; + +var lineFeed$1 = '\n'; +var lineBreaksExpression = /\r\n|\r/g; + +// Parse the bound file. +function parse$9() { + var self = this; + var value = String(self.file); + var start = {line: 1, column: 1, offset: 0}; + var content = immutable(start); + var node; + + // Clean non-unix newlines: `\r\n` and `\r` are all changed to `\n`. + // This should not affect positional information. + value = value.replace(lineBreaksExpression, lineFeed$1); + + // BOM. + if (value.charCodeAt(0) === 0xfeff) { + value = value.slice(1); + + content.column++; + content.offset++; + } + + node = { + type: 'root', + children: self.tokenizeBlock(value, content), + position: {start: start, end: self.eof || immutable(start)} + }; + + if (!self.options.position) { + unistUtilRemovePosition(node, true); + } + + return node +} + +var isWhitespaceCharacter = whitespace; + +var fromCode = String.fromCharCode; +var re$1 = /\s/; + +// Check if the given character code, or the character code at the first +// character, is a whitespace character. +function whitespace(character) { + return re$1.test( + typeof character === 'number' ? fromCode(character) : character.charAt(0) + ) +} + +var newline_1 = newline; + +var lineFeed$2 = '\n'; + +function newline(eat, value, silent) { + var character = value.charAt(0); + var length; + var subvalue; + var queue; + var index; + + if (character !== lineFeed$2) { + return + } + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + index = 1; + length = value.length; + subvalue = character; + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if (!isWhitespaceCharacter(character)) { + break + } + + queue += character; + + if (character === lineFeed$2) { + subvalue += queue; + queue = ''; + } + + index++; + } + + eat(subvalue); +} + +var trimTrailingLines_1 = trimTrailingLines; + +var line$1 = '\n'; + +// Remove final newline characters from `value`. +function trimTrailingLines(value) { + var val = String(value); + var index = val.length; + + while (val.charAt(--index) === line$1) { + // Empty + } + + return val.slice(0, index + 1) +} + +var codeIndented = indentedCode; + +var lineFeed$3 = '\n'; +var tab$1 = '\t'; +var space$1 = ' '; + +var tabSize = 4; +var codeIndent = repeatString(space$1, tabSize); + +function indentedCode(eat, value, silent) { + var index = -1; + var length = value.length; + var subvalue = ''; + var content = ''; + var subvalueQueue = ''; + var contentQueue = ''; + var character; + var blankQueue; + var indent; + + while (++index < length) { + character = value.charAt(index); + + if (indent) { + indent = false; + + subvalue += subvalueQueue; + content += contentQueue; + subvalueQueue = ''; + contentQueue = ''; + + if (character === lineFeed$3) { + subvalueQueue = character; + contentQueue = character; + } else { + subvalue += character; + content += character; + + while (++index < length) { + character = value.charAt(index); + + if (!character || character === lineFeed$3) { + contentQueue = character; + subvalueQueue = character; + break + } + + subvalue += character; + content += character; + } + } + } else if ( + character === space$1 && + value.charAt(index + 1) === character && + value.charAt(index + 2) === character && + value.charAt(index + 3) === character + ) { + subvalueQueue += codeIndent; + index += 3; + indent = true; + } else if (character === tab$1) { + subvalueQueue += character; + indent = true; + } else { + blankQueue = ''; + + while (character === tab$1 || character === space$1) { + blankQueue += character; + character = value.charAt(++index); + } + + if (character !== lineFeed$3) { + break + } + + subvalueQueue += blankQueue + character; + contentQueue += character; + } + } + + if (content) { + if (silent) { + return true + } + + return eat(subvalue)({ + type: 'code', + lang: null, + meta: null, + value: trimTrailingLines_1(content) + }) + } +} + +var codeFenced = fencedCode; + +var lineFeed$4 = '\n'; +var tab$2 = '\t'; +var space$2 = ' '; +var tilde$1 = '~'; +var graveAccent = '`'; + +var minFenceCount = 3; +var tabSize$1 = 4; + +function fencedCode(eat, value, silent) { + var self = this; + var gfm = self.options.gfm; + var length = value.length + 1; + var index = 0; + var subvalue = ''; + var fenceCount; + var marker; + var character; + var flag; + var lang; + var meta; + var queue; + var content; + var exdentedContent; + var closing; + var exdentedClosing; + var indent; + var now; + + if (!gfm) { + return + } + + // Eat initial spacing. + while (index < length) { + character = value.charAt(index); + + if (character !== space$2 && character !== tab$2) { + break + } + + subvalue += character; + index++; + } + + indent = index; + + // Eat the fence. + character = value.charAt(index); + + if (character !== tilde$1 && character !== graveAccent) { + return + } + + index++; + marker = character; + fenceCount = 1; + subvalue += character; + + while (index < length) { + character = value.charAt(index); + + if (character !== marker) { + break + } + + subvalue += character; + fenceCount++; + index++; + } + + if (fenceCount < minFenceCount) { + return + } + + // Eat spacing before flag. + while (index < length) { + character = value.charAt(index); + + if (character !== space$2 && character !== tab$2) { + break + } + + subvalue += character; + index++; + } + + // Eat flag. + flag = ''; + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if ( + character === lineFeed$4 || + (marker === graveAccent && character === marker) + ) { + break + } + + if (character === space$2 || character === tab$2) { + queue += character; + } else { + flag += queue + character; + queue = ''; + } + + index++; + } + + character = value.charAt(index); + + if (character && character !== lineFeed$4) { + return + } + + if (silent) { + return true + } + + now = eat.now(); + now.column += subvalue.length; + now.offset += subvalue.length; + + subvalue += flag; + flag = self.decode.raw(self.unescape(flag), now); + + if (queue) { + subvalue += queue; + } + + queue = ''; + closing = ''; + exdentedClosing = ''; + content = ''; + exdentedContent = ''; + var skip = true; + + // Eat content. + while (index < length) { + character = value.charAt(index); + content += closing; + exdentedContent += exdentedClosing; + closing = ''; + exdentedClosing = ''; + + if (character !== lineFeed$4) { + content += character; + exdentedClosing += character; + index++; + continue + } + + // The first line feed is ignored. Others aren’t. + if (skip) { + subvalue += character; + skip = false; + } else { + closing += character; + exdentedClosing += character; + } + + queue = ''; + index++; + + while (index < length) { + character = value.charAt(index); + + if (character !== space$2) { + break + } + + queue += character; + index++; + } + + closing += queue; + exdentedClosing += queue.slice(indent); + + if (queue.length >= tabSize$1) { + continue + } + + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if (character !== marker) { + break + } + + queue += character; + index++; + } + + closing += queue; + exdentedClosing += queue; + + if (queue.length < fenceCount) { + continue + } + + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if (character !== space$2 && character !== tab$2) { + break + } + + closing += character; + exdentedClosing += character; + index++; + } + + if (!character || character === lineFeed$4) { + break + } + } + + subvalue += content + closing; + + // Get lang and meta from the flag. + index = -1; + length = flag.length; + + while (++index < length) { + character = flag.charAt(index); + + if (character === space$2 || character === tab$2) { + if (!lang) { + lang = flag.slice(0, index); + } + } else if (lang) { + meta = flag.slice(index); + break + } + } + + return eat(subvalue)({ + type: 'code', + lang: lang || flag || null, + meta: meta || null, + value: exdentedContent + }) +} + +var trim_1 = createCommonjsModule(function (module, exports) { +exports = module.exports = trim; + +function trim(str){ + return str.replace(/^\s*|\s*$/g, ''); +} + +exports.left = function(str){ + return str.replace(/^\s*/, ''); +}; + +exports.right = function(str){ + return str.replace(/\s*$/, ''); +}; +}); +var trim_2 = trim_1.left; +var trim_3 = trim_1.right; + +var interrupt_1 = interrupt; + +function interrupt(interruptors, tokenizers, ctx, params) { + var length = interruptors.length; + var index = -1; + var interruptor; + var config; + + while (++index < length) { + interruptor = interruptors[index]; + config = interruptor[1] || {}; + + if ( + config.pedantic !== undefined && + config.pedantic !== ctx.options.pedantic + ) { + continue + } + + if ( + config.commonmark !== undefined && + config.commonmark !== ctx.options.commonmark + ) { + continue + } + + if (tokenizers[interruptor[0]].apply(ctx, params)) { + return true + } + } + + return false +} + +var blockquote_1 = blockquote; + +var lineFeed$5 = '\n'; +var tab$3 = '\t'; +var space$3 = ' '; +var greaterThan = '>'; + +function blockquote(eat, value, silent) { + var self = this; + var offsets = self.offset; + var tokenizers = self.blockTokenizers; + var interruptors = self.interruptBlockquote; + var now = eat.now(); + var currentLine = now.line; + var length = value.length; + var values = []; + var contents = []; + var indents = []; + var add; + var index = 0; + var character; + var rest; + var nextIndex; + var content; + var line; + var startIndex; + var prefixed; + var exit; + + while (index < length) { + character = value.charAt(index); + + if (character !== space$3 && character !== tab$3) { + break + } + + index++; + } + + if (value.charAt(index) !== greaterThan) { + return + } + + if (silent) { + return true + } + + index = 0; + + while (index < length) { + nextIndex = value.indexOf(lineFeed$5, index); + startIndex = index; + prefixed = false; + + if (nextIndex === -1) { + nextIndex = length; + } + + while (index < length) { + character = value.charAt(index); + + if (character !== space$3 && character !== tab$3) { + break + } + + index++; + } + + if (value.charAt(index) === greaterThan) { + index++; + prefixed = true; + + if (value.charAt(index) === space$3) { + index++; + } + } else { + index = startIndex; + } + + content = value.slice(index, nextIndex); + + if (!prefixed && !trim_1(content)) { + index = startIndex; + break + } + + if (!prefixed) { + rest = value.slice(index); + + // Check if the following code contains a possible block. + if (interrupt_1(interruptors, tokenizers, self, [eat, rest, true])) { + break + } + } + + line = startIndex === index ? content : value.slice(startIndex, nextIndex); + + indents.push(index - startIndex); + values.push(line); + contents.push(content); + + index = nextIndex + 1; + } + + index = -1; + length = indents.length; + add = eat(values.join(lineFeed$5)); + + while (++index < length) { + offsets[currentLine] = (offsets[currentLine] || 0) + indents[index]; + currentLine++; + } + + exit = self.enterBlock(); + contents = self.tokenizeBlock(contents.join(lineFeed$5), now); + exit(); + + return add({type: 'blockquote', children: contents}) +} + +var headingAtx = atxHeading; + +var lineFeed$6 = '\n'; +var tab$4 = '\t'; +var space$4 = ' '; +var numberSign$1 = '#'; + +var maxFenceCount = 6; + +function atxHeading(eat, value, silent) { + var self = this; + var pedantic = self.options.pedantic; + var length = value.length + 1; + var index = -1; + var now = eat.now(); + var subvalue = ''; + var content = ''; + var character; + var queue; + var depth; + + // Eat initial spacing. + while (++index < length) { + character = value.charAt(index); + + if (character !== space$4 && character !== tab$4) { + index--; + break + } + + subvalue += character; + } + + // Eat hashes. + depth = 0; + + while (++index <= length) { + character = value.charAt(index); + + if (character !== numberSign$1) { + index--; + break + } + + subvalue += character; + depth++; + } + + if (depth > maxFenceCount) { + return + } + + if (!depth || (!pedantic && value.charAt(index + 1) === numberSign$1)) { + return + } + + length = value.length + 1; + + // Eat intermediate white-space. + queue = ''; + + while (++index < length) { + character = value.charAt(index); + + if (character !== space$4 && character !== tab$4) { + index--; + break + } + + queue += character; + } + + // Exit when not in pedantic mode without spacing. + if (!pedantic && queue.length === 0 && character && character !== lineFeed$6) { + return + } + + if (silent) { + return true + } + + // Eat content. + subvalue += queue; + queue = ''; + content = ''; + + while (++index < length) { + character = value.charAt(index); + + if (!character || character === lineFeed$6) { + break + } + + if (character !== space$4 && character !== tab$4 && character !== numberSign$1) { + content += queue + character; + queue = ''; + continue + } + + while (character === space$4 || character === tab$4) { + queue += character; + character = value.charAt(++index); + } + + // `#` without a queue is part of the content. + if (!pedantic && content && !queue && character === numberSign$1) { + content += character; + continue + } + + while (character === numberSign$1) { + queue += character; + character = value.charAt(++index); + } + + while (character === space$4 || character === tab$4) { + queue += character; + character = value.charAt(++index); + } + + index--; + } + + now.column += subvalue.length; + now.offset += subvalue.length; + subvalue += content + queue; + + return eat(subvalue)({ + type: 'heading', + depth: depth, + children: self.tokenizeInline(content, now) + }) +} + +var thematicBreak_1 = thematicBreak; + +var tab$5 = '\t'; +var lineFeed$7 = '\n'; +var space$5 = ' '; +var asterisk = '*'; +var dash$1 = '-'; +var underscore = '_'; + +var maxCount = 3; + +function thematicBreak(eat, value, silent) { + var index = -1; + var length = value.length + 1; + var subvalue = ''; + var character; + var marker; + var markerCount; + var queue; + + while (++index < length) { + character = value.charAt(index); + + if (character !== tab$5 && character !== space$5) { + break + } + + subvalue += character; + } + + if ( + character !== asterisk && + character !== dash$1 && + character !== underscore + ) { + return + } + + marker = character; + subvalue += character; + markerCount = 1; + queue = ''; + + while (++index < length) { + character = value.charAt(index); + + if (character === marker) { + markerCount++; + subvalue += queue + marker; + queue = ''; + } else if (character === space$5) { + queue += character; + } else if ( + markerCount >= maxCount && + (!character || character === lineFeed$7) + ) { + subvalue += queue; + + if (silent) { + return true + } + + return eat(subvalue)({type: 'thematicBreak'}) + } else { + return + } + } +} + +var getIndentation = indentation; + +var tab$6 = '\t'; +var space$6 = ' '; + +var spaceSize = 1; +var tabSize$2 = 4; + +// Gets indentation information for a line. +function indentation(value) { + var index = 0; + var indent = 0; + var character = value.charAt(index); + var stops = {}; + var size; + + while (character === tab$6 || character === space$6) { + size = character === tab$6 ? tabSize$2 : spaceSize; + + indent += size; + + if (size > 1) { + indent = Math.floor(indent / size) * size; + } + + stops[indent] = index; + character = value.charAt(++index); + } + + return {indent: indent, stops: stops} +} + +var removeIndentation = indentation$1; + +var tab$7 = '\t'; +var lineFeed$8 = '\n'; +var space$7 = ' '; +var exclamationMark = '!'; + +// Remove the minimum indent from every line in `value`. Supports both tab, +// spaced, and mixed indentation (as well as possible). +function indentation$1(value, maximum) { + var values = value.split(lineFeed$8); + var position = values.length + 1; + var minIndent = Infinity; + var matrix = []; + var index; + var indentation; + var stops; + var padding; + + values.unshift(repeatString(space$7, maximum) + exclamationMark); + + while (position--) { + indentation = getIndentation(values[position]); + + matrix[position] = indentation.stops; + + if (trim_1(values[position]).length === 0) { + continue + } + + if (indentation.indent) { + if (indentation.indent > 0 && indentation.indent < minIndent) { + minIndent = indentation.indent; + } + } else { + minIndent = Infinity; + + break + } + } + + if (minIndent !== Infinity) { + position = values.length; + + while (position--) { + stops = matrix[position]; + index = minIndent; + + while (index && !(index in stops)) { + index--; + } + + if ( + trim_1(values[position]).length !== 0 && + minIndent && + index !== minIndent + ) { + padding = tab$7; + } else { + padding = ''; + } + + values[position] = + padding + values[position].slice(index in stops ? stops[index] + 1 : 0); + } + } + + values.shift(); + + return values.join(lineFeed$8) +} + +var list_1 = list; + +var asterisk$1 = '*'; +var underscore$1 = '_'; +var plusSign = '+'; +var dash$2 = '-'; +var dot$1 = '.'; +var space$8 = ' '; +var lineFeed$9 = '\n'; +var tab$8 = '\t'; +var rightParenthesis = ')'; +var lowercaseX$1 = 'x'; + +var tabSize$3 = 4; +var looseListItemExpression = /\n\n(?!\s*$)/; +var taskItemExpression = /^\[([ \t]|x|X)][ \t]/; +var bulletExpression = /^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/; +var pedanticBulletExpression = /^([ \t]*)([*+-]|\d+[.)])([ \t]+)/; +var initialIndentExpression = /^( {1,4}|\t)?/gm; + +function list(eat, value, silent) { + var self = this; + var commonmark = self.options.commonmark; + var pedantic = self.options.pedantic; + var tokenizers = self.blockTokenizers; + var interuptors = self.interruptList; + var index = 0; + var length = value.length; + var start = null; + var size = 0; + var queue; + var ordered; + var character; + var marker; + var nextIndex; + var startIndex; + var prefixed; + var currentMarker; + var content; + var line; + var prevEmpty; + var empty; + var items; + var allLines; + var emptyLines; + var item; + var enterTop; + var exitBlockquote; + var spread = false; + var node; + var now; + var end; + var indented; + + while (index < length) { + character = value.charAt(index); + + if (character === tab$8) { + size += tabSize$3 - (size % tabSize$3); + } else if (character === space$8) { + size++; + } else { + break + } + + index++; + } + + if (size >= tabSize$3) { + return + } + + character = value.charAt(index); + + if (character === asterisk$1 || character === plusSign || character === dash$2) { + marker = character; + ordered = false; + } else { + ordered = true; + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if (!isDecimal(character)) { + break + } + + queue += character; + index++; + } + + character = value.charAt(index); + + if ( + !queue || + !(character === dot$1 || (commonmark && character === rightParenthesis)) + ) { + return + } + + start = parseInt(queue, 10); + marker = character; + } + + character = value.charAt(++index); + + if ( + character !== space$8 && + character !== tab$8 && + (pedantic || (character !== lineFeed$9 && character !== '')) + ) { + return + } + + if (silent) { + return true + } + + index = 0; + items = []; + allLines = []; + emptyLines = []; + + while (index < length) { + nextIndex = value.indexOf(lineFeed$9, index); + startIndex = index; + prefixed = false; + indented = false; + + if (nextIndex === -1) { + nextIndex = length; + } + + end = index + tabSize$3; + size = 0; + + while (index < length) { + character = value.charAt(index); + + if (character === tab$8) { + size += tabSize$3 - (size % tabSize$3); + } else if (character === space$8) { + size++; + } else { + break + } + + index++; + } + + if (size >= tabSize$3) { + indented = true; + } + + if (item && size >= item.indent) { + indented = true; + } + + character = value.charAt(index); + currentMarker = null; + + if (!indented) { + if ( + character === asterisk$1 || + character === plusSign || + character === dash$2 + ) { + currentMarker = character; + index++; + size++; + } else { + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if (!isDecimal(character)) { + break + } + + queue += character; + index++; + } + + character = value.charAt(index); + index++; + + if ( + queue && + (character === dot$1 || (commonmark && character === rightParenthesis)) + ) { + currentMarker = character; + size += queue.length + 1; + } + } + + if (currentMarker) { + character = value.charAt(index); + + if (character === tab$8) { + size += tabSize$3 - (size % tabSize$3); + index++; + } else if (character === space$8) { + end = index + tabSize$3; + + while (index < end) { + if (value.charAt(index) !== space$8) { + break + } + + index++; + size++; + } + + if (index === end && value.charAt(index) === space$8) { + index -= tabSize$3 - 1; + size -= tabSize$3 - 1; + } + } else if (character !== lineFeed$9 && character !== '') { + currentMarker = null; + } + } + } + + if (currentMarker) { + if (!pedantic && marker !== currentMarker) { + break + } + + prefixed = true; + } else { + if (!commonmark && !indented && value.charAt(startIndex) === space$8) { + indented = true; + } else if (commonmark && item) { + indented = size >= item.indent || size > tabSize$3; + } + + prefixed = false; + index = startIndex; + } + + line = value.slice(startIndex, nextIndex); + content = startIndex === index ? line : value.slice(index, nextIndex); + + if ( + currentMarker === asterisk$1 || + currentMarker === underscore$1 || + currentMarker === dash$2 + ) { + if (tokenizers.thematicBreak.call(self, eat, line, true)) { + break + } + } + + prevEmpty = empty; + empty = !prefixed && !trim_1(content).length; + + if (indented && item) { + item.value = item.value.concat(emptyLines, line); + allLines = allLines.concat(emptyLines, line); + emptyLines = []; + } else if (prefixed) { + if (emptyLines.length !== 0) { + spread = true; + item.value.push(''); + item.trail = emptyLines.concat(); + } + + item = { + value: [line], + indent: size, + trail: [] + }; + + items.push(item); + allLines = allLines.concat(emptyLines, line); + emptyLines = []; + } else if (empty) { + if (prevEmpty && !commonmark) { + break + } + + emptyLines.push(line); + } else { + if (prevEmpty) { + break + } + + if (interrupt_1(interuptors, tokenizers, self, [eat, line, true])) { + break + } + + item.value = item.value.concat(emptyLines, line); + allLines = allLines.concat(emptyLines, line); + emptyLines = []; + } + + index = nextIndex + 1; + } + + node = eat(allLines.join(lineFeed$9)).reset({ + type: 'list', + ordered: ordered, + start: start, + spread: spread, + children: [] + }); + + enterTop = self.enterList(); + exitBlockquote = self.enterBlock(); + index = -1; + length = items.length; + + while (++index < length) { + item = items[index].value.join(lineFeed$9); + now = eat.now(); + + eat(item)(listItem(self, item, now), node); + + item = items[index].trail.join(lineFeed$9); + + if (index !== length - 1) { + item += lineFeed$9; + } + + eat(item); + } + + enterTop(); + exitBlockquote(); + + return node +} + +function listItem(ctx, value, position) { + var offsets = ctx.offset; + var fn = ctx.options.pedantic ? pedanticListItem : normalListItem; + var checked = null; + var task; + var indent; + + value = fn.apply(null, arguments); + + if (ctx.options.gfm) { + task = value.match(taskItemExpression); + + if (task) { + indent = task[0].length; + checked = task[1].toLowerCase() === lowercaseX$1; + offsets[position.line] += indent; + value = value.slice(indent); + } + } + + return { + type: 'listItem', + spread: looseListItemExpression.test(value), + checked: checked, + children: ctx.tokenizeBlock(value, position) + } +} + +// Create a list-item using overly simple mechanics. +function pedanticListItem(ctx, value, position) { + var offsets = ctx.offset; + var line = position.line; + + // Remove the list-item’s bullet. + value = value.replace(pedanticBulletExpression, replacer); + + // The initial line was also matched by the below, so we reset the `line`. + line = position.line; + + return value.replace(initialIndentExpression, replacer) + + // A simple replacer which removed all matches, and adds their length to + // `offset`. + function replacer($0) { + offsets[line] = (offsets[line] || 0) + $0.length; + line++; + + return '' + } +} + +// Create a list-item using sane mechanics. +function normalListItem(ctx, value, position) { + var offsets = ctx.offset; + var line = position.line; + var max; + var bullet; + var rest; + var lines; + var trimmedLines; + var index; + var length; + + // Remove the list-item’s bullet. + value = value.replace(bulletExpression, replacer); + + lines = value.split(lineFeed$9); + + trimmedLines = removeIndentation(value, getIndentation(max).indent).split(lineFeed$9); + + // We replaced the initial bullet with something else above, which was used + // to trick `removeIndentation` into removing some more characters when + // possible. However, that could result in the initial line to be stripped + // more than it should be. + trimmedLines[0] = rest; + + offsets[line] = (offsets[line] || 0) + bullet.length; + line++; + + index = 0; + length = lines.length; + + while (++index < length) { + offsets[line] = + (offsets[line] || 0) + lines[index].length - trimmedLines[index].length; + line++; + } + + return trimmedLines.join(lineFeed$9) + + /* eslint-disable-next-line max-params */ + function replacer($0, $1, $2, $3, $4) { + bullet = $1 + $2 + $3; + rest = $4; + + // Make sure that the first nine numbered list items can indent with an + // extra space. That is, when the bullet did not receive an extra final + // space. + if (Number($2) < 10 && bullet.length % 2 === 1) { + $2 = space$8 + $2; + } + + max = $1 + repeatString(space$8, $2.length) + $3; + + return max + rest + } +} + +var headingSetext = setextHeading; + +var lineFeed$a = '\n'; +var tab$9 = '\t'; +var space$9 = ' '; +var equalsTo$1 = '='; +var dash$3 = '-'; + +var maxIndent = 3; + +var equalsToDepth = 1; +var dashDepth = 2; + +function setextHeading(eat, value, silent) { + var self = this; + var now = eat.now(); + var length = value.length; + var index = -1; + var subvalue = ''; + var content; + var queue; + var character; + var marker; + var depth; + + // Eat initial indentation. + while (++index < length) { + character = value.charAt(index); + + if (character !== space$9 || index >= maxIndent) { + index--; + break + } + + subvalue += character; + } + + // Eat content. + content = ''; + queue = ''; + + while (++index < length) { + character = value.charAt(index); + + if (character === lineFeed$a) { + index--; + break + } + + if (character === space$9 || character === tab$9) { + queue += character; + } else { + content += queue + character; + queue = ''; + } + } + + now.column += subvalue.length; + now.offset += subvalue.length; + subvalue += content + queue; + + // Ensure the content is followed by a newline and a valid marker. + character = value.charAt(++index); + marker = value.charAt(++index); + + if (character !== lineFeed$a || (marker !== equalsTo$1 && marker !== dash$3)) { + return + } + + subvalue += character; + + // Eat Setext-line. + queue = marker; + depth = marker === equalsTo$1 ? equalsToDepth : dashDepth; + + while (++index < length) { + character = value.charAt(index); + + if (character !== marker) { + if (character !== lineFeed$a) { + return + } + + index--; + break + } + + queue += character; + } + + if (silent) { + return true + } + + return eat(subvalue + queue)({ + type: 'heading', + depth: depth, + children: self.tokenizeInline(content, now) + }) +} + +var attributeName = '[a-zA-Z_:][a-zA-Z0-9:._-]*'; +var unquoted = '[^"\'=<>`\\u0000-\\u0020]+'; +var singleQuoted = "'[^']*'"; +var doubleQuoted = '"[^"]*"'; +var attributeValue = + '(?:' + unquoted + '|' + singleQuoted + '|' + doubleQuoted + ')'; +var attribute = + '(?:\\s+' + attributeName + '(?:\\s*=\\s*' + attributeValue + ')?)'; +var openTag = '<[A-Za-z][A-Za-z0-9\\-]*' + attribute + '*\\s*\\/?>'; +var closeTag = '<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>'; +var comment = '|'; +var processing = '<[?].*?[?]>'; +var declaration = ']*>'; +var cdata = ''; + +var openCloseTag = new RegExp('^(?:' + openTag + '|' + closeTag + ')'); + +var tag = new RegExp( + '^(?:' + + openTag + + '|' + + closeTag + + '|' + + comment + + '|' + + processing + + '|' + + declaration + + '|' + + cdata + + ')' +); + +var html = { + openCloseTag: openCloseTag, + tag: tag +}; + +var openCloseTag$1 = html.openCloseTag; + +var htmlBlock = blockHtml; + +var tab$a = '\t'; +var space$a = ' '; +var lineFeed$b = '\n'; +var lessThan$1 = '<'; + +var rawOpenExpression = /^<(script|pre|style)(?=(\s|>|$))/i; +var rawCloseExpression = /<\/(script|pre|style)>/i; +var commentOpenExpression = /^/; +var instructionOpenExpression = /^<\?/; +var instructionCloseExpression = /\?>/; +var directiveOpenExpression = /^/; +var cdataOpenExpression = /^/; +var elementCloseExpression = /^$/; +var otherElementOpenExpression = new RegExp(openCloseTag$1.source + '\\s*$'); + +function blockHtml(eat, value, silent) { + var self = this; + var blocks = self.options.blocks.join('|'); + var elementOpenExpression = new RegExp( + '^|$))', + 'i' + ); + var length = value.length; + var index = 0; + var next; + var line; + var offset; + var character; + var count; + var sequence; + var subvalue; + + var sequences = [ + [rawOpenExpression, rawCloseExpression, true], + [commentOpenExpression, commentCloseExpression, true], + [instructionOpenExpression, instructionCloseExpression, true], + [directiveOpenExpression, directiveCloseExpression, true], + [cdataOpenExpression, cdataCloseExpression, true], + [elementOpenExpression, elementCloseExpression, true], + [otherElementOpenExpression, elementCloseExpression, false] + ]; + + // Eat initial spacing. + while (index < length) { + character = value.charAt(index); + + if (character !== tab$a && character !== space$a) { + break + } + + index++; + } + + if (value.charAt(index) !== lessThan$1) { + return + } + + next = value.indexOf(lineFeed$b, index + 1); + next = next === -1 ? length : next; + line = value.slice(index, next); + offset = -1; + count = sequences.length; + + while (++offset < count) { + if (sequences[offset][0].test(line)) { + sequence = sequences[offset]; + break + } + } + + if (!sequence) { + return + } + + if (silent) { + return sequence[2] + } + + index = next; + + if (!sequence[1].test(line)) { + while (index < length) { + next = value.indexOf(lineFeed$b, index + 1); + next = next === -1 ? length : next; + line = value.slice(index + 1, next); + + if (sequence[1].test(line)) { + if (line) { + index = next; + } + + break + } + + index = next; + } + } + + subvalue = value.slice(0, index); + + return eat(subvalue)({type: 'html', value: subvalue}) +} + +var collapseWhiteSpace = collapse; + +// `collapse(' \t\nbar \nbaz\t') // ' bar baz '` +function collapse(value) { + return String(value).replace(/\s+/g, ' ') +} + +var normalize_1 = normalize$2; + +// Normalize an identifier. Collapses multiple white space characters into a +// single space, and removes casing. +function normalize$2(value) { + return collapseWhiteSpace(value).toLowerCase() +} + +var footnoteDefinition_1 = footnoteDefinition; +footnoteDefinition.notInList = true; +footnoteDefinition.notInBlock = true; + +var backslash$2 = '\\'; +var lineFeed$c = '\n'; +var tab$b = '\t'; +var space$b = ' '; +var leftSquareBracket = '['; +var rightSquareBracket = ']'; +var caret$1 = '^'; +var colon$1 = ':'; + +var EXPRESSION_INITIAL_TAB = /^( {4}|\t)?/gm; + +function footnoteDefinition(eat, value, silent) { + var self = this; + var offsets = self.offset; + var index; + var length; + var subvalue; + var now; + var currentLine; + var content; + var queue; + var subqueue; + var character; + var identifier; + var add; + var exit; + + if (!self.options.footnotes) { + return + } + + index = 0; + length = value.length; + subvalue = ''; + now = eat.now(); + currentLine = now.line; + + while (index < length) { + character = value.charAt(index); + + if (!isWhitespaceCharacter(character)) { + break + } + + subvalue += character; + index++; + } + + if ( + value.charAt(index) !== leftSquareBracket || + value.charAt(index + 1) !== caret$1 + ) { + return + } + + subvalue += leftSquareBracket + caret$1; + index = subvalue.length; + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if (character === rightSquareBracket) { + break + } else if (character === backslash$2) { + queue += character; + index++; + character = value.charAt(index); + } + + queue += character; + index++; + } + + if ( + !queue || + value.charAt(index) !== rightSquareBracket || + value.charAt(index + 1) !== colon$1 + ) { + return + } + + if (silent) { + return true + } + + identifier = queue; + subvalue += queue + rightSquareBracket + colon$1; + index = subvalue.length; + + while (index < length) { + character = value.charAt(index); + + if (character !== tab$b && character !== space$b) { + break + } + + subvalue += character; + index++; + } + + now.column += subvalue.length; + now.offset += subvalue.length; + queue = ''; + content = ''; + subqueue = ''; + + while (index < length) { + character = value.charAt(index); + + if (character === lineFeed$c) { + subqueue = character; + index++; + + while (index < length) { + character = value.charAt(index); + + if (character !== lineFeed$c) { + break + } + + subqueue += character; + index++; + } + + queue += subqueue; + subqueue = ''; + + while (index < length) { + character = value.charAt(index); + + if (character !== space$b) { + break + } + + subqueue += character; + index++; + } + + if (subqueue.length === 0) { + break + } + + queue += subqueue; + } + + if (queue) { + content += queue; + queue = ''; + } + + content += character; + index++; + } + + subvalue += content; + + content = content.replace(EXPRESSION_INITIAL_TAB, function(line) { + offsets[currentLine] = (offsets[currentLine] || 0) + line.length; + currentLine++; + + return '' + }); + + add = eat(subvalue); + + exit = self.enterBlock(); + content = self.tokenizeBlock(content, now); + exit(); + + return add({ + type: 'footnoteDefinition', + identifier: normalize_1(identifier), + label: identifier, + children: content + }) +} + +var definition_1 = definition; + +var quotationMark = '"'; +var apostrophe = "'"; +var backslash$3 = '\\'; +var lineFeed$d = '\n'; +var tab$c = '\t'; +var space$c = ' '; +var leftSquareBracket$1 = '['; +var rightSquareBracket$1 = ']'; +var leftParenthesis = '('; +var rightParenthesis$1 = ')'; +var colon$2 = ':'; +var lessThan$2 = '<'; +var greaterThan$1 = '>'; + +function definition(eat, value, silent) { + var self = this; + var commonmark = self.options.commonmark; + var index = 0; + var length = value.length; + var subvalue = ''; + var beforeURL; + var beforeTitle; + var queue; + var character; + var test; + var identifier; + var url; + var title; + + while (index < length) { + character = value.charAt(index); + + if (character !== space$c && character !== tab$c) { + break + } + + subvalue += character; + index++; + } + + character = value.charAt(index); + + if (character !== leftSquareBracket$1) { + return + } + + index++; + subvalue += character; + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if (character === rightSquareBracket$1) { + break + } else if (character === backslash$3) { + queue += character; + index++; + character = value.charAt(index); + } + + queue += character; + index++; + } + + if ( + !queue || + value.charAt(index) !== rightSquareBracket$1 || + value.charAt(index + 1) !== colon$2 + ) { + return + } + + identifier = queue; + subvalue += queue + rightSquareBracket$1 + colon$2; + index = subvalue.length; + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if (character !== tab$c && character !== space$c && character !== lineFeed$d) { + break + } + + subvalue += character; + index++; + } + + character = value.charAt(index); + queue = ''; + beforeURL = subvalue; + + if (character === lessThan$2) { + index++; + + while (index < length) { + character = value.charAt(index); + + if (!isEnclosedURLCharacter(character)) { + break + } + + queue += character; + index++; + } + + character = value.charAt(index); + + if (character === isEnclosedURLCharacter.delimiter) { + subvalue += lessThan$2 + queue + character; + index++; + } else { + if (commonmark) { + return + } + + index -= queue.length + 1; + queue = ''; + } + } + + if (!queue) { + while (index < length) { + character = value.charAt(index); + + if (!isUnclosedURLCharacter(character)) { + break + } + + queue += character; + index++; + } + + subvalue += queue; + } + + if (!queue) { + return + } + + url = queue; + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if (character !== tab$c && character !== space$c && character !== lineFeed$d) { + break + } + + queue += character; + index++; + } + + character = value.charAt(index); + test = null; + + if (character === quotationMark) { + test = quotationMark; + } else if (character === apostrophe) { + test = apostrophe; + } else if (character === leftParenthesis) { + test = rightParenthesis$1; + } + + if (!test) { + queue = ''; + index = subvalue.length; + } else if (queue) { + subvalue += queue + character; + index = subvalue.length; + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if (character === test) { + break + } + + if (character === lineFeed$d) { + index++; + character = value.charAt(index); + + if (character === lineFeed$d || character === test) { + return + } + + queue += lineFeed$d; + } + + queue += character; + index++; + } + + character = value.charAt(index); + + if (character !== test) { + return + } + + beforeTitle = subvalue; + subvalue += queue + character; + index++; + title = queue; + queue = ''; + } else { + return + } + + while (index < length) { + character = value.charAt(index); + + if (character !== tab$c && character !== space$c) { + break + } + + subvalue += character; + index++; + } + + character = value.charAt(index); + + if (!character || character === lineFeed$d) { + if (silent) { + return true + } + + beforeURL = eat(beforeURL).test().end; + url = self.decode.raw(self.unescape(url), beforeURL, {nonTerminated: false}); + + if (title) { + beforeTitle = eat(beforeTitle).test().end; + title = self.decode.raw(self.unescape(title), beforeTitle); + } + + return eat(subvalue)({ + type: 'definition', + identifier: normalize_1(identifier), + label: identifier, + title: title || null, + url: url + }) + } +} + +// Check if `character` can be inside an enclosed URI. +function isEnclosedURLCharacter(character) { + return ( + character !== greaterThan$1 && + character !== leftSquareBracket$1 && + character !== rightSquareBracket$1 + ) +} + +isEnclosedURLCharacter.delimiter = greaterThan$1; + +// Check if `character` can be inside an unclosed URI. +function isUnclosedURLCharacter(character) { + return ( + character !== leftSquareBracket$1 && + character !== rightSquareBracket$1 && + !isWhitespaceCharacter(character) + ) +} + +var table_1 = table; + +var tab$d = '\t'; +var lineFeed$e = '\n'; +var space$d = ' '; +var dash$4 = '-'; +var colon$3 = ':'; +var backslash$4 = '\\'; +var verticalBar = '|'; + +var minColumns = 1; +var minRows = 2; + +var left = 'left'; +var center = 'center'; +var right = 'right'; + +function table(eat, value, silent) { + var self = this; + var index; + var alignments; + var alignment; + var subvalue; + var row; + var length; + var lines; + var queue; + var character; + var hasDash; + var align; + var cell; + var preamble; + var now; + var position; + var lineCount; + var line; + var rows; + var table; + var lineIndex; + var pipeIndex; + var first; + + // Exit when not in gfm-mode. + if (!self.options.gfm) { + return + } + + // Get the rows. + // Detecting tables soon is hard, so there are some checks for performance + // here, such as the minimum number of rows, and allowed characters in the + // alignment row. + index = 0; + lineCount = 0; + length = value.length + 1; + lines = []; + + while (index < length) { + lineIndex = value.indexOf(lineFeed$e, index); + pipeIndex = value.indexOf(verticalBar, index + 1); + + if (lineIndex === -1) { + lineIndex = value.length; + } + + if (pipeIndex === -1 || pipeIndex > lineIndex) { + if (lineCount < minRows) { + return + } + + break + } + + lines.push(value.slice(index, lineIndex)); + lineCount++; + index = lineIndex + 1; + } + + // Parse the alignment row. + subvalue = lines.join(lineFeed$e); + alignments = lines.splice(1, 1)[0] || []; + index = 0; + length = alignments.length; + lineCount--; + alignment = false; + align = []; + + while (index < length) { + character = alignments.charAt(index); + + if (character === verticalBar) { + hasDash = null; + + if (alignment === false) { + if (first === false) { + return + } + } else { + align.push(alignment); + alignment = false; + } + + first = false; + } else if (character === dash$4) { + hasDash = true; + alignment = alignment || null; + } else if (character === colon$3) { + if (alignment === left) { + alignment = center; + } else if (hasDash && alignment === null) { + alignment = right; + } else { + alignment = left; + } + } else if (!isWhitespaceCharacter(character)) { + return + } + + index++; + } + + if (alignment !== false) { + align.push(alignment); + } + + // Exit when without enough columns. + if (align.length < minColumns) { + return + } + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + // Parse the rows. + position = -1; + rows = []; + + table = eat(subvalue).reset({type: 'table', align: align, children: rows}); + + while (++position < lineCount) { + line = lines[position]; + row = {type: 'tableRow', children: []}; + + // Eat a newline character when this is not the first row. + if (position) { + eat(lineFeed$e); + } + + // Eat the row. + eat(line).reset(row, table); + + length = line.length + 1; + index = 0; + queue = ''; + cell = ''; + preamble = true; + + while (index < length) { + character = line.charAt(index); + + if (character === tab$d || character === space$d) { + if (cell) { + queue += character; + } else { + eat(character); + } + + index++; + continue + } + + if (character === '' || character === verticalBar) { + if (preamble) { + eat(character); + } else { + if ((cell || character) && !preamble) { + subvalue = cell; + + if (queue.length > 1) { + if (character) { + subvalue += queue.slice(0, queue.length - 1); + queue = queue.charAt(queue.length - 1); + } else { + subvalue += queue; + queue = ''; + } + } + + now = eat.now(); + + eat(subvalue)( + {type: 'tableCell', children: self.tokenizeInline(cell, now)}, + row + ); + } + + eat(queue + character); + + queue = ''; + cell = ''; + } + } else { + if (queue) { + cell += queue; + queue = ''; + } + + cell += character; + + if (character === backslash$4 && index !== length - 2) { + cell += line.charAt(index + 1); + index++; + } + } + + preamble = false; + index++; + } + + // Eat the alignment row. + if (!position) { + eat(lineFeed$e + alignments); + } + } + + return table +} + +var paragraph_1 = paragraph; + +var tab$e = '\t'; +var lineFeed$f = '\n'; +var space$e = ' '; + +var tabSize$4 = 4; + +// Tokenise paragraph. +function paragraph(eat, value, silent) { + var self = this; + var settings = self.options; + var commonmark = settings.commonmark; + var gfm = settings.gfm; + var tokenizers = self.blockTokenizers; + var interruptors = self.interruptParagraph; + var index = value.indexOf(lineFeed$f); + var length = value.length; + var position; + var subvalue; + var character; + var size; + var now; + + while (index < length) { + // Eat everything if there’s no following newline. + if (index === -1) { + index = length; + break + } + + // Stop if the next character is NEWLINE. + if (value.charAt(index + 1) === lineFeed$f) { + break + } + + // In commonmark-mode, following indented lines are part of the paragraph. + if (commonmark) { + size = 0; + position = index + 1; + + while (position < length) { + character = value.charAt(position); + + if (character === tab$e) { + size = tabSize$4; + break + } else if (character === space$e) { + size++; + } else { + break + } + + position++; + } + + if (size >= tabSize$4 && character !== lineFeed$f) { + index = value.indexOf(lineFeed$f, index + 1); + continue + } + } + + subvalue = value.slice(index + 1); + + // Check if the following code contains a possible block. + if (interrupt_1(interruptors, tokenizers, self, [eat, subvalue, true])) { + break + } + + // Break if the following line starts a list, when already in a list, or + // when in commonmark, or when in gfm mode and the bullet is *not* numeric. + if ( + tokenizers.list.call(self, eat, subvalue, true) && + (self.inList || + commonmark || + (gfm && !isDecimal(trim_1.left(subvalue).charAt(0)))) + ) { + break + } + + position = index; + index = value.indexOf(lineFeed$f, index + 1); + + if (index !== -1 && trim_1(value.slice(position, index)) === '') { + index = position; + break + } + } + + subvalue = value.slice(0, index); + + if (trim_1(subvalue) === '') { + eat(subvalue); + + return null + } + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + now = eat.now(); + subvalue = trimTrailingLines_1(subvalue); + + return eat(subvalue)({ + type: 'paragraph', + children: self.tokenizeInline(subvalue, now) + }) +} + +var _escape = locate; + +function locate(value, fromIndex) { + return value.indexOf('\\', fromIndex) +} + +var _escape$1 = escape$1; +escape$1.locator = _escape; + +var lineFeed$g = '\n'; +var backslash$5 = '\\'; + +function escape$1(eat, value, silent) { + var self = this; + var character; + var node; + + if (value.charAt(0) === backslash$5) { + character = value.charAt(1); + + if (self.escape.indexOf(character) !== -1) { + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + if (character === lineFeed$g) { + node = {type: 'break'}; + } else { + node = {type: 'text', value: character}; + } + + return eat(backslash$5 + character)(node) + } + } +} + +var tag$1 = locate$1; + +function locate$1(value, fromIndex) { + return value.indexOf('<', fromIndex) +} + +var autoLink_1 = autoLink; +autoLink.locator = tag$1; +autoLink.notInLink = true; + +var lessThan$3 = '<'; +var greaterThan$2 = '>'; +var atSign = '@'; +var slash$1 = '/'; +var mailto = 'mailto:'; +var mailtoLength = mailto.length; + +function autoLink(eat, value, silent) { + var self = this; + var subvalue = ''; + var length = value.length; + var index = 0; + var queue = ''; + var hasAtCharacter = false; + var link = ''; + var character; + var now; + var content; + var tokenizers; + var exit; + + if (value.charAt(0) !== lessThan$3) { + return + } + + index++; + subvalue = lessThan$3; + + while (index < length) { + character = value.charAt(index); + + if ( + isWhitespaceCharacter(character) || + character === greaterThan$2 || + character === atSign || + (character === ':' && value.charAt(index + 1) === slash$1) + ) { + break + } + + queue += character; + index++; + } + + if (!queue) { + return + } + + link += queue; + queue = ''; + + character = value.charAt(index); + link += character; + index++; + + if (character === atSign) { + hasAtCharacter = true; + } else { + if (character !== ':' || value.charAt(index + 1) !== slash$1) { + return + } + + link += slash$1; + index++; + } + + while (index < length) { + character = value.charAt(index); + + if (isWhitespaceCharacter(character) || character === greaterThan$2) { + break + } + + queue += character; + index++; + } + + character = value.charAt(index); + + if (!queue || character !== greaterThan$2) { + return + } + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + link += queue; + content = link; + subvalue += link + character; + now = eat.now(); + now.column++; + now.offset++; + + if (hasAtCharacter) { + if (link.slice(0, mailtoLength).toLowerCase() === mailto) { + content = content.slice(mailtoLength); + now.column += mailtoLength; + now.offset += mailtoLength; + } else { + link = mailto + link; + } + } + + // Temporarily remove all tokenizers except text in autolinks. + tokenizers = self.inlineTokenizers; + self.inlineTokenizers = {text: tokenizers.text}; + + exit = self.enterLink(); + + content = self.tokenizeInline(content, now); + + self.inlineTokenizers = tokenizers; + exit(); + + return eat(subvalue)({ + type: 'link', + title: null, + url: parseEntities_1(link, {nonTerminated: false}), + children: content + }) +} + +var url = locate$2; + +var protocols = ['https://', 'http://', 'mailto:']; + +function locate$2(value, fromIndex) { + var length = protocols.length; + var index = -1; + var min = -1; + var position; + + if (!this.options.gfm) { + return -1 + } + + while (++index < length) { + position = value.indexOf(protocols[index], fromIndex); + + if (position !== -1 && (position < min || min === -1)) { + min = position; + } + } + + return min +} + +var url_1 = url$1; +url$1.locator = url; +url$1.notInLink = true; + +var quotationMark$1 = '"'; +var apostrophe$1 = "'"; +var leftParenthesis$1 = '('; +var rightParenthesis$2 = ')'; +var comma$1 = ','; +var dot$2 = '.'; +var colon$4 = ':'; +var semicolon$1 = ';'; +var lessThan$4 = '<'; +var atSign$1 = '@'; +var leftSquareBracket$2 = '['; +var rightSquareBracket$2 = ']'; + +var http = 'http://'; +var https = 'https://'; +var mailto$1 = 'mailto:'; + +var protocols$1 = [http, https, mailto$1]; + +var protocolsLength = protocols$1.length; + +function url$1(eat, value, silent) { + var self = this; + var subvalue; + var content; + var character; + var index; + var position; + var protocol; + var match; + var length; + var queue; + var parenCount; + var nextCharacter; + var tokenizers; + var exit; + + if (!self.options.gfm) { + return + } + + subvalue = ''; + index = -1; + + while (++index < protocolsLength) { + protocol = protocols$1[index]; + match = value.slice(0, protocol.length); + + if (match.toLowerCase() === protocol) { + subvalue = match; + break + } + } + + if (!subvalue) { + return + } + + index = subvalue.length; + length = value.length; + queue = ''; + parenCount = 0; + + while (index < length) { + character = value.charAt(index); + + if (isWhitespaceCharacter(character) || character === lessThan$4) { + break + } + + if ( + character === dot$2 || + character === comma$1 || + character === colon$4 || + character === semicolon$1 || + character === quotationMark$1 || + character === apostrophe$1 || + character === rightParenthesis$2 || + character === rightSquareBracket$2 + ) { + nextCharacter = value.charAt(index + 1); + + if (!nextCharacter || isWhitespaceCharacter(nextCharacter)) { + break + } + } + + if (character === leftParenthesis$1 || character === leftSquareBracket$2) { + parenCount++; + } + + if (character === rightParenthesis$2 || character === rightSquareBracket$2) { + parenCount--; + + if (parenCount < 0) { + break + } + } + + queue += character; + index++; + } + + if (!queue) { + return + } + + subvalue += queue; + content = subvalue; + + if (protocol === mailto$1) { + position = queue.indexOf(atSign$1); + + if (position === -1 || position === length - 1) { + return + } + + content = content.slice(mailto$1.length); + } + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + exit = self.enterLink(); + + // Temporarily remove all tokenizers except text in url. + tokenizers = self.inlineTokenizers; + self.inlineTokenizers = {text: tokenizers.text}; + + content = self.tokenizeInline(content, eat.now()); + + self.inlineTokenizers = tokenizers; + exit(); + + return eat(subvalue)({ + type: 'link', + title: null, + url: parseEntities_1(subvalue, {nonTerminated: false}), + children: content + }) +} + +var tag$2 = html.tag; + +var htmlInline = inlineHTML; +inlineHTML.locator = tag$1; + +var lessThan$5 = '<'; +var questionMark = '?'; +var exclamationMark$1 = '!'; +var slash$2 = '/'; + +var htmlLinkOpenExpression = /^/i; + +function inlineHTML(eat, value, silent) { + var self = this; + var length = value.length; + var character; + var subvalue; + + if (value.charAt(0) !== lessThan$5 || length < 3) { + return + } + + character = value.charAt(1); + + if ( + !isAlphabetical(character) && + character !== questionMark && + character !== exclamationMark$1 && + character !== slash$2 + ) { + return + } + + subvalue = value.match(tag$2); + + if (!subvalue) { + return + } + + /* istanbul ignore if - not used yet. */ + if (silent) { + return true + } + + subvalue = subvalue[0]; + + if (!self.inLink && htmlLinkOpenExpression.test(subvalue)) { + self.inLink = true; + } else if (self.inLink && htmlLinkCloseExpression.test(subvalue)) { + self.inLink = false; + } + + return eat(subvalue)({type: 'html', value: subvalue}) +} + +var link$1 = locate$3; + +function locate$3(value, fromIndex) { + var link = value.indexOf('[', fromIndex); + var image = value.indexOf('![', fromIndex); + + if (image === -1) { + return link + } + + // Link can never be `-1` if an image is found, so we don’t need to check + // for that :) + return link < image ? link : image +} + +var link_1 = link$2; +link$2.locator = link$1; + +var lineFeed$h = '\n'; +var exclamationMark$2 = '!'; +var quotationMark$2 = '"'; +var apostrophe$2 = "'"; +var leftParenthesis$2 = '('; +var rightParenthesis$3 = ')'; +var lessThan$6 = '<'; +var greaterThan$3 = '>'; +var leftSquareBracket$3 = '['; +var backslash$6 = '\\'; +var rightSquareBracket$3 = ']'; +var graveAccent$1 = '`'; + +function link$2(eat, value, silent) { + var self = this; + var subvalue = ''; + var index = 0; + var character = value.charAt(0); + var pedantic = self.options.pedantic; + var commonmark = self.options.commonmark; + var gfm = self.options.gfm; + var closed; + var count; + var opening; + var beforeURL; + var beforeTitle; + var subqueue; + var hasMarker; + var isImage; + var content; + var marker; + var length; + var title; + var depth; + var queue; + var url; + var now; + var exit; + var node; + + // Detect whether this is an image. + if (character === exclamationMark$2) { + isImage = true; + subvalue = character; + character = value.charAt(++index); + } + + // Eat the opening. + if (character !== leftSquareBracket$3) { + return + } + + // Exit when this is a link and we’re already inside a link. + if (!isImage && self.inLink) { + return + } + + subvalue += character; + queue = ''; + index++; + + // Eat the content. + length = value.length; + now = eat.now(); + depth = 0; + + now.column += index; + now.offset += index; + + while (index < length) { + character = value.charAt(index); + subqueue = character; + + if (character === graveAccent$1) { + // Inline-code in link content. + count = 1; + + while (value.charAt(index + 1) === graveAccent$1) { + subqueue += character; + index++; + count++; + } + + if (!opening) { + opening = count; + } else if (count >= opening) { + opening = 0; + } + } else if (character === backslash$6) { + // Allow brackets to be escaped. + index++; + subqueue += value.charAt(index); + } else if ((!opening || gfm) && character === leftSquareBracket$3) { + // In GFM mode, brackets in code still count. In all other modes, + // they don’t. + depth++; + } else if ((!opening || gfm) && character === rightSquareBracket$3) { + if (depth) { + depth--; + } else { + // Allow white-space between content and url in GFM mode. + if (!pedantic) { + while (index < length) { + character = value.charAt(index + 1); + + if (!isWhitespaceCharacter(character)) { + break + } + + subqueue += character; + index++; + } + } + + if (value.charAt(index + 1) !== leftParenthesis$2) { + return + } + + subqueue += leftParenthesis$2; + closed = true; + index++; + + break + } + } + + queue += subqueue; + subqueue = ''; + index++; + } + + // Eat the content closing. + if (!closed) { + return + } + + content = queue; + subvalue += queue + subqueue; + index++; + + // Eat white-space. + while (index < length) { + character = value.charAt(index); + + if (!isWhitespaceCharacter(character)) { + break + } + + subvalue += character; + index++; + } + + // Eat the URL. + character = value.charAt(index); + queue = ''; + beforeURL = subvalue; + + if (character === lessThan$6) { + index++; + beforeURL += lessThan$6; + + while (index < length) { + character = value.charAt(index); + + if (character === greaterThan$3) { + break + } + + if (commonmark && character === lineFeed$h) { + return + } + + queue += character; + index++; + } + + if (value.charAt(index) !== greaterThan$3) { + return + } + + subvalue += lessThan$6 + queue + greaterThan$3; + url = queue; + index++; + } else { + character = null; + subqueue = ''; + + while (index < length) { + character = value.charAt(index); + + if ( + subqueue && + (character === quotationMark$2 || + character === apostrophe$2 || + (commonmark && character === leftParenthesis$2)) + ) { + break + } + + if (isWhitespaceCharacter(character)) { + if (!pedantic) { + break + } + + subqueue += character; + } else { + if (character === leftParenthesis$2) { + depth++; + } else if (character === rightParenthesis$3) { + if (depth === 0) { + break + } + + depth--; + } + + queue += subqueue; + subqueue = ''; + + if (character === backslash$6) { + queue += backslash$6; + character = value.charAt(++index); + } + + queue += character; + } + + index++; + } + + subvalue += queue; + url = queue; + index = subvalue.length; + } + + // Eat white-space. + queue = ''; + + while (index < length) { + character = value.charAt(index); + + if (!isWhitespaceCharacter(character)) { + break + } + + queue += character; + index++; + } + + character = value.charAt(index); + subvalue += queue; + + // Eat the title. + if ( + queue && + (character === quotationMark$2 || + character === apostrophe$2 || + (commonmark && character === leftParenthesis$2)) + ) { + index++; + subvalue += character; + queue = ''; + marker = character === leftParenthesis$2 ? rightParenthesis$3 : character; + beforeTitle = subvalue; + + // In commonmark-mode, things are pretty easy: the marker cannot occur + // inside the title. Non-commonmark does, however, support nested + // delimiters. + if (commonmark) { + while (index < length) { + character = value.charAt(index); + + if (character === marker) { + break + } + + if (character === backslash$6) { + queue += backslash$6; + character = value.charAt(++index); + } + + index++; + queue += character; + } + + character = value.charAt(index); + + if (character !== marker) { + return + } + + title = queue; + subvalue += queue + character; + index++; + + while (index < length) { + character = value.charAt(index); + + if (!isWhitespaceCharacter(character)) { + break + } + + subvalue += character; + index++; + } + } else { + subqueue = ''; + + while (index < length) { + character = value.charAt(index); + + if (character === marker) { + if (hasMarker) { + queue += marker + subqueue; + subqueue = ''; + } + + hasMarker = true; + } else if (!hasMarker) { + queue += character; + } else if (character === rightParenthesis$3) { + subvalue += queue + marker + subqueue; + title = queue; + break + } else if (isWhitespaceCharacter(character)) { + subqueue += character; + } else { + queue += marker + subqueue + character; + subqueue = ''; + hasMarker = false; + } + + index++; + } + } + } + + if (value.charAt(index) !== rightParenthesis$3) { + return + } + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + subvalue += rightParenthesis$3; + + url = self.decode.raw(self.unescape(url), eat(beforeURL).test().end, { + nonTerminated: false + }); + + if (title) { + beforeTitle = eat(beforeTitle).test().end; + title = self.decode.raw(self.unescape(title), beforeTitle); + } + + node = { + type: isImage ? 'image' : 'link', + title: title || null, + url: url + }; + + if (isImage) { + node.alt = self.decode.raw(self.unescape(content), now) || null; + } else { + exit = self.enterLink(); + node.children = self.tokenizeInline(content, now); + exit(); + } + + return eat(subvalue)(node) +} + +var reference_1 = reference; +reference.locator = link$1; + +var link$3 = 'link'; +var image$1 = 'image'; +var footnote = 'footnote'; +var shortcut = 'shortcut'; +var collapsed = 'collapsed'; +var full = 'full'; +var space$f = ' '; +var exclamationMark$3 = '!'; +var leftSquareBracket$4 = '['; +var backslash$7 = '\\'; +var rightSquareBracket$4 = ']'; +var caret$2 = '^'; + +function reference(eat, value, silent) { + var self = this; + var commonmark = self.options.commonmark; + var footnotes = self.options.footnotes; + var character = value.charAt(0); + var index = 0; + var length = value.length; + var subvalue = ''; + var intro = ''; + var type = link$3; + var referenceType = shortcut; + var content; + var identifier; + var now; + var node; + var exit; + var queue; + var bracketed; + var depth; + + // Check whether we’re eating an image. + if (character === exclamationMark$3) { + type = image$1; + intro = character; + character = value.charAt(++index); + } + + if (character !== leftSquareBracket$4) { + return + } + + index++; + intro += character; + queue = ''; + + // Check whether we’re eating a footnote. + if (footnotes && value.charAt(index) === caret$2) { + // Exit if `![^` is found, so the `!` will be seen as text after this, + // and we’ll enter this function again when `[^` is found. + if (type === image$1) { + return + } + + intro += caret$2; + index++; + type = footnote; + } + + // Eat the text. + depth = 0; + + while (index < length) { + character = value.charAt(index); + + if (character === leftSquareBracket$4) { + bracketed = true; + depth++; + } else if (character === rightSquareBracket$4) { + if (!depth) { + break + } + + depth--; + } + + if (character === backslash$7) { + queue += backslash$7; + character = value.charAt(++index); + } + + queue += character; + index++; + } + + subvalue = queue; + content = queue; + character = value.charAt(index); + + if (character !== rightSquareBracket$4) { + return + } + + index++; + subvalue += character; + queue = ''; + + if (!commonmark) { + // The original markdown syntax definition explicitly allows for whitespace + // between the link text and link label; commonmark departs from this, in + // part to improve support for shortcut reference links + while (index < length) { + character = value.charAt(index); + + if (!isWhitespaceCharacter(character)) { + break + } + + queue += character; + index++; + } + } + + character = value.charAt(index); + + // Inline footnotes cannot have a label. + // If footnotes are enabled, link labels cannot start with a caret. + if ( + type !== footnote && + character === leftSquareBracket$4 && + (!footnotes || value.charAt(index + 1) !== caret$2) + ) { + identifier = ''; + queue += character; + index++; + + while (index < length) { + character = value.charAt(index); + + if (character === leftSquareBracket$4 || character === rightSquareBracket$4) { + break + } + + if (character === backslash$7) { + identifier += backslash$7; + character = value.charAt(++index); + } + + identifier += character; + index++; + } + + character = value.charAt(index); + + if (character === rightSquareBracket$4) { + referenceType = identifier ? full : collapsed; + queue += identifier + character; + index++; + } else { + identifier = ''; + } + + subvalue += queue; + queue = ''; + } else { + if (!content) { + return + } + + identifier = content; + } + + // Brackets cannot be inside the identifier. + if (referenceType !== full && bracketed) { + return + } + + subvalue = intro + subvalue; + + if (type === link$3 && self.inLink) { + return null + } + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + if (type === footnote && content.indexOf(space$f) !== -1) { + return eat(subvalue)({ + type: footnote, + children: this.tokenizeInline(content, eat.now()) + }) + } + + now = eat.now(); + now.column += intro.length; + now.offset += intro.length; + identifier = referenceType === full ? identifier : content; + + node = { + type: type + 'Reference', + identifier: normalize_1(identifier), + label: identifier + }; + + if (type === link$3 || type === image$1) { + node.referenceType = referenceType; + } + + if (type === link$3) { + exit = self.enterLink(); + node.children = self.tokenizeInline(content, now); + exit(); + } else if (type === image$1) { + node.alt = self.decode.raw(self.unescape(content), now) || null; + } + + return eat(subvalue)(node) +} + +var strong = locate$4; + +function locate$4(value, fromIndex) { + var asterisk = value.indexOf('**', fromIndex); + var underscore = value.indexOf('__', fromIndex); + + if (underscore === -1) { + return asterisk + } + + if (asterisk === -1) { + return underscore + } + + return underscore < asterisk ? underscore : asterisk +} + +var strong_1 = strong$1; +strong$1.locator = strong; + +var backslash$8 = '\\'; +var asterisk$2 = '*'; +var underscore$2 = '_'; + +function strong$1(eat, value, silent) { + var self = this; + var index = 0; + var character = value.charAt(index); + var now; + var pedantic; + var marker; + var queue; + var subvalue; + var length; + var prev; + + if ( + (character !== asterisk$2 && character !== underscore$2) || + value.charAt(++index) !== character + ) { + return + } + + pedantic = self.options.pedantic; + marker = character; + subvalue = marker + marker; + length = value.length; + index++; + queue = ''; + character = ''; + + if (pedantic && isWhitespaceCharacter(value.charAt(index))) { + return + } + + while (index < length) { + prev = character; + character = value.charAt(index); + + if ( + character === marker && + value.charAt(index + 1) === marker && + (!pedantic || !isWhitespaceCharacter(prev)) + ) { + character = value.charAt(index + 2); + + if (character !== marker) { + if (!trim_1(queue)) { + return + } + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + now = eat.now(); + now.column += 2; + now.offset += 2; + + return eat(subvalue + queue + subvalue)({ + type: 'strong', + children: self.tokenizeInline(queue, now) + }) + } + } + + if (!pedantic && character === backslash$8) { + queue += character; + character = value.charAt(++index); + } + + queue += character; + index++; + } +} + +var isWordCharacter = wordCharacter; + +var fromCode$1 = String.fromCharCode; +var re$2 = /\w/; + +// Check if the given character code, or the character code at the first +// character, is a word character. +function wordCharacter(character) { + return re$2.test( + typeof character === 'number' ? fromCode$1(character) : character.charAt(0) + ) +} + +var emphasis = locate$5; + +function locate$5(value, fromIndex) { + var asterisk = value.indexOf('*', fromIndex); + var underscore = value.indexOf('_', fromIndex); + + if (underscore === -1) { + return asterisk + } + + if (asterisk === -1) { + return underscore + } + + return underscore < asterisk ? underscore : asterisk +} + +var emphasis_1 = emphasis$1; +emphasis$1.locator = emphasis; + +var asterisk$3 = '*'; +var underscore$3 = '_'; +var backslash$9 = '\\'; + +function emphasis$1(eat, value, silent) { + var self = this; + var index = 0; + var character = value.charAt(index); + var now; + var pedantic; + var marker; + var queue; + var subvalue; + var length; + var prev; + + if (character !== asterisk$3 && character !== underscore$3) { + return + } + + pedantic = self.options.pedantic; + subvalue = character; + marker = character; + length = value.length; + index++; + queue = ''; + character = ''; + + if (pedantic && isWhitespaceCharacter(value.charAt(index))) { + return + } + + while (index < length) { + prev = character; + character = value.charAt(index); + + if (character === marker && (!pedantic || !isWhitespaceCharacter(prev))) { + character = value.charAt(++index); + + if (character !== marker) { + if (!trim_1(queue) || prev === marker) { + return + } + + if (!pedantic && marker === underscore$3 && isWordCharacter(character)) { + queue += marker; + continue + } + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + now = eat.now(); + now.column++; + now.offset++; + + return eat(subvalue + queue + marker)({ + type: 'emphasis', + children: self.tokenizeInline(queue, now) + }) + } + + queue += marker; + } + + if (!pedantic && character === backslash$9) { + queue += character; + character = value.charAt(++index); + } + + queue += character; + index++; + } +} + +var _delete = locate$6; + +function locate$6(value, fromIndex) { + return value.indexOf('~~', fromIndex) +} + +var _delete$1 = strikethrough; +strikethrough.locator = _delete; + +var tilde$2 = '~'; +var fence = '~~'; + +function strikethrough(eat, value, silent) { + var self = this; + var character = ''; + var previous = ''; + var preceding = ''; + var subvalue = ''; + var index; + var length; + var now; + + if ( + !self.options.gfm || + value.charAt(0) !== tilde$2 || + value.charAt(1) !== tilde$2 || + isWhitespaceCharacter(value.charAt(2)) + ) { + return + } + + index = 1; + length = value.length; + now = eat.now(); + now.column += 2; + now.offset += 2; + + while (++index < length) { + character = value.charAt(index); + + if ( + character === tilde$2 && + previous === tilde$2 && + (!preceding || !isWhitespaceCharacter(preceding)) + ) { + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + return eat(fence + subvalue + fence)({ + type: 'delete', + children: self.tokenizeInline(subvalue, now) + }) + } + + subvalue += previous; + preceding = previous; + previous = character; + } +} + +var codeInline = locate$7; + +function locate$7(value, fromIndex) { + return value.indexOf('`', fromIndex) +} + +var codeInline$1 = inlineCode; +inlineCode.locator = codeInline; + +var lineFeed$i = 10; // '\n' +var space$g = 32; // ' ' +var graveAccent$2 = 96; // '`' + +function inlineCode(eat, value, silent) { + var length = value.length; + var index = 0; + var openingFenceEnd; + var closingFenceStart; + var closingFenceEnd; + var code; + var next; + var found; + + while (index < length) { + if (value.charCodeAt(index) !== graveAccent$2) { + break + } + + index++; + } + + if (index === 0 || index === length) { + return + } + + openingFenceEnd = index; + next = value.charCodeAt(index); + + while (index < length) { + code = next; + next = value.charCodeAt(index + 1); + + if (code === graveAccent$2) { + if (closingFenceStart === undefined) { + closingFenceStart = index; + } + + closingFenceEnd = index + 1; + + if ( + next !== graveAccent$2 && + closingFenceEnd - closingFenceStart === openingFenceEnd + ) { + found = true; + break + } + } else if (closingFenceStart !== undefined) { + closingFenceStart = undefined; + closingFenceEnd = undefined; + } + + index++; + } + + if (!found) { + return + } + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + // Remove the initial and final space (or line feed), iff they exist and there + // are non-space characters in the content. + index = openingFenceEnd; + length = closingFenceStart; + code = value.charCodeAt(index); + next = value.charCodeAt(length - 1); + found = false; + + if ( + length - index > 2 && + (code === space$g || code === lineFeed$i) && + (next === space$g || next === lineFeed$i) + ) { + index++; + length--; + + while (index < length) { + code = value.charCodeAt(index); + + if (code !== space$g && code !== lineFeed$i) { + found = true; + break + } + + index++; + } + + if (found === true) { + openingFenceEnd++; + closingFenceStart--; + } + } + + return eat(value.slice(0, closingFenceEnd))({ + type: 'inlineCode', + value: value.slice(openingFenceEnd, closingFenceStart) + }) +} + +var _break = locate$8; + +function locate$8(value, fromIndex) { + var index = value.indexOf('\n', fromIndex); + + while (index > fromIndex) { + if (value.charAt(index - 1) !== ' ') { + break + } + + index--; + } + + return index +} + +var _break$1 = hardBreak; +hardBreak.locator = _break; + +var space$h = ' '; +var lineFeed$j = '\n'; +var minBreakLength = 2; + +function hardBreak(eat, value, silent) { + var length = value.length; + var index = -1; + var queue = ''; + var character; + + while (++index < length) { + character = value.charAt(index); + + if (character === lineFeed$j) { + if (index < minBreakLength) { + return + } + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + queue += character; + + return eat(queue)({type: 'break'}) + } + + if (character !== space$h) { + return + } + + queue += character; + } +} + +var text_1 = text; + +function text(eat, value, silent) { + var self = this; + var methods; + var tokenizers; + var index; + var length; + var subvalue; + var position; + var tokenizer; + var name; + var min; + var now; + + /* istanbul ignore if - never used (yet) */ + if (silent) { + return true + } + + methods = self.inlineMethods; + length = methods.length; + tokenizers = self.inlineTokenizers; + index = -1; + min = value.length; + + while (++index < length) { + name = methods[index]; + + if (name === 'text' || !tokenizers[name]) { + continue + } + + tokenizer = tokenizers[name].locator; + + if (!tokenizer) { + eat.file.fail('Missing locator: `' + name + '`'); + } + + position = tokenizer.call(self, value, 1); + + if (position !== -1 && position < min) { + min = position; + } + } + + subvalue = value.slice(0, min); + now = eat.now(); + + self.decode(subvalue, now, handler); + + function handler(content, position, source) { + eat(source || content)({type: 'text', value: content}); + } +} + +var parser = Parser; + +function Parser(doc, file) { + this.file = file; + this.offset = {}; + this.options = immutable(this.options); + this.setOptions({}); + + this.inList = false; + this.inBlock = false; + this.inLink = false; + this.atStart = true; + + this.toOffset = vfileLocation(file).toOffset; + this.unescape = _unescape(this, 'escape'); + this.decode = decode(this); +} + +var proto$3 = Parser.prototype; + +// Expose core. +proto$3.setOptions = setOptions_1; +proto$3.parse = parse_1$3; + +// Expose `defaults`. +proto$3.options = defaults$2; + +// Enter and exit helpers. +proto$3.exitStart = stateToggle('atStart', true); +proto$3.enterList = stateToggle('inList', false); +proto$3.enterLink = stateToggle('inLink', false); +proto$3.enterBlock = stateToggle('inBlock', false); + +// Nodes that can interupt a paragraph: +// +// ```markdown +// A paragraph, followed by a thematic break. +// ___ +// ``` +// +// In the above example, the thematic break “interupts” the paragraph. +proto$3.interruptParagraph = [ + ['thematicBreak'], + ['atxHeading'], + ['fencedCode'], + ['blockquote'], + ['html'], + ['setextHeading', {commonmark: false}], + ['definition', {commonmark: false}], + ['footnote', {commonmark: false}] +]; + +// Nodes that can interupt a list: +// +// ```markdown +// - One +// ___ +// ``` +// +// In the above example, the thematic break “interupts” the list. +proto$3.interruptList = [ + ['atxHeading', {pedantic: false}], + ['fencedCode', {pedantic: false}], + ['thematicBreak', {pedantic: false}], + ['definition', {commonmark: false}], + ['footnote', {commonmark: false}] +]; + +// Nodes that can interupt a blockquote: +// +// ```markdown +// > A paragraph. +// ___ +// ``` +// +// In the above example, the thematic break “interupts” the blockquote. +proto$3.interruptBlockquote = [ + ['indentedCode', {commonmark: true}], + ['fencedCode', {commonmark: true}], + ['atxHeading', {commonmark: true}], + ['setextHeading', {commonmark: true}], + ['thematicBreak', {commonmark: true}], + ['html', {commonmark: true}], + ['list', {commonmark: true}], + ['definition', {commonmark: false}], + ['footnote', {commonmark: false}] +]; + +// Handlers. +proto$3.blockTokenizers = { + newline: newline_1, + indentedCode: codeIndented, + fencedCode: codeFenced, + blockquote: blockquote_1, + atxHeading: headingAtx, + thematicBreak: thematicBreak_1, + list: list_1, + setextHeading: headingSetext, + html: htmlBlock, + footnote: footnoteDefinition_1, + definition: definition_1, + table: table_1, + paragraph: paragraph_1 +}; + +proto$3.inlineTokenizers = { + escape: _escape$1, + autoLink: autoLink_1, + url: url_1, + html: htmlInline, + link: link_1, + reference: reference_1, + strong: strong_1, + emphasis: emphasis_1, + deletion: _delete$1, + code: codeInline$1, + break: _break$1, + text: text_1 +}; + +// Expose precedence. +proto$3.blockMethods = keys$1(proto$3.blockTokenizers); +proto$3.inlineMethods = keys$1(proto$3.inlineTokenizers); + +// Tokenizers. +proto$3.tokenizeBlock = tokenizer('block'); +proto$3.tokenizeInline = tokenizer('inline'); +proto$3.tokenizeFactory = tokenizer; + +// Get all keys in `value`. +function keys$1(value) { + var result = []; + var key; + + for (key in value) { + result.push(key); + } + + return result +} + +var remarkParse = parse$a; +parse$a.Parser = parser; + +function parse$a(options) { + var settings = this.data('settings'); + var Local = unherit_1(parser); + + Local.prototype.options = immutable(Local.prototype.options, settings, options); + + this.Parser = Local; +} + +var identity_1 = identity; + +function identity(value) { + return value +} + +var enterLinkReference = enter; + +// Shortcut and collapsed link references need no escaping and encoding during +// the processing of child nodes (it must be implied from identifier). +// +// This toggler turns encoding and escaping off for shortcut and collapsed +// references. +// +// Implies `enterLink`. +function enter(compiler, node) { + var encode = compiler.encode; + var escape = compiler.escape; + var exitLink = compiler.enterLink(); + + if (node.referenceType !== 'shortcut' && node.referenceType !== 'collapsed') { + return exitLink + } + + compiler.escape = identity_1; + compiler.encode = identity_1; + + return exit + + function exit() { + compiler.encode = encode; + compiler.escape = escape; + exitLink(); + } +} + +var defaults$3 = { + gfm: true, + commonmark: false, + pedantic: false, + entities: 'false', + setext: false, + closeAtx: false, + looseTable: false, + spacedTable: true, + paddedTable: true, + stringLength: stringLength, + incrementListMarker: true, + fences: false, + fence: '`', + bullet: '-', + listItemIndent: 'tab', + rule: '*', + ruleSpaces: true, + ruleRepetition: 3, + strong: '*', + emphasis: '_' +}; + +function stringLength(value) { + return value.length +} + +const nbsp$2 = " "; +const iexcl$2 = "¡"; +const cent$2 = "¢"; +const pound$2 = "£"; +const curren$2 = "¤"; +const yen$2 = "¥"; +const brvbar$2 = "¦"; +const sect$2 = "§"; +const uml$2 = "¨"; +const copy$3 = "©"; +const ordf$2 = "ª"; +const laquo$2 = "«"; +const not$2 = "¬"; +const shy$2 = "­"; +const reg$2 = "®"; +const macr$2 = "¯"; +const deg$2 = "°"; +const plusmn$2 = "±"; +const sup2$2 = "²"; +const sup3$2 = "³"; +const acute$2 = "´"; +const micro$2 = "µ"; +const para$2 = "¶"; +const middot$2 = "·"; +const cedil$2 = "¸"; +const sup1$2 = "¹"; +const ordm$2 = "º"; +const raquo$2 = "»"; +const frac14$2 = "¼"; +const frac12$2 = "½"; +const frac34$2 = "¾"; +const iquest$2 = "¿"; +const Agrave$2 = "À"; +const Aacute$2 = "Á"; +const Acirc$2 = "Â"; +const Atilde$2 = "Ã"; +const Auml$2 = "Ä"; +const Aring$2 = "Å"; +const AElig$2 = "Æ"; +const Ccedil$2 = "Ç"; +const Egrave$2 = "È"; +const Eacute$2 = "É"; +const Ecirc$2 = "Ê"; +const Euml$2 = "Ë"; +const Igrave$2 = "Ì"; +const Iacute$2 = "Í"; +const Icirc$2 = "Î"; +const Iuml$2 = "Ï"; +const ETH$2 = "Ð"; +const Ntilde$2 = "Ñ"; +const Ograve$2 = "Ò"; +const Oacute$2 = "Ó"; +const Ocirc$2 = "Ô"; +const Otilde$2 = "Õ"; +const Ouml$2 = "Ö"; +const times$2 = "×"; +const Oslash$2 = "Ø"; +const Ugrave$2 = "Ù"; +const Uacute$2 = "Ú"; +const Ucirc$2 = "Û"; +const Uuml$2 = "Ü"; +const Yacute$2 = "Ý"; +const THORN$2 = "Þ"; +const szlig$2 = "ß"; +const agrave$2 = "à"; +const aacute$2 = "á"; +const acirc$2 = "â"; +const atilde$2 = "ã"; +const auml$2 = "ä"; +const aring$2 = "å"; +const aelig$2 = "æ"; +const ccedil$2 = "ç"; +const egrave$2 = "è"; +const eacute$2 = "é"; +const ecirc$2 = "ê"; +const euml$2 = "ë"; +const igrave$2 = "ì"; +const iacute$2 = "í"; +const icirc$2 = "î"; +const iuml$2 = "ï"; +const eth$2 = "ð"; +const ntilde$2 = "ñ"; +const ograve$2 = "ò"; +const oacute$2 = "ó"; +const ocirc$2 = "ô"; +const otilde$2 = "õ"; +const ouml$2 = "ö"; +const divide$2 = "÷"; +const oslash$2 = "ø"; +const ugrave$2 = "ù"; +const uacute$2 = "ú"; +const ucirc$2 = "û"; +const uuml$2 = "ü"; +const yacute$2 = "ý"; +const thorn$2 = "þ"; +const yuml$2 = "ÿ"; +const fnof$1 = "ƒ"; +const Alpha$1 = "Α"; +const Beta$1 = "Β"; +const Gamma$1 = "Γ"; +const Delta$1 = "Δ"; +const Epsilon$1 = "Ε"; +const Zeta$1 = "Ζ"; +const Eta$1 = "Η"; +const Theta$1 = "Θ"; +const Iota$1 = "Ι"; +const Kappa$1 = "Κ"; +const Lambda$1 = "Λ"; +const Mu$1 = "Μ"; +const Nu$1 = "Ν"; +const Xi$1 = "Ξ"; +const Omicron$1 = "Ο"; +const Pi$1 = "Π"; +const Rho$1 = "Ρ"; +const Sigma$1 = "Σ"; +const Tau$1 = "Τ"; +const Upsilon$1 = "Υ"; +const Phi$1 = "Φ"; +const Chi$1 = "Χ"; +const Psi$1 = "Ψ"; +const Omega$1 = "Ω"; +const alpha$1 = "α"; +const beta$1 = "β"; +const gamma$1 = "γ"; +const delta$1 = "δ"; +const epsilon$1 = "ε"; +const zeta$1 = "ζ"; +const eta$1 = "η"; +const theta$1 = "θ"; +const iota$1 = "ι"; +const kappa$1 = "κ"; +const lambda$1 = "λ"; +const mu$1 = "μ"; +const nu$1 = "ν"; +const xi$1 = "ξ"; +const omicron$1 = "ο"; +const pi$1 = "π"; +const rho$1 = "ρ"; +const sigmaf$1 = "ς"; +const sigma$1 = "σ"; +const tau$1 = "τ"; +const upsilon$1 = "υ"; +const phi$1 = "φ"; +const chi$1 = "χ"; +const psi$1 = "ψ"; +const omega$1 = "ω"; +const thetasym$1 = "ϑ"; +const upsih$1 = "ϒ"; +const piv$1 = "ϖ"; +const bull$1 = "•"; +const hellip$1 = "…"; +const prime$1 = "′"; +const Prime$1 = "″"; +const oline$1 = "‾"; +const frasl$1 = "⁄"; +const weierp$1 = "℘"; +const image$2 = "ℑ"; +const real$1 = "ℜ"; +const trade$1 = "™"; +const alefsym$1 = "ℵ"; +const larr$1 = "←"; +const uarr$1 = "↑"; +const rarr$1 = "→"; +const darr$1 = "↓"; +const harr$1 = "↔"; +const crarr$1 = "↵"; +const lArr$1 = "⇐"; +const uArr$1 = "⇑"; +const rArr$1 = "⇒"; +const dArr$1 = "⇓"; +const hArr$1 = "⇔"; +const forall$1 = "∀"; +const part$1 = "∂"; +const exist$1 = "∃"; +const empty$1 = "∅"; +const nabla$1 = "∇"; +const isin$1 = "∈"; +const notin$1 = "∉"; +const ni$1 = "∋"; +const prod$1 = "∏"; +const sum$1 = "∑"; +const minus$1 = "−"; +const lowast$1 = "∗"; +const radic$1 = "√"; +const prop$1 = "∝"; +const infin$1 = "∞"; +const ang$1 = "∠"; +const and$1 = "∧"; +const or$1 = "∨"; +const cap$1 = "∩"; +const cup$1 = "∪"; +const int$1 = "∫"; +const there4$1 = "∴"; +const sim$1 = "∼"; +const cong$1 = "≅"; +const asymp$1 = "≈"; +const ne$1 = "≠"; +const equiv$1 = "≡"; +const le$1 = "≤"; +const ge$1 = "≥"; +const sub$1 = "⊂"; +const sup$1 = "⊃"; +const nsub$1 = "⊄"; +const sube$1 = "⊆"; +const supe$1 = "⊇"; +const oplus$1 = "⊕"; +const otimes$1 = "⊗"; +const perp$1 = "⊥"; +const sdot$1 = "⋅"; +const lceil$1 = "⌈"; +const rceil$1 = "⌉"; +const lfloor$1 = "⌊"; +const rfloor$1 = "⌋"; +const lang$1 = "〈"; +const rang$1 = "〉"; +const loz$1 = "◊"; +const spades$1 = "♠"; +const clubs$1 = "♣"; +const hearts$1 = "♥"; +const diams$1 = "♦"; +const quot$2 = "\""; +const amp$2 = "&"; +const lt$2 = "<"; +const gt$2 = ">"; +const OElig$1 = "Œ"; +const oelig$1 = "œ"; +const Scaron$1 = "Š"; +const scaron$1 = "š"; +const Yuml$1 = "Ÿ"; +const circ$1 = "ˆ"; +const tilde$3 = "˜"; +const ensp$1 = " "; +const emsp$1 = " "; +const thinsp$1 = " "; +const zwnj$1 = "‌"; +const zwj$1 = "‍"; +const lrm$1 = "‎"; +const rlm$1 = "‏"; +const ndash$1 = "–"; +const mdash$1 = "—"; +const lsquo$1 = "‘"; +const rsquo$1 = "’"; +const sbquo$1 = "‚"; +const ldquo$1 = "“"; +const rdquo$1 = "”"; +const bdquo$1 = "„"; +const dagger$1 = "†"; +const Dagger$1 = "‡"; +const permil$1 = "‰"; +const lsaquo$1 = "‹"; +const rsaquo$1 = "›"; +const euro$1 = "€"; +var index$4 = { + nbsp: nbsp$2, + iexcl: iexcl$2, + cent: cent$2, + pound: pound$2, + curren: curren$2, + yen: yen$2, + brvbar: brvbar$2, + sect: sect$2, + uml: uml$2, + copy: copy$3, + ordf: ordf$2, + laquo: laquo$2, + not: not$2, + shy: shy$2, + reg: reg$2, + macr: macr$2, + deg: deg$2, + plusmn: plusmn$2, + sup2: sup2$2, + sup3: sup3$2, + acute: acute$2, + micro: micro$2, + para: para$2, + middot: middot$2, + cedil: cedil$2, + sup1: sup1$2, + ordm: ordm$2, + raquo: raquo$2, + frac14: frac14$2, + frac12: frac12$2, + frac34: frac34$2, + iquest: iquest$2, + Agrave: Agrave$2, + Aacute: Aacute$2, + Acirc: Acirc$2, + Atilde: Atilde$2, + Auml: Auml$2, + Aring: Aring$2, + AElig: AElig$2, + Ccedil: Ccedil$2, + Egrave: Egrave$2, + Eacute: Eacute$2, + Ecirc: Ecirc$2, + Euml: Euml$2, + Igrave: Igrave$2, + Iacute: Iacute$2, + Icirc: Icirc$2, + Iuml: Iuml$2, + ETH: ETH$2, + Ntilde: Ntilde$2, + Ograve: Ograve$2, + Oacute: Oacute$2, + Ocirc: Ocirc$2, + Otilde: Otilde$2, + Ouml: Ouml$2, + times: times$2, + Oslash: Oslash$2, + Ugrave: Ugrave$2, + Uacute: Uacute$2, + Ucirc: Ucirc$2, + Uuml: Uuml$2, + Yacute: Yacute$2, + THORN: THORN$2, + szlig: szlig$2, + agrave: agrave$2, + aacute: aacute$2, + acirc: acirc$2, + atilde: atilde$2, + auml: auml$2, + aring: aring$2, + aelig: aelig$2, + ccedil: ccedil$2, + egrave: egrave$2, + eacute: eacute$2, + ecirc: ecirc$2, + euml: euml$2, + igrave: igrave$2, + iacute: iacute$2, + icirc: icirc$2, + iuml: iuml$2, + eth: eth$2, + ntilde: ntilde$2, + ograve: ograve$2, + oacute: oacute$2, + ocirc: ocirc$2, + otilde: otilde$2, + ouml: ouml$2, + divide: divide$2, + oslash: oslash$2, + ugrave: ugrave$2, + uacute: uacute$2, + ucirc: ucirc$2, + uuml: uuml$2, + yacute: yacute$2, + thorn: thorn$2, + yuml: yuml$2, + fnof: fnof$1, + Alpha: Alpha$1, + Beta: Beta$1, + Gamma: Gamma$1, + Delta: Delta$1, + Epsilon: Epsilon$1, + Zeta: Zeta$1, + Eta: Eta$1, + Theta: Theta$1, + Iota: Iota$1, + Kappa: Kappa$1, + Lambda: Lambda$1, + Mu: Mu$1, + Nu: Nu$1, + Xi: Xi$1, + Omicron: Omicron$1, + Pi: Pi$1, + Rho: Rho$1, + Sigma: Sigma$1, + Tau: Tau$1, + Upsilon: Upsilon$1, + Phi: Phi$1, + Chi: Chi$1, + Psi: Psi$1, + Omega: Omega$1, + alpha: alpha$1, + beta: beta$1, + gamma: gamma$1, + delta: delta$1, + epsilon: epsilon$1, + zeta: zeta$1, + eta: eta$1, + theta: theta$1, + iota: iota$1, + kappa: kappa$1, + lambda: lambda$1, + mu: mu$1, + nu: nu$1, + xi: xi$1, + omicron: omicron$1, + pi: pi$1, + rho: rho$1, + sigmaf: sigmaf$1, + sigma: sigma$1, + tau: tau$1, + upsilon: upsilon$1, + phi: phi$1, + chi: chi$1, + psi: psi$1, + omega: omega$1, + thetasym: thetasym$1, + upsih: upsih$1, + piv: piv$1, + bull: bull$1, + hellip: hellip$1, + prime: prime$1, + Prime: Prime$1, + oline: oline$1, + frasl: frasl$1, + weierp: weierp$1, + image: image$2, + real: real$1, + trade: trade$1, + alefsym: alefsym$1, + larr: larr$1, + uarr: uarr$1, + rarr: rarr$1, + darr: darr$1, + harr: harr$1, + crarr: crarr$1, + lArr: lArr$1, + uArr: uArr$1, + rArr: rArr$1, + dArr: dArr$1, + hArr: hArr$1, + forall: forall$1, + part: part$1, + exist: exist$1, + empty: empty$1, + nabla: nabla$1, + isin: isin$1, + notin: notin$1, + ni: ni$1, + prod: prod$1, + sum: sum$1, + minus: minus$1, + lowast: lowast$1, + radic: radic$1, + prop: prop$1, + infin: infin$1, + ang: ang$1, + and: and$1, + or: or$1, + cap: cap$1, + cup: cup$1, + int: int$1, + there4: there4$1, + sim: sim$1, + cong: cong$1, + asymp: asymp$1, + ne: ne$1, + equiv: equiv$1, + le: le$1, + ge: ge$1, + sub: sub$1, + sup: sup$1, + nsub: nsub$1, + sube: sube$1, + supe: supe$1, + oplus: oplus$1, + otimes: otimes$1, + perp: perp$1, + sdot: sdot$1, + lceil: lceil$1, + rceil: rceil$1, + lfloor: lfloor$1, + rfloor: rfloor$1, + lang: lang$1, + rang: rang$1, + loz: loz$1, + spades: spades$1, + clubs: clubs$1, + hearts: hearts$1, + diams: diams$1, + quot: quot$2, + amp: amp$2, + lt: lt$2, + gt: gt$2, + OElig: OElig$1, + oelig: oelig$1, + Scaron: Scaron$1, + scaron: scaron$1, + Yuml: Yuml$1, + circ: circ$1, + tilde: tilde$3, + ensp: ensp$1, + emsp: emsp$1, + thinsp: thinsp$1, + zwnj: zwnj$1, + zwj: zwj$1, + lrm: lrm$1, + rlm: rlm$1, + ndash: ndash$1, + mdash: mdash$1, + lsquo: lsquo$1, + rsquo: rsquo$1, + sbquo: sbquo$1, + ldquo: ldquo$1, + rdquo: rdquo$1, + bdquo: bdquo$1, + dagger: dagger$1, + Dagger: Dagger$1, + permil: permil$1, + lsaquo: lsaquo$1, + rsaquo: rsaquo$1, + euro: euro$1 +}; + +var characterEntitiesHtml4 = /*#__PURE__*/Object.freeze({ + __proto__: null, + nbsp: nbsp$2, + iexcl: iexcl$2, + cent: cent$2, + pound: pound$2, + curren: curren$2, + yen: yen$2, + brvbar: brvbar$2, + sect: sect$2, + uml: uml$2, + copy: copy$3, + ordf: ordf$2, + laquo: laquo$2, + not: not$2, + shy: shy$2, + reg: reg$2, + macr: macr$2, + deg: deg$2, + plusmn: plusmn$2, + sup2: sup2$2, + sup3: sup3$2, + acute: acute$2, + micro: micro$2, + para: para$2, + middot: middot$2, + cedil: cedil$2, + sup1: sup1$2, + ordm: ordm$2, + raquo: raquo$2, + frac14: frac14$2, + frac12: frac12$2, + frac34: frac34$2, + iquest: iquest$2, + Agrave: Agrave$2, + Aacute: Aacute$2, + Acirc: Acirc$2, + Atilde: Atilde$2, + Auml: Auml$2, + Aring: Aring$2, + AElig: AElig$2, + Ccedil: Ccedil$2, + Egrave: Egrave$2, + Eacute: Eacute$2, + Ecirc: Ecirc$2, + Euml: Euml$2, + Igrave: Igrave$2, + Iacute: Iacute$2, + Icirc: Icirc$2, + Iuml: Iuml$2, + ETH: ETH$2, + Ntilde: Ntilde$2, + Ograve: Ograve$2, + Oacute: Oacute$2, + Ocirc: Ocirc$2, + Otilde: Otilde$2, + Ouml: Ouml$2, + times: times$2, + Oslash: Oslash$2, + Ugrave: Ugrave$2, + Uacute: Uacute$2, + Ucirc: Ucirc$2, + Uuml: Uuml$2, + Yacute: Yacute$2, + THORN: THORN$2, + szlig: szlig$2, + agrave: agrave$2, + aacute: aacute$2, + acirc: acirc$2, + atilde: atilde$2, + auml: auml$2, + aring: aring$2, + aelig: aelig$2, + ccedil: ccedil$2, + egrave: egrave$2, + eacute: eacute$2, + ecirc: ecirc$2, + euml: euml$2, + igrave: igrave$2, + iacute: iacute$2, + icirc: icirc$2, + iuml: iuml$2, + eth: eth$2, + ntilde: ntilde$2, + ograve: ograve$2, + oacute: oacute$2, + ocirc: ocirc$2, + otilde: otilde$2, + ouml: ouml$2, + divide: divide$2, + oslash: oslash$2, + ugrave: ugrave$2, + uacute: uacute$2, + ucirc: ucirc$2, + uuml: uuml$2, + yacute: yacute$2, + thorn: thorn$2, + yuml: yuml$2, + fnof: fnof$1, + Alpha: Alpha$1, + Beta: Beta$1, + Gamma: Gamma$1, + Delta: Delta$1, + Epsilon: Epsilon$1, + Zeta: Zeta$1, + Eta: Eta$1, + Theta: Theta$1, + Iota: Iota$1, + Kappa: Kappa$1, + Lambda: Lambda$1, + Mu: Mu$1, + Nu: Nu$1, + Xi: Xi$1, + Omicron: Omicron$1, + Pi: Pi$1, + Rho: Rho$1, + Sigma: Sigma$1, + Tau: Tau$1, + Upsilon: Upsilon$1, + Phi: Phi$1, + Chi: Chi$1, + Psi: Psi$1, + Omega: Omega$1, + alpha: alpha$1, + beta: beta$1, + gamma: gamma$1, + delta: delta$1, + epsilon: epsilon$1, + zeta: zeta$1, + eta: eta$1, + theta: theta$1, + iota: iota$1, + kappa: kappa$1, + lambda: lambda$1, + mu: mu$1, + nu: nu$1, + xi: xi$1, + omicron: omicron$1, + pi: pi$1, + rho: rho$1, + sigmaf: sigmaf$1, + sigma: sigma$1, + tau: tau$1, + upsilon: upsilon$1, + phi: phi$1, + chi: chi$1, + psi: psi$1, + omega: omega$1, + thetasym: thetasym$1, + upsih: upsih$1, + piv: piv$1, + bull: bull$1, + hellip: hellip$1, + prime: prime$1, + Prime: Prime$1, + oline: oline$1, + frasl: frasl$1, + weierp: weierp$1, + image: image$2, + real: real$1, + trade: trade$1, + alefsym: alefsym$1, + larr: larr$1, + uarr: uarr$1, + rarr: rarr$1, + darr: darr$1, + harr: harr$1, + crarr: crarr$1, + lArr: lArr$1, + uArr: uArr$1, + rArr: rArr$1, + dArr: dArr$1, + hArr: hArr$1, + forall: forall$1, + part: part$1, + exist: exist$1, + empty: empty$1, + nabla: nabla$1, + isin: isin$1, + notin: notin$1, + ni: ni$1, + prod: prod$1, + sum: sum$1, + minus: minus$1, + lowast: lowast$1, + radic: radic$1, + prop: prop$1, + infin: infin$1, + ang: ang$1, + and: and$1, + or: or$1, + cap: cap$1, + cup: cup$1, + int: int$1, + there4: there4$1, + sim: sim$1, + cong: cong$1, + asymp: asymp$1, + ne: ne$1, + equiv: equiv$1, + le: le$1, + ge: ge$1, + sub: sub$1, + sup: sup$1, + nsub: nsub$1, + sube: sube$1, + supe: supe$1, + oplus: oplus$1, + otimes: otimes$1, + perp: perp$1, + sdot: sdot$1, + lceil: lceil$1, + rceil: rceil$1, + lfloor: lfloor$1, + rfloor: rfloor$1, + lang: lang$1, + rang: rang$1, + loz: loz$1, + spades: spades$1, + clubs: clubs$1, + hearts: hearts$1, + diams: diams$1, + quot: quot$2, + amp: amp$2, + lt: lt$2, + gt: gt$2, + OElig: OElig$1, + oelig: oelig$1, + Scaron: Scaron$1, + scaron: scaron$1, + Yuml: Yuml$1, + circ: circ$1, + tilde: tilde$3, + ensp: ensp$1, + emsp: emsp$1, + thinsp: thinsp$1, + zwnj: zwnj$1, + zwj: zwj$1, + lrm: lrm$1, + rlm: rlm$1, + ndash: ndash$1, + mdash: mdash$1, + lsquo: lsquo$1, + rsquo: rsquo$1, + sbquo: sbquo$1, + ldquo: ldquo$1, + rdquo: rdquo$1, + bdquo: bdquo$1, + dagger: dagger$1, + Dagger: Dagger$1, + permil: permil$1, + lsaquo: lsaquo$1, + rsaquo: rsaquo$1, + euro: euro$1, + 'default': index$4 +}); + +var dangerous = [ + "cent", + "copy", + "divide", + "gt", + "lt", + "not", + "para", + "times" +]; + +var dangerous$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + 'default': dangerous +}); + +var entities = getCjsExportFromNamespace(characterEntitiesHtml4); + +var dangerous$2 = getCjsExportFromNamespace(dangerous$1); + +var decimal$1 = isDecimal; + + + +var stringifyEntities = encode; +encode.escape = escape$2; + +var own$5 = {}.hasOwnProperty; + +// List of enforced escapes. +var escapes$1 = ['"', "'", '<', '>', '&', '`']; + +// Map of characters to names. +var characters = construct(); + +// Default escapes. +var defaultEscapes = toExpression(escapes$1); + +// Surrogate pairs. +var surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; + +// Non-ASCII characters. +// eslint-disable-next-line no-control-regex, unicorn/no-hex-escape +var bmp = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g; + +// Encode special characters in `value`. +function encode(value, options) { + var settings = options || {}; + var subset = settings.subset; + var set = subset ? toExpression(subset) : defaultEscapes; + var escapeOnly = settings.escapeOnly; + var omit = settings.omitOptionalSemicolons; + + value = value.replace(set, replace); + + if (subset || escapeOnly) { + return value + } + + return value + .replace(surrogatePair, replaceSurrogatePair) + .replace(bmp, replace) + + function replaceSurrogatePair(pair, pos, val) { + return toHexReference( + (pair.charCodeAt(0) - 0xd800) * 0x400 + + pair.charCodeAt(1) - + 0xdc00 + + 0x10000, + val.charAt(pos + 2), + omit + ) + } + + function replace(char, pos, val) { + return one$1(char, val.charAt(pos + 1), settings) + } +} + +// Shortcut to escape special characters in HTML. +function escape$2(value) { + return encode(value, {escapeOnly: true, useNamedReferences: true}) +} + +// Encode `char` according to `options`. +function one$1(char, next, options) { + var shortest = options.useShortestReferences; + var omit = options.omitOptionalSemicolons; + var named; + var code; + var numeric; + var decimal; + + if ((shortest || options.useNamedReferences) && own$5.call(characters, char)) { + named = toNamed(characters[char], next, omit, options.attribute); + } + + if (shortest || !named) { + code = char.charCodeAt(0); + numeric = toHexReference(code, next, omit); + + // Use the shortest numeric reference when requested. + // A simple algorithm would use decimal for all code points under 100, as + // those are shorter than hexadecimal: + // + // * `c` vs `c` (decimal shorter) + // * `d` vs `d` (equal) + // + // However, because we take `next` into consideration when `omit` is used, + // And it would be possible that decimals are shorter on bigger values as + // well if `next` is hexadecimal but not decimal, we instead compare both. + if (shortest) { + decimal = toDecimalReference(code, next, omit); + + if (decimal.length < numeric.length) { + numeric = decimal; + } + } + } + + if (named && (!shortest || named.length < numeric.length)) { + return named + } + + return numeric +} + +// Transform `code` into an entity. +function toNamed(name, next, omit, attribute) { + var value = '&' + name; + + if ( + omit && + own$5.call(legacy, name) && + dangerous$2.indexOf(name) === -1 && + (!attribute || (next && next !== '=' && !isAlphanumerical(next))) + ) { + return value + } + + return value + ';' +} + +// Transform `code` into a hexadecimal character reference. +function toHexReference(code, next, omit) { + var value = '&#x' + code.toString(16).toUpperCase(); + return omit && next && !isHexadecimal(next) ? value : value + ';' +} + +// Transform `code` into a decimal character reference. +function toDecimalReference(code, next, omit) { + var value = '&#' + String(code); + return omit && next && !decimal$1(next) ? value : value + ';' +} + +// Create an expression for `characters`. +function toExpression(characters) { + return new RegExp('[' + characters.join('') + ']', 'g') +} + +// Construct the map. +function construct() { + var chars = {}; + var name; + + for (name in entities) { + chars[entities[name]] = name; + } + + return chars +} + +var isAlphanumeric = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return !/[^0-9a-z\xDF-\xFF]/.test(str.toLowerCase()); +}; + +var entityPrefixLength = length; + +var ampersand$1 = '&'; + +// Returns the length of HTML entity that is a prefix of the given string +// (excluding the ampersand), 0 if it does not start with an entity. +function length(value) { + var prefix; + + /* istanbul ignore if - Currently also tested for at implemention, but we + * keep it here because that’s proper. */ + if (value.charAt(0) !== ampersand$1) { + return 0 + } + + prefix = value.split(ampersand$1, 2).join(ampersand$1); + + return prefix.length - parseEntities_1(prefix).length +} + +var _escape$2 = factory$6; + +var tab$f = '\t'; +var lineFeed$k = '\n'; +var space$i = ' '; +var numberSign$2 = '#'; +var ampersand$2 = '&'; +var leftParenthesis$3 = '('; +var rightParenthesis$4 = ')'; +var asterisk$4 = '*'; +var plusSign$1 = '+'; +var dash$5 = '-'; +var dot$3 = '.'; +var colon$5 = ':'; +var lessThan$7 = '<'; +var greaterThan$4 = '>'; +var leftSquareBracket$5 = '['; +var backslash$a = '\\'; +var rightSquareBracket$5 = ']'; +var underscore$4 = '_'; +var graveAccent$3 = '`'; +var verticalBar$1 = '|'; +var tilde$4 = '~'; +var exclamationMark$4 = '!'; + +var entities$1 = { + '<': '<', + ':': ':', + '&': '&', + '|': '|', + '~': '~' +}; + +var shortcut$1 = 'shortcut'; +var mailto$2 = 'mailto'; +var https$1 = 'https'; +var http$1 = 'http'; + +var blankExpression = /\n\s*$/; + +// Factory to escape characters. +function factory$6(options) { + return escape + + // Escape punctuation characters in a node’s value. + function escape(value, node, parent) { + var self = this; + var gfm = options.gfm; + var commonmark = options.commonmark; + var pedantic = options.pedantic; + var markers = commonmark ? [dot$3, rightParenthesis$4] : [dot$3]; + var siblings = parent && parent.children; + var index = siblings && siblings.indexOf(node); + var prev = siblings && siblings[index - 1]; + var next = siblings && siblings[index + 1]; + var length = value.length; + var escapable = markdownEscapes(options); + var position = -1; + var queue = []; + var escaped = queue; + var afterNewLine; + var character; + var wordCharBefore; + var wordCharAfter; + var offset; + var replace; + + if (prev) { + afterNewLine = text$1(prev) && blankExpression.test(prev.value); + } else { + afterNewLine = + !parent || parent.type === 'root' || parent.type === 'paragraph'; + } + + while (++position < length) { + character = value.charAt(position); + replace = false; + + if (character === '\n') { + afterNewLine = true; + } else if ( + character === backslash$a || + character === graveAccent$3 || + character === asterisk$4 || + character === leftSquareBracket$5 || + character === lessThan$7 || + (character === ampersand$2 && entityPrefixLength(value.slice(position)) > 0) || + (character === rightSquareBracket$5 && self.inLink) || + (gfm && character === tilde$4 && value.charAt(position + 1) === tilde$4) || + (gfm && + character === verticalBar$1 && + (self.inTable || alignment(value, position))) || + (character === underscore$4 && + // Delegate leading/trailing underscores to the multinode version below. + position > 0 && + position < length - 1 && + (pedantic || + !isAlphanumeric(value.charAt(position - 1)) || + !isAlphanumeric(value.charAt(position + 1)))) || + (gfm && !self.inLink && character === colon$5 && protocol(queue.join(''))) + ) { + replace = true; + } else if (afterNewLine) { + if ( + character === greaterThan$4 || + character === numberSign$2 || + character === asterisk$4 || + character === dash$5 || + character === plusSign$1 + ) { + replace = true; + } else if (isDecimal(character)) { + offset = position + 1; + + while (offset < length) { + if (!isDecimal(value.charAt(offset))) { + break + } + + offset++; + } + + if (markers.indexOf(value.charAt(offset)) !== -1) { + next = value.charAt(offset + 1); + + if (!next || next === space$i || next === tab$f || next === lineFeed$k) { + queue.push(value.slice(position, offset)); + position = offset; + character = value.charAt(position); + replace = true; + } + } + } + } + + if (afterNewLine && !isWhitespaceCharacter(character)) { + afterNewLine = false; + } + + queue.push(replace ? one(character) : character); + } + + // Multi-node versions. + if (siblings && text$1(node)) { + // Check for an opening parentheses after a link-reference (which can be + // joined by white-space). + if (prev && prev.referenceType === shortcut$1) { + position = -1; + length = escaped.length; + + while (++position < length) { + character = escaped[position]; + + if (character === space$i || character === tab$f) { + continue + } + + if (character === leftParenthesis$3 || character === colon$5) { + escaped[position] = one(character); + } + + break + } + + // If the current node is all spaces / tabs, preceded by a shortcut, + // and followed by a text starting with `(`, escape it. + if ( + text$1(next) && + position === length && + next.value.charAt(0) === leftParenthesis$3 + ) { + escaped.push(backslash$a); + } + } + + // Ensure non-auto-links are not seen as links. This pattern needs to + // check the preceding nodes too. + if ( + gfm && + !self.inLink && + text$1(prev) && + value.charAt(0) === colon$5 && + protocol(prev.value.slice(-6)) + ) { + escaped[0] = one(colon$5); + } + + // Escape ampersand if it would otherwise start an entity. + if ( + text$1(next) && + value.charAt(length - 1) === ampersand$2 && + entityPrefixLength(ampersand$2 + next.value) !== 0 + ) { + escaped[escaped.length - 1] = one(ampersand$2); + } + + // Escape exclamation marks immediately followed by links. + if ( + next && + next.type === 'link' && + value.charAt(length - 1) === exclamationMark$4 + ) { + escaped[escaped.length - 1] = one(exclamationMark$4); + } + + // Escape double tildes in GFM. + if ( + gfm && + text$1(next) && + value.charAt(length - 1) === tilde$4 && + next.value.charAt(0) === tilde$4 + ) { + escaped.splice(escaped.length - 1, 0, backslash$a); + } + + // Escape underscores, but not mid-word (unless in pedantic mode). + wordCharBefore = text$1(prev) && isAlphanumeric(prev.value.slice(-1)); + wordCharAfter = text$1(next) && isAlphanumeric(next.value.charAt(0)); + + if (length === 1) { + if ( + value === underscore$4 && + (pedantic || !wordCharBefore || !wordCharAfter) + ) { + escaped.unshift(backslash$a); + } + } else { + if ( + value.charAt(0) === underscore$4 && + (pedantic || !wordCharBefore || !isAlphanumeric(value.charAt(1))) + ) { + escaped.unshift(backslash$a); + } + + if ( + value.charAt(length - 1) === underscore$4 && + (pedantic || + !wordCharAfter || + !isAlphanumeric(value.charAt(length - 2))) + ) { + escaped.splice(escaped.length - 1, 0, backslash$a); + } + } + } + + return escaped.join('') + + function one(character) { + return escapable.indexOf(character) === -1 + ? entities$1[character] + : backslash$a + character + } + } +} + +// Check if `index` in `value` is inside an alignment row. +function alignment(value, index) { + var start = value.lastIndexOf(lineFeed$k, index); + var end = value.indexOf(lineFeed$k, index); + var char; + + end = end === -1 ? value.length : end; + + while (++start < end) { + char = value.charAt(start); + + if ( + char !== colon$5 && + char !== dash$5 && + char !== space$i && + char !== verticalBar$1 + ) { + return false + } + } + + return true +} + +// Check if `node` is a text node. +function text$1(node) { + return node && node.type === 'text' +} + +// Check if `value` ends in a protocol. +function protocol(value) { + var val = value.slice(-6).toLowerCase(); + return val === mailto$2 || val.slice(-5) === https$1 || val.slice(-4) === http$1 +} + +var setOptions_1$1 = setOptions$1; + +// Map of applicable enums. +var maps = { + entities: {true: true, false: true, numbers: true, escape: true}, + bullet: {'*': true, '-': true, '+': true}, + rule: {'-': true, _: true, '*': true}, + listItemIndent: {tab: true, mixed: true, 1: true}, + emphasis: {_: true, '*': true}, + strong: {_: true, '*': true}, + fence: {'`': true, '~': true} +}; + +// Expose `validate`. +var validate = { + boolean: validateBoolean, + string: validateString, + number: validateNumber, + function: validateFunction +}; + +// Set options. Does not overwrite previously set options. +function setOptions$1(options) { + var self = this; + var current = self.options; + var ruleRepetition; + var key; + + if (options == null) { + options = {}; + } else if (typeof options === 'object') { + options = immutable(options); + } else { + throw new Error('Invalid value `' + options + '` for setting `options`') + } + + for (key in defaults$3) { + validate[typeof defaults$3[key]](options, key, current[key], maps[key]); + } + + ruleRepetition = options.ruleRepetition; + + if (ruleRepetition && ruleRepetition < 3) { + raise(ruleRepetition, 'options.ruleRepetition'); + } + + self.encode = encodeFactory(String(options.entities)); + self.escape = _escape$2(options); + + self.options = options; + + return self +} + +// Validate a value to be boolean. Defaults to `def`. Raises an exception with +// `context[name]` when not a boolean. +function validateBoolean(context, name, def) { + var value = context[name]; + + if (value == null) { + value = def; + } + + if (typeof value !== 'boolean') { + raise(value, 'options.' + name); + } + + context[name] = value; +} + +// Validate a value to be boolean. Defaults to `def`. Raises an exception with +// `context[name]` when not a boolean. +function validateNumber(context, name, def) { + var value = context[name]; + + if (value == null) { + value = def; + } + + if (isNaN(value)) { + raise(value, 'options.' + name); + } + + context[name] = value; +} + +// Validate a value to be in `map`. Defaults to `def`. Raises an exception +// with `context[name]` when not in `map`. +function validateString(context, name, def, map) { + var value = context[name]; + + if (value == null) { + value = def; + } + + value = String(value); + + if (!(value in map)) { + raise(value, 'options.' + name); + } + + context[name] = value; +} + +// Validate a value to be function. Defaults to `def`. Raises an exception +// with `context[name]` when not a function. +function validateFunction(context, name, def) { + var value = context[name]; + + if (value == null) { + value = def; + } + + if (typeof value !== 'function') { + raise(value, 'options.' + name); + } + + context[name] = value; +} + +// Factory to encode HTML entities. Creates a no-operation function when +// `type` is `'false'`, a function which encodes using named references when +// `type` is `'true'`, and a function which encodes using numbered references +// when `type` is `'numbers'`. +function encodeFactory(type) { + var options = {}; + + if (type === 'false') { + return identity_1 + } + + if (type === 'true') { + options.useNamedReferences = true; + } + + if (type === 'escape') { + options.escapeOnly = true; + options.useNamedReferences = true; + } + + return wrapped + + // Encode HTML entities using the bound options. + function wrapped(value) { + return stringifyEntities(value, options) + } +} + +// Throw an exception with in its `message` `value` and `name`. +function raise(value, name) { + throw new Error('Invalid value `' + value + '` for setting `' + name + '`') +} + +var mdastUtilCompact = compact; + +// Make an mdast tree compact by merging adjacent text nodes. +function compact(tree, commonmark) { + unistUtilVisit(tree, visitor); + + return tree + + function visitor(child, index, parent) { + var siblings = parent ? parent.children : []; + var prev = index && siblings[index - 1]; + + if ( + prev && + child.type === prev.type && + mergeable$1(prev, commonmark) && + mergeable$1(child, commonmark) + ) { + if (child.value) { + prev.value += child.value; + } + + if (child.children) { + prev.children = prev.children.concat(child.children); + } + + siblings.splice(index, 1); + + if (prev.position && child.position) { + prev.position.end = child.position.end; + } + + return index + } + } +} + +function mergeable$1(node, commonmark) { + var start; + var end; + + if (node.type === 'text') { + if (!node.position) { + return true + } + + start = node.position.start; + end = node.position.end; + + // Only merge nodes which occupy the same size as their `value`. + return ( + start.line !== end.line || end.column - start.column === node.value.length + ) + } + + return commonmark && node.type === 'blockquote' +} + +var compile_1$1 = compile$3; + +// Stringify the given tree. +function compile$3() { + return this.visit(mdastUtilCompact(this.tree, this.options.commonmark)) +} + +var one_1 = one$2; + +function one$2(node, parent) { + var self = this; + var visitors = self.visitors; + + // Fail on unknown nodes. + if (typeof visitors[node.type] !== 'function') { + self.file.fail( + new Error( + 'Missing compiler for node of type `' + node.type + '`: `' + node + '`' + ), + node + ); + } + + return visitors[node.type].call(self, node, parent) +} + +var all_1 = all; + +// Visit all children of `parent`. +function all(parent) { + var self = this; + var children = parent.children; + var length = children.length; + var results = []; + var index = -1; + + while (++index < length) { + results[index] = self.visit(children[index], parent); + } + + return results +} + +var block_1 = block$1; + +var lineFeed$l = '\n'; + +var blank$1 = lineFeed$l + lineFeed$l; +var triple = blank$1 + lineFeed$l; +var comment$1 = blank$1 + '' + blank$1; + +// Stringify a block node with block children (e.g., `root` or `blockquote`). +// Knows about code following a list, or adjacent lists with similar bullets, +// and places an extra line feed between them. +function block$1(node) { + var self = this; + var options = self.options; + var fences = options.fences; + var gap = options.commonmark ? comment$1 : triple; + var values = []; + var children = node.children; + var length = children.length; + var index = -1; + var prev; + var child; + + while (++index < length) { + prev = child; + child = children[index]; + + if (prev) { + // A list preceding another list that are equally ordered, or a + // list preceding an indented code block, need a gap between them, + // so as not to see them as one list, or content of the list, + // respectively. + // + // In commonmark, only something that breaks both up can do that, + // so we opt for an empty, invisible comment. In other flavours, + // two blank lines are fine. + if ( + prev.type === 'list' && + ((child.type === 'list' && prev.ordered === child.ordered) || + (child.type === 'code' && !child.lang && !fences)) + ) { + values.push(gap); + } else { + values.push(blank$1); + } + } + + values.push(self.visit(child, node)); + } + + return values.join('') +} + +var orderedItems_1 = orderedItems; + +var lineFeed$m = '\n'; +var dot$4 = '.'; + +var blank$2 = lineFeed$m + lineFeed$m; + +// Visit ordered list items. +// +// Starts the list with +// `node.start` and increments each following list item +// bullet by one: +// +// 2. foo +// 3. bar +// +// In `incrementListMarker: false` mode, does not increment +// each marker and stays on `node.start`: +// +// 1. foo +// 1. bar +function orderedItems(node) { + var self = this; + var fn = self.visitors.listItem; + var increment = self.options.incrementListMarker; + var values = []; + var start = node.start; + var children = node.children; + var length = children.length; + var index = -1; + var bullet; + + start = start == null ? 1 : start; + + while (++index < length) { + bullet = (increment ? start + index : start) + dot$4; + values[index] = fn.call(self, children[index], node, index, bullet); + } + + return values.join(node.spread ? blank$2 : lineFeed$m) +} + +var unorderedItems_1 = unorderedItems; + +var lineFeed$n = '\n'; + +var blank$3 = lineFeed$n + lineFeed$n; + +// Visit unordered list items. Uses `options.bullet` as each item’s bullet. +function unorderedItems(node) { + var self = this; + var bullet = self.options.bullet; + var fn = self.visitors.listItem; + var children = node.children; + var length = children.length; + var index = -1; + var values = []; + + while (++index < length) { + values[index] = fn.call(self, children[index], node, index, bullet); + } + + return values.join(node.spread ? blank$3 : lineFeed$n) +} + +var root_1 = root$1; + +var lineFeed$o = '\n'; + +// Stringify a root. +// Adds a final newline to ensure valid POSIX files. */ +function root$1(node) { + var doc = this.block(node); + + if (doc.charAt(doc.length - 1) !== lineFeed$o) { + doc += lineFeed$o; + } + + return doc +} + +var text_1$1 = text$2; + +// Stringify text. +// Supports named entities in `settings.encode: true` mode: +// +// ```markdown +// AT&T +// ``` +// +// Supports numbered entities in `settings.encode: numbers` mode: +// +// ```markdown +// AT&T +// ``` +function text$2(node, parent) { + return this.encode(this.escape(node.value, node, parent), node) +} + +var heading_1 = heading; + +var lineFeed$p = '\n'; +var space$j = ' '; +var numberSign$3 = '#'; +var dash$6 = '-'; +var equalsTo$2 = '='; + +// Stringify a heading. +// +// In `setext: true` mode and when `depth` is smaller than three, creates a +// setext header: +// +// ```markdown +// Foo +// === +// ``` +// +// Otherwise, an ATX header is generated: +// +// ```markdown +// ### Foo +// ``` +// +// In `closeAtx: true` mode, the header is closed with hashes: +// +// ```markdown +// ### Foo ### +// ``` +function heading(node) { + var self = this; + var depth = node.depth; + var setext = self.options.setext; + var closeAtx = self.options.closeAtx; + var content = self.all(node).join(''); + var prefix; + + if (setext && depth < 3) { + return ( + content + lineFeed$p + repeatString(depth === 1 ? equalsTo$2 : dash$6, content.length) + ) + } + + prefix = repeatString(numberSign$3, node.depth); + + return prefix + space$j + content + (closeAtx ? space$j + prefix : '') +} + +var paragraph_1$1 = paragraph$1; + +function paragraph$1(node) { + return this.all(node).join('') +} + +var blockquote_1$1 = blockquote$1; + +var lineFeed$q = '\n'; +var space$k = ' '; +var greaterThan$5 = '>'; + +function blockquote$1(node) { + var values = this.block(node).split(lineFeed$q); + var result = []; + var length = values.length; + var index = -1; + var value; + + while (++index < length) { + value = values[index]; + result[index] = (value ? space$k : '') + value; + } + + return greaterThan$5 + result.join(lineFeed$q + greaterThan$5) +} + +var list_1$1 = list$1; + +function list$1(node) { + var fn = node.ordered ? this.visitOrderedItems : this.visitUnorderedItems; + return fn.call(this, node) +} + +var pad_1 = pad$1; + +var lineFeed$r = '\n'; +var space$l = ' '; + +var tabSize$5 = 4; + +// Pad `value` with `level * tabSize` spaces. Respects lines. Ignores empty +// lines. +function pad$1(value, level) { + var values = value.split(lineFeed$r); + var index = values.length; + var padding = repeatString(space$l, level * tabSize$5); + + while (index--) { + if (values[index].length !== 0) { + values[index] = padding + values[index]; + } + } + + return values.join(lineFeed$r) +} + +var listItem_1 = listItem$1; + +var lineFeed$s = '\n'; +var space$m = ' '; +var leftSquareBracket$6 = '['; +var rightSquareBracket$6 = ']'; +var lowercaseX$2 = 'x'; + +var ceil = Math.ceil; +var blank$4 = lineFeed$s + lineFeed$s; + +var tabSize$6 = 4; + +// Stringify a list item. +// +// Prefixes the content with a checked checkbox when `checked: true`: +// +// ```markdown +// [x] foo +// ``` +// +// Prefixes the content with an unchecked checkbox when `checked: false`: +// +// ```markdown +// [ ] foo +// ``` +function listItem$1(node, parent, position, bullet) { + var self = this; + var style = self.options.listItemIndent; + var marker = bullet || self.options.bullet; + var spread = node.spread == null ? true : node.spread; + var checked = node.checked; + var children = node.children; + var length = children.length; + var values = []; + var index = -1; + var value; + var indent; + var spacing; + + while (++index < length) { + values[index] = self.visit(children[index], node); + } + + value = values.join(spread ? blank$4 : lineFeed$s); + + if (typeof checked === 'boolean') { + // Note: I’d like to be able to only add the space between the check and + // the value, but unfortunately github does not support empty list-items + // with a checkbox :( + value = + leftSquareBracket$6 + + (checked ? lowercaseX$2 : space$m) + + rightSquareBracket$6 + + space$m + + value; + } + + if (style === '1' || (style === 'mixed' && value.indexOf(lineFeed$s) === -1)) { + indent = marker.length + 1; + spacing = space$m; + } else { + indent = ceil((marker.length + 1) / tabSize$6) * tabSize$6; + spacing = repeatString(space$m, indent - marker.length); + } + + return value + ? marker + spacing + pad_1(value, indent / tabSize$6).slice(indent) + : marker +} + +var longestStreak_1 = longestStreak; + +// Get the count of the longest repeating streak of `character` in `value`. +function longestStreak(value, character) { + var count = 0; + var maximum = 0; + var expected; + var index; + + if (typeof character !== 'string' || character.length !== 1) { + throw new Error('Expected character') + } + + value = String(value); + index = value.indexOf(character); + expected = index; + + while (index !== -1) { + count++; + + if (index === expected) { + if (count > maximum) { + maximum = count; + } + } else { + count = 1; + } + + expected = index + 1; + index = value.indexOf(character, expected); + } + + return maximum +} + +var inlineCode_1 = inlineCode$1; + +var graveAccentChar = '`'; +var lineFeed$t = 10; // '\n' +var space$n = 32; // ' ' +var graveAccent$4 = 96; // '`' + +// Stringify inline code. +// +// Knows about internal ticks (`\``), and ensures one more tick is used to +// enclose the inline code: +// +// ````markdown +// ```foo ``bar`` baz``` +// ```` +// +// Even knows about inital and final ticks: +// +// ``markdown +// `` `foo `` +// `` foo` `` +// ``` +function inlineCode$1(node) { + var value = node.value; + var ticks = repeatString(graveAccentChar, longestStreak_1(value, graveAccentChar) + 1); + var start = ticks; + var end = ticks; + var head = value.charCodeAt(0); + var tail = value.charCodeAt(value.length - 1); + var wrap = false; + var index; + var length; + + if (head === graveAccent$4 || tail === graveAccent$4) { + wrap = true; + } else if (value.length > 2 && ws(head) && ws(tail)) { + index = 1; + length = value.length - 1; + + while (++index < length) { + if (!ws(value.charCodeAt(index))) { + wrap = true; + break + } + } + } + + if (wrap) { + start += ' '; + end = ' ' + end; + } + + return start + value + end +} + +function ws(code) { + return code === lineFeed$t || code === space$n +} + +var code_1 = code; + +var lineFeed$u = '\n'; +var space$o = ' '; +var tilde$5 = '~'; +var graveAccent$5 = '`'; + +// Stringify code. +// Creates indented code when: +// +// - No language tag exists +// - Not in `fences: true` mode +// - A non-empty value exists +// +// Otherwise, GFM fenced code is created: +// +// ````markdown +// ```js +// foo(); +// ``` +// ```` +// +// When in ``fence: `~` `` mode, uses tildes as fences: +// +// ```markdown +// ~~~js +// foo(); +// ~~~ +// ``` +// +// Knows about internal fences: +// +// `````markdown +// ````markdown +// ```javascript +// foo(); +// ``` +// ```` +// ````` +function code(node, parent) { + var self = this; + var value = node.value; + var options = self.options; + var marker = options.fence; + var info = node.lang || ''; + var fence; + + if (info && node.meta) { + info += space$o + node.meta; + } + + info = self.encode(self.escape(info, node)); + + // Without (needed) fences. + if ( + !info && + !options.fences && + value && + value.charAt(0) !== lineFeed$u && + value.charAt(value.length - 1) !== lineFeed$u + ) { + // Throw when pedantic, in a list item which isn’t compiled using a tab. + if ( + parent && + parent.type === 'listItem' && + options.listItemIndent !== 'tab' && + options.pedantic + ) { + self.file.fail( + 'Cannot indent code properly. See https://git.io/fxKR8', + node.position + ); + } + + return pad_1(value, 1) + } + + // Backticks in the info string don’t work with backtick fenced code. + // Backticks (and tildes) are fine in tilde fenced code. + if (marker === graveAccent$5 && info.indexOf(graveAccent$5) !== -1) { + marker = tilde$5; + } + + fence = repeatString(marker, Math.max(longestStreak_1(value, marker) + 1, 3)); + + return fence + info + lineFeed$u + value + lineFeed$u + fence +} + +var html_1 = html$1; + +function html$1(node) { + return node.value +} + +var thematicBreak$1 = thematic; + +var space$p = ' '; + +// Stringify a `thematic-break`. +// The character used is configurable through `rule`: (`'_'`): +// +// ```markdown +// ___ +// ``` +// +// The number of repititions is defined through `ruleRepetition` (`6`): +// +// ```markdown +// ****** +// ``` +// +// Whether spaces delimit each character, is configured through `ruleSpaces` +// (`true`): +// ```markdown +// * * * +// ``` +function thematic() { + var options = this.options; + var rule = repeatString(options.rule, options.ruleRepetition); + return options.ruleSpaces ? rule.split('').join(space$p) : rule +} + +var strong_1$1 = strong$2; + +// Stringify a `strong`. +// +// The marker used is configurable by `strong`, which defaults to an asterisk +// (`'*'`) but also accepts an underscore (`'_'`): +// +// ```markdown +// __foo__ +// ``` +function strong$2(node) { + var marker = repeatString(this.options.strong, 2); + return marker + this.all(node).join('') + marker +} + +var emphasis_1$1 = emphasis$2; + +var underscore$5 = '_'; +var asterisk$5 = '*'; + +// Stringify an `emphasis`. +// +// The marker used is configurable through `emphasis`, which defaults to an +// underscore (`'_'`) but also accepts an asterisk (`'*'`): +// +// ```markdown +// *foo* +// ``` +// +// In `pedantic` mode, text which itself contains an underscore will cause the +// marker to default to an asterisk instead: +// +// ```markdown +// *foo_bar* +// ``` +function emphasis$2(node) { + var marker = this.options.emphasis; + var content = this.all(node).join(''); + + // When in pedantic mode, prevent using underscore as the marker when there + // are underscores in the content. + if ( + this.options.pedantic && + marker === underscore$5 && + content.indexOf(marker) !== -1 + ) { + marker = asterisk$5; + } + + return marker + content + marker +} + +var _break$2 = lineBreak; + +var backslash$b = '\\'; +var lineFeed$v = '\n'; +var space$q = ' '; + +var commonmark$1 = backslash$b + lineFeed$v; +var normal = space$q + space$q + lineFeed$v; + +function lineBreak() { + return this.options.commonmark ? commonmark$1 : normal +} + +var _delete$2 = strikethrough$1; + +var tilde$6 = '~'; + +var fence$1 = tilde$6 + tilde$6; + +function strikethrough$1(node) { + return fence$1 + this.all(node).join('') + fence$1 +} + +var ccount_1 = ccount; + +function ccount(value, character) { + var count = 0; + var index; + + value = String(value); + + if (typeof character !== 'string' || character.length !== 1) { + throw new Error('Expected character') + } + + index = value.indexOf(character); + + while (index !== -1) { + count++; + index = value.indexOf(character, index + 1); + } + + return count +} + +var encloseUri = enclose; + +var leftParenthesis$4 = '('; +var rightParenthesis$5 = ')'; +var lessThan$8 = '<'; +var greaterThan$6 = '>'; + +var expression = /\s/; + +// Wrap `url` in angle brackets when needed, or when +// forced. +// In links, images, and definitions, the URL part needs +// to be enclosed when it: +// +// - has a length of `0` +// - contains white-space +// - has more or less opening than closing parentheses +function enclose(uri, always) { + if ( + always || + uri.length === 0 || + expression.test(uri) || + ccount_1(uri, leftParenthesis$4) !== ccount_1(uri, rightParenthesis$5) + ) { + return lessThan$8 + uri + greaterThan$6 + } + + return uri +} + +var encloseTitle = enclose$1; + +var quotationMark$3 = '"'; +var apostrophe$3 = "'"; + +// There is currently no way to support nested delimiters across Markdown.pl, +// CommonMark, and GitHub (RedCarpet). The following code supports Markdown.pl +// and GitHub. +// CommonMark is not supported when mixing double- and single quotes inside a +// title. +function enclose$1(title) { + var delimiter = + title.indexOf(quotationMark$3) === -1 ? quotationMark$3 : apostrophe$3; + return delimiter + title + delimiter +} + +var link_1$1 = link$4; + +var space$r = ' '; +var leftSquareBracket$7 = '['; +var rightSquareBracket$7 = ']'; +var leftParenthesis$5 = '('; +var rightParenthesis$6 = ')'; + +// Expression for a protocol: +// See . +var protocol$1 = /^[a-z][a-z+.-]+:\/?/i; + +// Stringify a link. +// +// When no title exists, the compiled `children` equal `url`, and `url` starts +// with a protocol, an auto link is created: +// +// ```markdown +// +// ``` +// +// Otherwise, is smart about enclosing `url` (see `encloseURI()`) and `title` +// (see `encloseTitle()`). +// ``` +// +// ```markdown +// [foo]( 'An "example" e-mail') +// ``` +// +// Supports named entities in the `url` and `title` when in `settings.encode` +// mode. +function link$4(node) { + var self = this; + var content = self.encode(node.url || '', node); + var exit = self.enterLink(); + var escaped = self.encode(self.escape(node.url || '', node)); + var value = self.all(node).join(''); + + exit(); + + if (node.title == null && protocol$1.test(content) && escaped === value) { + // Backslash escapes do not work in autolinks, so we do not escape. + return encloseUri(self.encode(node.url), true) + } + + content = encloseUri(content); + + if (node.title) { + content += space$r + encloseTitle(self.encode(self.escape(node.title, node), node)); + } + + return ( + leftSquareBracket$7 + + value + + rightSquareBracket$7 + + leftParenthesis$5 + + content + + rightParenthesis$6 + ) +} + +var copyIdentifierEncoding = copy$4; + +var ampersand$3 = '&'; + +var punctuationExppresion = /[-!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~_]/; + +// For shortcut and collapsed reference links, the contents is also an +// identifier, so we need to restore the original encoding and escaping +// that were present in the source string. +// +// This function takes the unescaped & unencoded value from shortcut’s +// child nodes and the identifier and encodes the former according to +// the latter. +function copy$4(value, identifier) { + var length = value.length; + var count = identifier.length; + var result = []; + var position = 0; + var index = 0; + var start; + + while (index < length) { + // Take next non-punctuation characters from `value`. + start = index; + + while (index < length && !punctuationExppresion.test(value.charAt(index))) { + index += 1; + } + + result.push(value.slice(start, index)); + + // Advance `position` to the next punctuation character. + while ( + position < count && + !punctuationExppresion.test(identifier.charAt(position)) + ) { + position += 1; + } + + // Take next punctuation characters from `identifier`. + start = position; + + while ( + position < count && + punctuationExppresion.test(identifier.charAt(position)) + ) { + if (identifier.charAt(position) === ampersand$3) { + position += entityPrefixLength(identifier.slice(position)); + } + + position += 1; + } + + result.push(identifier.slice(start, position)); + + // Advance `index` to the next non-punctuation character. + while (index < length && punctuationExppresion.test(value.charAt(index))) { + index += 1; + } + } + + return result.join('') +} + +var label_1 = label; + +var leftSquareBracket$8 = '['; +var rightSquareBracket$8 = ']'; + +var shortcut$2 = 'shortcut'; +var collapsed$1 = 'collapsed'; + +// Stringify a reference label. +// Because link references are easily, mistakingly, created (for example, +// `[foo]`), reference nodes have an extra property depicting how it looked in +// the original document, so stringification can cause minimal changes. +function label(node) { + var type = node.referenceType; + + if (type === shortcut$2) { + return '' + } + + return ( + leftSquareBracket$8 + + (type === collapsed$1 ? '' : node.label || node.identifier) + + rightSquareBracket$8 + ) +} + +var linkReference_1 = linkReference; + +var leftSquareBracket$9 = '['; +var rightSquareBracket$9 = ']'; + +var shortcut$3 = 'shortcut'; +var collapsed$2 = 'collapsed'; + +function linkReference(node) { + var self = this; + var type = node.referenceType; + var exit = self.enterLinkReference(self, node); + var value = self.all(node).join(''); + + exit(); + + if (type === shortcut$3 || type === collapsed$2) { + value = copyIdentifierEncoding(value, node.label || node.identifier); + } + + return leftSquareBracket$9 + value + rightSquareBracket$9 + label_1(node) +} + +var imageReference_1 = imageReference; + +var leftSquareBracket$a = '['; +var rightSquareBracket$a = ']'; +var exclamationMark$5 = '!'; + +function imageReference(node) { + return ( + exclamationMark$5 + + leftSquareBracket$a + + (this.encode(node.alt, node) || '') + + rightSquareBracket$a + + label_1(node) + ) +} + +var definition_1$1 = definition$1; + +var space$s = ' '; +var colon$6 = ':'; +var leftSquareBracket$b = '['; +var rightSquareBracket$b = ']'; + +// Stringify an URL definition. +// +// Is smart about enclosing `url` (see `encloseURI()`) and `title` (see +// `encloseTitle()`). +// +// ```markdown +// [foo]: 'An "example" e-mail' +// ``` +function definition$1(node) { + var content = encloseUri(node.url); + + if (node.title) { + content += space$s + encloseTitle(node.title); + } + + return ( + leftSquareBracket$b + + (node.label || node.identifier) + + rightSquareBracket$b + + colon$6 + + space$s + + content + ) +} + +var image_1 = image$3; + +var space$t = ' '; +var leftParenthesis$6 = '('; +var rightParenthesis$7 = ')'; +var leftSquareBracket$c = '['; +var rightSquareBracket$c = ']'; +var exclamationMark$6 = '!'; + +// Stringify an image. +// +// Is smart about enclosing `url` (see `encloseURI()`) and `title` (see +// `encloseTitle()`). +// +// ```markdown +// ![foo]( 'My "favourite" icon') +// ``` +// +// Supports named entities in `url`, `alt`, and `title` when in +// `settings.encode` mode. +function image$3(node) { + var self = this; + var content = encloseUri(self.encode(node.url || '', node)); + var exit = self.enterLink(); + var alt = self.encode(self.escape(node.alt || '', node)); + + exit(); + + if (node.title) { + content += space$t + encloseTitle(self.encode(node.title, node)); + } + + return ( + exclamationMark$6 + + leftSquareBracket$c + + alt + + rightSquareBracket$c + + leftParenthesis$6 + + content + + rightParenthesis$7 + ) +} + +var footnote_1 = footnote$1; + +var leftSquareBracket$d = '['; +var rightSquareBracket$d = ']'; +var caret$3 = '^'; + +function footnote$1(node) { + return ( + leftSquareBracket$d + caret$3 + this.all(node).join('') + rightSquareBracket$d + ) +} + +var footnoteReference_1 = footnoteReference; + +var leftSquareBracket$e = '['; +var rightSquareBracket$e = ']'; +var caret$4 = '^'; + +function footnoteReference(node) { + return ( + leftSquareBracket$e + + caret$4 + + (node.label || node.identifier) + + rightSquareBracket$e + ) +} + +var lineFeed$w = '\n'; +var space$u = ' '; +var colon$7 = ':'; +var leftSquareBracket$f = '['; +var rightSquareBracket$f = ']'; +var caret$5 = '^'; + +var tabSize$7 = 4; +var blank$5 = lineFeed$w + lineFeed$w; +var indent = repeatString(space$u, tabSize$7); + +var footnoteDefinition_1$1 = footnoteDefinition$1; + +function footnoteDefinition$1(node) { + var content = this.all(node).join(blank$5 + indent); + + return ( + leftSquareBracket$f + + caret$5 + + (node.label || node.identifier) + + rightSquareBracket$f + + colon$7 + + space$u + + content + ) +} + +var markdownTable_1 = markdownTable; + +var dotRe = /\./; +var lastDotRe = /\.[^.]*$/; + +// Characters. +var space$v = ' '; +var lineFeed$x = '\n'; +var dash$7 = '-'; +var dot$5 = '.'; +var colon$8 = ':'; +var lowercaseC = 'c'; +var lowercaseL = 'l'; +var lowercaseR = 'r'; +var verticalBar$2 = '|'; + +var minCellSize = 3; + +// Create a table from a matrix of strings. +function markdownTable(table, options) { + var settings = options || {}; + var delimiter = settings.delimiter; + var start = settings.start; + var end = settings.end; + var alignment = settings.align; + var calculateStringLength = settings.stringLength || lengthNoop; + var cellCount = 0; + var rowIndex = -1; + var rowLength = table.length; + var sizes = []; + var align; + var rule; + var rows; + var row; + var cells; + var index; + var position; + var size; + var value; + var spacing; + var before; + var after; + + alignment = alignment ? alignment.concat() : []; + + if (delimiter === null || delimiter === undefined) { + delimiter = space$v + verticalBar$2 + space$v; + } + + if (start === null || start === undefined) { + start = verticalBar$2 + space$v; + } + + if (end === null || end === undefined) { + end = space$v + verticalBar$2; + } + + while (++rowIndex < rowLength) { + row = table[rowIndex]; + + index = -1; + + if (row.length > cellCount) { + cellCount = row.length; + } + + while (++index < cellCount) { + position = row[index] ? dotindex$1(row[index]) : null; + + if (!sizes[index]) { + sizes[index] = minCellSize; + } + + if (position > sizes[index]) { + sizes[index] = position; + } + } + } + + if (typeof alignment === 'string') { + alignment = pad$2(cellCount, alignment).split(''); + } + + // Make sure only valid alignments are used. + index = -1; + + while (++index < cellCount) { + align = alignment[index]; + + if (typeof align === 'string') { + align = align.charAt(0).toLowerCase(); + } + + if ( + align !== lowercaseL && + align !== lowercaseR && + align !== lowercaseC && + align !== dot$5 + ) { + align = ''; + } + + alignment[index] = align; + } + + rowIndex = -1; + rows = []; + + while (++rowIndex < rowLength) { + row = table[rowIndex]; + + index = -1; + cells = []; + + while (++index < cellCount) { + value = row[index]; + + value = stringify$6(value); + + if (alignment[index] === dot$5) { + position = dotindex$1(value); + + size = + sizes[index] + + (dotRe.test(value) ? 0 : 1) - + (calculateStringLength(value) - position); + + cells[index] = value + pad$2(size - 1); + } else { + cells[index] = value; + } + } + + rows[rowIndex] = cells; + } + + sizes = []; + rowIndex = -1; + + while (++rowIndex < rowLength) { + cells = rows[rowIndex]; + + index = -1; + + while (++index < cellCount) { + value = cells[index]; + + if (!sizes[index]) { + sizes[index] = minCellSize; + } + + size = calculateStringLength(value); + + if (size > sizes[index]) { + sizes[index] = size; + } + } + } + + rowIndex = -1; + + while (++rowIndex < rowLength) { + cells = rows[rowIndex]; + + index = -1; + + if (settings.pad !== false) { + while (++index < cellCount) { + value = cells[index]; + + position = sizes[index] - (calculateStringLength(value) || 0); + spacing = pad$2(position); + + if (alignment[index] === lowercaseR || alignment[index] === dot$5) { + value = spacing + value; + } else if (alignment[index] === lowercaseC) { + position /= 2; + + if (position % 1 === 0) { + before = position; + after = position; + } else { + before = position + 0.5; + after = position - 0.5; + } + + value = pad$2(before) + value + pad$2(after); + } else { + value += spacing; + } + + cells[index] = value; + } + } + + rows[rowIndex] = cells.join(delimiter); + } + + if (settings.rule !== false) { + index = -1; + rule = []; + + while (++index < cellCount) { + // When `pad` is false, make the rule the same size as the first row. + if (settings.pad === false) { + value = table[0][index]; + spacing = calculateStringLength(stringify$6(value)); + spacing = spacing > minCellSize ? spacing : minCellSize; + } else { + spacing = sizes[index]; + } + + align = alignment[index]; + + // When `align` is left, don't add colons. + value = align === lowercaseR || align === '' ? dash$7 : colon$8; + value += pad$2(spacing - 2, dash$7); + value += align !== lowercaseL && align !== '' ? colon$8 : dash$7; + + rule[index] = value; + } + + rows.splice(1, 0, rule.join(delimiter)); + } + + return start + rows.join(end + lineFeed$x + start) + end +} + +function stringify$6(value) { + return value === null || value === undefined ? '' : String(value) +} + +// Get the length of `value`. +function lengthNoop(value) { + return String(value).length +} + +// Get a string consisting of `length` `character`s. +function pad$2(length, character) { + return new Array(length + 1).join(character || space$v) +} + +// Get the position of the last dot in `value`. +function dotindex$1(value) { + var match = lastDotRe.exec(value); + + return match ? match.index + 1 : value.length +} + +var table_1$1 = table$1; + +var space$w = ' '; +var verticalBar$3 = '|'; + +// Stringify table. +// +// Creates a fenced table by default, but not in `looseTable: true` mode: +// +// ```markdown +// Foo | Bar +// :-: | --- +// Baz | Qux +// +// NOTE: Be careful with `looseTable: true` mode, as a loose table inside an +// indented code block on GitHub renders as an actual table! +// +// Creates a spaced table by default, but not in `spacedTable: false`: +// +// ```markdown +// |Foo|Bar| +// |:-:|---| +// |Baz|Qux| +// ``` +function table$1(node) { + var self = this; + var options = self.options; + var loose = options.looseTable; + var spaced = options.spacedTable; + var pad = options.paddedTable; + var stringLength = options.stringLength; + var rows = node.children; + var index = rows.length; + var exit = self.enterTable(); + var result = []; + var start; + var end; + + while (index--) { + result[index] = self.all(rows[index]); + } + + exit(); + + if (loose) { + start = ''; + end = ''; + } else if (spaced) { + start = verticalBar$3 + space$w; + end = space$w + verticalBar$3; + } else { + start = verticalBar$3; + end = verticalBar$3; + } + + return markdownTable_1(result, { + align: node.align, + pad: pad, + start: start, + end: end, + stringLength: stringLength, + delimiter: spaced ? space$w + verticalBar$3 + space$w : verticalBar$3 + }) +} + +var tableCell_1 = tableCell; + +var lineFeed$y = /\r?\n/g; + +function tableCell(node) { + return this.all(node) + .join('') + .replace(lineFeed$y, ' ') +} + +var compiler = Compiler; + +// Construct a new compiler. +function Compiler(tree, file) { + this.inLink = false; + this.inTable = false; + this.tree = tree; + this.file = file; + this.options = immutable(this.options); + this.setOptions({}); +} + +var proto$4 = Compiler.prototype; + +// Enter and exit helpers. */ +proto$4.enterLink = stateToggle('inLink', false); +proto$4.enterTable = stateToggle('inTable', false); +proto$4.enterLinkReference = enterLinkReference; + +// Configuration. +proto$4.options = defaults$3; +proto$4.setOptions = setOptions_1$1; + +proto$4.compile = compile_1$1; +proto$4.visit = one_1; +proto$4.all = all_1; +proto$4.block = block_1; +proto$4.visitOrderedItems = orderedItems_1; +proto$4.visitUnorderedItems = unorderedItems_1; + +// Expose visitors. +proto$4.visitors = { + root: root_1, + text: text_1$1, + heading: heading_1, + paragraph: paragraph_1$1, + blockquote: blockquote_1$1, + list: list_1$1, + listItem: listItem_1, + inlineCode: inlineCode_1, + code: code_1, + html: html_1, + thematicBreak: thematicBreak$1, + strong: strong_1$1, + emphasis: emphasis_1$1, + break: _break$2, + delete: _delete$2, + link: link_1$1, + linkReference: linkReference_1, + imageReference: imageReference_1, + definition: definition_1$1, + image: image_1, + footnote: footnote_1, + footnoteReference: footnoteReference_1, + footnoteDefinition: footnoteDefinition_1$1, + table: table_1$1, + tableCell: tableCell_1 +}; + +var remarkStringify = stringify$7; +stringify$7.Compiler = compiler; + +function stringify$7(options) { + var Local = unherit_1(compiler); + Local.prototype.options = immutable( + Local.prototype.options, + this.data('settings'), + options + ); + this.Compiler = Local; +} + +var remark = unified_1() + .use(remarkParse) + .use(remarkStringify) + .freeze(); + +const _from = "remark@^11.0.2"; +const _id = "remark@11.0.2"; +const _inBundle = false; +const _integrity = "sha512-bh+eJgn8wgmbHmIBOuwJFdTVRVpl3fcVP6HxmpPWO0ULGP9Qkh6INJh0N5Uy7GqlV7DQYGoqaKiEIpM5LLvJ8w=="; +const _location = "/remark"; +const _phantomChildren = { +}; +const _requested = { + type: "range", + registry: true, + raw: "remark@^11.0.2", + name: "remark", + escapedName: "remark", + rawSpec: "^11.0.2", + saveSpec: null, + fetchSpec: "^11.0.2" +}; +const _requiredBy = [ + "/" +]; +const _resolved = "https://registry.npmjs.org/remark/-/remark-11.0.2.tgz"; +const _shasum = "12b90ea100ac3362b1976fa87a6e4e0ab5968202"; +const _spec = "remark@^11.0.2"; +const _where = "/mnt/c/orgs/nodejs/node-runtime/tools/node-lint-md-cli-rollup"; +const author = { + name: "Titus Wormer", + email: "tituswormer@gmail.com", + url: "https://wooorm.com" +}; +const bugs = { + url: "https://github.com/remarkjs/remark/issues" +}; +const bundleDependencies = false; +const contributors = [ + { + name: "Titus Wormer", + email: "tituswormer@gmail.com", + url: "https://wooorm.com" + } +]; +const dependencies = { + "remark-parse": "^7.0.0", + "remark-stringify": "^7.0.0", + unified: "^8.2.0" +}; +const deprecated$1 = false; +const description = "Markdown processor powered by plugins"; +const files = [ + "index.js", + "types/index.d.ts" +]; +const funding = { + type: "opencollective", + url: "https://opencollective.com/unified" +}; +const homepage = "https://remark.js.org"; +const keywords = [ + "unified", + "remark", + "markdown", + "mdast", + "abstract", + "syntax", + "tree", + "ast", + "parse", + "stringify", + "process" +]; +const license = "MIT"; +const name$1 = "remark"; +const repository = { + type: "git", + url: "https://github.com/remarkjs/remark/tree/master/packages/remark" +}; +const scripts = { + test: "tape test.js" +}; +const types = "types/index.d.ts"; +const version$1 = "11.0.2"; +const xo = false; +var _package = { + _from: _from, + _id: _id, + _inBundle: _inBundle, + _integrity: _integrity, + _location: _location, + _phantomChildren: _phantomChildren, + _requested: _requested, + _requiredBy: _requiredBy, + _resolved: _resolved, + _shasum: _shasum, + _spec: _spec, + _where: _where, + author: author, + bugs: bugs, + bundleDependencies: bundleDependencies, + contributors: contributors, + dependencies: dependencies, + deprecated: deprecated$1, + description: description, + files: files, + funding: funding, + homepage: homepage, + keywords: keywords, + license: license, + name: name$1, + repository: repository, + scripts: scripts, + types: types, + version: version$1, + xo: xo +}; + +var _package$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + _from: _from, + _id: _id, + _inBundle: _inBundle, + _integrity: _integrity, + _location: _location, + _phantomChildren: _phantomChildren, + _requested: _requested, + _requiredBy: _requiredBy, + _resolved: _resolved, + _shasum: _shasum, + _spec: _spec, + _where: _where, + author: author, + bugs: bugs, + bundleDependencies: bundleDependencies, + contributors: contributors, + dependencies: dependencies, + deprecated: deprecated$1, + description: description, + files: files, + funding: funding, + homepage: homepage, + keywords: keywords, + license: license, + name: name$1, + repository: repository, + scripts: scripts, + types: types, + version: version$1, + xo: xo, + 'default': _package +}); + +const name$2 = "node-lint-md-cli-rollup"; +const description$1 = "remark packaged for Node.js Markdown linting"; +const version$2 = "2.0.2"; +const devDependencies = { + "@rollup/plugin-commonjs": "^11.0.1", + "@rollup/plugin-json": "^4.0.1", + "@rollup/plugin-node-resolve": "^7.0.0", + rollup: "^1.30.1", + shx: "^0.3.2" +}; +const dependencies$1 = { + "markdown-extensions": "^1.1.1", + remark: "^11.0.2", + "remark-lint": "^6.0.5", + "remark-preset-lint-node": "^1.12.0", + "unified-args": "^7.1.0" +}; +const main = "dist/index.js"; +const scripts$1 = { + build: "npx rollup -c", + "build-node": "npm run build && npx shx cp dist/index.js ../lint-md.js" +}; +var _package$2 = { + name: name$2, + description: description$1, + version: version$2, + devDependencies: devDependencies, + dependencies: dependencies$1, + main: main, + scripts: scripts$1 +}; + +var _package$3 = /*#__PURE__*/Object.freeze({ + __proto__: null, + name: name$2, + description: description$1, + version: version$2, + devDependencies: devDependencies, + dependencies: dependencies$1, + main: main, + scripts: scripts$1, + 'default': _package$2 +}); + +/* Map of allowed verbs. */ +var ALLOWED_VERBS = { + enable: true, + disable: true, + ignore: true +}; + +var unifiedMessageControl = messageControl; + +function messageControl(options) { + var name = options && options.name; + var marker = options && options.marker; + var test = options && options.test; + var sources; + var known; + var reset; + var enable; + var disable; + + if (!name) { + throw new Error('Expected `name` in `options`, got `' + name + '`') + } + + if (!marker) { + throw new Error('Expected `name` in `options`, got `' + name + '`') + } + + if (!test) { + throw new Error('Expected `test` in `options`, got `' + test + '`') + } + + known = options.known; + reset = options.reset; + enable = options.enable || []; + disable = options.disable || []; + sources = options.source; + + if (!sources) { + sources = [name]; + } else if (typeof sources === 'string') { + sources = [sources]; + } + + return transformer + + function transformer(tree, file) { + var toOffset = vfileLocation(file).toOffset; + var initial = !reset; + var gaps = detectGaps(tree, file); + var scope = {}; + var globals = []; + + unistUtilVisit(tree, test, visitor); + + file.messages = file.messages.filter(filter); + + function visitor(node, position, parent) { + var mark = marker(node); + var ruleIds; + var ruleId; + var verb; + var index; + var length; + var next; + var pos; + var tail; + + if (!mark || mark.name !== options.name) { + return + } + + ruleIds = mark.attributes.split(/\s/g); + verb = ruleIds.shift(); + next = parent.children[position + 1]; + pos = mark.node.position && mark.node.position.start; + tail = next && next.position && next.position.end; + + if (!verb || !ALLOWED_VERBS[verb] === true) { + file.fail( + 'Unknown keyword `' + + verb + + '`: expected ' + + "`'enable'`, `'disable'`, or `'ignore'`", + mark.node + ); + } + + length = ruleIds.length; + index = -1; + + while (++index < length) { + ruleId = ruleIds[index]; + + if (isKnown(ruleId, verb, mark.node)) { + toggle(pos, verb === 'enable', ruleId); + + if (verb === 'ignore') { + toggle(tail, true, ruleId); + } + } + } + + /* Apply to all rules. */ + if (!length) { + if (verb === 'ignore') { + toggle(pos, false); + toggle(tail, true); + } else { + toggle(pos, verb === 'enable'); + reset = verb !== 'enable'; + } + } + } + + function filter(message) { + var gapIndex = gaps.length; + var ruleId = message.ruleId; + var ranges = scope[ruleId]; + var pos; + + /* Keep messages from a different source. */ + if (!message.source || sources.indexOf(message.source) === -1) { + return true + } + + /* We only ignore messages if they‘re disabled, + * *not* when they’re not in the document. */ + if (!message.line) { + message.line = 1; + } + + if (!message.column) { + message.column = 1; + } + + /* Check whether the warning is inside a gap. */ + pos = toOffset(message); + + while (gapIndex--) { + if (gaps[gapIndex].start <= pos && gaps[gapIndex].end > pos) { + return false + } + } + + /* Check whether allowed by specific and global states. */ + return check(message, ranges, ruleId) && check(message, globals) + } + + /* Helper to check (and possibly warn) if a ruleId is unknown. */ + function isKnown(ruleId, verb, pos) { + var result = known ? known.indexOf(ruleId) !== -1 : true; + + if (!result) { + file.warn('Unknown rule: cannot ' + verb + " `'" + ruleId + "'`", pos); + } + + return result + } + + /* Get the latest state of a rule. When without `ruleId`, gets global state. */ + function getState(ruleId) { + var ranges = ruleId ? scope[ruleId] : globals; + + if (ranges && ranges.length !== 0) { + return ranges[ranges.length - 1].state + } + + if (!ruleId) { + return !reset + } + + if (reset) { + return enable.indexOf(ruleId) !== -1 + } + + return disable.indexOf(ruleId) === -1 + } + + /* Handle a rule. */ + function toggle(pos, state, ruleId) { + var markers = ruleId ? scope[ruleId] : globals; + var currentState; + var previousState; + + if (!markers) { + markers = []; + scope[ruleId] = markers; + } + + previousState = getState(ruleId); + currentState = state; + + if (currentState !== previousState) { + markers.push({state: currentState, position: pos}); + } + + /* Toggle all known rules. */ + if (!ruleId) { + for (ruleId in scope) { + toggle(pos, state, ruleId); + } + } + } + + /* Check all `ranges` for `message`. */ + function check(message, ranges, id) { + /* Check the state at the message's position. */ + var index = ranges && ranges.length; + var length = -1; + var range; + + while (--index > length) { + range = ranges[index]; + + /* istanbul ignore if - generated marker. */ + if (!range.position || !range.position.line || !range.position.column) { + continue + } + + if ( + range.position.line < message.line || + (range.position.line === message.line && + range.position.column < message.column) + ) { + return range.state === true + } + } + + /* The first marker ocurred after the first + * message, so we check the initial state. */ + if (!id) { + return initial || reset + } + + return reset ? enable.indexOf(id) !== -1 : disable.indexOf(id) === -1 + } + } +} + +/* Detect gaps in `ast`. */ +function detectGaps(tree, file) { + var lastNode = tree.children[tree.children.length - 1]; + var offset = 0; + var isGap = false; + var gaps = []; + + /* Find all gaps. */ + unistUtilVisit(tree, one); + + /* Get the end of the document. + * This detects if the last node was the last node. + * If not, there’s an extra gap between the last node + * and the end of the document. */ + if ( + lastNode && + lastNode.position && + lastNode.position.end && + offset === lastNode.position.end.offset && + trim_1(file.toString().slice(offset)) !== '' + ) { + update(); + + update( + tree && tree.position && tree.position.end && tree.position.end.offset - 1 + ); + } + + return gaps + + function one(node) { + var pos = node.position; + + update(pos && pos.start && pos.start.offset); + + if (!node.children) { + update(pos && pos.end && pos.end.offset); + } + } + + /* Detect a new position. */ + function update(latest) { + if (latest === null || latest === undefined) { + isGap = true; + return + } + + if (offset >= latest) { + return + } + + if (isGap) { + gaps.push({start: offset, end: latest}); + isGap = false; + } + + offset = latest; + } +} + +var mdastCommentMarker = marker$1; + +var whiteSpaceExpression = /\s+/g; + +var parametersExpression = /\s+([-a-z0-9_]+)(?:=(?:"((?:\\[\s\S]|[^"])+)"|'((?:\\[\s\S]|[^'])+)'|((?:\\[\s\S]|[^"'\s])+)))?/gi; + +var commentExpression = /\s*([a-zA-Z0-9-]+)(\s+([\s\S]*))?\s*/; + +var markerExpression = new RegExp( + '(\\s*\\s*)' +); + +// Parse a comment marker. +function marker$1(node) { + var type; + var value; + var match; + var params; + + if (!node) { + return null + } + + type = node.type; + + if (type !== 'html' && type !== 'comment') { + return null + } + + value = node.value; + match = value.match(type === 'comment' ? commentExpression : markerExpression); + + if (!match || match[0].length !== value.length) { + return null + } + + match = match.slice(node.type === 'comment' ? 1 : 2); + + params = parameters(match[1] || ''); + + if (!params) { + return null + } + + return { + name: match[0], + attributes: match[2] || '', + parameters: params, + node: node + } +} + +// Parse `value` into an object. +function parameters(value) { + var attributes = {}; + var rest = value.replace(parametersExpression, replacer); + + return rest.replace(whiteSpaceExpression, '') ? null : attributes + + /* eslint-disable max-params */ + function replacer($0, $1, $2, $3, $4) { + var result = $2 || $3 || $4 || ''; + + if (result === 'true' || result === '') { + result = true; + } else if (result === 'false') { + result = false; + } else if (!isNaN(result)) { + result = Number(result); + } + + attributes[$1] = result; + + return '' + } +} + +var remarkMessageControl = messageControl$1; + +var test = [ + 'html', // Comments are `html` nodes in mdast. + 'comment' // In MDX, comments have their own node. +]; + +function messageControl$1(options) { + return unifiedMessageControl(immutable({marker: mdastCommentMarker, test: test}, options)) +} + +var remarkLint = lint; + +// `remark-lint`. +// This adds support for ignoring stuff from messages (``). +// All rules are in their own packages and presets. +function lint() { + this.use(lintMessageControl); +} + +function lintMessageControl() { + return remarkMessageControl({name: 'lint', source: 'remark-lint'}) +} + +/** + * An Array.prototype.slice.call(arguments) alternative + * + * @param {Object} args something with a length + * @param {Number} slice + * @param {Number} sliceEnd + * @api public + */ + +var sliced = function (args, slice, sliceEnd) { + var ret = []; + var len = args.length; + + if (0 === len) return ret; + + var start = slice < 0 + ? Math.max(0, slice + len) + : slice || 0; + + if (sliceEnd !== undefined) { + len = sliceEnd < 0 + ? sliceEnd + len + : sliceEnd; + } + + while (len-- > start) { + ret[len - start] = args[len]; + } + + return ret; +}; + +/** + * slice() reference. + */ + +var slice$4 = Array.prototype.slice; + +/** + * Expose `co`. + */ + +var co_1 = co; + +/** + * Wrap the given generator `fn` and + * return a thunk. + * + * @param {Function} fn + * @return {Function} + * @api public + */ + +function co(fn) { + var isGenFun = isGeneratorFunction(fn); + + return function (done) { + var ctx = this; + + // in toThunk() below we invoke co() + // with a generator, so optimize for + // this case + var gen = fn; + + // we only need to parse the arguments + // if gen is a generator function. + if (isGenFun) { + var args = slice$4.call(arguments), len = args.length; + var hasCallback = len && 'function' == typeof args[len - 1]; + done = hasCallback ? args.pop() : error; + gen = fn.apply(this, args); + } else { + done = done || error; + } + + next(); + + // #92 + // wrap the callback in a setImmediate + // so that any of its errors aren't caught by `co` + function exit(err, res) { + setImmediate(function(){ + done.call(ctx, err, res); + }); + } + + function next(err, res) { + var ret; + + // multiple args + if (arguments.length > 2) res = slice$4.call(arguments, 1); + + // error + if (err) { + try { + ret = gen.throw(err); + } catch (e) { + return exit(e); + } + } + + // ok + if (!err) { + try { + ret = gen.next(res); + } catch (e) { + return exit(e); + } + } + + // done + if (ret.done) return exit(null, ret.value); + + // normalize + ret.value = toThunk(ret.value, ctx); + + // run + if ('function' == typeof ret.value) { + var called = false; + try { + ret.value.call(ctx, function(){ + if (called) return; + called = true; + next.apply(ctx, arguments); + }); + } catch (e) { + setImmediate(function(){ + if (called) return; + called = true; + next(e); + }); + } + return; + } + + // invalid + next(new TypeError('You may only yield a function, promise, generator, array, or object, ' + + 'but the following was passed: "' + String(ret.value) + '"')); + } + } +} + +/** + * Convert `obj` into a normalized thunk. + * + * @param {Mixed} obj + * @param {Mixed} ctx + * @return {Function} + * @api private + */ + +function toThunk(obj, ctx) { + + if (isGeneratorFunction(obj)) { + return co(obj.call(ctx)); + } + + if (isGenerator(obj)) { + return co(obj); + } + + if (isPromise(obj)) { + return promiseToThunk(obj); + } + + if ('function' == typeof obj) { + return obj; + } + + if (isObject$4(obj) || Array.isArray(obj)) { + return objectToThunk.call(ctx, obj); + } + + return obj; +} + +/** + * Convert an object of yieldables to a thunk. + * + * @param {Object} obj + * @return {Function} + * @api private + */ + +function objectToThunk(obj){ + var ctx = this; + var isArray = Array.isArray(obj); + + return function(done){ + var keys = Object.keys(obj); + var pending = keys.length; + var results = isArray + ? new Array(pending) // predefine the array length + : new obj.constructor(); + var finished; + + if (!pending) { + setImmediate(function(){ + done(null, results); + }); + return; + } + + // prepopulate object keys to preserve key ordering + if (!isArray) { + for (var i = 0; i < pending; i++) { + results[keys[i]] = undefined; + } + } + + for (var i = 0; i < keys.length; i++) { + run(obj[keys[i]], keys[i]); + } + + function run(fn, key) { + if (finished) return; + try { + fn = toThunk(fn, ctx); + + if ('function' != typeof fn) { + results[key] = fn; + return --pending || done(null, results); + } + + fn.call(ctx, function(err, res){ + if (finished) return; + + if (err) { + finished = true; + return done(err); + } + + results[key] = res; + --pending || done(null, results); + }); + } catch (err) { + finished = true; + done(err); + } + } + } +} + +/** + * Convert `promise` to a thunk. + * + * @param {Object} promise + * @return {Function} + * @api private + */ + +function promiseToThunk(promise) { + return function(fn){ + promise.then(function(res) { + fn(null, res); + }, fn); + } +} + +/** + * Check if `obj` is a promise. + * + * @param {Object} obj + * @return {Boolean} + * @api private + */ + +function isPromise(obj) { + return obj && 'function' == typeof obj.then; +} + +/** + * Check if `obj` is a generator. + * + * @param {Mixed} obj + * @return {Boolean} + * @api private + */ + +function isGenerator(obj) { + return obj && 'function' == typeof obj.next && 'function' == typeof obj.throw; +} + +/** + * Check if `obj` is a generator function. + * + * @param {Mixed} obj + * @return {Boolean} + * @api private + */ + +function isGeneratorFunction(obj) { + return obj && obj.constructor && 'GeneratorFunction' == obj.constructor.name; +} + +/** + * Check for plain object. + * + * @param {Mixed} val + * @return {Boolean} + * @api private + */ + +function isObject$4(val) { + return val && Object == val.constructor; +} + +/** + * Throw `err` in a new stack. + * + * This is used when co() is invoked + * without supplying a callback, which + * should only be for demonstrational + * purposes. + * + * @param {Error} err + * @api private + */ + +function error(err) { + if (!err) return; + setImmediate(function(){ + throw err; + }); +} + +/** + * Module Dependencies + */ + + +var noop$3 = function(){}; + + +/** + * Export `wrapped` + */ + +var wrapped_1 = wrapped; + +/** + * Wrap a function to support + * sync, async, and gen functions. + * + * @param {Function} fn + * @return {Function} + * @api public + */ + +function wrapped(fn) { + function wrap() { + var args = sliced(arguments); + var last = args[args.length - 1]; + var ctx = this; + + // done + var done = typeof last == 'function' ? args.pop() : noop$3; + + // nothing + if (!fn) { + return done.apply(ctx, [null].concat(args)); + } + + // generator + if (generator(fn)) { + return co_1(fn).apply(ctx, args.concat(done)); + } + + // async + if (fn.length > args.length) { + // NOTE: this only handles uncaught synchronous errors + try { + return fn.apply(ctx, args.concat(done)); + } catch (e) { + return done(e); + } + } + + // sync + return sync$2(fn, done).apply(ctx, args); + } + + return wrap; +} + +/** + * Wrap a synchronous function execution. + * + * @param {Function} fn + * @param {Function} done + * @return {Function} + * @api private + */ + +function sync$2(fn, done) { + return function () { + var ret; + + try { + ret = fn.apply(this, arguments); + } catch (err) { + return done(err); + } + + if (promise(ret)) { + ret.then(function (value) { done(null, value); }, done); + } else { + ret instanceof Error ? done(ret) : done(null, ret); + } + } +} + +/** + * Is `value` a generator? + * + * @param {Mixed} value + * @return {Boolean} + * @api private + */ + +function generator(value) { + return value + && value.constructor + && 'GeneratorFunction' == value.constructor.name; +} + + +/** + * Is `value` a promise? + * + * @param {Mixed} value + * @return {Boolean} + * @api private + */ + +function promise(value) { + return value && 'function' == typeof value.then; +} + +var unifiedLintRule = factory$7; + +function factory$7(id, rule) { + var parts = id.split(':'); + var source = parts[0]; + var ruleId = parts[1]; + var fn = wrapped_1(rule); + + /* istanbul ignore if - possibly useful if externalised later. */ + if (!ruleId) { + ruleId = source; + source = null; + } + + attacher.displayName = id; + + return attacher + + function attacher(raw) { + var config = coerce(ruleId, raw); + var severity = config[0]; + var options = config[1]; + var fatal = severity === 2; + + return severity ? transformer : undefined + + function transformer(tree, file, next) { + var index = file.messages.length; + + fn(tree, file, options, done); + + function done(err) { + var messages = file.messages; + var message; + + // Add the error, if not already properly added. + /* istanbul ignore if - only happens for incorrect plugins */ + if (err && messages.indexOf(err) === -1) { + try { + file.fail(err); + } catch (error) {} + } + + while (index < messages.length) { + message = messages[index]; + message.ruleId = ruleId; + message.source = source; + message.fatal = fatal; + + index++; + } + + next(); + } + } + } +} + +// Coerce a value to a severity--options tuple. +function coerce(name, value) { + var def = 1; + var result; + var level; + + /* istanbul ignore if - Handled by unified in v6.0.0 */ + if (typeof value === 'boolean') { + result = [value]; + } else if (value == null) { + result = [def]; + } else if ( + typeof value === 'object' && + (typeof value[0] === 'number' || + typeof value[0] === 'boolean' || + typeof value[0] === 'string') + ) { + result = value.concat(); + } else { + result = [1, value]; + } + + level = result[0]; + + if (typeof level === 'boolean') { + level = level ? 1 : 0; + } else if (typeof level === 'string') { + if (level === 'off') { + level = 0; + } else if (level === 'on' || level === 'warn') { + level = 1; + } else if (level === 'error') { + level = 2; + } else { + level = 1; + result = [level, result]; + } + } + + if (level < 0 || level > 2) { + throw new Error( + 'Invalid severity `' + + level + + '` for `' + + name + + '`, ' + + 'expected 0, 1, or 2' + ) + } + + result[0] = level; + + return result +} + +var remarkLintFinalNewline = unifiedLintRule('remark-lint:final-newline', finalNewline); + +function finalNewline(tree, file) { + var contents = String(file); + var last = contents.length - 1; + + if (last > -1 && contents.charAt(last) !== '\n') { + file.message('Missing newline character at end of file'); + } +} + +const addendum = "addenda"; +const aircraft = "aircraft"; +const alga = "algae"; +const alumna = "alumnae"; +const alumnus = "alumni"; +const amoeba = "amoebae"; +const analysis = "analyses"; +const antenna = "antennae"; +const antithesis = "antitheses"; +const apex = "apices"; +const appendix = "appendices"; +const automaton = "automata"; +const axis = "axes"; +const bacillus = "bacilli"; +const bacterium = "bacteria"; +const barracks = "barracks"; +const basis = "bases"; +const beau = "beaux"; +const bison = "bison"; +const buffalo = "buffalo"; +const bureau = "bureaus"; +const cactus = "cacti"; +const calf = "calves"; +const carp = "carp"; +const census = "censuses"; +const chassis = "chassis"; +const cherub = "cherubim"; +const child = "children"; +const cod = "cod"; +const codex = "codices"; +const concerto = "concerti"; +const corpus = "corpora"; +const crisis = "crises"; +const criterion = "criteria"; +const curriculum = "curricula"; +const datum = "data"; +const deer = "deer"; +const diagnosis = "diagnoses"; +const die$1 = "dice"; +const dwarf = "dwarfs"; +const echo = "echoes"; +const elf = "elves"; +const elk = "elk"; +const ellipsis = "ellipses"; +const embargo = "embargoes"; +const emphasis$3 = "emphases"; +const erratum = "errata"; +const fez = "fezes"; +const firmware = "firmware"; +const fish = "fish"; +const focus = "foci"; +const foot = "feet"; +const formula = "formulae"; +const fungus = "fungi"; +const gallows = "gallows"; +const genus = "genera"; +const goose = "geese"; +const graffito = "graffiti"; +const grouse = "grouse"; +const half$1 = "halves"; +const hero = "heroes"; +const hoof = "hooves"; +const hovercraft = "hovercraft"; +const hypothesis = "hypotheses"; +const index$5 = "indices"; +const kakapo = "kakapo"; +const knife = "knives"; +const larva = "larvae"; +const leaf = "leaves"; +const libretto = "libretti"; +const life = "lives"; +const loaf = "loaves"; +const locus = "loci"; +const louse = "lice"; +const man = "men"; +const matrix = "matrices"; +const means = "means"; +const medium = "media"; +const memorandum = "memoranda"; +const millennium = "millennia"; +const minutia = "minutiae"; +const moose = "moose"; +const mouse = "mice"; +const nebula = "nebulae"; +const nemesis = "nemeses"; +const neurosis = "neuroses"; +const news = "news"; +const nucleus = "nuclei"; +const oasis = "oases"; +const offspring = "offspring"; +const opus = "opera"; +const ovum = "ova"; +const ox = "oxen"; +const paralysis = "paralyses"; +const parenthesis = "parentheses"; +const person = "people"; +const phenomenon = "phenomena"; +const phylum = "phyla"; +const pike = "pike"; +const polyhedron = "polyhedra"; +const potato = "potatoes"; +const prognosis = "prognoses"; +const quiz = "quizzes"; +const radius = "radii"; +const referendum = "referenda"; +const salmon = "salmon"; +const scarf = "scarves"; +const self = "selves"; +const series = "series"; +const sheep = "sheep"; +const shelf = "shelves"; +const shrimp = "shrimp"; +const spacecraft = "spacecraft"; +const species = "species"; +const spectrum = "spectra"; +const squid = "squid"; +const stimulus = "stimuli"; +const stratum = "strata"; +const swine = "swine"; +const syllabus = "syllabi"; +const symposium = "symposia"; +const synopsis = "synopses"; +const synthesis = "syntheses"; +const tableau = "tableaus"; +const that = "those"; +const thesis = "theses"; +const thief = "thieves"; +const tomato = "tomatoes"; +const tooth = "teeth"; +const trout = "trout"; +const tuna = "tuna"; +const vertebra = "vertebrae"; +const vertex = "vertices"; +const veto = "vetoes"; +const vita = "vitae"; +const vortex = "vortices"; +const watercraft = "watercraft"; +const wharf = "wharves"; +const wife = "wives"; +const wolf = "wolves"; +const woman = "women"; +var irregularPlurals = { + addendum: addendum, + aircraft: aircraft, + alga: alga, + alumna: alumna, + alumnus: alumnus, + amoeba: amoeba, + analysis: analysis, + antenna: antenna, + antithesis: antithesis, + apex: apex, + appendix: appendix, + automaton: automaton, + axis: axis, + bacillus: bacillus, + bacterium: bacterium, + barracks: barracks, + basis: basis, + beau: beau, + bison: bison, + buffalo: buffalo, + bureau: bureau, + cactus: cactus, + calf: calf, + carp: carp, + census: census, + chassis: chassis, + cherub: cherub, + child: child, + "château": "châteaus", + cod: cod, + codex: codex, + concerto: concerto, + corpus: corpus, + crisis: crisis, + criterion: criterion, + curriculum: curriculum, + datum: datum, + deer: deer, + diagnosis: diagnosis, + die: die$1, + dwarf: dwarf, + echo: echo, + elf: elf, + elk: elk, + ellipsis: ellipsis, + embargo: embargo, + emphasis: emphasis$3, + erratum: erratum, + "faux pas": "faux pas", + fez: fez, + firmware: firmware, + fish: fish, + focus: focus, + foot: foot, + formula: formula, + fungus: fungus, + gallows: gallows, + genus: genus, + goose: goose, + graffito: graffito, + grouse: grouse, + half: half$1, + hero: hero, + hoof: hoof, + hovercraft: hovercraft, + hypothesis: hypothesis, + index: index$5, + kakapo: kakapo, + knife: knife, + larva: larva, + leaf: leaf, + libretto: libretto, + life: life, + loaf: loaf, + locus: locus, + louse: louse, + man: man, + matrix: matrix, + means: means, + medium: medium, + memorandum: memorandum, + millennium: millennium, + minutia: minutia, + moose: moose, + mouse: mouse, + nebula: nebula, + nemesis: nemesis, + neurosis: neurosis, + news: news, + nucleus: nucleus, + oasis: oasis, + offspring: offspring, + opus: opus, + ovum: ovum, + ox: ox, + paralysis: paralysis, + parenthesis: parenthesis, + person: person, + phenomenon: phenomenon, + phylum: phylum, + pike: pike, + polyhedron: polyhedron, + potato: potato, + prognosis: prognosis, + quiz: quiz, + radius: radius, + referendum: referendum, + salmon: salmon, + scarf: scarf, + self: self, + series: series, + sheep: sheep, + shelf: shelf, + shrimp: shrimp, + spacecraft: spacecraft, + species: species, + spectrum: spectrum, + squid: squid, + stimulus: stimulus, + stratum: stratum, + swine: swine, + syllabus: syllabus, + symposium: symposium, + synopsis: synopsis, + synthesis: synthesis, + tableau: tableau, + that: that, + thesis: thesis, + thief: thief, + "this": "these", + tomato: tomato, + tooth: tooth, + trout: trout, + tuna: tuna, + vertebra: vertebra, + vertex: vertex, + veto: veto, + vita: vita, + vortex: vortex, + watercraft: watercraft, + wharf: wharf, + wife: wife, + wolf: wolf, + woman: woman +}; + +var irregularPlurals$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + addendum: addendum, + aircraft: aircraft, + alga: alga, + alumna: alumna, + alumnus: alumnus, + amoeba: amoeba, + analysis: analysis, + antenna: antenna, + antithesis: antithesis, + apex: apex, + appendix: appendix, + automaton: automaton, + axis: axis, + bacillus: bacillus, + bacterium: bacterium, + barracks: barracks, + basis: basis, + beau: beau, + bison: bison, + buffalo: buffalo, + bureau: bureau, + cactus: cactus, + calf: calf, + carp: carp, + census: census, + chassis: chassis, + cherub: cherub, + child: child, + cod: cod, + codex: codex, + concerto: concerto, + corpus: corpus, + crisis: crisis, + criterion: criterion, + curriculum: curriculum, + datum: datum, + deer: deer, + diagnosis: diagnosis, + die: die$1, + dwarf: dwarf, + echo: echo, + elf: elf, + elk: elk, + ellipsis: ellipsis, + embargo: embargo, + emphasis: emphasis$3, + erratum: erratum, + fez: fez, + firmware: firmware, + fish: fish, + focus: focus, + foot: foot, + formula: formula, + fungus: fungus, + gallows: gallows, + genus: genus, + goose: goose, + graffito: graffito, + grouse: grouse, + half: half$1, + hero: hero, + hoof: hoof, + hovercraft: hovercraft, + hypothesis: hypothesis, + index: index$5, + kakapo: kakapo, + knife: knife, + larva: larva, + leaf: leaf, + libretto: libretto, + life: life, + loaf: loaf, + locus: locus, + louse: louse, + man: man, + matrix: matrix, + means: means, + medium: medium, + memorandum: memorandum, + millennium: millennium, + minutia: minutia, + moose: moose, + mouse: mouse, + nebula: nebula, + nemesis: nemesis, + neurosis: neurosis, + news: news, + nucleus: nucleus, + oasis: oasis, + offspring: offspring, + opus: opus, + ovum: ovum, + ox: ox, + paralysis: paralysis, + parenthesis: parenthesis, + person: person, + phenomenon: phenomenon, + phylum: phylum, + pike: pike, + polyhedron: polyhedron, + potato: potato, + prognosis: prognosis, + quiz: quiz, + radius: radius, + referendum: referendum, + salmon: salmon, + scarf: scarf, + self: self, + series: series, + sheep: sheep, + shelf: shelf, + shrimp: shrimp, + spacecraft: spacecraft, + species: species, + spectrum: spectrum, + squid: squid, + stimulus: stimulus, + stratum: stratum, + swine: swine, + syllabus: syllabus, + symposium: symposium, + synopsis: synopsis, + synthesis: synthesis, + tableau: tableau, + that: that, + thesis: thesis, + thief: thief, + tomato: tomato, + tooth: tooth, + trout: trout, + tuna: tuna, + vertebra: vertebra, + vertex: vertex, + veto: veto, + vita: vita, + vortex: vortex, + watercraft: watercraft, + wharf: wharf, + wife: wife, + wolf: wolf, + woman: woman, + 'default': irregularPlurals +}); + +var irregularPlurals$2 = getCjsExportFromNamespace(irregularPlurals$1); + +var irregularPlurals_1 = createCommonjsModule(function (module) { + + +const map = new Map(); +// TODO: Use Object.entries when targeting Node.js 8 +for (const key of Object.keys(irregularPlurals$2)) { + map.set(key, irregularPlurals$2[key]); +} + +// Ensure nobody can modify each others Map +Object.defineProperty(module, 'exports', { + get() { + return map; + } +}); +}); + +var plur = (word, plural, count) => { + if (typeof plural === 'number') { + count = plural; + } + + if (irregularPlurals_1.has(word.toLowerCase())) { + plural = irregularPlurals_1.get(word.toLowerCase()); + + const firstLetter = word.charAt(0); + const isFirstLetterUpperCase = firstLetter === firstLetter.toUpperCase(); + if (isFirstLetterUpperCase) { + plural = firstLetter.toUpperCase() + plural.slice(1); + } + + const isWholeWordUpperCase = word === word.toUpperCase(); + if (isWholeWordUpperCase) { + plural = plural.toUpperCase(); + } + } else if (typeof plural !== 'string') { + plural = (word.replace(/(?:s|x|z|ch|sh)$/i, '$&e').replace(/([^aeiou])y$/i, '$1ie') + 's') + .replace(/i?e?s$/i, match => { + const isTailLowerCase = word.slice(-1) === word.slice(-1).toLowerCase(); + return isTailLowerCase ? match.toLowerCase() : match.toUpperCase(); + }); + } + + return Math.abs(count) === 1 ? word : plural; +}; + +var unistUtilPosition = createCommonjsModule(function (module, exports) { + +var position = exports; + +position.start = factory('start'); +position.end = factory('end'); + +function factory(type) { + point.displayName = type; + + return point + + function point(node) { + var point = (node && node.position && node.position[type]) || {}; + + return { + line: point.line || null, + column: point.column || null, + offset: isNaN(point.offset) ? null : point.offset + } + } +} +}); + +var unistUtilGenerated = generated; + +function generated(node) { + var position = optional(optional(node).position); + var start = optional(position.start); + var end = optional(position.end); + + return !start.line || !start.column || !end.line || !end.column +} + +function optional(value) { + return value && typeof value === 'object' ? value : {} +} + +var remarkLintListItemBulletIndent = unifiedLintRule( + 'remark-lint:list-item-bullet-indent', + listItemBulletIndent +); + +var start$1 = unistUtilPosition.start; + +function listItemBulletIndent(tree, file) { + var contents = String(file); + + unistUtilVisit(tree, 'list', visitor); + + function visitor(node) { + node.children.forEach(visitItems); + } + + function visitItems(item) { + var final; + var indent; + var reason; + + if (!unistUtilGenerated(item)) { + final = start$1(item.children[0]); + indent = contents.slice(start$1(item).offset, final.offset).match(/^\s*/)[0] + .length; + + if (indent !== 0) { + reason = + 'Incorrect indentation before bullet: remove ' + + indent + + ' ' + + plur('space', indent); + + file.message(reason, { + line: final.line, + column: final.column - indent + }); + } + } + } +} + +var remarkLintListItemIndent = unifiedLintRule('remark-lint:list-item-indent', listItemIndent); + +var start$2 = unistUtilPosition.start; + +var styles = {'tab-size': true, mixed: true, space: true}; + +function listItemIndent(tree, file, pref) { + var contents = String(file); + + pref = typeof pref === 'string' ? pref : 'tab-size'; + + if (styles[pref] !== true) { + file.fail( + 'Invalid list-item indent style `' + + pref + + "`: use either `'tab-size'`, `'space'`, or `'mixed'`" + ); + } + + unistUtilVisit(tree, 'list', visitor); + + function visitor(node) { + var spread = node.spread || node.loose; + + if (!unistUtilGenerated(node)) { + node.children.forEach(visitItem); + } + + function visitItem(item) { + var head = item.children[0]; + var final = start$2(head); + var marker; + var bulletSize; + var style; + var diff; + var reason; + + marker = contents + .slice(start$2(item).offset, final.offset) + .replace(/\[[x ]?]\s*$/i, ''); + + bulletSize = marker.trimRight().length; + + style = + pref === 'tab-size' || (pref === 'mixed' && spread) + ? Math.ceil(bulletSize / 4) * 4 + : bulletSize + 1; + + if (marker.length !== style) { + diff = style - marker.length; + + reason = + 'Incorrect list-item indent: ' + + (diff > 0 ? 'add' : 'remove') + + ' ' + + Math.abs(diff) + + ' ' + + plur('space', diff); + + file.message(reason, final); + } + } + } +} + +var mdastUtilToString = toString$4; + +// Get the text content of a node. If the node itself does not expose +// plain-text fields, `toString` will recursivly try its children. +function toString$4(node) { + return ( + valueOf$1(node) || + (node.children && node.children.map(toString$4).join('')) || + '' + ) +} + +// Get the value of `node`. Checks, `value`, `alt`, and `title`, in that order. +function valueOf$1(node) { + return ( + (node && node.value ? node.value : node.alt ? node.alt : node.title) || '' + ) +} + +var remarkLintNoAutoLinkWithoutProtocol = unifiedLintRule( + 'remark-lint:no-auto-link-without-protocol', + noAutoLinkWithoutProtocol +); + +var start$3 = unistUtilPosition.start; +var end = unistUtilPosition.end; + +// Protocol expression. +// See: . +var protocol$2 = /^[a-z][a-z+.-]+:\/?/i; + +var reason = 'All automatic links must start with a protocol'; + +function noAutoLinkWithoutProtocol(tree, file) { + unistUtilVisit(tree, 'link', visitor); + + function visitor(node) { + var children; + + if (!unistUtilGenerated(node)) { + children = node.children; + + if ( + start$3(node).column === start$3(children[0]).column - 1 && + end(node).column === end(children[children.length - 1]).column + 1 && + !protocol$2.test(mdastUtilToString(node)) + ) { + file.message(reason, node); + } + } + } +} + +var remarkLintNoBlockquoteWithoutMarker = unifiedLintRule( + 'remark-lint:no-blockquote-without-marker', + noBlockquoteWithoutMarker +); + +var reason$1 = 'Missing marker in blockquote'; + +function noBlockquoteWithoutMarker(tree, file) { + var contents = String(file); + var location = vfileLocation(file); + var last = contents.length; + + unistUtilVisit(tree, 'blockquote', visitor); + + function visitor(node) { + var indent = node.position && node.position.indent; + var start; + var length; + var index; + var line; + var offset; + var character; + var pos; + + if (unistUtilGenerated(node) || !indent || indent.length === 0) { + return + } + + start = unistUtilPosition.start(node).line; + length = indent.length; + index = -1; + + while (++index < length) { + line = start + index + 1; + pos = {line: line, column: indent[index]}; + offset = location.toOffset(pos) - 1; + + while (++offset < last) { + character = contents.charAt(offset); + + if (character === '>') { + break + } + + /* istanbul ignore else - just for safety */ + if (character !== ' ' && character !== '\t') { + file.message(reason$1, pos); + break + } + } + } + } +} + +var remarkLintNoLiteralUrls = unifiedLintRule('remark-lint:no-literal-urls', noLiteralURLs); + +var start$4 = unistUtilPosition.start; +var end$1 = unistUtilPosition.end; +var mailto$3 = 'mailto:'; +var reason$2 = 'Don’t use literal URLs without angle brackets'; + +function noLiteralURLs(tree, file) { + unistUtilVisit(tree, 'link', visitor); + + function visitor(node) { + var children = node.children; + var value = mdastUtilToString(node); + + if ( + !unistUtilGenerated(node) && + start$4(node).column === start$4(children[0]).column && + end$1(node).column === end$1(children[children.length - 1]).column && + (node.url === mailto$3 + value || node.url === value) + ) { + file.message(reason$2, node); + } + } +} + +var remarkLintOrderedListMarkerStyle = unifiedLintRule( + 'remark-lint:ordered-list-marker-style', + orderedListMarkerStyle +); + +var start$5 = unistUtilPosition.start; + +var styles$1 = { + ')': true, + '.': true, + null: true +}; + +function orderedListMarkerStyle(tree, file, pref) { + var contents = String(file); + + pref = typeof pref !== 'string' || pref === 'consistent' ? null : pref; + + if (styles$1[pref] !== true) { + file.fail( + 'Invalid ordered list-item marker style `' + + pref + + "`: use either `'.'` or `')'`" + ); + } + + unistUtilVisit(tree, 'list', visitor); + + function visitor(node) { + var children = node.children; + var length = node.ordered ? children.length : 0; + var index = -1; + var marker; + var child; + + while (++index < length) { + child = children[index]; + + if (!unistUtilGenerated(child)) { + marker = contents + .slice(start$5(child).offset, start$5(child.children[0]).offset) + .replace(/\s|\d/g, '') + .replace(/\[[x ]?]\s*$/i, ''); + + if (pref) { + if (marker !== pref) { + file.message('Marker style should be `' + pref + '`', child); + } + } else { + pref = marker; + } + } + } + } +} + +var remarkLintHardBreakSpaces = unifiedLintRule('remark-lint:hard-break-spaces', hardBreakSpaces); + +var reason$3 = 'Use two spaces for hard line breaks'; + +function hardBreakSpaces(tree, file) { + var contents = String(file); + + unistUtilVisit(tree, 'break', visitor); + + function visitor(node) { + var value; + + if (!unistUtilGenerated(node)) { + value = contents + .slice(unistUtilPosition.start(node).offset, unistUtilPosition.end(node).offset) + .split('\n', 1)[0] + .replace(/\r$/, ''); + + if (value.length > 2) { + file.message(reason$3, node); + } + } + } +} + +var remarkLintNoDuplicateDefinitions = unifiedLintRule( + 'remark-lint:no-duplicate-definitions', + noDuplicateDefinitions +); + +var reason$4 = 'Do not use definitions with the same identifier'; + +function noDuplicateDefinitions(tree, file) { + var map = {}; + + unistUtilVisit(tree, ['definition', 'footnoteDefinition'], validate); + + function validate(node) { + var identifier; + var duplicate; + + if (!unistUtilGenerated(node)) { + identifier = node.identifier; + duplicate = map[identifier]; + + if (duplicate && duplicate.type) { + file.message( + reason$4 + ' (' + unistUtilStringifyPosition(unistUtilPosition.start(duplicate)) + ')', + node + ); + } + + map[identifier] = node; + } + } +} + +var mdastUtilHeadingStyle = style; + +function style(node, relative) { + var last = node.children[node.children.length - 1]; + var depth = node.depth; + var pos = node && node.position && node.position.end; + var final = last && last.position && last.position.end; + + if (!pos) { + return null + } + + // This can only occur for `'atx'` and `'atx-closed'` headings. + // This might incorrectly match `'atx'` headings with lots of trailing white + // space as an `'atx-closed'` heading. + if (!last) { + if (pos.column - 1 <= depth * 2) { + return consolidate(depth, relative) + } + + return 'atx-closed' + } + + if (final.line + 1 === pos.line) { + return 'setext' + } + + if (final.column + depth < pos.column) { + return 'atx-closed' + } + + return consolidate(depth, relative) +} + +// Get the probable style of an atx-heading, depending on preferred style. +function consolidate(depth, relative) { + return depth < 3 + ? 'atx' + : relative === 'atx' || relative === 'setext' + ? relative + : null +} + +var remarkLintNoHeadingContentIndent = unifiedLintRule( + 'remark-lint:no-heading-content-indent', + noHeadingContentIndent +); + +var start$6 = unistUtilPosition.start; +var end$2 = unistUtilPosition.end; + +function noHeadingContentIndent(tree, file) { + var contents = String(file); + + unistUtilVisit(tree, 'heading', visitor); + + function visitor(node) { + var depth; + var children; + var type; + var head; + var initial; + var final; + var diff; + var index; + var char; + var reason; + + if (unistUtilGenerated(node)) { + return + } + + depth = node.depth; + children = node.children; + type = mdastUtilHeadingStyle(node, 'atx'); + + if (type === 'atx' || type === 'atx-closed') { + initial = start$6(node); + index = initial.offset; + char = contents.charAt(index); + + while (char && char !== '#') { + char = contents.charAt(++index); + } + + /* istanbul ignore if - CR/LF bug: remarkjs/remark#195. */ + if (!char) { + return + } + + index = depth + (index - initial.offset); + head = start$6(children[0]).column; + + // Ignore empty headings. + if (!head) { + return + } + + diff = head - initial.column - 1 - index; + + if (diff) { + reason = + (diff > 0 ? 'Remove' : 'Add') + + ' ' + + Math.abs(diff) + + ' ' + + plur('space', diff) + + ' before this heading’s content'; + + file.message(reason, start$6(children[0])); + } + } + + // Closed ATX-heading always must have a space between their content and the + // final hashes, thus, there is no `add x spaces`. + if (type === 'atx-closed') { + final = end$2(children[children.length - 1]); + diff = end$2(node).column - final.column - 1 - depth; + + if (diff) { + reason = + 'Remove ' + + diff + + ' ' + + plur('space', diff) + + ' after this heading’s content'; + + file.message(reason, final); + } + } + } +} + +var remarkLintNoInlinePadding = unifiedLintRule('remark-lint:no-inline-padding', noInlinePadding); + +function noInlinePadding(tree, file) { + unistUtilVisit(tree, ['emphasis', 'strong', 'delete', 'image', 'link'], visitor); + + function visitor(node) { + var contents; + + if (!unistUtilGenerated(node)) { + contents = mdastUtilToString(node); + + if ( + contents.charAt(0) === ' ' || + contents.charAt(contents.length - 1) === ' ' + ) { + file.message('Don’t pad `' + node.type + '` with inner spaces', node); + } + } + } +} + +var remarkLintNoShortcutReferenceImage = unifiedLintRule( + 'remark-lint:no-shortcut-reference-image', + noShortcutReferenceImage +); + +var reason$5 = 'Use the trailing [] on reference images'; + +function noShortcutReferenceImage(tree, file) { + unistUtilVisit(tree, 'imageReference', visitor); + + function visitor(node) { + if (!unistUtilGenerated(node) && node.referenceType === 'shortcut') { + file.message(reason$5, node); + } + } +} + +var remarkLintNoShortcutReferenceLink = unifiedLintRule( + 'remark-lint:no-shortcut-reference-link', + noShortcutReferenceLink +); + +var reason$6 = 'Use the trailing [] on reference links'; + +function noShortcutReferenceLink(tree, file) { + unistUtilVisit(tree, 'linkReference', visitor); + + function visitor(node) { + if (!unistUtilGenerated(node) && node.referenceType === 'shortcut') { + file.message(reason$6, node); + } + } +} + +var remarkLintNoUndefinedReferences = unifiedLintRule( + 'remark-lint:no-undefined-references', + noUndefinedReferences +); + +var reason$7 = 'Found reference to undefined definition'; + +// The identifier is upcased to avoid naming collisions with properties +// inherited from `Object.prototype`. Were `Object.create(null)` to be +// used in place of `{}`, downcasing would work equally well. +function normalize$3(s) { + return collapseWhiteSpace(s.toUpperCase()) +} + +function noUndefinedReferences(tree, file, pref) { + var allow = + pref != null && Array.isArray(pref.allow) ? pref.allow.map(normalize$3) : []; + + var map = {}; + + unistUtilVisit(tree, ['definition', 'footnoteDefinition'], mark); + unistUtilVisit(tree, ['imageReference', 'linkReference', 'footnoteReference'], find); + + function mark(node) { + if (!unistUtilGenerated(node)) { + map[normalize$3(node.identifier)] = true; + } + } + + function find(node) { + if ( + !( + unistUtilGenerated(node) || + allow.includes(normalize$3(node.identifier)) || + normalize$3(node.identifier) in map + ) + ) { + file.message(reason$7, node); + } + } +} + +var remarkLintNoUnusedDefinitions = unifiedLintRule('remark-lint:no-unused-definitions', noUnusedDefinitions); + +var reason$8 = 'Found unused definition'; + +function noUnusedDefinitions(tree, file) { + var map = {}; + var identifier; + var entry; + + unistUtilVisit(tree, ['definition', 'footnoteDefinition'], find); + unistUtilVisit(tree, ['imageReference', 'linkReference', 'footnoteReference'], mark); + + for (identifier in map) { + entry = map[identifier]; + + if (!entry.used) { + file.message(reason$8, entry.node); + } + } + + function find(node) { + if (!unistUtilGenerated(node)) { + map[node.identifier.toUpperCase()] = {node: node, used: false}; + } + } + + function mark(node) { + var info = map[node.identifier.toUpperCase()]; + + if (!unistUtilGenerated(node) && info) { + info.used = true; + } + } +} + +var plugins$1 = [ + remarkLint, + // Unix compatibility. + remarkLintFinalNewline, + // Rendering across vendors differs greatly if using other styles. + remarkLintListItemBulletIndent, + [remarkLintListItemIndent, 'tab-size'], + // Differs or unsupported across vendors. + remarkLintNoAutoLinkWithoutProtocol, + remarkLintNoBlockquoteWithoutMarker, + remarkLintNoLiteralUrls, + [remarkLintOrderedListMarkerStyle, '.'], + // Mistakes. + remarkLintHardBreakSpaces, + remarkLintNoDuplicateDefinitions, + remarkLintNoHeadingContentIndent, + remarkLintNoInlinePadding, + remarkLintNoShortcutReferenceImage, + remarkLintNoShortcutReferenceLink, + remarkLintNoUndefinedReferences, + remarkLintNoUnusedDefinitions +]; + +var remarkPresetLintRecommended = { + plugins: plugins$1 +}; + +var remarkLintBlockquoteIndentation = unifiedLintRule( + 'remark-lint:blockquote-indentation', + blockquoteIndentation +); + +function blockquoteIndentation(tree, file, pref) { + pref = typeof pref === 'number' && !isNaN(pref) ? pref : null; + + unistUtilVisit(tree, 'blockquote', visitor); + + function visitor(node) { + var diff; + var reason; + + if (unistUtilGenerated(node) || node.children.length === 0) { + return + } + + if (pref) { + diff = pref - check$3(node); + + if (diff !== 0) { + reason = + (diff > 0 ? 'Add' : 'Remove') + + ' ' + + Math.abs(diff) + + ' ' + + plur('space', diff) + + ' between blockquote and content'; + + file.message(reason, unistUtilPosition.start(node.children[0])); + } + } else { + pref = check$3(node); + } + } +} + +function check$3(node) { + var head = node.children[0]; + var indentation = unistUtilPosition.start(head).column - unistUtilPosition.start(node).column; + var padding = mdastUtilToString(head).match(/^ +/); + + if (padding) { + indentation += padding[0].length; + } + + return indentation +} + +var remarkLintCheckboxCharacterStyle = unifiedLintRule( + 'remark-lint:checkbox-character-style', + checkboxCharacterStyle +); + +var start$7 = unistUtilPosition.start; +var end$3 = unistUtilPosition.end; + +var checked = {x: true, X: true}; +var unchecked = {' ': true, '\t': true}; +var types$1 = {true: 'checked', false: 'unchecked'}; + +function checkboxCharacterStyle(tree, file, pref) { + var contents = String(file); + var location = vfileLocation(file); + + pref = typeof pref === 'object' ? pref : {}; + + if (pref.unchecked && unchecked[pref.unchecked] !== true) { + file.fail( + 'Invalid unchecked checkbox marker `' + + pref.unchecked + + "`: use either `'\\t'`, or `' '`" + ); + } + + if (pref.checked && checked[pref.checked] !== true) { + file.fail( + 'Invalid checked checkbox marker `' + + pref.checked + + "`: use either `'x'`, or `'X'`" + ); + } + + unistUtilVisit(tree, 'listItem', visitor); + + function visitor(node) { + var type; + var initial; + var final; + var value; + var style; + var character; + var reason; + + // Exit early for items without checkbox. + if (typeof node.checked !== 'boolean' || unistUtilGenerated(node)) { + return + } + + type = types$1[node.checked]; + initial = start$7(node).offset; + final = (node.children.length === 0 ? end$3(node) : start$7(node.children[0])) + .offset; + + // For a checkbox to be parsed, it must be followed by a whitespace. + value = contents + .slice(initial, final) + .trimRight() + .slice(0, -1); + + // The checkbox character is behind a square bracket. + character = value.charAt(value.length - 1); + style = pref[type]; + + if (style) { + if (character !== style) { + reason = + type.charAt(0).toUpperCase() + + type.slice(1) + + ' checkboxes should use `' + + style + + '` as a marker'; + + file.message(reason, { + start: location.toPosition(initial + value.length - 1), + end: location.toPosition(initial + value.length) + }); + } + } else { + pref[type] = character; + } + } +} + +var remarkLintCheckboxContentIndent = unifiedLintRule( + 'remark-lint:checkbox-content-indent', + checkboxContentIndent +); + +var start$8 = unistUtilPosition.start; +var end$4 = unistUtilPosition.end; + +var reason$9 = 'Checkboxes should be followed by a single character'; + +function checkboxContentIndent(tree, file) { + var contents = String(file); + var location = vfileLocation(file); + + unistUtilVisit(tree, 'listItem', visitor); + + function visitor(node) { + var initial; + var final; + var value; + + // Exit early for items without checkbox. + if (typeof node.checked !== 'boolean' || unistUtilGenerated(node)) { + return + } + + initial = start$8(node).offset; + /* istanbul ignore next - hard to test, couldn’t find a case. */ + final = (node.children.length === 0 ? end$4(node) : start$8(node.children[0])) + .offset; + + while (/[^\S\n]/.test(contents.charAt(final))) { + final++; + } + + // For a checkbox to be parsed, it must be followed by a whitespace. + value = contents.slice(initial, final); + value = value.slice(value.indexOf(']') + 1); + + if (value.length !== 1) { + file.message(reason$9, { + start: location.toPosition(final - value.length + 1), + end: location.toPosition(final) + }); + } + } +} + +var remarkLintCodeBlockStyle = unifiedLintRule('remark-lint:code-block-style', codeBlockStyle); + +var start$9 = unistUtilPosition.start; +var end$5 = unistUtilPosition.end; + +var styles$2 = {null: true, fenced: true, indented: true}; + +function codeBlockStyle(tree, file, pref) { + var contents = String(file); + + pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; + + if (styles$2[pref] !== true) { + file.fail( + 'Invalid code block style `' + + pref + + "`: use either `'consistent'`, `'fenced'`, or `'indented'`" + ); + } + + unistUtilVisit(tree, 'code', visitor); + + function visitor(node) { + var current = check(node); + + if (current) { + if (!pref) { + pref = current; + } else if (pref !== current) { + file.message('Code blocks should be ' + pref, node); + } + } + } + + // Get the style of `node`. + function check(node) { + var initial = start$9(node).offset; + var final = end$5(node).offset; + + if (unistUtilGenerated(node)) { + return null + } + + return node.lang || /^\s*([~`])\1{2,}/.test(contents.slice(initial, final)) + ? 'fenced' + : 'indented' + } +} + +var remarkLintDefinitionSpacing = unifiedLintRule('remark-lint:definition-spacing', definitionSpacing); + +var label$1 = /^\s*\[((?:\\[\s\S]|[^[\]])+)]/; +var reason$a = 'Do not use consecutive white-space in definition labels'; + +function definitionSpacing(tree, file) { + var contents = String(file); + + unistUtilVisit(tree, ['definition', 'footnoteDefinition'], validate); + + function validate(node) { + var start = unistUtilPosition.start(node).offset; + var end = unistUtilPosition.end(node).offset; + + if ( + !unistUtilGenerated(node) && + /[ \t\n]{2,}/.test(contents.slice(start, end).match(label$1)[1]) + ) { + file.message(reason$a, node); + } + } +} + +var remarkLintFencedCodeFlag = unifiedLintRule('remark-lint:fenced-code-flag', fencedCodeFlag); + +var start$a = unistUtilPosition.start; +var end$6 = unistUtilPosition.end; + +var fence$2 = /^ {0,3}([~`])\1{2,}/; +var reasonInvalid = 'Invalid code-language flag'; +var reasonMissing = 'Missing code-language flag'; + +function fencedCodeFlag(tree, file, pref) { + var contents = String(file); + var allowEmpty = false; + var flags = []; + + if (typeof pref === 'object' && !('length' in pref)) { + allowEmpty = Boolean(pref.allowEmpty); + pref = pref.flags; + } + + if (typeof pref === 'object' && 'length' in pref) { + flags = String(pref).split(','); + } + + unistUtilVisit(tree, 'code', visitor); + + function visitor(node) { + var value; + + if (!unistUtilGenerated(node)) { + if (node.lang) { + if (flags.length !== 0 && flags.indexOf(node.lang) === -1) { + file.message(reasonInvalid, node); + } + } else { + value = contents.slice(start$a(node).offset, end$6(node).offset); + + if (!allowEmpty && fence$2.test(value)) { + file.message(reasonMissing, node); + } + } + } + } +} + +var remarkLintFencedCodeMarker = unifiedLintRule('remark-lint:fenced-code-marker', fencedCodeMarker); + +var markers = { + '`': true, + '~': true, + null: true +}; + +function fencedCodeMarker(tree, file, pref) { + var contents = String(file); + + pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; + + if (markers[pref] !== true) { + file.fail( + 'Invalid fenced code marker `' + + pref + + "`: use either `'consistent'`, `` '`' ``, or `'~'`" + ); + } + + unistUtilVisit(tree, 'code', visitor); + + function visitor(node) { + var marker; + + if (!unistUtilGenerated(node)) { + marker = contents + .substr(unistUtilPosition.start(node).offset, 4) + .trimLeft() + .charAt(0); + + // Ignore unfenced code blocks. + if (markers[marker] === true) { + if (pref) { + if (marker !== pref) { + file.message( + 'Fenced code should use ' + pref + ' as a marker', + node + ); + } + } else { + pref = marker; + } + } + } + } +} + +var remarkLintFileExtension = unifiedLintRule('remark-lint:file-extension', fileExtension); + +function fileExtension(tree, file, pref) { + var ext = file.extname; + + pref = typeof pref === 'string' ? pref : 'md'; + + if (ext && ext.slice(1) !== pref) { + file.message('Invalid extension: use `' + pref + '`'); + } +} + +var remarkLintFinalDefinition = unifiedLintRule('remark-lint:final-definition', finalDefinition); + +var start$b = unistUtilPosition.start; + +function finalDefinition(tree, file) { + var last = null; + + unistUtilVisit(tree, visitor, true); + + function visitor(node) { + var line = start$b(node).line; + + // Ignore generated nodes. + if (node.type === 'root' || unistUtilGenerated(node)) { + return + } + + if (node.type === 'definition') { + if (last !== null && last > line) { + file.message( + 'Move definitions to the end of the file (after the node at line `' + + last + + '`)', + node + ); + } + } else if (last === null) { + last = line; + } + } +} + +var remarkLintFirstHeadingLevel = unifiedLintRule('remark-lint:first-heading-level', firstHeadingLevel); + +var re$3 = /. + unistUtilVisit(tree, ['heading', 'table', 'code', 'definition', 'html', 'jsx'], ignore); + unistUtilVisit(tree, ['link', 'image', 'inlineCode'], inline); + + // Iterate over every line, and warn for violating lines. + while (++index < length) { + lineLength = lines[index].length; + + if (lineLength > style) { + file.message('Line must be at most ' + style + ' characters', { + line: index + 1, + column: lineLength + 1 + }); + } + } + + // Finally, whitelist some inline spans, but only if they occur at or after + // the wrap. + // However, when they do, and there’s whitespace after it, they are not + // whitelisted. + function inline(node, pos, parent) { + var next = parent.children[pos + 1]; + var initial; + var final; + + /* istanbul ignore if - Nothing to whitelist when generated. */ + if (unistUtilGenerated(node)) { + return + } + + initial = start$c(node); + final = end$7(node); + + // No whitelisting when starting after the border, or ending before it. + if (initial.column > style || final.column < style) { + return + } + + // No whitelisting when there’s whitespace after the link. + if ( + next && + start$c(next).line === initial.line && + (!next.value || /^(.+?[ \t].+?)/.test(next.value)) + ) { + return + } + + whitelist(initial.line - 1, final.line); + } + + function ignore(node) { + /* istanbul ignore else - Hard to test, as we only run this case on `position: true` */ + if (!unistUtilGenerated(node)) { + whitelist(start$c(node).line - 1, end$7(node).line); + } + } + + // Whitelist from `initial` to `final`, zero-based. + function whitelist(initial, final) { + while (initial < final) { + lines[initial++] = ''; + } + } +} + +var remarkLintNoConsecutiveBlankLines = unifiedLintRule( + 'remark-lint:no-consecutive-blank-lines', + noConsecutiveBlankLines +); + +function noConsecutiveBlankLines(tree, file) { + unistUtilVisit(tree, visitor); + + function visitor(node) { + var children = node.children; + var head; + var tail; + + if (!unistUtilGenerated(node) && children) { + head = children[0]; + + if (head && !unistUtilGenerated(head)) { + // Compare parent and first child. + compare(unistUtilPosition.start(node), unistUtilPosition.start(head), 0); + + // Compare between each child. + children.forEach(visitChild); + + tail = children[children.length - 1]; + + // Compare parent and last child. + if (tail !== head && !unistUtilGenerated(tail)) { + compare(unistUtilPosition.end(node), unistUtilPosition.end(tail), 1); + } + } + } + } + + // Compare the difference between `start` and `end`, and warn when that + // difference exceeds `max`. + function compare(start, end, max) { + var diff = end.line - start.line; + var lines = Math.abs(diff) - max; + var reason; + + if (lines > 0) { + reason = + 'Remove ' + + lines + + ' ' + + plur('line', lines) + + ' ' + + (diff > 0 ? 'before' : 'after') + + ' node'; + + file.message(reason, end); + } + } + + function visitChild(child, index, all) { + var prev = all[index - 1]; + var max = 2; + + if (prev && !unistUtilGenerated(prev) && !unistUtilGenerated(child)) { + if ( + (prev.type === 'list' && child.type === 'list') || + (child.type === 'code' && prev.type === 'list' && !child.lang) + ) { + max++; + } + + compare(unistUtilPosition.end(prev), unistUtilPosition.start(child), max); + } + } +} + +var remarkLintNoFileNameArticles = unifiedLintRule('remark-lint:no-file-name-articles', noFileNameArticles); + +function noFileNameArticles(tree, file) { + var match = file.stem && file.stem.match(/^(the|teh|an?)\b/i); + + if (match) { + file.message('Do not start file names with `' + match[0] + '`'); + } +} + +var remarkLintNoFileNameConsecutiveDashes = unifiedLintRule( + 'remark-lint:no-file-name-consecutive-dashes', + noFileNameConsecutiveDashes +); + +var reason$b = 'Do not use consecutive dashes in a file name'; + +function noFileNameConsecutiveDashes(tree, file) { + if (file.stem && /-{2,}/.test(file.stem)) { + file.message(reason$b); + } +} + +var remarkLintNoFileNameOuterDashes = unifiedLintRule( + 'remark-lint:no-file-name-outer-dashes', + noFileNameOuterDashes +); + +var reason$c = 'Do not use initial or final dashes in a file name'; + +function noFileNameOuterDashes(tree, file) { + if (file.stem && /^-|-$/.test(file.stem)) { + file.message(reason$c); + } +} + +var remarkLintNoHeadingIndent = unifiedLintRule('remark-lint:no-heading-indent', noHeadingIndent); + +var start$d = unistUtilPosition.start; + +function noHeadingIndent(tree, file) { + var contents = String(file); + var length = contents.length; + + unistUtilVisit(tree, 'heading', visitor); + + function visitor(node) { + var initial; + var begin; + var index; + var character; + var diff; + + if (unistUtilGenerated(node)) { + return + } + + initial = start$d(node); + begin = initial.offset; + index = begin - 1; + + while (++index < length) { + character = contents.charAt(index); + + if (character !== ' ' && character !== '\t') { + break + } + } + + diff = index - begin; + + if (diff) { + file.message( + 'Remove ' + diff + ' ' + plur('space', diff) + ' before this heading', + { + line: initial.line, + column: initial.column + diff + } + ); + } + } +} + +var start$e = unistUtilPosition.start; + + + +var remarkLintNoMultipleToplevelHeadings = unifiedLintRule( + 'remark-lint:no-multiple-toplevel-headings', + noMultipleToplevelHeadings +); + +function noMultipleToplevelHeadings(tree, file, pref) { + var style = pref ? pref : 1; + var duplicate; + + unistUtilVisit(tree, 'heading', visitor); + + function visitor(node) { + if (!unistUtilGenerated(node) && node.depth === style) { + if (duplicate) { + file.message( + 'Don’t use multiple top level headings (' + duplicate + ')', + node + ); + } else { + duplicate = unistUtilStringifyPosition(start$e(node)); + } + } + } +} + +var remarkLintNoShellDollars = unifiedLintRule('remark-lint:no-shell-dollars', noShellDollars); + +var reason$d = 'Do not use dollar signs before shell-commands'; + +// List of shell script file extensions (also used as code flags for syntax +// highlighting on GitHub): +// See: +var flags = [ + 'sh', + 'bash', + 'bats', + 'cgi', + 'command', + 'fcgi', + 'ksh', + 'tmux', + 'tool', + 'zsh' +]; + +function noShellDollars(tree, file) { + unistUtilVisit(tree, 'code', visitor); + + function visitor(node) { + var lines; + var line; + var length; + var index; + + // Check both known shell code and unknown code. + if (!unistUtilGenerated(node) && node.lang && flags.indexOf(node.lang) !== -1) { + lines = node.value.split('\n'); + length = lines.length; + index = -1; + + if (length <= 1) { + return + } + + while (++index < length) { + line = lines[index]; + + if (line.trim() && !line.match(/^\s*\$\s*/)) { + return + } + } + + file.message(reason$d, node); + } + } +} + +var remarkLintNoTableIndentation = unifiedLintRule('remark-lint:no-table-indentation', noTableIndentation); + +var reason$e = 'Do not indent table rows'; + +function noTableIndentation(tree, file) { + var contents = String(file); + + unistUtilVisit(tree, 'table', visitor); + + function visitor(node) { + if (!unistUtilGenerated(node)) { + node.children.forEach(each); + } + + return unistUtilVisit.SKIP + } + + function each(row) { + var fence = contents.slice( + unistUtilPosition.start(row).offset, + unistUtilPosition.start(row.children[0]).offset + ); + + if (fence.indexOf('|') > 1) { + file.message(reason$e, row); + } + } +} + +var remarkLintNoTabs = unifiedLintRule('remark-lint:no-tabs', noTabs); + +var reason$f = 'Use spaces instead of hard-tabs'; + +function noTabs(tree, file) { + var content = String(file); + var position = vfileLocation(file).toPosition; + var index = content.indexOf('\t'); + + while (index !== -1) { + file.message(reason$f, position(index)); + index = content.indexOf('\t', index + 1); + } +} + +var remarkLintNoTrailingSpaces = unifiedLintRule('remark-lint:no-trailing-spaces', noTrailingSpaces); + +/** + * Lines that are just space characters are not present in + * the AST, which is why we loop through lines manually. + */ + +function noTrailingSpaces(ast, file) { + var lines = file.toString().split(/\r?\n/); + for (var i = 0; i < lines.length; i++) { + var currentLine = lines[i]; + var lineIndex = i + 1; + if (/\s$/.test(currentLine)) { + file.message('Remove trailing whitespace', { + position: { + start: { line: lineIndex, column: currentLine.length + 1 }, + end: { line: lineIndex } + } + }); + } + } +} + +var remarkLintProhibitedStrings = unifiedLintRule('remark-lint:prohibited-strings', prohibitedStrings); + +function testProhibited(val, content) { + const re = new RegExp(`(\\.|@[a-z0-9/-]*)?\\b(${val.no})\\b(\\.\\w)?`, 'g'); + + let result = null; + while (result = re.exec(content)) { + if (!result[1] && !result[3]) { + return result[2]; + } + } + + return false; +} + +function prohibitedStrings(ast, file, strings) { + unistUtilVisit(ast, 'text', checkText); + + function checkText(node) { + const content = node.value; + + strings.forEach((val) => { + const result = testProhibited(val, content); + if (result) { + file.message(`Use "${val.yes}" instead of "${result}"`, node); + } + }); + } +} + +var rule = unifiedLintRule; + + + + +var remarkLintRuleStyle = rule('remark-lint:rule-style', ruleStyle); + +var start$f = unistUtilPosition.start; +var end$8 = unistUtilPosition.end; + +function ruleStyle(tree, file, pref) { + var contents = String(file); + + pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; + + if (pref !== null && /[^-_* ]/.test(pref)) { + file.fail( + "Invalid preferred rule-style: provide a valid markdown rule, or `'consistent'`" + ); + } + + unistUtilVisit(tree, 'thematicBreak', visitor); + + function visitor(node) { + var initial = start$f(node).offset; + var final = end$8(node).offset; + var rule; + + if (!unistUtilGenerated(node)) { + rule = contents.slice(initial, final); + + if (pref) { + if (rule !== pref) { + file.message('Rules should use `' + pref + '`', node); + } + } else { + pref = rule; + } + } + } +} + +var remarkLintStrongMarker = unifiedLintRule('remark-lint:strong-marker', strongMarker); + +var markers$1 = {'*': true, _: true, null: true}; + +function strongMarker(tree, file, pref) { + var contents = String(file); + + pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; + + if (markers$1[pref] !== true) { + file.fail( + 'Invalid strong marker `' + + pref + + "`: use either `'consistent'`, `'*'`, or `'_'`" + ); + } + + unistUtilVisit(tree, 'strong', visitor); + + function visitor(node) { + var marker = contents.charAt(unistUtilPosition.start(node).offset); + + if (!unistUtilGenerated(node)) { + if (pref) { + if (marker !== pref) { + file.message('Strong should use `' + pref + '` as a marker', node); + } + } else { + pref = marker; + } + } + } +} + +var remarkLintTableCellPadding = unifiedLintRule('remark-lint:table-cell-padding', tableCellPadding); + +var start$g = unistUtilPosition.start; +var end$9 = unistUtilPosition.end; + +var styles$3 = {null: true, padded: true, compact: true}; + +function tableCellPadding(tree, file, pref) { + var contents = String(file); + + pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; + + if (styles$3[pref] !== true) { + file.fail('Invalid table-cell-padding style `' + pref + '`'); + } + + unistUtilVisit(tree, 'table', visitor); + + function visitor(node) { + var rows = node.children; + var sizes = new Array(node.align.length); + var length = unistUtilGenerated(node) ? -1 : rows.length; + var index = -1; + var entries = []; + var style; + var row; + var cells; + var column; + var cellCount; + var cell; + var next; + var fence; + var pos; + var entry; + var final; + + // Check rows. + while (++index < length) { + row = rows[index]; + cells = row.children; + cellCount = cells.length; + column = -2; // Start without a first cell. + next = null; + final = undefined; + + // Check fences (before, between, and after cells). + while (++column < cellCount) { + cell = next; + next = cells[column + 1]; + + fence = contents.slice( + cell ? end$9(cell).offset : start$g(row).offset, + next ? start$g(next).offset : end$9(row).offset + ); + + pos = fence.indexOf('|'); + + if (cell && cell.children.length !== 0 && final !== undefined) { + entries.push({node: cell, start: final, end: pos, index: column}); + + // Detect max space per column. + sizes[column] = Math.max(sizes[column] || 0, size(cell)); + } else { + final = undefined; + } + + if (next && next.children.length !== 0) { + final = fence.length - pos - 1; + } else { + final = undefined; + } + } + } + + if (pref) { + style = pref === 'padded' ? 1 : 0; + } else { + style = entries[0] && (!entries[0].start || !entries[0].end) ? 0 : 1; + } + + index = -1; + length = entries.length; + + while (++index < length) { + entry = entries[index]; + checkSide('start', entry, style, sizes); + checkSide('end', entry, style, sizes); + } + + return unistUtilVisit.SKIP + } + + function checkSide(side, entry, style, sizes) { + var cell = entry.node; + var spacing = entry[side]; + var index = entry.index; + var reason; + + if (spacing === undefined || spacing === style) { + return + } + + reason = 'Cell should be '; + + if (style === 0) { + reason += 'compact'; + + // Ignore every cell except the biggest in the column. + if (size(cell) < sizes[index]) { + return + } + } else { + reason += 'padded'; + + if (spacing > style) { + reason += ' with 1 space, not ' + spacing; + + // May be right or center aligned. + if (size(cell) < sizes[index]) { + return + } + } + } + + file.message(reason, cell.position[side]); + } +} + +function size(node) { + return end$9(node).offset - start$g(node).offset +} + +var remarkLintTablePipes = unifiedLintRule('remark-lint:table-pipes', tablePipes); + +var start$h = unistUtilPosition.start; +var end$a = unistUtilPosition.end; + +var reasonStart = 'Missing initial pipe in table fence'; +var reasonEnd = 'Missing final pipe in table fence'; + +function tablePipes(tree, file) { + var contents = String(file); + + unistUtilVisit(tree, 'table', visitor); + + function visitor(node) { + var rows = node.children; + var length = rows.length; + var index = -1; + var row; + var cells; + var head; + var tail; + var initial; + var final; + + while (++index < length) { + row = rows[index]; + + if (!unistUtilGenerated(row)) { + cells = row.children; + head = cells[0]; + tail = cells[cells.length - 1]; + initial = contents.slice(start$h(row).offset, start$h(head).offset); + final = contents.slice(end$a(tail).offset, end$a(row).offset); + + if (initial.indexOf('|') === -1) { + file.message(reasonStart, start$h(row)); + } + + if (final.indexOf('|') === -1) { + file.message(reasonEnd, end$a(row)); + } + } + } + } +} + +var remarkLintUnorderedListMarkerStyle = unifiedLintRule( + 'remark-lint:unordered-list-marker-style', + unorderedListMarkerStyle +); + +var start$i = unistUtilPosition.start; + +var styles$4 = { + '-': true, + '*': true, + '+': true, + null: true +}; + +function unorderedListMarkerStyle(tree, file, pref) { + var contents = String(file); + + pref = typeof pref === 'string' && pref !== 'consistent' ? pref : null; + + if (styles$4[pref] !== true) { + file.fail( + 'Invalid unordered list-item marker style `' + + pref + + "`: use either `'-'`, `'*'`, or `'+'`" + ); + } + + unistUtilVisit(tree, 'list', visitor); + + function visitor(node) { + var children = node.children; + var length = node.ordered ? 0 : children.length; + var index = -1; + var child; + var marker; + + while (++index < length) { + child = children[index]; + + if (!unistUtilGenerated(child)) { + marker = contents + .slice(start$i(child).offset, start$i(child.children[0]).offset) + .replace(/\[[x ]?]\s*$/i, '') + .replace(/\s/g, ''); + + if (pref) { + if (marker !== pref) { + file.message('Marker style should be `' + pref + '`', child); + } + } else { + pref = marker; + } + } + } + } +} + +// Add in rules alphabetically +var plugins$2 = [ + remarkLint, + // Leave preset at the top so it can be overridden + remarkPresetLintRecommended, + [remarkLintBlockquoteIndentation, 2], + [ + remarkLintCheckboxCharacterStyle, + { + checked: "x", + unchecked: " " + } + ], + remarkLintCheckboxContentIndent, + [remarkLintCodeBlockStyle, "fenced"], + remarkLintDefinitionSpacing, + remarkLintFencedCodeFlag, + [remarkLintFencedCodeMarker, "`"], + [remarkLintFileExtension, "md"], + remarkLintFinalDefinition, + [remarkLintFirstHeadingLevel, 1], + [remarkLintHeadingStyle, "atx"], + [remarkLintListItemIndent, "space"], + remarkLintMaximumLineLength, + remarkLintNoConsecutiveBlankLines, + remarkLintNoFileNameArticles, + remarkLintNoFileNameConsecutiveDashes, + remarkLintNoFileNameOuterDashes, + remarkLintNoHeadingIndent, + [remarkLintNoLiteralUrls, false], + remarkLintNoMultipleToplevelHeadings, + remarkLintNoShellDollars, + remarkLintNoTableIndentation, + remarkLintNoTabs, + remarkLintNoTrailingSpaces, + [ + remarkLintProhibitedStrings, + [ + { no: "End-Of-Life", yes: "End-of-Life" }, + { no: "End-of-life", yes: "End-of-Life" }, + { no: "Github", yes: "GitHub" }, + { no: "hostname", yes: "host name" }, + { no: "[Jj]avascript", yes: "JavaScript" }, + { no: "Node", yes: "Node.js" }, + { no: "Node.JS", yes: "Node.js" }, + { no: "node.js", yes: "Node.js" }, + { no: "[Nn]ote that", yes: "" }, + { no: "Rfc", yes: "RFC" }, + { no: "[Rr][Ff][Cc]\\d+", yes: "RFC " }, + { no: "rfc", yes: "RFC" }, + { no: "UNIX", yes: "Unix" }, + { no: "unix", yes: "Unix" }, + { no: "v8", yes: "V8" } + ] + ], + remarkLintRuleStyle, + [remarkLintStrongMarker, "*"], + [remarkLintTableCellPadding, "padded"], + remarkLintTablePipes, + [remarkLintUnorderedListMarkerStyle, "*"] +]; + +var remarkPresetLintNode = { + plugins: plugins$2 +}; + +var proc = getCjsExportFromNamespace(_package$1); + +var cli = getCjsExportFromNamespace(_package$3); + +// To aid in future maintenance, this layout closely matches remark-cli/cli.js. +// https://github.com/remarkjs/remark/blob/master/packages/remark-cli/cli.js + + + + + + + + +unifiedArgs({ + processor: remark().use(remarkPresetLintNode), + name: proc.name, + description: cli.description, + version: [ + proc.name + ': ' + proc.version, + cli.name + ': ' + cli.version, + ].join(', '), + pluginPrefix: proc.name, + presetPrefix: proc.name + '-preset', + packageField: proc.name + 'Config', + rcName: '.' + proc.name + 'rc', + ignoreName: '.' + proc.name + 'ignore', + extensions: markdownExtensions$2, + detectConfig: false, +}); diff --git a/tools/node-lint-md-cli-rollup/package-lock.json b/tools/node-lint-md-cli-rollup/package-lock.json index 933c9ffbda3c7d..af4ac3812a00e1 100644 --- a/tools/node-lint-md-cli-rollup/package-lock.json +++ b/tools/node-lint-md-cli-rollup/package-lock.json @@ -1,20 +1,90 @@ { "name": "node-lint-md-cli-rollup", - "version": "2.0.1", + "version": "2.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { + "@rollup/plugin-commonjs": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.1.tgz", + "integrity": "sha512-SaVUoaLDg3KnIXC5IBNIspr1APTYDzk05VaYcI6qz+0XX3ZlSCwAkfAhNSOxfd5GAdcm/63Noi4TowOY9MpcDg==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.0.0", + "estree-walker": "^0.6.1", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.11.0" + } + }, + "@rollup/plugin-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.0.1.tgz", + "integrity": "sha512-soxllkhOGgchswBAAaTe7X9G80U2tjjHvXv0sBrriLJcC/89PkP59iTrKPOfbz3SjX088mKDmMhAscuyLz8ZSg==", + "dev": true, + "requires": { + "rollup-pluginutils": "^2.5.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.0.0.tgz", + "integrity": "sha512-+vOx2+WMBMFotYKM3yYeDGZxIvcQ7yO4g+SuKDFsjKaq8Lw3EPgfB6qNlp8Z/3ceDCEhHvC9/b+PgBGwDQGbzQ==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.0.0", + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.11.1" + } + }, + "@rollup/pluginutils": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.4.tgz", + "integrity": "sha512-buc0oeq2zqQu2mpMyvZgAaQvitikYjT/4JYhA4EXwxX8/g0ZGHoGiX+0AwmfhrNqH4oJv67gn80sTZFQ/jL1bw==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "@types/node": { + "version": "13.1.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.8.tgz", + "integrity": "sha512-6XzyyNM9EKQW4HKuzbo/CkOIjn/evtCmsU+MUM1xDfJ+3/rNjBttM1NgN7AOQvN6tP1Sl1D1PIKMreTArnxM9A==", + "dev": true + }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/unist": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==" }, - "@zeit/ncc": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.21.0.tgz", - "integrity": "sha512-RUMdvVK/w78oo+yBjruZltt0kJXYar2un/1bYQ2LuHG7GmFVm+QjxzEmySwREctaJdEnBvlMdUNWd9hXHxEI3g==", + "acorn": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", "dev": true }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -77,6 +147,12 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, + "builtin-modules": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", + "dev": true + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -160,6 +236,17 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -186,6 +273,12 @@ "is-arrayish": "^0.2.1" } }, + "es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -196,6 +289,12 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -272,6 +371,11 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==" + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -291,6 +395,12 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, "irregular-plurals": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-2.0.0.tgz", @@ -348,6 +458,11 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -366,6 +481,12 @@ "resolved": "https://registry.npmjs.org/is-hidden/-/is-hidden-1.1.2.tgz", "integrity": "sha512-kytBeNVW2QTIqZdJBDKIjP+EkUTzDT07rsc111w/gxqR6wK3ODkOswcpxgED6HU6t7fEhOxqojVZ2a2kU9rj+A==" }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -381,6 +502,15 @@ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.0.0.tgz", "integrity": "sha512-EYisGhpgSCwspmIuRHGjROWTon2Xp8Z7U03Wubk/bTL5TTRC5R1rGVgyjzBrk9+ULdH6cRD06KRcw/xfqhVYKQ==" }, + "is-reference": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz", + "integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==", + "dev": true, + "requires": { + "@types/estree": "0.0.39" + } + }, "is-whitespace-character": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.3.tgz", @@ -427,6 +557,15 @@ "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.3.tgz", "integrity": "sha512-9lz5IVdpwsKLMzQi0MQ+oD9EA0mIGcWYP7jXMTZVXP8D42PwuAk+M/HBFYQoxt1G5OR8m7aSIgb1UymfWGBWEw==" }, + "magic-string": { + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.6.tgz", + "integrity": "sha512-3a5LOMSGoCTH5rbqobC2HuDNRtE2glHZ8J7pK+QZYppyWA36yuNpsX994rIY2nCuyP7CZYy7lQq/X2jygiZ89g==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, "markdown-escapes": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.3.tgz", @@ -538,6 +677,12 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, "picomatch": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", @@ -562,6 +707,16 @@ "strip-json-comments": "~2.0.1" } }, + "readable-stream": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.5.0.tgz", + "integrity": "sha512-gSz026xs2LfxBPudDuI41V1lka8cxg64E66SGe78zJlsUofOg/yqwezdIcdfwik6B4h8LFmWPA9ef9X3FiNFLA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "readdirp": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", @@ -570,6 +725,15 @@ "picomatch": "^2.0.7" } }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, "remark": { "version": "11.0.2", "resolved": "https://registry.npmjs.org/remark/-/remark-11.0.2.tgz", @@ -1174,26 +1338,83 @@ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" }, + "resolve": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz", + "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" }, + "rollup": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.30.1.tgz", + "integrity": "sha512-Uus8mwQXwaO+ZVoNwBcXKhT0AvycFCBW/W8VZtkpVGsotRllWk9oldfCjqWmTnFRI0y7x6BnEqSqc65N+/YdBw==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/node": "*", + "acorn": "^7.1.0" + } + }, + "rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + }, "safe-buffer": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" }, + "shelljs": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", + "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, "shellsubstitute": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shellsubstitute/-/shellsubstitute-1.2.0.tgz", "integrity": "sha1-5PcCpQxRiw9v6YRRiQ1wWvKba3A=" }, + "shx": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.2.tgz", + "integrity": "sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA==", + "dev": true, + "requires": { + "es6-object-assign": "^1.0.3", + "minimist": "^1.2.0", + "shelljs": "^0.8.1" + } + }, "sliced": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -1204,6 +1425,16 @@ "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.2.tgz", "integrity": "sha512-8LpelPGR0qQM4PnfLiplOQNJcIN1/r2Gy0xKB2zKnIW2YzPMt2sR4I/+gtPjhN7Svh9kw+zqEg2SFwpBO9iNiw==" }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -1224,6 +1455,14 @@ "is-hexadecimal": "^1.0.0" } }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -1250,6 +1489,15 @@ "is-number": "^7.0.0" } }, + "to-vfile": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/to-vfile/-/to-vfile-6.0.0.tgz", + "integrity": "sha512-i9fwXXSsHLu7mzgixc1WjgnqSe6pGpjnzCYoFmrASvEueLfyKf09QAe+XQYu8OAJ62aFqHpe2EKXojeRVvEzqA==", + "requires": { + "is-buffer": "^2.0.0", + "vfile": "^4.0.0" + } + }, "trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", @@ -1304,119 +1552,33 @@ "minimist": "^1.2.0", "text-table": "^0.2.0", "unified-engine": "^7.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "concat-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", - "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.0.2", - "typedarray": "^0.0.6" - } - }, - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - }, - "to-vfile": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/to-vfile/-/to-vfile-6.0.0.tgz", - "integrity": "sha512-i9fwXXSsHLu7mzgixc1WjgnqSe6pGpjnzCYoFmrASvEueLfyKf09QAe+XQYu8OAJ62aFqHpe2EKXojeRVvEzqA==", - "requires": { - "is-buffer": "^2.0.0", - "vfile": "^4.0.0" - } - }, - "unified-engine": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/unified-engine/-/unified-engine-7.0.0.tgz", - "integrity": "sha512-zH/MvcISpWg3JZtCoY/GYBw1WnVHkhnPoMBWpmuvAifCPSS9mzT9EbtimesJp6t2nnr/ojI0mg3TmkO1CjIwVA==", - "requires": { - "concat-stream": "^2.0.0", - "debug": "^4.0.0", - "fault": "^1.0.0", - "figures": "^3.0.0", - "fn-name": "^2.0.1", - "glob": "^7.0.3", - "ignore": "^5.0.0", - "is-empty": "^1.0.0", - "is-hidden": "^1.0.1", - "is-object": "^1.0.1", - "js-yaml": "^3.6.1", - "load-plugin": "^2.0.0", - "parse-json": "^4.0.0", - "to-vfile": "^6.0.0", - "trough": "^1.0.0", - "unist-util-inspect": "^4.1.2", - "vfile-reporter": "^6.0.0", - "vfile-statistics": "^1.1.0", - "x-is-string": "^0.1.0", - "xtend": "^4.0.1" - } - }, - "vfile-reporter": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-6.0.0.tgz", - "integrity": "sha512-8Is0XxFxWJUhPJdOg3CyZTqd3ICCWg6r304PuBl818ZG91h4FMS3Q+lrOPS+cs5/DZK3H0+AkJdH0J8JEwKtDA==", - "requires": { - "repeat-string": "^1.5.0", - "string-width": "^4.0.0", - "supports-color": "^6.0.0", - "unist-util-stringify-position": "^2.0.0", - "vfile-sort": "^2.1.2", - "vfile-statistics": "^1.1.0" - } - } + } + }, + "unified-engine": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/unified-engine/-/unified-engine-7.0.0.tgz", + "integrity": "sha512-zH/MvcISpWg3JZtCoY/GYBw1WnVHkhnPoMBWpmuvAifCPSS9mzT9EbtimesJp6t2nnr/ojI0mg3TmkO1CjIwVA==", + "requires": { + "concat-stream": "^2.0.0", + "debug": "^4.0.0", + "fault": "^1.0.0", + "figures": "^3.0.0", + "fn-name": "^2.0.1", + "glob": "^7.0.3", + "ignore": "^5.0.0", + "is-empty": "^1.0.0", + "is-hidden": "^1.0.1", + "is-object": "^1.0.1", + "js-yaml": "^3.6.1", + "load-plugin": "^2.0.0", + "parse-json": "^4.0.0", + "to-vfile": "^6.0.0", + "trough": "^1.0.0", + "unist-util-inspect": "^4.1.2", + "vfile-reporter": "^6.0.0", + "vfile-statistics": "^1.1.0", + "x-is-string": "^0.1.0", + "xtend": "^4.0.1" } }, "unified-lint-rule": { @@ -1531,6 +1693,29 @@ "unist-util-stringify-position": "^2.0.0" } }, + "vfile-reporter": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-6.0.0.tgz", + "integrity": "sha512-8Is0XxFxWJUhPJdOg3CyZTqd3ICCWg6r304PuBl818ZG91h4FMS3Q+lrOPS+cs5/DZK3H0+AkJdH0J8JEwKtDA==", + "requires": { + "repeat-string": "^1.5.0", + "string-width": "^4.0.0", + "supports-color": "^6.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-sort": "^2.1.2", + "vfile-statistics": "^1.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "vfile-sort": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/vfile-sort/-/vfile-sort-2.2.1.tgz", diff --git a/tools/node-lint-md-cli-rollup/package.json b/tools/node-lint-md-cli-rollup/package.json index 8e02bbcac7140f..67cad50ce21516 100644 --- a/tools/node-lint-md-cli-rollup/package.json +++ b/tools/node-lint-md-cli-rollup/package.json @@ -1,20 +1,24 @@ { "name": "node-lint-md-cli-rollup", "description": "remark packaged for Node.js Markdown linting", - "version": "2.0.1", + "version": "2.0.2", "devDependencies": { - "@zeit/ncc": "^0.21.0" + "@rollup/plugin-commonjs": "^11.0.1", + "@rollup/plugin-json": "^4.0.1", + "@rollup/plugin-node-resolve": "^7.0.0", + "rollup": "^1.30.1", + "shx": "^0.3.2" }, "dependencies": { "markdown-extensions": "^1.1.1", "remark": "^11.0.2", "remark-lint": "^6.0.5", - "remark-preset-lint-node": "^1.11.0", + "remark-preset-lint-node": "^1.12.0", "unified-args": "^7.1.0" }, - "main": "src/cli-entry.js", + "main": "dist/index.js", "scripts": { - "build": "ncc build -m", - "build-node": "npm run build && cp dist/index.js ../lint-md.js" + "build": "npx rollup -c", + "build-node": "npm run build && npx shx cp dist/index.js ../lint-md.js" } } diff --git a/tools/node-lint-md-cli-rollup/rollup.config.js b/tools/node-lint-md-cli-rollup/rollup.config.js new file mode 100644 index 00000000000000..73770d8836a9df --- /dev/null +++ b/tools/node-lint-md-cli-rollup/rollup.config.js @@ -0,0 +1,51 @@ +'use strict'; + +const resolve = require('@rollup/plugin-node-resolve'); +const commonjs = require('@rollup/plugin-commonjs'); +const json = require('@rollup/plugin-json'); + +module.exports = { + input: 'src/cli-entry.js', + output: { + file: 'dist/index.js', + format: 'cjs', + sourcemap: false, + }, + external: [ + 'stream', + 'path', + 'module', + 'util', + 'tty', + 'os', + 'fs', + 'fsevents', + 'events', + 'assert', + ], + plugins: [ + { + name: 'brute-replace', + transform(code, id) { + const normID = id.replace(__dirname, '').replace(/\\+/g, '/'); + if (normID === '/node_modules/concat-stream/index.js') { + return code.replace('\'readable-stream\'', '\'stream\''); + } + if (normID === '/node_modules/unified-args/lib/options.js') { + return code.replace('\'./schema\'', '\'./schema.json\''); + } + if (normID === '/node_modules/chokidar/lib/fsevents-handler.js' && + process.platform !== 'darwin') { + return code.replace( + 'fsevents = require(\'fsevents\');', 'fsevents = undefined;' + ); + } + } + }, + json({ + preferConst: true + }), + resolve(), // tells Rollup how to find date-fns in node_modules + commonjs(), // Converts date-fns to ES modules + ] +}; diff --git a/tools/node-lint-md-cli-rollup/src/cli-entry.js b/tools/node-lint-md-cli-rollup/src/cli-entry.js index 9fe8050b7ee071..a66c4a6894aef6 100644 --- a/tools/node-lint-md-cli-rollup/src/cli-entry.js +++ b/tools/node-lint-md-cli-rollup/src/cli-entry.js @@ -1,4 +1,3 @@ -#!/usr/bin/env node 'use strict'; // To aid in future maintenance, this layout closely matches remark-cli/cli.js.