UNPKG

129 kBJavaScriptView Raw
1"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var detectPort=_interopDefault(require("detect-port")),equal=_interopDefault(require("fast-deep-equal")),remarkParse=_interopDefault(require("remark-parse")),glob=_interopDefault(require("fast-glob")),resolve=_interopDefault(require("resolve")),artTemplate=require("art-template"),doczUtils=require("docz-utils"),crypto=require("crypto"),slugify=_interopDefault(require("@sindresorhus/slugify")),pReduce=_interopDefault(require("p-reduce")),getPkgRepo=_interopDefault(require("get-pkg-repo")),findup=_interopDefault(require("find-up")),chokidar=_interopDefault(require("chokidar")),WS=_interopDefault(require("ws")),merge=_interopDefault(require("deepmerge")),getCacheIdentifier=_interopDefault(require("react-dev-utils/getCacheIdentifier")),Config=_interopDefault(require("webpack-chain")),HappyPack=_interopDefault(require("happypack")),matter=_interopDefault(require("remark-frontmatter")),slug=_interopDefault(require("rehype-slug")),remarkDocz=_interopDefault(require("remark-docz")),rehypeDocz=_interopDefault(require("rehype-docz")),webpackBarPlugin=_interopDefault(require("webpackbar")),friendlyErrorsPlugin=_interopDefault(require("friendly-errors-webpack-plugin")),htmlMinifier=require("html-minifier"),manifestPlugin=_interopDefault(require("webpack-manifest-plugin")),webpackBundleAnalyzer=require("webpack-bundle-analyzer"),ctags=require("common-tags"),miniHtmlWebpack=require("mini-html-webpack-plugin"),miniHtmlWebpack__default=_interopDefault(miniHtmlWebpack),TerserPlugin=require("terser-webpack-plugin"),fs=require("fs"),fs__default=_interopDefault(fs),WebpackDevServer=_interopDefault(require("webpack-dev-server")),express=require("express"),errorOverlayMiddleware=_interopDefault(require("react-dev-utils/errorOverlayMiddleware")),evalSourceMapMiddleware=_interopDefault(require("react-dev-utils/evalSourceMapMiddleware")),ignoredFiles=_interopDefault(require("react-dev-utils/ignoredFiles")),serverUtils=require("react-dev-utils/WebpackDevServerUtils"),chalk=_interopDefault(require("chalk")),webpack=require("webpack"),webpack__default=_interopDefault(webpack),FSR=_interopDefault(require("react-dev-utils/FileSizeReporter")),formatWebpackMessages=_interopDefault(require("react-dev-utils/formatWebpackMessages")),printBuildError=_interopDefault(require("react-dev-utils/printBuildError")),createLogger=_interopDefault(require("progress-estimator")),path=require("path"),path__default=_interopDefault(path),loadCfg=require("load-cfg"),logger=_interopDefault(require("signale")),fs$1=require("fs-extra"),envDotProp=_interopDefault(require("env-dot-prop")),humanize=_interopDefault(require("humanize-string")),titleize=_interopDefault(require("titleize"));function __rest(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);n.length>o;o++)0>t.indexOf(n[o])&&(r[n[o]]=e[n[o]])}return r}var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function commonjsRequire(){throw Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var isBuffer=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},own={}.hasOwnProperty,unistUtilStringifyPosition=stringify;function stringify(e){return e&&"object"==typeof e?own.call(e,"position")||own.call(e,"type")?position(e.position):own.call(e,"start")||own.call(e,"end")?position(e):own.call(e,"line")||own.call(e,"column")?point(e):null:null}function point(e){return e&&"object"==typeof e||(e={}),index(e.line)+":"+index(e.column)}function position(e){return e&&"object"==typeof e||(e={}),point(e.start)+"-"+point(e.end)}function index(e){return e&&"number"==typeof e?e:1}var vfileMessage=VMessage;function VMessagePrototype(){}VMessagePrototype.prototype=Error.prototype,VMessage.prototype=new VMessagePrototype;var proto=VMessage.prototype;function VMessage(e,t,r){var n,o,i;"string"==typeof t&&(r=t,t=null),n=parseOrigin(r),o=unistUtilStringifyPosition(t)||"1:1",i={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(i=t,t=t.start):i.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=o,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=i,this.source=n[0],this.ruleId=n[1]}function parseOrigin(e){var t,r=[null,null];return"string"==typeof e&&(-1===(t=e.indexOf(":"))?r[1]=e:(r[0]=e.slice(0,t),r[1]=e.slice(t+1))),r}function replaceExt(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var r=path__default.basename(e,path__default.extname(e))+t;return path__default.join(path__default.dirname(e),r)}proto.file="",proto.name="",proto.reason="",proto.message="",proto.stack="",proto.fatal=null,proto.column=null,proto.line=null;var replaceExt_1=replaceExt,isBuffer$1=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},core=VFile,own$1={}.hasOwnProperty,proto$1=VFile.prototype;proto$1.toString=toString;var order=["history","path","basename","stem","extname","dirname"];function VFile(e){var t,r,n;if(e){if("string"==typeof e||isBuffer$1(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof VFile))return new VFile(e);for(this.data={},this.messages=[],this.history=[],this.cwd=process.cwd(),r=-1,n=order.length;++r<n;)own$1.call(e,t=order[r])&&(this[t]=e[t]);for(t in e)-1===order.indexOf(t)&&(this[t]=e[t])}function toString(e){var t=this.contents||"";return isBuffer$1(t)?t.toString(e):t+""}function assertPart(e,t){if(-1!==e.indexOf(path__default.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+path__default.sep+"`")}function assertNonEmpty(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function assertPath(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}Object.defineProperty(proto$1,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){assertNonEmpty(e,"path"),e!==this.path&&this.history.push(e)}}),Object.defineProperty(proto$1,"dirname",{get:function(){return"string"==typeof this.path?path__default.dirname(this.path):void 0},set:function(e){assertPath(this.path,"dirname"),this.path=path__default.join(e||"",this.basename)}}),Object.defineProperty(proto$1,"basename",{get:function(){return"string"==typeof this.path?path__default.basename(this.path):void 0},set:function(e){assertNonEmpty(e,"basename"),assertPart(e,"basename"),this.path=path__default.join(this.dirname||"",e)}}),Object.defineProperty(proto$1,"extname",{get:function(){return"string"==typeof this.path?path__default.extname(this.path):void 0},set:function(e){var t=e||"";if(assertPart(t,"extname"),assertPath(this.path,"extname"),t){if("."!==t.charAt(0))throw Error("`extname` must start with `.`");if(-1!==t.indexOf(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=replaceExt_1(this.path,t)}}),Object.defineProperty(proto$1,"stem",{get:function(){return"string"==typeof this.path?path__default.basename(this.path,this.extname):void 0},set:function(e){assertNonEmpty(e,"stem"),assertPart(e,"stem"),this.path=path__default.join(this.dirname||"",e+(this.extname||""))}});var vfile=core,proto$2=core.prototype;function message(e,t,r){var n=this.path,o=new vfileMessage(e,t,r);return n&&(o.name=n+":"+o.name,o.file=n),o.fatal=!1,this.messages.push(o),o}function fail(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}function info(){var e=this.message.apply(this,arguments);return e.fatal=null,e}proto$2.message=message,proto$2.info=info,proto$2.fail=fail,proto$2.warn=message;var core$1=toVFile;function toVFile(e){return("string"==typeof e||isBuffer(e))&&(e={path:e+""}),vfile(e)}var read=readSync,write=writeSync;function readSync(e,t){var r=core$1(e);return r.contents=fs__default.readFileSync(path__default.resolve(r.cwd,r.path),t),r}function writeSync(e,t){var r=core$1(e);fs__default.writeFileSync(path__default.resolve(r.cwd,r.path),r.contents||"",t)}var sync={read:read,write:write},read_1=read$1,write_1=write$1;function read$1(e,t,r){var n=core$1(e);if(r||"function"!=typeof t||(r=t,t=null),!r)return new Promise(o);function o(e,r){var o;try{o=path__default.resolve(n.cwd,n.path)}catch(e){return r(e)}fs__default.readFile(o,t,function(t,o){t?r(t):(n.contents=o,e(n))})}o(function(e){r(null,e)},r)}function write$1(e,t,r){var n=core$1(e);if(r||"function"!=typeof t||(r=t,t=void 0),!r)return new Promise(o);function o(e,r){var o;try{o=path__default.resolve(n.cwd,n.path)}catch(e){return r(e)}fs__default.writeFile(o,n.contents||"",t,function(t){t?r(t):e()})}o(function(e){r(null,e)},r)}var async={read:read_1,write:write_1},fs$2=core$1;core$1.read=async.read,core$1.readSync=sync.read,core$1.write=async.write,core$1.writeSync=sync.write;var toVfile=fs$2,hasOwn=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===toStr.call(e)},isPlainObject=function(e){if(!e||"[object Object]"!==toStr.call(e))return!1;var t,r=hasOwn.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&hasOwn.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||hasOwn.call(e,t)},setProperty=function(e,t){defineProperty&&"__proto__"===t.name?defineProperty(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},getProperty=function(e,t){if("__proto__"===t){if(!hasOwn.call(e,t))return;if(gOPD)return gOPD(e,t).value}return e[t]},extend=function e(){var t,r,n,o,i,a,s=arguments[0],u=1,c=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},u=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});c>u;++u)if(null!=(t=arguments[u]))for(r in t)n=getProperty(s,r),s!==(o=getProperty(t,r))&&(l&&o&&(isPlainObject(o)||(i=isArray(o)))?(i?(i=!1,a=n&&isArray(n)?n:[]):a=n&&isPlainObject(n)?n:{},setProperty(s,{name:r,newValue:e(l,a,o)})):void 0!==o&&setProperty(s,{name:r,newValue:o}));return s},bail_1=bail;function bail(e){if(e)throw e}var slice=[].slice,wrap_1=wrap;function wrap(e,t){var r;return function(){var t,i=slice.call(arguments,0),a=e.length>i.length;a&&i.push(n);try{t=e.apply(null,i)}catch(e){if(a&&r)throw e;return n(e)}a||(t&&"function"==typeof t.then?t.then(o,n):t instanceof Error?n(t):o(t))};function n(){r||(r=!0,t.apply(null,arguments))}function o(e){n(null,e)}}var trough_1=trough;trough.wrap=wrap_1;var slice$1=[].slice;function trough(){var e=[],t={run:function(){var t=-1,r=slice$1.call(arguments,0,-1),n=arguments[arguments.length-1];if("function"!=typeof n)throw Error("Expected function as last argument, not "+n);(function o(i){var a=e[++t];var s=slice$1.call(arguments,0);var u=s.slice(1);var c=r.length;var l=-1;if(i)return void n(i);for(;++l<c;)null==u[l]&&(u[l]=r[l]);r=u;a?wrap_1(a,o).apply(null,r):n.apply(null,[null].concat(r))}).apply(null,[null].concat(r))},use:function(r){if("function"!=typeof r)throw Error("Expected `fn` to be a function, not "+r);return e.push(r),t}};return t}var toString$1=Object.prototype.toString,xIsString=isString;function isString(e){return"[object String]"===toString$1.call(e)}var toString$2=Object.prototype.toString,isPlainObj=function(e){var t;return"[object Object]"===toString$2.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))},unified_1=unified().freeze(),slice$2=[].slice,own$2={}.hasOwnProperty,pipeline=trough_1().use(pipelineParse).use(pipelineRun).use(pipelineStringify);function pipelineParse(e,t){t.tree=e.parse(t.file)}function pipelineRun(e,t,r){e.run(t.tree,t.file,function(e,n,o){e?r(e):(t.tree=n,t.file=o,r())})}function pipelineStringify(e,t){t.file.contents=e.stringify(t.tree,t.file)}function unified(){var e=[],t=trough_1(),r={},n=!1,o=-1;return i.data=function(e,t){if(xIsString(e))return 2===arguments.length?(assertUnfrozen("data",n),r[e]=t,i):own$2.call(r,e)&&r[e]||null;if(e)return assertUnfrozen("data",n),r=e,i;return r},i.freeze=a,i.attachers=e,i.use=function(t){var o;if(assertUnfrozen("use",n),null==t);else if("function"==typeof t)c.apply(null,arguments);else{if("object"!=typeof t)throw Error("Expected usable value, not `"+t+"`");"length"in t?u(t):a(t)}o&&(r.settings=extend(r.settings||{},o));return i;function a(e){u(e.plugins),e.settings&&(o=extend(o||{},e.settings))}function s(e){if("function"==typeof e)c(e);else{if("object"!=typeof e)throw Error("Expected usable value, not `"+e+"`");"length"in e?c.apply(null,e):a(e)}}function u(e){var t,r;if(null==e);else{if(!("object"==typeof e&&"length"in e))throw Error("Expected a list of plugins, not `"+e+"`");for(t=e.length,r=-1;++r<t;)s(e[r])}}function c(t,r){var n=function(t){var r,n=e.length,o=-1;for(;++o<n;)if((r=e[o])[0]===t)return r}(t);n?(isPlainObj(n[1])&&isPlainObj(r)&&(r=extend(n[1],r)),n[1]=r):e.push(slice$2.call(arguments))}},i.parse=function(e){var t,r=vfile(e);if(a(),assertParser("parse",t=i.Parser),newable(t))return new t(r+"",r).parse();return t(r+"",r)},i.stringify=function(e,t){var r,n=vfile(t);if(a(),assertCompiler("stringify",r=i.Compiler),assertNode(e),newable(r))return new r(e,n).compile();return r(e,n)},i.run=s,i.runSync=function(e,t){var r,n=!1;return s(e,t,function(e,t){n=!0,bail_1(e),r=t}),assertDone("runSync","run",n),r},i.process=u,i.processSync=function(e){var t,r=!1;return a(),assertParser("processSync",i.Parser),assertCompiler("processSync",i.Compiler),u(t=vfile(e),function(e){r=!0,bail_1(e)}),assertDone("processSync","process",r),t},i;function i(){for(var t=unified(),n=e.length,o=-1;++o<n;)t.use.apply(null,e[o]);return t.data(extend(!0,{},r)),t}function a(){var r,a,s,u;if(n)return i;for(;++o<e.length;)a=(r=e[o])[0],null,!1!==(s=r[1])&&(!0===s&&(r[1]=void 0),"function"==typeof(u=a.apply(i,r.slice(1)))&&t.use(u));return n=!0,o=1/0,i}function s(e,r,n){if(assertNode(e),a(),n||"function"!=typeof r||(n=r,r=null),!n)return new Promise(o);function o(o,i){t.run(e,vfile(r),function(t,r,a){r=r||e,t?i(t):o?o(r):n(null,r,a)})}o(null,n)}function u(e,t){if(a(),assertParser("process",i.Parser),assertCompiler("process",i.Compiler),!t)return new Promise(r);function r(r,n){var o=vfile(e);pipeline.run(i,{file:o},function(e){e?n(e):r?r(o):t(null,o)})}r(null,t)}}function newable(e){return"function"==typeof e&&keys(e.prototype)}function keys(e){var t;for(t in e)return!0;return!1}function assertParser(e,t){if("function"!=typeof t)throw Error("Cannot `"+e+"` without `Parser`")}function assertCompiler(e,t){if("function"!=typeof t)throw Error("Cannot `"+e+"` without `Compiler`")}function assertUnfrozen(e,t){if(t)throw Error("Cannot invoke `"+e+"` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.")}function assertNode(e){if(!e||!xIsString(e.type))throw Error("Expected node, got `"+e+"`")}function assertDone(e,t,r){if(!r)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}var mdastUtilToString=toString$3;function toString$3(e){return valueOf(e)||e.children&&e.children.map(toString$3).join("")||""}function valueOf(e){return(e&&e.value?e.value:e.alt?e.alt:e.title)||""}var unistUtilIs=is;function is(e,t,r,n,o){var i=null!=n,a=null!=r,s=convert(e);if(a&&("number"!=typeof r||0>r||r===1/0))throw Error("Expected positive finite index or child node");if(i&&(!is(null,n)||!n.children))throw Error("Expected parent node");if(!t||!t.type||"string"!=typeof t.type)return!1;if(i!==a)throw Error("Expected both parent and index");return!!s.call(o,t,r,n)}function convert(e){if("string"==typeof e)return typeFactory(e);if(null==e)return ok;if("object"==typeof e)return("length"in e?anyFactory:matchesFactory)(e);if("function"==typeof e)return e;throw Error("Expected function, string, or object as test")}function convertAll(e){for(var t=[],r=e.length,n=-1;++n<r;)t[n]=convert(e[n]);return t}function matchesFactory(e){return function(t){var r;for(r in e)if(t[r]!==e[r])return!1;return!0}}function anyFactory(e){var t=convertAll(e),r=t.length;return function(){var e=-1;for(;++e<r;)if(t[e].apply(this,arguments))return!0;return!1}}function typeFactory(e){return function(t){return!(!t||t.type!==e)}}function ok(){return!0}var unistUtilVisitParents=visitParents,CONTINUE=!0,SKIP="skip",EXIT=!1;function visitParents(e,t,r,n){function o(e,i,a){var s;return(t&&!unistUtilIs(t,e,i,a[a.length-1]||null)||(s=r(e,a))!==EXIT)&&e.children&&s!==SKIP&&function(e,t){var r,i,a=n?-1:1,s=(n?e.length:-1)+a;for(;s>-1&&e.length>s;){if((i=(r=e[s])&&o(r,s,t))===EXIT)return i;s="number"==typeof i?i:s+a}}(e.children,a.concat(e))===EXIT?EXIT:s}"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null),o(e,null,[])}visitParents.CONTINUE=CONTINUE,visitParents.SKIP=SKIP,visitParents.EXIT=EXIT;var unistUtilVisit=visit,CONTINUE$1=unistUtilVisitParents.CONTINUE,SKIP$1=unistUtilVisitParents.SKIP,EXIT$1=unistUtilVisitParents.EXIT;function visit(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null),unistUtilVisitParents(e,t,function(e,t){var n=t[t.length-1],o=n?n.children.indexOf(e):null;return r(e,o,n)},n)}visit.CONTINUE=CONTINUE$1,visit.SKIP=SKIP$1,visit.EXIT=EXIT$1;var emojiRegex=function(){return/[\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\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2694\u2696\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\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-\uDD79\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED0\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3]|\uD83E[\uDD10-\uDD18\uDD80-\uDD84\uDDC0]|\uD83C\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uD83C\uDDFE\uD83C[\uDDEA\uDDF9]|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDFC\uD83C[\uDDEB\uDDF8]|\uD83C\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uD83C\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF8\uDDFE\uDDFF]|\uD83C\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uD83C\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uD83C\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uD83C\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uD83C\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uD83C\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uD83C\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uD83C\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uD83C\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uD83C\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uD83C\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uD83C\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uD83C\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uD83C\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uD83C\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uD83C\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|[#\*0-9]\u20E3/g},githubSlugger=BananaSlug;function BananaSlug(){if(!(this instanceof BananaSlug))return new BananaSlug;this.reset()}BananaSlug.prototype.slug=function(e,t){var r=slugger(e,t=!0===t),n=this.occurrences[r];return this.occurrences.hasOwnProperty(r)?n++:n=0,this.occurrences[r]=n,n&&(r=r+"-"+n),r},BananaSlug.prototype.reset=function(){this.occurrences={}};var whitespace=/\s/g;function lower(e){return e.toLowerCase()}function slugger(e,t){return"string"!=typeof e?"":(t||(e=e.replace(/[A-Z]+/g,lower)),e.trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,.\/:;<=>?@[\]^`{|}~]/g,"").replace(emojiRegex(),"").replace(whitespace,"-"))}var slugs=githubSlugger(),remarkSlug=slug$1;function slug$1(){return transformer}function transformer(e){slugs.reset(),unistUtilVisit(e,"heading",function(e){var t=e.data||(e.data={}),r=t.hProperties||(t.hProperties={}),n=r.id;n=n?slugs.slug(n,!0):slugs.slug(mdastUtilToString(e)),t.id=n,r.id=n})}var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;10>r;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}var objectAssign=shouldUseNative()?Object.assign:function(e,t){for(var r,n,o=toObject(e),i=1;arguments.length>i;i++){for(var a in r=Object(arguments[i]))hasOwnProperty.call(r,a)&&(o[a]=r[a]);if(getOwnPropertySymbols){n=getOwnPropertySymbols(r);for(var s=0;n.length>s;s++)propIsEnumerable.call(r,n[s])&&(o[n[s]]=r[n[s]])}}return o},unistUtilMap=map;function map(e,t){return function e(r,n,o){var i=r.children;var a=objectAssign({},t(r,n,o));i&&(a.children=i.map(function s(e,n){return function e(r,n,o){var i=r.children;var a=objectAssign({},t(r,n,o));i&&(a.children=i.map(s));return a;function s(t,n){return e(t,n,r)}}(e,n,r)}));return a;function s(t,n){return e(t,n,r)}}(e,null,null)}function isNothing(e){return null==e}function isObject(e){return"object"==typeof e&&null!==e}function toArray(e){return Array.isArray(e)?e:isNothing(e)?[]:[e]}function extend$1(e,t){var r,n,o,i;if(t)for(r=0,n=(i=Object.keys(t)).length;n>r;r+=1)e[o=i[r]]=t[o];return e}function repeat(e,t){var r,n="";for(r=0;t>r;r+=1)n+=e;return n}function isNegativeZero(e){return 0===e&&-1/0==1/e}var isNothing_1=isNothing,isObject_1=isObject,toArray_1=toArray,repeat_1=repeat,isNegativeZero_1=isNegativeZero,extend_1=extend$1,common={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function YAMLException(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark:""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||""}YAMLException.prototype=Object.create(Error.prototype),YAMLException.prototype.constructor=YAMLException,YAMLException.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark),t};var exception=YAMLException;function Mark(e,t,r,n,o){this.name=e,this.buffer=t,this.position=r,this.line=n,this.column=o}Mark.prototype.getSnippet=function(e,t){var r,n,o,i,a;if(!this.buffer)return null;for(e=e||4,t=t||75,r="",n=this.position;n>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(n-1));)if(this.position-(n-=1)>t/2-1){r=" ... ",n+=5;break}for(o="",i=this.position;this.buffer.length>i&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i));)if((i+=1)-this.position>t/2-1){o=" ... ",i-=5;break}return a=this.buffer.slice(n,i),common.repeat(" ",e)+r+a+o+"\n"+common.repeat(" ",e+this.position-n+r.length)+"^"},Mark.prototype.toString=function(e){var t,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(r+=":\n"+t),r};var mark=Mark,TYPE_CONSTRUCTOR_OPTIONS=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(e){var t={};return null!==e&&Object.keys(e).forEach(function(r){e[r].forEach(function(e){t[e+""]=r})}),t}function Type(e,t){if(Object.keys(t=t||{}).forEach(function(t){if(-1===TYPE_CONSTRUCTOR_OPTIONS.indexOf(t))throw new exception('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=compileStyleAliases(t.styleAliases||null),-1===YAML_NODE_KINDS.indexOf(this.kind))throw new exception('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var type=Type;function compileList(e,t,r){var n=[];return e.include.forEach(function(e){r=compileList(e,t,r)}),e[t].forEach(function(e){r.forEach(function(t,r){t.tag===e.tag&&t.kind===e.kind&&n.push(r)}),r.push(e)}),r.filter(function(e,t){return-1===n.indexOf(t)})}function compileMap(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{}};function n(e){r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;t>e;e+=1)arguments[e].forEach(n);return r}function Schema(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)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(){var e,t;switch(arguments.length){case 1:e=Schema.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new exception("Wrong number of arguments for Schema.create function")}if(e=common.toArray(e),t=common.toArray(t),!e.every(function(e){return e instanceof Schema}))throw new exception("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof type}))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Schema({include:e,explicit:t})};var schema=Schema,str=new type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),seq=new type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),map$1=new type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),failsafe=new schema({explicit:[str,seq,map$1]});function resolveYamlNull(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function constructYamlNull(){return null}function isNull(e){return null===e}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(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function constructYamlBoolean(e){return"true"===e||"True"===e||"TRUE"===e}function isBoolean(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var bool=new type("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 isHexCode(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function isOctCode(e){return e>=48&&55>=e}function isDecCode(e){return e>=48&&57>=e}function resolveYamlInteger(e){if(null===e)return!1;var t,r=e.length,n=0,o=!1;if(!r)return!1;if("-"!==(t=e[n])&&"+"!==t||(t=e[++n]),"0"===t){if(n+1===r)return!0;if("b"===(t=e[++n])){for(n++;r>n;n++)if("_"!==(t=e[n])){if("0"!==t&&"1"!==t)return!1;o=!0}return o&&"_"!==t}if("x"===t){for(n++;r>n;n++)if("_"!==(t=e[n])){if(!isHexCode(e.charCodeAt(n)))return!1;o=!0}return o&&"_"!==t}for(;r>n;n++)if("_"!==(t=e[n])){if(!isOctCode(e.charCodeAt(n)))return!1;o=!0}return o&&"_"!==t}if("_"===t)return!1;for(;r>n;n++)if("_"!==(t=e[n])){if(":"===t)break;if(!isDecCode(e.charCodeAt(n)))return!1;o=!0}return!(!o||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(n)))}function constructYamlInteger(e){var t,r,n=e,o=1,i=[];return-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(o=-1),t=(n=n.slice(1))[0]),"0"===n?0:"0"===t?"b"===n[1]?o*parseInt(n.slice(2),2):"x"===n[1]?o*parseInt(n,16):o*parseInt(n,8):-1!==n.indexOf(":")?(n.split(":").forEach(function(e){i.unshift(parseInt(e,10))}),n=0,r=1,i.forEach(function(e){n+=e*r,r*=60}),o*n):o*parseInt(n,10)}function isInteger(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!common.isNegativeZero(e)}var int_1=new type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(e){return 0>e?"-0b"+e.toString(2).slice(1):"0b"+e.toString(2)},octal:function(e){return 0>e?"-0"+e.toString(8).slice(1):"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return 0>e?"-0x"+e.toString(16).toUpperCase().slice(1):"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),YAML_FLOAT_PATTERN=/^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*|[-+]?\.(?:inf|Inf|INF)|\.(?:nan|NaN|NAN))$/;function resolveYamlFloat(e){return null!==e&&!(!YAML_FLOAT_PATTERN.test(e)||"_"===e[e.length-1])}function constructYamlFloat(e){var t,r,n,o;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,o=[],0>"+-".indexOf(t[0])||(t=t.slice(1)),".inf"===t?1===r?1/0:-1/0:".nan"===t?NaN:0>t.indexOf(":")?r*parseFloat(t,10):(t.split(":").forEach(function(e){o.unshift(parseFloat(e,10))}),t=0,n=1,o.forEach(function(e){t+=e*n,n*=60}),r*t)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(1/0===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(-1/0===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common.isNegativeZero(e))return"-0.0";return SCIENTIFIC_WITHOUT_DOT.test(r=e.toString(10))?r.replace("e",".e"):r}function isFloat(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||common.isNegativeZero(e))}var float_1=new type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"}),json=new schema({include:[failsafe],implicit:[_null,bool,int_1,float_1]}),core$2=new schema({include:[json]}),YAML_DATE_REGEXP=/^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$/,YAML_TIMESTAMP_REGEXP=/^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\.([0-9]*))?(?:[ \t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$/;function resolveYamlTimestamp(e){return null!==e&&(null!==YAML_DATE_REGEXP.exec(e)||null!==YAML_TIMESTAMP_REGEXP.exec(e))}function constructYamlTimestamp(e){var t,r,n,o,i,a,s,u,c=0,l=null;if(null===(t=YAML_DATE_REGEXP.exec(e))&&(t=YAML_TIMESTAMP_REGEXP.exec(e)),null===t)throw Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,o));if(i=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);3>c.length;)c+="0";c=+c}return t[9]&&(l=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(l=-l)),u=new Date(Date.UTC(r,n,o,i,a,s,c)),l&&u.setTime(u.getTime()-l),u}function representYamlTimestamp(e){return e.toISOString()}var timestamp=new type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(e){return"<<"===e||null===e}var NodeBuffer,merge$1=new type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge});try{var _require=commonjsRequire;NodeBuffer=_require("buffer").Buffer}catch(e){}var BASE64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(e){if(null===e)return!1;var t,r,n=0,o=e.length,i=BASE64_MAP;for(r=0;o>r;r++)if(64>=(t=i.indexOf(e.charAt(r)))){if(0>t)return!1;n+=6}return n%8==0}function constructYamlBinary(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,i=BASE64_MAP,a=0,s=[];for(t=0;o>t;t++)t%4==0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|i.indexOf(n.charAt(t));return 0===(r=o%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),NodeBuffer?NodeBuffer.from?NodeBuffer.from(s):new NodeBuffer(s):s}function representYamlBinary(e){var t,r,n="",o=0,i=e.length,a=BASE64_MAP;for(t=0;i>t;t++)t%3==0&&t&&(n+=a[o>>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]),o=(o<<8)+e[t];return 0===(r=i%3)?(n+=a[o>>18&63],n+=a[o>>12&63],n+=a[o>>6&63],n+=a[63&o]):2===r?(n+=a[o>>10&63],n+=a[o>>4&63],n+=a[o<<2&63],n+=a[64]):1===r&&(n+=a[o>>2&63],n+=a[o<<4&63],n+=a[64],n+=a[64]),n}function isBinary(e){return NodeBuffer&&NodeBuffer.isBuffer(e)}var binary=new type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary}),_hasOwnProperty=Object.prototype.hasOwnProperty,_toString=Object.prototype.toString;function resolveYamlOmap(e){if(null===e)return!0;var t,r,n,o,i,a=[],s=e;for(t=0,r=s.length;r>t;t+=1){if(i=!1,"[object Object]"!==_toString.call(n=s[t]))return!1;for(o in n)if(_hasOwnProperty.call(n,o)){if(i)return!1;i=!0}if(!i)return!1;if(-1!==a.indexOf(o))return!1;a.push(o)}return!0}function constructYamlOmap(e){return null!==e?e:[]}var omap=new type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap}),_toString$1=Object.prototype.toString;function resolveYamlPairs(e){if(null===e)return!0;var t,r,n,o,i,a=e;for(i=Array(a.length),t=0,r=a.length;r>t;t+=1){if("[object Object]"!==_toString$1.call(n=a[t]))return!1;if(1!==(o=Object.keys(n)).length)return!1;i[t]=[o[0],n[o[0]]]}return!0}function constructYamlPairs(e){if(null===e)return[];var t,r,n,o,i,a=e;for(i=Array(a.length),t=0,r=a.length;r>t;t+=1)i[t]=[(o=Object.keys(n=a[t]))[0],n[o[0]]];return i}var pairs=new type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs}),_hasOwnProperty$1=Object.prototype.hasOwnProperty;function resolveYamlSet(e){if(null===e)return!0;var t,r=e;for(t in r)if(_hasOwnProperty$1.call(r,t)&&null!==r[t])return!1;return!0}function constructYamlSet(e){return null!==e?e:{}}var set=new type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet}),default_safe=new schema({include:[core$2],implicit:[timestamp,merge$1],explicit:[binary,omap,pairs,set]});function resolveJavascriptUndefined(){return!0}function constructJavascriptUndefined(){}function representJavascriptUndefined(){return""}function isUndefined(e){return void 0===e}var _undefined=new type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined});function resolveJavascriptRegExp(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,r=/\/([gim]*)$/.exec(e),n="";if("/"===t[0]){if(r&&(n=r[1]),n.length>3)return!1;if("/"!==t[t.length-n.length-1])return!1}return!0}function constructJavascriptRegExp(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";return"/"===t[0]&&(r&&(n=r[1]),t=t.slice(1,t.length-n.length-1)),RegExp(t,n)}function representJavascriptRegExp(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var esprima,regexp=new type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp});try{var _require$1=commonjsRequire;esprima=_require$1("esprima")}catch(e){"undefined"!=typeof window&&(esprima=window.esprima)}function resolveJavascriptFunction(e){if(null===e)return!1;try{var t=esprima.parse("("+e+")",{range:!0});return"Program"===t.type&&1===t.body.length&&"ExpressionStatement"===t.body[0].type&&("ArrowFunctionExpression"===t.body[0].expression.type||"FunctionExpression"===t.body[0].expression.type)}catch(e){return!1}}function constructJavascriptFunction(e){var t,r="("+e+")",n=esprima.parse(r,{range:!0}),o=[];if("Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"ArrowFunctionExpression"!==n.body[0].expression.type&&"FunctionExpression"!==n.body[0].expression.type)throw Error("Failed to resolve function");return n.body[0].expression.params.forEach(function(e){o.push(e.name)}),t=n.body[0].expression.body.range,Function(o,"BlockStatement"===n.body[0].expression.body.type?r.slice(t[0]+1,t[1]-1):"return "+r.slice(t[0],t[1]))}function representJavascriptFunction(e){return""+e}function isFunction(e){return"[object Function]"===Object.prototype.toString.call(e)}var _function=new type("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction}),default_full=schema.DEFAULT=new schema({include:[default_safe],explicit:[_undefined,regexp,_function]}),_hasOwnProperty$2=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/,PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i,PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function is_EOL(e){return 10===e||13===e}function is_WHITE_SPACE(e){return 9===e||32===e}function is_WS_OR_EOL(e){return 9===e||32===e||10===e||13===e}function is_FLOW_INDICATOR(e){return 44===e||91===e||93===e||123===e||125===e}function fromHexCode(e){var t;return 48>e||e>57?97>(t=32|e)||t>102?-1:t-97+10:e-48}function escapedHexLen(e){return 120===e?2:117===e?4:85===e?8:0}function fromDecimalCode(e){return 48>e||e>57?-1:e-48}function simpleEscapeSequence(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function charFromCodepoint(e){return e>65535?String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023)):String.fromCharCode(e)}for(var simpleEscapeCheck=Array(256),simpleEscapeMap=Array(256),i=0;256>i;i++)simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0,simpleEscapeMap[i]=simpleEscapeSequence(i);function State(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||default_full,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.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,t){return new exception(t,new mark(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){e.onWarning&&e.onWarning.call(null,generateError(e,t))}var directiveHandlers={YAML:function(e,t,r){var n,o,i;null!==e.version&&throwError(e,"duplication of %YAML directive"),1!==r.length&&throwError(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&throwError(e,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),i=parseInt(n[2],10),1!==o&&throwError(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=2>i,1!==i&&2!==i&&throwWarning(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,o;2!==r.length&&throwError(e,"TAG directive accepts exactly two arguments"),o=r[1],PATTERN_TAG_HANDLE.test(n=r[0])||throwError(e,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty$2.call(e.tagMap,n)&&throwError(e,'there is a previously declared suffix for "'+n+'" tag handle'),PATTERN_TAG_URI.test(o)||throwError(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=o}};function captureSegment(e,t,r,n){var o,i,a,s;if(r>t){if(s=e.input.slice(t,r),n)for(o=0,i=s.length;i>o;o+=1)9!==(a=s.charCodeAt(o))&&(32>a||a>1114111)&&throwError(e,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(s)&&throwError(e,"the stream contains non-printable characters");e.result+=s}}function mergeMappings(e,t,r,n){var o,i,a,s;for(common.isObject(r)||throwError(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,s=(o=Object.keys(r)).length;s>a;a+=1)_hasOwnProperty$2.call(t,i=o[a])||(t[i]=r[i],n[i]=!0)}function storeMappingPair(e,t,r,n,o,i,a,s){var u,c;if(o+="",null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(i))for(u=0,c=i.length;c>u;u+=1)mergeMappings(e,t,i[u],r);else mergeMappings(e,t,i,r);else e.json||_hasOwnProperty$2.call(r,o)||!_hasOwnProperty$2.call(t,o)||(e.line=a||e.line,e.position=s||e.position,throwError(e,"duplicated mapping key")),t[o]=i,delete r[o];return t}function readLineBreak(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):throwError(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function skipSeparationSpace(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);0!==o;){for(;is_WHITE_SPACE(o);)o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!is_EOL(o))break;for(readLineBreak(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&r>e.lineIndent&&throwWarning(e,"deficient indentation"),n}function testDocumentSeparator(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||0!==(t=e.input.charCodeAt(r+=3))&&!is_WS_OR_EOL(t))}function writeFoldedLines(e,t){1===t?e.result+=" ":t>1&&(e.result+=common.repeat("\n",t-1))}function readPlainScalar(e,t,r){var n,o,i,a,s,u,c,l,p=e.kind,f=e.result;if(is_WS_OR_EOL(l=e.input.charCodeAt(e.position))||is_FLOW_INDICATOR(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(is_WS_OR_EOL(n=e.input.charCodeAt(e.position+1))||r&&is_FLOW_INDICATOR(n)))return!1;for(e.kind="scalar",e.result="",o=i=e.position,a=!1;0!==l;){if(58===l){if(is_WS_OR_EOL(n=e.input.charCodeAt(e.position+1))||r&&is_FLOW_INDICATOR(n))break}else if(35===l){if(is_WS_OR_EOL(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(l))break;if(is_EOL(l)){if(s=e.line,u=e.lineStart,c=e.lineIndent,skipSeparationSpace(e,!1,-1),t>e.lineIndent){e.position=i,e.line=s,e.lineStart=u,e.lineIndent=c;break}a=!0,l=e.input.charCodeAt(e.position);continue}}a&&(captureSegment(e,o,i,!1),writeFoldedLines(e,e.line-s),o=i=e.position,a=!1),is_WHITE_SPACE(l)||(i=e.position+1),l=e.input.charCodeAt(++e.position)}return captureSegment(e,o,i,!1),!!e.result||(e.kind=p,e.result=f,!1)}function readSingleQuotedScalar(e,t){var r,n,o;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(captureSegment(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,o=e.position}else is_EOL(r)?(captureSegment(e,n,o,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),n=o=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var r,n,o,i,a,s;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return captureSegment(e,r,e.position,!0),e.position++,!0;if(92===s){if(captureSegment(e,r,e.position,!0),is_EOL(s=e.input.charCodeAt(++e.position)))skipSeparationSpace(e,!1,t);else if(256>s&&simpleEscapeCheck[s])e.result+=simpleEscapeMap[s],e.position++;else if((a=escapedHexLen(s))>0){for(o=a,i=0;o>0;o--)0>(a=fromHexCode(s=e.input.charCodeAt(++e.position)))?throwError(e,"expected hexadecimal character"):i=(i<<4)+a;e.result+=charFromCodepoint(i),e.position++}else throwError(e,"unknown escape sequence");r=n=e.position}else is_EOL(s)?(captureSegment(e,r,n,!0),writeFoldedLines(e,skipSeparationSpace(e,!1,t)),r=n=e.position):e.position===e.lineStart&&testDocumentSeparator(e)?throwError(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var r,n,o,i,a,s,u,c,l,p,f=!0,d=e.tag,h=e.anchor,g={};if(91===(p=e.input.charCodeAt(e.position)))o=93,s=!1,n=[];else{if(123!==p)return!1;o=125,s=!0,n={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=n),p=e.input.charCodeAt(++e.position);0!==p;){if(skipSeparationSpace(e,!0,t),(p=e.input.charCodeAt(e.position))===o)return e.position++,e.tag=d,e.anchor=h,e.kind=s?"mapping":"sequence",e.result=n,!0;f||throwError(e,"missed comma between flow collection entries"),l=null,i=a=!1,63===p&&is_WS_OR_EOL(e.input.charCodeAt(e.position+1))&&(i=a=!0,e.position++,skipSeparationSpace(e,!0,t)),r=e.line,composeNode(e,t,CONTEXT_FLOW_IN,!1,!0),c=e.tag,u=e.result,skipSeparationSpace(e,!0,t),p=e.input.charCodeAt(e.position),!a&&e.line!==r||58!==p||(i=!0,p=e.input.charCodeAt(++e.position),skipSeparationSpace(e,!0,t),composeNode(e,t,CONTEXT_FLOW_IN,!1,!0),l=e.result),s?storeMappingPair(e,n,g,c,u,l):n.push(i?storeMappingPair(e,null,g,c,u,l):u),skipSeparationSpace(e,!0,t),44===(p=e.input.charCodeAt(e.position))?(f=!0,p=e.input.charCodeAt(++e.position)):f=!1}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var r,n,o,i,a=CHOMPING_CLIP,s=!1,u=!1,c=t,l=0,p=!1;if(124===(i=e.input.charCodeAt(e.position)))n=!1;else{if(62!==i)return!1;n=!0}for(e.kind="scalar",e.result="";0!==i;)if(43===(i=e.input.charCodeAt(++e.position))||45===i)CHOMPING_CLIP===a?a=43===i?CHOMPING_KEEP:CHOMPING_STRIP:throwError(e,"repeat of a chomping mode identifier");else{if(0>(o=fromDecimalCode(i)))break;0===o?throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?throwError(e,"repeat of an indentation width identifier"):(c=t+o-1,u=!0)}if(is_WHITE_SPACE(i)){do{i=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(i));if(35===i)do{i=e.input.charCodeAt(++e.position)}while(!is_EOL(i)&&0!==i)}for(;0!==i;){for(readLineBreak(e),e.lineIndent=0,i=e.input.charCodeAt(e.position);(!u||c>e.lineIndent)&&32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>c&&(c=e.lineIndent),is_EOL(i))l++;else{if(c>e.lineIndent){a===CHOMPING_KEEP?e.result+=common.repeat("\n",s?1+l:l):a===CHOMPING_CLIP&&s&&(e.result+="\n");break}for(n?is_WHITE_SPACE(i)?(p=!0,e.result+=common.repeat("\n",s?1+l:l)):p?(p=!1,e.result+=common.repeat("\n",l+1)):0===l?s&&(e.result+=" "):e.result+=common.repeat("\n",l):e.result+=common.repeat("\n",s?1+l:l),s=!0,u=!0,l=0,r=e.position;!is_EOL(i)&&0!==i;)i=e.input.charCodeAt(++e.position);captureSegment(e,r,e.position,!1)}}return!0}function readBlockSequence(e,t){var r,n,o=e.tag,i=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),n=e.input.charCodeAt(e.position);0!==n&&45===n&&is_WS_OR_EOL(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,!skipSeparationSpace(e,!0,-1)||e.lineIndent>t)if(r=e.line,composeNode(e,t,CONTEXT_BLOCK_IN,!1,!0),a.push(e.result),skipSeparationSpace(e,!0,-1),n=e.input.charCodeAt(e.position),e.line!==r&&t>=e.lineIndent||0===n){if(t>e.lineIndent)break}else throwError(e,"bad indentation of a sequence entry");else a.push(null),n=e.input.charCodeAt(e.position);return!!s&&(e.tag=o,e.anchor=i,e.kind="sequence",e.result=a,!0)}function readBlockMapping(e,t,r){var n,o,i,a,s,u=e.tag,c=e.anchor,l={},p={},f=null,d=null,h=null,g=!1,m=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=l),s=e.input.charCodeAt(e.position);0!==s;){if(n=e.input.charCodeAt(e.position+1),i=e.line,a=e.position,63!==s&&58!==s||!is_WS_OR_EOL(n)){if(!composeNode(e,r,CONTEXT_FLOW_OUT,!1,!0))break;if(e.line===i){for(s=e.input.charCodeAt(e.position);is_WHITE_SPACE(s);)s=e.input.charCodeAt(++e.position);if(58===s)is_WS_OR_EOL(s=e.input.charCodeAt(++e.position))||throwError(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(storeMappingPair(e,l,p,f,d,null),f=d=h=null),m=!0,g=!1,o=!1,f=e.tag,d=e.result;else{if(!m)return e.tag=u,e.anchor=c,!0;throwError(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!m)return e.tag=u,e.anchor=c,!0;throwError(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===s?(g&&(storeMappingPair(e,l,p,f,d,null),f=d=h=null),m=!0,g=!0,o=!0):g?(g=!1,o=!0):throwError(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=n;if((e.line===i||e.lineIndent>t)&&(composeNode(e,t,CONTEXT_BLOCK_OUT,!0,o)&&(g?d=e.result:h=e.result),g||(storeMappingPair(e,l,p,f,d,h,i,a),f=d=h=null),skipSeparationSpace(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)throwError(e,"bad indentation of a mapping entry");else if(t>e.lineIndent)break}return g&&storeMappingPair(e,l,p,f,d,null),m&&(e.tag=u,e.anchor=c,e.kind="mapping",e.result=l),m}function readTagProperty(e){var t,r,n,o,i=!1,a=!1;if(33!==(o=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&throwError(e,"duplication of a tag property"),60===(o=e.input.charCodeAt(++e.position))?(i=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,r="!!",o=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.length>e.position?(n=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):throwError(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!is_WS_OR_EOL(o);)33===o&&(a?throwError(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),PATTERN_TAG_HANDLE.test(r)||throwError(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),PATTERN_FLOW_INDICATORS.test(n)&&throwError(e,"tag suffix cannot contain flow indicator characters")}return n&&!PATTERN_TAG_URI.test(n)&&throwError(e,"tag name cannot contain such characters: "+n),i?e.tag=n:_hasOwnProperty$2.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:throwError(e,'undeclared tag handle "'+r+'"'),!0}function readAnchorProperty(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&throwError(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!is_WS_OR_EOL(r)&&!is_FLOW_INDICATOR(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&throwError(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function readAlias(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!is_WS_OR_EOL(n)&&!is_FLOW_INDICATOR(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&throwError(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(r)||throwError(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],skipSeparationSpace(e,!0,-1),!0}function composeNode(e,t,r,n,o){var i,a,s,u,c,l,p,f,d=1,h=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=a=s=CONTEXT_BLOCK_OUT===r||CONTEXT_BLOCK_IN===r,n&&skipSeparationSpace(e,!0,-1)&&(h=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:t>e.lineIndent&&(d=-1)),1===d)for(;readTagProperty(e)||readAnchorProperty(e);)skipSeparationSpace(e,!0,-1)?(h=!0,s=i,e.lineIndent>t?d=1:e.lineIndent===t?d=0:t>e.lineIndent&&(d=-1)):s=!1;if(s&&(s=h||o),1!==d&&CONTEXT_BLOCK_OUT!==r||(p=CONTEXT_FLOW_IN===r||CONTEXT_FLOW_OUT===r?t:t+1,f=e.position-e.lineStart,1===d?s&&(readBlockSequence(e,f)||readBlockMapping(e,f,p))||readFlowCollection(e,p)?g=!0:(a&&readBlockScalar(e,p)||readSingleQuotedScalar(e,p)||readDoubleQuotedScalar(e,p)?g=!0:readAlias(e)?(g=!0,null===e.tag&&null===e.anchor||throwError(e,"alias node should not have any properties")):readPlainScalar(e,p,CONTEXT_FLOW_IN===r)&&(g=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(g=s&&readBlockSequence(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(u=0,c=e.implicitTypes.length;c>u;u+=1)if((l=e.implicitTypes[u]).resolve(e.result)){e.result=l.construct(e.result),e.tag=l.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else _hasOwnProperty$2.call(e.typeMap[e.kind||"fallback"],e.tag)?(l=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&l.kind!==e.kind&&throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):throwError(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function readDocument(e){var t,r,n,o,i=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(o=e.input.charCodeAt(e.position))&&(skipSeparationSpace(e,!0,-1),o=e.input.charCodeAt(e.position),0>=e.lineIndent&&37===o);){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!is_WS_OR_EOL(o);)o=e.input.charCodeAt(++e.position);for(n=[],1>(r=e.input.slice(t,e.position)).length&&throwError(e,"directive name must not be less than one character in length");0!==o;){for(;is_WHITE_SPACE(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!is_EOL(o));break}if(is_EOL(o))break;for(t=e.position;0!==o&&!is_WS_OR_EOL(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==o&&readLineBreak(e),_hasOwnProperty$2.call(directiveHandlers,r)?directiveHandlers[r](e,r,n):throwWarning(e,'unknown document directive "'+r+'"')}skipSeparationSpace(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,skipSeparationSpace(e,!0,-1)):a&&throwError(e,"directives end mark is expected"),composeNode(e,e.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(e,!0,-1),e.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(e.input.slice(i,e.position))&&throwWarning(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&testDocumentSeparator(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,skipSeparationSpace(e,!0,-1)):e.length-1>e.position&&throwError(e,"end of the stream or a document separator is expected")}function loadDocuments(e,t){t=t||{},0!==(e+="").length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new State(e,t);for(r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.length-1>r.position;)readDocument(r);return r.documents}function loadAll(e,t,r){var n,o,i=loadDocuments(e,r);if("function"!=typeof t)return i;for(n=0,o=i.length;o>n;n+=1)t(i[n])}function load(e,t){var r=loadDocuments(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new exception("expected a single document in the stream, but found more")}}function safeLoadAll(e,t,r){if("function"!=typeof t)return loadAll(e,common.extend({schema:default_safe},r));loadAll(e,t,common.extend({schema:default_safe},r))}function safeLoad(e,t){return load(e,common.extend({schema:default_safe},t))}var loadAll_1=loadAll,load_1=load,safeLoadAll_1=safeLoadAll,safeLoad_1=safeLoad,loader={loadAll:loadAll_1,load:load_1,safeLoadAll:safeLoadAll_1,safeLoad:safeLoad_1},_toString$2=Object.prototype.toString,_hasOwnProperty$3=Object.prototype.hasOwnProperty,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function compileStyleMap(e,t){var r,n,o,i,a,s,u;if(null===t)return{};for(r={},o=0,i=(n=Object.keys(t)).length;i>o;o+=1)s=t[a=n[o]]+"","!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(u=e.compiledTypeMap.fallback[a])&&_hasOwnProperty$3.call(u.styleAliases,s)&&(s=u.styleAliases[s]),r[a]=s;return r}function encodeHex(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e>255)if(65535<e){if(e>4294967295)throw new exception("code point within a string may not be greater than 0xFFFFFFFF");r="U",n=8}else r="u",n=4;else r="x",n=2;return"\\"+r+common.repeat("0",n-t.length)+t}function State$1(e){this.schema=e.schema||default_full,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=common.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=compileStyleMap(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function indentString(e,t){for(var r,n=common.repeat(" ",t),o=0,i=-1,a="",s=e.length;s>o;)-1===(i=e.indexOf("\n",o))?(r=e.slice(o),o=s):(r=e.slice(o,i+1),o=i+1),r.length&&"\n"!==r&&(a+=n),a+=r;return a}function generateNextLine(e,t){return"\n"+common.repeat(" ",e.indent*t)}function testImplicitResolving(e,t){var r,n;for(r=0,n=e.implicitTypes.length;n>r;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}function isWhitespace(e){return e===CHAR_SPACE||e===CHAR_TAB}function isPrintable(e){return e>=32&&126>=e||e>=161&&55295>=e&&8232!==e&&8233!==e||e>=57344&&65533>=e&&65279!==e||e>=65536&&1114111>=e}function isPlainSafe(e){return isPrintable(e)&&65279!==e&&e!==CHAR_COMMA&&e!==CHAR_LEFT_SQUARE_BRACKET&&e!==CHAR_RIGHT_SQUARE_BRACKET&&e!==CHAR_LEFT_CURLY_BRACKET&&e!==CHAR_RIGHT_CURLY_BRACKET&&e!==CHAR_COLON&&e!==CHAR_SHARP}function isPlainSafeFirst(e){return isPrintable(e)&&65279!==e&&!isWhitespace(e)&&e!==CHAR_MINUS&&e!==CHAR_QUESTION&&e!==CHAR_COLON&&e!==CHAR_COMMA&&e!==CHAR_LEFT_SQUARE_BRACKET&&e!==CHAR_RIGHT_SQUARE_BRACKET&&e!==CHAR_LEFT_CURLY_BRACKET&&e!==CHAR_RIGHT_CURLY_BRACKET&&e!==CHAR_SHARP&&e!==CHAR_AMPERSAND&&e!==CHAR_ASTERISK&&e!==CHAR_EXCLAMATION&&e!==CHAR_VERTICAL_LINE&&e!==CHAR_GREATER_THAN&&e!==CHAR_SINGLE_QUOTE&&e!==CHAR_DOUBLE_QUOTE&&e!==CHAR_PERCENT&&e!==CHAR_COMMERCIAL_AT&&e!==CHAR_GRAVE_ACCENT}function needIndentIndicator(e){return/^\n* /.test(e)}var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(e,t,r,n,o){var i,a,s=!1,u=!1,c=-1!==n,l=-1,p=isPlainSafeFirst(e.charCodeAt(0))&&!isWhitespace(e.charCodeAt(e.length-1));if(t)for(i=0;e.length>i;i++){if(!isPrintable(a=e.charCodeAt(i)))return STYLE_DOUBLE;p=p&&isPlainSafe(a)}else{for(i=0;e.length>i;i++){if((a=e.charCodeAt(i))===CHAR_LINE_FEED)s=!0,c&&(u=u||i-l-1>n&&" "!==e[l+1],l=i);else if(!isPrintable(a))return STYLE_DOUBLE;p=p&&isPlainSafe(a)}u=u||c&&i-l-1>n&&" "!==e[l+1]}return s||u?r>9&&needIndentIndicator(e)?STYLE_DOUBLE:u?STYLE_FOLDED:STYLE_LITERAL:p&&!o(e)?STYLE_PLAIN:STYLE_SINGLE}function writeScalar(e,t,r,n){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==DEPRECATED_BOOLEANS_SYNTAX.indexOf(t))return"'"+t+"'";var o=e.indent*Math.max(1,r),i=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o);switch(chooseScalarStyle(t,n||e.flowLevel>-1&&r>=e.flowLevel,e.indent,i,function(t){return testImplicitResolving(e,t)})){case STYLE_PLAIN:return t;case STYLE_SINGLE:return"'"+t.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,o));case STYLE_FOLDED:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,i),o));case STYLE_DOUBLE:return'"'+escapeString(t,i)+'"';default:throw new exception("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?t+"":"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function dropEndingNewline(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function foldString(e,t){for(var r,n,o,i=/(\n+)([^\n]*)/g,a=(r=e.indexOf("\n"),i.lastIndex=r=-1!==r?r:e.length,foldLine(e.slice(0,r),t)),s="\n"===e[0]||" "===e[0];o=i.exec(e);){var u=o[2];n=" "===u[0],a+=o[1]+(s||n||""===u?"":"\n")+foldLine(u,t),s=n}return a}function foldLine(e,t){if(""===e||" "===e[0])return e;for(var r,n,o=/ [^ ]/g,i=0,a=0,s=0,u="";r=o.exec(e);)(s=r.index)-i>t&&(u+="\n"+e.slice(i,n=a>i?a:s),i=n+1),a=s;return u+="\n",(u+=e.length-i>t&&a>i?e.slice(i,a)+"\n"+e.slice(a+1):e.slice(i)).slice(1)}function escapeString(e){for(var t,r,n,o="",i=0;e.length>i;i++)55296>(t=e.charCodeAt(i))||t>56319||56320>(r=e.charCodeAt(i+1))||r>57343?o+=!(n=ESCAPE_SEQUENCES[t])&&isPrintable(t)?e[i]:n||encodeHex(t):(o+=encodeHex(1024*(t-55296)+r-56320+65536),i++);return o}function writeFlowSequence(e,t,r){var n,o,i="",a=e.tag;for(n=0,o=r.length;o>n;n+=1)writeNode(e,t,r[n],!1,!1)&&(0!==n&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}function writeBlockSequence(e,t,r,n){var o,i,a="",s=e.tag;for(o=0,i=r.length;i>o;o+=1)writeNode(e,t+1,r[o],!0,!0)&&(n&&0===o||(a+=generateNextLine(e,t)),e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}function writeFlowMapping(e,t,r){var n,o,i,a,s,u="",c=e.tag,l=Object.keys(r);for(n=0,o=l.length;o>n;n+=1)s=e.condenseFlow?'"':"",0!==n&&(s+=", "),a=r[i=l[n]],writeNode(e,t,i,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),writeNode(e,t,a,!1,!1)&&(u+=s+=e.dump));e.tag=c,e.dump="{"+u+"}"}function writeBlockMapping(e,t,r,n){var o,i,a,s,u,c,l="",p=e.tag,f=Object.keys(r);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new exception("sortKeys must be a boolean or a function");for(o=0,i=f.length;i>o;o+=1)c="",n&&0===o||(c+=generateNextLine(e,t)),s=r[a=f[o]],writeNode(e,t+1,a,!0,!0,!0)&&((u=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,u&&(c+=generateNextLine(e,t)),writeNode(e,t+1,s,!0,u)&&(e.dump&&CHAR_LINE_FEED===e.dump.charCodeAt(0)?c+=":":c+=": ",l+=c+=e.dump));e.tag=p,e.dump=l||"{}"}function detectType(e,t,r){var n,o,i,a,s,u;for(i=0,a=(o=r?e.explicitTypes:e.implicitTypes).length;a>i;i+=1)if(((s=o[i]).instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=r?s.tag:"?",s.represent){if(u=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===_toString$2.call(s.represent))n=s.represent(t,u);else{if(!_hasOwnProperty$3.call(s.represent,u))throw new exception("!<"+s.tag+'> tag resolver accepts not "'+u+'" style');n=s.represent[u](t,u)}e.dump=n}return!0}return!1}function writeNode(e,t,r,n,o,i){e.tag=null,e.dump=r,detectType(e,r,!1)||detectType(e,r,!0);var a=_toString$2.call(e.dump);n&&(n=0>e.flowLevel||e.flowLevel>t);var s,u,c="[object Object]"===a||"[object Array]"===a;if(c&&(u=-1!==(s=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(o=!1),u&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(c&&u&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)n&&0!==Object.keys(e.dump).length?(writeBlockMapping(e,t,e.dump,o),u&&(e.dump="&ref_"+s+e.dump)):(writeFlowMapping(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)n&&0!==e.dump.length?(writeBlockSequence(e,t,e.dump,o),u&&(e.dump="&ref_"+s+e.dump)):(writeFlowSequence(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new exception("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&writeScalar(e,e.dump,t,i)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function getDuplicateReferences(e,t){var r,n,o=[],i=[];for(inspectNode(e,o,i),r=0,n=i.length;n>r;r+=1)t.duplicates.push(o[i[r]]);t.usedDuplicates=Array(n)}function inspectNode(e,t,r){var n,o,i;if(null!==e&&"object"==typeof e)if(-1!==(o=t.indexOf(e)))-1===r.indexOf(o)&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,i=e.length;i>o;o+=1)inspectNode(e[o],t,r);else for(o=0,i=(n=Object.keys(e)).length;i>o;o+=1)inspectNode(e[n[o]],t,r)}function dump(e,t){var r=new State$1(t=t||{});return r.noRefs||getDuplicateReferences(e,r),writeNode(r,0,e,!0,!0)?r.dump+"\n":""}function safeDump(e,t){return dump(e,common.extend({schema:default_safe},t))}var dump_1=dump,safeDump_1=safeDump,dumper={dump:dump_1,safeDump:safeDump_1};function deprecated(e){return function(){throw Error("Function "+e+" is deprecated and cannot be used.")}}var Type$1=type,Schema$1=schema,FAILSAFE_SCHEMA=failsafe,JSON_SCHEMA=json,CORE_SCHEMA=core$2,DEFAULT_SAFE_SCHEMA=default_safe,DEFAULT_FULL_SCHEMA=default_full,load$1=loader.load,loadAll$1=loader.loadAll,safeLoad$1=loader.safeLoad,safeLoadAll$1=loader.safeLoadAll,dump$1=dumper.dump,safeDump$1=dumper.safeDump,YAMLException$1=exception,MINIMAL_SCHEMA=failsafe,SAFE_SCHEMA=default_safe,DEFAULT_SCHEMA=default_full,scan=deprecated("scan"),parse=deprecated("parse"),compose=deprecated("compose"),addConstructor=deprecated("addConstructor"),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},jsYaml$1=jsYaml,yamlPlugin=function(e){e=e||{};var t=this.Compiler;if(null!=t){var r=t.prototype.visitors;r&&(r.yaml=function(e){if(e.data&&e.data.parsedValue)return"---\n"+jsYaml$1.safeDump(e.data.parsedValue)+"---"})}return function(e){return unistUtilMap(e,function(e){if("yaml"==e.type){var t=jsYaml$1.safeLoad(e.value,"utf8");return Object.assign({},e,{data:{parsedValue:t}})}return e})}},lib=yamlPlugin,lodash_iteratee=createCommonjsModule(function(e,t){var r=200,n="Expected a function",o="__lodash_hash_undefined__",i=1,a=2,s=1/0,u=9007199254740991,c="[object Arguments]",l="[object Array]",p="[object Boolean]",f="[object Date]",d="[object Error]",h="[object Function]",g="[object GeneratorFunction]",m="[object Map]",y="[object Number]",_="[object Object]",v="[object RegExp]",D="[object Set]",b="[object String]",E="[object Symbol]",C="[object WeakMap]",w="[object ArrayBuffer]",S="[object DataView]",A="[object Float32Array]",O="[object Float64Array]",$="[object Int8Array]",P="[object Int16Array]",F="[object Int32Array]",T="[object Uint8Array]",j="[object Uint8ClampedArray]",k="[object Uint16Array]",x="[object Uint32Array]",I=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L=/^\w*$/,N=/^\./,R=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,M=/\\(\\)?/g,H=/\w*$/,B=/^\[object .+?Constructor\]$/,U=/^(?:0|[1-9]\d*)$/,z={};z[A]=z[O]=z[$]=z[P]=z[F]=z[T]=z[j]=z[k]=z[x]=!0,z[c]=z[l]=z[w]=z[p]=z[S]=z[f]=z[d]=z[h]=z[m]=z[y]=z[_]=z[v]=z[D]=z[b]=z[C]=!1;var Y={};Y[c]=Y[l]=Y[w]=Y[S]=Y[p]=Y[f]=Y[A]=Y[O]=Y[$]=Y[P]=Y[F]=Y[m]=Y[y]=Y[_]=Y[v]=Y[D]=Y[b]=Y[E]=Y[T]=Y[j]=Y[k]=Y[x]=!0,Y[d]=Y[h]=Y[C]=!1;var q="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,G="object"==typeof self&&self&&self.Object===Object&&self,W=q||G||Function("return this")(),K=t&&!t.nodeType&&t,J=K&&e&&!e.nodeType&&e,V=J&&J.exports===K,X=V&&q.process,Z=function(){try{return X&&X.binding("util")}catch(e){}}(),Q=Z&&Z.isTypedArray;function ee(e,t){return e.set(t[0],t[1]),e}function te(e,t){return e.add(t),e}function re(e,t,r,n){var o=-1,i=e?e.length:0;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function ne(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}function oe(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function ie(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function ae(e,t){return function(r){return e(t(r))}}function se(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var ue,ce=Array.prototype,le=Function.prototype,pe=Object.prototype,fe=W["__core-js_shared__"],de=(ue=/[^.]+$/.exec(fe&&fe.keys&&fe.keys.IE_PROTO||""))?"Symbol(src)_1."+ue:"",he=le.toString,ge=pe.hasOwnProperty,me=pe.toString,ye=RegExp("^"+he.call(ge).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_e=V?W.Buffer:void 0,ve=W.Symbol,De=W.Uint8Array,be=ae(Object.getPrototypeOf,Object),Ee=Object.create,Ce=pe.propertyIsEnumerable,we=ce.splice,Se=Object.getOwnPropertySymbols,Ae=_e?_e.isBuffer:void 0,Oe=ae(Object.keys,Object),$e=st(W,"DataView"),Pe=st(W,"Map"),Fe=st(W,"Promise"),Te=st(W,"Set"),je=st(W,"WeakMap"),ke=st(Object,"create"),xe=yt($e),Ie=yt(Pe),Le=yt(Fe),Ne=yt(Te),Re=yt(je),Me=ve?ve.prototype:void 0,He=Me?Me.valueOf:void 0,Be=Me?Me.toString:void 0;function Ue(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ze(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ye(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function qe(e){var t=-1,r=e?e.length:0;for(this.__data__=new Ye;++t<r;)this.add(e[t])}function Ge(e){this.__data__=new ze(e)}function We(e,t){var r=bt(e)||Dt(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,o=!!n;for(var i in e)!t&&!ge.call(e,i)||o&&("length"==i||lt(i,n))||r.push(i);return r}function Ke(e,t,r){var n=e[t];ge.call(e,t)&&vt(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function Je(e,t){for(var r=e.length;r--;)if(vt(e[r][0],t))return r;return-1}function Ve(e,t,r,n,o,i,a){var s;if(n&&(s=i?n(e,o,i,a):n(e)),void 0!==s)return s;if(!At(e))return e;var u=bt(e);if(u){if(s=function(e){var t=e.length,r=e.constructor(t);t&&"string"==typeof e[0]&&ge.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!t)return function(e,t){var r=-1,n=e.length;t||(t=Array(n));for(;++r<n;)t[r]=e[r];return t}(e,s)}else{var l=ct(e),d=l==h||l==g;if(Ct(e))return function(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}(e,t);if(l==_||l==c||d&&!i){if(oe(e))return i?e:{};if(s=function(e){return"function"!=typeof e.constructor||ft(e)?{}:(t=be(e),At(t)?Ee(t):{});var t}(d?{}:e),!t)return function(e,t){return ot(e,ut(e),t)}(e,function(e,t){return e&&ot(t,Tt(t),e)}(s,e))}else{if(!Y[l])return i?e:{};s=function(e,t,r,n){var o=e.constructor;switch(t){case w:return nt(e);case p:case f:return new o(+e);case S:return function(e,t){var r=t?nt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,n);case A:case O:case $:case P:case F:case T:case j:case k:case x:return function(e,t){var r=t?nt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,n);case m:return function(e,t,r){return re(t?r(ie(e),!0):ie(e),ee,new e.constructor)}(e,n,r);case y:case b:return new o(e);case v:return(s=new(a=e).constructor(a.source,H.exec(a))).lastIndex=a.lastIndex,s;case D:return function(e,t,r){return re(t?r(se(e),!0):se(e),te,new e.constructor)}(e,n,r);case E:return i=e,He?Object(He.call(i)):{}}var i;var a,s}(e,l,Ve,t)}}a||(a=new Ge);var C=a.get(e);if(C)return C;if(a.set(e,s),!u)var I=r?function(e){return function(e,t,r){var n=t(e);return bt(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Tt,ut)}(e):Tt(e);return function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););}(I||e,function(o,i){I&&(o=e[i=o]),Ke(s,i,Ve(o,t,r,n,i,e,a))}),s}function Xe(e,t){for(var r=0,n=(t=pt(t,e)?[t]:rt(t)).length;null!=e&&n>r;)e=e[mt(t[r++])];return r&&r==n?e:void 0}function Ze(e,t){return null!=e&&t in Object(e)}function Qe(e,t,r,n,o){return e===t||(null==e||null==t||!At(e)&&!Ot(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var u=bt(e),h=bt(t),g=l,C=l;u||(g=(g=ct(e))==c?_:g);h||(C=(C=ct(t))==c?_:C);var A=g==_&&!oe(e),O=C==_&&!oe(t),$=g==C;if($&&!A)return s||(s=new Ge),u||Ft(e)?it(e,t,r,n,o,s):function(e,t,r,n,o,s,u){switch(r){case S:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!n(new De(e),new De(t)));case p:case f:case y:return vt(+e,+t);case d:return e.name==t.name&&e.message==t.message;case v:case b:return e==t+"";case m:var c=ie;case D:var l=s&a;if(c||(c=se),e.size!=t.size&&!l)return!1;var h=u.get(e);if(h)return h==t;s|=i,u.set(e,t);var g=it(c(e),c(t),n,o,s,u);return u.delete(e),g;case E:if(He)return He.call(e)==He.call(t)}return!1}(e,t,g,r,n,o,s);if(!(o&a)){var P=A&&ge.call(e,"__wrapped__"),F=O&&ge.call(t,"__wrapped__");if(P||F){var T=P?e.value():e,j=F?t.value():t;return s||(s=new Ge),r(T,j,n,o,s)}}if(!$)return!1;return s||(s=new Ge),function(e,t,r,n,o,i){var s=o&a,u=Tt(e),c=u.length,l=Tt(t);if(c!=l.length&&!s)return!1;for(var p=c;p--;){var f=u[p];if(!(s?f in t:ge.call(t,f)))return!1}var d=i.get(e);if(d&&i.get(t))return d==t;var h=!0;i.set(e,t),i.set(t,e);for(var g=s;++p<c;){var m=e[f=u[p]],y=t[f];if(n)var _=s?n(y,m,f,t,e,i):n(m,y,f,e,t,i);if(!(void 0===_?m===y||r(m,y,n,o,i):_)){h=!1;break}g||(g="constructor"==f)}if(h&&!g){var v=e.constructor,D=t.constructor;v!=D&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof D&&D instanceof D)&&(h=!1)}return i.delete(e),i.delete(t),h}(e,t,r,n,o,s)}(e,t,Qe,r,n,o))}function et(e){return!(!At(e)||(t=e,de&&de in t))&&(wt(e)||oe(e)?ye:B).test(yt(e));var t}function tt(e){return"function"==typeof e?e:null==e?jt:"object"==typeof e?bt(e)?function(e,t){if(pt(e)&&dt(t))return ht(mt(e),t);return function(r){var n=function(e,t,r){var n=null==e?void 0:Xe(e,t);return void 0===n?r:n}(r,e);return void 0===n&&n===t?function(e,t){return null!=e&&function(e,t,r){t=pt(t,e)?[t]:rt(t);var n,o=-1,i=t.length;for(;++o<i;){var a=mt(t[o]);if(!(n=null!=e&&r(e,a)))break;e=e[a]}if(n)return n;return!!(i=e?e.length:0)&&St(i)&&lt(a,i)&&(bt(e)||Dt(e))}(e,t,Ze)}(r,e):Qe(t,n,void 0,i|a)}}(e[0],e[1]):function(e){var t=function(e){var t=Tt(e),r=t.length;for(;r--;){var n=t[r],o=e[n];t[r]=[n,o,dt(o)]}return t}(e);if(1==t.length&&t[0][2])return ht(t[0][0],t[0][1]);return function(r){return r===e||function(e,t,r,n){var o=r.length,s=o,u=!n;if(null==e)return!s;for(e=Object(e);o--;){var c=r[o];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<s;){var l=(c=r[o])[0],p=e[l],f=c[1];if(u&&c[2]){if(void 0===p&&!(l in e))return!1}else{var d=new Ge;if(n)var h=n(p,f,l,e,t,d);if(!(void 0===h?Qe(f,p,n,i|a,d):h))return!1}}return!0}(r,e,t)}}(e):pt(t=e)?(r=mt(t),function(e){return null==e?void 0:e[r]}):function(e){return function(t){return Xe(t,e)}}(t);var t,r}function rt(e){return bt(e)?e:gt(e)}function nt(e){var t=new e.constructor(e.byteLength);return new De(t).set(new De(e)),t}function ot(e,t,r,n){r||(r={});for(var o=-1,i=t.length;++o<i;){var a=t[o],s=n?n(r[a],e[a],a,r,e):void 0;Ke(r,a,void 0===s?e[a]:s)}return r}function it(e,t,r,n,o,s){var u=o&a,c=e.length,l=t.length;if(!(c==l||u&&l>c))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var f=-1,d=!0,h=o&i?new qe:void 0;for(s.set(e,t),s.set(t,e);++f<c;){var g=e[f],m=t[f];if(n)var y=u?n(m,g,f,t,e,s):n(g,m,f,e,t,s);if(void 0!==y){if(y)continue;d=!1;break}if(h){if(!ne(t,function(e,t){if(!h.has(t)&&(g===e||r(g,e,n,o,s)))return h.add(t)})){d=!1;break}}else if(g!==m&&!r(g,m,n,o,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function at(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function st(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return et(r)?r:void 0}Ue.prototype.clear=function(){this.__data__=ke?ke(null):{}},Ue.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ue.prototype.get=function(e){var t=this.__data__;if(ke){var r=t[e];return r===o?void 0:r}return ge.call(t,e)?t[e]:void 0},Ue.prototype.has=function(e){var t=this.__data__;return ke?void 0!==t[e]:ge.call(t,e)},Ue.prototype.set=function(e,t){return this.__data__[e]=ke&&void 0===t?o:t,this},ze.prototype.clear=function(){this.__data__=[]},ze.prototype.delete=function(e){var t=this.__data__,r=Je(t,e);return r>=0&&(r==t.length-1?t.pop():we.call(t,r,1),!0)},ze.prototype.get=function(e){var t=this.__data__,r=Je(t,e);return 0>r?void 0:t[r][1]},ze.prototype.has=function(e){return Je(this.__data__,e)>-1},ze.prototype.set=function(e,t){var r=this.__data__,n=Je(r,e);return 0>n?r.push([e,t]):r[n][1]=t,this},Ye.prototype.clear=function(){this.__data__={hash:new Ue,map:new(Pe||ze),string:new Ue}},Ye.prototype.delete=function(e){return at(this,e).delete(e)},Ye.prototype.get=function(e){return at(this,e).get(e)},Ye.prototype.has=function(e){return at(this,e).has(e)},Ye.prototype.set=function(e,t){return at(this,e).set(e,t),this},qe.prototype.add=qe.prototype.push=function(e){return this.__data__.set(e,o),this},qe.prototype.has=function(e){return this.__data__.has(e)},Ge.prototype.clear=function(){this.__data__=new ze},Ge.prototype.delete=function(e){return this.__data__.delete(e)},Ge.prototype.get=function(e){return this.__data__.get(e)},Ge.prototype.has=function(e){return this.__data__.has(e)},Ge.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ze){var o=n.__data__;if(!Pe||r-1>o.length)return o.push([e,t]),this;n=this.__data__=new Ye(o)}return n.set(e,t),this};var ut=Se?ae(Se,Object):function(){return[]},ct=function(e){return me.call(e)};function lt(e,t){return!!(t=null==t?u:t)&&("number"==typeof e||U.test(e))&&e>-1&&e%1==0&&t>e}function pt(e,t){if(bt(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!$t(e))||(L.test(e)||!I.test(e)||null!=t&&e in Object(t))}function ft(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||pe)}function dt(e){return e==e&&!At(e)}function ht(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}($e&&ct(new $e(new ArrayBuffer(1)))!=S||Pe&&ct(new Pe)!=m||Fe&&"[object Promise]"!=ct(Fe.resolve())||Te&&ct(new Te)!=D||je&&ct(new je)!=C)&&(ct=function(e){var t=me.call(e),r=t==_?e.constructor:void 0,n=r?yt(r):void 0;if(n)switch(n){case xe:return S;case Ie:return m;case Le:return"[object Promise]";case Ne:return D;case Re:return C}return t});var gt=_t(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if($t(e))return Be?Be.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var r=[];return N.test(e)&&r.push(""),e.replace(R,function(e,t,n,o){r.push(n?o.replace(M,"$1"):t||e)}),r});function mt(e){if("string"==typeof e||$t(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function yt(e){if(null!=e){try{return he.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function _t(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(n);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(_t.Cache||Ye),r}function vt(e,t){return e===t||e!=e&&t!=t}function Dt(e){return function(e){return Ot(e)&&Et(e)}(e)&&ge.call(e,"callee")&&(!Ce.call(e,"callee")||me.call(e)==c)}_t.Cache=Ye;var bt=Array.isArray;function Et(e){return null!=e&&St(e.length)&&!wt(e)}var Ct=Ae||function(){return!1};function wt(e){var t=At(e)?me.call(e):"";return t==h||t==g}function St(e){return"number"==typeof e&&e>-1&&e%1==0&&u>=e}function At(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ot(e){return!!e&&"object"==typeof e}function $t(e){return"symbol"==typeof e||Ot(e)&&me.call(e)==E}var Pt,Ft=Q?(Pt=Q,function(e){return Pt(e)}):function(e){return Ot(e)&&St(e.length)&&!!z[me.call(e)]};function Tt(e){return Et(e)?We(e):function(e){if(!ft(e))return Oe(e);var t=[];for(var r in Object(e))ge.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}function jt(e){return e}e.exports=function(e){return tt("function"==typeof e?e:Ve(e,!0))}});function find(e,t){if(!e)throw Error("unist-find requires a tree to search");if(!t)throw Error("unist-find requires a condition");var r,n=lodash_iteratee(t);return unistUtilVisit(e,function(e){if(n(e))return r=e,!1}),r}var unistUtilFind=find,MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",funcTag="[object Function]",genTag="[object GeneratorFunction]",freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();function arrayPush(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var objectProto=Object.prototype,hasOwnProperty$1=objectProto.hasOwnProperty,objectToString=objectProto.toString,Symbol$1=root.Symbol,propertyIsEnumerable=objectProto.propertyIsEnumerable,spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function baseFlatten(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=isFlattenable),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?baseFlatten(s,t-1,r,n,o):arrayPush(o,s):n||(o[o.length]=s)}return o}function isFlattenable(e){return isArray$1(e)||isArguments(e)||!!(spreadableSymbol&&e&&e[spreadableSymbol])}function flatten(e){return(e?e.length:0)?baseFlatten(e,1):[]}function isArguments(e){return isArrayLikeObject(e)&&hasOwnProperty$1.call(e,"callee")&&(!propertyIsEnumerable.call(e,"callee")||objectToString.call(e)==argsTag)}var isArray$1=Array.isArray;function isArrayLike(e){return null!=e&&isLength(e.length)&&!isFunction$1(e)}function isArrayLikeObject(e){return isObjectLike(e)&&isArrayLike(e)}function isFunction$1(e){var t=isObject$1(e)?objectToString.call(e):"";return t==funcTag||t==genTag}function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&MAX_SAFE_INTEGER>=e}function isObject$1(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isObjectLike(e){return!!e&&"object"==typeof e}var lodash_flatten=flatten,FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",INFINITY=1/0,funcTag$1="[object Function]",genTag$1="[object GeneratorFunction]",symbolTag="[object Symbol]",reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reEscapeChar=/\\(\\)?/g,reIsHostCtor=/^\[object .+?Constructor\]$/,freeGlobal$1="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,freeSelf$1="object"==typeof self&&self&&self.Object===Object&&self,root$1=freeGlobal$1||freeSelf$1||Function("return this")();function getValue(e,t){return null==e?void 0:e[t]}function isHostObject(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto$1=Object.prototype,coreJsData=root$1["__core-js_shared__"],maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),funcToString=funcProto.toString,hasOwnProperty$2=objectProto$1.hasOwnProperty,objectToString$1=objectProto$1.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Symbol$2=root$1.Symbol,splice=arrayProto.splice,Map$1=getNative(root$1,"Map"),nativeCreate=getNative(Object,"create"),symbolProto=Symbol$2?Symbol$2.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function Hash(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{}}function hashDelete(e){return this.has(e)&&delete this.__data__[e]}function hashGet(e){var t=this.__data__;if(nativeCreate){var r=t[e];return r===HASH_UNDEFINED?void 0:r}return hasOwnProperty$2.call(t,e)?t[e]:void 0}function hashHas(e){var t=this.__data__;return nativeCreate?void 0!==t[e]:hasOwnProperty$2.call(t,e)}function hashSet(e,t){return this.__data__[e]=nativeCreate&&void 0===t?HASH_UNDEFINED:t,this}function ListCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return r>=0&&(r==t.length-1?t.pop():splice.call(t,r,1),!0)}function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return 0>r?void 0:t[r][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return 0>n?r.push([e,t]):r[n][1]=t,this}function MapCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function mapCacheDelete(e){return getMapData(this,e).delete(e)}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){return getMapData(this,e).set(e,t),this}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}function baseGet(e,t){for(var r=0,n=(t=isKey(t,e)?[t]:castPath(t)).length;null!=e&&n>r;)e=e[toKey(t[r++])];return r&&r==n?e:void 0}function baseIsNative(e){return!(!isObject$2(e)||isMasked(e))&&(isFunction$2(e)||isHostObject(e)?reIsNative:reIsHostCtor).test(toSource(e))}function baseToString(e){if("string"==typeof e)return e;if(isSymbol(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}function castPath(e){return isArray$2(e)?e:stringToPath(e)}function getMapData(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}function isKey(e,t){if(isArray$2(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet,ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet,MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var stringToPath=memoize(function(e){e=toString$4(e);var t=[];return reLeadingDot.test(e)&&t.push(""),e.replace(rePropName,function(e,r,n,o){t.push(n?o.replace(reEscapeChar,"$1"):r||e)}),t});function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}function toSource(e){if(null!=e){try{return funcToString.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function memoize(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(memoize.Cache||MapCache),r}function eq(e,t){return e===t||e!=e&&t!=t}memoize.Cache=MapCache;var isArray$2=Array.isArray;function isFunction$2(e){var t=isObject$2(e)?objectToString$1.call(e):"";return t==funcTag$1||t==genTag$1}function isObject$2(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isObjectLike$1(e){return!!e&&"object"==typeof e}function isSymbol(e){return"symbol"==typeof e||isObjectLike$1(e)&&objectToString$1.call(e)==symbolTag}function toString$4(e){return null==e?"":baseToString(e)}function get(e,t,r){var n=null==e?void 0:baseGet(e,t);return void 0===n?r:n}var lodash_get=get,mdast=createCommonjsModule(function(e,t){function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var n=r(toVfile),o=r(unified_1),i=r(remarkParse),a=r(matter),s=r(remarkSlug),u=r(lib),c=r(unistUtilFind),l=r(unistUtilIs),p=r(unistUtilVisit),f=r(humanize),d=r(lodash_flatten),h=r(lodash_get);const g=e=>e.map(e=>e.children?g(e.children):e.value),m=e=>{const t=h(e,"children"),r=h(e,"data.id");return Array.isArray(t)?d(g(t)).filter(Boolean).join(" "):f(r)};t.parseMdx=(e=>{const t=n.readSync(e,"utf-8"),r=o().use(i,{type:"yaml",marker:"-"}).use(a).use(u).use(s);return r.run(r.parse(t))}),t.headingsFromAst=(e=>{const t=[];return p(e,"heading",e=>{const r=h(e,"data.id"),n=h(e,"depth");t.push({depth:n,slug:r,value:m(e)})}),t}),t.getParsedData=(e=>{const t=c(e,e=>l("yaml",e));return h(t,"data.parsedValue")||{}})});unwrapExports(mdast);var mdast_1=mdast.parseMdx,mdast_2=mdast.headingsFromAst,mdast_3=mdast.getParsedData;const ensureSlash=(e,t)=>{const r=e.endsWith("/");return r&&!t?e.substr(e,e.length-1):!r&&t?`${e}/`:e},root$2=fs.realpathSync(process.cwd()),resolveApp=e=>path.resolve(root$2,e),resolveOwn=e=>path.resolve(__dirname,"../",e),templates=path.join(resolve.sync("docz-core"),"../templates"),packageJson=resolveApp("package.json"),servedPath=e=>ensureSlash(e,!0),docz=resolveApp(".docz"),app=path.resolve(docz,"app/"),cache=path.resolve(docz,"cache/"),appPublic=path.resolve(docz,"public/"),appNodeModules=resolveApp("node_modules"),appPackageJson=resolveApp("package.json"),appYarnLock=resolveOwn("yarn.lock"),ownNodeModules=resolveOwn("node_modules"),getDist=e=>path.join(root$2,e),distPublic=e=>path.join(e,"public/"),importsJs=path.resolve(app,"imports.js"),rootJs=path.resolve(app,"root.jsx"),indexJs=path.resolve(app,"index.jsx"),indexHtml=path.resolve(app,"index.html"),db=path.resolve(app,"db.json");var paths=Object.freeze({root:root$2,resolveApp:resolveApp,resolveOwn:resolveOwn,templates:templates,packageJson:packageJson,servedPath:servedPath,docz:docz,app:app,cache:cache,appPublic:appPublic,appNodeModules:appNodeModules,appPackageJson:appPackageJson,appYarnLock:appYarnLock,ownNodeModules:ownNodeModules,getDist:getDist,distPublic:distPublic,importsJs:importsJs,rootJs:rootJs,indexJs:indexJs,indexHtml:indexHtml,db:db});const touch=(e,t)=>new Promise(async(r,n)=>{const o=/jsx?$/.test(path.extname(e))?await doczUtils.format(t):t,i=fs$1.createWriteStream(e);i.write(o,"utf-8"),i.on("finish",()=>r()),i.on("error",e=>n(e)),i.end()}),read$2=e=>new Promise((t,r)=>{let n="";const o=fs$1.createReadStream(e,{encoding:"utf-8"});o.on("data",e=>n+=e),o.on("end",()=>t(n)),o.on("error",e=>r(e))}),compiled=async(e,t={})=>read$2(e).then(e=>artTemplate.compile(e,t)).catch(e=>e),{keys:keys$1}=Object,isFn=e=>"function"==typeof e;function omit(e,t){return keys$1(t).filter(t=>-1===e.indexOf(t)).reduce((e,r)=>Object.assign({},e,{[r]:t[r]}),{})}const mapToObj=e=>Array.from(e.entries()).reduce((e,[t,r])=>Object.assign({},e,{[`${t}`]:r}),{}),createId=e=>crypto.createHash("md5").update(e).digest("hex");class Entry{constructor(e,t,r){const n=this.getFilepath(t,r),o=mdast_3(e),i=this.getName(n,o);this.id=createId(t),this.filepath=n,this.link=null,this.slug=this.slugify(n),this.route=this.getRoute(o),this.name=i,this.order=o.order||0,this.menu=o.menu||null,this.headings=mdast_2(e),this.settings=o}setLink(e){e&&(this.link=e.replace("{{filepath}}",this.filepath))}getFilepath(e,t){const r=path.resolve(root$2,t),n=path.relative(r,e);return"win32"===process.platform?n.split("\\").join("/"):n}getName(e,t){const r=humanize(path.parse(e).name);return t&&t.name?t.name:r}slugify(e){const t=path.extname(e),r=e.replace(t,"");return slugify(r)}getRoute(e){return e&&e.route?e.route:`/${this.slug}`}}var isArray$3=Array.isArray,isArray_1=isArray$3,freeGlobal$2="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$2,freeSelf$2="object"==typeof self&&self&&self.Object===Object&&self,root$3=_freeGlobal||freeSelf$2||Function("return this")(),_root=root$3,Symbol$3=_root.Symbol,_Symbol=Symbol$3,objectProto$2=Object.prototype,hasOwnProperty$3=objectProto$2.hasOwnProperty,nativeObjectToString=objectProto$2.toString,symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(e){var t=hasOwnProperty$3.call(e,symToStringTag),r=e[symToStringTag];try{e[symToStringTag]=void 0}catch(e){}var n=nativeObjectToString.call(e);return t?e[symToStringTag]=r:delete e[symToStringTag],n}var _getRawTag=getRawTag,objectProto$3=Object.prototype,nativeObjectToString$1=objectProto$3.toString;function objectToString$2(e){return nativeObjectToString$1.call(e)}var _objectToString=objectToString$2,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag$1&&symToStringTag$1 in Object(e)?_getRawTag(e):_objectToString(e)}var _baseGetTag=baseGetTag;function isObjectLike$2(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike$2,symbolTag$1="[object Symbol]";function isSymbol$1(e){return"symbol"==typeof e||isObjectLike_1(e)&&_baseGetTag(e)==symbolTag$1}var isSymbol_1=isSymbol$1,reIsDeepProp$1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp$1=/^\w*$/;function isKey$1(e,t){if(isArray_1(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol_1(e))||(reIsPlainProp$1.test(e)||!reIsDeepProp$1.test(e)||null!=t&&e in Object(t))}var _isKey=isKey$1;function isObject$3(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1$1=isObject$3,asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$2="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$3(e){if(!isObject_1$1(e))return!1;var t=_baseGetTag(e);return t==funcTag$2||t==genTag$2||t==asyncTag||t==proxyTag}var isFunction_1=isFunction$3,coreJsData$1=_root["__core-js_shared__"],_coreJsData=coreJsData$1,maskSrcKey$1=function(){var e=/[^.]+$/.exec(_coreJsData&&_coreJsData.keys&&_coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked$1(e){return!!maskSrcKey$1&&maskSrcKey$1 in e}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$1(e){if(null!=e){try{return funcToString$1.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1,reRegExpChar$1=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor$1=/^\[object .+?Constructor\]$/,funcProto$2=Function.prototype,objectProto$4=Object.prototype,funcToString$2=funcProto$2.toString,hasOwnProperty$4=objectProto$4.hasOwnProperty,reIsNative$1=RegExp("^"+funcToString$2.call(hasOwnProperty$4).replace(reRegExpChar$1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){return!(!isObject_1$1(e)||_isMasked(e))&&(isFunction_1(e)?reIsNative$1:reIsHostCtor$1).test(_toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,t){return null==e?void 0:e[t]}var _getValue=getValue$1;function getNative$1(e,t){var r=_getValue(e,t);return _baseIsNative(r)?r:void 0}var _getNative=getNative$1,nativeCreate$1=_getNative(Object,"create"),_nativeCreate=nativeCreate$1;function hashClear$1(){this.__data__=_nativeCreate?_nativeCreate(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete$1,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty;function hashGet$1(e){var t=this.__data__;if(_nativeCreate){var r=t[e];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$5.call(t,e)?t[e]:void 0}var _hashGet=hashGet$1,objectProto$6=Object.prototype,hasOwnProperty$6=objectProto$6.hasOwnProperty;function hashHas$1(e){var t=this.__data__;return _nativeCreate?void 0!==t[e]:hasOwnProperty$6.call(t,e)}var _hashHas=hashHas$1,HASH_UNDEFINED$2="__lodash_hash_undefined__";function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_nativeCreate&&void 0===t?HASH_UNDEFINED$2:t,this}var _hashSet=hashSet$1;function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash$1.prototype.clear=_hashClear,Hash$1.prototype.delete=_hashDelete,Hash$1.prototype.get=_hashGet,Hash$1.prototype.has=_hashHas,Hash$1.prototype.set=_hashSet;var _Hash=Hash$1;function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$1(e,t){return e===t||e!=e&&t!=t}var eq_1=eq$1;function assocIndexOf$1(e,t){for(var r=e.length;r--;)if(eq_1(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf$1,arrayProto$1=Array.prototype,splice$1=arrayProto$1.splice;function listCacheDelete$1(e){var t=this.__data__,r=_assocIndexOf(t,e);return r>=0&&(r==t.length-1?t.pop():splice$1.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete$1;function listCacheGet$1(e){var t=this.__data__,r=_assocIndexOf(t,e);return 0>r?void 0:t[r][1]}var _listCacheGet=listCacheGet$1;function listCacheHas$1(e){return _assocIndexOf(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1;function listCacheSet$1(e,t){var r=this.__data__,n=_assocIndexOf(r,e);return 0>n?(++this.size,r.push([e,t])):r[n][1]=t,this}var _listCacheSet=listCacheSet$1;function ListCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache$1.prototype.clear=_listCacheClear,ListCache$1.prototype.delete=_listCacheDelete,ListCache$1.prototype.get=_listCacheGet,ListCache$1.prototype.has=_listCacheHas,ListCache$1.prototype.set=_listCacheSet;var _ListCache=ListCache$1,Map$2=_getNative(_root,"Map"),_Map=Map$2;function mapCacheClear$1(){this.size=0,this.__data__={hash:new _Hash,map:new(_Map||_ListCache),string:new _Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable$1;function getMapData$1(e,t){var r=e.__data__;return _isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData$1;function mapCacheDelete$1(e){var t=_getMapData(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete$1;function mapCacheGet$1(e){return _getMapData(this,e).get(e)}var _mapCacheGet=mapCacheGet$1;function mapCacheHas$1(e){return _getMapData(this,e).has(e)}var _mapCacheHas=mapCacheHas$1;function mapCacheSet$1(e,t){var r=_getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _mapCacheSet=mapCacheSet$1;function MapCache$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache$1.prototype.clear=_mapCacheClear,MapCache$1.prototype.delete=_mapCacheDelete,MapCache$1.prototype.get=_mapCacheGet,MapCache$1.prototype.has=_mapCacheHas,MapCache$1.prototype.set=_mapCacheSet;var _MapCache=MapCache$1,FUNC_ERROR_TEXT$1="Expected a function";function memoize$1(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT$1);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(memoize$1.Cache||_MapCache),r}memoize$1.Cache=_MapCache;var memoize_1=memoize$1,MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize_1(e,function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e}),r=t.cache;return t}var _memoizeCapped=memoizeCapped,rePropName$1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar$1=/\\(\\)?/g,stringToPath$1=_memoizeCapped(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName$1,function(e,r,n,o){t.push(n?o.replace(reEscapeChar$1,"$1"):r||e)}),t}),_stringToPath=stringToPath$1;function arrayMap(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var _arrayMap=arrayMap,INFINITY$1=1/0,symbolProto$1=_Symbol?_Symbol.prototype:void 0,symbolToString$1=symbolProto$1?symbolProto$1.toString:void 0;function baseToString$1(e){if("string"==typeof e)return e;if(isArray_1(e))return _arrayMap(e,baseToString$1)+"";if(isSymbol_1(e))return symbolToString$1?symbolToString$1.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _baseToString=baseToString$1;function toString$5(e){return null==e?"":_baseToString(e)}var toString_1=toString$5;function castPath$1(e,t){return isArray_1(e)?e:_isKey(e,t)?[e]:_stringToPath(toString_1(e))}var _castPath=castPath$1,INFINITY$2=1/0;function toKey$1(e){if("string"==typeof e||isSymbol_1(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY$2?"-0":t}var _toKey=toKey$1;function baseGet$1(e,t){for(var r=0,n=(t=_castPath(t,e)).length;null!=e&&n>r;)e=e[_toKey(t[r++])];return r&&r==n?e:void 0}var _baseGet=baseGet$1;function get$1(e,t,r){var n=null==e?void 0:_baseGet(e,t);return void 0===n?r:n}var get_1=get$1;class Plugin{constructor(e){this.setConfig=e.setConfig,this.modifyBundlerConfig=e.modifyBundlerConfig,this.modifyBabelRc=e.modifyBabelRc,this.modifyFiles=e.modifyFiles,this.onPreCreateApp=e.onPreCreateApp,this.onCreateWebpackChain=e.onCreateWebpackChain,this.onCreateApp=e.onCreateApp,this.onServerListening=e.onServerListening,this.onPreBuild=e.onPreBuild,this.onPostBuild=e.onPostBuild,this.onPreRender=e.onPreRender,this.onPostRender=e.onPostRender}static runPluginsMethod(e){return(t,...r)=>{if(e&&e.length>0)for(const n of e){const e=get_1(n,t);isFn(e)&&e(...r)}}}static propsOfPlugins(e){return t=>e&&e.length>0?e.map(e=>get_1(e,t)).filter(Boolean):[]}static reduceFromPlugins(e){return(t,r,...n)=>[...e||[]].reduce((e,r)=>{const o=get_1(r,t);return o&&isFn(o)?o(e,...n):e},r)}static reduceFromPluginsAsync(e){return(t,r,...n)=>pReduce([...e||[]],(e,r)=>{const o=get_1(r,t);return Promise.resolve(o&&isFn(o)?o(e,...n):e)},r)}}function createPlugin(e){return new Plugin(e)}const parseRepo=()=>{try{const e=fs$1.readJsonSync(appPackageJson);return getPkgRepo(e)}catch(e){return null}},getRepoUrl=()=>{const e=parseRepo();return e&&e.browsetemplate&&e.browsetemplate.replace("{domain}",e.domain).replace("{user}",e.user).replace("{project}",e.project).replace("{/tree/committish}","")},getBitBucketPath=(e,t)=>{const r=`?mode=edit&spa=0&at=${e}&fileviewer=file-view-default`;return`${path.join(`/src/${e}`,t,"{{filepath}}")}${r}`},getTree=(e,t,r)=>{const n=path.join(`/edit/${t}`,r,"{{filepath}}"),o=getBitBucketPath(t,r);return e&&"bitbucket"===e.type?o:n},getRepoEditUrl=(e,t)=>{try{const r=parseRepo(),n=path.parse(findup.sync(".git")).dir,o=path.join(root$2,e),i=path.relative(n,o),a=getTree(r,t,i);return r&&r.browsetemplate&&r.browsetemplate.replace("{domain}",r.domain).replace("{user}",r.user).replace("{project}",r.project).replace("{/tree/committish}",a)}catch(e){return null}},fromTemplates=e=>path.join(templates,e),matchFilesWithSrc=e=>t=>{const r=path.relative(root$2,e.src);return t.map(e=>e.startsWith(r)?e:path.join(r,e))},writeAppFiles=async(e,t)=>{const{plugins:r,theme:n}=e,o=Plugin.propsOfPlugins(r),i=o("onPreRender"),a=o("onPostRender"),s=await compiled(fromTemplates("root.tpl.js"),{minimize:!1}),u=await compiled(fromTemplates("index.tpl.js"),{minimize:!1}),c=s({theme:n,isProd:!t,wrapper:e.wrapper,hashRouter:e.hashRouter,websocketUrl:`ws://${e.websocketHost}:${e.websocketPort}`}),l=u({onPreRenders:i,onPostRenders:a,isProd:!t});await fs$1.remove(rootJs),await fs$1.remove(indexJs),await touch(rootJs,c),await touch(indexJs,l)};class Entries{static async writeApp(e,t){await fs$1.ensureDir(app),await writeAppFiles(e,!!t)}constructor(e){this.repoEditUrl=getRepoEditUrl(e.src,e.editBranch),this.all=new Map,this.get=(async()=>this.getMap(e))}async getMap(e){const{src:t,files:r,ignore:n,plugins:o}=e,i=Array.isArray(r)?r:[r],a=matchFilesWithSrc(e),s=await glob(a(i),{ignore:["**/node_modules/**"].concat(n),onlyFiles:!0,unique:!0,nocase:!0,matchBase:!0}),u=Plugin.reduceFromPlugins(o)("modifyFiles",s),c=new Map,l=await Promise.all(u.map(async e=>{try{const r=await mdast_1(e),n=new Entry(r,e,t);this.repoEditUrl&&n.setLink(this.repoEditUrl);const{settings:o}=n,i=__rest(n,["settings"]);return Object.assign({},o,i)}catch(e){return null}}).filter(Boolean));for(const e of l)e&&c.set(e.filepath,e);return this.all=c,mapToObj(c)}}const writeImports=async e=>{const t=(await compiled(fromTemplates("imports.tpl.js")))({entries:Object.values(e)});await touch(path.join(app,"imports.js"),t)},updateEntries=e=>async t=>{const r=t.state.entries,n=await e.get();n&&!equal(r,n)&&(await writeImports(n),t.setState("entries",n))},state=(e,t)=>{const r=path.relative(root$2,t.src),n=path.join(r,t.files),o=chokidar.watch(n,{cwd:root$2,ignored:/(((^|[\/\\])\..+)|(node_modules))/,persistent:!0});return o.setMaxListeners(1/0),{init:updateEntries(e),close:()=>o.close(),update:async t=>{const r=updateEntries(e);return o.on("change",async()=>r(t)),o.on("unlink",async()=>r(t)),o.on("raw",async(e,n,o)=>{"moved"===o.event&&"directory"===o.type&&await r(t)}),()=>o.close()}}},getInitialConfig=e=>{const t=fs$1.readJsonSync(appPackageJson,{throws:!1}),r=getRepoUrl();return{title:e.title,description:e.description,menu:e.menu,ordering:e.ordering,version:get_1(t,"version"),repository:r,native:e.native,codeSandbox:e.codeSandbox,themeConfig:e.themeConfig}},updateConfig=e=>async({setState:t})=>t("config",loadCfg.load("docz",getInitialConfig(e),!0,!1)),state$1=e=>{const t=chokidar.watch(loadCfg.finds("docz"),{cwd:root$2,ignored:/(((^|[\/\\])\..+)|(node_modules))/,persistent:!0});return t.setMaxListeners(1/0),{init:updateConfig(e),close:()=>t.close(),update:async r=>{const n=updateConfig(e),o=async()=>n(r);return t.on("add",o),t.on("change",o),t.on("unlink",o),()=>t.close()}}},onSignal=e=>{const t=["SIGINT","SIGTERM"];for(const r of t)process.on(r,async()=>{await e(),process.exit()})},isSocketOpened=e=>e.readyState===WS.OPEN,sender=e=>(t,r)=>{e&&isSocketOpened(e)&&e.send(JSON.stringify({type:t,payload:r}))};class DataServer{constructor(e,t,r){this.states=new Set,this.state={},e&&(this.client=new WS.Server({server:e,port:t,host:r}))}register(e){for(const t of e)this.states.add(t);return this}async init(){await Promise.all(Array.from(this.states).map(async e=>isFn(e.init)&&e.init({state:Object.assign({},this.state),setState:this.setState()}))),this.updateStateFile()}async listen(){this.client&&this.client.on("connection",e=>{const t=this.handleConnection(e),r=async()=>{await t(),e.terminate()};this.client.on("close",r),onSignal(r)})}async close(){await Promise.all(Array.from(this.states).map(async e=>isFn(e.close)&&e.close({state:Object.assign({},this.state),setState:this.setState()})))}handleConnection(e){const t=Array.from(this.states).map(async t=>isFn(t.update)&&t.update({state:this.state,setState:this.setState(e)}));return async()=>{const e=await Promise.all(t.filter(Boolean));for(const t of e)isFn(t)&&t()}}setState(e){const t=sender(e);return(e,r)=>{this.state[e]=r,t(`state.${e}`,r),this.updateStateFile()}}async updateStateFile(){await touch(db,JSON.stringify(this.state,null,2))}}const getBabelConfig=async(e,t)=>{const r="production"===t,n="development"===t,o=loadCfg.load("babel",{presets:[],plugins:[]},!1,!0),i=[[require.resolve("babel-preset-docz"),{flow:!e.typescript,typescript:e.typescript,parseProps:e.propsParser&&!e.typescript}]],a=[[require.resolve("docz-utils/lib/named-asset-import"),{loaderMap:{svg:{ReactComponent:"@svgr/webpack?-prettier,-svgo![path]"}}}]],s=merge(o,Object.assign({presets:i,babelrc:!1},e.debug&&{cacheDirectory:!0,cacheIdentifier:getCacheIdentifier(r?"production":n&&"development",["docz","docz-theme-default","docz-utils","docz-core","babel-preset-docz"])},{cacheCompression:r,compact:r,plugins:a.concat(r?[]:[require.resolve("react-hot-loader/babel")])})),u=Plugin.reduceFromPlugins(e.plugins)("modifyBabelRc",s,e);return e.modifyBabelRc(u,e)};class Bundler{constructor(e){const{args:t,config:r,server:n,build:o}=e,i=Plugin.runPluginsMethod(t.plugins);this.args=t,this.config=r,this.server=n,this.builder=o,this.hooks={onCreateWebpackChain(e,t,r){i("onCreateApp",e,t,r)},onPreCreateApp(e){i("onPreCreateApp",e)},onCreateApp(e){i("onCreateApp",e)},onServerListening(e){i("onServerListening",e)}}}async mountConfig(e){const{plugins:t}=this.args,r="production"!==e,n=Plugin.reduceFromPlugins(t),o=await getBabelConfig(this.args,e),i=n("modifyBundlerConfig",await this.config(o,this.hooks),r,this.args);return this.args.modifyBundlerConfig(i,r,this.args)}async createApp(e){return this.server(e,this.hooks)}async build(e){const t=getDist(this.args.dest),r=path.join(root$2,this.args.public);root$2===path.resolve(t)&&(logger.fatal(Error('Unexpected option: "dest" cannot be set to the current working directory.')),process.exit(1)),await this.builder(e,t,r)}}const config={type:"yaml",marker:"-"},remarkPlugins=()=>[matter,remarkDocz],rehypePlugins=e=>[rehypeDocz(root$2,e.codeSandbox),slug],excludeNodeModules=e=>/node_modules/.test(e),sourceMaps=(e,t)=>{const r=path.resolve(root$2,t.src);e.module.rule("sourcemaps").test(/\.(js|mjs|jsx|ts|tsx|md|mdx)$/).include.add(r).add(root$2).add(docz).end().exclude.add(excludeNodeModules).end().use("sourcemaps").loader(require.resolve("source-map-loader")).end().enforce("pre")},js=(e,t)=>{const r=path.resolve(root$2,t.src);e.module.rule("js").test(/\.(js|mjs|jsx|ts|tsx)$/).include.add(r).add(root$2).add(docz).end().exclude.add(excludeNodeModules).end().use("happypack-jsx").loader("happypack/loader?id=jsx").end()},mdx=(e,t)=>{const{mdPlugins:r,hastPlugins:n}=t,o=path.resolve(root$2,t.src);e.module.rule("mdx").test(/\.(md|markdown|mdx)$/).include.add(o).end().exclude.add(excludeNodeModules).end().use("happypack-mdx").loader("happypack/loader?id=mdx").end().use("mdx-loader").loader(require.resolve("@mdx-js/loader")).options(Object.assign({},config,{mdPlugins:r.concat(remarkPlugins()),hastPlugins:n.concat(rehypePlugins(t))}))},setupHappypack=(e,t,r)=>{const n=HappyPack.ThreadPool({size:6}),o=[!t.debug&&{loader:require.resolve("cache-loader"),options:{cacheDirectory:cache}},{loader:require.resolve("babel-loader"),options:r}],i=[t.propsParser&&t.typescript&&{loader:require.resolve("react-docgen-typescript-loader"),options:{propFilter:e=>null==e.parent||!e.parent.fileName.includes("node_modules")}}];e.plugin("happypack-jsx").use(HappyPack,[{id:"jsx",verbose:t.debug,threadPool:n,loaders:o.concat(i).filter(Boolean)}]),e.plugin("happypack-mdx").use(HappyPack,[{id:"mdx",verbose:t.debug,threadPool:n,loaders:o.filter(Boolean)}])},INLINE_LIMIT=1e4,images=e=>{e.module.rule("images").test(/\.(png|jpe?g|gif)(\?.*)?$/).use("url-loader").loader(require.resolve("url-loader")).options({limit:1e4,name:"static/img/[name].[hash:8].[ext]"})},svg=e=>{e.module.rule("svg").test(/\.(svg)(\?.*)?$/).use("file-loader").loader(require.resolve("file-loader")).options({name:"static/img/[name].[hash:8].[ext]"})},media=e=>{e.module.rule("media").test(/\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/).use("url-loader").loader(require.resolve("url-loader")).options({limit:1e4,name:"static/media/[name].[hash:8].[ext]"})},fonts=e=>{e.module.rule("fonts").test(/\.(woff2?|eot|ttf|otf)(\?.*)?$/i).use("url-loader").loader(require.resolve("url-loader")).options({limit:1e4,name:"static/fonts/[name].[hash:8].[ext]"})},populateNodePath=()=>{envDotProp.set("node.path",envDotProp.get("node.path","").split(path.delimiter).filter(e=>e&&!path.isAbsolute(e)).map(e=>path.resolve(root$2,e)).join(path.delimiter))},configDotEnv=()=>{const e=envDotProp.get("node.env"),t=resolveApp(".env");[`${t}.${e}.local`,`${t}.${e}`,"test"!==e&&`${t}.local`,t].filter(Boolean).forEach(e=>{require("dotenv").config({path:e})})},setEnv=e=>{envDotProp.set("babel.env",e),envDotProp.set("node.env",e),configDotEnv(),envDotProp.set("node.path",envDotProp.get("node.path","").split(path.delimiter).filter(e=>e&&!path.isAbsolute(e)).map(e=>path.resolve(root$2,e)).join(path.delimiter))},getClientEnvironment=e=>{const t=/^(REACT_APP_)|(ANGULAR_APP_)|(VUE_APP_)|(DOCZ_)/i,r=Object.keys(process.env).filter(e=>t.test(e)).reduce((e,t)=>(e[t]=process.env[t],e),{NODE_ENV:envDotProp.get("node.env")||"development",PUBLIC_URL:e}),n={"process.env":Object.keys(r).reduce((e,t)=>(e[t]=JSON.stringify(r[t]),e),{})};return{raw:r,stringified:n}},wrapItems=e=>Object.keys(e).map(t=>`${t}="${e[t]}"`).join(" "),generateTags=e=>(t=[])=>t.map(e).join(""),generateMetaTags=generateTags(e=>`<meta ${wrapItems(e)}>`),generateLinkTags=generateTags(e=>`<link ${wrapItems(e)}>`),generateScriptTags=generateTags(e=>`<script ${wrapItems(e)}><\/script>`),generateRawTags=(e=[])=>"string"==typeof e||e instanceof String?e:e.map(e=>e).join(""),getHtmlFilepath=e=>e?path.resolve(root$2,e):fromTemplates("index.tpl.html"),getPublicUrl=(e,t)=>{const r="/"===e.base?"":e.base;return t?r:`${r}/public`},emptyLineTrim=new ctags.TemplateTag(ctags.replaceResultTransformer(/^\s*[\r\n]/gm,""),ctags.trimResultTransformer),htmlTemplate=async e=>compiled(getHtmlFilepath(e),{minimize:!1,escape:!1}),parseHtml=({config:e,ctx:t,dev:r,template:n})=>{const{title:o,description:i}=e,{publicPath:a,css:s,js:u,lang:c="en",favicon:l,head:p=[],body:f=[],trimWhitespace:d}=t,h=`\n ${l?`<link rel="icon" type="image/x-icon" href="${l}">`:""}\n ${p.meta?generateMetaTags(p.meta):""}\n ${p.links?generateLinkTags(p.links):""}\n ${p.raw?generateRawTags(p.raw):""}\n ${p.scripts?generateScriptTags(p.scripts):""}\n ${miniHtmlWebpack.generateCSSReferences(s,a)}`,g=`\n ${f.raw?generateRawTags(f.raw):""}\n ${f.scripts?generateScriptTags(f.scripts):""}\n ${miniHtmlWebpack.generateJSReferences(u,a)}`,m=ctags.html(n({title:o,description:i,lang:c,head:h,footer:g,publicUrl:getPublicUrl(e,r)}));return d?ctags.oneLineTrim(m):emptyLineTrim(m)},assets=(e,t,r)=>{const n="production"===r,o=servedPath(t.base),i=n?o:"/";e.plugin("assets-plugin").use(manifestPlugin,[{publicPath:i,fileName:"assets.json"}])},analyzer=e=>{e.plugin("bundle-analyzer").use(webpackBundleAnalyzer.BundleAnalyzerPlugin,[{generateStatsFile:!0,openAnalyzer:!1}])},friendlyErrors=(e,{host:t,port:r})=>{const n="127.0.0.1"===t||"0.0.0.0"===t?"localhost":t;e.plugin("friendly-errors").use(friendlyErrorsPlugin,[{compilationSuccessInfo:{messages:[`Your application is running at http://${n}:${r}`]}}])},injections=(e,t,r)=>{const{stringify:n}=JSON,o=servedPath(t.base),i=require("webpack/lib/DefinePlugin"),a=`ws://${t.websocketHost}:${t.websocketPort}`,s="production"!==r;e.plugin("injections").use(i,[Object.assign({},getClientEnvironment(o).stringified,{NODE_ENV:n(r),DOCZ_BASE_URL:n(t.hashRouter?"/":o),DOCZ_WEBSOCKET_URL:n(s&&a),DOCZ_HASH_ROUTER:n(t.hashRouter||!1)})])},ignore=e=>{e.plugin("ignore-plugin").use(webpack.IgnorePlugin,[/(regenerate\-unicode\-properties)|(elliptic)/,/node_modules/])},hot=e=>{e.plugin("hot-module-replacement").use(webpack.HotModuleReplacementPlugin,[])},html=async(e,t,r)=>{const n="production"!==r,o=await htmlTemplate(t.indexHtml);e.plugin("html-plugin").use(miniHtmlWebpack__default,[{context:Object.assign({},t.htmlContext,{trimWhitespace:!0}),template:e=>{const r=parseHtml({ctx:e,dev:n,template:o,config:t});return n?r:htmlMinifier.minify(r,{removeComments:!0,collapseWhitespace:!0,removeRedundantAttributes:!0,useShortDoctype:!0,removeEmptyAttributes:!0,removeStyleLinkTypeAttributes:!0,keepClosingSlash:!0,minifyJS:!0,minifyCSS:!0,minifyURLs:!0})}}])},webpackBar=e=>{e.plugin("webpackbar").use(webpackBarPlugin,[{color:"#41b883",compiledIn:!1,name:"Client"}])},minifier=(e,t)=>{e.optimization.minimizer("js").use(TerserPlugin,[{terserOptions:{parse:{ecma:8},compress:{ecma:5,warnings:!1,comparisons:!1},mangle:{safari10:!0},output:{ecma:5,comments:!1,ascii_only:!0}},parallel:!0,cache:!t.debug,sourceMap:t.sourcemaps}])},createConfig=(e,t)=>async(r,n)=>{const{debug:o}=e,i=new Config,a="production"===t,s=servedPath(e.base),u=getDist(e.dest),c=path.resolve(root$2,e.src),l=a?s:"/";i.context(root$2),i.set("mode",t),i.when(a,e=>e.devtool("source-map"),e=>e.devtool("cheap-module-eval-source-map")),i.node.merge({child_process:"empty",dgram:"empty",fs:"empty",net:"empty",tls:"empty"});return i.output.pathinfo(!0).path(path.resolve(root$2,u)).publicPath(l).when(a,e=>e.filename("static/js/[name].[hash].js").sourceMapFilename("static/js/[name].[hash].js.map").chunkFilename("static/js/[name].[chunkhash:8].js"),e=>e.filename("static/js/[name].js").sourceMapFilename("static/js/[name].js.map")).crossOriginLoading("anonymous"),i.entry("app").add(require.resolve("react-dev-utils/webpackHotDevClient")).add(require.resolve("@babel/polyfill")).add(indexJs),i.resolve.set("symlinks",!0),i.resolve.extensions.add(".web.js").add(".mjs").add(".js").add(".json").add(".web.jsx").add(".jsx").add(".mdx").end(),e.typescript&&i.resolve.extensions.prepend(".ts").prepend(".tsx").end(),i.resolve.alias.set("~db",db),i.resolve.alias.set("~imports",importsJs),i.resolve.alias.set("react-native$","react-native-web"),i.resolve.modules.add(ownNodeModules).add(appNodeModules).add("node_modules").add(c).add(root$2).merge(envDotProp.get("node.path").split(path.delimiter).filter(Boolean)),i.resolveLoader.set("symlinks",!0).modules.add(ownNodeModules).add(appNodeModules).add("node_modules").add(root$2),i.when(e.sourcemaps,t=>sourceMaps(t,e)),js(i,e),mdx(i,e),images(i),svg(i),media(i),fonts(i),setupHappypack(i,e,r),await html(i,e,t),assets(i,e,t),ignore(i),injections(i,e,t),hot(i),i.when(o,e=>analyzer(e)),i.when(!o&&!a,t=>{webpackBar(t),friendlyErrors(t,e)}),i.optimization.runtimeChunk(!0).nodeEnv(t).namedModules(!0).minimize(a).splitChunks({cacheGroups:{vendor:{test:/[\\\/]node_modules[\\\/]/,name:"vendors",chunks:"all"}}}),i.performance.hints(!1),i.when(a,t=>minifier(t,e)),n.onCreateWebpackChain(i,!a,e),e.onCreateWebpackChain(i,!a,e),i.toConfig()},devServerConfig=(e,t)=>{const r=path.resolve(root$2,t.src),n=path.resolve(root$2,t.public),o=path.join(root$2,n),i=path.resolve(__dirname,"non-existent");return{publicPath:"/",compress:!0,logLevel:t.debug?"debug":"silent",clientLogLevel:t.debug?"info":"none",contentBase:[i],watchContentBase:!0,hot:!0,quiet:!t.debug,open:!0,watchOptions:{ignored:ignoredFiles(r)},overlay:!1,host:t.host,port:t.port,historyApiFallback:{disableDotRule:!0},before(t,r){t.use(evalSourceMapMiddleware(r)),t.use(errorOverlayMiddleware()),t.use("/public",express.static(o)),e.onPreCreateApp(t)},after(t){e.onCreateApp(t)}}},server=e=>async(t,r)=>{const n=fs.existsSync(appYarnLock),o="true"===process.env.HTTPS?"https":"http",i=require(appPackageJson).name,a=serverUtils.prepareUrls(o,e.host,e.port),s=devServerConfig(r,e),u=serverUtils.createCompiler(require("webpack"),t,i,a,n);return{start:async()=>{const t=new WebpackDevServer(u,s);return t.listen(e.port,e.host,e=>{if(e)return console.log(e);r.onServerListening(t)}),t}}},CACHE_DIR=path.join(cache,".progress-estimator"),promiseLogger=async(...e)=>(await fs$1.ensureDir(CACHE_DIR),createLogger({storagePath:path.join(cache,".progress-estimator")})(...e)),{measureFileSizesBeforeBuild:measureFileSizesBeforeBuild,printFileSizesAfterBuild:printFileSizesAfterBuild}=FSR,WARN_AFTER_BUNDLE_GZIP_SIZE=524288,WARN_AFTER_CHUNK_GZIP_SIZE=1048576,hasCiEnvVar=()=>envDotProp.get("ci",!1,{parse:!0}),copyPublicFolder=async(e,t)=>{await fs$1.pathExists(t)&&await fs$1.copy(t,distPublic(e),{dereference:!0,filter:e=>e!==indexHtml})},compile=e=>new Promise((t,r)=>{let n;try{n=webpack__default(e)}catch(e){onError(e)}n&&n.run((e,n)=>{e&&r(e),t(n)})}),builder=async(e,t)=>new Promise(async(r,n)=>{try{const o=await compile(e),i=formatWebpackMessages(o.toJson({},!0));return i.errors.length?n(Error(i.errors.join("\n\n"))):hasCiEnvVar()&&i.warnings.length?(logger.warn("\nTreating warnings as errors because process.env.CI = true.\nMost CI servers set it automatically.\n"),n(Error(i.warnings.join("\n\n")))):r({stats:o,previousFileSizes:t,warnings:i.warnings})}catch(e){n(e)}}),onSuccess=(e,{stats:t,previousFileSizes:r,warnings:n})=>{n.length&&(logger.log(),logger.warn("Compiled with warnings.\n"),logger.warn(n.join("\n\n")),logger.warn("\nSearch for the "+chalk.underline(chalk.yellow("keywords"))+" to learn more about each warning."),logger.warn("To ignore, add "+chalk.cyan("// eslint-disable-next-line")+" to the line before.\n")),logger.log(),logger.log("File sizes after gzip:\n"),printFileSizesAfterBuild(t,r,e,524288,1048576),logger.log()},onError=e=>{logger.log(),logger.fatal(chalk.red("Failed to compile.\n")),printBuildError(e),process.exit(1),logger.log()},build=async(e,t,r)=>{try{await fs$1.ensureDir(t);const n=await measureFileSizesBeforeBuild(t);await fs$1.emptyDir(t),await copyPublicFolder(t,r);const o=await promiseLogger(builder(e,n),"Creating production build");onSuccess(t,o)}catch(e){onError(e)}},bundler=(e,t)=>new Bundler({args:e,build:build,config:createConfig(e,t),server:server(e)}),toOmit=["_","$0","version","help"],htmlContext={lang:"en",favicon:"https://cdn-std.dprcdn.net/files/acc_649651/LUKiMl"},loadConfig=async e=>{const t=Object.assign({},e,{htmlContext:htmlContext,plugins:[],mdPlugins:[],hastPlugins:[],menu:[],ignore:["readme.md","changelog.md","code_of_conduct.md","contributing.md","license.md"],themeConfig:{},modifyBundlerConfig:e=>e,modifyBabelRc:e=>e,onCreateWebpackChain:()=>null}),r=e.config?loadCfg.loadFrom(path.resolve(e.config),t):loadCfg.load("docz",t),n=Plugin.reduceFromPluginsAsync(r.plugins);return omit(toOmit,await n("setConfig",Object.assign({},r,{paths:paths})))};process.setMaxListeners(1/0);const dev=async e=>{const t=envDotProp.get("node.env"),r=await loadConfig(e),n=await detectPort(r.port),o=await detectPort(r.websocketPort),i=Object.assign({},r,{websocketPort:o,port:n}),a=bundler(i,t),s=new Entries(r),u=await a.mountConfig(t),c=await promiseLogger(a.createApp(u),"Creating app...");try{await promiseLogger(Entries.writeApp(i,!0),"Parsing mdx files")}catch(e){logger.fatal("Failed to build your files:",e),process.exit(1)}const l=await promiseLogger(c.start(),"Starting your server"),p=new DataServer(l.listeningApp,o,r.websocketHost);p.register([state$1(i),state(s,i)]);try{await promiseLogger(p.init(),"Initializing data server"),await p.listen()}catch(e){logger.fatal("Failed to process your server:",e),await p.close(),process.exit(1)}onSignal(async()=>{await p.close(),l.close()}),l.listeningApp.on("close",async()=>{await p.close()})},build$1=async e=>{const t=envDotProp.get("node.env"),r=await loadConfig(e),n=new Entries(r),o=bundler(r,t),i=await o.mountConfig(t),a=Plugin.runPluginsMethod(r.plugins),s=new DataServer;s.register([state$1(r),state(n,r)]);try{await promiseLogger(Entries.writeApp(r,!0),"Parsing mdx files"),await promiseLogger(s.init(),"Initializing data server"),await promiseLogger(a("onPreBuild",r),"Running onPreBuild()"),await o.build(i),await promiseLogger(a("onPostBuild",r),"Running onPostBuild()"),await s.close()}catch(e){logger.fatal(e),process.exit(1)}};var index$1=Object.freeze({dev:dev,build:build$1});const getEnv=(e,t=null)=>envDotProp.get(e,t,{parse:!0}),removeScope=e=>e.replace(/^@.*\//,""),getInitialTitle=e=>{const t=get_1(e,"name")||"MyDoc";return titleize(humanize(removeScope(t)))},getInitialDescription=e=>get_1(e,"description")||"My awesome app using docz",args=e=>t=>{const r=fs$1.readJsonSync(appPackageJson,{throws:!1});setEnv(e),t.positional("base",{type:"string",default:getEnv("docz.base","/")}),t.positional("source",{alias:"src",type:"string",default:getEnv("docz.source","./")}),t.positional("files",{type:"string",default:getEnv("docz.files","**/*.mdx")}),t.positional("ignore",{type:"array",default:getEnv("docz.ignore",[])}),t.positional("public",{type:"string",default:getEnv("docz.public","/public")}),t.positional("dest",{alias:"d",type:"string",default:getEnv("docz.dest",".docz/dist")}),t.positional("editBranch",{alias:"eb",type:"string",default:getEnv("docz.edit.branch","master")}),t.positional("config",{type:"string",default:getEnv("docz.config","")}),t.positional("title",{type:"string",default:getEnv("docz.title",getInitialTitle(r))}),t.positional("description",{type:"string",default:getEnv("docz.description",getInitialDescription(r))}),t.positional("theme",{type:"string",default:getEnv("docz.theme","docz-theme-default")}),t.positional("typescript",{alias:"ts",type:"boolean",default:getEnv("docz.typescript",!1)}),t.positional("propsParser",{type:"boolean",default:getEnv("docz.props.parser",!0)}),t.positional("wrapper",{type:"string",default:getEnv("docz.wrapper",null)}),t.positional("indexHtml",{type:"string",default:getEnv("docz.index.html",null)}),t.positional("ordering",{type:"string",default:getEnv("docz.ordering","descending")}),t.positional("debug",{type:"boolean",default:getEnv("docz.debug",!1)}),t.positional("host",{type:"string",default:getEnv("docz.host","127.0.0.1")}),t.positional("port",{alias:"p",type:"number",default:getEnv("docz.port",3e3)}),t.positional("websocketHost",{type:"string",default:getEnv("docz.websocket.host","127.0.0.1")}),t.positional("websocketPort",{type:"number",default:getEnv("docz.websocket.port",60505)}),t.positional("hahRouter",{type:"boolean",default:getEnv("docz.hash.router",!1)}),t.positional("native",{type:"boolean",default:getEnv("docz.native",!1)}),t.positional("codeSandbox",{type:"boolean",default:getEnv("docz.codeSandbox",!0)}),t.positional("sourcemaps",{type:"boolean",default:getEnv("docz.sourcemaps",!0)})};exports.commands=index$1,exports.args=args,exports.setEnv=setEnv,exports.Plugin=Plugin,exports.createPlugin=createPlugin;