UNPKG

110 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 path=require("path"),path__default=_interopDefault(path),fs=require("fs"),fs__default=_interopDefault(fs),remarkParse=_interopDefault(require("remark-parse")),matter=_interopDefault(require("remark-frontmatter")),humanize=_interopDefault(require("humanize-string")),get=_interopDefault(require("lodash.get")),resolve=_interopDefault(require("resolve")),fs$1=require("fs-extra"),artTemplate=require("art-template"),doczUtils=require("docz-utils"),crypto=require("crypto"),slugify=_interopDefault(require("@sindresorhus/slugify")),getPkgRepo=_interopDefault(require("get-pkg-repo")),findup=_interopDefault(require("find-up")),glob=_interopDefault(require("fast-glob")),chokidar=_interopDefault(require("chokidar")),equal=_interopDefault(require("fast-deep-equal")),loadCfg=require("load-cfg"),WS=_interopDefault(require("ws")),merge=_interopDefault(require("deepmerge")),logger=_interopDefault(require("signale")),slug=_interopDefault(require("rehype-slug")),remarkDocz=_interopDefault(require("remark-docz")),rehypeDocz=_interopDefault(require("rehype-docz")),HappyPack=_interopDefault(require("happypack")),envDotProp=_interopDefault(require("env-dot-prop")),ctags=require("common-tags"),miniHtmlWebpack=require("mini-html-webpack-plugin"),miniHtmlWebpack__default=_interopDefault(miniHtmlWebpack),webpackBarPlugin=_interopDefault(require("webpackbar")),Config=_interopDefault(require("webpack-chain")),htmlMinifier=require("html-minifier"),friendlyErrors=_interopDefault(require("friendly-errors-webpack-plugin")),manifestPlugin=_interopDefault(require("webpack-manifest-plugin")),TerserPlugin=_interopDefault(require("terser-webpack-plugin")),mount=_interopDefault(require("koa-mount")),range=_interopDefault(require("koa-range")),convert=_interopDefault(require("koa-connect")),serveStatic=_interopDefault(require("koa-static")),history=_interopDefault(require("connect-history-api-fallback")),serveWaitpage=_interopDefault(require("webpack-serve-waitpage")),serve=_interopDefault(require("webpack-serve")),chalk=_interopDefault(require("chalk")),webpack=_interopDefault(require("webpack")),FSR=_interopDefault(require("react-dev-utils/FileSizeReporter")),formatWebpackMessages=_interopDefault(require("react-dev-utils/formatWebpackMessages")),printBuildError=_interopDefault(require("react-dev-utils/printBuildError")),detectPort=_interopDefault(require("detect-port")),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$1(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$1(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$1(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]",D="[object Object]",v="[object RegExp]",_="[object Set]",E="[object String]",b="[object Symbol]",w="[object WeakMap]",A="[object ArrayBuffer]",C="[object DataView]",S="[object Float32Array]",O="[object Float64Array]",F="[object Int8Array]",P="[object Int16Array]",T="[object Int32Array]",j="[object Uint8Array]",k="[object Uint8ClampedArray]",x="[object Uint16Array]",L="[object Uint32Array]",N=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,I=/^\w*$/,R=/^\./,$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,M=/\\(\\)?/g,B=/\w*$/,H=/^\[object .+?Constructor\]$/,U=/^(?:0|[1-9]\d*)$/,Y={};Y[S]=Y[O]=Y[F]=Y[P]=Y[T]=Y[j]=Y[k]=Y[x]=Y[L]=!0,Y[c]=Y[l]=Y[A]=Y[p]=Y[C]=Y[f]=Y[d]=Y[h]=Y[m]=Y[y]=Y[D]=Y[v]=Y[_]=Y[E]=Y[w]=!1;var q={};q[c]=q[l]=q[A]=q[C]=q[p]=q[f]=q[S]=q[O]=q[F]=q[P]=q[T]=q[m]=q[y]=q[D]=q[v]=q[_]=q[E]=q[b]=q[j]=q[k]=q[x]=q[L]=!0,q[d]=q[h]=q[w]=!1;var z="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,W="object"==typeof self&&self&&self.Object===Object&&self,G=z||W||Function("return this")(),J=t&&!t.nodeType&&t,K=J&&e&&!e.nodeType&&e,V=K&&K.exports===J,X=V&&z.process,Q=function(){try{return X&&X.binding("util")}catch(e){}}(),Z=Q&&Q.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=G["__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.*?")+"$"),De=V?G.Buffer:void 0,ve=G.Symbol,_e=G.Uint8Array,Ee=ae(Object.getPrototypeOf,Object),be=Object.create,we=pe.propertyIsEnumerable,Ae=ce.splice,Ce=Object.getOwnPropertySymbols,Se=De?De.isBuffer:void 0,Oe=ae(Object.keys,Object),Fe=st(G,"DataView"),Pe=st(G,"Map"),Te=st(G,"Promise"),je=st(G,"Set"),ke=st(G,"WeakMap"),xe=st(Object,"create"),Le=yt(Fe),Ne=yt(Pe),Ie=yt(Te),Re=yt(je),$e=yt(ke),Me=ve?ve.prototype:void 0,Be=Me?Me.valueOf:void 0,He=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 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.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.__data__=new qe;++t<r;)this.add(e[t])}function We(e){this.__data__=new Ye(e)}function Ge(e,t){var r=Et(e)||_t(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 Je(e,t,r){var n=e[t];ge.call(e,t)&&vt(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function Ke(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(!St(e))return e;var u=Et(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(wt(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==D||l==c||d&&!i){if(oe(e))return i?e:{};if(s=function(e){return"function"!=typeof e.constructor||ft(e)?{}:(t=Ee(e),St(t)?be(t):{});var t}(d?{}:e),!t)return function(e,t){return ot(e,ut(e),t)}(e,function(e,t){return e&&ot(t,jt(t),e)}(s,e))}else{if(!q[l])return i?e:{};s=function(e,t,r,n){var o=e.constructor;switch(t){case A:return nt(e);case p:case f:return new o(+e);case C:return function(e,t){var r=t?nt(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,n);case S:case O:case F:case P:case T:case j:case k:case x:case L: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 E:return new o(e);case v:return(s=new(a=e).constructor(a.source,B.exec(a))).lastIndex=a.lastIndex,s;case _:return function(e,t,r){return re(t?r(se(e),!0):se(e),te,new e.constructor)}(e,n,r);case b:return i=e,Be?Object(Be.call(i)):{}}var i;var a,s}(e,l,Ve,t)}}a||(a=new We);var w=a.get(e);if(w)return w;if(a.set(e,s),!u)var N=r?function(e){return function(e,t,r){var n=t(e);return Et(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,jt,ut)}(e):jt(e);return function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););}(N||e,function(o,i){N&&(o=e[i=o]),Je(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 Qe(e,t){return null!=e&&t in Object(e)}function Ze(e,t,r,n,o){return e===t||(null==e||null==t||!St(e)&&!Ot(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var u=Et(e),h=Et(t),g=l,w=l;u||(g=(g=ct(e))==c?D:g);h||(w=(w=ct(t))==c?D:w);var S=g==D&&!oe(e),O=w==D&&!oe(t),F=g==w;if(F&&!S)return s||(s=new We),u||Tt(e)?it(e,t,r,n,o,s):function(e,t,r,n,o,s,u){switch(r){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case A:return!(e.byteLength!=t.byteLength||!n(new _e(e),new _e(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 E:return e==t+"";case m:var c=ie;case _: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 b:if(Be)return Be.call(e)==Be.call(t)}return!1}(e,t,g,r,n,o,s);if(!(o&a)){var P=S&&ge.call(e,"__wrapped__"),T=O&&ge.call(t,"__wrapped__");if(P||T){var j=P?e.value():e,k=T?t.value():t;return s||(s=new We),r(j,k,n,o,s)}}if(!F)return!1;return s||(s=new We),function(e,t,r,n,o,i){var s=o&a,u=jt(e),c=u.length,l=jt(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 D=s?n(y,m,f,t,e,i):n(m,y,f,e,t,i);if(!(void 0===D?m===y||r(m,y,n,o,i):D)){h=!1;break}g||(g="constructor"==f)}if(h&&!g){var v=e.constructor,_=t.constructor;v!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _)&&(h=!1)}return i.delete(e),i.delete(t),h}(e,t,r,n,o,s)}(e,t,Ze,r,n,o))}function et(e){return!(!St(e)||(t=e,de&&de in t))&&(At(e)||oe(e)?ye:H).test(yt(e));var t}function tt(e){return"function"==typeof e?e:null==e?kt:"object"==typeof e?Et(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)&&Ct(i)&&lt(a,i)&&(Et(e)||_t(e))}(e,t,Qe)}(r,e):Ze(t,n,void 0,i|a)}}(e[0],e[1]):function(e){var t=function(e){var t=jt(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 We;if(n)var h=n(p,f,l,e,t,d);if(!(void 0===h?Ze(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 Et(e)?e:gt(e)}function nt(e){var t=new e.constructor(e.byteLength);return new _e(t).set(new _e(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;Je(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 ze: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__=xe?xe(null):{}},Ue.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ue.prototype.get=function(e){var t=this.__data__;if(xe){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 xe?void 0!==t[e]:ge.call(t,e)},Ue.prototype.set=function(e,t){return this.__data__[e]=xe&&void 0===t?o:t,this},Ye.prototype.clear=function(){this.__data__=[]},Ye.prototype.delete=function(e){var t=this.__data__,r=Ke(t,e);return r>=0&&(r==t.length-1?t.pop():Ae.call(t,r,1),!0)},Ye.prototype.get=function(e){var t=this.__data__,r=Ke(t,e);return 0>r?void 0:t[r][1]},Ye.prototype.has=function(e){return Ke(this.__data__,e)>-1},Ye.prototype.set=function(e,t){var r=this.__data__,n=Ke(r,e);return 0>n?r.push([e,t]):r[n][1]=t,this},qe.prototype.clear=function(){this.__data__={hash:new Ue,map:new(Pe||Ye),string:new Ue}},qe.prototype.delete=function(e){return at(this,e).delete(e)},qe.prototype.get=function(e){return at(this,e).get(e)},qe.prototype.has=function(e){return at(this,e).has(e)},qe.prototype.set=function(e,t){return at(this,e).set(e,t),this},ze.prototype.add=ze.prototype.push=function(e){return this.__data__.set(e,o),this},ze.prototype.has=function(e){return this.__data__.has(e)},We.prototype.clear=function(){this.__data__=new Ye},We.prototype.delete=function(e){return this.__data__.delete(e)},We.prototype.get=function(e){return this.__data__.get(e)},We.prototype.has=function(e){return this.__data__.has(e)},We.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ye){var o=n.__data__;if(!Pe||r-1>o.length)return o.push([e,t]),this;n=this.__data__=new qe(o)}return n.set(e,t),this};var ut=Ce?ae(Ce,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(Et(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!Ft(e))||(I.test(e)||!N.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&&!St(e)}function ht(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}(Fe&&ct(new Fe(new ArrayBuffer(1)))!=C||Pe&&ct(new Pe)!=m||Te&&"[object Promise]"!=ct(Te.resolve())||je&&ct(new je)!=_||ke&&ct(new ke)!=w)&&(ct=function(e){var t=me.call(e),r=t==D?e.constructor:void 0,n=r?yt(r):void 0;if(n)switch(n){case Le:return C;case Ne:return m;case Ie:return"[object Promise]";case Re:return _;case $e:return w}return t});var gt=Dt(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Ft(e))return He?He.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var r=[];return R.test(e)&&r.push(""),e.replace($,function(e,t,n,o){r.push(n?o.replace(M,"$1"):t||e)}),r});function mt(e){if("string"==typeof e||Ft(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 Dt(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(Dt.Cache||qe),r}function vt(e,t){return e===t||e!=e&&t!=t}function _t(e){return function(e){return Ot(e)&&bt(e)}(e)&&ge.call(e,"callee")&&(!we.call(e,"callee")||me.call(e)==c)}Dt.Cache=qe;var Et=Array.isArray;function bt(e){return null!=e&&Ct(e.length)&&!At(e)}var wt=Se||function(){return!1};function At(e){var t=St(e)?me.call(e):"";return t==h||t==g}function Ct(e){return"number"==typeof e&&e>-1&&e%1==0&&u>=e}function St(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ot(e){return!!e&&"object"==typeof e}function Ft(e){return"symbol"==typeof e||Ot(e)&&me.call(e)==b}var Pt,Tt=Z?(Pt=Z,function(e){return Pt(e)}):function(e){return Ot(e)&&Ct(e.length)&&!!Y[me.call(e)]};function jt(e){return bt(e)?Ge(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 kt(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,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(get);const g=e=>e.map(e=>e.children?g(e.children):e.value);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:(e=>{const t=h(e,"children"),r=h(e,"data.id");return Array.isArray(t)?d(g(t)).filter(Boolean).join(" "):f(r)})(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$1=fs.realpathSync(process.cwd()),resolveApp=e=>path.resolve(root$1,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"),ownNodeModules=resolveOwn("node_modules"),getDist=e=>path.join(root$1,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$1,resolveApp:resolveApp,resolveOwn:resolveOwn,templates:templates,packageJson:packageJson,servedPath:servedPath,docz:docz,app:app,cache:cache,appPublic:appPublic,appNodeModules:appNodeModules,appPackageJson:appPackageJson,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$1,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}`}}class Plugin{constructor(e){this.setConfig=e.setConfig,this.modifyBundlerConfig=e.modifyBundlerConfig,this.modifyBabelRc=e.modifyBabelRc,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(n,t);isFn(e)&&e(...r)}}}static propsOfPlugins(e){return t=>e&&e.length>0?e.map(e=>get(e,t)).filter(Boolean):[]}static reduceFromPlugins(e){return(t,r,...n)=>[...e||[]].reduce((e,r)=>{const o=get(r,t);return 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$1,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}},DEFAULT_IGNORE=["readme.md","changelog.md","code_of_conduct.md","contributing.md","license.md"],ignoreFiles=e=>["!**/node_modules/**"].concat(e.length>0?e:DEFAULT_IGNORE),fromTemplates=e=>path.join(templates,e),matchFilesWithSrc=e=>t=>{const r=path.relative(root$1,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")),u=await compiled(fromTemplates("index.tpl.js")),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}=e,o=Array.isArray(r)?r:[r],i=matchFilesWithSrc(e),a=await glob(i(o),{ignore:ignoreFiles(n),onlyFiles:!0,unique:!0,nocase:!0,matchBase:!0}),s=new Map,u=await Promise.all(a.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 u)e&&s.set(e.filepath,e);return this.all=s,mapToObj(s)}}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$1,t.src),n=path.join(r,t.files),o=chokidar.watch(n,{cwd:root$1,ignored:/(((^|[\/\\])\..+)|(node_modules))/,persistent:!0}),i=()=>o.close();return{init:updateEntries(e),close:i,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)}),i}}},getInitialConfig=e=>{const t=fs$1.readJsonSync(appPackageJson,{throws:!1}),r=getRepoUrl();return{title:e.title,description:e.description,themeConfig:e.themeConfig,menu:e.menu,ordering:e.ordering,version:get(t,"version"),repository:r,native:e.native,codeSandbox:e.codeSandbox}},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$1,ignored:/(((^|[\/\\])\..+)|(node_modules))/,persistent:!0}),r=()=>t.close();return{init:updateConfig(e),close:r,update:async n=>{const o=updateConfig(e),i=async()=>o(n);return t.on("add",i),t.on("change",i),t.on("unlink",i),r}}},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.server=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.server&&this.server.on("connection",e=>{const t=this.handleConnection(e);this.server.on("close",async()=>{await t()})})}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)t&&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=loadCfg.load("babel",{presets:[],plugins:[]},!1,!0),o=[[require.resolve("babel-preset-docz"),{flow:!e.typescript,typescript:e.typescript,parseProps:e.propsParser&&!e.typescript}]],i=[[require.resolve("docz-utils/lib/named-asset-import"),{loaderMap:{svg:{ReactComponent:"@svgr/webpack?-prettier,-svgo![path]"}}}]],a=merge(n,{presets:o,cacheDirectory:!e.debug,babelrc:!1,plugins:i.concat(r?[]:[require.resolve("react-hot-loader/babel")])}),s=Plugin.reduceFromPlugins(e.plugins)("modifyBabelRc",a,e);return e.modifyBabelRc(s,e)};class Bundler{constructor(e){const{args:t,config:r,server:n,build:o}=e;this.args=t,this.config=r,this.server=n,this.builder=o}async getConfig(e){const t=await getBabelConfig(this.args,e),r=this.mountConfig(await this.config(t),e);return this.args.modifyBundlerConfig(r,!this.isProd(e),this.args)}async createServer(e){const t=Plugin.runPluginsMethod(this.args.plugins);return this.server(e,{onCreateApp(e){t("onCreateApp",e)},OnServerListening(e){t("onServerListening",e)}})}async build(e){const t=getDist(this.args.dest);root$1===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)}mountConfig(e,t){const{plugins:r}=this.args;return Plugin.reduceFromPlugins(r)("modifyBundlerConfig",e,!this.isProd(t),this.args)}isProd(e){return"production"===e}}const config={type:"yaml",marker:"-"},remarkPlugins=()=>[matter,remarkDocz],rehypePlugins=e=>[rehypeDocz(root$1,e.codeSandbox),slug],setupHappypack=(e,t,r)=>{const n={id:"jsx",verbose:t.debug,loaders:[!t.debug&&{loader:require.resolve("cache-loader"),options:{cacheDirectory:cache}},{loader:require.resolve("babel-loader"),options:r}].filter(Boolean)};t.propsParser&&t.typescript&&n.loaders.push({loader:require.resolve("react-docgen-typescript-loader")});const o={id:"mdx",verbose:t.debug,loaders:[!t.debug&&{loader:require.resolve("cache-loader"),options:{cacheDirectory:cache}},{loader:require.resolve("babel-loader"),options:r}].filter(Boolean)};e.plugin("happypack-jsx").use(HappyPack,[n]),e.plugin("happypack-mdx").use(HappyPack,[o])},js=(e,t)=>{const r=path.resolve(root$1,t.src);e.module.rule("js").test(/\.(js|jsx|mjs)$/).include.add(r).add(root$1).add(docz).end().exclude.add(/node_modules/).end().use("happypack-jsx").loader("happypack/loader?id=jsx")},ts=(e,t)=>{const r=path.resolve(root$1,t.src);e.module.rule("ts").test(/\.(ts|tsx)$/).include.add(r).add(root$1).end().exclude.add(/node_modules/).end().use("happypack-jsx").loader("happypack/loader?id=jsx")},mdx=(e,t)=>{const{mdPlugins:r,hastPlugins:n}=t,o=path.resolve(root$1,t.src);e.module.rule("mdx").test(/\.(md|markdown|mdx)$/).include.add(o).end().exclude.add(/node_modules/).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))}))},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.get("node.path")||"").split(path.delimiter).filter(e=>e&&!path.isAbsolute(e)).map(e=>path.resolve(root$1,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(),populateNodePath()},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,WEBPACK_SERVE_OVERLAY_WS_URL:envDotProp.get("webpack.server.overlay.ws.url")}),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$1,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)},terser=new 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:!0,sourceMap:!0}),createConfig=(e,t)=>async r=>{const{debug:n,host:o,port:i}=e,a=new Config,s="production"===t,u=servedPath(e.base),c=getDist(e.dest),l=path.resolve(root$1,e.src),p=s?u:"/";a.context(root$1),a.set("mode",t),a.when(n,e=>e.devtool("source-map")),a.when(!s,e=>e.devtool("cheap-module-eval-source-map")),a.node.merge({child_process:"empty",dgram:"empty",fs:"empty",net:"empty",tls:"empty"});a.output.pathinfo(!0).path(path.resolve(root$1,c)).publicPath(p).when(s,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"),a.merge({optimization:Object.assign({runtimeChunk:!0,nodeEnv:t,namedModules:!0,noEmitOnErrors:!0,splitChunks:{chunks:"all",name:"vendors"}},s&&{minimize:!0,minimizer:[terser]})}),a.entry("app").add(require.resolve("@babel/polyfill")).add(indexJs),a.resolve.set("symlinks",!0),a.resolve.extensions.add(".web.js").add(".mjs").add(".js").add(".json").add(".web.jsx").add(".jsx").add(".mdx").end(),e.typescript&&a.resolve.extensions.prepend(".ts").prepend(".tsx").end(),a.resolve.modules.add(ownNodeModules).add(appNodeModules).add("node_modules").add(l).add(root$1),a.resolveLoader.set("symlinks",!0).modules.add(ownNodeModules).add(appNodeModules).add("node_modules").add(root$1),js(a,e),mdx(a,e),images(a),svg(a),media(a),fonts(a),e.typescript&&ts(a,e),setupHappypack(a,e,r),a.plugin("assets-plugin").use(manifestPlugin,[{publicPath:p,fileName:"assets.json"}]);const f=!s,d=await htmlTemplate(e.indexHtml);a.plugin("html-plugin").use(miniHtmlWebpack__default,[{context:Object.assign({},e.htmlContext,{trimWhitespace:!0}),template:t=>{const r=parseHtml({ctx:t,dev:f,template:d,config:e});return f?r:htmlMinifier.minify(r,{removeComments:!0,collapseWhitespace:!0,removeRedundantAttributes:!0,useShortDoctype:!0,removeEmptyAttributes:!0,removeStyleLinkTypeAttributes:!0,keepClosingSlash:!0,minifyJS:!0,minifyCSS:!0,minifyURLs:!0})}}]);const h="127.0.0.1"===o||"0.0.0.0"===o?"localhost":o;return a.when(!n&&!s,e=>{e.plugin("webpackbar").use(webpackBarPlugin,[{color:"#41b883",compiledIn:!1,name:"Client"}]),e.plugin("friendly-errors").use(friendlyErrors,[{compilationSuccessInfo:{messages:[`Your application is running at http://${h}:${i}`]}}])}),a.plugin("injections").use(require("webpack/lib/DefinePlugin"),[Object.assign({},getClientEnvironment(u).stringified,{BASE_URL:JSON.stringify(e.hashRouter?"/":u),NODE_ENV:JSON.stringify(t)})]),a.performance.hints(!1),a.toConfig()},devServerConfig=(e,t,r)=>{const n=path.resolve(__dirname,"non-existent"),o=t=>e.debug?"debug":t;return{config:t,host:e.host,port:e.port,content:[n],logLevel:o("error"),devMiddleware:{logLevel:o("silent")},hotClient:{reload:!1,logLevel:o("error"),host:e.hotHost,port:e.hotPort},add:(t,n,o)=>{n.webpack(),n.content(),t.use(range),fs$1.existsSync(appPublic)&&t.use(mount(e.base,serveStatic(appPublic))),t.use(convert(history({rewrites:[{from:/\.html$/,to:"/"}]}))),t.use(serveWaitpage(o,{title:e.title})),r.onCreateApp(t)}}},server=e=>async(t,r)=>{const n=devServerConfig(e,t,r);return{start:async()=>{const e=await serve({},n);return r.OnServerListening(e.app.server),Object.assign({},e,{close:()=>e.app.stop()})}}},{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=>{await fs$1.pathExists(appPublic)&&await fs$1.copySync(appPublic,distPublic(e),{dereference:!0,filter:e=>e!==indexHtml})},compile=e=>new Promise((t,r)=>{let n;try{n=webpack(e)}catch(e){onError(e)}n&&n.run((e,n)=>{e&&r(e),t(n)})}),builder=async(e,t)=>(logger.start("Creating an optimized production build..."),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.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.success(chalk.green("Compiled successfully.\n")),logger.log("File sizes after gzip:\n"),printFileSizesAfterBuild(t,r,e,524288,1048576),logger.log()},onError=e=>{logger.fatal(chalk.red("Failed to compile.\n")),printBuildError(e),process.exit(1)},build=async(e,t)=>{try{await fs$1.ensureDir(t);const r=await measureFileSizesBeforeBuild(t);await fs$1.emptyDir(t),await copyPublicFolder(t);const n=await builder(e,r);onSuccess(t,n)}catch(e){onError(e)}},bundler=(e,t)=>new Bundler({args:e,build:build,config:createConfig(e,t),server:server(e)}),toOmit=["_","$0","version","help"],defaultHtmlContext={lang:"en"},loadConfig=e=>{const t=Object.assign({},e,{hashRouter:!1,native:!1,plugins:[],mdPlugins:[],hastPlugins:[],themeConfig:{},htmlContext:defaultHtmlContext,menu:[],modifyBundlerConfig:e=>e,modifyBabelRc:e=>e}),r=e.config?loadCfg.loadFrom(path.resolve(e.config),t):loadCfg.load("docz",t),n=Plugin.reduceFromPlugins(r.plugins);return omit(toOmit,n("setConfig",Object.assign({},r,{paths:paths})))},dev=async e=>{const t=envDotProp.get("node.env"),r=loadConfig(e),n=await detectPort(r.port),o=await detectPort(r.hotPort),i=await detectPort(r.websocketPort);envDotProp.set("webpack.server.overlay.ws.url",`ws://${r.hotHost}:${o}`);const a=Object.assign({},r,{websocketPort:i,hotPort:o,port:n}),s=bundler(a,t),u=new Entries(r),c=await s.getConfig(t),l=await s.createServer(c),{app:p}=await l.start(),f=new DataServer(p.server,i,r.websocketHost);f.register([state$1(a),state(u,a)]);try{await Entries.writeApp(a,!0),await f.init(),await f.listen()}catch(e){logger.fatal("Failed to process your server:",e),process.exit(1)}},build$1=async e=>{const t=envDotProp.get("node.env"),r=loadConfig(e),n=new Entries(r),o=bundler(r,t),i=Plugin.runPluginsMethod(r.plugins),a=new DataServer;a.register([state$1(r),state(n,r)]);try{await Entries.writeApp(r),await a.init(),await i("onPreBuild",r),await o.build(await o.getConfig(t)),await i("onPostBuild",r),await a.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(e,"name")||"MyDoc";return titleize(humanize(removeScope(t)))},getInitialDescription=e=>get(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("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("hotHost",{type:"string",default:getEnv("docz.hot.host","127.0.0.1")}),t.positional("hotPort",{type:"number",default:getEnv("docz.hot.port",60757)}),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("native",{type:"boolean",default:getEnv("docz.native",!1)}),t.positional("codeSandbox",{type:"boolean",default:getEnv("docz.codeSandbox",!0)})};exports.commands=index$1,exports.args=args,exports.setEnv=setEnv,exports.Plugin=Plugin,exports.createPlugin=createPlugin;