tt-minigame-ide-cli 2.0.12 → 2.0.14
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/miniprogram-utils/src/constants/index.d.ts +15 -0
- package/dist/miniprogram-utils/src/data/app.d.ts +8 -0
- package/dist/miniprogram-utils/src/data/project.d.ts +6 -5
- package/dist/miniprogram-utils/src/electron-monitor/common/share.d.ts +3 -1
- package/dist/tt-ide-cli/src/features/login.d.ts +3 -0
- package/dist/tt-ide-cli/src/features/microgame/unity.d.ts +20 -2
- package/dist/tt-ide-cli/src/features/microgame/utils/file-system.d.ts +7 -0
- package/dist/tt-ide-cli/src/features/open.d.ts +1 -1
- package/dist/tt-ide-cli/src/features/packages.d.ts +2 -1
- package/dist/tt-ide-cli/src/features/preview.d.ts +6 -0
- package/dist/tt-ide-cli/src/index.d.ts +2 -0
- package/dist/tt-ide-cli/src/types.d.ts +1 -0
- package/dist/tt-ide-cli/src/utils/constants.d.ts +22 -0
- package/dist/tt-ide-cli/src/utils/hash.d.ts +2 -1
- package/dist/tt-ide-cli/src/utils/logger.d.ts +1 -1
- package/dist/tt-ide-cli/src/utils/login-storage.d.ts +14 -0
- package/dist/tt-ide-cli/src/utils/qrcode.d.ts +1 -1
- package/dist/tt-ide-cli/src/utils/util.d.ts +16 -0
- package/package.json +2 -2
package/dist/cli.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("chalk"),require("ora"),require("fs-extra"),require("form-data"),require("deep-clone"),require("semver-compare"),require("archiver"),require("easy-table"),require("fast-glob"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("unzipper"),require("inquirer"));else if("function"==typeof define&&define.amd)define(["chalk","ora","fs-extra","form-data","deep-clone","semver-compare","archiver","easy-table","fast-glob","folder-hash","clipboardy","qrcode","qrcode-terminal","unzipper","inquirer"],t);else{var n="object"==typeof exports?t(require("chalk"),require("ora"),require("fs-extra"),require("form-data"),require("deep-clone"),require("semver-compare"),require("archiver"),require("easy-table"),require("fast-glob"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("unzipper"),require("inquirer")):t(e.chalk,e.ora,e["fs-extra"],e["form-data"],e["deep-clone"],e["semver-compare"],e.archiver,e["easy-table"],e["fast-glob"],e["folder-hash"],e.clipboardy,e.qrcode,e["qrcode-terminal"],e.unzipper,e.inquirer);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(global,((__WEBPACK_EXTERNAL_MODULE__1606__,__WEBPACK_EXTERNAL_MODULE__8838__,__WEBPACK_EXTERNAL_MODULE__9849__,__WEBPACK_EXTERNAL_MODULE__9258__,__WEBPACK_EXTERNAL_MODULE__469__,__WEBPACK_EXTERNAL_MODULE__7086__,__WEBPACK_EXTERNAL_MODULE__3732__,__WEBPACK_EXTERNAL_MODULE__6883__,__WEBPACK_EXTERNAL_MODULE__9508__,__WEBPACK_EXTERNAL_MODULE__2896__,__WEBPACK_EXTERNAL_MODULE__1887__,__WEBPACK_EXTERNAL_MODULE__3727__,__WEBPACK_EXTERNAL_MODULE__4563__,__WEBPACK_EXTERNAL_MODULE__2541__,__WEBPACK_EXTERNAL_MODULE__6495__)=>(()=>{var __webpack_modules__={5130:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(7123)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7123:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},445:(e,t,n)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=n(5130):e.exports=n(8414)},8414:(e,t,n)=>{const r=n(6224),o=n(3837);t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(o.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:o}=this;if(o){const t=this.color,o="[3"+(t<8?t:"8;5;"+t),i=` ${o};1m${r} [0m`;n[0]=i+n[0].split("\n").join("\n"+i),n.push(o+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)},t.destroy=o.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(7013);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=n(7123)(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}},5393:(e,t,n)=>{var r;e.exports=function(){if(!r){try{r=n(445)("follow-redirects")}catch(e){}"function"!=typeof r&&(r=function(){})}r.apply(null,arguments)}},4633:(e,t,n)=>{var r,o,i,a=n(7310),s=a.URL,u=n(3685),c=n(5687),l=n(2781).Writable,p=n(9491),d=n(5393);r="undefined"!=typeof process,o="undefined"!=typeof window&&"undefined"!=typeof document,i=N(Error.captureStackTrace),r||!o&&i||console.warn("The follow-redirects package should be excluded from browser builds.");var f=!1;try{p(new s(""))}catch(e){f="ERR_INVALID_URL"===e.code}var h=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],_=["abort","aborted","connect","error","socket","timeout"],v=Object.create(null);_.forEach((function(e){v[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var m=R("ERR_INVALID_URL","Invalid URL",TypeError),E=R("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),g=R("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",E),y=R("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),b=R("ERR_STREAM_WRITE_AFTER_END","write after end"),A=l.prototype.destroy||w;function O(e,t){l.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof E?e:new E({cause:e}))}},this._performRequest()}function C(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var o=r+":",i=n[o]=e[r],a=t[r]=Object.create(i);Object.defineProperties(a,{request:{value:function(e,r,i){return s&&e instanceof s?e=L(e):D(e)?e=L(I(e)):(i=r,r=S(e),e={protocol:o}),N(r)&&(i=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,D(r.host)||D(r.hostname)||(r.hostname="::1"),p.equal(r.protocol,o,"protocol mismatch"),d("options",r),new O(r,i)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=a.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function w(){}function I(e){var t;if(f)t=new s(e);else if(!D((t=S(a.parse(e))).protocol))throw new m({input:e});return t}function S(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new m({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new m({input:e.href||e});return e}function L(e,t){var n=t||{};for(var r of h)n[r]=e[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function P(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function R(e,t,n){function r(n){N(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function T(e,t){for(var n of _)e.removeListener(n,v[n]);e.on("error",w),e.destroy(t)}function D(e){return"string"==typeof e||e instanceof String}function N(e){return"function"==typeof e}O.prototype=Object.create(l.prototype),O.prototype.abort=function(){T(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},O.prototype.destroy=function(e){return T(this._currentRequest,e),A.call(this,e),this},O.prototype.write=function(e,t,n){if(this._ending)throw new b;if(!(D(e)||"object"==typeof(r=e)&&"length"in r))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;N(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new y),this.abort()):n&&n()},O.prototype.end=function(e,t,n){if(N(e)?(n=e,e=t=null):N(t)&&(n=t,t=null),e){var r=this,o=this._currentRequest;this.write(e,t,(function(){r._ended=!0,o.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},O.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},O.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},O.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),i()}),e),r(t)}function i(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",i),n.removeListener("error",i),n.removeListener("response",i),n.removeListener("close",i),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",r),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){O.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(O.prototype,e,{get:function(){return this._currentRequest[e]}})})),O.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},O.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var o of(r._redirectable=this,_))r.on(o,v[o]);if(this._currentUrl=/^\//.test(this._options.path)?a.format(this._options):this._options.path,this._isRedirect){var i=0,s=this,u=this._requestBodyBuffers;!function e(t){if(r===s._currentRequest)if(t)s.emit("error",t);else if(i<u.length){var n=u[i++];r.finished||r.write(n.data,n.encoding,e)}else s._ended&&r.end()}()}},O.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,r=e.headers.location;if(!r||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(T(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new g;var o=this._options.beforeRedirect;o&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var i=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],P(/^content-/i,this._options.headers));var u,c,l=P(/^host$/i,this._options.headers),h=I(this._currentUrl),_=l||h.host,v=/^\w+:/.test(r)?this._currentUrl:a.format(Object.assign(h,{host:_})),m=(u=r,c=v,f?new s(u,c):I(a.resolve(c,u)));if(d("redirecting to",m.href),this._isRedirect=!0,L(m,this._options),(m.protocol!==h.protocol&&"https:"!==m.protocol||m.host!==_&&!function(e,t){p(D(e)&&D(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(m.host,_))&&P(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),N(o)){var E={headers:e.headers,statusCode:t},y={url:v,method:i,headers:n};o(this._options,E,y),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=C({http:u,https:c}),e.exports.wrap=C},8137:e=>{"use strict";e.exports=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return-1!==r&&(-1===o||r<o)}},1378:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,s){s=s||{};var u,c,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===l&&isFinite(e))return s.long?(u=e,(c=Math.abs(u))>=o?a(u,c,o,"day"):c>=r?a(u,c,r,"hour"):c>=n?a(u,c,n,"minute"):c>=t?a(u,c,t,"second"):u+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},8223:function(e,t,n){e.exports=(n(2081),n(6113),function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(34)},function(e,t,n){var r=n(29)("wks"),o=n(33),i=n(2).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(9);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(24)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(12),o=n(17);e.exports=n(4)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(14);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports={}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(3),o=n(26),i=n(32),a=Object.defineProperty;t.f=n(4)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(42),o=n(15);e.exports=function(e){return r(o(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(9),o=n(2).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(12).f,o=n(8),i=n(1)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(29)("keys"),o=n(33);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(11),o=n(1)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(2),o=n(6),i=n(7),a=n(5),s="prototype",u=function(e,t,n){var c,l,p,d=e&u.F,f=e&u.G,h=e&u.S,_=e&u.P,v=e&u.B,m=e&u.W,E=f?o:o[t]||(o[t]={}),g=E[s],y=f?r:h?r[t]:(r[t]||{})[s];for(c in f&&(n=t),n)(l=!d&&y&&void 0!==y[c])&&c in E||(p=l?y[c]:n[c],E[c]=f&&"function"!=typeof y[c]?n[c]:v&&l?i(p,r):m&&y[c]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[s]=e[s],t}(p):_&&"function"==typeof p?i(Function.call,p):p,_&&((E.virtual||(E.virtual={}))[c]=p,e&u.R&&g&&!g[c]&&a(g,c,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){e.exports=n(2).document&&document.documentElement},function(e,t,n){e.exports=!n(4)&&!n(24)((function(){return 7!=Object.defineProperty(n(16)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var r=n(28),o=n(23),i=n(57),a=n(5),s=n(8),u=n(10),c=n(45),l=n(18),p=n(52),d=n(1)("iterator"),f=!([].keys&&"next"in[].keys()),h="keys",_="values",v=function(){return this};e.exports=function(e,t,n,m,E,g,y){c(n,t,m);var b,A,O,C=function(e){if(!f&&e in L)return L[e];switch(e){case h:case _:return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",I=E==_,S=!1,L=e.prototype,P=L[d]||L["@@iterator"]||E&&L[E],R=P||C(E),T=E?I?C("entries"):R:void 0,D="Array"==t&&L.entries||P;if(D&&(O=p(D.call(new e)))!==Object.prototype&&(l(O,w,!0),r||s(O,d)||a(O,d,v)),I&&P&&P.name!==_&&(S=!0,R=function(){return P.call(this)}),r&&!y||!f&&!S&&L[d]||a(L,d,R),u[t]=R,u[w]=v,E)if(b={values:I?R:C(_),keys:g?R:C(h),entries:T},y)for(A in b)A in L||i(L,A,b[A]);else o(o.P+o.F*(f||S),t,b);return b}},function(e,t){e.exports=!0},function(e,t,n){var r=n(2),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,n){var r,o,i,a=n(7),s=n(41),u=n(25),c=n(16),l=n(2),p=l.process,d=l.setImmediate,f=l.clearImmediate,h=l.MessageChannel,_=0,v={},m="onreadystatechange",E=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},g=function(e){E.call(e.data)};d&&f||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++_]=function(){s("function"==typeof e?e:Function(e),t)},r(_),_},f=function(e){delete v[e]},"process"==n(11)(p)?r=function(e){p.nextTick(a(E,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=g,r=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",g,!1)):r=m in c("script")?function(e){u.appendChild(c("script"))[m]=function(){u.removeChild(this),E.call(e)}}:function(e){setTimeout(a(E,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,n){var r=n(20),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(9);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){"use strict";function r(e){return(0,s.createHash)("sha256").update(e).digest("hex")}function o(e){switch(u){case"darwin":return e.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error("Unsupported platform: "+process.platform)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(n(35));t.machineIdSync=function(e){var t=o((0,a.execSync)(c[u]).toString());return e?t:r(t)},t.machineId=function(e){return new i.default((function(t,n){return(0,a.exec)(c[u],{},(function(i,a,s){if(i)return n(new Error("Error while obtaining machine id: "+i.stack));var u=o(a.toString());return t(e?u:r(u))}))}))};var a=n(70),s=n(71),u=process.platform,c={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(e,t,n){e.exports={default:n(36),__esModule:!0}},function(e,t,n){n(66),n(68),n(69),n(67),e.exports=n(6).Promise},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(13),o=n(31),i=n(62);e.exports=function(e){return function(t,n,a){var s,u=r(t),c=o(u.length),l=i(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){var r=n(7),o=n(44),i=n(43),a=n(3),s=n(31),u=n(64),c={},l={};t=e.exports=function(e,t,n,p,d){var f,h,_,v,m=d?function(){return e}:u(e),E=r(n,p,t?2:1),g=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(i(m)){for(f=s(e.length);f>g;g++)if((v=t?E(a(h=e[g])[0],h[1]):E(e[g]))===c||v===l)return v}else for(_=m.call(e);!(h=_.next()).done;)if((v=o(_,E,h.value,t))===c||v===l)return v},t.BREAK=c,t.RETURN=l},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(11);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(10),o=n(1)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(3);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){"use strict";var r=n(49),o=n(17),i=n(18),a={};n(5)(a,n(1)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(1)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(2),o=n(30).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(11)(a);e.exports=function(){var e,t,n,c=function(){var r,o;for(u&&(r=a.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(i){var l=!0,p=document.createTextNode("");new i(c).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}else if(s&&s.resolve){var d=s.resolve();n=function(){d.then(c)}}else n=function(){o.call(r,c)};return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){var r=n(3),o=n(50),i=n(22),a=n(19)("IE_PROTO"),s=function(){},u="prototype",c=function(){var e,t=n(16)("iframe"),r=i.length;for(t.style.display="none",n(25).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c[u][i[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[u]=r(e),n=new s,s[u]=null,n[a]=e):n=c(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(12),o=n(3),i=n(54);e.exports=n(4)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(55),o=n(17),i=n(13),a=n(32),s=n(8),u=n(26),c=Object.getOwnPropertyDescriptor;t.f=n(4)?c:function(e,t){if(e=i(e),t=a(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(8),o=n(63),i=n(19)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(8),o=n(13),i=n(39)(!1),a=n(19)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var r=n(53),o=n(22);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(5);e.exports=function(e,t,n){for(var o in t)n&&e[o]?e[o]=t[o]:r(e,o,t[o]);return e}},function(e,t,n){e.exports=n(5)},function(e,t,n){var r=n(9),o=n(3),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(7)(Function.call,n(51).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(12),a=n(4),s=n(1)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:r[e];a&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(3),o=n(14),i=n(1)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r=n(20),o=n(15);e.exports=function(e){return function(t,n){var i,a,s=String(o(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):i:e?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){var r=n(20),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(15);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(21),o=n(1)("iterator"),i=n(10);e.exports=n(6).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){"use strict";var r=n(37),o=n(47),i=n(10),a=n(13);e.exports=n(27)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){},function(e,t,n){"use strict";var r,o,i,a=n(28),s=n(2),u=n(7),c=n(21),l=n(23),p=n(9),d=(n(3),n(14)),f=n(38),h=n(40),_=(n(58).set,n(60)),v=n(30).set,m=n(48)(),E="Promise",g=s.TypeError,y=s.process,b=s[E],A="process"==c(y=s.process),O=function(){},C=!!function(){try{var e=b.resolve(1),t=(e.constructor={})[n(1)("species")]=function(e){e(O,O)};return(A||"function"==typeof PromiseRejectionEvent)&&e.then(O)instanceof t}catch(e){}}(),w=function(e,t){return e===t||e===b&&t===i},I=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},S=function(e){return w(b,e)?new L(e):new o(e)},L=o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw g("Bad Promise constructor");t=e,n=r})),this.resolve=d(t),this.reject=d(n)},P=function(e){try{e()}catch(e){return{error:e}}},R=function(e,t){if(!e._n){e._n=!0;var n=e._c;m((function(){for(var r=e._v,o=1==e._s,i=0,a=function(t){var n,i,a=o?t.ok:t.fail,s=t.resolve,u=t.reject,c=t.domain;try{a?(o||(2==e._h&&N(e),e._h=1),!0===a?n=r:(c&&c.enter(),n=a(r),c&&c.exit()),n===t.promise?u(g("Promise-chain cycle")):(i=I(n))?i.call(n,s,u):s(n)):u(r)}catch(e){u(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&T(e)}))}},T=function(e){v.call(s,(function(){var t,n,r,o=e._v;if(D(e)&&(t=P((function(){A?y.emit("unhandledRejection",o,e):(n=s.onunhandledrejection)?n({promise:e,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)})),e._h=A||D(e)?2:1),e._a=void 0,t)throw t.error}))},D=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if((t=n[r++]).fail||!D(t.promise))return!1;return!0},N=function(e){v.call(s,(function(){var t;A?y.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})}))},x=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),R(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw g("Promise can't be resolved itself");(t=I(e))?m((function(){var r={_w:n,_d:!1};try{t.call(e,u(j,r,1),u(x,r,1))}catch(e){x.call(r,e)}})):(n._v=e,n._s=1,R(n,!1))}catch(e){x.call({_w:n,_d:!1},e)}}};C||(b=function(e){f(this,b,E,"_h"),d(e),r.call(this);try{e(u(j,this,1),u(x,this,1))}catch(e){x.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(56)(b.prototype,{then:function(e,t){var n=S(_(this,b));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=A?y.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),L=function(){var e=new r;this.promise=e,this.resolve=u(j,e,1),this.reject=u(x,e,1)}),l(l.G+l.W+l.F*!C,{Promise:b}),n(18)(b,E),n(59)(E),i=n(6)[E],l(l.S+l.F*!C,E,{reject:function(e){var t=S(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(a||!C),E,{resolve:function(e){if(e instanceof b&&w(e.constructor,this))return e;var t=S(this);return(0,t.resolve)(e),t.promise}}),l(l.S+l.F*!(C&&n(46)((function(e){b.all(e).catch(O)}))),E,{all:function(e){var t=this,n=S(t),r=n.resolve,o=n.reject,i=P((function(){var n=[],i=0,a=1;h(e,!1,(function(e){var s=i++,u=!1;n.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,n[s]=e,--a||r(n))}),o)})),--a||r(n)}));return i&&o(i.error),n.promise},race:function(e){var t=this,n=S(t),r=n.reject,o=P((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return o&&r(o.error),n.promise}})},function(e,t,n){"use strict";var r=n(61)(!0);n(27)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){n(65);for(var r=n(2),o=n(5),i=n(10),a=n(1)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=s[u],l=r[c],p=l&&l.prototype;p&&!p[a]&&o(p,a,c),i[c]=i.Array}},function(e,t){e.exports=n(2081)},function(e,t){e.exports=n(6113)}]))},4763:(e,t,n)=>{"use strict";e.exports=n(2595)},7411:(e,t,n)=>{"use strict";const r=n(1017),o="\\\\/",i=`[^${o}]`,a="\\.",s="\\/",u="[^/]",c=`(?:${s}|$)`,l=`(?:^|${s})`,p=`${a}{1,2}${c}`,d={DOT_LITERAL:a,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:u,END_ANCHOR:c,DOTS_SLASH:p,NO_DOT:`(?!${a})`,NO_DOTS:`(?!${l}${p})`,NO_DOT_SLASH:`(?!${a}{0,1}${c})`,NO_DOTS_SLASH:`(?!${p})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${u}*?`,START_ANCHOR:l},f={...d,SLASH_LITERAL:`[${o}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${a}{1,2}(?:[${o}]|$)`,NO_DOT:`(?!${a})`,NO_DOTS:`(?!(?:^|[${o}])${a}{1,2}(?:[${o}]|$))`,NO_DOT_SLASH:`(?!${a}{0,1}(?:[${o}]|$))`,NO_DOTS_SLASH:`(?!${a}{1,2}(?:[${o}]|$))`,QMARK_NO_DOT:`[^.${o}]`,START_ANCHOR:`(?:^|[${o}])`,END_ANCHOR:`(?:[${o}]|$)`};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:r.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?f:d}},2902:(e,t,n)=>{"use strict";const r=n(7411),o=n(3338),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:u,REPLACEMENTS:c}=r,l=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const n=`[${e.join("-")}]`;try{new RegExp(n)}catch(t){return e.map((e=>o.escapeRegex(e))).join("..")}return n},p=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=c[e]||e;const n={...t},f="number"==typeof n.maxLength?Math.min(i,n.maxLength):i;let h=e.length;if(h>f)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${f}`);const _={type:"bos",value:"",output:n.prepend||""},v=[_],m=n.capture?"":"?:",E=o.isWindows(t),g=r.globChars(E),y=r.extglobChars(g),{DOT_LITERAL:b,PLUS_LITERAL:A,SLASH_LITERAL:O,ONE_CHAR:C,DOTS_SLASH:w,NO_DOT:I,NO_DOT_SLASH:S,NO_DOTS_SLASH:L,QMARK:P,QMARK_NO_DOT:R,STAR:T,START_ANCHOR:D}=g,N=e=>`(${m}(?:(?!${D}${e.dot?w:b}).)*?)`,x=n.dot?"":I,j=n.dot?P:R;let M=!0===n.bash?N(n):T;n.capture&&(M=`(${M})`),"boolean"==typeof n.noext&&(n.noextglob=n.noext);const k={input:e,index:-1,start:0,dot:!0===n.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:v};e=o.removePrefix(e,k),h=e.length;const U=[],F=[],G=[];let B,H=_;const V=()=>k.index===h-1,Z=k.peek=(t=1)=>e[k.index+t],W=k.advance=()=>e[++k.index]||"",q=()=>e.slice(k.index+1),$=(e="",t=0)=>{k.consumed+=e,k.index+=t},z=e=>{k.output+=null!=e.output?e.output:e.value,$(e.value)},K=()=>{let e=1;for(;"!"===Z()&&("("!==Z(2)||"?"===Z(3));)W(),k.start++,e++;return e%2!=0&&(k.negated=!0,k.start++,!0)},J=e=>{k[e]++,G.push(e)},X=e=>{k[e]--,G.pop()},Y=e=>{if("globstar"===H.type){const t=k.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||U.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(k.output=k.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=M,k.output+=H.output)}if(U.length&&"paren"!==e.type&&(U[U.length-1].inner+=e.value),(e.value||e.output)&&z(e),H&&"text"===H.type&&"text"===e.type)return H.value+=e.value,void(H.output=(H.output||"")+e.value);e.prev=H,v.push(e),H=e},Q=(e,t)=>{const r={...y[t],conditions:1,inner:""};r.prev=H,r.parens=k.parens,r.output=k.output;const o=(n.capture?"(":"")+r.open;J("parens"),Y({type:e,value:t,output:k.output?"":C}),Y({type:"paren",extglob:!0,value:W(),output:o}),U.push(r)},ee=e=>{let r,o=e.close+(n.capture?")":"");if("negate"===e.type){let i=M;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(i=N(n)),(i!==M||V()||/^\)+$/.test(q()))&&(o=e.close=`)$))${i}`),e.inner.includes("*")&&(r=q())&&/^\.[^\\/.]+$/.test(r)){const n=d(r,{...t,fastpaths:!1}).output;o=e.close=`)${n})${i})`}"bos"===e.prev.type&&(k.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:B,output:o}),X("parens")};if(!1!==n.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let r=!1,i=e.replace(u,((e,t,n,o,i,a)=>"\\"===o?(r=!0,e):"?"===o?t?t+o+(i?P.repeat(i.length):""):0===a?j+(i?P.repeat(i.length):""):P.repeat(n.length):"."===o?b.repeat(n.length):"*"===o?t?t+o+(i?M:""):M:t?e:`\\${e}`));return!0===r&&(i=!0===n.unescape?i.replace(/\\/g,""):i.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),i===e&&!0===n.contains?(k.output=e,k):(k.output=o.wrapOutput(i,k,t),k)}for(;!V();){if(B=W(),"\0"===B)continue;if("\\"===B){const e=Z();if("/"===e&&!0!==n.bash)continue;if("."===e||";"===e)continue;if(!e){B+="\\",Y({type:"text",value:B});continue}const t=/^\\+/.exec(q());let r=0;if(t&&t[0].length>2&&(r=t[0].length,k.index+=r,r%2!=0&&(B+="\\")),!0===n.unescape?B=W():B+=W(),0===k.brackets){Y({type:"text",value:B});continue}}if(k.brackets>0&&("]"!==B||"["===H.value||"[^"===H.value)){if(!1!==n.posix&&":"===B){const e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){const e=H.value.lastIndexOf("["),t=H.value.slice(0,e),n=H.value.slice(e+2),r=a[n];if(r){H.value=t+r,k.backtrack=!0,W(),_.output||1!==v.indexOf(H)||(_.output=C);continue}}}("["===B&&":"!==Z()||"-"===B&&"]"===Z())&&(B=`\\${B}`),"]"!==B||"["!==H.value&&"[^"!==H.value||(B=`\\${B}`),!0===n.posix&&"!"===B&&"["===H.value&&(B="^"),H.value+=B,z({value:B});continue}if(1===k.quotes&&'"'!==B){B=o.escapeRegex(B),H.value+=B,z({value:B});continue}if('"'===B){k.quotes=1===k.quotes?0:1,!0===n.keepQuotes&&Y({type:"text",value:B});continue}if("("===B){J("parens"),Y({type:"paren",value:B});continue}if(")"===B){if(0===k.parens&&!0===n.strictBrackets)throw new SyntaxError(p("opening","("));const e=U[U.length-1];if(e&&k.parens===e.parens+1){ee(U.pop());continue}Y({type:"paren",value:B,output:k.parens?")":"\\)"}),X("parens");continue}if("["===B){if(!0!==n.nobracket&&q().includes("]"))J("brackets");else{if(!0!==n.nobracket&&!0===n.strictBrackets)throw new SyntaxError(p("closing","]"));B=`\\${B}`}Y({type:"bracket",value:B});continue}if("]"===B){if(!0===n.nobracket||H&&"bracket"===H.type&&1===H.value.length){Y({type:"text",value:B,output:`\\${B}`});continue}if(0===k.brackets){if(!0===n.strictBrackets)throw new SyntaxError(p("opening","["));Y({type:"text",value:B,output:`\\${B}`});continue}X("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(B=`/${B}`),H.value+=B,z({value:B}),!1===n.literalBrackets||o.hasRegexChars(e))continue;const t=o.escapeRegex(H.value);if(k.output=k.output.slice(0,-H.value.length),!0===n.literalBrackets){k.output+=t,H.value=t;continue}H.value=`(${m}${t}|${H.value})`,k.output+=H.value;continue}if("{"===B&&!0!==n.nobrace){J("braces");const e={type:"brace",value:B,output:"(",outputIndex:k.output.length,tokensIndex:k.tokens.length};F.push(e),Y(e);continue}if("}"===B){const e=F[F.length-1];if(!0===n.nobrace||!e){Y({type:"text",value:B,output:B});continue}let t=")";if(!0===e.dots){const e=v.slice(),r=[];for(let t=e.length-1;t>=0&&(v.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=l(r,n),k.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=k.output.slice(0,e.outputIndex),r=k.tokens.slice(e.tokensIndex);e.value=e.output="\\{",B=t="\\}",k.output=n;for(const e of r)k.output+=e.output||e.value}Y({type:"brace",value:B,output:t}),X("braces"),F.pop();continue}if("|"===B){U.length>0&&U[U.length-1].conditions++,Y({type:"text",value:B});continue}if(","===B){let e=B;const t=F[F.length-1];t&&"braces"===G[G.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:B,output:e});continue}if("/"===B){if("dot"===H.type&&k.index===k.start+1){k.start=k.index+1,k.consumed="",k.output="",v.pop(),H=_;continue}Y({type:"slash",value:B,output:O});continue}if("."===B){if(k.braces>0&&"dot"===H.type){"."===H.value&&(H.output=b);const e=F[F.length-1];H.type="dots",H.output+=B,H.value+=B,e.dots=!0;continue}if(k.braces+k.parens===0&&"bos"!==H.type&&"slash"!==H.type){Y({type:"text",value:B,output:b});continue}Y({type:"dot",value:B,output:b});continue}if("?"===B){if((!H||"("!==H.value)&&!0!==n.noextglob&&"("===Z()&&"?"!==Z(2)){Q("qmark",B);continue}if(H&&"paren"===H.type){const e=Z();let t=B;if("<"===e&&!o.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(q()))&&(t=`\\${B}`),Y({type:"text",value:B,output:t});continue}if(!0!==n.dot&&("slash"===H.type||"bos"===H.type)){Y({type:"qmark",value:B,output:R});continue}Y({type:"qmark",value:B,output:P});continue}if("!"===B){if(!0!==n.noextglob&&"("===Z()&&("?"!==Z(2)||!/[!=<:]/.test(Z(3)))){Q("negate",B);continue}if(!0!==n.nonegate&&0===k.index){K();continue}}if("+"===B){if(!0!==n.noextglob&&"("===Z()&&"?"!==Z(2)){Q("plus",B);continue}if(H&&"("===H.value||!1===n.regex){Y({type:"plus",value:B,output:A});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||k.parens>0){Y({type:"plus",value:B});continue}Y({type:"plus",value:A});continue}if("@"===B){if(!0!==n.noextglob&&"("===Z()&&"?"!==Z(2)){Y({type:"at",extglob:!0,value:B,output:""});continue}Y({type:"text",value:B});continue}if("*"!==B){"$"!==B&&"^"!==B||(B=`\\${B}`);const e=s.exec(q());e&&(B+=e[0],k.index+=e[0].length),Y({type:"text",value:B});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=B,H.output=M,k.backtrack=!0,k.globstar=!0,$(B);continue}let t=q();if(!0!==n.noextglob&&/^\([^?]/.test(t)){Q("star",B);continue}if("star"===H.type){if(!0===n.noglobstar){$(B);continue}const r=H.prev,o=r.prev,i="slash"===r.type||"bos"===r.type,a=o&&("star"===o.type||"globstar"===o.type);if(!0===n.bash&&(!i||t[0]&&"/"!==t[0])){Y({type:"star",value:B,output:""});continue}const s=k.braces>0&&("comma"===r.type||"brace"===r.type),u=U.length&&("pipe"===r.type||"paren"===r.type);if(!i&&"paren"!==r.type&&!s&&!u){Y({type:"star",value:B,output:""});continue}for(;"/**"===t.slice(0,3);){const n=e[k.index+4];if(n&&"/"!==n)break;t=t.slice(3),$("/**",3)}if("bos"===r.type&&V()){H.type="globstar",H.value+=B,H.output=N(n),k.output=H.output,k.globstar=!0,$(B);continue}if("slash"===r.type&&"bos"!==r.prev.type&&!a&&V()){k.output=k.output.slice(0,-(r.output+H.output).length),r.output=`(?:${r.output}`,H.type="globstar",H.output=N(n)+(n.strictSlashes?")":"|$)"),H.value+=B,k.globstar=!0,k.output+=r.output+H.output,$(B);continue}if("slash"===r.type&&"bos"!==r.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";k.output=k.output.slice(0,-(r.output+H.output).length),r.output=`(?:${r.output}`,H.type="globstar",H.output=`${N(n)}${O}|${O}${e})`,H.value+=B,k.output+=r.output+H.output,k.globstar=!0,$(B+W()),Y({type:"slash",value:"/",output:""});continue}if("bos"===r.type&&"/"===t[0]){H.type="globstar",H.value+=B,H.output=`(?:^|${O}|${N(n)}${O})`,k.output=H.output,k.globstar=!0,$(B+W()),Y({type:"slash",value:"/",output:""});continue}k.output=k.output.slice(0,-H.output.length),H.type="globstar",H.output=N(n),H.value+=B,k.output+=H.output,k.globstar=!0,$(B);continue}const r={type:"star",value:B,output:M};!0!==n.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==n.regex?(k.index!==k.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(k.output+=S,H.output+=S):!0===n.dot?(k.output+=L,H.output+=L):(k.output+=x,H.output+=x),"*"!==Z()&&(k.output+=C,H.output+=C)),Y(r)):(r.output=B,Y(r)):(r.output=".*?","bos"!==H.type&&"slash"!==H.type||(r.output=x+r.output),Y(r))}for(;k.brackets>0;){if(!0===n.strictBrackets)throw new SyntaxError(p("closing","]"));k.output=o.escapeLast(k.output,"["),X("brackets")}for(;k.parens>0;){if(!0===n.strictBrackets)throw new SyntaxError(p("closing",")"));k.output=o.escapeLast(k.output,"("),X("parens")}for(;k.braces>0;){if(!0===n.strictBrackets)throw new SyntaxError(p("closing","}"));k.output=o.escapeLast(k.output,"{"),X("braces")}if(!0===n.strictSlashes||"star"!==H.type&&"bracket"!==H.type||Y({type:"maybe_slash",value:"",output:`${O}?`}),!0===k.backtrack){k.output="";for(const e of k.tokens)k.output+=null!=e.output?e.output:e.value,e.suffix&&(k.output+=e.suffix)}return k};d.fastpaths=(e,t)=>{const n={...t},a="number"==typeof n.maxLength?Math.min(i,n.maxLength):i,s=e.length;if(s>a)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${a}`);e=c[e]||e;const u=o.isWindows(t),{DOT_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:h,NO_DOTS:_,NO_DOTS_SLASH:v,STAR:m,START_ANCHOR:E}=r.globChars(u),g=n.dot?_:h,y=n.dot?v:h,b=n.capture?"":"?:";let A=!0===n.bash?".*?":m;n.capture&&(A=`(${A})`);const O=e=>!0===e.noglobstar?A:`(${b}(?:(?!${E}${e.dot?f:l}).)*?)`,C=e=>{switch(e){case"*":return`${g}${d}${A}`;case".*":return`${l}${d}${A}`;case"*.*":return`${g}${A}${l}${d}${A}`;case"*/*":return`${g}${A}${p}${d}${y}${A}`;case"**":return g+O(n);case"**/*":return`(?:${g}${O(n)}${p})?${y}${d}${A}`;case"**/*.*":return`(?:${g}${O(n)}${p})?${y}${A}${l}${d}${A}`;case"**/.*":return`(?:${g}${O(n)}${p})?${l}${d}${A}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=C(t[1]);if(!n)return;return n+l+t[2]}}},w=o.removePrefix(e,{negated:!1,prefix:""});let I=C(w);return I&&!0!==n.strictSlashes&&(I+=`${p}?`),I},e.exports=d},2595:(e,t,n)=>{"use strict";const r=n(1017),o=n(4933),i=n(2902),a=n(3338),s=n(7411),u=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map((e=>u(e,t,n))),o=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return o}const r=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},s=a.isWindows(t),c=r?u.compileRe(e,t):u.makeRe(e,t,!1,!0),l=c.state;delete c.state;let p=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};p=u(i.ignore,e,n)}const d=(n,r=!1)=>{const{isMatch:o,match:a,output:d}=u.test(n,c,t,{glob:e,posix:s}),f={glob:e,state:l,regex:c,posix:s,input:n,output:d,match:a,isMatch:o};return"function"==typeof i.onResult&&i.onResult(f),!1===o?(f.isMatch=!1,!!r&&f):p(n)?("function"==typeof i.onIgnore&&i.onIgnore(f),f.isMatch=!1,!!r&&f):("function"==typeof i.onMatch&&i.onMatch(f),!r||f)};return n&&(d.state=l),d};u.test=(e,t,n,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const i=n||{},s=i.format||(o?a.toPosixSlashes:null);let c=e===r,l=c&&s?s(e):e;return!1===c&&(l=s?s(e):e,c=l===r),!1!==c&&!0!==i.capture||(c=!0===i.matchBase||!0===i.basename?u.matchBase(e,t,n,o):t.exec(l)),{isMatch:Boolean(c),match:c,output:l}},u.matchBase=(e,t,n,o=a.isWindows(n))=>(t instanceof RegExp?t:u.makeRe(t,n)).test(r.basename(e)),u.isMatch=(e,t,n)=>u(t,n)(e),u.parse=(e,t)=>Array.isArray(e)?e.map((e=>u.parse(e,t))):i(e,{...t,fastpaths:!1}),u.scan=(e,t)=>o(e,t),u.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const o=t||{},i=o.contains?"":"^",a=o.contains?"":"$";let s=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(s=`^(?!${s}).*$`);const c=u.toRegex(s,t);return!0===r&&(c.state=e),c},u.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=i.fastpaths(e,t)),o.output||(o=i(e,t)),u.compileRe(o,t,n,r)},u.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},u.constants=s,e.exports=u},4933:(e,t,n)=>{"use strict";const r=n(3338),{CHAR_ASTERISK:o,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:s,CHAR_DOT:u,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:h,CHAR_QUESTION_MARK:_,CHAR_RIGHT_CURLY_BRACE:v,CHAR_RIGHT_PARENTHESES:m,CHAR_RIGHT_SQUARE_BRACKET:E}=n(7411),g=e=>e===l||e===a,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const n=t||{},b=e.length-1,A=!0===n.parts||!0===n.scanToEnd,O=[],C=[],w=[];let I,S,L=e,P=-1,R=0,T=0,D=!1,N=!1,x=!1,j=!1,M=!1,k=!1,U=!1,F=!1,G=!1,B=!1,H=0,V={value:"",depth:0,isGlob:!1};const Z=()=>P>=b,W=()=>(I=S,L.charCodeAt(++P));for(;P<b;){let e;if(S=W(),S!==a){if(!0===k||S===p){for(H++;!0!==Z()&&(S=W());)if(S!==a)if(S!==p){if(!0!==k&&S===u&&(S=W())===u){if(D=V.isBrace=!0,x=V.isGlob=!0,B=!0,!0===A)continue;break}if(!0!==k&&S===s){if(D=V.isBrace=!0,x=V.isGlob=!0,B=!0,!0===A)continue;break}if(S===v&&(H--,0===H)){k=!1,D=V.isBrace=!0,B=!0;break}}else H++;else U=V.backslashes=!0,W();if(!0===A)continue;break}if(S!==l){if(!0!==n.noext&&!0==(S===h||S===i||S===o||S===_||S===c)&&L.charCodeAt(P+1)===d){if(x=V.isGlob=!0,j=V.isExtglob=!0,B=!0,S===c&&P===R&&(G=!0),!0===A){for(;!0!==Z()&&(S=W());)if(S!==a){if(S===m){x=V.isGlob=!0,B=!0;break}}else U=V.backslashes=!0,S=W();continue}break}if(S===o){if(I===o&&(M=V.isGlobstar=!0),x=V.isGlob=!0,B=!0,!0===A)continue;break}if(S===_){if(x=V.isGlob=!0,B=!0,!0===A)continue;break}if(S===f){for(;!0!==Z()&&(e=W());)if(e!==a){if(e===E){N=V.isBracket=!0,x=V.isGlob=!0,B=!0;break}}else U=V.backslashes=!0,W();if(!0===A)continue;break}if(!0===n.nonegate||S!==c||P!==R){if(!0!==n.noparen&&S===d){if(x=V.isGlob=!0,!0===A){for(;!0!==Z()&&(S=W());)if(S!==d){if(S===m){B=!0;break}}else U=V.backslashes=!0,S=W();continue}break}if(!0===x){if(B=!0,!0===A)continue;break}}else F=V.negated=!0,R++}else{if(O.push(P),C.push(V),V={value:"",depth:0,isGlob:!1},!0===B)continue;if(I===u&&P===R+1){R+=2;continue}T=P+1}}else U=V.backslashes=!0,S=W(),S===p&&(k=!0)}!0===n.noext&&(j=!1,x=!1);let q=L,$="",z="";R>0&&($=L.slice(0,R),L=L.slice(R),T-=R),q&&!0===x&&T>0?(q=L.slice(0,T),z=L.slice(T)):!0===x?(q="",z=L):q=L,q&&""!==q&&"/"!==q&&q!==L&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===n.unescape&&(z&&(z=r.removeBackslashes(z)),q&&!0===U&&(q=r.removeBackslashes(q)));const K={prefix:$,input:e,start:R,base:q,glob:z,isBrace:D,isBracket:N,isGlob:x,isExtglob:j,isGlobstar:M,negated:F,negatedExtglob:G};if(!0===n.tokens&&(K.maxDepth=0,g(S)||C.push(V),K.tokens=C),!0===n.parts||!0===n.tokens){let t;for(let r=0;r<O.length;r++){const o=t?t+1:R,i=O[r],a=e.slice(o,i);n.tokens&&(0===r&&0!==R?(C[r].isPrefix=!0,C[r].value=$):C[r].value=a,y(C[r]),K.maxDepth+=C[r].depth),0===r&&""===a||w.push(a),t=i}if(t&&t+1<e.length){const r=e.slice(t+1);w.push(r),n.tokens&&(C[C.length-1].value=r,y(C[C.length-1]),K.maxDepth+=C[C.length-1].depth)}K.slashes=O,K.parts=w}return K}},3338:(e,t,n)=>{"use strict";const r=n(1017),o="win32"===process.platform,{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:a,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:u}=n(7411);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>s.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(u,"\\$1"),t.toPosixSlashes=e=>e.replace(i,"/"),t.removeBackslashes=e=>e.replace(a,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===o||"\\"===r.sep,t.escapeLast=(e,n,r)=>{const o=e.lastIndexOf(n,r);return-1===o?e:"\\"===e[o-1]?t.escapeLast(e,n,o-1):`${e.slice(0,o)}\\${e.slice(o)}`},t.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},t.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}},3152:(e,t,n)=>{"use strict";var r=n(7310).parse,o={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},i=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function a(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}t.getProxyForUrl=function(e){var t="string"==typeof e?r(e):e||{},n=t.protocol,s=t.host,u=t.port;if("string"!=typeof s||!s||"string"!=typeof n)return"";if(n=n.split(":",1)[0],!function(e,t){var n=(a("npm_config_no_proxy")||a("no_proxy")).toLowerCase();return!n||"*"!==n&&n.split(/[,\s]/).every((function(n){if(!n)return!0;var r=n.match(/^(.+):(\d+)$/),o=r?r[1]:n,a=r?parseInt(r[2]):0;return!(!a||a===t)||(/^[.*]/.test(o)?("*"===o.charAt(0)&&(o=o.slice(1)),!i.call(e,o)):e!==o)}))}(s=s.replace(/:\d*$/,""),u=parseInt(u)||o[n]||0))return"";var c=a("npm_config_"+n+"_proxy")||a(n+"_proxy")||a("npm_config_proxy")||a("all_proxy");return c&&-1===c.indexOf("://")&&(c=n+"://"+c),c}},7013:(e,t,n)=>{"use strict";const r=n(2037),o=n(6224),i=n(8137),{env:a}=process;let s;function u(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e,t){if(0===s)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!t&&void 0===s)return 0;const n=s||0;if("dumb"===a.TERM)return n;if("win32"===process.platform){const e=r.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in a))||"codeship"===a.CI_NAME?1:n;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:n}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?s=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(s=1),"FORCE_COLOR"in a&&(s="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return u(c(e,e&&e.isTTY))},stdout:u(c(!0,o.isatty(1))),stderr:u(c(!0,o.isatty(2)))}},1681:(e,t,n)=>{e.exports=n(7955)},7955:(e,t,n)=>{"use strict";n(1808);var r,o=n(4404),i=n(3685),a=n(5687),s=n(2361),u=(n(9491),n(3837));function c(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||i.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,n,r,o){for(var i=p(n,r,o),a=0,s=t.requests.length;a<s;++a){var u=t.requests[a];if(u.host===i.host&&u.port===i.port)return t.requests.splice(a,1),void u.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function l(e,t){var n=this;c.prototype.createSocket.call(n,e,(function(r){var i=e.request.getHeader("host"),a=d({},n.options,{socket:r,servername:i?i.replace(/:.*$/,""):e.host}),s=o.connect(0,a);n.sockets[n.sockets.indexOf(r)]=s,t(s)}))}function p(e,t,n){return"string"==typeof e?{host:e,port:t,localAddress:n}:e}function d(e){for(var t=1,n=arguments.length;t<n;++t){var r=arguments[t];if("object"==typeof r)for(var o=Object.keys(r),i=0,a=o.length;i<a;++i){var s=o[i];void 0!==r[s]&&(e[s]=r[s])}}return e}t.httpOverHttp=function(e){var t=new c(e);return t.request=i.request,t},t.httpsOverHttp=function(e){var t=new c(e);return t.request=i.request,t.createSocket=l,t.defaultPort=443,t},t.httpOverHttps=function(e){var t=new c(e);return t.request=a.request,t},t.httpsOverHttps=function(e){var t=new c(e);return t.request=a.request,t.createSocket=l,t.defaultPort=443,t},u.inherits(c,s.EventEmitter),c.prototype.addRequest=function(e,t,n,r){var o=this,i=d({request:e},o.options,p(t,n,r));o.sockets.length>=this.maxSockets?o.requests.push(i):o.createSocket(i,(function(t){function n(){o.emit("free",t,i)}function r(e){o.removeSocket(t),t.removeListener("free",n),t.removeListener("close",r),t.removeListener("agentRemove",r)}t.on("free",n),t.on("close",r),t.on("agentRemove",r),e.onSocket(t)}))},c.prototype.createSocket=function(e,t){var n=this,o={};n.sockets.push(o);var i=d({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),r("making CONNECT request");var a=n.request(i);function s(i,s,u){var c;return a.removeAllListeners(),s.removeAllListeners(),200!==i.statusCode?(r("tunneling socket could not be established, statusCode=%d",i.statusCode),s.destroy(),(c=new Error("tunneling socket could not be established, statusCode="+i.statusCode)).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):u.length>0?(r("got illegal response body from proxy"),s.destroy(),(c=new Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):(r("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=s,t(s))}a.useChunkedEncodingByDefault=!1,a.once("response",(function(e){e.upgrade=!0})),a.once("upgrade",(function(e,t,n){process.nextTick((function(){s(e,t,n)}))})),a.once("connect",s),a.once("error",(function(t){a.removeAllListeners(),r("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, cause="+t.message);i.code="ECONNRESET",e.request.emit("error",i),n.removeSocket(o)})),a.end()},c.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var n=this.requests.shift();n&&this.createSocket(n,(function(e){n.request.onSocket(e)}))}},r=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},t.debug=r},8783:(e,t,n)=>{const r=n(2361).EventEmitter,o=n(2081).spawn,i=n(1017),a=n(7147);class s{constructor(e,t){this.flags=e,this.required=e.indexOf("<")>=0,this.optional=e.indexOf("[")>=0,this.mandatory=!1,this.negate=-1!==e.indexOf("-no-");const n=e.split(/[ ,|]+/);n.length>1&&!/^[[<]/.test(n[1])&&(this.short=n.shift()),this.long=n.shift(),this.description=t||"",this.defaultValue=void 0}name(){return this.long.replace(/^--/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}is(e){return this.short===e||this.long===e}}class u extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}class c extends r{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=e||"",this._optionValues={},this._storeOptionsAsProperties=!0,this._passCommandToAction=!0,this._actionResults=[],this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._hidden=!1,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._hasImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command"}command(e,t,n){let r=t,o=n;"object"==typeof r&&null!==r&&(o=r,r=null),o=o||{};const i=e.split(/ +/),a=this.createCommand(i.shift());return r&&(a.description(r),a._executableHandler=!0),o.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!o.noHelp&&!o.hidden),a._helpFlags=this._helpFlags,a._helpDescription=this._helpDescription,a._helpShortFlag=this._helpShortFlag,a._helpLongFlag=this._helpLongFlag,a._helpCommandName=this._helpCommandName,a._helpCommandnameAndArgs=this._helpCommandnameAndArgs,a._helpCommandDescription=this._helpCommandDescription,a._exitCallback=this._exitCallback,a._storeOptionsAsProperties=this._storeOptionsAsProperties,a._passCommandToAction=this._passCommandToAction,a._executableFile=o.executableFile||null,this.commands.push(a),a._parseExpectedArgs(i),a.parent=this,r?this:a}createCommand(e){return new c(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");return function e(t){t.forEach((t=>{if(t._executableHandler&&!t._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${t.name()}`);e(t.commands)}))}(e.commands),(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){return!1===e?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,"string"==typeof e&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return void 0===this._hasImplicitHelpCommand&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(e){if(e.length)return e.forEach((e=>{const t={required:!1,name:"",variadic:!1};switch(e[0]){case"<":t.required=!0,t.name=e.slice(1,-1);break;case"[":t.name=e.slice(1,-1)}t.name.length>3&&"..."===t.name.slice(-3)&&(t.variadic=!0,t.name=t.name.slice(0,-3)),t.name&&this._args.push(t)})),this._args.forEach(((e,t)=>{if(e.variadic&&t<this._args.length-1)throw new Error(`only the last argument can be variadic '${e.name}'`)})),this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new u(e,t,n)),process.exit(e)}action(e){return this._actionHandler=t=>{const n=this._args.length,r=t.slice(0,n);this._passCommandToAction?r[n]=this:r[n]=this.opts(),t.length>n&&r.push(t.slice(n));const o=e.apply(this,r);let i=this;for(;i.parent;)i=i.parent;i._actionResults.push(o)},this}_optionEx(e,t,n,r,o){const i=new s(t,n),a=i.name(),u=i.attributeName();if(i.mandatory=!!e.mandatory,"function"!=typeof r)if(r instanceof RegExp){const e=r;r=(t,n)=>{const r=e.exec(t);return r?r[0]:n}}else o=r,r=null;if(i.negate||i.optional||i.required||"boolean"==typeof o){if(i.negate){const e=i.long.replace(/^--no-/,"--");o=!this._findOption(e)||this._getOptionValue(u)}void 0!==o&&(this._setOptionValue(u,o),i.defaultValue=o)}return this.options.push(i),this.on("option:"+a,(e=>{null!==e&&r&&(e=r(e,void 0===this._getOptionValue(u)?o:this._getOptionValue(u))),"boolean"==typeof this._getOptionValue(u)||void 0===this._getOptionValue(u)?null==e?this._setOptionValue(u,!i.negate&&(o||!0)):this._setOptionValue(u,e):null!==e&&this._setOptionValue(u,!i.negate&&e)})),this}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}allowUnknownOption(e){return this._allowUnknownOption=void 0===e||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsProperties=void 0===e||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=void 0===e||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");let n;switch(t=t||{},void 0===e&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&i.basename(this._scriptPath,i.extname(this._scriptPath)),this._parseCommand([],n),this}parseAsync(e,t){return this.parse(e,t),Promise.all(this._actionResults).then((()=>this))}_executeSubCommand(e,t){t=t.slice();let n=!1;const r=[".js",".ts",".mjs"];this._checkForMissingMandatoryOptions();const s=this._scriptPath;let c;try{const e=a.realpathSync(s);c=i.dirname(e)}catch(e){c="."}let l=i.basename(s,i.extname(s))+"-"+e._name;e._executableFile&&(l=e._executableFile);const p=i.join(c,l);let d;a.existsSync(p)?l=p:r.forEach((e=>{a.existsSync(`${p}${e}`)&&(l=`${p}${e}`)})),n=r.includes(i.extname(l)),"win32"!==process.platform?n?(t.unshift(l),t=_(process.execArgv).concat(t),d=o(process.argv[0],t,{stdio:"inherit"})):d=o(l,t,{stdio:"inherit"}):(t.unshift(l),t=_(process.execArgv).concat(t),d=o(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{process.on(e,(()=>{!1===d.killed&&null===d.exitCode&&d.kill(e)}))}));const f=this._exitCallback;f?d.on("close",(()=>{f(new u(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))})):d.on("close",process.exit.bind(process)),d.on("error",(t=>{if("ENOENT"===t.code){const t=`'${l}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(t)}if("EACCES"===t.code)throw new Error(`'${l}' not executable`);if(f){const e=new u(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,f(e)}else process.exit(1)})),this.runningCommand=d}_dispatchSubcommand(e,t,n){const r=this._findCommand(e);r||this._helpAndError(),r._executableHandler?this._executeSubCommand(r,t.concat(n)):r._parseCommand(t,n)}_parseCommand(e,t){const n=this.parseOptions(t);if(e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))this._dispatchSubcommand(e[0],e.slice(1),t);else if(this._lazyHasImplicitHelpCommand()&&e[0]===this._helpCommandName)1===e.length?this.help():this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)f(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this._helpAndError(),f(this,n.unknown),this._checkForMissingMandatoryOptions(),n.unknown.length>0&&this.unknownOption(n.unknown[0]),this._actionHandler){const n=this.args.slice();this._args.forEach(((e,t)=>{e.required&&null==n[t]?this.missingArgument(e.name):e.variadic&&(n[t]=n.splice(t))})),this._actionHandler(n),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(e){if(e)return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach((t=>{t.mandatory&&void 0===e._getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)}))}parseOptions(e){const t=[],n=[];let r=t;const o=e.slice();function i(e){return e.length>1&&"-"===e[0]}for(;o.length;){const e=o.shift();if("--"===e){r===n&&r.push(e),r.push(...o);break}if(i(e)){const t=this._findOption(e);if(t){if(t.required){const e=o.shift();void 0===e&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;o.length>0&&!i(o[0])&&(e=o.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),o.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("="),n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}e.length>1&&"-"===e[0]&&(r=n),r.push(e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let n=0;n<t;n++){const t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}missingArgument(e){const t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let n;n=t?`error: option '${e.flags}' argument missing, got '${t}'`:`error: option '${e.flags}' argument missing`,console.error(n),this._exit(1,"commander.optionMissingArgument",n)}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;console.error(t),this._exit(1,"commander.missingMandatoryOptionValue",t)}unknownOption(e){if(this._allowUnknownOption)return;const t=`error: unknown option '${e}'`;console.error(t),this._exit(1,"commander.unknownOption",t)}unknownCommand(){const e=[this.name()];for(let t=this.parent;t;t=t.parent)e.unshift(t.name());const t=e.join(" "),n=`error: unknown command '${this.args[0]}'. See '${t} ${this._helpLongFlag}'.`;console.error(n),this._exit(1,"commander.unknownCommand",n)}version(e,t,n){if(void 0===e)return this._version;this._version=e;const r=new s(t=t||"-V, --version",n=n||"output the version number");return this._versionOptionName=r.long.substr(2)||"version",this.options.push(r),this.on("option:"+this._versionOptionName,(()=>{process.stdout.write(e+"\n"),this._exit(0,"commander.version",e)})),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,this._argsDescription=t,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach((e=>this.alias(e))),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this._args.map((e=>h(e)));return"[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+e.join(" "):"")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}prepareCommands(){const e=this.commands.filter((e=>!e._hidden)).map((e=>{const t=e._args.map((e=>h(e))).join(" ");return[e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:""),e._description]}));return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce(((e,t)=>Math.max(e,t[0].length)),0)}largestOptionLength(){const e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce(((e,t)=>Math.max(e,t.flags.length)),0)}largestArgLength(){return this._args.reduce(((e,t)=>Math.max(e,t.name.length)),0)}padWidth(){let e=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e}optionHelp(){const e=this.padWidth(),t=(process.stdout.columns||80)-e-4;function n(n,r){return l(n,e)+" "+d(r,t,e+2)}const r=this.options.map((e=>{const t=e.description+(e.negate||void 0===e.defaultValue?"":" (default: "+JSON.stringify(e.defaultValue)+")");return n(e.flags,t)})),o=this._helpShortFlag&&!this._findOption(this._helpShortFlag),i=!this._findOption(this._helpLongFlag);if(o||i){let e=this._helpFlags;o?i||(e=this._helpShortFlag):e=this._helpLongFlag,r.push(n(e,this._helpDescription))}return r.join("\n")}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";const e=this.prepareCommands(),t=this.padWidth(),n=(process.stdout.columns||80)-t-4;return["Commands:",e.map((e=>{const r=e[1]?" "+e[1]:"";return(r?l(e[0],t):e[0])+d(r,n,t+2)})).join("\n").replace(/^/gm," "),""].join("\n")}helpInformation(){let e=[];if(this._description){e=[this._description,""];const t=this._argsDescription;if(t&&this._args.length){const n=this.padWidth(),r=(process.stdout.columns||80)-n-5;e.push("Arguments:"),e.push(""),this._args.forEach((o=>{e.push(" "+l(o.name,n)+" "+p(t[o.name],r,n+4))})),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let n="";for(let e=this.parent;e;e=e.parent)n=e.name()+" "+n;const r=["Usage: "+n+t+" "+this.usage(),""];let o=[];const i=this.commandHelp();i&&(o=[i]);const a=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return r.concat(e).concat(a).concat(o).join("\n")}outputHelp(e){e||(e=e=>e);const t=e(this.helpInformation());if("string"!=typeof t&&!Buffer.isBuffer(t))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(t),this.emit(this._helpLongFlag)}helpOption(e,t){this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;const n=this._helpFlags.split(/[ ,|]+/);return this._helpShortFlag=void 0,n.length>1&&(this._helpShortFlag=n.shift()),this._helpLongFlag=n.shift(),this}help(e){this.outputHelp(e),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}}function l(e,t){const n=Math.max(0,t-e.length);return e+Array(n+1).join(" ")}function p(e,t,n){const r=new RegExp(".{1,"+(t-1)+"}([\\s]|$)|[^\\s]+?([\\s]|$)","g");return(e.match(r)||[]).map(((e,t)=>("\n"===e.slice(-1)&&(e=e.slice(0,e.length-1)),(t>0&&n?Array(n+1).join(" "):"")+e.trimRight()))).join("\n")}function d(e,t,n){return e.match(/[\n]\s+/)||t<40?e:p(e,t,n)}function f(e,t){t.find((t=>t===e._helpLongFlag||t===e._helpShortFlag))&&(e.outputHelp(),e._exit(0,"commander.helpDisplayed","(outputHelp)"))}function h(e){const t=e.name+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"}function _(e){return e.map((e=>{let t=e;if(0===e.indexOf("--inspect")){let n,r,o="127.0.0.1",i="9229";null!==(r=e.match(/^(--inspect(-brk)?)$/))?n=r[1]:null!==(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(n=r[1],/^\d+$/.test(r[3])?i=r[3]:o=r[3]):null!==(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(n=r[1],o=r[3],i=r[4]),n&&"0"!==i&&(t=`${n}=${o}:${parseInt(i)+1}`)}return t}))}(t=e.exports=new c).program=t,t.Command=c,t.Option=s,t.CommanderError=u},2747:function(e,t){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QRCodeError=t.SchemaError=t.CompileError=t.UploadError=t.CompressError=t.PackageSizeError=t.ProjectError=t.HashError=t.MetaError=t.LoginError=t.IDE_ERROR_LEVEL=void 0,t.IDE_ERROR_LEVEL={p0:"p0",p1:"p1",p2:"p2",p3:"p3"};var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Login Error",t}return r(t,e),t}(Error);t.LoginError=o;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Meta Error",t}return r(t,e),t}(Error);t.MetaError=i;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Hash Error",t}return r(t,e),t}(Error);t.HashError=a;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Project Error",t}return r(t,e),t}(Error);t.ProjectError=s;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="PackageSize Error",t}return r(t,e),t}(Error);t.PackageSizeError=u;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Compress Error",t}return r(t,e),t}(Error);t.CompressError=c;var l=function(e){function t(t,n){void 0===n&&(n=-1);var r=e.call(this,t)||this;return r.name="Upload Error",r.code=n,r}return r(t,e),t}(Error);t.UploadError=l;var p=function(e){function t(t,n,r){void 0===n&&(n=""),void 0===r&&(r=0);var o=e.call(this,t)||this;return o.name="Compile Error",o.errLink=n,o.code=r,o}return r(t,e),t}(Error);t.CompileError=p;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Schema Error",t}return r(t,e),t}(Error);t.SchemaError=d;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="QRCode Error",t}return r(t,e),t}(Error);t.QRCodeError=f},2139:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FRONT_PAGE_EVENT=t.IDE_PERFORMANCE_EVENTS=t.IDE_TIMELINE_NAMES=t.IDE_MODULES=t.SLARDAR_EVENT=void 0;var o=n(8039);t.SLARDAR_EVENT=r(r(r({},o.UPDATE_SLARDAR_EVENTS),o.UPDATE_SLARDAR_EVENTS_TECH),{VELA_CLICK_PREVIEW:"VELA_CLICK_PREVIEW",VELA_PREVIEW_FAIL:"VELA_PREVIEW_FAIL",VELA_CLICK_UPLOAD:"VELA_CLICK_UPLOAD",UPLOAD_VERSION_FOCUS:"UPLOAD_VERSION_FOCUS",UPLOAD_VERSION_ERROR:"UPLOAD_VERSION_ERROR",VELA_UPLOAD_FAIL:"VELA_UPLOAD_FAIL",VELA_SHOW_INIT_VIEW_TIME:"VELA_SHOW_INIT_VIEW_TIME",VELA_PREVIEW_TIME:"VELA_PREVIEW_TIME",VELA_UPLOAD_TIME:"VELA_UPLOAD_TIME",VELA_COMPILE_FIRST_END:"VELA_COMPILE_FIRST_END",VELA_COMPILE_TIME:"VELA_COMPILE_TIME",IDE_COMPILE_PERFORMANCE:"IDE_COMPILE_PERFORMANCE",IDE_COMPILE_RESULT:"IDE_COMPILE_RESULT",VELA_SIMULATOR_RENDER_TIME:"VELA_SIMULATOR_RENDER_TIME",VELA_SIMULATOR_FIRST_RENDER_SUCCESS:"VELA_SIMULATOR_FIRST_RENDER_SUCCESS",VELA_AUDIT_SCORE:"VELA_AUDIT_SCORE",MENU_BAR_DEBUG_SETTING_SAVE:"MENU_BAR_DEBUG_SETTING_SAVE",MENU_BAR_DEBUG_SETTING_SAVE_FAIL:"MENU_BAR_DEBUG_SETTING_SAVE_FAIL",MENU_BAR_DEBUG_APPLY_TEST_TMA:"MENU_BAR_DEBUG_APPLY_TEST_TMA",MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL:"MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL",MENU_BAR_DEBUG_APPLY_BOE:"MENU_BAR_DEBUG_APPLY_BOE",MENU_BAR_DEBUG_APPLY_BOE_FAIL:"MENU_BAR_DEBUG_APPLY_BOE_FAIL",MENU_BAR_DEBUG_APPLY_PPE:"MENU_BAR_DEBUG_APPLY_PPE",MENU_BAR_DEBUG_APPLY_PPE_FAIL:"MENU_BAR_DEBUG_APPLY_PPE_FAIL",VELA_POST_MESSAGE_LIST:"VELA_POST_MESSAGE_LIST",VELA_POST_MESSAGE_LIST_FAIL:"VELA_POST_MESSAGE_LIST_FAIL",VELA_AVATAR_LOGOUT:"VELA_AVATAR_LOGOUT",VELA_AVATAR_LOGOUT_FAIL:"VELA_AVATAR_LOGOUT_FAIL",VELA_CLEAR_ALL_SESSION:"VELA_CLEAR_ALL_SESSION",VELA_CLEAR_ALL_SESSION_FAIL:"VELA_CLEAR_ALL_SESSION_FAIL",VELA_CLEAR_DATA_SESSION:"VELA_CLEAR_DATA_SESSION",VELA_CLEAR_DATA_SESSION_FAIL:"VELA_CLEAR_DATA_SESSION_FAIL",VELA_CLEAR_LOGIN_SESSION:"VELA_CLEAR_LOGIN_SESSION",VELA_CLEAR_LOGIN_SESSION_FAIL:"VELA_CLEAR_LOGIN_SESSION_FAIL",VELA_CLEAR_AUTH_SESSION:"VELA_CLEAR_AUTH_SESSION",VELA_CLEAR_AUTH_SESSION_FAIL:"VELA_CLEAR_AUTH_SESSION_FAIL",VELA_ADD_COMPILE_MODE:"VELA_ADD_COMPILE_MODE",VELA_ADD_COMPILE_MODE_FAIL:"VELA_ADD_COMPILE_MODE_FAIL",VELA_COMPILE:"VELA_COMPILE",VELA_COMPILE_FAIL:"VELA_COMPILE_FAIL",VELA_CHANGE_COMPILE_MODE:"VELA_CHANGE_COMPILE_MODE",VELA_CHANGE_COMPILE_MODE_FAIL:"VELA_CHANGE_COMPILE_MODE_FAIL",VELA_SELECT_SDK:"VELA_SELECT_SDK",VELA_SELECT_SDK_FAIL:"VELA_SELECT_SDK_FAIL",VELA_CLICK_CONVERT_TOOL:"VELA_CLICK_CONVERT_TOOL",VELA_CONVERT_EMIT:"VELA_CONVERT_EMIT",VELA_OPEN_PROJECT_FROM_CONVERT_TOOL:"VELA_OPEN_PROJECT_FROM_CONVERT_TOOL",VELA_BUILD_NPM:"VELA_BUILD_NPM",VELA_BUILD_NPM_FAIL:"VELA_BUILD_NPM_FAIL",PACKAGE_SIZE:"PACKAGE_SIZE",UPLOAD_SUCCESS_EVENT:"UPLOAD_SUCCESS_EVENT",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL",IDE_GET_SDK_LIST_FAIL:"IDE_GET_SDK_LIST_FAIL",IDE_REQUEST_START:"IDE_REQUEST_START",IDE_REQUEST_FAIL:"IDE_REQUEST_FAIL",IDE_COLOR_THEME:"IDE_COLOR_THEME",IDE_CODE_WINDOW_ERROR:"IDE_CODE_WINDOW_ERROR",IDE_HELP_DEVELOPER_COMMUNITY:"IDE_HELP_DEVELOPER_COMMUNITY",IDE_MESSAGE_EXPAND_CLICK:"IDE_MESSAGE_EXPAND_CLICK",IDE_MODULE_CLICK:"IDE_MODULE_CLICK",IDE_MODULE_USAGE:"IDE_MODULE_USAGE",IDE_MODULE_LOADTIME:"IDE_MODULE_LOADTIME",IDE_MODULE_PERFORMANCE:"IDE_MODULE_PERFORMANCE",IDE_PERFORMANCE:"IDE_PERFORMANCE",IDE_DEVICE_INFO_DISPLAY:"IDE_DEVICE_INFO_DISPLAY",IDE_DEVICE_INFO_CPU:"IDE_DEVICE_INFO_CPU",IDE_DEVICE_INFO_OS:"IDE_DEVICE_INFO_OS",IDE_SIMULATOR_LOAD_TIME:"IDE_SIMULATOR_LOAD_TIME",IDE_MENU_CLICK:"IDE_MENU_CLICK",IDE_LANGUAGE:"IDE_LANGUAGE",IDE_ROOM_SERVICE_TRACE:"IDE_ROOM_SERVICE_TRACE",IDE_UPDATE_STEP_ERROR:"IDE_UPDATE_STEP_ERROR",IDE_SCENE_START:"IDE_SCENE_START",IDE_SCENE_END:"IDE_SCENE_END",IDE_APPID_SELECT:"IDE_APPID_SELECT",IDE_APPID_CHANGE:"IDE_APPID_CHANGE",IDE_FMP_BREAKDOWN:"IDE_FMP_BREAKDOWN",IDE_JS_LONG_TASK:"IDE_JS_LONG_TASK",IDE_INP_INFO:"IDE_INP_INFO",IDE_LOW_FPS:"IDE_LOW_FPS",IDE_LOW_MEMORY:"IDE_LOW_MEMORY",IDE_FETCH_ADMIN_XCONFIG_TMAR:"IDE_FETCH_ADMIN_XCONFIG_TMAR",IDE_BIG_PACKAGESIZE_CHECK:"IDE_BIG_PACKAGESIZE_CHECK",IDE_WORKBENCH_WILL_RENDER:"IDE_WORKBENCH_WILL_RENDER",IDE_WORKBENCH_RENDERED:"IDE_WORKBENCH_RENDERED",IDE_CODE_WINDOW_NUM:"IDE_CODE_WINDOW_NUM",IDE_NEW_CODE_WINDOW:"IDE_NEW_CODE_WINDOW",IDE_DETAIL_PANEL_OPENED:"IDE_DETAIL_PANEL_OPENED",IDE_DETAIL_PANEL_CLOSED:"IDE_DETAIL_PANEL_CLOSED",IDE_SETTING_PAGE_SHOW:"IDE_SETTING_PAGE_SHOW",IDE_SETTING_PAGE_OPERATION:"IDE_SETTING_PAGE_OPERATION",IDE_SETTING_CHANGE_LITE_MODE:"IDE_SETTING_CHANGE_LITE_MODE:",IDE_MODULE_CLICK_AUTH_REG:"IDE_MODULE_CLICK_AUTH_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_REG:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL:"IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC",IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS:"IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS",IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY:"IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY",IDE_MODULE_AUTH_SCAN_QRCODE:"IDE_MODULE_AUTH_SCAN_QRCODE",IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON:"IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON",IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE",IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",IDE_FRONTPAGE_PM_LIST:"IDE_FRONTPAGE_PM_LIST",CREATE_PROGRAM:"CREATE_PROGRAM",IDE_WXTOTT_ERROR:"IDE_WXTOTT_ERROR",IDE_SCENE_USER_OPERATE:"IDE_SCENE_USER_OPERATE",IDE_TEMPLATE_HOVER:"IDE_TEMPLATE_HOVER",IDE_TEMPLATE_DETAIL:"IDE_TEMPLATE_DETAIL",IDE_TEMPLATE_ERROR:"IDE_TEMPLATE_ERROR",IDE_TEMPLATE_DOWNLOAD:"IDE_TEMPLATE_DOWNLOAD",IDE_QUICK_JS_ERROR:"IDE_QUICK_JS_ERROR",IDE_REMOTE_DEBUG_CONNECTION_QUALITY:"IDE_REMOTE_DEBUG_CONNECTION_QUALITY",IDE_LOCAL_COMPILE_TRACE:"IDE_LOCAL_COMPILE_TRACE",IDE_REMOTE_DEBUG_EXCEPTION:"IDE_REMOTE_DEBUG_EXCEPTION",IDE_MODULE_AUTH_FORCE_LOGOUT:"IDE_MODULE_AUTH_FORCE_LOGOUT",IDE_CANVAS_WEBGL_CONTEXT_ENABLE:"IDE_CANVAS_WEBGL_CONTEXT_ENABLE",IDE_LOGIN_DATA_FORMAT:"IDE_LOGIN_DATA_FORMAT",IDE_IS_ENCRYPTION_AVAILABLE:"IDE_IS_ENCRYPTION_AVAILABLE",IDE_ADD_COMPILE_MODE:"IDE_ADD_COMPILE_MODE",IDE_DECODE_QRCODE:"IDE_DECODE_QRCODE",IDE_DECODE_URL:"IDE_DECODE_URL",IDE_MAIN_HELPER_FORK_TIME:"IDE_MAIN_HELPER_FORK_TIME",IDE_MAIN_HELPER_ERROR:"IDE_MAIN_HELPER_ERROR",IDE_INSTALL_PATH:"IDE_INSTALL_PATH",IDE_SWITCH_WORKBENCH_MODE:"IDE_SWITCH_WORKBENCH_MODE",IDE_TOGGLE_REMOTE_VIEW:"IDE_TOGGLE_REMOTE_VIEW",IDE_SIMULATOR_PAUSE_MINIAPP:"IDE_SIMULATOR_PAUSE_MINIAPP",IDE_SIMULATOR_REFRESH_MINIAPP:"IDE_SIMULATOR_REFRESH_MINIAPP",IDE_SIMULATOR_REFRESH:"IDE_SIMULATOR_REFRESH",IDE_SIMULATOR_CLICK_LITE_BANNER:"IDE_SIMULATOR_CLICK_LITE_BANNER",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER",IDE_LITE_NOTICE_MODAL_SHOW:"IDE_LITE_NOTICE_MODAL_SHOW",IDE_LITE_NOTICE_MODAL_CLICK:"IDE_LITE_NOTICE_MODAL_CLICK",IDE_WB_SCENE_START:"IDE_WB_SCENE_START",IDE_WB_SCENE_END:"IDE_WB_SCENE_END",IDE_GECKO_ERROR:"IDE_GECKO_ERROR",PUCK_COMPILE_ERROR:"PUCK_COMPILE_ERROR",IDE_DEVTOOLS_PANEL_INIT:"IDE_DEVTOOLS_PANEL_INIT",IDE_DEVTOOLS_SENSORS_PANEL_USAGE:"IDE_DEVTOOLS_SENSORS_PANEL_USAGE",IDE_FRONT_PAGE_CLICK_SETTINGS:"IDE_FRONT_PAGE_CLICK_SETTINGS",IDE_AI_OPEN:"IDE_AI_OPEN",IDE_AI_QUESTION:"IDE_AI_QUESTION",IDE_AI_FEEDBACK:"IDE_AI_FEEDBACK",IDE_AI_OPEN_LINK:"IDE_AI_OPEN_LINK",IDE_AI_ABNORMAL_REPLY:"IDE_AI_ABNORMAL_REPLY",IDE_AI_BUTTON_SHOW:"IDE_AI_BUTTON_SHOW",IDE_AI_STAY_DURATION:"IDE_AI_STAY_DURATION",IDE_AI_RESPONSE_TIME:"IDE_AI_RESPONSE_TIME",IDE_AI_STREAM_TIME:"IDE_AI_STREAM_TIME",IDE_WS_RECONNECT_FAILED:"IDE_WS_RECONNECT_FAILED",IDE_DETAIL_CONFIG_ITEM_CLICK:"IDE_DETAIL_CONFIG_ITEM_CLICK",IDE_WORKBENCH_VIEW_STATUS:"IDE_WORKBENCH_VIEW_STATUS",IDE_POWER_EVENT:"IDE_POWER_EVENT",IDE_TASK_PERFORMANCE:"IDE_TASK_PERFORMANCE",IDE_EXCEPTION_RECORD:"IDE_EXCEPTION_RECORD",IDE_PROXY_ERROR_TRACE:"IDE_PROXY_ERROR_TRACE",IDE_EDITOR_RESOLVE_SNIPPET:"IDE_EDITOR_RESOLVE_SNIPPET",IDE_EDITOR_SNIPPET_CREATION:"IDE_EDITOR_SNIPPET_CREATION",IDE_EDITOR_REFERENCE:"IDE_EDITOR_REFERENCE",IDE_EDITOR_COMPLETION_SHOW:"IDE_EDITOR_COMPLETION_SHOW",IDE_MAIN_HELPER_FORK:"IDE_MAIN_HELPER_FORK",IDE_MAIN_HELPER_SPAWN:"IDE_MAIN_HELPER_SPAWN",IDE_MAIN_HELPER_READY:"IDE_MAIN_HELPER_READY",IDE_DOUYIN_OAUTH_BIND_CLICK:"IDE_DOUYIN_OAUTH_BIND_CLICK",IDE_USER_LOCAL_IP_COUNT:"IDE_USER_LOCAL_IP_COUNT",IDE_WEB_CREATE:"IDE_WEB_CREATE",IDE_WEB_LOAD:"IDE_WEB_LOAD",IDE_WEB_DETECT:"IDE_WEB_DETECT",IDE_ENABLE_LYNX_DEBUG:"IDE_ENABLE_LYNX_DEBUG",IDE_USE_LYNX_SCHEMA:"IDE_USE_LYNX_SCHEMA",IDE_LIVE_PLUGIN_NOT_DEV_MODE:"IDE_LIVE_PLUGIN_NOT_DEV_MODE",IDE_SHOW_DYCLOUD_MODAL:"IDE_SHOW_DYCLOUD_MODAL"}),t.IDE_MODULES={LOGIN:"LOGIN",MESSAGE:"MESSAGE",SIMULATOR:"SIMULATOR",SIMULATOR_USAGE:"SIMULATOR_USAGE",DEVTOOL:"DEVTOOL",DEVTOOL_USAGE:"DEVTOOL_USAGE",REFRESH:"REFRESH",CLEAR_CACHE:"CLEAR_CACHE",COMPILE_ORDINARY:"COMPILE_ORDINARY",SELF_COMPILE_MODE:"SELF_COMPILE_MODE",COMPILE:"COMPILE",PREVIEW:"PREVIEW",REMOTE_DEBUG:"REMOTE_DEBUG",UPLOAD:"UPLOAD",SIGN_CHECK:"SIGN_CHECK",INTELLIGENCE:"INTELLIGENCE",PROJECT_INSPECTION:"PROJECT_INSPECTION",AI:"AI",SHARE_PROJECT:"SHARE_PROJECT",PROJECT_MANAGE:"PROJECT_MANAGE",PROJECT_DETAIL:"PROJECT_DETAIL",CHECK_THIRD_PART_MINIAPP:"CHECK_THIRD_PART_MINIAPP",NPM_FUNCTION:"NPM_FUNCTION",EDITOR:"EDITOR",WORKBENCH:"WORKBENCH",SETTING:"SETTING",AVATAR:"AVATAR",UPDATE:"UPDATE",EDITOR_SAVE:"EDITOR_SAVE",MAIN_HELPER:"MAIN_HELPER",WEB_PC_SDK:"WEB_PC_SDK",SIGN_CHECKER_GUARANTEED_PAYMENT:"SIGN_CHECKER_GUARANTEED_PAYMENT",SIGN_CHECKER_TRADE_SYSTEM:"SIGN_CHECKER_TRADE_SYSTEM",TEST_QRCODE:"TEST_QRCODE",LYNX_DEBUG:"LYNX_DEBUG",SIMULATOR_HEART_BEAT:"SIMULATOR_HEART_BEAT",AI_COMMAND:"AI_COMMAND",AI_FAQ:"AI_FAQ"},t.IDE_TIMELINE_NAMES=r(r({},t.IDE_MODULES),{SIMULATOR_FIRST_LOADING_END:"SIMULATOR_FIRST_LOADING_END",SIMULATOR_LOADING:"SIMULATOR_LOADING",LOCAL_COMPILE:"LOCAL_COMPILE"}),t.IDE_PERFORMANCE_EVENTS={projectmanageCreated:"performance:projectmanageCreated",projectmanageReady:"performance:projectmanageReady",openProject:"performance:openProject",editorReady:"performance:editorReady",workbenchReady:"performance:workbenchReady",simulatorReady:"performance:simulatorReady",simulatorFirstLoadingEnd:"performance:simulatorFirstLoadingEnd",compilePartialEnd:"performance:compilePartialEnd",previewStart:"performance:previewStart",previewCodeReady:"performance:previewCodeReady",uploadStart:"performance:uploadStart",uploadEnd:"performance:uploadEnd",shareStart:"performance:shareStart",shareEnd:"performance:shareEnd",remoteDebugStart:"performance:remoteDebugStart",remoteDebugCodeReady:"performance:remoteDebugCodeReady"},t.FRONT_PAGE_EVENT={VELA_CAPTCHA_REQUEST:"VELA_CAPTCHA_REQUEST",VELA_CAPTCHA_FAIL:"VELA_CAPTCHA_FAIL",VELA_PHONE_CAPTCHA_REQUEST:"VELA_PHONE_CAPTCHA_REQUEST",VELA_PHONE_CAPTCHA_FAIL:"VELA_PHONE_CAPTCHA_FAIL",VELA_PHONE_LOGIN_REQUEST:"VELA_PHONE_LOGIN_REQUEST",VELA_PHONE_LOGIN_FAIL:"VELA_PHONE_LOGIN_FAIL",VELA_MAIL_LOGIN_REQUEST:"VELA_MAIL_LOGIN_REQUEST",VELA_MAIL_LOGIN_FAIL:"VELA_MAIL_LOGIN_FAIL",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_CHECK_EXIST_PROJECT_FAIL:"VELA_CHECK_EXIST_PROJECT_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_CHECK_TEMPLATE_FAIL:"VELA_CHECK_TEMPLATE_FAIL",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_DELETE_PROJECT_FAIL:"VELA_DELETE_PROJECT_FAIL",VELA_IMPORT_PROJECT:"VELA_IMPORT_PROJECT",VELA_IMPORT_PROJECT_FAIL:"VELA_IMPORT_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL:"VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL"}},5833:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PACK_TYPE=t.CompilerPlugin=void 0,(t.CompilerPlugin||(t.CompilerPlugin={})).TYPESCRIPT="typescript",(n=t.PACK_TYPE||(t.PACK_TYPE={})).FILE="file",n.FOLDER="folder",n.SUFFIX="suffix",n.PREFIX="prefix",n.GLOB="glob",n.REGEXP="regexp"},8039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_SLARDAR_EVENTS_TECH=t.UPDATE_SLARDAR_EVENTS=void 0,t.UPDATE_SLARDAR_EVENTS={IDE_LAUNCH:"IDE_LAUNCH",IDE_UPGRADE_SUGGGEST_POP:"IDE_UPGRADE_SUGGGEST_POP",IDE_UPGRADE_SUGGGEST_POP_CLOSE:"IDE_UPGRADE_SUGGGEST_POP_CLOSE",IDE_UPGRADE_SUGGGEST_POP_NO:"IDE_UPGRADE_SUGGGEST_POP_NO",IDE_UPGRADE_SUGGGEST_POP_YES:"IDE_UPGRADE_SUGGGEST_POP_YES",IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL:"IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL",IDE_UPGRADE_ICON:"IDE_UPGRADE_ICON",IDE_UPGRADE_ICON_CLOSE:"IDE_UPGRADE_ICON_CLOSE",IDE_UPGRADE_ICON_RESTART:"IDE_UPGRADE_ICON_RESTART",IDE_UPGRADE_ICON_VIEWDETAIL:"IDE_UPGRADE_ICON_VIEWDETAIL",IDE_FULLUPGRADE_POP:"IDE_FULLUPGRADE_POP",IDE_FULLUPGRADE_POP_CLOSE:"IDE_FULLUPGRADE_POP_CLOSE",IDE_FULLUPGRADE_POP_NO:"IDE_FULLUPGRADE_POP_NO",IDE_FULLUPGRADE_POP_YESBACK:"IDE_FULLUPGRADE_POP_YESBACK",IDE_FULLUPGRADE_POP_YESONCE:"IDE_FULLUPGRADE_POP_YESONCE",IDE_FULLUPGRADE_POP_VIEWDETAIL:"IDE_FULLUPGRADE_POP_VIEWDETAIL",IDE_FORCE_UPGRADE:"IDE_FORCE_UPGRADE"},t.UPDATE_SLARDAR_EVENTS_TECH={IDE_LOADER_IO_ERROR:"IDE_LOADER_IO_ERROR",IDE_LOADER_INSTALL_RECOVER_ERROR:"IDE_LOADER_INSTALL_RECOVER_ERROR",IDE_LOADER_START_FROM_ENTRY:"IDE_LOADER_START_FROM_ENTRY",IDE_LAUNCH_FAIL:"IDE_LAUNCH_FAIL"}},1061:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AppJSON=void 0;var l=s(n(9849)),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.__isGame=!1,t}return o(t,e),t.from=function(e){return u(this,void 0,void 0,(function(){var n,r;return c(this,(function(o){switch(o.label){case 0:return[4,l.readJson(e)];case 1:return n=o.sent(),(r=new t(n,e)).__isGame=e.endsWith("game.json"),[2,r]}}))}))},Object.defineProperty(t.prototype,"isGame",{get:function(){return this.__isGame},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLivePlugin",{get:function(){var e;return Array.isArray(null===(e=this.rawJSON)||void 0===e?void 0:e.liveCards)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subPackages",{get:function(){var e=this.__raw,t=e.subPackages,n=e.subpackages;return t||(void 0===n?[]:n)},enumerable:!1,configurable:!0}),t}(n(4169).JSONContainer);t.AppJSON=p},3652:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtJSON=void 0;var l=s(n(9849)),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.from=function(e){return u(this,void 0,void 0,(function(){return c(this,(function(n){switch(n.label){case 0:return[4,l.readJson(e)];case 1:return[2,new t(n.sent(),e)]}}))}))},t}(n(4169).JSONContainer);t.ExtJSON=p},4169:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.JSONContainer=void 0;var u=i(n(9849)),c=function(){function e(e,t){this.__raw=e,this.path=t}return Object.defineProperty(e.prototype,"rawJSON",{get:function(){return this.__raw},enumerable:!1,configurable:!0}),e.prototype.getKey=function(e,t){var n;return null!==(n=this.__raw[e])&&void 0!==n?n:t},e.prototype.update=function(e,t,n){return void 0===n&&(n=!1),a(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return this.__raw[e]=t,n?[4,u.writeJson(this.path,this.__raw,{spaces:2})]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},e}();t.JSONContainer=c},8559:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},l=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},p=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectConfig=t.PrivateState=t.getOriginAppid=t.isTestAppid=t.getIDEAppTechType=t.setIDEAppTechType=t.PROJECT_TYPE_MAP=t.DEFAULT_PROJECT_CONFIG=t.setEnvFunctionForProject=void 0;var f=s(n(9849)),h=s(n(1017)),_=n(1061),v=n(3652),m=n(4169),E=n(5833),g=n(7992),y=d(n(6503)),b=d(n(7921)),A=d(n(772)),O=d(n(3122)),C=d(n(298)),w=d(n(1395)),I=d(n(8337)),S=d(n(5513)),L=function(){return g.defaultEnv};t.setEnvFunctionForProject=function(e){L=e};var P={MICROAPP:"tt07e3715e98c9aac0",MICROGAME:"tt975be1e608633d4202",LIVE_PLUGIN:"ttb80eceb32739b50310",get TOYBOX(){return"boe"===L().env.type?"tte05d96e07f3bdfe710":"tt3c174aaaa32e0eb810"}};t.DEFAULT_PROJECT_CONFIG={appid:"testappId",projectname:"默认小程序名",setting:{urlCheck:!0,es6:!0,postcss:!0,minified:!0,newFeature:!0},scripts:{afterOpen:"",beforeCompile:""}},t.PROJECT_TYPE_MAP={microapp:"app",microgame:"game",toybox:"toybox",livePlugin:"liveplugin"};var R="";t.setIDEAppTechType=function(e){R=e},t.getIDEAppTechType=function(){return R};var T,D="testappid";function N(e,t){return void 0===t&&(t="app"),e.toLocaleLowerCase()===D?(null==R?void 0:R.includes("microapp"))?P.MICROAPP:(null==R?void 0:R.includes("toybox"))?P.TOYBOX:(null==R?void 0:R.includes("microgame"))?P.MICROGAME:(null==R?void 0:R.includes("liveplugin"))?P.LIVE_PLUGIN:"app"===t?P.MICROAPP:P.MICROGAME:e}t.isTestAppid=function(e){return Boolean(e)&&(e===P.MICROAPP||e===P.MICROGAME||e===P.TOYBOX||e===P.LIVE_PLUGIN||e.toLowerCase()===D)},t.getOriginAppid=N,function(e){e.ALWAYS="ALWAYS",e.NORMAL="NORMAL"}(T=t.PrivateState||(t.PrivateState={}));var x=function(e){function n(t){var n=t.rawJson,r=t.filepath,o=t.privateConfigPath,i=t.projectPath,a=t.publicJson,s=t.privateJson,u=e.call(this,n,r)||this;return u.projectPath=i,u.privateConfigPath=o,u.publicJson=a,u.privateJson=s,u._enablePrivateConfig=!1,u}return o(n,e),n.getKeyPath=function(){return n._keyPath||(n._keyPath=n.generateList(n.PRIVATE_CONFIG_KEYS)),n._keyPath},n.getKeyPathList=function(){return n.getKeyPath().map((function(e){return e[0]}))},n.generateList=function(e,t){return void 0===t&&(t=""),(0,y.default)(e,(function(e,r,o){var i,a=t?t+"."+o:o;return"string"==typeof(i=r)&&Object.values(T).includes(i)?e.push([a,r]):e.push.apply(e,p([],l(n.generateList(r,a)),!1)),e}),[])},n.from=function(e){return u(this,void 0,void 0,(function(){var t,r,o,i,a,s,u;return c(this,(function(c){switch(c.label){case 0:return t=h.join(e,"project.config.json"),r=h.join(e,"project.private.config.json"),[4,f.readJson(t)];case 1:return o=c.sent(),[4,(i=new n({rawJson:o,filepath:t,projectPath:e,publicJson:o,privateJson:{},privateConfigPath:r})).detectProjectType()];case 2:if("app"===c.sent()){a={};try{s=f.readJSONSync(r),(0,O.default)(s)&&(0,C.default)(s).length>0&&(a=s)}catch(e){}u=this.getMergedConfig(o,a),i.enablePrivateConfig(u,a)}return[2,i]}}))}))},n.fromJson=function(e,t){return new n({rawJson:e,filepath:h.join(t,"project.config.json"),projectPath:t,publicJson:e,privateJson:{},privateConfigPath:h.join(t,"project.private.config.json")})},n.getMergedConfig=function(e,t){var n,r=null!==(n=t.disablePrivate)&&void 0!==n?n:e.disablePrivate,o=(0,b.default)(e);return this.getKeyPath().forEach((function(e){if(e[1]===T.ALWAYS||!r){var n=(0,A.default)(t,e[0]);void 0!==n&&(0,S.default)(o,e[0],n)}})),o},n.prototype.update=function(t,r,o){var i;return u(this,void 0,void 0,(function(){var a,s,u,l,p,d,h;return c(this,(function(c){switch(c.label){case 0:return(null!==(i=this._enablePrivateConfig&&this.privateJson.disablePrivate)&&void 0!==i?i:this.publicJson.disablePrivate)?[4,e.prototype.update.call(this,t,r,o)]:[3,2];case 1:return c.sent(),[2];case 2:return a=n.getKeyPathList(),s=(0,I.default)(((d={})[t]=r,d),a),u=(0,C.default)(s).length>0,l=(0,w.default)(((h={})[t]=r,h),a),p=(0,C.default)(l).length>0,(0,S.default)(this.__raw,t,r),u&&(0,S.default)(this.privateJson,t,s[t]),p&&(0,S.default)(this.publicJson,t,l[t]),o?p?[4,f.writeJSON(this.path,this.publicJson,{spaces:2})]:[3,4]:[3,7];case 3:c.sent(),c.label=4;case 4:return u?[4,f.ensureFile(this.privateConfigPath)]:[3,7];case 5:return c.sent(),[4,f.writeJson(this.privateConfigPath,this.privateJson,{spaces:2})];case 6:c.sent(),c.label=7;case 7:return[2]}}))}))},n.prototype.enablePrivateConfig=function(e,t){this.privateJson=t,this.__raw=e,this._enablePrivateConfig=!0},n.prototype.getPublicRawJSON=function(){return this.publicJson},n.prototype.getPrivateRawJSON=function(){return this.privateJson},n.prototype.getAppid=function(){var e="";return this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),N(e)},n.prototype.getRealAppid=function(){return u(this,void 0,void 0,(function(){var e,t,n,r;return c(this,(function(o){switch(o.label){case 0:return e="",this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),t=N,n=[e],R?(r=void 0,[3,3]):[3,1];case 1:return[4,this.detectProjectType()];case 2:r=o.sent(),o.label=3;case 3:return[2,e=t.apply(void 0,n.concat([r]))]}}))}))},n.prototype.getRealPluginAppid=function(){return u(this,void 0,void 0,(function(){var e;return c(this,(function(t){return this.isPluginProject()?(e="",this.__raw.pluginAppid&&(e=this.__raw.pluginAppid),[2,"testpluginappid"===e.toLocaleLowerCase()?"testpluginappid":e]):[2,null]}))}))},n.prototype.getSetting=function(){var e;return null!==(e=this.__raw.setting)&&void 0!==e?e:t.DEFAULT_PROJECT_CONFIG.setting},n.prototype.getProjectName=function(){var e;return null!==(e=this.__raw.projectname)&&void 0!==e?e:""},n.prototype.getScripts=function(){var e;return null!==(e=this.__raw.scripts)&&void 0!==e?e:{afterOpen:"",beforeCompile:""}},n.prototype.getConditionData=function(e){var t,n;return null!==(n=null===(t=this.__raw.condition)||void 0===t?void 0:t[e])&&void 0!==n?n:{current:-1,list:[]}},n.prototype.getAutoCompileSetting=function(){var e;return null===(e=this.__raw.setting)||void 0===e?void 0:e.autoCompile},n.prototype.getCompileHotReloadSetting=function(){var e,t=null===(e=this.__raw.setting)||void 0===e?void 0:e.compileHotReLoad,n="native"===this.__raw.douyinProjectType;return t||void 0===t&&n},n.prototype.getNativeCompileSetting=function(){var e;return null===(e=this.__raw.setting)||void 0===e?void 0:e.nativeCompile},n.prototype.getLocalPluginsSetting=function(){var e,t;return null!==(t=null===(e=this.__raw.setting)||void 0===e?void 0:e.localPlugins)&&void 0!==t&&t},n.prototype.getAfterOpenScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.afterOpen},n.prototype.getBeforeCompileScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.beforeCompile},n.prototype.getSkipDomainCheck=function(){var e,t,n;return!(null===(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.urlCheck)||void 0===n||n)},n.prototype.getPreviewHotRestartCache=function(){var e,t,n;return null!==(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.IDEPreviewHotRestartCache)&&void 0!==n&&n},n.prototype.getPreviewOpenVConsole=function(){var e,t,n;return null!==(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.IDEPreviewOpenVConsole)&&void 0!==n&&n},n.prototype.getMiniprogramRoot=function(){var e,t;return null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.miniprogramRoot)&&void 0!==t?t:"./"},n.prototype.getPluginRoot=function(){var e,t;return null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.pluginRoot)&&void 0!==t?t:"./plugin"},n.prototype.isPluginProject=function(){return"plugin"===this.__raw.ttProjectType},n.prototype.getBigPackageSizeSupport=function(){var e,t,n;return null!==(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.bigPackageSizeSupport)&&void 0!==n&&n},n.prototype.getWebDetect=function(){var e,t,n;return null===(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.webDetect)||void 0===n||n},n.prototype.getPreviewPreload=function(){var e,t,n;return null===(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.previewPreload)||void 0===n||n},n.prototype.getPackOptions=function(){var e,t,n,r,o,i,a=null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.packOptions)&&void 0!==t?t:{},s=Object.values(E.PACK_TYPE),u=function(e){return"string"==typeof e.value&&!!e.value&&s.includes(e.type)};return{ignore:null!==(r=null===(n=a.ignore)||void 0===n?void 0:n.filter(u))&&void 0!==r?r:[],include:null!==(i=null===(o=a.include)||void 0===o?void 0:o.filter(u))&&void 0!==i?i:[]}},n.prototype.getLynxConfig=function(){return this.__raw.lynx},n.prototype.getLynxPackage=function(){var e,t;return JSON.stringify(null!==(t=null===(e=this.__raw.lynx)||void 0===e?void 0:e.debugSchema)&&void 0!==t?t:{})},n.prototype.detectProjectType=function(e){return u(this,void 0,void 0,(function(){var t;return c(this,(function(n){switch(n.label){case 0:return[4,this.getProjectType()];case 1:return t=n.sent(),[2,e?e===t:t]}}))}))},n.prototype.getProjectType=function(){return u(this,void 0,void 0,(function(){var e,n,r,o,i,a,s,u,l;return c(this,(function(c){switch(c.label){case 0:if((null==R?void 0:R.includes("microapp"))||(null==R?void 0:R.includes("microapp-plugin")))return[2,"app"];if((null==R?void 0:R.includes("unity"))||(null==R?void 0:R.includes("microgame"))||(null==R?void 0:R.includes("toybox")))return[2,"game"];if(this.__raw.ttProjectType)return"plugin"===this.__raw.ttProjectType?[2,"app"]:[2,t.PROJECT_TYPE_MAP[this.__raw.ttProjectType]];e=this.getMiniprogramRoot(),n=h.join(this.projectPath,e,"app.json"),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,f.readJson(n)];case 2:return r=c.sent(),Array.isArray(null==r?void 0:r.liveCards)?[2,"liveplugin"]:[3,4];case 3:return c.sent(),[3,4];case 4:return o=n.replace("app.json","app.ts"),i=n.replace("app.json","app.js"),[4,Promise.all([f.pathExists(n),f.pathExists(i),f.pathExists(o)])];case 5:if(a=c.sent(),this.useTypeScript()){if(a[0]&&(a[1]||a[2]))return[2,"app"]}else if(a[0]&&a[1])return[2,"app"];return s=n.replace("app.json","game.json"),u=s.replace("game.json","game.js"),[4,Promise.all([f.pathExists(s),f.pathExists(u)])];case 6:if((l=c.sent())[0]&&l[1])return[2,"game"];throw new Error("[ProjectConfig]Bad Project Type")}}))}))},n.prototype.getAppJSON=function(){return u(this,void 0,void 0,(function(){var e,t,n;return c(this,(function(r){switch(r.label){case 0:return[4,this.detectProjectType("app")];case 1:return(t=r.sent())?[3,3]:[4,this.detectProjectType("liveplugin")];case 2:t=r.sent(),r.label=3;case 3:return e=t?"app.json":"game.json",n=h.join(this.projectPath,this.getMiniprogramRoot(),e),[4,_.AppJSON.from(n)];case 4:return[2,r.sent()]}}))}))},n.prototype.getExtJSON=function(){return u(this,void 0,void 0,(function(){var e;return c(this,(function(t){switch(t.label){case 0:return e=h.join(this.projectPath,this.getMiniprogramRoot(),"ext.json"),[4,v.ExtJSON.from(e)];case 1:return[2,t.sent()]}}))}))},n.prototype.useTypeScript=function(){var e,t,n;return!!Array.isArray(null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.useCompilerPlugins)&&(null===(n=this.__raw.setting)||void 0===n?void 0:n.useCompilerPlugins.includes(E.CompilerPlugin.TYPESCRIPT))},n.PRIVATE_CONFIG_KEYS={disablePrivate:T.ALWAYS,setting:{urlCheck:T.NORMAL,mockLogin:T.NORMAL,autoPush:T.NORMAL,bigPackageSizeSupport:T.NORMAL,autoCompile:T.NORMAL,compileHotReLoad:T.NORMAL,nativeCompile:T.NORMAL,IDEPreviewHotRestartCache:T.NORMAL,webDetect:T.NORMAL},condition:T.NORMAL,packOptions:T.NORMAL,lynx:T.NORMAL},n}(m.JSONContainer);t.ProjectConfig=x},5622:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathname=t.watchBrowserINP=void 0;var r=n(935);t.watchBrowserINP=function(e){var t=new PerformanceObserver((function(n){n.getEntries().forEach((function(n){var o,i=n.duration,a=n.processingEnd-n.startTime,s=n.processingStart-n.startTime,u=n.processingEnd-n.processingStart,c=null===(o=null==n?void 0:n.target)||void 0===o?void 0:o.outerHTML;u<1||a<100||!c||setTimeout((function(){var o=function(e,t,n){var o=(0,r.getINPRelativeInformation)(e,t,n),i={};return o&&(null==o?void 0:o.matchedEvent.before.length)>0&&(i.eventBeforeDelay=o.matchedEvent.before.join(",")),o&&(null==o?void 0:o.matchedEvent.in.length)>0&&(i.eventInDelay=null==o?void 0:o.matchedEvent.in.join(",")),(null==o?void 0:o.stage.left)&&(i.stageBeforeDelay=null==o?void 0:o.stage.left),(null==o?void 0:o.stage.right)&&(i.stageAfterDelay=null==o?void 0:o.stage.right),(null==o?void 0:o.matchedLongtask)&&(i.matchedLongtask=o.matchedLongtask),i}(n.startTime,n.processingStart,i),l=s/n.duration*100,p=u/n.duration*100,d=c;c.length>400&&(d=c.slice(0,400));var f={outerHTML:d,type:n.name};Object.assign(f,o),e({metrics:{inp:i,inpt:a,inputDelay:s,processTime:u,inputDelayPercent:l,processPercent:p},tags:f},(function(){return t.disconnect()}))}),100)}))}));return setTimeout((function(){t.observe({type:"event",buffered:!0})}),3e4),t},t.getPathname=function(){try{return window.location.pathname.split("/dist")[1]}catch(e){return""}}},935:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getINPRelativeInformation=t.markEvent=t.markSlardarEventAsStage=t.markStage=t.markMaybeLongTask=t.markUnNameLongtask=void 0;var o,i=n(2139);!function(e){e.jsAnalyzeCode="jsAnalyzeCode",e.importTS="importTS",e.registerFileChange="registerFileChange",e.ttmlAnalyzeCode="ttmlAnalyzeCode",e._updateButtonSelected="_updateButtonSelected",e.handleSelectedStatus="handleSelectedStatus",e.getProcessUsage="getProcessUsage",e.flushNetworkCdpMsgAndDisconnect="flushNetworkCdpMsgAndDisconnect"}(o||(o={}));var a=[],s=[],u=[],c=0,l=function(){return c+=1,"uuid-"+Date.now()+"-"+c};t.markUnNameLongtask=function(e){var t=r(r({},e),{id:l()});s.push(t),s.length>20&&s.shift()},t.markMaybeLongTask=function(e,t){var n;if("start"===t)s.push({id:l(),tag:e,start:performance.now()}),s.length>20&&s.shift();else{if(!s.length)return;var r=s.reverse().find((function(t){return t.tag===e&&!t.end}));if(!r)return;r.end=performance.now(),r.duration=r.end-r.start,r.duration<200?s=s.filter((function(e){return e.id!==r.id})):n=r}return n};var p=!0,d=[{eventName:i.SLARDAR_EVENT.IDE_LOCAL_COMPILE_TRACE,categoryKeyPath:"step",stage:"afterInit"},{eventName:"IDE_PREVIEW_TRACE",categoryKeyPath:"step",stage:"afterInit"},{eventName:"IDE_SIMULATOR_COMPILE_TRACE",categoryKeyPath:"step",stage:"afterInit"},{eventName:i.SLARDAR_EVENT.IDE_SCENE_START,categoryKeyPath:"scene_name",stage:"afterInit"},{eventName:i.SLARDAR_EVENT.IDE_SCENE_END,categoryKeyPath:"scene_name",stage:"afterInit"},{eventName:"IDE_DEVTOOLS_TRACE",categoryKeyPath:"step",stage:"afterInit"}],f=[{eventName:"VELA_COMPILE_FIRST_END",stage:"init"},{eventName:i.SLARDAR_EVENT.VELA_COMPILE_FIRST_END,stage:"init"},{eventName:"SIMULATOR_FIRST_LOADING_END",stage:"init"},{eventName:"IDE_SIMULATOR_FIRST_RENDER_END",stage:"init"}].concat(d);t.markStage=function(e,t){u.push({stageName:t,timestamp:performance.now()}),u.length>20&&u.shift()},t.markSlardarEventAsStage=function(e,n){var r=f.find((function(t){return t.eventName===e}));r&&("IDE_SIMULATOR_FIRST_RENDER_END"===r.eventName&&(p=!1),(0,t.markStage)(r.stage,r.categoryKeyPath?e+"/"+n[r.categoryKeyPath]:e))};var h=[{eventName:i.SLARDAR_EVENT.IDE_MODULE_CLICK,categoryKeyPath:"moduleName"},{eventName:"IDE_MODULE_USAGE",categoryKeyPath:"moduleName"}].concat(d),_=[i.SLARDAR_EVENT.IDE_INP_INFO];t.markEvent=function(e,t){if(!_.includes(e)){var n=h.find((function(t){return t.eventName===e}));a.push({eventName:n?e+"/"+t[n.categoryKeyPath]:e,timestamp:performance.now()}),a.length>30&&a.shift()}};var v=function(e,t){return t-e.timestamp<1e4?e.stageName:p?"durationInit":"afterInit"};t.getINPRelativeInformation=function(e,t,n){if(!(n<500)){var o={},i=u.findIndex((function(t){return t.timestamp>e}));if(-1===i)(c=null==u?void 0:u[u.length-1])&&(o.left=v(c,t));else if(o.right=u[i].stageName,i-1>=0){var c=null==u?void 0:u[i-1];o.left=v(c,t)}var l=a.filter((function(n){return n.timestamp>e&&n.timestamp<t})).map((function(e){return e.eventName})),p=function(e){for(var t=[],n=new Set,r=a.length-1;r>=0;r--){var o=a[r];if(!(e-o.timestamp<0)){if(e-o.timestamp>=500)break;if(!n.has(o.eventName)&&(t.unshift(o.eventName),n.add(o.eventName),3===t.length))break}}return t}(e);a=a.filter((function(t){return t.timestamp>e-3e3}));var d=function(e,t){if(!(t-e<300)){var n=s.map((function(n){if(n.end)return n.start<e&&n.end>e||n.start>e&&n.end<t?r({},n):void 0})).filter(Boolean),o=s.findIndex((function(t){return t.start>=e-1e4}));return s=-1!==o?s.slice(o):[],n.map((function(e){return null==e?void 0:e.tag})).join(",")}}(e,t);return{stage:o,matchedEvent:{in:l,before:p},matchedLongtask:d}}}},6912:function(e,t,n){"use strict";var r,o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultPerfConfigSettings=t.skipReport=t.startTime=t.PROCESS_TYPE=t.compareCacheTriggerCount=t.getModuleUseCache=t.setModuleUseCache=t.timelineMap=t.moduleEventCacheMap=t.getHref=t.commonParams2Context=t.BID=t.getSystemMemory=t.getCPUModel=t.getPathname=void 0;var a=i(n(2037)),s=n(5622);Object.defineProperty(t,"getPathname",{enumerable:!0,get:function(){return s.getPathname}});var u="";function c(){try{return u||(u=a.default.cpus()[0].model)}catch(e){return u="none"}}t.getCPUModel=c;var l="";function p(){try{return l||(l=Math.round(a.default.totalmem()/1024/1024/1024).toString())}catch(e){return l="none"}}function d(e,n,r){t.moduleEventCacheMap[e][n]=r}function f(e,n){var r=t.moduleEventCacheMap[e];if(!r)throw Error("invalid event type: "+e);return r[n]||(r[n]={count:0,triggerNum:0}),r[n]}t.getSystemMemory=p,t.BID="electron_12345",t.commonParams2Context=function(e,t,n,r){var o,i,a,s,u,l,d,f,h,_,v,m,E,g;return{user_id:String(null!==(o=null==e?void 0:e.userId)&&void 0!==o?o:""),name:null!==(i=null==e?void 0:e.username)&&void 0!==i?i:"",device_id:null==e?void 0:e.deviceId,ide_version:null==e?void 0:e.ideVersion,os_version:null==e?void 0:e.osVersion,os_platform:null==e?void 0:e.osPlatform,dev_app_id:null!=t?t:"",ext_app_id:null!=r?r:"",tech_type:null!=n?n:"",ide_version_number:null!==(s=null===(a=null==e?void 0:e.ideVersionNumber)||void 0===a?void 0:a.toString())&&void 0!==s?s:"",ide_env:null!==(u=null==e?void 0:e.env)&&void 0!==u?u:"",branch:null!==(l=null==e?void 0:e.branch)&&void 0!==l?l:"",build_id:null!==(d=null==e?void 0:e.buildId)&&void 0!==d?d:"",buildId:null!==(f=null==e?void 0:e.buildId)&&void 0!==f?f:"",arch:null===process||void 0===process?void 0:process.arch,ide_version_int:null!==(h=null==e?void 0:e.ideVersionNumber)&&void 0!==h?h:0,is_sandbox:null!==(_=e.isSandbox)&&void 0!==_?_:"0",frameworkType:null!==(v=null==e?void 0:e.frameworkType)&&void 0!==v?v:"",workbench_mode:null!==(m=e.workbenchMode)&&void 0!==m?m:"",e2e_scene:null!==(g=null===(E=null===process||void 0===process?void 0:process.env)||void 0===E?void 0:E.IDE_E2E_SCENE)&&void 0!==g?g:"",cpu_model:c(),system_memory:p()}},t.getHref=function(){try{return window.location.href}catch(e){return""}},t.moduleEventCacheMap={click:{},call:{}},t.timelineMap=new Map,t.setModuleUseCache=d,t.getModuleUseCache=f,t.compareCacheTriggerCount=function(e,t,n,r,i){var a;if(void 0===i&&(i=Date.now()),1===n)return!0;var s=f(e,t),u=s.startTime,c=void 0===u?0:u,l=s.triggerNum,p=Number(l)+1;if(p<n)return d(e,t,o(o({},s),{triggerNum:p,startTime:null!==(a=s.startTime)&&void 0!==a?a:i})),!1;var h=r&&i-c>r;return d(e,t,o(o({},s),{startTime:h?i:void 0,triggerNum:h?1:0})),!h},t.PROCESS_TYPE={main:"main",renderer:"renderer"},t.startTime=Date.now(),t.skipReport="development"===(null===(r=null===process||void 0===process?void 0:process.env)||void 0===r?void 0:r.NODE_ENV),t.defaultPerfConfigSettings={disabled:!0,fps:{below:20,belowCount:3,maxReporterCount:10},interval:{duration:100,blockFactor:5,reportThreshold:6,longTaskDuration:2e3,longTaskDurationMain:800,maxReporterCount:10},memory:{freePercent:10,free:2097152,duration:1e4,maxReporterCount:10,winUsePowershell:!1},disabledHref:[],disabledMain:!1,ideUsageCollectInterval:3e5,disabledJsonWorker:!1}},4084:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.reportTeaImmediately=t.clearTeaEvents=t.reportTea=t.makeEvent=t.registerDevLogger=void 0;var c=u(n(4088)),l=n(6912),p=c.default.create({baseURL:"https://mcs.snssdk.com",timeout:6e4,headers:{"Content-Type":"application/json"}}),d=console.info;function f(e,t,n){return void 0===n&&(n=Date.now()),{event:e,params:JSON.stringify(t),time:Math.floor(n/1e3)}}t.registerDevLogger=function(e){d=e},t.makeEvent=f;var h,_,v=function(){function e(e,t,n){var r=this;void 0===t&&(t=1e3),void 0===n&&(n=10),this._events=[],this.reporterAll=function(){0!==r._events.length&&(r.reporter(s([],a(r._events),!1)),r.clear())},this.add=function(e,t,n){if(r._events.push(f(e,t,n)),r._events.length>=r.cacheLimit)return r.reporterAll();r.timerId||(r.timerId=setTimeout((function(){r.timerId=void 0,r.reporterAll()}),r.cacheDurationLimit))},this.clear=function(){r._events=[]},this.reporter=e,this.cacheDurationLimit=t,this.cacheLimit=n}return Object.defineProperty(e.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),e}();function m(e){var t;return!_&&(null==e?void 0:e.deviceId)&&(_={user:{user_unique_id:e.deviceId},header:{app_id:1733,app_version:e.ideVersion,headers:JSON.stringify({app_full_version:e.ideVersion}),os_name:e.osPlatform,os_version:e.osVersion,custom:{cli_name:null!==(t=e.cliName)&&void 0!==t?t:""}},verbose:1}),_}var E=new Set;function g(e){E.size<100?E.add(e):console.error("失败缓存超过100个,无法继续缓存")}t.reportTea=function(e,t,n,u){var c=this;void 0===n&&(n={}),h||(h=new v((function(e){return o(c,void 0,void 0,(function(){var n,o,u,c,f,h,_;return i(this,(function(i){switch(i.label){case 0:if(n=Object.assign({},m(t),{events:e}),l.skipReport)return null==d||d("[skip report tea]events "+(null===(_=n.events)||void 0===_?void 0:_.length)+": ",n.events),[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,p.post("/v1/json",n)];case 2:return i.sent(),[3,4];case 3:throw o=i.sent(),console.error("上报数据出错,进入重试队列",o,n.events),e.forEach((function(e){return g(e)})),u=s([],a(new Set((e||[]).map((function(e){return null==e?void 0:e.event})))),!1).join(","),Error("Tea report error, "+((null==o?void 0:o.message)||String(o))+", event count: "+(null==e?void 0:e.length)+", failed events: "+u);case 4:if(!(E.size>0))return[3,8];c=s([],a(E),!1),null==d||d("[will report failed events]count: "+E.size+", events",c),f=p.post("/v1/json",r(r({},n),{events:c})),E.clear(),i.label=5;case 5:return i.trys.push([5,7,,8]),[4,f];case 6:return i.sent(),[3,8];case 7:return h=i.sent(),console.error("上报数据出错",h,c),null==d||d("重试出错,重新放入队列"),c.forEach((function(e){return g(e)})),[3,8];case 8:return[2]}}))}))}))),h.add(e,n,u)},t.clearTeaEvents=function(){null==h||h.reporterAll()},t.reportTeaImmediately=function(e,t){var n,r=t.map((function(e){return f(e.event,e.params)})),o=Object.assign({},m(e),{events:r});l.skipReport?null==d||d("[skip report tea immediately]events "+(null===(n=o.events)||void 0===n?void 0:n.length)+": ",o.events):p.post("/v1/json",o).catch((function(e){console.error("上报数据出错",e)}))}},4415:function(e,t){"use strict";var n=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function r(e){return e.endsWith("/")?e:e.concat("/")}Object.defineProperty(t,"__esModule",{value:!0}),t.ensureEndSlash=t.formatSize=t.normalizeSize=void 0,t.normalizeSize=function(e){var t=e.__APP__,o=void 0===t?0:t,i=n(e,["__APP__"]),a={main:{path:"main",size:o},sub:[],total:o};return Object.keys(i).forEach((function(e){var t,n=i[e];null===(t=a.sub)||void 0===t||t.push({path:r(e),size:n}),a.total=a.total+n})),a},t.formatSize=function(e){return e>1048576?(e/1024/1024).toFixed(2)+"MB":e>1024?(e/1024).toFixed(1)+"KB":e+"B"},t.ensureEndSlash=r},7992:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setBoeMap=t.setJestMock=t.setSlardarInstance=t.setEnvFunction=t.defaultEnv=t.AxiosInstance=void 0;var a=i(n(4088)),s=n(2139),u=new Map;u.set(/https:\/\/microapp.bytedance.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),u.set(/https:\/\/developer.toutiao.com\/api\/apps\/v3\/meta(.*)/,"http://developer.toutiao.com.boe-gateway.byted.org/api/apps/v3/meta$1"),u.set(/https:\/\/developer.toutiao.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),u.set(/https:\/\/open-sandbox.douyin.com\/(.*)/,"http://open-sandbox-boe.bytedance.net/$1"),u.set(/https:\/\/developer.open-douyin.com\/(.*)/,"https://dy-open-platform-boe.bytedance.net/$1"),u.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/user\/tp_info)/,"http://developer-boe.toutiao.com/$1"),u.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/.*)/,"http://developer-boe.toutiao.com/$1"),u.set(/https:\/\/starkgame.zijieapi.com\/(.*)/,"http://starkpublish.bytedance.net/$1"),u.set(/https:\/\/cloud.douyin.com\/(.*)/,"https://douyincloud-boe.bytedance.net/$1");var c=["https://ma.zijieapi.com/api/apps/xconfig_meta"];t.setBoeMap=function(e,t){u.set(e,t)};var l={env:{type:"online",channel:""},proxy:{host:null,port:null}};t.defaultEnv=l;var p=function(){return l},d={reportRequestError:function(){},reportCustomEvent:function(){}},f=[function(e){var t,n,i;if(null===(i=e.headers)||void 0===i?void 0:i.online)return e;var a=p().env,s="boe"===a.type,l=a.channel;if(!s)return e;try{for(var d=r(u),f=d.next();!f.done;f=d.next()){var h=o(f.value,2),_=h[0],v=h[1];if(e.url&&_.test(e.url)&&!c.includes(e.url)){e.url=e.url.replace(_,v);break}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}return l&&e.headers&&!e.headers["ignore-channel"]&&(e.headers["X-TT-ENV"]=l),e},function(e){var t;if(null===(t=e.headers)||void 0===t?void 0:t.online)return e;var n=p().env,r="ppe"===n.type,o=n.channel;return r&&e&&e.headers&&(e.headers["X-USE-PPE"]=1),r&&e.headers&&o&&!e.headers["ignore-channel"]&&(e.headers["X-TT-ENV"]=o),e}],h=a.default.create({adapter:"http",timeout:6e4});t.AxiosInstance=h,h.interceptors.request.use((function(e){var t,r;null==d||d.reportCustomEvent(s.SLARDAR_EVENT.IDE_REQUEST_START,void 0,{url:null!==(t=null==e?void 0:e.url)&&void 0!==t?t:""});var o=p().proxy;return o.host?(null===(r=e.url)||void 0===r?void 0:r.startsWith("https://"))?(e.httpsAgent=n(1681).httpsOverHttp({proxy:{host:o.host,port:o.port},rejectUnauthorized:!1}),e.proxy=!1):e.proxy={host:o.host,port:o.port?+o.port:80}:(null==o?void 0:o.host)&&o.port||(e.proxy=!1),f.forEach((function(t){return t(e)})),e}),(function(e){return null==d||d.reportRequestError({url:null==e?void 0:e.url,statusMessage:String(e),caller:"interceptors.request.error"}),Promise.reject(e)})),h.interceptors.response.use((function(e){var t,n,r,o,i,a,s,u,c,l,p,f,h;return null===e.config.validateStatus||e.status>=200&&e.status<300||null==d||d.reportRequestError({url:null!==(n=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==n?n:null===(r=null==e?void 0:e.request)||void 0===r?void 0:r.url,ttLogId:String(null!==(a=null===(i=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.headers)||void 0===i?void 0:i["x-tt-logid"])&&void 0!==a?a:null===(s=null==e?void 0:e.headers)||void 0===s?void 0:s["x-tt-logid"]),statusCode:null==e?void 0:e.status,statusMessage:null==e?void 0:e.statusText,caller:"interceptors.response"}),process.env.isIDE&&console.info("[request] ",null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.url,"x-tt-logid",null!==(h=null!==(p=null===(l=null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.headers)||void 0===l?void 0:l["x-tt-logid"])&&void 0!==p?p:null===(f=e.headers)||void 0===f?void 0:f["x-tt-logid"])&&void 0!==h?h:""),e}),(function(e){var t,n,r,o,i,a,s,u,c,l,f,h,_,v,m;return console.info("[error request proxy]",p().proxy),null==d||d.reportRequestError({url:null!==(i=null!==(n=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==n?n:null===(o=null===(r=null==e?void 0:e.response)||void 0===r?void 0:r.config)||void 0===o?void 0:o.url)&&void 0!==i?i:null===(a=null==e?void 0:e.request)||void 0===a?void 0:a.url,statusCode:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.status,statusMessage:String(e),ttLogId:null!==(_=null!==(l=null===(c=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.headers)||void 0===c?void 0:c["x-tt-logid"])&&void 0!==l?l:null===(h=null===(f=null==e?void 0:e.response)||void 0===f?void 0:f.headers)||void 0===h?void 0:h["x-tt-logid"])&&void 0!==_?_:null===(m=null===(v=null==e?void 0:e.request)||void 0===v?void 0:v.headers)||void 0===m?void 0:m["x-tt-logid"],caller:"interceptors.response.error"}),Promise.reject(e)})),h.interceptors.request.use((function(e){return e.headers&&!e.headers.ignoreReferer&&(e.headers.Referer="developer.toutiao.com"),e})),t.setEnvFunction=function(e){p=e},t.setSlardarInstance=function(e){d=e},t.setJestMock=function(e){Object.entries(e).forEach((function(e){var t=o(e,2),n=t[0],r=t[1];h[n]=r}))}},9086:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.filterFile=void 0;var o=r(n(1017)),i=n(5833),a=r(n(4763));t.filterFile=function(e,t){e=e.replace(/\\/g,"/");var n=t.ignore||[],r=t.include||[];if("project.config.json"===e)return!1;var c=function(t){switch(t.type){case i.PACK_TYPE.FILE:return e===u(t.value);case i.PACK_TYPE.FOLDER:var n=t.value;return n.endsWith("/")&&(n=n.slice(0,-1)),s(u(n))&&(0,a.default)(u(n)+"/**/*")(e);case i.PACK_TYPE.GLOB:return(0,a.default)(u(t.value))(e);case i.PACK_TYPE.REGEXP:return new RegExp(t.value).test(e);case i.PACK_TYPE.PREFIX:return o.default.basename(e).startsWith(t.value);case i.PACK_TYPE.SUFFIX:return o.default.basename(e).endsWith(t.value);default:return!0}};return!r.some(c)&&n.some(c)};var s=function(e){return e.split("/").every((function(e){return".."!==e&&"."!==e}))},u=function(e){return e.startsWith("/")?e.slice(1):e}},4851:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubPath=t.isNeedForceUpdate=t.versionStringCompare=t.retryTask=t.sleep=t.waitUntil=t.parseJson=void 0;var a=i(n(1017));function s(e){return new Promise((function(t){return setTimeout(t,e)}))}t.parseJson=function(e,t){void 0===t&&(t={});try{return JSON.parse(e)}catch(e){return console.error("[parseJson]",e),t}},t.waitUntil=function(e,t,n){void 0===t&&(t=3e3),void 0===n&&(n=500);var r=Date.now(),o=!1;return new Promise((function(i){var a=setInterval((function(){(o||Date.now()-r>=t)&&(i(o),clearInterval(a));try{e().then((function(e){o=e})).catch((function(e){console.error("[waitUntil/task/promise]"+e.message)}))}catch(e){console.error("[waitUntil/task]"+e.message)}}),n)}))},t.sleep=s,t.retryTask=function(e,t,n){return void 0===t&&(t=10),void 0===n&&(n=1e3),r(this,void 0,void 0,(function(){var i,a,u,c=this;return o(this,(function(l){switch(l.label){case 0:i=0,a=function(){return r(c,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return"function"!=typeof n?[3,2]:[4,n()];case 1:return e.sent(),[3,4];case 2:return[4,s(n)];case 3:e.sent(),e.label=4;case 4:return[2]}}))}))},l.label=1;case 1:return i<t?1==++i?[3,3]:[4,a()]:[3,7];case 2:l.sent(),l.label=3;case 3:return l.trys.push([3,5,,6]),[4,e()];case 4:return l.sent(),[2];case 5:if(u=l.sent(),i===t)throw u;return console.error("task failed, will retry"),[3,6];case 6:return[3,1];case 7:return[2]}}))}))},t.versionStringCompare=function(e,t){void 0===e&&(e=""),void 0===t&&(t="");for(var n=e.split("-")[0].trim().split("."),r=t.split("-")[0].trim().split("."),o=Math.max(n.length,r.length),i=0,a=0;a<o;a++){var s=n.length>a?n[a]:"0",u=isNaN(Number(s))?s.charCodeAt(0):Number(s),c=r.length>a?r[a]:"0",l=isNaN(Number(c))?c.charCodeAt(0):Number(c);if(u<l){i=-1;break}if(u>l){i=1;break}}return i},t.isNeedForceUpdate=function(e){var n=e.curVersion,r=e.updateVersion,o=e.date,i=e.appType;if(r&&-1===(0,t.versionStringCompare)(n,r)){var a=new Date(o),s=new Date(a.getTime()-12096e5),u=new Date,c=a.getFullYear()+" 年 "+(a.getMonth()+1)+" 月 "+a.getDate()+" 日";return u>=a?{message:"当前版本 "+n+" 在 "+c+"后已不再提供服务,为了给你提供更好的体验,请将 "+i+" 升级至最新版本,感谢你的理解与支持。",type:"force"}:u>=s?{message:"为了给你提供更好的体验,请在 "+c+"前将 "+i+" 升级至最新版本。逾期未升级,我们将无法继续提供服务,感谢你的理解与支持。",type:"warn"}:null}return null},t.isSubPath=function(e,t){var n=a.default.relative(e,t);return n&&!n.startsWith("..")}},9251:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setAppConfig=t.getToken=void 0;var u,c=a(n(9849)),l=s(n(1017)),p=n(4263),d=s(n(8366)),f=l.default.join((0,p.getCliDefaultStoragePath)(),"appConfig.json");function h(){var e;try{var t=c.readJsonSync(f);e=(0,p.isObject)(t)?t:{}}catch(t){e={}}return e}t.getToken=function(e){var t;return u||(u=h()),null===(t=u[e])||void 0===t?void 0:t.token},t.setAppConfig=function(e){e.appid?(0,p.isObject)(e.config)?(c.ensureFileSync(f),(u=h())[e.appid]=r(r({},(0,p.isObject)(u[e.appid])?u[e.appid]:{}),e.config),c.writeJSONSync(f,u)):d.default.error("Config must be an object."):d.default.error("Appid is required to set app config.")}},9345:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.audit=t.getAuditHostsList=void 0;var s=n(7992),u=a(n(9258)),c=n(1728),l=n(5796);function p(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a,u,l,p;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,p={},[4,(0,c.getLogInfoHeaders)(t)];case 1:p.headers=i.sent(),n=p,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://microapp.bytedance.com/platform_api/v1/app/"+t+"/code_manager/versions",n)];case 3:return r=i.sent(),o=r.data||{},a=o.error,u=o.message,l=o.data,a?[2,{success:!1,msg:u||"Get host failed,please check if your appid is valid",data:l}]:[2,{success:!0,msg:"",data:l}];case 4:return[2,{success:!1,msg:i.sent().message,data:null}];case 5:return[2]}}))}))}function d(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a,u,l,p;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,p={},[4,(0,c.getLogInfoHeaders)(t)];case 1:p.headers=i.sent(),n=p,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://microapp.bytedance.com/platform_api/app/publish/v2/"+t+"/audit/host",n)];case 3:return r=i.sent(),o=r.data||{},a=o.error,u=o.message,l=o.data,a?[2,{success:!1,msg:u||"Get host failed,please check if your appid is valid",hostList:{},preHost:[]}]:l.hostList||l.preHost?[2,{success:!0,hostList:l.hostList,preHost:l.preHost}]:[2,{success:!1,msg:"You do not have permission to audit app",hostList:{},preHost:[]}];case 4:return[2,{success:!1,msg:i.sent().message,hostList:{},preHost:[]}];case 5:return[2]}}))}))}function f(e,t){return o(this,void 0,void 0,(function(){var n,o,a,l,p,d,f;return i(this,(function(i){switch(i.label){case 0:for(a in n="https://microapp.bytedance.com/api/v2/app/"+t+"/audit",o=new u.default,e)o.append(a,e[a]);return f={},p=[{}],[4,(0,c.getLogInfoHeaders)(t)];case 1:f.headers=r.apply(void 0,[r.apply(void 0,p.concat([i.sent()])),o.getHeaders()]),l=f,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.put(n,o,l)];case 3:if((d=i.sent()).data&&0===d.data.error)return[2,void 0];throw new Error(d.data.message);case 4:throw i.sent();case 5:return[2]}}))}))}t.getAuditHostsList=function(e){return o(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:return[4,d({appid:e.appid})];case 1:if(t=i.sent(),n=t.success,r=t.msg,o=t.hostList,n)return[2,Object.keys(o)];throw new Error(r)}}))}))},t.audit=function(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a,s,u;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,n=e.host,r=e.autoPublish,o=e.channel,[4,p({appid:t})];case 1:return a=i.sent(),s=a.success,u=a.msg,[4,(0,l.checkChannel)(t,o)];case 2:if(i.sent(),!s)throw new Error(u);return[4,f({auto_publish:r?1:0,host_chosen:n.toString(),notifyContent:"",test_report:"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1",versionTag:JSON.stringify({Tag:o})},t)];case 3:return i.sent(),[2]}}))}))}},9808:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.cliAuth=void 0;var a=i(n(1606)),s=i(n(6495)),u=i(n(8366)),c=n(4263),l=n(4113);function p(e){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return e.mobile?[2,"mobile"]:e.email?[2,"email"]:[4,s.default.prompt([{name:"action",type:"list",message:"Please choose login type:",choices:[{name:"Mobile",value:"mobile"},{name:"Email",value:"email"},{name:"Cancel",value:!1}]}])];case 1:return[2,t.sent().action]}}))}))}t.cliAuth=function(e){return r(this,void 0,void 0,(function(){var t,n,r,i;return o(this,(function(o){switch(o.label){case 0:return[4,p(e)];case 1:return(t=o.sent())?((0,c.clearConsole)(a.default.bold.green(("mobile"===t?"📱":" 📧")+" Sign in with "+t)),[4,s.default.prompt([{name:"inputRet",type:"input",message:"The "+("mobile"===t?"mobile number":"email")+":"}])]):[2];case 2:return n=o.sent().inputRet,"mobile"!==t?[3,6]:[4,(0,l.sendVerificationCodeToPhone)({phoneNumber:n})];case 3:return o.sent(),u.default.info("🎉 Send verification code success"),[4,s.default.prompt([{name:"code",type:"input",message:"The verification code:"}])];case 4:return r=o.sent().code,[4,(0,l.loginByPhone)({phoneNumber:n,code:r})];case 5:return o.sent(),[3,9];case 6:return[4,s.default.prompt([{name:"pwd",type:"password",message:"The password:"}])];case 7:return i=o.sent().pwd,[4,(0,l.loginByEmail)({email:n,password:i})];case 8:o.sent(),o.label=9;case 9:return u.default.info("🎉 Login success"),[2]}}))}))}},2893:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getConfig=t.setConfig=void 0;var s=n(7992),u=n(8559),c=a(n(469)),l=i(n(9849)),p=i(n(1017)),d=n(7310),f=a(n(8366)),h=n(4263),_=(0,h.getCliDefaultStoragePath)(),v=p.join(_,"config.json"),m={proxy:null,tempFilePath:null,storagePath:_,url:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/microapp/make_schema",compileProgress:"https://microapp.bytedance.com/api/v1/app/${appid}/compile_progress",preview:"https://developer.toutiao.com/api/v2/app/${appid}/preview",upload:"https://developer.toutiao.com/api/v2/app/${appid}/testing",check:"https://developer.toutiao.com/api/developer/ide/v1/microapp/query_check_progress",emailLogin:"https://developer.toutiao.com/passport/web/email/login/",mobileLogin:"https://developer.toutiao.com/passport/web/sms_login/",sendLoginCode:"https://developer.toutiao.com/passport/web/send_code/",getUserInfo:"https://microapp.bytedance.com/platform_api/v1/app/microappadmincomm/getUserInfo"},interactGameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/v1/compile_progress",preview:"https://developer.toutiao.com/api/developer/ide/v1/preview",upload:"https://developer.toutiao.com/api/developer/ide/v1/testing"},microgameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/microgame/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/microgame/v1/compile_progress?appid=",preview:"https://developer.toutiao.com/api/developer/ide/microgame/v1/preview?appid=",upload:"https://developer.toutiao.com/api/developer/ide/microgame/v1/testing?appid=",versionInfo:"https://developer.toutiao.com/api/developer/ide/microgame/v1/versions?appid=",sizeLimit:"https://developer.toutiao.com/api/developer/ide/microgame/v1/get_package_size_limit?appid=",unityCompileProgress:"https://developer.toutiao.com/api/developer/ide/microgame/v1/sc_compile_progress",unityPreview:"https://developer.toutiao.com/api/developer/ide/microgame/v1/sc_preview",getChannelNumber:"https://developer.toutiao.com/api/developer/ide/microgame/v1/get_exist_test_version"},env:{type:"online",channel:""},allowReportEvent:!0},E=(0,c.default)(m);if((0,h.isCli)()&&(l.existsSync(v)?((E=l.readJSONSync(v)).url.emailLogin=m.url.emailLogin,E.url.mobileLogin=m.url.mobileLogin,E.url.sendLoginCode=m.url.sendLoginCode,E.url.getUserInfo=m.url.getUserInfo):(l.ensureFileSync(v),l.writeJsonSync(v,m))),!(0,h.isIDE)()){var g=function(){var e=E.proxy,t=e?new d.URL(e):null;return{env:E.env,proxy:{host:t?t.hostname:null,port:t?t.port:null}}};(0,s.setEnvFunction)(g),(0,u.setEnvFunctionForProject)(g)}t.setConfig=function(e,t){if(void 0===t&&(t=!1),t)E=(0,c.default)(m),f.default.info("setConfig "+JSON.stringify(m,null,2));else{for(var n in e)"object"==typeof e[n]?E[n]=Object.assign(E[n],(0,c.default)(e[n])):E[n]=(0,c.default)(e[n]);f.default.info("setConfig "+JSON.stringify(e))}(0,h.isCli)()&&l.writeJsonSync(v,E)},t.getConfig=function(){return Object.assign({},E)}},2173:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProject=void 0;var c=n(7992),l=i(n(9849)),p=i(n(1017)),d=u(n(2541)),f=n(2696),h=u(n(8366)),_=n(4263);function v(e,t){return a(this,void 0,void 0,(function(){var n=this;return s(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,o){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n=p.join(t,"template.zip"),i=l.createWriteStream(n),[4,c.AxiosInstance.get(e,{responseType:"stream"})];case 1:return a.sent().data.pipe(i),i.on("finish",(function(){l.createReadStream(n).pipe(d.default.Extract({path:t})).on("close",(function(){l.unlinkSync(n),r()})).on("error",(function(e){l.unlinkSync(n),o(e)}))})).on("error",(function(e){o(e)})),[2]}}))}))}))];case 1:return[2,r.sent()]}}))}))}t.createProject=function(e){return a(this,void 0,void 0,(function(){var t,n,r,o,i,a,u,c;return s(this,(function(s){switch(s.label){case 0:return t=e.projectName,n=e.force,r=e.template,o=e.plugin,i=!0===o,(a=e.type)||(a="js"),(u=e.targetDir)||(u=p.resolve(process.cwd(),t||".")),l.existsSync(u)?n?[4,l.remove(u)]:[3,2]:[3,3];case 1:return s.sent(),h.default.info("Remove "+u),[3,3];case 2:throw new Error(u+" Exist");case 3:return l.ensureDirSync(u),i?[4,v(f.TEMPLATE_PLUGIN_DOWNLOAD_URL,u)]:[3,6];case 4:return s.sent(),[4,(0,_.createProjectConfigFile)(t,u,!1,i)];case 5:return s.sent(),[3,11];case 6:return"rich"!==r?[3,8]:(c="js"===a?f.TEMPLATE_DOWNLOAD_URL:f.TS_TEMPLATE_DOWNLOAD_URL,h.default.info("⚙️ Installing template. This might take a while...."),[4,v(c,u)]);case 7:return s.sent(),[3,11];case 8:return"empty"!==r?[3,11]:[4,l.copy(p.join((0,_.getPackageRoot)(),"./templates/"+("js"===a?"empty":"empty-ts")),u)];case 9:return s.sent(),[4,(0,_.createProjectConfigFile)(t,u,"ts"===a,i)];case 10:s.sent(),s.label=11;case 11:return h.default.info("🎉 Successfully created project "+t),[2]}}))}))}},4113:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.logout=t.checkSession=t.loginByPhone=t.sendVerificationCodeToPhone=t.loginByEmail=void 0;var s=n(2747),u=n(7992),c=a(n(3477)),l=n(1728),p=a(n(8366)),d=n(4263),f=n(2893),h=n(8066),_={aid:1365};function v(e){return o(this,void 0,void 0,(function(){var t,n,o,a,s,l,p;return i(this,(function(i){switch(i.label){case 0:t=e.type,n=e.params,o=(0,f.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,u.AxiosInstance.post("mobile"===t?o.url.mobileLogin:o.url.emailLogin,c.default.stringify(r(r({},_),n)),{headers:{"content-type":"application/x-www-form-urlencoded","ignore-channel":!0}})];case 2:return a=i.sent(),s=a.data,l=a.headers,[2,{success:p="success"===s.message,cookies:l["set-cookie"],msg:p?"":s.data.description||"Login failed, please try again",userId:s.data.user_id_str}];case 3:return[2,{success:!1,msg:i.sent().message,cookies:null,userId:""}];case 4:return[2]}}))}))}function m(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return t=(0,f.getConfig)(),e?[3,2]:[4,(0,l.getUserCookies)()];case 1:e=i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,u.AxiosInstance.get(t.url.getUserInfo,{params:{},headers:{Cookie:e}})];case 3:return n=i.sent().data,r=!n.error,o=void 0,r&&(a=n.data,o={username:a.name||"",avatar:a.avatar||"",developerId:a.developerId||"",mobile:a.mobile||"",email:a.email||"",auditStatus:a.auditStatus||0,uid:a.uId}),[2,{success:r,userData:o,msg:r?"":"Login fail, please try later"}];case 4:return[2,{success:!1,msg:i.sent().message}];case 5:return[2]}}))}))}function E(e){return o(this,void 0,void 0,(function(){var t,n,o;return i(this,(function(i){switch(i.label){case 0:t=(0,f.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,u.AxiosInstance.get(t.url.sendLoginCode,{params:r(r({},_),{type:24,mobile:e}),headers:{"User-Agent":"bytedanceide"}})];case 2:return n=i.sent().data,[2,{success:o="success"===n.message,msg:o?"":"Get verification code fail, please try later"}];case 3:return[2,{success:!1,msg:i.sent().message}];case 4:return[2]}}))}))}t.loginByEmail=function(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a,u,c,p,f,_,E;return i(this,(function(i){switch(i.label){case 0:return t=e.email,n=e.password,r=e.dontSaveCookie,(0,d.validateEmail)(t),[4,v({type:"email",params:{mix_mode:1,email:(0,d.mixEncode)(t),password:(0,d.mixEncode)(n)}})];case 1:if(o=i.sent(),a=o.success,u=o.msg,c=o.cookies,p=o.userId,!a||!c)throw new s.LoginError(u);return[4,m(c)];case 2:if(f=i.sent(),_=f.success,E=f.msg,!_)throw new s.LoginError(E);return r||(0,l.saveUserCookies)(c,p),h.CliMonitor.updateCommonParams({userId:p}),[2,c]}}))}))},t.sendVerificationCodeToPhone=function(e){return o(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=e.phoneNumber,(0,d.validatePhoneNumber)(t),[4,E(t)];case 1:if(!(n=r.sent()).success)throw new s.LoginError(n.msg);return[2]}}))}))},t.loginByPhone=function(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a,u,c,p,f,_,E;return i(this,(function(i){switch(i.label){case 0:return t=e.phoneNumber,n=e.code,r=e.dontSaveCookie,(0,d.validatePhoneNumber)(t),(0,d.validateVerificationCode)(n),[4,v({type:"mobile",params:{mobile:t,code:n}})];case 1:if(o=i.sent(),a=o.success,u=o.msg,c=o.cookies,p=o.userId,!a||!c)throw new s.LoginError(u);return[4,m(c)];case 2:if(f=i.sent(),_=f.success,E=f.msg,!_)throw new s.LoginError(E);return r||(0,l.saveUserCookies)(c,p),h.CliMonitor.updateCommonParams({userId:p}),[2,c]}}))}))},t.checkSession=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:e={isValid:!1,errMsg:null,username:void 0},i.label=1;case 1:return i.trys.push([1,3,,4]),[4,m()];case 2:return t=i.sent(),n=t.success,r=t.msg,o=t.userData,e.isValid=n,e.errMsg=r,e.username=null==o?void 0:o.username,[3,4];case 3:return a=i.sent(),e.errMsg=a.message,[3,4];case 4:return e.isValid?p.default.info("✅ 已登录(Logged in with "+e.username+")"):p.default.info("❌ 未登录(Not logged in, reason: "+e.errMsg+")"),[2,e]}}))}))},t.logout=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return(0,l.removeUserCookies)(),h.CliMonitor.updateCommonParams({userId:""}),p.default.info("✅ Logout success"),[2]}))}))}},3077:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAppVersions=t.fetchMeta=t.isRealToyId=t.getMeta=void 0;var a=n(2747),s=n(7992),u=n(1728),c=n(4263);function l(e){var t=e.appid,n=e.isGame,r=void 0!==n&&n;return o(this,void 0,void 0,(function(){var e,n,o,c;return i(this,(function(i){switch(i.label){case 0:return e=function(e){return"https://developer.toutiao.com/api/apps/v3/meta?appid="+e+"&aid=13&version=current&ttcode=OVCNW/U0UREwv0sHdY9Rm16vBgGrCQIBOWurUCmJ1H6d/2XHLKeOYTYfEJIEeC0AOCwBZAR2j34C4tFN7Nqfq9tHVEpM4OuJM2b8qz0INtUs1qLhKFOtnGa9/Ey0WW86GGocJk074eP72MMhzNmePzaTQzXwn/eqEq4GHwyF2Tg=&aid=1365"}(t),[4,(0,u.getLogInfoHeaders)(t)];case 1:return n=i.sent(),o={},r&&(e="https://developer.toutiao.com/api/developer/ide/v1/version_info",o.app_id=t,o.stage="current"),[4,s.AxiosInstance.get(e,{headers:n,params:o})];case 2:return(c=i.sent().data).error&&0!==c.error||c.code&&0!==c.code?[4,Promise.reject(new a.MetaError(c.data))]:[3,4];case 3:return[2,i.sent()];case 4:return[2,c]}}))}))}t.getMeta=function(e){var t,n;return o(this,void 0,void 0,(function(){var r,o,a,s;return i(this,(function(i){switch(i.label){case 0:return r=e.appid,o=e.isGame,a=void 0!==o&&o,(0,c.validateAppId)(r),[4,l(e)];case 1:return s=i.sent(),a?[2,{version:null===(t=s.data)||void 0===t?void 0:t.current_version}]:[2,{version:null===(n=s.data)||void 0===n?void 0:n.version}]}}))}))},t.isRealToyId=function(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,l({appid:e})];case 1:return[2,!!(t=n.sent().data)&&16===t.tech_type]}}))}))},t.fetchMeta=l,t.getAppVersions=function(e,t){return void 0===t&&(t=!1),o(this,void 0,void 0,(function(){var n,o,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),[4,(0,u.getLogInfoHeaders)(e)];case 1:return n=i.sent(),o={},t&&(o={is_plugin:1}),[4,s.AxiosInstance.get("https://developer.toutiao.com/api/developer/ide/v1/microapp/versions",{headers:n,params:r({app_id:e},o)})];case 2:return(c=i.sent().data).code&&0!==c.code?[4,Promise.reject(new a.MetaError(c.msg))]:[3,4];case 3:return[2,i.sent()];case 4:return[2,c.data];case 5:return i.sent(),[2,{audit_version:"0.0.0"}];case 6:return[2]}}))}))}},5787:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkChannel=t.getChannelLimit=t.projectToQRCode=t.upload=t.preview=void 0;var d=n(2747),f=n(7992),h=p(n(9258)),_=a(n(9849)),v=a(n(1017)),m=p(n(7086)),E=n(7312),g=n(9396),y=n(1728),b=p(n(8366)),A=n(5879),O=n(4486),C=n(2997),w=n(4263),I=n(2893),S=n(5834),L=n(1017),P=n(9428),R=p(n(9508)),T=(0,w.getCliDefaultStoragePath)(),D=v.join(T,"preview.json"),N={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default"},x={preview:N,debug:N};if((0,w.isCli)())if(_.existsSync(D))try{x=_.readJSONSync(D)}catch(e){}else _.ensureFileSync(D),_.writeJsonSync(D,x);function j(e){var t,n,o,i;return s(this,void 0,void 0,(function(){var a,s,c,l,p,v,m,b,A,O,C,w,S,P,R,T,D,N,x,j,M,k,U,F,G,B;return u(this,(function(u){switch(u.label){case 0:return a=e.devAppid,s=e.projectPath,c=e.type,l=e.uploadVersion,p=e.uploadChangeLog,v=e.uploadNeedUploadSourcemap,m=e.localCompileVersion,b=e.extraCheckInfoJson,A=e.extraInfoJson,O=e.channel,w=new h.default,[4,(0,g.getSizeLimitConfig)(a)];case 1:return S=u.sent(),P=1024*S.subTotal*1024,[4,(0,E.folderToZipStream)(s,{whiteList:[],useTypeScript:!1},!0,P)];case 2:return R=u.sent(),T=(0,I.getConfig)(),D=f.AxiosInstance.put,"preview"!==c?[3,3]:(C=T.microgameUrl.preview+a,[3,5]);case 3:return[4,H(a,O)];case 4:u.sent(),C=T.microgameUrl.upload+a,w.append("version",l),w.append("intro",p),w.append("need_upload_sourcemap",String(!!v)),w.append("extra_check_info_json",b),O&&w.append("tag",O),u.label=5;case 5:return[4,_.readJson((0,L.join)(s,"game.json"))];case 6:return N=u.sent(),x=null!==(t=N.subPackages)&&void 0!==t?t:N.subpackages,w.append("subpackage",String(Boolean(null==x?void 0:x.length))),w.append("local_compile_version",null!=m?m:"4.0.4-rc.17.ide.2.cli"),w.append("source",R,{filename:"source.zip"}),A&&w.append("extra_info_json",A),U=D,F=[C,w],G={},B={},[4,(0,y.getUserCookies)()];case 7:return[4,U.apply(void 0,F.concat([(G.headers=r.apply(void 0,[(B.Cookie=u.sent(),B),w.getHeaders()]),G.maxBodyLength=P,G)]))];case 8:if(j=u.sent(),M=j.data,k=j.headers,0===M.error||0===M.code)return[2,{metrics:null!==(n=M.performance_metrics)&&void 0!==n?n:{},logId:null!==(o=null==k?void 0:k["x-tt-logid"])&&void 0!==o?o:""}];throw new d.UploadError(null!==(i=M.message)&&void 0!==i?i:M.msg,M.error)}}))}))}function M(e){return s(this,void 0,void 0,(function(){var t,n,r,o;return u(this,(function(i){switch(i.label){case 0:return r={},o={},[4,(0,y.getUserCookies)()];case 1:return r.headers=(o.Cookie=i.sent(),o),t=r,n=(0,I.getConfig)().microgameUrl.compileProgress+e,[4,f.AxiosInstance.get(n,t).then((function(e){var t,n,r,o=e.data||{},i=o.error,a=o.status,s=o.message;return 1===i?{success:!1,done:!1,error:i,msg:s,errLink:null!==(t=e.data.err_link)&&void 0!==t?t:"",passJson:{}}:{success:!0,done:0===i&&2===a,error:i,msg:"",metrics:null!==(n=e.data.performance_metrics)&&void 0!==n?n:{},errLink:null!==(r=e.data.err_link)&&void 0!==r?r:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,i.sent()]}}))}))}function k(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,r){var o=setInterval((function(){return s(t,void 0,void 0,(function(){var t,i,a,s,c,l,p,f,h;return u(this,(function(u){switch(u.label){case 0:return[4,M(e)];case 1:return t=u.sent(),i=t.success,a=t.msg,s=t.error,c=t.errLink,l=t.metrics,p=t.done,f=t.passJson,i||(clearInterval(o),h=new d.CompileError(a,c,s),r(h)),p&&(clearInterval(o),n({metrics:null!=l?l:{},passJson:f})),[2]}}))}))}),1e3)}))];case 1:return[2,n.sent()]}}))}))}function U(e,t){return s(this,void 0,void 0,(function(){var n,r,o,i,a,s,l,p,d;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),n=["**/*.js"],[4,(0,R.default)(n,{cwd:t,onlyFiles:!0,ignore:["**/node_modules/**"]})];case 1:r=u.sent(),o=[],i=function(n){var r=v.join(t,n);try{_.readFileSync(r,"utf-8").split("\n").forEach((function(t,r){t.includes(e)&&o.push(n+":"+(r+1))}))}catch(e){console.error("[precheck/code search] 文件读取错误",e)}};try{for(a=c(r),s=a.next();!s.done;s=a.next())l=s.value,i(l)}catch(e){p={error:e}}finally{try{s&&!s.done&&(d=a.return)&&d.call(a)}finally{if(p)throw p.error}}return[2,o];case 2:return u.sent(),[2,[]];case 3:return[2]}}))}))}function F(e){var t,n,o,i,a,p,_=e.appid,v=e.extraCheckInfoJson,m=e.zipStream,E=e.updateStatus,g=e.setCheckResult,b=e.projectPath,A=e.isNewPlatform;return s(this,void 0,void 0,(function(){var e,s,O,C,w,I,S,L,P,R,T,D,N,x,j,M,k,F,G,B,H,V,Z,W,q;return u(this,(function(u){switch(u.label){case 0:if(e=new h.default,v)return[3,11];if(!b)return[3,9];s=[["side_bar","navigateToScene"],["add_short_cut","addShortcut"],["subscribe_message","requestSubscribeMessage"],["aweme_pay","openAwemeCustomerService"],["normal_pay","requestGamePayment"],["interstitial_ad","createInterstitialAd"],["reward_video_ad","createRewardedVideoAd"]],O={code_use:{}},u.label=1;case 1:u.trys.push([1,6,7,8]),C=c(s),w=C.next(),u.label=2;case 2:return w.done?[3,5]:(I=l(w.value,2),S=I[0],[4,U(I[1],b)]);case 3:L=u.sent(),O.code_use[S]={use:L.length>0,path:L},u.label=4;case 4:return w=C.next(),[3,2];case 5:return[3,8];case 6:return P=u.sent(),F={error:P},[3,8];case 7:try{w&&!w.done&&(G=C.return)&&G.call(C)}finally{if(F)throw F.error}return[7];case 8:return e.append("extra_check_info_json",JSON.stringify(O)),[3,10];case 9:return[2,!1];case 10:return[3,12];case 11:e.append("extra_check_info_json",v),u.label=12;case 12:return m&&e.append("source",m,{filename:"source.zip"}),D=(T=f.AxiosInstance).request,B={url:"https://developer.toutiao.com/api/developer/ide/microgame/v1/check",method:"put",data:e,params:{appid:_}},H={},[4,(0,y.getUserCookies)()];case 13:return[4,D.apply(T,[(B.headers=r.apply(void 0,[(H.Cookie=u.sent(),H),e.getHeaders()]),B)])];case 14:if(4===(R=u.sent().data).status){console.error("预检审核失败,失败原因");try{for(N=c(null!==(t=R.data.check_list)&&void 0!==t?t:[]),x=N.next();!x.done;x=N.next())4===(null==(k=x.value)?void 0:k.status)&&console.error("error: ",null==k?void 0:k.message),3===(null==k?void 0:k.status)&&console.info("warning: ",null==k?void 0:k.message)}catch(e){V={error:e}}finally{try{x&&!x.done&&(Z=N.return)&&Z.call(N)}finally{if(V)throw V.error}}return null==A||A(null!==(n=null==R?void 0:R.is_game_migrate)&&void 0!==n&&n),null==E||E({upload:1,check:R.data.check_list?R.status:2,compile:1}),null==g||g({status:R.data.check_list?R.status:2,result:null!==(o=R.data.check_list)&&void 0!==o?o:[]}),[2,!1]}if(3===R.status)try{for(j=c(null!==(i=R.data.check_list)&&void 0!==i?i:[]),M=j.next();!M.done;M=j.next())3===(null==(k=M.value)?void 0:k.status)&&console.info("warning: ",null==k?void 0:k.message)}catch(e){W={error:e}}finally{try{M&&!M.done&&(q=j.return)&&q.call(j)}finally{if(W)throw W.error}}else if(0===R.status)throw new d.UploadError(R.message);return null==A||A(null!==(a=null==R?void 0:R.is_game_migrate)&&void 0!==a&&a),null==E||E({upload:1,check:R.data.check_list?R.status:2,compile:1}),null==g||g({status:R.data.check_list?R.status:2,result:null!==(p=R.data.check_list)&&void 0!==p?p:[]}),[2,!0]}}))}))}function G(e){var t,n,r,o,i;return s(this,void 0,void 0,(function(){var a,s,c,l,p,f,h,v,E,y,I,L,R,T,M,U,G,B,H,V,Z,W,q,$,z,K,J,X,Y,Q,ee,te;return u(this,(function(u){switch(u.label){case 0:return[4,(0,C.isCliNeedForceUpdate)("microgame")];case 1:return u.sent(),a={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},s=e.project,c=e.page,l=e.qrcode,p=e.cache,f=e.uploadOptions,h=e.extraInfoJson,v=e.localCompileVersion,E=e.ideConfig,y=e.debug,I=e.uploadCache,L=e.supportSourcemap,R=e.enableHotRestartCache,T=e.setCheckResult,M=e.updateStatus,U=e.isNewPlatform,G=s.path,[4,(0,P.getProjectHash)(G,!0).catch((function(){return""}))];case 2:return B=u.sent(),H=f?"upload":"preview",V=!1,W=x[Z=y?"debug":"preview"]||N,c&&!c.scene&&(c.scene="990001"),p&&((0,w.isCli)()||(null==E?void 0:E.previewScene)===W.previewScene)&&B&&W.hash===B&&W.shortUrl&&W.expireTime>Date.now()/1e3?(a.shortUrl=W.shortUrl,a.expireTime=W.expireTime,a.originSchema=W.originSchema,a.useCache=!0,b.default.info("项目文件无变动,使用缓存"),V=!0,[3,17]):[3,3];case 3:return(0,A.addNodeToMetrics)(a.metrics,"compileCreate"),[4,(0,w.getProjectConfig)(G)];case 4:return[4,(q=u.sent()).getAppid()];case 5:return $=u.sent(),[4,(0,g.validateAppId)($)];case 6:return u.sent(),(0,A.addFieldToMetrics)(a.metrics,"appId",$),z=b.default.loading("正在准备上传..."),I&&B&&W.hash===B&&W.shortUrl&&W.expireTime>Date.now()/1e3?[3,14]:[4,(0,g.verifyPkgSize)(G,q)];case 7:if(K=u.sent())throw new d.ProjectError(K);return"upload"!==H||(0,w.isIDE)()?[3,9]:[4,(0,S.getMeta)($)];case 8:if((J=u.sent())&&f&&1===(0,m.default)(J,f.version))throw new d.UploadError(f.version+" is smaller than "+J+"(online version)");u.label=9;case 9:return"upload"!==H?[3,11]:[4,F({appid:$,extraCheckInfoJson:null!==(t=null==f?void 0:f.extraCheckInfoJson)&&void 0!==t?t:"",updateStatus:M,setCheckResult:T,projectPath:G,isNewPlatform:U})];case 10:if(!u.sent()){if((0,w.isCli)())throw new d.UploadError("审核预检失败");return[2]}u.label=11;case 11:return z.text="正在上传中...",(0,A.addNodeToMetrics)(a.metrics,"IDERequest"),[4,j({devAppid:$,projectPath:G,type:H,uploadChangeLog:null==f?void 0:f.changeLog,uploadVersion:null==f?void 0:f.version,uploadNeedUploadSourcemap:null==f?void 0:f.needUploadSourcemap,extraCheckInfoJson:null!==(n=null==f?void 0:f.extraCheckInfoJson)&&void 0!==n?n:"",extraInfoJson:h,localCompileVersion:v,supportSourcemap:L,channel:null==f?void 0:f.channel})];case 12:return X=u.sent(),(0,A.addFieldToMetrics)(a.metrics,"logId",X.logId),z.text="查询编译进度中...",[4,k($)];case 13:Y=u.sent(),a.metrics=(0,A.mergeMetrics)(a.metrics,X.metrics,Y.metrics),a.passJson=Y.passJson,(0,A.addNodeToMetrics)(a.metrics,"IDEReceiveResponse"),u.label=14;case 14:return null===(null==l?void 0:l.format)?[3,16]:(z.text="生成二维码中...",[4,(0,O.makeSchema)({devAppid:$,extAppid:"",startPage:c.path,query:c.query,scene:c.scene,bdpLog:{launch_from:c.launchFrom,location:c.location},headers:{},ideConfig:E,qrcodeQuery:null==y?void 0:y.query,referrerInfo:c.referrerInfo,hotRestartHash:R&&B?B:"",type:H,uploadOptions:{version:null!==(r=null==f?void 0:f.version)&&void 0!==r?r:"",changeLog:null!==(o=null==f?void 0:f.changeLog)&&void 0!==o?o:"",needUploadSourcemap:null==f?void 0:f.needUploadSourcemap,needUploadCheck:!1,channel:null==f?void 0:f.channel}})]);case 15:Q=u.sent(),a.shortUrl=Q.shortUrl,a.expireTime=Q.expireTime,a.originSchema=Q.originSchema,u.label=16;case 16:(0,A.addNodeToMetrics)(a.metrics,"compileClose"),z.stop(),u.label=17;case 17:return"imageFile"!==(null==l?void 0:l.format)?[3,20]:l.output?[4,(0,O.toQRCodeFile)(a.shortUrl,l.output)]:[3,19];case 18:ee=u.sent(),a.qrcodeFilePath=ee,b.default.info("二维码图片已存储到 "+ee),u.label=19;case 19:return[3,23];case 20:return"imageSVG"!==(null==l?void 0:l.format)?[3,23]:V&&W.qrcodeSVG?(a.qrcodeSVG=W.qrcodeSVG,[3,23]):[3,21];case 21:return te=a,[4,(0,O.toQRCodeSVG)(a.shortUrl)];case 22:te.qrcodeSVG=u.sent(),u.label=23;case 23:return function(e,t){x[t]=e,(0,w.isCli)()&&_.writeJsonSync(D,x)}({shortUrl:a.shortUrl,expireTime:a.expireTime,originSchema:a.originSchema,hash:B,previewScene:null!==(i=null==E?void 0:E.previewScene)&&void 0!==i?i:"default",qrcodeSVG:a.qrcodeSVG},Z),[2,a]}}))}))}function B(e){var t;return s(this,void 0,void 0,(function(){var n,r,o,i;return u(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),i={},[4,(0,y.getLogInfoHeaders)(e)];case 1:return i.headers=a.sent(),n=i,r=null!==(t=(0,I.getConfig)().microgameUrl.getChannelNumber)&&void 0!==t?t:"https://developer.toutiao.com/api/developer/ide/microgame/v1/get_exist_test_version",[4,f.AxiosInstance.get(r+"?app_id="+e,n)];case 2:return 0===(o=a.sent()).data.err_no?[2,o.data.data]:[2,null];case 3:throw a.sent(),new Error("获取通道限制失败");case 4:return[2]}}))}))}function H(e,t){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:if(!t)return[2];if(!/^[1-9]\d*$/.test(t))throw new d.UploadError("通道只能是大于0的整数");return[4,B(e)];case 1:if((n=r.sent().limit_num)&&Number(t)>=n)throw new d.UploadError("通道不能大于 "+(n-1));return[2]}}))}))}t.preview=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,G(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t,n;return s(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,G({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"",launchFrom:"",location:""},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap,extraCheckInfoJson:null!==(n=e.extraCheckInfoJson)&&void 0!==n?n:"",channel:e.channel},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig,setCheckResult:null==e?void 0:e.setCheckResult,updateStatus:null==e?void 0:e.updateStatus,isNewPlatform:null==e?void 0:e.isNewPlatform})];case 1:return[2,r.sent()]}}))}))},t.projectToQRCode=G,t.getChannelLimit=B,t.checkChannel=H},3098:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(5787),t),o(n(9396),t),o(n(5834),t),o(n(7838),t)},5834:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getMicroappInfo=t.getMeta=void 0;var a=n(2747),s=n(7992),u=n(2893),c=n(1728),l=i(n(7086));t.getMeta=function(e){return r(void 0,void 0,void 0,(function(){var t,n,r,i,p;return o(this,(function(o){switch(o.label){case 0:return t=(0,u.getConfig)().microgameUrl.versionInfo+e,p={},[4,(0,c.getUserCookies)()];case 1:return p.Cookie=o.sent(),n=p,[4,s.AxiosInstance.get(t,{headers:n})];case 2:return(r=o.sent().data).error&&0!==r.error||r.error&&0!==r.code?[4,Promise.reject(new a.MetaError(r.message))]:[3,4];case 3:return[2,o.sent()];case 4:return[2,(i=[r.audit_version,r.gray_version,r.online_version].filter(Boolean).sort(l.default))[i.length-1]]}}))}))},t.getMicroappInfo=function(e){return r(void 0,void 0,void 0,(function(){var t,n,r,i,a,u,l;return o(this,(function(o){switch(o.label){case 0:return r={},[4,(0,c.getUserCookies)()];case 1:return r.Cookie=o.sent(),t=r,[4,(0,s.AxiosInstance)({url:"https://developer.open-douyin.com/bff_api/app/setting/v2/"+e+"/microappinfoservice/getMicroappInfo",params:{appId:e},headers:t,timeout:2e4})];case 2:return n=o.sent(),[2,null!==(l=null===(u=null===(a=null===(i=n.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.appInfo)||void 0===u?void 0:u.techType)&&void 0!==l?l:null]}}))}))}},7838:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.unityCli=void 0;var s,u=n(7992),c=a(n(9258)),l=n(1728),p=a(n(9849)),d=a(n(1017)),f=n(5834),h=a(n(8366)),_=n(2893),v=n(2747),m=n(4486);!function(e){e.ONLY_ANDROID_NATIVE="0",e.ANDROID_NATIVE_AND_IOS_WEBGL="1",e.BOTH_WEBGL="2",e.ONLY_ANDROID_WEBGL="3",e.ONLY_ANDROID_INSTANT_GAME="4",e.ANDROID_INSTANT_GAME_AND_IOS_WEBGL="5"}(s||(s={}));var E=Object.values(s),g={0:"队列中",1:"任务已被占用,待执行",2:"构建IL2CPP动态库中",3:"IL2CPP动态库构建完成",4:"从TOS下载文件",5:"打包WebGL",6:"Apk分包",7:"上传文件到TOS",8:"修改sc-config meta配置",9:"发布版本到抖音开放平台",99:"环境准备完成,等待执行",100:"发布成功","-1":"发布失败","-2":"IL2CPP动态库构建失败","-4":"TOS文件下载失败","-5":"打包WebGL失败","-6":"Apk分包","-7":"上传文件到TOS失败","-8":"修改sc-config meta配置失败","-9":"发布版本到抖音开放平台失败","-99":"环境准备失败","-100":"发布超时",uploadError:"",uploadFailed:"发布失败",defaultText:"任务准备中"},y=function(e){return o(void 0,void 0,void 0,(function(){var t,n,o;return i(this,(function(i){switch(i.label){case 0:return[4,p.default.readJSON(d.default.join(e,"project.config.json"))];case 1:if(!(t=i.sent()).unity)throw new Error("project.config.json 中没有 unity 字段");return[2,r({appid:null!==(n=null==t?void 0:t.appid)&&void 0!==n?n:""},null!==(o=null==t?void 0:t.unity)&&void 0!==o?o:{})]}}))}))},b=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,p.default.readJSON(d.default.join(e,"game.json"))];case 1:return[2,t.sent()]}}))}))},A=function(e){var t=e.type,n=e.appid,r=e.uid;return o(void 0,void 0,void 0,(function(){var e,o,a,s,c;return i(this,(function(i){switch(i.label){case 0:e=3,i.label=1;case 1:if(!(e>0))return[3,6];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,u.AxiosInstance.get("https://starkgame.zijieapi.com/api/stark_publish/get_version",{params:{uid:r,appid:n,version_type:t}})];case 3:return o=i.sent(),[2,null!==(c=null===(s=null===(a=o.data)||void 0===a?void 0:a.result)||void 0===s?void 0:s[t])&&void 0!==c?c:{ctime:"",version:""}];case 4:return i.sent(),e--,[3,5];case 5:return[3,1];case 6:return[2,{ctime:"",version:""}]}}))}))},O=function(e){var t=e.projectPath,n=e.version,a=e.publishDesc,d=e.ideUid,f=e.channel;return o(void 0,void 0,void 0,(function(){var e,o,h,_,v,m,g,A,O,C,w,L;return i(this,(function(i){switch(i.label){case 0:return(e=(0,l.getUserId)())||d?[4,y(t)]:(console.info("请先登录"),[2]);case 1:return o=i.sent(),[4,S(o)];case 2:return i.sent(),h=o.appid,_=o.publishType,v=o.unityEngineVersion,[4,b(t)];case 3:return m=i.sent(),[4,I(h)];case 4:if(!i.sent())throw new Error("appid: "+h+"为非unity小游戏");if(!v)throw new Error("unityEngineVersion为必填字段,请修改project.config.json后重试");switch((g=new c.default).append("uid",null!=d?d:parseInt(e)),g.append("app_id",h),g.append("version",n),g.append("publish_type",_),g.append("unity_engine_version",v),g.append("publish_desc",null!=a?a:""),g.append("orientation","portrait"===m.deviceOrientation?"0":"1"),g.append("menu_btn_style","light"===m.menuButtonStyle?"1":"0"),g.append("tag",null!=f?f:""),""+_){case s.ONLY_ANDROID_NATIVE:A=p.default.createReadStream(o.build.native.il2cpp),g.append("il2cpp_source_file",A,{filename:"il2cpp_source_file.zip"}),O=p.default.createReadStream(o.build.native.apk),g.append("apk_file",O,{filename:"apk_file.apk"});break;case s.ANDROID_NATIVE_AND_IOS_WEBGL:L=p.default.createReadStream(o.build.webgl),g.append("webgl_file",L,{filename:"webgl_file.zip"}),A=p.default.createReadStream(o.build.native.il2cpp),g.append("il2cpp_source_file",A,{filename:"il2cpp_source_file.zip"}),O=p.default.createReadStream(o.build.native.apk),g.append("apk_file",O,{filename:"apk_file.apk"});break;case s.BOTH_WEBGL:case s.ONLY_ANDROID_WEBGL:C=p.default.createReadStream(o.build.webgl),g.append("webgl_file",C,{filename:"webgl_file.zip"});break;case s.ONLY_ANDROID_INSTANT_GAME:w=p.default.createReadStream(o.build.instantGame),g.append("ig_file",w,{filename:"ig_file.json"});break;case s.ANDROID_INSTANT_GAME_AND_IOS_WEBGL:w=p.default.createReadStream(o.build.instantGame),g.append("ig_file",w,{filename:"ig_file.json"}),L=p.default.createReadStream(o.build.webgl),g.append("webgl_file",L,{filename:"webgl_file.zip"});break;default:throw new Error("Publish type must be in ["+E.join(",")+"]")}return[4,u.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/submit",method:"post",data:g,headers:r({},g.getHeaders()),timeout:18e5})];case 5:return[2,i.sent().data]}}))}))},C=function(e){var t=e.projectPath,n=e.version,r=e.updateStatus,a=e.ideUid,s=e.channel;return o(void 0,void 0,void 0,(function(){var e,c,p,d,f;return i(this,(function(h){switch(h.label){case 0:return(e=(0,l.getUserId)())||a?[4,y(t)]:(console.info("请先登录"),[2]);case 1:return c=h.sent(),p=c.appid,d=function(){return u.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/query",method:"post",data:JSON.stringify({uid:""+(null!=a?a:e),app_id:p,version:n,tag:s}),headers:{"Content-Type":"application/json"}})},f=function(){return new Promise((function(e){var t=setInterval((function(){return o(void 0,void 0,void 0,(function(){var n,o,a,s;return i(this,(function(i){switch(i.label){case 0:return[4,d()];case 1:return n=i.sent(),null==r||r(n.data.result.status),100===n.data.result.status?(clearInterval(t),e(!0)):0===n.data.result.status||(""+n.data.result.status).startsWith("-")&&(clearInterval(t),e(!1),console.error("\n发布失败:"+g[null!==(s=null===(a=null===(o=n.data)||void 0===o?void 0:o.result)||void 0===a?void 0:a.status)&&void 0!==s?s:"uploadError"])),[2]}}))}))}),1e3)}))},[4,f()];case 2:return[2,h.sent()]}}))}))},w=function(e){var t=e.projectPath,n=e.version,r=e.publishDesc,a=e.updateStatus,s=e.ideUid,u=e.channel;return o(void 0,void 0,void 0,(function(){var e,o;return i(this,(function(i){switch(i.label){case 0:return[4,O({projectPath:t,version:n,publishDesc:r,ideUid:s,channel:u})];case 1:if(0!==(null==(e=i.sent())?void 0:e.code))throw(null==(o=e.message)?void 0:o.includes("duplicate version"))&&(o='无法上传重复版本 "'+n+(u?"-通道"+u:"")+'",请更换版本号或通道后重试'),g.uploadError=null!=o?o:"上传失败",null==a||a("uploadError"),new Error(null!=o?o:"上传失败");return[4,C({projectPath:t,version:n,updateStatus:a,ideUid:s,channel:u})];case 2:return[2,i.sent()]}}))}))},I=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,(0,f.getMicroappInfo)(e)];case 1:return 7===(t=n.sent())?[2,!0]:null===t?[2,null]:[2,!1]}}))}))},S=function(e){return o(void 0,void 0,void 0,(function(){var t,n,r,o,a,u,c,l,p,d,f,h;return i(this,(function(i){switch(i.label){case 0:if(!e)throw new Error("unityConfig is empty");switch(t=e.publishType,n=e.build,""+t){case s.ONLY_ANDROID_NATIVE:return[3,1];case s.ANDROID_NATIVE_AND_IOS_WEBGL:return[3,4];case s.BOTH_WEBGL:case s.ONLY_ANDROID_WEBGL:return[3,8];case s.ONLY_ANDROID_INSTANT_GAME:return[3,10];case s.ANDROID_INSTANT_GAME_AND_IOS_WEBGL:return[3,12]}return[3,15];case 1:return P(null!==(o=null===(r=null==n?void 0:n.native)||void 0===r?void 0:r.apk)&&void 0!==o?o:""),[4,L(null===(a=null==n?void 0:n.native)||void 0===a?void 0:a.il2cpp,"il2cpp产物文件不存在")];case 2:return i.sent(),[4,L(null===(u=null==n?void 0:n.native)||void 0===u?void 0:u.apk,"apk产物文件不存在")];case 3:case 7:case 9:case 11:case 14:return i.sent(),[3,16];case 4:return P(null!==(l=null===(c=null==n?void 0:n.native)||void 0===c?void 0:c.apk)&&void 0!==l?l:""),[4,L(null===(p=null==n?void 0:n.native)||void 0===p?void 0:p.il2cpp,"il2cpp产物文件不存在")];case 5:return i.sent(),[4,L(null===(d=null==n?void 0:n.native)||void 0===d?void 0:d.apk,"apk产物文件不存在")];case 6:case 13:return i.sent(),[4,L(null==n?void 0:n.webgl,"webgl产物文件不存在")];case 8:return[4,L(null==n?void 0:n.webgl,"webgl产物文件不存在")];case 10:return R(null!==(f=null==n?void 0:n.instantGame)&&void 0!==f?f:""),[4,L(null==n?void 0:n.instantGame,"instant game产物文件不存在")];case 12:return R(null!==(h=null==n?void 0:n.instantGame)&&void 0!==h?h:""),[4,L(null==n?void 0:n.instantGame,"instant game产物文件不存在")];case 15:throw new Error("Publish type must be in ["+E.join(",")+"]");case 16:return[2]}}))}))},L=function(e,t){return o(void 0,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,p.default.pathExists(null!=e?e:"")];case 1:if(!n.sent())throw new Error(null!=t?t:"文件不存在");return[2,!0]}}))}))},P=function(e){if(".apk"!==d.default.extname(e))throw new Error("请上传apk文件")},R=function(e){if(".json"!==d.default.extname(e))throw new Error("请上传json文件")},T=function(e){var t=e.appId,n=e.compileId;return o(void 0,void 0,void 0,(function(){var e,r,a;return i(this,(function(s){switch(s.label){case 0:return e=(0,_.getConfig)(),r=function(){return o(void 0,void 0,void 0,(function(){var r,o,a,s;return i(this,(function(i){switch(i.label){case 0:return o=(r=u.AxiosInstance).request,a={url:e.microgameUrl.unityCompileProgress,method:"get",params:{appid:t,compile_id:n}},s={},[4,(0,l.getUserCookies)()];case 1:return[4,o.apply(r,[(a.headers=(s.Cookie=i.sent(),s),a)])];case 2:return[2,i.sent()]}}))}))},a=function(){return new Promise((function(e,t){var n=setInterval((function(){return o(void 0,void 0,void 0,(function(){var o,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,r()];case 1:switch((o=i.sent()).data.compile_status){case 2:break;case 3:clearInterval(n),e(o.data.ctime);break;default:clearInterval(n),console.info("发布失败:",o.data.failed_msg),t(o.data.message||o.data.failed_msg||"发布失败")}return[3,3];case 2:return a=i.sent(),clearInterval(n),console.info("发布失败:",a.message),t(a.message),[3,3];case 3:return[2]}}))}))}),1e3)}))},[4,a()];case 1:return[2,s.sent()]}}))}))},D=function(e){var t=e.appId,n=e.ideConfig,a=e.ctime,s=e.scene,c=void 0===s?"990001":s,p=e.query,d=void 0===p?"":p,f=e.bdpLog,h=void 0===f?"":f,m=e.version,E=e.channel;return o(void 0,void 0,void 0,(function(){var e,o,s,p,f,g,y;return i(this,(function(i){switch(i.label){case 0:return e=(0,_.getConfig)(),o={ide_version:null==n?void 0:n.ideVersion,ide_os:null==n?void 0:n.ideOS,ide_device_id:null==n?void 0:n.ideDid,ide_user_id:null==n?void 0:n.ideUid,iOS_debug_version:+(null==n?void 0:n.iOSDebugVersion),connect_type:null==n?void 0:n.connectType,local_debug:String(null==n?void 0:n.localDebug),extra_info:null!==(y=null==n?void 0:n.extraInfo)&&void 0!==y?y:{},performance_test:!1},s={start_page:"",query:d,scene:c,bdp_log:h,penetrate_map_json:JSON.stringify({referer_info:"",ide_inspect_version:6,ide_live_debug:!1,ide_config:o}),ctime:""+a},[4,(0,l.getLogInfoHeaders)(t)];case 1:return p=i.sent(),"latest"==(f=a?"preview":"latest")&&(s.version_num=m,s.tag=E),[4,u.AxiosInstance.request({url:e.microgameUrl.makeSchema,method:"post",data:{app_id:t,stage:f,devappid:"",schema_params:s},headers:r({},p)})];case 2:if(0!==(g=i.sent().data).code)throw new v.UploadError(g.msg);return[2,g]}}))}))},N=function(e){var t=e.projectPath,n=e.ideUid,a=e.compileMode;return o(void 0,void 0,void 0,(function(){var e,d,f,m,g,A,O,C,w,I,S,L,P;return i(this,(function(R){switch(R.label){case 0:return[4,y(t)];case 1:return e=R.sent(),[4,j(e)];case 2:return R.sent(),d=e.appid,f=e.publishType,m=e.unityEngineVersion,g=e.build,[4,b(t)];case 3:A=R.sent(),O=h.default.loading("正在准备上传..."),R.label=4;case 4:return R.trys.push([4,9,10,11]),[4,(N={appId:d,apkSource:null!==(P=null===(L=g.native)||void 0===L?void 0:L.fullApk)&&void 0!==P?P:"",webGLSource:g.webgl,igSource:g.instantGame,isDebug:0,publishType:f,unityEngineVersion:m,menuBtnStyle:A.menuButtonStyle,orientation:"portrait"===A.deviceOrientation?0:1},o(void 0,void 0,void 0,(function(){var e,t,n,o,a,d,f,h,v,m,g,y,b,A,O,C,w;return i(this,(function(i){switch(i.label){case 0:if(e=(0,_.getConfig)(),t=N.appId,n=N.apkSource,o=N.webGLSource,a=N.igSource,d=N.isDebug,f=N.publishType,v=N.menuBtnStyle,m=N.orientation,!(h=N.unityEngineVersion))throw new Error("unityEngineVersion为必填字段,请修改project.config.json后重试");switch((g=new c.default).append("publish_type",parseInt(f)),g.append("is_debug",d),g.append("unity_engine_version",h),g.append("menu_btn_style","light"===v?1:0),g.append("orientation",m),f){case s.ONLY_ANDROID_NATIVE:g.append("apk_source",p.default.createReadStream(n),{filename:"source.apk"}),g.append("web_gl_source",Buffer.from(""),{filename:"webgl.zip"}),g.append("ig_source",Buffer.from(""),{filename:"ig.json"});break;case s.ANDROID_NATIVE_AND_IOS_WEBGL:g.append("apk_source",p.default.createReadStream(n),{filename:"source.apk"}),g.append("web_gl_source",p.default.createReadStream(o),{filename:"webgl.zip"}),g.append("ig_source",Buffer.from(""),{filename:"ig.json"});break;case s.BOTH_WEBGL:case s.ONLY_ANDROID_WEBGL:g.append("apk_source",Buffer.from(""),{filename:"source.apk"}),g.append("web_gl_source",p.default.createReadStream(o),{filename:"webgl.zip"}),g.append("ig_source",Buffer.from(""),{filename:"ig.json"});break;case s.ONLY_ANDROID_INSTANT_GAME:g.append("apk_source",Buffer.from(""),{filename:"source.apk"}),g.append("web_gl_source",Buffer.from(""),{filename:"webgl.zip"}),g.append("ig_source",p.default.createReadStream(a),{filename:"ig.json"});break;case s.ANDROID_INSTANT_GAME_AND_IOS_WEBGL:g.append("apk_source",Buffer.from(""),{filename:"source.apk"}),g.append("ig_source",p.default.createReadStream(a),{filename:"ig.json"}),g.append("web_gl_source",p.default.createReadStream(o),{filename:"web_gl_source.zip"});break;default:throw new Error("Publish type must be in ["+E.join(",")+"]")}return A=(b=u.AxiosInstance).put,O=[e.microgameUrl.unityPreview,g],C={params:{appid:t}},w={},[4,(0,l.getUserCookies)()];case 1:return[4,A.apply(b,O.concat([(C.headers=r.apply(void 0,[(w.Cookie=i.sent(),w),g.getHeaders()]),C)]))];case 2:if(!(y=i.sent().data).CompileId||0!==y.error)throw new Error(y.message);return[2,y.CompileId]}}))})))];case 5:return C=R.sent(),O.text="查询编译进度中...",[4,T({compileId:C,appId:d})];case 6:return w=R.sent(),I=(0,l.getUserId)(),w?[4,D(r({appId:d,ctime:w,ideConfig:{ideUid:null!=I?I:n}},a))]:[3,8];case 7:return[2,R.sent()];case 8:return[3,11];case 9:throw S=R.sent(),new v.UploadError(S.message||S);case 10:return O.stop(),[7];case 11:return[2]}var N}))}))},x=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,p.default.readFile(e)];case 1:return[2,t.sent().includes("il2cpp.so")];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))},j=function(e){return o(void 0,void 0,void 0,(function(){var t,n,r,o,a,u,c,l,p,d,f,h,_,v;return i(this,(function(i){switch(i.label){case 0:if(!e)throw new Error("unityConfig is empty");switch(t=e.publishType,n=e.build,""+t){case s.ONLY_ANDROID_NATIVE:return[3,1];case s.ANDROID_NATIVE_AND_IOS_WEBGL:return[3,4];case s.BOTH_WEBGL:case s.ONLY_ANDROID_WEBGL:return[3,8];case s.ONLY_ANDROID_INSTANT_GAME:return[3,10];case s.ANDROID_INSTANT_GAME_AND_IOS_WEBGL:return[3,12]}return[3,15];case 1:return[4,x(null!==(o=null===(r=null==n?void 0:n.native)||void 0===r?void 0:r.fullApk)&&void 0!==o?o:"")];case 2:if(!i.sent())throw new Error("请使用 SC Stark Tool 构建预览时需要的完整APK文件,详情请查看:https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/developer-instrument/development-assistance/unity-game-preview");return P(null!==(u=null===(a=null==n?void 0:n.native)||void 0===a?void 0:a.fullApk)&&void 0!==u?u:""),[4,L(null===(c=null==n?void 0:n.native)||void 0===c?void 0:c.fullApk,"apk产物文件不存在")];case 3:case 7:case 9:case 11:case 14:return i.sent(),[3,16];case 4:return[4,x(null!==(p=null===(l=null==n?void 0:n.native)||void 0===l?void 0:l.fullApk)&&void 0!==p?p:"")];case 5:if(!i.sent())throw new Error("请使用 SC Stark Tool 构建预览时需要的完整APK文件,详情请查看:https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/developer-instrument/development-assistance/unity-game-preview");return[4,L(null===(d=null==n?void 0:n.native)||void 0===d?void 0:d.fullApk,"apk产物文件不存在")];case 6:return i.sent(),P(null!==(h=null===(f=null==n?void 0:n.native)||void 0===f?void 0:f.fullApk)&&void 0!==h?h:""),[4,L(null==n?void 0:n.webgl,"webgl产物文件不存在")];case 8:return[4,L(null==n?void 0:n.webgl,"webgl产物文件不存在")];case 10:return R(null!==(_=null==n?void 0:n.instantGame)&&void 0!==_?_:""),[4,L(null==n?void 0:n.instantGame,"instant game产物文件不存在")];case 12:return R(null!==(v=null==n?void 0:n.instantGame)&&void 0!==v?v:""),[4,L(null==n?void 0:n.instantGame,"instant game产物文件不存在")];case 13:return i.sent(),[4,L(null==n?void 0:n.webgl,"webgl产物文件不存在")];case 15:throw new Error("Publish type must be in ["+E.join(",")+"]");case 16:return[2]}}))}))};t.unityCli={getVersions:function(e){var t=e.projectPath,n=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,r,o,a,s,u;return i(this,(function(i){switch(i.label){case 0:return(e=(0,l.getUserId)())||n?[4,y(t)]:(console.info("请先登录"),[2]);case 1:r=i.sent(),o=r.appid,a={},i.label=2;case 2:return i.trys.push([2,4,,5]),[4,A({uid:null!=n?n:parseInt(e),appid:o,type:"current"})];case 3:return s=i.sent(),Object.assign(a,{current:s}),[3,5];case 4:return i.sent(),[3,5];case 5:return i.trys.push([5,7,,8]),[4,A({uid:null!=n?n:parseInt(e),appid:o,type:"latest"})];case 6:return u=i.sent(),Object.assign(a,{latest:u}),[3,8];case 7:return i.sent(),[3,8];case 8:return[2,a]}}))}))},getLatestVersion:function(e){var t=e.projectPath,n=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,r,o,a;return i(this,(function(i){switch(i.label){case 0:return(e=(0,l.getUserId)())||n?[4,y(t)]:(console.info("请先登录"),[2]);case 1:return r=i.sent(),o=r.appid,[4,A({uid:null!=n?n:parseInt(e),appid:o,type:"latest"})];case 2:return a=i.sent(),/^\d+\.\d+\.\d+$/.test(a.version)||(a.version=""),[2,a]}}))}))},upload:O,queryProgress:C,uploadAndQueryProgress:w,validateFiles:S,validateAppId:I,PROGRESS:g,isUnity:function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,y(e)];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))},unityUpload:function(e){return o(void 0,void 0,void 0,(function(){var t,n,r,o,a,s,u,c,l,f,_,v,E;return i(this,(function(i){switch(i.label){case 0:return t=e.projectPath,n=e.version,r=e.publishType,o=e.deviceOrientation,a=e.channel,[4,p.default.readJSON(d.default.join(t,"project.config.json"))];case 1:if(s=i.sent(),a&&isNaN(parseInt(a)))throw new Error("channel字段必须为数字");return r&&(null==s?void 0:s.unity)?(s.unity.publishType=r,[4,p.default.writeJSON(d.default.join(t,"project.config.json"),s)]):[3,3];case 2:i.sent(),i.label=3;case 3:return o?[4,p.default.readJSON(d.default.join(t,"game.json"))]:[3,6];case 4:return(null==(u=i.sent())?void 0:u.deviceOrientation)?(u.deviceOrientation=o,[4,p.default.writeJSON(d.default.join(t,"game.json"),u)]):[3,6];case 5:i.sent(),i.label=6;case 6:return[4,y(t)];case 7:return c=i.sent(),[4,I(c.appid)];case 8:if(null===(l=i.sent()))throw new Error("无此游戏 "+c.appid+" 权限");if(!l)throw new Error("appid: "+c.appid+"为非unity小游戏");return[4,w(e)];case 9:if(!i.sent())throw new Error("发布失败");return[4,D({appId:null==s?void 0:s.appid,version:n,channel:a,ideConfig:{}})];case 10:return f=i.sent(),h.default.info("\n"),(0,m.generateTerminalQrCode)(null===(_=null==f?void 0:f.data)||void 0===_?void 0:_.short_url,{}),e.output?[4,(0,m.toQRCodeFile)(null!==(E=null===(v=null==f?void 0:f.data)||void 0===v?void 0:v.short_url)&&void 0!==E?E:"",e.output)]:[3,12];case 11:i.sent(),h.default.info("\n测试二维码图片保存成功:",e.output),i.label=12;case 12:return[2,f.data]}}))}))},preview:N,makeSchema:D,previewForCli:function(e){var t=e.projectPath,n=e.output,r=e.compileMode;return o(void 0,void 0,void 0,(function(){var e,o,a,s,u;return i(this,(function(i){switch(i.label){case 0:return[4,y(t)];case 1:return e=i.sent(),[4,I(e.appid)];case 2:if(null===(o=i.sent()))throw new Error("无此游戏"+e.appid+"权限");if(!o)throw new Error("appid: "+e.appid+"为非unity小游戏");return[4,N({projectPath:t,compileMode:r})];case 3:return a=i.sent(),n?[4,(0,m.toQRCodeFile)(null!==(u=null===(s=null==a?void 0:a.data)||void 0===s?void 0:s.short_url)&&void 0!==u?u:"",n)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2,null==a?void 0:a.data]}}))}))},validatePreviewFiles:j}},155:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getPathByteSize=t.getDirByteSize=t.getFileByteSize=t.byte2Mb=t.mb2Byte=void 0;var a=i(n(7147)),s=i(n(9508)),u=n(9086),c=n(1017);t.mb2Byte=function(e){return 1024*e*1024},t.byte2Mb=function(e,t){return void 0===t&&(t=4),Number((e/1024/1024).toFixed(t))},t.getFileByteSize=function(e,t){return(0,u.filterFile)((0,c.relative)(t.projectPath,e),t.getPackOptions())?0:a.default.statSync(e).size},t.getDirByteSize=function(e,n,i,a){return void 0===n&&(n=[]),void 0===i&&(i=[]),r(void 0,void 0,void 0,(function(){var r;return o(this,(function(o){switch(o.label){case 0:return[4,(0,s.default)(i,{cwd:e,ignore:n,absolute:!0,dot:!0})];case 1:return r=o.sent(),[4,Promise.all(r.map((function(e){return(0,t.getFileByteSize)(e,a)})))];case 2:return[2,o.sent().reduce((function(e,t){return e+t}),0)]}}))}))},t.getPathByteSize=function(e,n,r,o){return void 0===n&&(n=[]),void 0===r&&(r=["**"]),a.default.statSync(e).isDirectory()?(0,t.getDirByteSize)(e,n,r,o):(0,t.getFileByteSize)(e,o)}},9396:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateAppId=t.getAppId=t.checkAppId=t.checkUCAppId=t.compressZip=t.getDirHash=t.verifyPkgSize=t.getSizeLimitConfig=t.PKG_HASH_IGNORE_LIST=t.PKG_SIZE_IGNORE_GLOBS=void 0;var c=u(n(3732)),l=n(2896),p=u(n(9849)),d=u(n(1017)),f=n(2747),h=n(155),_=n(3077),v=n(9882),m=n(7992),E=n(1728),g=n(2893);t.PKG_SIZE_IGNORE_GLOBS=["**/.*","**/.*/**/*","**/node_modules/**","**/**.js.map"],t.PKG_HASH_IGNORE_LIST=[".*","node_modules"],t.getSizeLimitConfig=function(e){return o(void 0,void 0,void 0,(function(){var t,n,o,a,s,u,c;return i(this,(function(i){switch(i.label){case 0:return t={normalTotal:16,subMain:4,subPkg:20,subTotal:20,openData:4},a=(o=m.AxiosInstance).get,s=[""+(0,g.getConfig)().microgameUrl.sizeLimit+e],u={},c={},[4,(0,E.getUserCookies)()];case 1:return[4,a.apply(o,s.concat([(u.headers=(c.Cookie=i.sent(),c),u)]))];case 2:if(0!==(n=i.sent().data).err_no)throw new Error(null==n?void 0:n.err_msg);return[2,r(r({},t),n.limit)]}}))}))};var y=function(e,t,n){return e+"大小为:"+t+"MB,超过 "+n+"MB。"};t.verifyPkgSize=function(e,n){return o(void 0,void 0,void 0,(function(){var r,o,s,u,c,l,f,_,m,E,g,b,A,O,C,w,I;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),[4,p.default.readJson(d.default.join(e,"game.json"))];case 1:return r=i.sent(),o=r.openDataContext,s=null!==(I=r.subPackages)&&void 0!==I?I:r.subpackages,[4,(0,t.getAppId)(e)];case 2:return u=i.sent(),[4,(0,t.getSizeLimitConfig)(u)];case 3:return c=i.sent(),l=[],o?[4,(0,h.getPathByteSize)(d.default.join(e,o),t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0),n)]:[3,5];case 4:return _=i.sent(),[3,6];case 5:_=0,i.label=6;case 6:return(f=_)>(0,h.mb2Byte)(c.openData)&&l.push(y("小游戏开放数据域文件",(0,h.byte2Mb)(f),c.openData)),m=!(null==s?void 0:s.length),E=m?c.normalTotal:c.subTotal,[4,(0,h.getPathByteSize)(e,t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0),n)];case 7:return(g=i.sent())>(0,h.mb2Byte)(E)&&l.push(y("小游戏包",(0,h.byte2Mb)(g),E)),m?[2,l.length?l.join("\n")+"\n请调整包大小再进行上传":""]:[4,Promise.all(s.map((function(r){var o=d.default.join(e,r.root);return(0,h.getPathByteSize)(o,t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0),n)})))];case 8:return b=i.sent(),A=b.map((function(e,t){return[s[t],e]})).filter((function(e){var t=a(e,2);return t[0],t[1]>(0,h.mb2Byte)(c.subPkg)})),A.length>0&&l.push(A.map((function(e){return a(e,1)[0].name})).join("、")+" 子包大小为:"+A.map((function(e){var t=a(e,2),n=(t[0],t[1]);return(0,h.byte2Mb)(n)+"MB"})).join("、")+",超过 "+c.subPkg+"MB。"),O=b.reduce((function(e,t){return e+t}),0),(C=g-f-O)>(0,h.mb2Byte)(c.subMain)&&l.push(y("小游戏分包主包",(0,h.byte2Mb)(C),c.subMain)),[2,l.length?l.join("\n")+"\n请调整包大小再进行上传":""];case 9:return[2,(w=i.sent())instanceof Error?w.message:String(w)];case 10:return[2]}}))}))},t.getDirHash=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,(0,l.hashElement)(e,{encoding:"hex",folders:{exclude:t.PKG_HASH_IGNORE_LIST}})];case 1:return[2,n.sent().hash]}}))}))},t.compressZip=function(e,n,r){return void 0===r&&(r=[]),new Promise((function(u,l){return o(this,void 0,void 0,(function(){var o,f,h;return i(this,(function(i){switch(i.label){case 0:return o=d.default.resolve(n,d.default.basename(e)+".zip"),f=p.default.createWriteStream(o),h=(0,c.default)("zip",{zlib:{level:9}}),f.on("close",(function(){return u(o)})),h.on("error",(function(e){return console.error("压缩失败:",e),l(e)})),h.pipe(f),h.glob("**/*",{cwd:e,ignore:s(s([],a(t.PKG_SIZE_IGNORE_GLOBS),!1),a(r),!1)},{}),[4,h.finalize()];case 1:return i.sent(),[2]}}))}))}))},t.checkUCAppId=function(e){return/^tt[0-9a-f]{16}(07)$/.test(e)},t.checkAppId=function(e){return/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e)},t.getAppId=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,p.default.readJson(d.default.join(e,"project.config.json"))];case 1:return"testappid"===(t=n.sent()).appid.toLocaleLowerCase()?[2,"tt975be1e608633d4202"]:[2,t.appid]}}))}))},t.validateAppId=function(e){return o(void 0,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:if((0,t.checkUCAppId)(e))throw n="当前小游戏 AppId 为 "+e+",为Unity&UE小游戏 AppId, 不支持该类型小游戏",new f.ProjectError(n);if(!(0,t.checkAppId)(e))throw new f.ProjectError("请使用正确的 AppId");return[4,(0,_.fetchMeta)({appid:e})];case 1:if((r=o.sent().data)&&2!==r.tech_type)throw new f.ProjectError("请使用小游戏的 AppId");return[2]}}))}))}},8733:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t},__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildNpm=void 0;var fs_extra_1=__webpack_require__(9849),path=__importStar(__webpack_require__(1017));function buildNpm(options){return __awaiter(this,void 0,void 0,(function(){var cwd,_a,projectPath,buildNpm,_this=this;return __generator(this,(function(_b){switch(_b.label){case 0:return cwd=process.cwd(),_a=options.projectPath,projectPath=void 0===_a?cwd:_a,path.isAbsolute(projectPath)||(projectPath=path.resolve(cwd,projectPath)),[4,Promise.all([(0,fs_extra_1.access)(path.resolve(projectPath,"package.json")),(0,fs_extra_1.access)(path.resolve(projectPath,"node_modules"))])];case 1:return _b.sent(),buildNpm=eval("require")("@tt-miniprogram/ext-pack").buildNpm,[4,new Promise((function(e){return __awaiter(_this,void 0,void 0,(function(){var t,n,r;return __generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,buildNpm({projectPath})];case 1:return"success"===(t=o.sent()).result?e({success:!0,reason:t.message.title}):e({success:!1,reason:t.message.content}),[3,3];case 2:return n=o.sent(),e({success:!1,reason:null!==(r=n.message)&&void 0!==r?r:"执行构建 NPM 脚本失败"}),[3,3];case 3:return[2]}}))}))}))];case 2:return[2,_b.sent()]}}))}))}exports.buildNpm=buildNpm},7239:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(2081)),u=i(n(9849)),c=i(n(1017)),l=n(8066),p=n(2696),d=a(n(8366)),f=n(4263),h=l.CliMonitor.getInstance({cliVersion:"2.0.12",cliName:"tt-minigame-ide-cli"});t.default=function(e,t){var n=e.projectPath,r=e.mode,o=e.type;c.isAbsolute(n)||(n=c.join(process.cwd(),n));var i=!1;try{u.accessSync(n),i=!0}catch(e){d.default.error('The "projectPath" not exist. [path=%s]',n)}var a=(0,f.isMac)()?"open":"start";t&&(a="export BYTEDANCE_IDE_REMOTE_PORT="+t+" && "+a);var _="";i?(d.default.info("Open project. [path=%s]",n),_+="path="+n+"&project-type="+o,"full"!==r&&"lite"!==r||(d.default.info("mode=%s",r),_+="&mode="+r)):d.default.info("Open IDE");var v=a+" "+p.IDE_SCHEMA+"?"+encodeURIComponent(_);return new Promise((function(e,t){s.exec(v,(function(n){n?(d.default.error("Open IDE failed. [err=%o]",n),t(n)):(d.default.info("Open IDE success"),"lite"===r&&h.report(l.CLI_EVENTS.IDE_LITE_MODE_ENTER,{from:"cli"}),e())}))}))}},7312:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},c=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.prettyProjectSize=t.folderToZipStream=t.verifySubPackageSize=t.getProjectSize=t.getFolderSize=void 0;var p=n(2747),d=n(4415),f=l(n(3732)),h=l(n(6883)),_=l(n(9508)),v=i(n(1017)),m=n(4263),E=l(n(9849)),g=n(9882),y=n(9086),b=n(4851);function A(e){var t=e.folderPath,n=e.useTypeScript,r=e.options,o=void 0===r?{}:r,i=e.isGame,l=e.isLivePlugin,d=e.gameFiles,f=e.rootPath,h=e.packOptions;return a(this,void 0,void 0,(function(){var e,r,a,b,A,O,C,w,I,S,L;return s(this,(function(s){switch(s.label){case 0:e=o.ignore,r=void 0===e?[]:e,s.label=1;case 1:return s.trys.push([1,6,,7]),[4,E.default.lstat(t)];case 2:if((a=s.sent().isFile())&&!t.endsWith(".js"))throw new Error("subPackage root should be a valid js or a directory");return b=a?v.resolve(t,"../"):t,A=_.default.convertPathToPattern(b),O=_.default.convertPathToPattern(t),[4,(0,_.default)(a?O:(0,g.getWhiteList)(i,{isLivePlugin:l}),{cwd:A,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(r.map((function(e){return(0,m.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})];case 3:return C=s.sent(),(null==d?void 0:d.length)>0?(d=d.filter(m.isGameFileValid),[4,(0,_.default)(d,{cwd:A,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(r.map((function(e){return(0,m.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})]):[3,5];case 4:w=(w=s.sent()).filter((function(e){return g.ALLOWED_MICROGAME_EXTS_REG.test(e.path)&&e.path.startsWith(A)})),C.push.apply(C,c([],u(w),!1)),s.label=5;case 5:return I=new Map,C.forEach((function(e){I.set(e.path,e)})),S=0,I.forEach((function(e,t){(0,y.filterFile)(v.relative(f,t),h)||!n&&t.endsWith(".ts")||n&&t.endsWith(".js")&&I.has(t.replace(/\.js$/,".ts"))||(S+=e.stats?e.stats.size:0)})),[2,S];case 6:throw L=s.sent(),new p.ProjectError(L.toString());case 7:return[2]}}))}))}function O(e,t){return void 0===t&&(t=!1),a(this,void 0,void 0,(function(){var n,r,o,i,u,c,l,p,f,h,_,g,y,b,O,C=this;return s(this,(function(w){switch(w.label){case 0:return v.isAbsolute(e)||(e=v.join(process.cwd(),e)),[4,(0,m.getProjectConfig)(e)];case 1:return[4,(n=w.sent()).getAppJSON()];case 2:return r=w.sent(),o=r.rawJSON,i=r.isLivePlugin,u={main:void 0,sub:[],openData:void 0,total:0},c=0,l=t?e:v.join(e,n.getMiniprogramRoot()),p=o.subPackages||o.subpackages||[],f=n.useTypeScript(),h=Array.isArray(o.gameFiles)?o.gameFiles:[],_=n.getPackOptions(),[4,A({folderPath:l,useTypeScript:f,options:{ignore:p.map((function(e){var t=v.join(l,e.root);return E.default.lstatSync(t).isFile()?t:v.join(t,"**")}))},isGame:t,isLivePlugin:i,gameFiles:h,rootPath:e,packOptions:_})];case 3:return g=w.sent(),Array.isArray(p)&&p.length>0?(y=p.reduce((function(e,t){return!t.root||e.includes(t.root)||e.push(t.root),e}),[]),[4,Promise.all(y.map((function(e){return a(C,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,A({folderPath:v.join(l,e),useTypeScript:f,options:{},isGame:t,isLivePlugin:i,packOptions:_,rootPath:l})];case 1:return n=r.sent(),[2,{path:(0,d.ensureEndSlash)(e),size:n}]}}))}))})))]):[3,5];case 4:b=w.sent(),c+=b.reduce((function(e,t){return e+t.size}),0),u.sub=b,w.label=5;case 5:return t&&o.openDataContext?[4,A({folderPath:v.join(l,o.openDataContext),useTypeScript:f,options:{},isGame:t,isLivePlugin:i,rootPath:l,packOptions:_})]:[3,7];case 6:O=w.sent(),u.openData={path:(0,d.ensureEndSlash)(o.openDataContext),size:O},c+=O,g-=O,w.label=7;case 7:return u.total=c+g,u.main={path:l,size:g},[2,u]}}))}))}t.getFolderSize=A,t.getProjectSize=O,t.verifySubPackageSize=function(e,t){return a(this,void 0,void 0,(function(){var n,r,o,i,a,u,c,l,f,h;return s(this,(function(s){switch(s.label){case 0:return[4,e.getAppJSON()];case 1:n=s.sent(),r=n.isGame,o=e.projectPath,i={mainMax:4194304,subMax:2097152,totalMax:16777216},"preview"===t&&e.getBigPackageSizeSupport()&&(i.mainMax=8388608,i.subMax=4194304,i.totalMax=25165824),(r||n.isLivePlugin)&&(i.mainMax=1/0,i.subMax=1/0,i.totalMax=20971520),a=[],s.label=2;case 2:return s.trys.push([2,4,,7]),[4,O(o,r)];case 3:return u=s.sent(),[3,7];case 4:return c=s.sent(),console.error("获取包体积失败",c),[4,(0,m.sleep)(1e3)];case 5:return s.sent(),[4,O(o,r)];case 6:return u=s.sent(),[3,7];case 7:if(!u)throw Error("获取包体积失败");if(u.total>i.totalMax&&a.push("项目源码包大小 "+(0,d.formatSize)(u.total)+",超过 "+(0,d.formatSize)(i.totalMax)+"。"),(u.sub.length>0||u.openData)&&(l=u.main,f=u.sub,h=u.openData,l.size>i.mainMax&&a.push("主包大小为 "+(0,d.formatSize)(l.size)+",超过 "+(0,d.formatSize)(i.mainMax)+"。"),null==f||f.forEach((function(e){e.size>i.subMax&&a.push(e.path+" 子包大小为 "+(0,d.formatSize)(e.size)+", 超过 "+(0,d.formatSize)(i.subMax)+"。")})),(null==h?void 0:h.size)>i.subMax&&a.push("开放数据域大小为 "+(0,d.formatSize)(h.size)+", 超过 "+(0,d.formatSize)(i.subMax)+"。")),a.length>0)throw new p.PackageSizeError(a.join("\n")+"\n可点击【查看解决方案】查看包体积优化方案,修改后重试。");return[2]}}))}))};var C=new Map;t.folderToZipStream=function(e,t,n,r,o){var i=t.whiteList,l=void 0===i?[]:i,d=t.useTypeScript;return void 0===r&&(r=m.HIGH_WATER_MARK),void 0===o&&(o={}),a(this,void 0,void 0,(function(){var t,i,h,E,A,O,w=this;return s(this,(function(I){switch(I.label){case 0:return t=function(e,t){if(n)return(0,y.filterFile)(e,t.getPackOptions());var r=t.getMiniprogramRoot();return(0,b.isSubPath)(r,e)&&(0,y.filterFile)(v.relative(r,e),t.getPackOptions())},i=function(){return a(w,void 0,void 0,(function(){var i,a,h,E,y,b,A,O,C,w,I;return s(this,(function(s){switch(s.label){case 0:return i=(0,f.default)("zip",{highWaterMark:r,statConcurrency:(0,m.maxConcurrency)()}),[4,(0,m.getProjectConfig)(e)];case 1:return a=s.sent(),h=a.isPluginProject(),E=(0,g.getWhiteList)(n,{isLivePlugin:o.isLivePlugin,isMicroappPlugin:h}).concat(l),[4,(0,_.default)(E,{cwd:e,stats:!1,dot:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})];case 2:return y=s.sent(),n?[3,6]:(b=a.getMiniprogramRoot(),A=v.join(e,b),[4,a.getAppJSON()]);case 3:return[4,s.sent().getKey("gameFiles")];case 4:return O=null!==(I=s.sent())&&void 0!==I?I:[],Array.isArray(O)&&O.length>0?(O=O.filter(m.isGameFileValid),[4,(0,_.default)(O,{cwd:A,dot:!1,stats:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})]):[3,6];case 5:C=(C=s.sent()).filter((function(e){return g.ALLOWED_MICROGAME_EXTS_REG.test(e)&&!e.startsWith("..")})).map((function(e){return v.join(b,e)})),y.push.apply(y,c([],u(C),!1)),s.label=6;case 6:return(w=new Set(y)).forEach((function(n){t(n,a)||!h&&d&&n.endsWith(".js")&&w.has(n.replace(/\.js$/,".ts"))||(h||d||!n.endsWith(".ts"))&&i.file(v.join(e,n),{name:n})})),i.on("warning",(function(e){if("ENOENT"!==e.code)throw new p.CompressError(e.message);console.warn("archiver with error "+e.message)})).on("error",(function(e){throw new p.CompressError(e.message)})),[4,i.finalize()];case 7:return s.sent(),[2,i]}}))}))},(h=C.get(e))?[4,h]:[3,2];case 1:I.sent(),I.label=2;case 2:E=i(),C.set(e,E),I.label=3;case 3:return I.trys.push([3,5,,6]),[4,E];case 4:return A=I.sent(),C.delete(e),[2,A];case 5:throw O=I.sent(),C.delete(e),O;case 6:return[2]}}))}))},t.prettyProjectSize=function(e){var t=e.total,n=e.main,r=e.sub,o=e.openData,i=[["主包",n.size]];null==r||r.sort((function(e,t){return t.size-e.size})).forEach((function(e){i.push([e.path,e.size])})),o&&i.push(["开放数据文件夹("+o.path+")",o.size]);var a=new h.default;return i.forEach((function(e){a.cell("路径",e[0]),a.cell("体积",(0,d.formatSize)(e[1]),h.default.leftPadder(" ")),a.newRow()})),a.total("体积",{reduce:function(e,n,r,o){return t},printer:function(e,n){return"总体积:"+(0,d.formatSize)(t)}}),a.toString()}},5796:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},l=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.projectToQRCode=t.upload=t.preview=t.checkProjectMatchAppid=t.checkChannel=void 0;var d=n(2747),f=n(7992),h=p(n(9258)),_=a(n(9849)),v=n(1017),m=p(n(7086)),E=n(7312),g=n(5138),y=n(9428),b=n(1728),A=p(n(8366)),O=n(5879),C=n(4486),w=n(4263),I=n(2893),S=n(3077),L=n(2997),P=n(4851);function R(e,t){if(!e)throw new Error("请检查 url 配置是否正常");return e.replace(/\$\{appid\}/g,t)}var T=(0,w.getCliDefaultStoragePath)(),D=(0,v.join)(T,"preview.json"),N={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default",page:{},previewPluginMode:"normal"};if((0,w.isCli)())if(_.existsSync(D))try{N=_.readJSONSync(D)}catch(e){}else _.ensureFileSync(D),_.writeJsonSync(D,N);function x(e){var t,n,o;return s(this,void 0,void 0,(function(){var i,a,s,c,l,p,_,v,m,g,y,A,O,C,S,L,P,T,D,N,x,M,k,U,F,G,B,H,V,Z,W,q,$,z;return u(this,(function(u){switch(u.label){case 0:return i=e.devAppid,a=e.extAppid,s=e.pluginAppid,c=e.projectPath,l=e.type,p=e.uploadVersion,_=e.uploadChangeLog,v=e.uploadNeedUploadSourcemap,m=e.uploadNeedCheck,g=e.extraCheckInfoJson,y=e.localCompileVersion,A=e.extraInfoJson,O=e.interactGame,C=e.supportSourcemap,S=e.useTypeScript,L=e.channel,P=e.lynxPackages,T=e.openApplicationType,N=new h.default,x=i,M="",O||"upload"!==l?[3,2]:[4,j(i,L)];case 1:u.sent(),u.label=2;case 2:return k="liveplugin"===T,[4,(0,E.folderToZipStream)(c,{whiteList:O?["**/*"]:v?["**/*.map"]:void 0,useTypeScript:S},!1,void 0,{isLivePlugin:k})];case 3:return U=u.sent(),F=(0,I.getConfig)(),G=f.AxiosInstance.put,O?[3,4]:(s&&(N.append("plugin_app_id",s),N.append("is_plugin_project",1)),"preview"===l?(a&&(x=a,M="?devappid="+i),D=R(F.url.preview,x)+M,P&&N.append("lynx_packages",P)):(D=R(F.url.upload,x)+M,s||(N.append("need_check",String(!!m)),N.append("extra_check_info_json",g)),N.append("version",p),N.append("intro",_),N.append("need_upload_sourcemap",String(!!v)),L&&N.append("tag",L)),N.append("source",U,{filename:"source.zip"}),N.append("local_compile_version",null!=y?y:"4.0.0-cli"),A&&N.append("extra_info_json",A),k&&N.append("submit_app_type",1),[3,6]);case 4:return G=f.AxiosInstance.post,N.append("app_id",x),N.append("tech_type",16),[4,(0,w.getMD5Stream)(U)];case 5:B=u.sent(),N.append("src_md5",B.__md5),N.append("src",B,{filename:"src.zip"}),"preview"===l?(D=F.interactGameUrl.preview,N.append("extra_json",A)):(D=F.interactGameUrl.upload,N.append("version",p),N.append("intro",_),N.append("extra_json",A)),u.label=6;case 6:return C&&N.append("is_debug","1"),W=G,q=[D,N],z={},$=[{}],[4,(0,b.getLogInfoHeaders)(i)];case 7:return[4,W.apply(void 0,q.concat([(z.headers=r.apply(void 0,[r.apply(void 0,$.concat([u.sent()])),N.getHeaders()]),z.maxBodyLength=s?1/0:33554432,z)]))];case 8:if(H=u.sent(),V=H.data,Z=H.headers,0===V.error||0===V.code)return[2,{metrics:null!==(t=V.performance_metrics)&&void 0!==t?t:{},logId:null!==(n=null==Z?void 0:Z["x-tt-logid"])&&void 0!==n?n:""}];if(100001===V.error)throw new d.UploadError("请先完成开发配置",V.error);if(100002===V.error)throw new d.UploadError("请检查 appid 是否为直播互动插件类型",V.error);throw new d.UploadError(null!==(o=V.message)&&void 0!==o?o:V.msg,V.error)}}))}))}function j(e,t){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:if(!t)return[2];if(!/^[1-9]\d*$/.test(t))throw new d.UploadError("通道只能是大于0的整数");return[4,M(e)];case 1:if((n=r.sent().limit_num)&&Number(t)>=n)throw new d.UploadError("通道不能大于 "+(n-1));return[4,Z(e)];case 2:if(r.sent())throw new d.UploadError("沙盒小程序不支持通道");return[2]}}))}))}function M(e){return s(this,void 0,void 0,(function(){var t,n,r;return u(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),r={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return r.headers=o.sent(),t=r,[4,f.AxiosInstance.get("https://microapp.bytedance.com/api/developer/ide/v1/microapp/get_exist_test_version?app_id="+e,t)];case 2:if(0===(n=o.sent()).data.code)return[2,n.data.data];throw new Error(n.data.msg);case 3:throw o.sent(),new Error("获取通道限制失败");case 4:return[2]}}))}))}function k(e,t,n,r,o){return void 0===r&&(r=!1),s(this,void 0,void 0,(function(){var i,a,s,c,l;return u(this,(function(u){switch(u.label){case 0:return l={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return l.headers=u.sent(),l.params={},i=l,a=e,s="",c="",n&&t&&(a=t,s="?devappid="+e),r?c=(0,I.getConfig)().interactGameUrl.compileProgress+"?app_id="+e+"&stage="+(n?"preview":"latest"):(o&&(i.params={is_plugin_project:1,plugin_app_id:o}),c=R((0,I.getConfig)().url.compileProgress,a)+s),[4,f.AxiosInstance.get(c,i).then((function(e){var t,n,o,i,a,s,u,c,l,p,d=e.data||{},f=d.error,h=d.status,_=d.message;return r&&(f=null===(t=e.data)||void 0===t?void 0:t.code,h=null===(o=null===(n=e.data)||void 0===n?void 0:n.data)||void 0===o?void 0:o.status,_=null!==(s=null===(a=null===(i=e.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.msg)&&void 0!==s?s:null===(u=e.data)||void 0===u?void 0:u.msg),1===f||r&&(1===h||0!==f)?{success:!1,done:!1,error:f,msg:_,errLink:null!==(c=e.data.err_link)&&void 0!==c?c:"",passJson:{}}:{success:!0,done:0===f&&2===h,error:f,msg:"",metrics:null!==(l=e.data.performance_metrics)&&void 0!==l?l:{},errLink:null!==(p=e.data.err_link)&&void 0!==p?p:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,u.sent()]}}))}))}function U(e,t,n,r,o){return void 0===r&&(r=!1),s(this,void 0,void 0,(function(){var i,a=this;return u(this,(function(c){switch(c.label){case 0:return i=0,[4,new Promise((function(c,l){var p=setInterval((function(){return s(a,void 0,void 0,(function(){var a,s,f,h,_,v,m,E,g;return u(this,(function(u){switch(u.label){case 0:return[4,k(e,t,n,r,o)];case 1:return a=u.sent(),s=a.success,f=a.msg,h=a.error,_=a.errLink,v=a.metrics,m=a.done,E=a.passJson,(i+=1)>100&&(clearInterval(p),l(new d.CompileError("查询编译进度超时"))),s||(clearInterval(p),g=new d.CompileError(f,_,h),l(g)),m&&(clearInterval(p),c({metrics:null!=v?v:{},passJson:E})),[2]}}))}))}),1e3)}))];case 1:return[2,c.sent()]}}))}))}function F(e){return s(this,void 0,void 0,(function(){var t,n,r;return u(this,(function(o){switch(o.label){case 0:return r={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return r.headers=o.sent(),t=r,n=(0,I.getConfig)().url.check+"?app_id="+e,[4,f.AxiosInstance.get(n,t).then((function(e){var t,n,r,o,i=e.data||{},a=i.code,s=i.err_msg;if(0!==a)return{success:!1,done:!1,error:a,msg:s,status:1};var u=null===(n=null===(t=e.data)||void 0===t?void 0:t.data)||void 0===n?void 0:n.status;return{success:!0,done:2===u||3===u,error:a,msg:"",status:u,result:(null===(o=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===o?void 0:o.check_list)||[]}})).catch((function(e){return{success:!1,error:-1,msg:e.message,status:1,done:!1}}))];case 2:return[2,o.sent()]}}))}))}function G(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,r){var o=setInterval((function(){return s(t,void 0,void 0,(function(){var t,i,a,s,c,l,p;return u(this,(function(u){switch(u.label){case 0:return[4,F(e)];case 1:return t=u.sent(),i=t.success,a=t.msg,s=t.done,c=t.status,l=t.result,p=void 0===l?[]:l,i||(clearInterval(o),r({msg:a})),s&&(clearInterval(o),n({status:c,result:p})),[2]}}))}))}),1e3)}))];case 1:return[2,n.sent()]}}))}))}function B(e,t){return void 0===t&&(t=e.getAppid()),s(this,void 0,void 0,(function(){var n,r,o,i;return u(this,(function(a){switch(a.label){case 0:return[4,Promise.all([e.detectProjectType("game"),e.detectProjectType("liveplugin"),(0,S.isRealToyId)(t)])];case 1:if(n=c.apply(void 0,[a.sent(),3]),r=n[0],o=n[1],i=n[2],o&&i)return[2];if(!r&&i)throw new d.ProjectError('当前项目为小程序项目,但是 "'+t+'" 属于小玩法 ID。');if(r&&!i)throw new d.ProjectError('当前项目为小玩法项目,但是 "'+t+'" 属于小程序 ID。');return[2]}}))}))}function H(e,t){var n,r;if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o=o.filter((function(t){return void 0!==e[t]})),i=i.filter((function(e){return void 0!==t[e]})),o.length!==i.length)return!1;try{for(var a=l(o),s=a.next();!s.done;s=a.next()){var u=s.value;if(!i.includes(u)||!H(e[u],t[u]))return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return!0}function V(e,t){var n;return void 0===t&&(t=5e3),s(this,void 0,void 0,(function(){var r,o,i,a,s,c,l,p,f,h,v,b,I,P,R,T,j,M,k,F,V,Z,q,$,z,K,J,X,Y,Q,ee,te,ne,re,oe,ie,ae,se,ue,ce,le;return u(this,(function(u){switch(u.label){case 0:return[4,(0,L.isCliNeedForceUpdate)("microapp")];case 1:return u.sent(),r={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},o=e.project,i=e.page,a=e.qrcode,s=e.cache,c=e.uploadOptions,l=e.localCompileVersion,p=e.ideConfig,f=e.debug,h=e.uploadCache,v=e.interactGame,b=e.supportSourcemap,I=e.enableHotRestartCache,P=e.penetrateMapJson,R=e.updateStatus,T=e.setCheckResult,j=e.traceVersion,M=e.traceMode,k=e.useLocalSchema,F=e.previewPluginMode,V=void 0===F?"normal":F,i&&function(e){var t,n;function r(e){for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(n<32||127===n)return!0}return!1}if(r(null!==(t=e.path)&&void 0!==t?t:"")||r(null!==(n=e.query)&&void 0!==n?n:""))throw new d.ProjectError("页面路径和页面参数中不能包含控制字符")}(i),Z=o.path,q=e.lynxPackages,$="",h||s?[4,(0,y.getProjectHash)(Z,!1,t)]:[3,3];case 2:$=u.sent(),u.label=3;case 3:return z=c?"upload":"preview",K=!1,s&&((0,w.isCli)()||(null==p?void 0:p.previewScene)===N.previewScene)&&$&&N.hash===$&&N.shortUrl&&N.previewPluginMode===V&&N.expireTime>Date.now()/1e3&&H(i,N.page)&&q===N.lynxPackages&&!k?(r.shortUrl=N.shortUrl,r.expireTime=N.expireTime,r.originSchema=N.originSchema,N.previewPluginMode=V,r.useCache=!0,A.default.info("项目文件无变动,使用缓存"),K=!0,[3,20]):[3,4];case 4:return(0,O.addNodeToMetrics)(r.metrics,"compileCreate"),[4,(0,w.getProjectConfig)(Z)];case 5:return[4,(J=u.sent()).getRealAppid()];case 6:return X=u.sent(),(0,w.validateAppId)(X),[4,B(J,X)];case 7:return u.sent(),(0,O.addFieldToMetrics)(r.metrics,"appId",X),Y=J.isPluginProject(),[4,J.getRealPluginAppid()];case 8:if(Q=u.sent(),Y&&!Q)throw new d.ProjectError("当前为插件项目,但是 project.config.json 不存在 pluginAppid 或为空,请检查 project.config.json 配置。");if(Y&&"testpluginappid"===Q)throw new d.ProjectError("pluginAppid 为测试号,无法预览,请检查 project.config.json 配置。");return ee=null,[4,(0,g.detectValidExtApp)(X,Z)];case 9:if((te=u.sent()).invalidReason||(ee=te.ext.extAppid),te.invalidReason&&te.invalidReason.reason!==g.INVALID_EXTAPP_REASON.EXT_DISABLED&&te.invalidReason.reason!==g.INVALID_EXTAPP_REASON.INVALID_EXT_JSON)throw new d.ProjectError('当前 ext.json "extEnable" 为 true,但是由于三方配置异常,当前工程仍为普通小程序工程,错误原因是:'+te.invalidReason.errMsg);return ne=A.default.loading("正在准备上传..."),k&&!q&&(q=J.getLynxPackage()),h&&$&&N.hash===$&&N.shortUrl&&N.expireTime>Date.now()/1e3&&q===N.lynxPackages?[3,17]:[4,(0,E.verifySubPackageSize)(J,z)];case 10:return u.sent(),"upload"!==z||v||(0,w.isIDE)()||Y?[3,12]:[4,(0,S.getAppVersions)(X)];case 11:if(re=u.sent().audit_version,c.version||(c.version=(0,w.getNextVersion)(re),A.default.info("\nThe default version is "+c.version+".")),re&&c&&1===(0,m.default)(re,c.version))throw new d.UploadError(c.version+" is smaller than "+re+"(pre order version)");u.label=12;case 12:return oe={upload:1,check:1,compile:1},ne.text="正在上传中...",null==R||R(oe),(0,O.addNodeToMetrics)(r.metrics,"IDERequest"),[4,x({devAppid:X,extAppid:ee,pluginAppid:Q,projectPath:Z,type:z,uploadChangeLog:null==c?void 0:c.changeLog,uploadVersion:null==c?void 0:c.version,uploadNeedUploadSourcemap:null==c?void 0:c.needUploadSourcemap,uploadNeedCheck:null==c?void 0:c.needUploadCheck,extraCheckInfoJson:null==c?void 0:c.extraCheckInfoJson,extraInfoJson:W(J,z,e.extraInfoJson),localCompileVersion:l,interactGame:v,supportSourcemap:b,useTypeScript:J.useTypeScript(),channel:null==c?void 0:c.channel,lynxPackages:q,openApplicationType:null==p?void 0:p.openApplicationType})];case 13:return ie=u.sent(),oe.upload=2,null==R||R(oe),(0,O.addFieldToMetrics)(r.metrics,"logId",ie.logId),(null==c?void 0:c.needUploadCheck)?(ne.text="查询预检进度中...",[4,G(X)]):[3,15];case 14:ae=u.sent(),oe.check=ae.status,null==R||R(oe),null==T||T(ae),u.label=15;case 15:return ne.text="查询编译进度中...",[4,U(X,ee,"preview"===z,!!v,Q)];case 16:se=u.sent(),oe.compile=2,null==R||R(oe),r.metrics=(0,O.mergeMetrics)(r.metrics,ie.metrics,se.metrics),r.passJson=se.passJson,(0,O.addNodeToMetrics)(r.metrics,"IDEReceiveResponse"),u.label=17;case 17:return null===(null==a?void 0:a.format)?[3,19]:(ne.text="生成二维码中...",[4,(0,C.makeSchema)({devAppid:X,extAppid:ee,startPage:i.path,query:i.query,scene:i.scene,bdpLog:{launch_from:i.launchFrom,location:i.location,entrance_form:"990001",enter_from_merge:"scan",enter_position:"qr_code"},headers:{},ideConfig:p,qrcodeQuery:null==f?void 0:f.query,referrerInfo:i.referrerInfo,hotRestartHash:I&&$?$:"",type:z,penetrateMapJson:P,traceVersion:j,traceMode:M,isInteractGame:!!v,uploadOptions:c,pluginAppid:Q,previewPluginMode:V})]);case 18:ue=u.sent(),r.shortUrl=ue.shortUrl,r.expireTime=ue.expireTime,r.originSchema=ue.originSchema,u.label=19;case 19:(0,O.addNodeToMetrics)(r.metrics,"compileClose"),ne.stop(),u.label=20;case 20:return"imageFile"!==(null==a?void 0:a.format)?[3,23]:a.output?[4,(0,C.toQRCodeFile)(r.shortUrl,a.output)]:[3,22];case 21:ce=u.sent(),r.qrcodeFilePath=ce,A.default.info("二维码图片已存储到 "+ce),u.label=22;case 22:return[3,26];case 23:return"imageSVG"!==(null==a?void 0:a.format)?[3,26]:K&&N.qrcodeSVG?(r.qrcodeSVG=N.qrcodeSVG,[3,26]):[3,24];case 24:return le=r,[4,(0,C.toQRCodeSVG)(r.shortUrl)];case 25:le.qrcodeSVG=u.sent(),u.label=26;case 26:return function(e){N=e,(0,w.isCli)()&&_.writeJsonSync(D,N)}({shortUrl:r.shortUrl,expireTime:r.expireTime,originSchema:r.originSchema,hash:$,previewScene:null!==(n=null==p?void 0:p.previewScene)&&void 0!==n?n:"default",qrcodeSVG:r.qrcodeSVG,page:i,lynxPackages:q}),[2,r]}}))}))}function Z(e){var t,n,o;return s(this,void 0,void 0,(function(){var i,a,s,c;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),a=f.AxiosInstance,c={url:"https://developer.open-douyin.com/bff_api/app/setting/v2/"+e+"/microappinfoservice/getMicroappInfo",params:{appId:e}},s=[{}],[4,(0,b.getLogInfoHeaders)(e)];case 1:return[4,a.apply(void 0,[(c.headers=r.apply(void 0,s.concat([u.sent()])),c.timeout=2e4,c)])];case 2:return i=u.sent(),[2,(null===(o=null===(n=null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.data)||void 0===n?void 0:n.appInfo)||void 0===o?void 0:o.isSandboxApp)||!1];case 3:return u.sent(),[2,!1];case 4:return[2]}}))}))}function W(e,t,n){if("preview"===t&&e.getBigPackageSizeSupport()){var r=(0,P.parseJson)(null!=n?n:"{}");return r.bigPackageSizeSupport=!0,JSON.stringify(r)}return n}t.checkChannel=j,t.checkProjectMatchAppid=B,t.preview=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return A.default.info("⚙️ Start to preview project..."),[4,V(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t;return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,V({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"990001",launchFrom:"scan",location:"qr_code"},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap,needUploadCheck:!!e.needUploadCheck,extraCheckInfoJson:JSON.stringify({}),channel:e.channel},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig,interactGame:e.interactGame,penetrateMapJson:e.penetrateMapJson})];case 1:return[2,n.sent()]}}))}))},t.projectToQRCode=V},5138:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.detectValidExtApp=t.INVALID_EXTAPP_REASON=void 0;var a,s=n(8559),u=n(7992),c=n(1728),l=i(n(8366)),p=n(2747);!function(e){e[e.INVALID_APPID_META=0]="INVALID_APPID_META",e[e.INVALID_EXTAPPID=1]="INVALID_EXTAPPID",e[e.EXT_DISABLED=2]="EXT_DISABLED",e[e.INVALID_EXT_JSON=3]="INVALID_EXT_JSON",e[e.INVALID_AUTH=4]="INVALID_AUTH",e[e.NULL=5]="NULL"}(a=t.INVALID_EXTAPP_REASON||(t.INVALID_EXTAPP_REASON={}));var d=function(){function e(){this._thirdPartyMetaMap={}}return e.prototype.getThirdPartyMeta=function(e){var t,n,i,a;return r(this,void 0,void 0,(function(){var r,s,d,f,h,_;return o(this,(function(o){switch(o.label){case 0:return this._thirdPartyMetaMap[e]?[2,this._thirdPartyMetaMap[e]]:(r={isThirdPartyApp:!1,thirdPartyName:""},[4,(0,c.getLogInfoHeaders)(e)]);case 1:s=o.sent(),d="https://microapp.bytedance.com/api/v1/app/"+e+"/meta",f={headers:s},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.AxiosInstance.get(d,f)];case 3:return h=o.sent().data,this._thirdPartyMetaMap[e]={isThirdPartyApp:h.data.is_thirdparty_dev,thirdPartyName:h.data.thirdparty.name},[3,5];case 4:if(_=o.sent(),401===(null===(t=_.response)||void 0===t?void 0:t.status))throw new p.LoginError(null!==(a=null===(i=null===(n=_.response)||void 0===n?void 0:n.data)||void 0===i?void 0:i.message)&&void 0!==a?a:"尚未登录");return l.default.error("getThirdPartyMeta",_),[2,r];case 5:return[2,this._thirdPartyMetaMap[e]]}}))}))},e.prototype.checkExtAppIdAuth=function(e,t){var n,i,a,s;return r(this,void 0,void 0,(function(){var r,d,f,h;return o(this,(function(o){switch(o.label){case 0:return r="https://microapp.bytedance.com/api/thirdparty/validate_ext_appid?dev_appid="+e+"&ext_appid="+t,[4,(0,c.getLogInfoHeaders)(e)];case 1:d=o.sent(),f={headers:d},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.AxiosInstance.get(r,f)];case 3:return[2,0===o.sent().data.error];case 4:if(h=o.sent(),401===(null===(n=h.response)||void 0===n?void 0:n.status))throw new p.LoginError(null!==(s=null===(a=null===(i=h.response)||void 0===i?void 0:i.data)||void 0===a?void 0:a.message)&&void 0!==s?s:"尚未登录");return l.default.error("checkExtAppIdAuth",h),[2,!1];case 5:return[2]}}))}))},e.prototype.getExtData=function(e){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,s.ProjectConfig.from(e)];case 1:return[4,t.sent().getExtJSON()];case 2:return[2,t.sent().rawJSON];case 3:return t.sent(),[2,null];case 4:return[2]}}))}))},e.prototype.detectValidExtApp=function(e,t){return r(this,void 0,void 0,(function(){var n,r,i,s,u;return o(this,(function(o){switch(o.label){case 0:return n={invalidReason:null,ext:null,thirdPartyName:null},[4,this.getExtData(t)];case 1:return(r=o.sent())?r.extEnable?r.extAppid?[4,this.getThirdPartyMeta(e)]:(n.invalidReason={reason:a.INVALID_EXTAPPID,errMsg:"ext.json 中 extAppid 异常"},[2,n]):(n.invalidReason={reason:a.EXT_DISABLED,errMsg:"ext.json 中 extEnable 为 false"},[2,n]):(n.invalidReason={reason:a.INVALID_EXT_JSON,errMsg:"请检查项目根目录 ext.json 是否存在或者格式是否正确"},[2,n]);case 2:return i=o.sent(),s=i.isThirdPartyApp,u=i.thirdPartyName,s?[4,this.checkExtAppIdAuth(e,r.extAppid)]:(n.invalidReason={reason:a.INVALID_APPID_META,errMsg:"当前 appid 获取不到第三方平台信息,请检查当前 appId 是否可以合法预览并且正常关联第三方平台"},[2,n]);case 3:return o.sent()?(n.ext=r,n.thirdPartyName=u,[2,n]):(n.invalidReason={reason:a.INVALID_AUTH,errMsg:"当前 AppID 没有资质开发对应的第三方小程序,请检查 project.config.json 中的 “appid” 字段以及 ext.json 中的 “extAppid” 字段是否填写正确"},[2,n])}}))}))},e.Instance=new e,e}();t.detectValidExtApp=d.Instance.detectValidExtApp.bind(d.Instance)},8956:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setProjectHashFn=t.getProjectHash=t.microgame=t.folderToZipStream=t.setAppConfig=t.makeSchema=t.INVALID_EXTAPP_REASON=t.checkProjectMatchAppid=t.verifySubPackageSize=t.getProjectSize=t.detectValidExtApp=t.getConfig=t.setCookieFn=t.projectToQRCode=t.upload=t.preview=t.buildNpm=t.getAuditHostsList=t.audit=t.checkSession=t.sendVerificationCodeToPhone=t.logout=t.loginByPhone=t.loginByEmail=t.create=t.setConfig=t.open=void 0;var l=n(9345);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return l.audit}}),Object.defineProperty(t,"getAuditHostsList",{enumerable:!0,get:function(){return l.getAuditHostsList}});var p=n(2893);Object.defineProperty(t,"getConfig",{enumerable:!0,get:function(){return p.getConfig}}),Object.defineProperty(t,"setConfig",{enumerable:!0,get:function(){return p.setConfig}});var d=n(2173);Object.defineProperty(t,"create",{enumerable:!0,get:function(){return d.createProject}});var f=n(4113);Object.defineProperty(t,"checkSession",{enumerable:!0,get:function(){return f.checkSession}}),Object.defineProperty(t,"loginByEmail",{enumerable:!0,get:function(){return f.loginByEmail}}),Object.defineProperty(t,"loginByPhone",{enumerable:!0,get:function(){return f.loginByPhone}}),Object.defineProperty(t,"logout",{enumerable:!0,get:function(){return f.logout}}),Object.defineProperty(t,"sendVerificationCodeToPhone",{enumerable:!0,get:function(){return f.sendVerificationCodeToPhone}});var h=n(8733),_=c(n(7239)),v=n(7312);Object.defineProperty(t,"getProjectSize",{enumerable:!0,get:function(){return v.getProjectSize}}),Object.defineProperty(t,"verifySubPackageSize",{enumerable:!0,get:function(){return v.verifySubPackageSize}});var m=n(5796);Object.defineProperty(t,"checkProjectMatchAppid",{enumerable:!0,get:function(){return m.checkProjectMatchAppid}}),Object.defineProperty(t,"preview",{enumerable:!0,get:function(){return m.preview}}),Object.defineProperty(t,"projectToQRCode",{enumerable:!0,get:function(){return m.projectToQRCode}});var E=n(5138);Object.defineProperty(t,"detectValidExtApp",{enumerable:!0,get:function(){return E.detectValidExtApp}}),Object.defineProperty(t,"INVALID_EXTAPP_REASON",{enumerable:!0,get:function(){return E.INVALID_EXTAPP_REASON}});var g=n(1728);Object.defineProperty(t,"setCookieFn",{enumerable:!0,get:function(){return g.setCookieFn}});var y=n(4486);Object.defineProperty(t,"makeSchema",{enumerable:!0,get:function(){return y.makeSchema}});var b=n(8066),A=n(9251);Object.defineProperty(t,"setAppConfig",{enumerable:!0,get:function(){return A.setAppConfig}}),t.open=function(e){return s(this,void 0,void 0,(function(){var t,n;return u(this,(function(r){switch(r.label){case 0:return t=e.project,n=e.remotePort,[4,(0,_.default)({projectPath:t.path,mode:t.mode,type:"microapp"},n)];case 1:return[2,r.sent()]}}))}))},t.buildNpm=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){switch(n.label){case 0:return t=e.project,[4,(0,h.buildNpm)({projectPath:t.path})];case 1:return[2,n.sent()]}}))}))},t.upload=function(e){var t,n;return s(this,void 0,void 0,(function(){var r;return u(this,(function(o){switch(o.label){case 0:return w.reportCommandCall("upload"),[4,(0,m.upload)(e)];case 1:return r=o.sent(),w.report(b.CLI_EVENTS.IDE_CLI_UPLOAD_SUCCESS,{appid:(null===(t=r.metrics)||void 0===t?void 0:t.appId)||"",logid:(null===(n=r.metrics)||void 0===n?void 0:n.logId)||""}),[2,r]}}))}))},i(n(3077),t);var O=n(7312);Object.defineProperty(t,"folderToZipStream",{enumerable:!0,get:function(){return O.folderToZipStream}}),i(n(5879),t),t.microgame=a(n(3098));var C=n(9428);Object.defineProperty(t,"getProjectHash",{enumerable:!0,get:function(){return C.getProjectHash}}),Object.defineProperty(t,"setProjectHashFn",{enumerable:!0,get:function(){return C.setProjectHashFn}});var w=b.CliMonitor.getInstance({cliVersion:"2.0.12",cliName:"tt-minigame-ide-cli"});w.report(b.CLI_EVENTS.IDE_CLI_LAUNCH)},7145:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CliMonitor=void 0;var i=n(4084),a=o(n(2037)),s=n(8223),u=n(2893),c=n(4122),l=n(4263),p=n(1728),d="";function f(){if(!d)try{d=(0,s.machineIdSync)(!0)}catch(e){console.error(e)}return d}var h=function(){function e(e){this._didReportLaunch=!1;var t=e.cliVersion,n=e.cliName;"true"!==process.env.isIDE?(this._commonParams={ideVersion:t,deviceId:f(),osPlatform:a.default.platform(),osVersion:a.default.release(),cliName:n},this._commonData={userId:(0,p.getUserId)(),username:""}):(this._commonParams={ideVersion:t,deviceId:"",osPlatform:a.default.platform(),osVersion:a.default.release(),cliName:n},this._commonData={userId:"",username:""})}return e.updateCommonParams=function(e){this._instance._commonData=Object.assign(this._instance._commonData,e)},e.getInstance=function(t){return this._instance||(this._instance=new e(t)),this._instance},e.prototype.shouldReport=function(e){return!(!1===(0,u.getConfig)().allowReportEvent||"true"===process.env.isIDE||e===c.CLI_EVENTS.IDE_CLI_LAUNCH&&this._didReportLaunch||"no"===process.env.ALLOW_REPORT_EVENT)},e.prototype.report=function(e,t){void 0===t&&(t={}),this.shouldReport(e)&&(e===c.CLI_EVENTS.IDE_CLI_LAUNCH&&(this._didReportLaunch=!0,t.scene=(0,l.isCli)()?"cli":"require"),(0,i.reportTeaImmediately)(this._commonParams,[{event:e,params:r(r({},t),this._commonData)}]))},e.prototype.reportCommandCall=function(e){this.report("IDE_CLI_COMMAND_CALL",{command_name:e})},e}();t.CliMonitor=h},4122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=void 0,t.CLI_EVENTS={IDE_CLI_LAUNCH:"IDE_CLI_LAUNCH",IDE_CLI_COMMAND_CALL:"IDE_CLI_COMMAND_CALL",IDE_CLI_PREVIEW_SUCCESS:"IDE_CLI_PREVIEW_SUCCESS",IDE_CLI_PREVIEW_FAIL:"IDE_CLI_PREVIEW_FAIL",IDE_CLI_UPLOAD_SUCCESS:"IDE_CLI_UPLOAD_SUCCESS",IDE_CLI_UPLOAD_FAIL:"IDE_CLI_UPLOAD_FAIL",IDE_CLI_ERROR:"IDE_CLI_ERROR",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER",IDE_CLI_FORCE_UPGRADE:"IDE_CLI_FORCE_UPGRADE"}},8066:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=t.CliMonitor=void 0;var r=n(7145);Object.defineProperty(t,"CliMonitor",{enumerable:!0,get:function(){return r.CliMonitor}});var o=n(4122);Object.defineProperty(t,"CLI_EVENTS",{enumerable:!0,get:function(){return o.CLI_EVENTS}})},2696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TEMPLATE_PLUGIN_DOWNLOAD_URL=t.TS_TEMPLATE_DOWNLOAD_URL=t.TEMPLATE_DOWNLOAD_URL=t.IDE_SCHEMA=void 0,t.IDE_SCHEMA="bytedanceide:",t.TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master.zip",t.TS_TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master-ts.zip",t.TEMPLATE_PLUGIN_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/microapp-plugin-template-js.zip"},1728:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.getLogInfoHeaders=t.setCookieFn=t.removeUserCookies=t.saveUserCookies=t.getUserId=t.getUserCookies=void 0;var c=i(n(9849)),l=i(n(1017)),p=n(2893),d=n(4263),f=n(9251),h="",_="";function v(){var e=(0,p.getConfig)();return l.join(e.storagePath,".cookies")}t.getUserCookies=function(){return a(void 0,void 0,void 0,(function(){var e,t;return s(this,(function(n){if(h)return[2,h];try{return[2,h=null!==(t=null===(e=c.readFileSync(v(),"utf-8").split("\n")[0])||void 0===e?void 0:e.trim())&&void 0!==t?t:""]}catch(e){throw h="",new Error("检测到本地无 Cookie,请重新登录")}return[2]}))}))},t.getUserId=function(){var e,t;if(_)return _;try{_=null!==(t=null===(e=c.readFileSync(v(),"utf-8").split("\n")[1])||void 0===e?void 0:e.trim())&&void 0!==t?t:""}catch(e){_=""}return _},t.saveUserCookies=function(e,t){if(_=t,e&&!(e.length<1)){var n=v();c.ensureFileSync(n),h=function(e){void 0===e&&(e=[]);var t=function(e){return void 0===e&&(e=[]),e.map((function(e){var t={name:"",value:""};return e.split("; ").reduce((function(e,t,n){var r=u(t.split("="),2),o=r[0],i=r[1];return 0===n?(e.name=o,e.value=i,e):(e[o]=i,e)}),t),t}))}(e);return function(e,t,n){void 0===t&&(t="sessionid_microapp"),void 0===n&&(n="sessionid_dy_open");var r=function(e,t){return void 0===t&&(t="sessionid_microapp"),e.find((function(e){return e.name===t}))}(e,t);return e.concat([Object.assign({},r,{name:"sessionid"}),Object.assign({},r,{name:n})])}(t)}(e).map((function(e){return e.name+"="+e.value})).join(";");var r=h+"\n"+t;c.writeFileSync(l.join(n),r)}},t.removeUserCookies=function(){h="",_="";try{c.removeSync(v())}catch(e){if("ENOENT"===e.code)return;throw e}},t.setCookieFn=function(e){t.getUserCookies=e},t.getLogInfoHeaders=function(e){return a(void 0,void 0,void 0,(function(){var n,r,o;return s(this,(function(i){switch(i.label){case 0:if((0,d.isIDE)()||!(n=(0,f.getToken)(e)))return[3,5];if(!n)return[3,5];r=void 0,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,t.getUserCookies)()];case 2:return r=i.sent(),[3,4];case 3:return i.sent(),r="",[3,4];case 4:return[2,{"x-cli-token":n,"x-cli-appid":e,Cookie:r}];case 5:return o={},[4,(0,t.getUserCookies)()];case 6:return[2,(o.Cookie=i.sent(),o)]}}))}))}},9428:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.setProjectHashFn=t.getProjectHash=void 0;var i=n(2896),a=n(2747),s=n(4263),u=n(9882);t.getProjectHash=function(e,t,n){return r(void 0,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n=(0,s.isMac)()?(0,u.getWhiteList)(t):(0,u.getWhiteList)(t).map((function(e){return"*".concat(e.slice(3))})),[4,(0,i.hashElement)(".",e,{encoding:"hex",folders:{exclude:[".*","node_modules"]},files:{include:n,matchBasename:!1,matchPath:!0}})];case 1:return[2,o.sent().hash];case 2:throw r=o.sent(),new a.HashError("获取工程文件夹 hash 失败:"+r.toString());case 3:return[2]}}))}))},t.setProjectHashFn=function(e){return r(this,void 0,void 0,(function(){var n=this;return o(this,(function(i){return t.getProjectHash=function(t,i,a){return void 0===a&&(a=5e3),r(n,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n){var r=setTimeout((function(){console.info("[hash project timeout]"),n("")}),a);e(t,i,a).then((function(e){clearTimeout(r),n(e)})).catch((function(){clearTimeout(r),n("")}))}))];case 1:return[2,n.sent()]}}))}))},[2]}))}))}},8366:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(1606)),s=i(n(8838)),u=n(3837),c=n(4263),l=function(){function e(){}return e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.loading=function(e){return{color:"green",text:e,stop:function(){}}},e.prototype.stopLoading=function(){},e}(),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l),d=null,f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.info(a.default.green(u.format.apply(null,e)))},t.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.warn(a.default.yellow(u.format.apply(null,e)))},t.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error(a.default.red(u.format.apply(null,e)))},t.prototype.loading=function(e){return d=(0,s.default)({text:e,interval:80}).start()},t.prototype.stopLoading=function(){d&&(d.stop(),d=null)},t}(l),h=(0,c.isCli)()?new f:new p;t.default=h},5879:function(e,t){"use strict";var n=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Metrics=t.mergeMetrics=t.addFieldToMetrics=t.addNodeToMetrics=void 0,t.addNodeToMetrics=function(e,t){e.nodes||(e.nodes=[]),e.nodes.push({node:t,timestamp:Date.now()})},t.addFieldToMetrics=function(e,t,n){"nodes"!==t&&void 0!==n&&(e[t]=n)},t.mergeMetrics=function(){for(var e,t,a,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];var c={nodes:[]};try{for(var l=r(s.filter(Boolean)),p=l.next();!p.done;p=l.next()){var d=p.value,f=d.nodes,h=n(d,["nodes"]);for(var _ in(a=c.nodes).push.apply(a,i([],o(null!=f?f:[]),!1)),h)void 0!==h[_]&&null!==h[_]&&(c[_]=h[_])}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}return c};var a=function(){function e(){this.nodes=[],this.tags={}}return e.prototype.addNode=function(e,t){return void 0===t&&(t=Date.now()),this.nodes.push({node:e,timestamp:t}),this},e.prototype.updateField=function(e,t){return void 0!==t?this.tags[e]=t:delete this.tags[e],this},e.prototype.merge=function(){for(var e,t,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];try{for(var a=r(o.filter(Boolean)),s=a.next();!s.done;s=a.next()){var u=s.value,c=u.nodes,l=n(u,["nodes"]);for(var p in this.nodes=this.nodes.concat(c),l)void 0!==l[p]&&(this.tags[p]=l[p])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this},e.prototype.settle=function(e){void 0===e&&(e=!1);var t=Object.assign({},this.tags);return t.nodes=this.nodes,e&&this.clear(),t},e.prototype.clear=function(){return this.nodes=[],this.tags={},this},e}();t.Metrics=a},4486:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateTerminalQrCode=t.toQRCodeFile=t.toQRCodeSVG=t.makeSchema=void 0;var l=n(2747),p=n(7992),d=c(n(1887)),f=c(n(1017)),h=c(n(3727)),_=a(n(4563)),v=n(2893),m=n(1728),E=c(n(8366)),g=n(4263);t.makeSchema=function(e){var t=this;return new Promise((function(n,o){return s(t,void 0,void 0,(function(){var t,i,a,s,c,d,f,h,_,E,y,b,A,O,C,w,I,S,L,P,R,T,D,N,x,j,M,k,U,F,G,B,H,V,Z,W,q;return u(this,(function(u){switch(u.label){case 0:return t=e.devAppid,i=e.extAppid,a=e.startPage,s=e.query,c=e.scene,d=e.bdpLog,f=e.qrcodeQuery,h=e.headers,_=e.ideConfig,E=e.isInteractGame,y=e.referrerInfo,b=e.hotRestartHash,A=e.type,O=e.penetrateMapJson,C=e.traceVersion,w=e.traceMode,I=e.uploadOptions,S=e.pluginAppid,L=e.previewPluginMode,P=(0,v.getConfig)().url.makeSchema,R={},i&&(R={devappid:t}),[4,(0,m.getLogInfoHeaders)(t)];case 1:T=u.sent(),D=a?a+"?"+s:"",N={skip_domain_check:!!(null==_?void 0:_.skipDomainCheck),inspect_platform:null!==(F=null==_?void 0:_.inspectPlatform)&&void 0!==F?F:"all",ide_version:null==_?void 0:_.ideVersion,ide_os:null==_?void 0:_.ideOS,ide_device_id:null==_?void 0:_.ideDid,ide_user_id:null==_?void 0:_.ideUid,iOS_debug_version:+(null==_?void 0:_.iOSDebugVersion),connect_type:null==_?void 0:_.connectType,local_debug:String(null==_?void 0:_.localDebug),dycloud_config:{call_container:null!==(B=null===(G=null==_?void 0:_.dycloudConfig)||void 0===G?void 0:G.callContainer)&&void 0!==B?B:null,websocket:null!==(V=null===(H=null==_?void 0:_.dycloudConfig)||void 0===H?void 0:H.websocket)&&void 0!==V?V:null},extra_info:null!==(Z=null==_?void 0:_.extraInfo)&&void 0!==Z?Z:{},performance_test:null==_?void 0:_.performanceTest},(null==_?void 0:_.isSandbox)&&Object.assign(N,{is_sandbox:!0,random_key:_.randomKey,account_name:_.accountName,app_id:_.appId,app_name:_.appName,expire_time:_.expireTime}),x={start_page:encodeURIComponent(D),query:null!=s?s:"",scene:""+c,bdp_log:JSON.stringify(d),penetrate_map_json:JSON.stringify(null!=O?O:r({referer_info:y,ide_inspect_version:6,trace_version:C,ide_live_debug:"live"===(null==_?void 0:_.previewScene),ide_config:N,trace_mode:w},b&&{hot_restart_version:b}))},"upload"===A&&(x.version_num=null==I?void 0:I.version,x.tag=null==I?void 0:I.channel),(null===(W=null==_?void 0:_.extraInfo)||void 0===W?void 0:W.preload)&&Object.assign(x,{preload:null==_?void 0:_.extraInfo.preload}),f&&Object.assign(x,f),E&&(P=(0,v.getConfig)().interactGameUrl.makeSchema),j={},S&&(j={plugin_app_id:S,is_plugin_project:1},"plugin"===L&&(j=r(r({},j),{is_plugin_schema:1}))),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,p.AxiosInstance.post(P,r(r(r({app_id:i||t,shelled_tech_type:null!==(q=e.shelledTechType)&&void 0!==q?q:2,stage:"upload"===A?"latest":"preview"},R),{schema_params:x}),j),{headers:Object.assign(T,h)})];case 3:return M=u.sent(),(0,g.isIDE)()&&console.info("makeSchema result",M),0===M.data.code?((0,g.isIDE)()&&console.info("makeSchema",M.data.data),k=+M.data.data.expire_time,n({originSchema:E?M.data.data.schema_v2:M.data.data.origin_schema,shortUrl:M.data.data.short_url,expireTime:0===k?-1:k})):o(new l.SchemaError(M.data.msg)),[3,5];case 4:return U=u.sent(),o(new l.SchemaError(U.toString())),[3,5];case 5:return[2]}}))}))}))},t.toQRCodeSVG=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){switch(n.label){case 0:return n.trys.push([0,1,,3]),[2,h.default.toString(e,{type:"svg",margin:0,color:{light:"#00000000"}})];case 1:return t=n.sent(),[4,Promise.reject(new l.QRCodeError(t.toString()))];case 2:return[2,n.sent()];case 3:return[2]}}))}))},t.toQRCodeFile=function(e,t){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:f.default.isAbsolute(t)||(t=f.default.resolve(process.cwd(),t)),r.label=1;case 1:return r.trys.push([1,3,,5]),[4,h.default.toFile(t,e,{color:{light:"#0000"}})];case 2:return r.sent(),[2,t];case 3:return n=r.sent(),[4,Promise.reject(new l.QRCodeError(n.toString()))];case 4:return[2,r.sent()];case 5:return[2]}}))}))},t.generateTerminalQrCode=function(e,t){_.generate(e,{small:t.small});var n="";t.copy&&(d.default.writeSync(e),n="(已拷贝到剪贴板)"),t.small&&E.default.warn("small QR Code may not work in some environments"),E.default.info("二维码信息:"+e+" "+n)}},2997:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isCliNeedForceUpdate=t.getForceUpdateConfig=t.getIDESettings=void 0;var s=n(7992),u=n(4851),c=n(1728),l=a(n(8366)),p=a(n(7282)),d=n(4263),f=n(8066),h=f.CliMonitor.getInstance({cliVersion:"2.0.12",cliName:"tt-minigame-ide-cli"});function _(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:t=(0,c.getUserId)(),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,s.AxiosInstance.get("https://is.snssdk.com/service/settings/v2/",{params:r({device_id:""+t,user_id:""+t,app:1,aid:13,caller_name:"microapp_ide"},null==e?void 0:e.params)})];case 2:return[2,n.sent().data.data.app];case 3:return n.sent(),[2,null];case 4:return[2]}}))}))}function v(e){var t;return o(this,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:return[4,_()];case 1:return(n=o.sent())?(r=null===(t=n.ide_config)||void 0===t?void 0:t.forceUpdate)?[2,{date:r.date,updateVersion:r.cli[e]}]:[2,null]:[2]}}))}))}t.getIDESettings=_,t.getForceUpdateConfig=v,t.isCliNeedForceUpdate=function(e){return o(this,void 0,void 0,(function(){var t,n,o,a;return i(this,(function(i){switch(i.label){case 0:return(0,d.isCli)()?[4,v(e)]:[2];case 1:return(t=i.sent())?((n=(0,u.isNeedForceUpdate)(r(r({},t),{curVersion:"2.0.12",appType:"CLI"})))&&(o=n.message,a=n.type,h.report(f.CLI_EVENTS.IDE_CLI_FORCE_UPGRADE,{force_update_type:a}),"force"===a?(l.default.error(o),p.default.exit()):l.default.warn(o)),[2]):[2,null]}}))}))}},4263:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=t.isObject=t.isGameFileValid=t.getNextVersion=t.getMD5Stream=t.getAppJson=t.getProjectConfig=t.getAppid=t.getCliDefaultStoragePath=t.clearConsole=t.mixEncode=t.validateAppId=t.validateEmail=t.validateVerificationCode=t.validatePhoneNumber=t.getPackageRoot=t.createProjectConfigFile=t.cleanArgs=t.maxConcurrency=t.isIDE=t.isMiniGameCli=t.isCli=t.isMac=t.HIGH_WATER_MARK=void 0;var c=n(2747),l=n(8559),p=u(n(6113)),d=i(n(9849)),f=i(n(2037)),h=i(n(1017)),_=i(n(4521)),v=n(2781);function m(){return"true"===process.env.isMiniGameCli}t.HIGH_WATER_MARK=33554432,t.isMac=function(){return"darwin"===process.platform},t.isCli=function(){return"true"===process.env.isCli},t.isMiniGameCli=m,t.isIDE=function(){return"true"===process.env.isIDE};var E=1;function g(e){if(!/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e))throw new c.ProjectError('AppId "'+e+'" is not valid')}t.maxConcurrency=function(){return E||(E=f.cpus().length),E},t.cleanArgs=function(e){return e.options.reduce((function(t,n){var r=n.long.replace(/^--/,"").replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}));return"function"!=typeof e[r]&&void 0!==e[r]&&(t[r]=e[r]),t}),{})},t.createProjectConfigFile=function(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),a(this,void 0,void 0,(function(){var o,i;return s(this,(function(a){switch(a.label){case 0:return o=h.resolve(t,"project.config.json"),r?(i='{\n "setting": {\n "urlCheck": true,\n "es6": true,\n "postcss": true,\n "minified": true,\n "newFeature": true,\n },\n "appid": "testAppId",\n "pluginAppid": "testPluginAppId",\n "projectname": "'+e+'",\n "douyinProjectType": "native",\n "miniprogramRoot": "miniprogram",\n "pluginRoot": "plugin",\n "ttProjectType": "plugin"\n }',[4,d.writeFile(o,i)]):[3,2];case 1:case 3:return[2,a.sent()];case 2:return i='{\n "setting": {\n "urlCheck": true,\n "es6": true,\n "postcss": true,\n "minified": true,\n "newFeature": true,\n "useCompilerPlugins": ['+(n?'"typescript"':"")+']\n },\n "miniprogramRoot": "./",\n "appid": "testappId",\n "projectname": "'+e+'"\n }',[4,d.writeFile(o,i)]}}))}))},t.getPackageRoot=function(){return h.join(__dirname,"..")},t.validatePhoneNumber=function(e){if(!/^1[2-9]\d{9}$/.test(e))throw new c.LoginError('PhoneNumber "'+e+'" is invalid')},t.validateVerificationCode=function(e){if(!/^\d{4}$/.test(e))throw new c.LoginError('VerificationCode "'+e+'" is invalid')},t.validateEmail=function(e){if(!/^([A-Za-z0-9_\-.])+@([A-Za-z0-9_\-.])+\.([A-Za-z]{2,4})$/.test(e))throw new c.LoginError('Email "'+e+'" is invalid')},t.validateAppId=g,t.mixEncode=function(e){for(var t=e.toString(),n=[],r=0,o=t.length;r<o;r++)n.push(t.charCodeAt(r));return n.map((function(e){return(5^e).toString(16)})).join("")},t.clearConsole=function(e){if(process.stdout.isTTY){var t="\n".repeat(process.stdout.rows);console.log(t),_.cursorTo(process.stdout,0,0),_.clearScreenDown(process.stdout),e&&console.log(e)}},t.getCliDefaultStoragePath=function(){var e=m()?".tmg-cli/":".tma-cli/";return h.join(f.homedir(),e)},t.getAppid=function(e){var t=e.getAppid();return g(t),t},t.getProjectConfig=function(e){return a(this,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,4]),[4,l.ProjectConfig.from(e)];case 1:case 3:return[2,n.sent()];case 2:return t=n.sent(),[4,Promise.reject(new c.ProjectError('Parsing "project.config.json" with error. '+t.toString()))];case 4:return[2]}}))}))},t.getAppJson=function(e,t,n){return a(this,void 0,void 0,(function(){var r,o,i,a;return s(this,(function(s){switch(s.label){case 0:r=(n?"game":"app")+".json",s.label=1;case 1:return s.trys.push([1,3,,5]),o=e.getMiniprogramRoot(),i=h.join(t,o,r),[4,d.readJSON(i)];case 2:return[2,s.sent()];case 3:return a=s.sent(),[4,Promise.reject(new c.ProjectError('Parsing "'+r+'" file with error. '+a.toString()))];case 4:return[2,s.sent()];case 5:return[2]}}))}))},t.getMD5Stream=function(e){return a(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,r){var o=p.default.createHash("md5"),i=new v.Transform({writableHighWaterMark:t.HIGH_WATER_MARK,readableHighWaterMark:t.HIGH_WATER_MARK,transform:function(e,t,n){o.update(e),n(null,e)}});i.__md5="",e.pipe(i),e.on("end",(function(){i.__md5=o.digest("hex"),n(i)})).on("error",(function(e){r(new c.CompressError("MD5 calculation failed "+e.message))}))}))];case 1:return[2,n.sent()]}}))}))},t.getNextVersion=function(e){try{var t=e.match(/\d+/g);return t[2]=(parseInt(t[2])+1).toString(),t.join(".")}catch(e){return"0.0.1"}},t.isGameFileValid=function(e){return!(".."===e||/\.\.(\\|\/)/.test(e)||/(\\|\/)\.\./.test(e))},t.isObject=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)},t.sleep=function(e){return new Promise((function(t){setTimeout((function(){t(null)}),e)}))}},9882:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getWhiteList=t.ALLOWED_MICROGAME_EXTS_REG=void 0;var i=n(4263),a=Object.freeze(["**/*.json","**/*.js","**/*.png","**/*.jpg","**/*.jpeg","**/*.gif","**/*.svg","**/*.cer","**/*.mp3","**/*.aac","**/*.m4a","**/*.mp4","**/*.wav","**/*.flac","**/*.ape","**/*.ogg","**/*.wma","**/*.midi","**/*.ogv","**/*.webm","**/*.mkv","**/*.ttc","**/*.ttf","**/*.woff","**/*.otf","**/*.obj","**/*.dae","**/*.fbx","**/*.mtl","**/*.stl","**/*.3ds","**/*.pvr","**/*.plist","**/*.fnt","**/*.gz","**/*.ccz","**/*.bmp","**/*.atlas","**/*.swf","**/*.ani","**/*.part","**/*.proto","**/*.bin","**/*.sk","**/*.mipmaps","**/*.txt","**/*.zip","**/*.tt","**/*.map","**/*.silk","**/*.dbbin","**/*.dbmv","**/*.etc","**/*.lmat","**/*.lm","**/*.ls","**/*.lh","**/*.lani","**/*.lav","**/*.lsani","**/*.ltc","**/*.xml","**/*.pkm","**/*.scene","**/*.csv","**/*.prefab","**/*.mesh","**/*.wasm","**/*.wasm.br"]);t.ALLOWED_MICROGAME_EXTS_REG=new RegExp("\\.("+a.map((function(e){return e.match(/\.([^.]+)$/)[1]})).join("|")+")$");var s=Object.freeze(["**/*.js","**/*.json","**/*.sjs","**/*.ts","**/*.ttml","**/*.ttss","**/*.wxml","**/*.wxs","**/*.wxss","**/*.sk","**/*.md","**/*.aac","**/*.bmp","**/*.br","**/*.cer","**/*.eot","**/*.gif","**/*.jpeg","**/*.jpg","**/*.m4a","**/*.mp3","**/*.mp4","**/*.ogg","**/*.otf","**/*.png","**/*.silk","**/*.svg","**/*.ttf","**/*.wasm","**/*.wav","**/*.webp","**/*.woff","**/*.wxs","**/*.wasm.br","**/*.heic"]),u=Object.freeze(["**/*.jsx","**/*.tsx","**/*.css"]),c=o([],r(new Set(o(o([],r(a),!1),r(s),!1))),!1),l=o([],r(new Set(o(o([],r(u),!1),r(s),!1))),!1);t.getWhiteList=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t={}),t.isMicroappPlugin?l:t.isLivePlugin?c:(0,i.isCli)()?(0,i.isMiniGameCli)()?a:s:e?a:s}},4354:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(8783)),s=i(n(8366)),u=n(2893),c=n(4263),l=n(8956),p=n(9808),d=i(n(1017)),f=n(4486),h=n(8733),_=i(n(9849)),v=n(8066),m=i(n(7239)),E=v.CliMonitor.getInstance({cliVersion:"2.0.12",cliName:"tt-minigame-ide-cli"});a.default.version("2.0.12","-V, --version","Output the current version"),a.default.command("open <project-path>").option("--mode <mode>","lite | full").description("Open target project by path").action((function(e,t){E.reportCommandCall(t.name());var n=(0,c.cleanArgs)(t).mode;(0,m.default)({projectPath:e,mode:n,type:"microgame"})})),a.default.command("login").description("Login to the developer platform").option("-m, --mobile","Login by mobile").option("-e, --email","Login by email").option("-p, --proxy <proxy>","Login with proxy").action((function(e){E.reportCommandCall(e.name());var t=(0,c.cleanArgs)(e);void 0!==t.proxy&&(0,u.setConfig)({proxy:t.proxy}),(0,p.cliAuth)(t)})),a.default.command("login-e [email] [password]").description("Login to the developer platform by E-mail").option("-p, --proxy <proxy>","Login with proxy").action((function(e,t,n){E.reportCommandCall(n.name());var r=(0,c.cleanArgs)(n);void 0!==r.proxy&&(0,u.setConfig)({proxy:r.proxy}),(0,l.loginByEmail)({email:e,password:t})})),a.default.command("logout").description("Logout and clear the session.").action((function(e){E.reportCommandCall(e.name()),(0,l.logout)()})),a.default.command("preview [entry]").description("Preview project by remote").option("-f, --force","Preview project without local cache(deprecated)").option("--disable-cache","Preview project without local cache").option("-s, --small","Use small QR Code, it may fail in some environments").option("-u, --copy","Copy remote url to clipboard").option("-p, --proxy <proxy>","Preview with proxy").option("-o, --output <path>","QRCode image output path").option("--minigame-query <query>","Minigame query").option("--minigame-scene <scene>","Minigame scene").option("--minigame-launch-from <launchFrom>","Minigame launchFrom").option("--minigame-location <location>","Minigame location").action((function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,i,a,p,h,_,m,g,y,b,A,O,C,w,I;return o(this,(function(o){switch(o.label){case 0:return E.reportCommandCall(t.name()),void 0!==(n=(0,c.cleanArgs)(t)).proxy&&(0,u.setConfig)({proxy:n.proxy}),e?d.default.isAbsolute(e)||(e=d.default.join(process.cwd(),e)):e=process.cwd(),[4,l.microgame.unityCli.isUnity(e)];case 1:if(!o.sent())return[3,6];o.label=2;case 2:return o.trys.push([2,4,,5]),[4,l.microgame.unityCli.previewForCli({projectPath:e,output:n.output,compileMode:{scene:null!==(h=null==n?void 0:n.minigameScene)&&void 0!==h?h:"990001",query:null!==(_=null==n?void 0:n.minigameQuery)&&void 0!==_?_:"",bdpLog:JSON.stringify({launch_from:null!==(m=null==n?void 0:n.minigameLaunchFrom)&&void 0!==m?m:"",location:null!==(g=null==n?void 0:n.minigameLocation)&&void 0!==g?g:""})}})];case 3:return a=o.sent(),(0,f.generateTerminalQrCode)(null!==(y=null==a?void 0:a.short_url)&&void 0!==y?y:"",{copy:n.copy,small:n.small}),[3,5];case 4:return r=o.sent(),s.default.stopLoading(),s.default.error(null!==(b=r.message)&&void 0!==b?b:r),E.report(v.CLI_EVENTS.IDE_CLI_PREVIEW_FAIL,{type:r.name,message:null!==(A=r.message)&&void 0!==A?A:r}),[3,5];case 5:return[2];case 6:i=!0,(n.force||n.disableCache)&&(i=!1),o.label=7;case 7:return o.trys.push([7,9,,10]),[4,l.microgame.preview({project:{path:e},page:{path:n.minigamePath,query:n.minigameQuery,scene:n.minigameScene,launchFrom:n.minigameLaunchFrom,location:n.minigameLocation},qrcode:{format:n.output?"imageFile":"terminal",output:n.output,options:{small:n.small}},localCompileVersion:"4.0.4-rc.17.ide.2.cli",cache:i,copyToClipboard:n.copy})];case 8:return(a=o.sent()).useCache||E.report(v.CLI_EVENTS.IDE_CLI_PREVIEW_SUCCESS,{appid:(null===(O=a.metrics)||void 0===O?void 0:O.appId)||"",logid:(null===(C=a.metrics)||void 0===C?void 0:C.logId)||""}),(0,f.generateTerminalQrCode)(a.shortUrl,{copy:n.copy,small:n.small}),[3,10];case 9:return p=o.sent(),s.default.stopLoading(),s.default.error(null!==(w=p.stack)&&void 0!==w?w:p),E.report(v.CLI_EVENTS.IDE_CLI_PREVIEW_FAIL,{type:p.name,message:null!==(I=p.message)&&void 0!==I?I:p}),[3,10];case 10:return[2]}}))}))})),a.default.command("upload [entry]").description("Upload project to the developer platform").requiredOption("-v, --app-version <version>","App version (eg: [major].[minor].[patch])").requiredOption("-c, --app-changelog <log>","Changelog for this version").option("-p, --proxy <proxy>","Update request proxy").option("-u, --copy","Copy remote url to clipboard").option("-s, --small","Use small QR Code, it may fail in some environments").option("-o, --output <path>","QRCode image output path").option("--channel <channel>","Test Channel").action((function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,i,a,p,h,_,m;return o(this,(function(o){switch(o.label){case 0:return E.reportCommandCall(t.name()),void 0!==(n=(0,c.cleanArgs)(t)).proxy&&(0,u.setConfig)({proxy:n.proxy}),e?d.default.isAbsolute(e)||(e=d.default.join(process.cwd(),e)):e=process.cwd(),[4,l.microgame.unityCli.isUnity(e)];case 1:return o.sent()?(r=s.default.loading("正在准备上传..."),[4,l.microgame.unityCli.unityUpload({projectPath:e,version:n.appVersion,publishDesc:n.appChangelog,updateStatus:function(e){r.text=l.microgame.unityCli.PROGRESS[e]},output:n.output,channel:null==n?void 0:n.channel})]):[3,3];case 2:return o.sent(),r.stop(),s.default.info("🎉 Upload success"),[2];case 3:return o.trys.push([3,5,,6]),[4,l.microgame.upload({project:{path:e},qrcode:{format:n.output?"imageFile":"terminal",output:n.output,options:{small:n.small}},channel:null==n?void 0:n.channel,localCompileVersion:"4.0.4-rc.17.ide.2.cli",copyToClipboard:n.copy,changeLog:n.appChangelog,version:n.appVersion})];case 4:return i=o.sent(),E.report(v.CLI_EVENTS.IDE_CLI_UPLOAD_SUCCESS,{appid:(null===(p=i.metrics)||void 0===p?void 0:p.appId)||"",logid:(null===(h=i.metrics)||void 0===h?void 0:h.logId)||""}),(0,f.generateTerminalQrCode)(i.shortUrl,{copy:n.copy,small:n.small}),s.default.info("🎉 Upload success"),[3,6];case 5:return a=o.sent(),s.default.stopLoading(),s.default.error(null!==(_=a.stack)&&void 0!==_?_:a),E.report(v.CLI_EVENTS.IDE_CLI_UPLOAD_FAIL,{type:a.name,message:null!==(m=a.message)&&void 0!==m?m:a}),[3,6];case 6:return[2]}}))}))})),a.default.command("build-npm [projectPath]").description("build npm packages in node_modules").action((function(e,t){return r(void 0,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return E.reportCommandCall(t.name()),[4,(0,h.buildNpm)({projectPath:e})];case 1:return(n=r.sent()).success?s.default.info("🎉 Build success"):s.default.error("Build failed.[message=%s]",n.reason),[2]}}))}))})),a.default.command("version [entry]").description("Get latest released version of project").action((function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,i,a,u,c;return o(this,(function(o){switch(o.label){case 0:return E.reportCommandCall(t.name()),e?d.default.isAbsolute(e)||(e=d.default.join(process.cwd(),e)):e=process.cwd(),n=d.default.join(e,"project.config.json"),[4,_.default.pathExists(n)];case 1:return o.sent()?[4,l.microgame.unityCli.isUnity(e)]:(s.default.error("Invalid project: project.config.json file not found"),[2]);case 2:return o.sent()?[4,l.microgame.unityCli.getVersions({projectPath:e})]:[3,4];case 3:return r=o.sent(),console.info("当前最新测试版本:",r.latest.version||"无"),console.info("当前最新线上版本:",r.current.version||"无"),[2];case 4:return[4,_.default.readFile(n,"utf-8")];case 5:return i=o.sent(),a=JSON.parse(i),(u=a.ttappid||a.appid)?[4,(0,l.getMeta)({appid:u})]:(s.default.error('Require parameter "appid".'),[2]);case 6:return c=o.sent(),s.default.info(c.version),[2]}}))}))})),a.default.command("set-config").description("Set tt-minigame-ide-cli config").option("-p, --proxy <proxy>","Set global proxy").option("--default","Use default").option("--envType <envType>","Set env type(online | boe | ppe)").option("--envChannel <envChannel>","Set env channel").option("-r, --allow-report-event <allowReportEvent>","allow report event when using, yes or no").action((function(e){E.reportCommandCall(e.name());var t=(0,c.cleanArgs)(e),n={};if(n.env={type:t.envType,channel:t.envChannel},void 0!==t.proxy&&(n.proxy=t.proxy),void 0!==t.allowReportEvent){if("yes"!==t.allowReportEvent&&"no"!==t.allowReportEvent)return void s.default.error('allowReportEvent can only be "yes" or "no"');n.allowReportEvent="yes"===t.allowReportEvent}(0,u.setConfig)(n,t.default)})),a.default.parse(process.argv),process.on("unhandledRejection",(function(e){var t;s.default.stopLoading(),s.default.error(null!==(t=e.stack)&&void 0!==t?t:e),E.report(v.CLI_EVENTS.IDE_CLI_ERROR,{type:"unhandledRejection",message:e.toString()})})),process.on("uncaughtException",(function(e){var t;s.default.stopLoading(),s.default.error(null!==(t=e.stack)&&void 0!==t?t:e),E.report(v.CLI_EVENTS.IDE_CLI_ERROR,{type:"uncaughtException",message:e.toString()})}))},9491:e=>{"use strict";e.exports=require("assert")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},7282:e=>{"use strict";e.exports=require("process")},3477:e=>{"use strict";e.exports=require("querystring")},4521:e=>{"use strict";e.exports=require("readline")},2781:e=>{"use strict";e.exports=require("stream")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},3732:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__3732__},1606:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1606__},1887:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1887__},469:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__469__},6883:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6883__},9508:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9508__},2896:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__2896__},9258:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9258__},9849:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9849__},6495:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6495__},8838:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__8838__},3727:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__3727__},4563:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__4563__},7086:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__7086__},2541:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__2541__},4088:(e,t,n)=>{"use strict";const r=n(9258),o=n(7310),i=n(3152),a=n(3685),s=n(5687),u=n(3837),c=n(4633),l=n(9796),p=n(2781),d=n(2361);function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const h=f(r),_=f(o),v=f(a),m=f(s),E=f(u),g=f(c),y=f(l),b=f(p),A=f(d);function O(e,t){return function(){return e.apply(t,arguments)}}const{toString:C}=Object.prototype,{getPrototypeOf:w}=Object,I=(S=Object.create(null),e=>{const t=C.call(e);return S[t]||(S[t]=t.slice(8,-1).toLowerCase())});var S;const L=e=>(e=e.toLowerCase(),t=>I(t)===e),P=e=>t=>typeof t===e,{isArray:R}=Array,T=P("undefined"),D=L("ArrayBuffer"),N=P("string"),x=P("function"),j=P("number"),M=e=>null!==e&&"object"==typeof e,k=e=>{if("object"!==I(e))return!1;const t=w(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},U=L("Date"),F=L("File"),G=L("Blob"),B=L("FileList"),H=L("URLSearchParams");function V(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),R(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Z(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,q=e=>!T(e)&&e!==W,$=(z="undefined"!=typeof Uint8Array&&w(Uint8Array),e=>z&&e instanceof z);var z;const K=L("HTMLFormElement"),J=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),X=L("RegExp"),Y=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};V(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},Q="abcdefghijklmnopqrstuvwxyz",ee="0123456789",te={DIGIT:ee,ALPHA:Q,ALPHA_DIGIT:Q+Q.toUpperCase()+ee},ne=L("AsyncFunction"),re={isArray:R,isArrayBuffer:D,isBuffer:function(e){return null!==e&&!T(e)&&null!==e.constructor&&!T(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||x(e.append)&&("formdata"===(t=I(e))||"object"===t&&x(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&D(e.buffer),t},isString:N,isNumber:j,isBoolean:e=>!0===e||!1===e,isObject:M,isPlainObject:k,isUndefined:T,isDate:U,isFile:F,isBlob:G,isRegExp:X,isFunction:x,isStream:e=>M(e)&&x(e.pipe),isURLSearchParams:H,isTypedArray:$,isFileList:B,forEach:V,merge:function e(){const{caseless:t}=q(this)&&this||{},n={},r=(r,o)=>{const i=t&&Z(n,o)||o;k(n[i])&&k(r)?n[i]=e(n[i],r):k(r)?n[i]=e({},r):R(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&V(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(V(t,((t,r)=>{n&&x(t)?e[r]=O(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&w(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:I,kindOfTest:L,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(R(e))return e;let t=e.length;if(!j(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:K,hasOwnProperty:J,hasOwnProp:J,reduceDescriptors:Y,freezeMethods:e=>{Y(e,((t,n)=>{if(x(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];x(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return R(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Z,global:W,isContextDefined:q,ALPHABET:te,generateString:(e=16,t=te.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&x(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(M(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=R(e)?[]:{};return V(e,((e,t)=>{const i=n(e,r+1);!T(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:ne,isThenable:e=>e&&(M(e)||x(e))&&x(e.then)&&x(e.catch)};function oe(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}re.inherits(oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:re.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ie=oe.prototype,ae={};function se(e){return re.isPlainObject(e)||re.isArray(e)}function ue(e){return re.endsWith(e,"[]")?e.slice(0,-2):e}function ce(e,t,n){return e?e.concat(t).map((function(e,t){return e=ue(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ae[e]={value:e}})),Object.defineProperties(oe,ae),Object.defineProperty(ie,"isAxiosError",{value:!0}),oe.from=(e,t,n,r,o,i)=>{const a=Object.create(ie);return re.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),oe.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const le=re.toFlatObject(re,{},null,(function(e){return/^is[A-Z]/.test(e)}));function pe(e,t,n){if(!re.isObject(e))throw new TypeError("target must be an object");t=t||new(h.default||FormData);const r=(n=re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!re.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&re.isSpecCompliantForm(t);if(!re.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(re.isDate(e))return e.toISOString();if(!s&&re.isBlob(e))throw new oe("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(e)||re.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(re.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(re.isArray(e)&&function(e){return re.isArray(e)&&!e.some(se)}(e)||(re.isFileList(e)||re.endsWith(n,"[]"))&&(s=re.toArray(e)))return n=ue(n),s.forEach((function(e,r){!re.isUndefined(e)&&null!==e&&t.append(!0===a?ce([n],r,i):null===a?n:n+"[]",u(e))})),!1;return!!se(e)||(t.append(ce(o,n,i),u(e)),!1)}const l=[],p=Object.assign(le,{defaultVisitor:c,convertValue:u,isVisitable:se});if(!re.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!re.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),re.forEach(n,(function(n,i){!0===(!(re.isUndefined(n)||null===n)&&o.call(t,n,re.isString(i)?i.trim():i,r,p))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t}function de(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function fe(e,t){this._pairs=[],e&&pe(e,this,t)}const he=fe.prototype;function _e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ve(e,t,n){if(!t)return e;const r=n&&n.encode||_e,o=n&&n.serialize;let i;if(i=o?o(t,n):re.isURLSearchParams(t)?t.toString():new fe(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}he.append=function(e,t){this._pairs.push([e,t])},he.toString=function(e){const t=e?function(t){return e.call(this,t,de)}:de;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const me=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){re.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ge={isNode:!0,classes:{URLSearchParams:_.default.URLSearchParams,FormData:h.default,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]},ye="undefined"!=typeof window&&"undefined"!=typeof document,be=(Ae="undefined"!=typeof navigator&&navigator.product,ye&&["ReactNative","NativeScript","NS"].indexOf(Ae)<0);var Ae;const Oe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ce={...Object.freeze({__proto__:null,hasBrowserEnv:ye,hasStandardBrowserWebWorkerEnv:Oe,hasStandardBrowserEnv:be}),...ge};function we(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;return i=!i&&re.isArray(r)?r.length:i,s?(re.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&re.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&re.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a)}if(re.isFormData(e)&&re.isFunction(e.entries)){const n={};return re.forEachEntry(e,((e,r)=>{t(function(e){return re.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const Ie={transitional:Ee,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=re.isObject(e);if(o&&re.isHTMLForm(e)&&(e=new FormData(e)),re.isFormData(e))return r&&r?JSON.stringify(we(e)):e;if(re.isArrayBuffer(e)||re.isBuffer(e)||re.isStream(e)||re.isFile(e)||re.isBlob(e))return e;if(re.isArrayBufferView(e))return e.buffer;if(re.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return pe(e,new Ce.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Ce.isNode&&re.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=re.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return pe(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(re.isString(e))try{return(0,JSON.parse)(e),re.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ie.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&re.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw oe.from(e,oe.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ce.classes.FormData,Blob:Ce.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};re.forEach(["delete","get","head","post","put","patch"],(e=>{Ie.headers[e]={}}));const Se=Ie,Le=re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Pe=Symbol("internals");function Re(e){return e&&String(e).trim().toLowerCase()}function Te(e){return!1===e||null==e?e:re.isArray(e)?e.map(Te):String(e)}function De(e,t,n,r,o){return re.isFunction(r)?r.call(this,t,n):(o&&(t=n),re.isString(t)?re.isString(r)?-1!==t.indexOf(r):re.isRegExp(r)?r.test(t):void 0:void 0)}class Ne{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Re(t);if(!o)throw new Error("header name must be a non-empty string");const i=re.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Te(e))}const i=(e,t)=>re.forEach(e,((e,n)=>o(e,n,t)));return re.isPlainObject(e)||e instanceof this.constructor?i(e,t):re.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Le[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=Re(e)){const n=re.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(re.isFunction(t))return t.call(this,e,n);if(re.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Re(e)){const n=re.findKey(this,e);return!(!n||void 0===this[n]||t&&!De(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Re(e)){const o=re.findKey(n,e);!o||t&&!De(0,n[o],o,t)||(delete n[o],r=!0)}}return re.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!De(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return re.forEach(this,((r,o)=>{const i=re.findKey(n,o);if(i)return t[i]=Te(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Te(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return re.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&re.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Pe]=this[Pe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Re(e);t[r]||(function(e,t){const n=re.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return re.isArray(e)?e.forEach(r):r(e),this}}Ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors(Ne.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),re.freezeMethods(Ne);const xe=Ne;function je(e,t){const n=this||Se,r=t||n,o=xe.from(r.headers);let i=r.data;return re.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Me(e){return!(!e||!e.__CANCEL__)}function ke(e,t,n){oe.call(this,null==e?"canceled":e,oe.ERR_CANCELED,t,n),this.name="CanceledError"}function Ue(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new oe("Request failed with status code "+n.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function Fe(e,t){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}re.inherits(ke,oe,{__CANCEL__:!0});const Ge="1.6.5";function Be(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const He=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Ve(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const u=Date.now(),c=r[a];o||(o=u),n[i]=s,r[i]=u;let l=a,p=0;for(;l!==i;)p+=n[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o<t)return;const d=c&&u-c;return d?Math.round(1e3*p/d):void 0}}const Ze=Symbol("internals");class We extends b.default.Transform{constructor(e){super({readableHighWaterMark:(e=re.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,t)=>!re.isUndefined(t[e])))).chunkSize});const t=this,n=this[Ze]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},r=Ve(n.ticksRate*e.samplesCount,n.timeWindow);this.on("newListener",(e=>{"progress"===e&&(n.isCaptured||(n.isCaptured=!0))}));let o=0;n.updateProgress=function(e,t){let n=0;const r=1e3/t;let o=null;return function(t,i){const a=Date.now();if(t||a-n>r)return o&&(clearTimeout(o),o=null),n=a,e.apply(null,i);o||(o=setTimeout((()=>(o=null,n=Date.now(),e.apply(null,i))),r-(a-n)))}}((function(){const e=n.length,i=n.bytesSeen,a=i-o;if(!a||t.destroyed)return;const s=r(a);o=i,process.nextTick((()=>{t.emit("progress",{loaded:i,total:e,progress:e?i/e:void 0,bytes:a,rate:s||void 0,estimated:s&&e&&i<=e?(e-i)/s:void 0})}))}),n.ticksRate);const i=()=>{n.updateProgress(!0)};this.once("end",i),this.once("error",i)}_read(e){const t=this[Ze];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){const r=this,o=this[Ze],i=o.maxRate,a=this.readableHighWaterMark,s=o.timeWindow,u=i/(1e3/s),c=!1!==o.minChunkSize?Math.max(o.minChunkSize,.01*u):0,l=(e,t)=>{const n=Buffer.byteLength(e);let l,p=null,d=a,f=0;if(i){const e=Date.now();(!o.ts||(f=e-o.ts)>=s)&&(o.ts=e,l=u-o.bytes,o.bytes=l<0?-l:0,f=0),l=u-o.bytes}if(i){if(l<=0)return setTimeout((()=>{t(null,e)}),s-f);l<d&&(d=l)}d&&n>d&&n-d>c&&(p=e.subarray(d),e=e.subarray(0,d)),function(e,t){const n=Buffer.byteLength(e);o.bytesSeen+=n,o.bytes+=n,o.isCaptured&&o.updateProgress(),r.push(e)?process.nextTick(t):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(t)}}(e,p?()=>{process.nextTick(t,null,p)}:t)};l(e,(function e(t,r){if(t)return n(t);r?l(r,e):n(null)}))}setLength(e){return this[Ze].length=+e,this}}const qe=We,{asyncIterator:$e}=Symbol,ze=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[$e]?yield*e[$e]():yield e},Ke=re.ALPHABET.ALPHA_DIGIT+"-_",Je=new u.TextEncoder,Xe="\r\n",Ye=Je.encode(Xe);class Qe{constructor(e,t){const{escapeName:n}=this.constructor,r=re.isString(t);let o=`Content-Disposition: form-data; name="${n(e)}"${!r&&t.name?`; filename="${n(t.name)}"`:""}${Xe}`;r?t=Je.encode(String(t).replace(/\r?\n|\r\n?/g,Xe)):o+=`Content-Type: ${t.type||"application/octet-stream"}${Xe}`,this.headers=Je.encode(o+Xe),this.contentLength=r?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;re.isTypedArray(e)?yield e:yield*ze(e),yield Ye}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}class et extends b.default.Transform{__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,n)}}const tt=et,nt=(e,t)=>re.isAsyncFn(e)?function(...n){const r=n.pop();e.apply(this,n).then((e=>{try{t?r(null,...t(e)):r(null,e)}catch(e){r(e)}}),r)}:e,rt={flush:y.default.constants.Z_SYNC_FLUSH,finishFlush:y.default.constants.Z_SYNC_FLUSH},ot={flush:y.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:y.default.constants.BROTLI_OPERATION_FLUSH},it=re.isFunction(y.default.createBrotliDecompress),{http:at,https:st}=g.default,ut=/https:?/,ct=Ce.protocols.map((e=>e+":"));function lt(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function pt(e,t,n){let r=t;if(!r&&!1!==r){const e=i.getProxyForUrl(n);e&&(r=new URL(e))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));const t=Buffer.from(r.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=r.hostname||r.host;e.hostname=t,e.host=t,e.port=r.port,e.path=n,r.protocol&&(e.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}e.beforeRedirects.proxy=function(e){pt(e,t,e.href)}}const dt=(e,t)=>(({address:e,family:t})=>{if(!re.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})(re.isObject(e)?e:{address:e,family:t}),ft=Ce.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];re.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),re.isString(r)&&a.push("path="+r),re.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}},ht=Ce.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=re.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function _t(e,t){let n=0;const r=Ve(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,u=r(s);n=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const vt={http:function(e){return t=async function(t,n,r){let{data:o,lookup:i,family:a}=e;const{responseType:s,responseEncoding:u}=e,c=e.method.toUpperCase();let l,d,f=!1;if(i){const e=nt(i,(e=>re.isArray(e)?e:[e]));i=(t,n,r)=>{e(t,n,((e,t,o)=>{if(e)return r(e);const i=re.isArray(t)?t.map((e=>dt(e))):[dt(t,o)];n.all?r(e,i):r(e,i[0].address,i[0].family)}))}}const h=new A.default,_=()=>{e.cancelToken&&e.cancelToken.unsubscribe(g),e.signal&&e.signal.removeEventListener("abort",g),h.removeAllListeners()};function g(t){h.emit("abort",!t||t.type?new ke(null,e,d):t)}r(((e,t)=>{l=!0,t&&(f=!0,_())})),h.once("abort",n),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(g),e.signal&&(e.signal.aborted?g():e.signal.addEventListener("abort",g)));const O=Fe(e.baseURL,e.url),C=new URL(O,"http://localhost"),w=C.protocol||ct[0];if("data:"===w){let r;if("GET"!==c)return Ue(t,n,{status:405,statusText:"method not allowed",headers:{},config:e});try{r=function(e,t,n){const r=n&&n.Blob||Ce.classes.Blob,o=Be(e);if(void 0===t&&r&&(t=!0),"data"===o){e=o.length?e.slice(o.length+1):e;const n=He.exec(e);if(!n)throw new oe("Invalid URL",oe.ERR_INVALID_URL);const i=n[1],a=n[2],s=n[3],u=Buffer.from(decodeURIComponent(s),a?"base64":"utf8");if(t){if(!r)throw new oe("Blob is not supported",oe.ERR_NOT_SUPPORT);return new r([u],{type:i})}return u}throw new oe("Unsupported protocol "+o,oe.ERR_NOT_SUPPORT)}(e.url,"blob"===s,{Blob:e.env&&e.env.Blob})}catch(t){throw oe.from(t,oe.ERR_BAD_REQUEST,e)}return"text"===s?(r=r.toString(u),u&&"utf8"!==u||(r=re.stripBOM(r))):"stream"===s&&(r=b.default.Readable.from(r)),Ue(t,n,{data:r,status:200,statusText:"OK",headers:new xe,config:e})}if(-1===ct.indexOf(w))return n(new oe("Unsupported protocol "+w,oe.ERR_BAD_REQUEST,e));const I=xe.from(e.headers).normalize();I.set("User-Agent","axios/"+Ge,!1);const S=e.onDownloadProgress,L=e.onUploadProgress,P=e.maxRate;let R,T;if(re.isSpecCompliantForm(o)){const e=I.getContentType(/boundary=([-_\w\d]{10,70})/i);o=((e,t,n)=>{const{tag:r="form-data-boundary",size:o=25,boundary:i=r+"-"+re.generateString(o,Ke)}=n||{};if(!re.isFormData(e))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");const a=Je.encode("--"+i+Xe),s=Je.encode("--"+i+"--"+Xe+Xe);let u=s.byteLength;const c=Array.from(e.entries()).map((([e,t])=>{const n=new Qe(e,t);return u+=n.size,n}));u+=a.byteLength*c.length,u=re.toFiniteNumber(u);const l={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(u)&&(l["Content-Length"]=u),t&&t(l),p.Readable.from(async function*(){for(const e of c)yield a,yield*e.encode();yield s}())})(o,(e=>{I.set(e)}),{tag:`axios-${Ge}-boundary`,boundary:e&&e[1]||void 0})}else if(re.isFormData(o)&&re.isFunction(o.getHeaders)){if(I.set(o.getHeaders()),!I.hasContentLength())try{const e=await E.default.promisify(o.getLength).call(o);Number.isFinite(e)&&e>=0&&I.setContentLength(e)}catch(e){}}else if(re.isBlob(o))o.size&&I.setContentType(o.type||"application/octet-stream"),I.setContentLength(o.size||0),o=b.default.Readable.from(ze(o));else if(o&&!re.isStream(o)){if(Buffer.isBuffer(o));else if(re.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else{if(!re.isString(o))return n(new oe("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",oe.ERR_BAD_REQUEST,e));o=Buffer.from(o,"utf-8")}if(I.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return n(new oe("Request body larger than maxBodyLength limit",oe.ERR_BAD_REQUEST,e))}const D=re.toFiniteNumber(I.getContentLength());let N,x;re.isArray(P)?(R=P[0],T=P[1]):R=T=P,o&&(L||R)&&(re.isStream(o)||(o=b.default.Readable.from(o,{objectMode:!1})),o=b.default.pipeline([o,new qe({length:D,maxRate:re.toFiniteNumber(R)})],re.noop),L&&o.on("progress",(e=>{L(Object.assign(e,{upload:!0}))}))),e.auth&&(N=(e.auth.username||"")+":"+(e.auth.password||"")),!N&&C.username&&(N=C.username+":"+C.password),N&&I.delete("authorization");try{x=ve(C.pathname+C.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const r=new Error(t.message);return r.config=e,r.url=e.url,r.exists=!0,n(r)}I.set("Accept-Encoding","gzip, compress, deflate"+(it?", br":""),!1);const j={path:x,method:c,headers:I.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:N,protocol:w,family:a,beforeRedirect:lt,beforeRedirects:{}};let M;!re.isUndefined(i)&&(j.lookup=i),e.socketPath?j.socketPath=e.socketPath:(j.hostname=C.hostname,j.port=C.port,pt(j,e.proxy,w+"//"+C.hostname+(C.port?":"+C.port:"")+j.path));const k=ut.test(j.protocol);if(j.agent=k?e.httpsAgent:e.httpAgent,e.transport?M=e.transport:0===e.maxRedirects?M=k?m.default:v.default:(e.maxRedirects&&(j.maxRedirects=e.maxRedirects),e.beforeRedirect&&(j.beforeRedirects.config=e.beforeRedirect),M=k?st:at),e.maxBodyLength>-1?j.maxBodyLength=e.maxBodyLength:j.maxBodyLength=1/0,e.insecureHTTPParser&&(j.insecureHTTPParser=e.insecureHTTPParser),d=M.request(j,(function(r){if(d.destroyed)return;const o=[r],i=+r.headers["content-length"];if(S){const e=new qe({length:re.toFiniteNumber(i),maxRate:re.toFiniteNumber(T)});S&&e.on("progress",(e=>{S(Object.assign(e,{download:!0}))})),o.push(e)}let a=r;const l=r.req||d;if(!1!==e.decompress&&r.headers["content-encoding"])switch("HEAD"!==c&&204!==r.statusCode||delete r.headers["content-encoding"],(r.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":o.push(y.default.createUnzip(rt)),delete r.headers["content-encoding"];break;case"deflate":o.push(new tt),o.push(y.default.createUnzip(rt)),delete r.headers["content-encoding"];break;case"br":it&&(o.push(y.default.createBrotliDecompress(ot)),delete r.headers["content-encoding"])}a=o.length>1?b.default.pipeline(o,re.noop):o[0];const p=b.default.finished(a,(()=>{p(),_()})),v={status:r.statusCode,statusText:r.statusMessage,headers:new xe(r.headers),config:e,request:l};if("stream"===s)v.data=a,Ue(t,n,v);else{const r=[];let o=0;a.on("data",(function(t){r.push(t),o+=t.length,e.maxContentLength>-1&&o>e.maxContentLength&&(f=!0,a.destroy(),n(new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l)))})),a.on("aborted",(function(){if(f)return;const t=new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l);a.destroy(t),n(t)})),a.on("error",(function(t){d.destroyed||n(oe.from(t,null,e,l))})),a.on("end",(function(){try{let e=1===r.length?r[0]:Buffer.concat(r);"arraybuffer"!==s&&(e=e.toString(u),u&&"utf8"!==u||(e=re.stripBOM(e))),v.data=e}catch(t){return n(oe.from(t,null,e,v.request,v))}Ue(t,n,v)}))}h.once("abort",(e=>{a.destroyed||(a.emit("error",e),a.destroy())}))})),h.once("abort",(e=>{n(e),d.destroy(e)})),d.on("error",(function(t){n(oe.from(t,null,e,d))})),d.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void n(new oe("error trying to parse `config.timeout` to int",oe.ERR_BAD_OPTION_VALUE,e,d));d.setTimeout(t,(function(){if(l)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Ee;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new oe(t,r.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,d)),g()}))}if(re.isStream(o)){let t=!1,n=!1;o.on("end",(()=>{t=!0})),o.once("error",(e=>{n=!0,d.destroy(e)})),o.on("close",(()=>{t||n||g(new ke("Request stream has been aborted",e,d))})),o.pipe(d)}else d.end(o)},new Promise(((e,n)=>{let r,o;const i=(e,t)=>{o||(o=!0,r&&r(e,t))},a=e=>{i(e,!0),n(e)};t((t=>{i(t),e(t)}),a,(e=>r=e)).catch(a)}));var t},xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=xe.from(e.headers).normalize();let i,a,{responseType:s,withXSRFToken:u}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(re.isFormData(r))if(Ce.hasStandardBrowserEnv||Ce.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(a=o.getContentType())){const[e,...t]=a?a.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const p=Fe(e.baseURL,e.url);function d(){if(!l)return;const r=xe.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());Ue((function(e){t(e),c()}),(function(e){n(e),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),ve(p,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new oe("Request aborted",oe.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new oe("Network Error",oe.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Ee;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new oe(t,r.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,l)),l=null},Ce.hasStandardBrowserEnv&&(u&&re.isFunction(u)&&(u=u(e)),u||!1!==u&&ht(p))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&ft.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&re.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),re.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&"json"!==s&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",_t(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",_t(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(n(!t||t.type?new ke(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const f=Be(p);f&&-1===Ce.protocols.indexOf(f)?n(new oe("Unsupported protocol "+f+":",oe.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};re.forEach(vt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const mt=e=>`- ${e}`,Et=e=>re.isFunction(e)||null===e||!1===e,gt=e=>{e=re.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Et(n)&&(r=vt[(t=String(n)).toLowerCase()],void 0===r))throw new oe(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new oe("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(mt).join("\n"):" "+mt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function yt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ke(null,e)}function bt(e){return yt(e),e.headers=xe.from(e.headers),e.data=je.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gt(e.adapter||Se.adapter)(e).then((function(t){return yt(e),t.data=je.call(e,e.transformResponse,t),t.headers=xe.from(t.headers),t}),(function(t){return Me(t)||(yt(e),t&&t.response&&(t.response.data=je.call(e,e.transformResponse,t.response),t.response.headers=xe.from(t.response.headers))),Promise.reject(t)}))}const At=e=>e instanceof xe?e.toJSON():e;function Ot(e,t){t=t||{};const n={};function r(e,t,n){return re.isPlainObject(e)&&re.isPlainObject(t)?re.merge.call({caseless:n},e,t):re.isPlainObject(t)?re.merge({},t):re.isArray(t)?t.slice():t}function o(e,t,n){return re.isUndefined(t)?re.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!re.isUndefined(t))return r(void 0,t)}function a(e,t){return re.isUndefined(t)?re.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>o(At(e),At(t),!0)};return re.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=u[r]||o,a=i(e[r],t[r],r);re.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Ct={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ct[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const wt={};Ct.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new oe(r(o," has been removed"+(t?" in "+t:"")),oe.ERR_DEPRECATED);return t&&!wt[o]&&(wt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};const It={assertOptions:function(e,t,n){if("object"!=typeof e)throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new oe("option "+i+" must be "+n,oe.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new oe("Unknown option "+i,oe.ERR_BAD_OPTION)}},validators:Ct},St=It.validators;class Lt{constructor(e){this.defaults=e,this.interceptors={request:new me,response:new me}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ot(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&It.assertOptions(n,{silentJSONParsing:St.transitional(St.boolean),forcedJSONParsing:St.transitional(St.boolean),clarifyTimeoutError:St.transitional(St.boolean)},!1),null!=r&&(re.isFunction(r)?t.paramsSerializer={serialize:r}:It.assertOptions(r,{encode:St.function,serialize:St.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&re.merge(o.common,o[t.method]);o&&re.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=xe.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,p=0;if(!s){const e=[bt.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);p<l;)c=c.then(e[p++],e[p++]);return c}l=a.length;let d=t;for(p=0;p<l;){const e=a[p++],t=a[p++];try{d=e(d)}catch(e){t.call(this,e);break}}try{c=bt.call(this,d)}catch(e){return Promise.reject(e)}for(p=0,l=u.length;p<l;)c=c.then(u[p++],u[p++]);return c}getUri(e){return ve(Fe((e=Ot(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}re.forEach(["delete","get","head","options"],(function(e){Lt.prototype[e]=function(t,n){return this.request(Ot(n||{},{method:e,url:t,data:(n||{}).data}))}})),re.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Ot(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Lt.prototype[e]=t(),Lt.prototype[e+"Form"]=t(!0)}));const Pt=Lt;class Rt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new ke(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Rt((function(t){e=t})),cancel:e}}}const Tt=Rt,Dt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dt).forEach((([e,t])=>{Dt[t]=e}));const Nt=Dt,xt=function e(t){const n=new Pt(t),r=O(Pt.prototype.request,n);return re.extend(r,Pt.prototype,n,{allOwnKeys:!0}),re.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ot(t,n))},r}(Se);xt.Axios=Pt,xt.CanceledError=ke,xt.CancelToken=Tt,xt.isCancel=Me,xt.VERSION=Ge,xt.toFormData=pe,xt.AxiosError=oe,xt.Cancel=xt.CanceledError,xt.all=function(e){return Promise.all(e)},xt.spread=function(e){return function(t){return e.apply(null,t)}},xt.isAxiosError=function(e){return re.isObject(e)&&!0===e.isAxiosError},xt.mergeConfig=Ot,xt.AxiosHeaders=xe,xt.formToJSON=e=>we(re.isHTMLForm(e)?new FormData(e):e),xt.getAdapter=gt,xt.HttpStatusCode=Nt,xt.default=xt,e.exports=xt},4649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8804);const o=function(e,t){for(var n=e.length;n--;)if((0,r.Z)(e[n][0],t))return n;return-1};var i=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=o(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const s=a},8896:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5546),o=n(3221);const i=(0,r.Z)(o.Z,"Map")},3703:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});const r=(0,n(5546).Z)(Object,"create");var o=Object.prototype.hasOwnProperty;var i=Object.prototype.hasOwnProperty;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this};const s=a;var u=n(4649),c=n(8896);const l=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function p(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}p.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(c.Z||u.Z),string:new s}},p.prototype.delete=function(e){var t=l(this,e).delete(e);return this.size-=t?1:0,t},p.prototype.get=function(e){return l(this,e).get(e)},p.prototype.has=function(e){return l(this,e).has(e)},p.prototype.set=function(e,t){var n=l(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const d=p},6218:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(4649);var o=n(8896),i=n(3703);function a(e){var t=this.__data__=new r.Z(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new r.Z,this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var n=this.__data__;if(n instanceof r.Z){var a=n.__data__;if(!o.Z||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i.Z(a)}return n.set(e,t),this.size=n.size,this};const s=a},187:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3221).Z.Symbol},8282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(3221).Z.Uint8Array},848:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(4248),o=n(7885),i=n(4975),a=n(6401),s=n(8127),u=Object.prototype.hasOwnProperty;const c=function(e,t){var n=(0,o.Z)(e),c=!n&&(0,r.Z)(e),l=!n&&!c&&(0,i.Z)(e),p=!n&&!c&&!l&&(0,s.Z)(e),d=n||c||l||p,f=d?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],h=f.length;for(var _ in e)!t&&!u.call(e,_)||d&&("length"==_||l&&("offset"==_||"parent"==_)||p&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||(0,a.Z)(_,h))||f.push(_);return f}},5598:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},5810:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},6299:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(905),o=n(8804),i=Object.prototype.hasOwnProperty;const a=function(e,t,n){var a=e[t];i.call(e,t)&&(0,o.Z)(a,n)&&(void 0!==n||t in e)||(0,r.Z)(e,t,n)}},905:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5088);const o=function(e,t,n){"__proto__"==t&&r.Z?(0,r.Z)(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},7024:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Z});var r=n(6218);var o=n(6299),i=n(2436),a=n(298);var s=n(7477);var u=n(3221),c="object"==typeof exports&&exports&&!exports.nodeType&&exports,l=c&&"object"==typeof module&&module&&!module.nodeType&&module,p=l&&l.exports===c?u.Z.Buffer:void 0,d=p?p.allocUnsafe:void 0;var f=n(6808);var h=n(8390);var _=n(7245),v=n(9878),m=n(8649),E=Object.prototype.hasOwnProperty;var g=n(8282);const y=function(e){var t=new e.constructor(e.byteLength);return new g.Z(t).set(new g.Z(e)),t};var b=/\w*$/;var A=n(187),O=A.Z?A.Z.prototype:void 0,C=O?O.valueOf:void 0;const w=function(e,t,n){var r,o,i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return y(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var n=t?y(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?y(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new(o=e).constructor(o.source,b.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return r=e,C?Object(C.call(r)):{}}};var I=n(3122),S=Object.create;const L=function(){function e(){}return function(t){if(!(0,I.default)(t))return{};if(S)return S(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var P=n(9552),R=n(5441);var T=n(7885),D=n(4975),N=n(3391);var x=n(3225),j=n(7755),M=j.Z&&j.Z.isMap;const k=M?(0,x.Z)(M):function(e){return(0,N.Z)(e)&&"[object Map]"==(0,m.Z)(e)};var U=j.Z&&j.Z.isSet;const F=U?(0,x.Z)(U):function(e){return(0,N.Z)(e)&&"[object Set]"==(0,m.Z)(e)};var G="[object Arguments]",B="[object Function]",H="[object Object]",V={};V[G]=V["[object Array]"]=V["[object ArrayBuffer]"]=V["[object DataView]"]=V["[object Boolean]"]=V["[object Date]"]=V["[object Float32Array]"]=V["[object Float64Array]"]=V["[object Int8Array]"]=V["[object Int16Array]"]=V["[object Int32Array]"]=V["[object Map]"]=V["[object Number]"]=V[H]=V["[object RegExp]"]=V["[object Set]"]=V["[object String]"]=V["[object Symbol]"]=V["[object Uint8Array]"]=V["[object Uint8ClampedArray]"]=V["[object Uint16Array]"]=V["[object Uint32Array]"]=!0,V["[object Error]"]=V[B]=V["[object WeakMap]"]=!1;const Z=function e(t,n,u,c,l,p){var g,y=1&n,b=2&n,A=4&n;if(u&&(g=l?u(t,c,l,p):u(t)),void 0!==g)return g;if(!(0,I.default)(t))return t;var O=(0,T.Z)(t);if(O){if(g=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&E.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!y)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(t,g)}else{var C=(0,m.Z)(t),S=C==B||"[object GeneratorFunction]"==C;if((0,D.Z)(t))return function(e,t){if(t)return e.slice();var n=e.length,r=d?d(n):new e.constructor(n);return e.copy(r),r}(t,y);if(C==H||C==G||S&&!l){if(g=b||S?{}:function(e){return"function"!=typeof e.constructor||(0,R.Z)(e)?{}:L((0,P.Z)(e))}(t),!y)return b?function(e,t){return(0,i.Z)(e,(0,h.Z)(e),t)}(t,function(e,t){return e&&(0,i.Z)(t,(0,s.Z)(t),e)}(g,t)):function(e,t){return(0,i.Z)(e,(0,f.Z)(e),t)}(t,function(e,t){return e&&(0,i.Z)(t,(0,a.default)(t),e)}(g,t))}else{if(!V[C])return l?t:{};g=w(t,C,y)}}p||(p=new r.Z);var N=p.get(t);if(N)return N;p.set(t,g),F(t)?t.forEach((function(r){g.add(e(r,n,u,r,t,p))})):k(t)&&t.forEach((function(r,o){g.set(o,e(r,n,u,o,t,p))}));var x=A?b?v.Z:_.Z:b?s.Z:a.default,j=O?void 0:x(t);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(j||t,(function(r,i){j&&(r=t[i=r]),(0,o.Z)(g,i,e(r,n,u,i,t,p))})),g}},9523:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(7653),o=n(7969);const i=function(e,t){for(var n=0,i=(t=(0,r.Z)(t,e)).length;null!=e&&n<i;)e=e[(0,o.Z)(t[n++])];return n&&n==i?e:void 0}},2938:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5810),o=n(7885);const i=function(e,t,n){var i=t(e);return(0,o.Z)(e)?i:(0,r.Z)(i,n(e))}},9001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(187),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r.Z?r.Z.toStringTag:void 0;var u=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}(e):function(e){return u.call(e)}(e)}},4187:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(6299),o=n(7653),i=n(6401),a=n(3122),s=n(7969);const u=function(e,t,n,u){if(!(0,a.default)(e))return e;for(var c=-1,l=(t=(0,o.Z)(t,e)).length,p=l-1,d=e;null!=d&&++c<l;){var f=(0,s.Z)(t[c]),h=n;if("__proto__"===f||"constructor"===f||"prototype"===f)return e;if(c!=p){var _=d[f];void 0===(h=u?u(_,f,d):void 0)&&(h=(0,a.default)(_)?_:(0,i.Z)(t[c+1])?[]:{})}(0,r.Z)(d,f,h),d=d[f]}return e}},3225:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return function(t){return e(t)}}},7653:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(7885),o=n(3502),i=n(3703);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(a.Cache||i.Z),n}a.Cache=i.Z;var s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g;const c=(l=a((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(s,(function(e,n,r,o){t.push(r?o.replace(u,"$1"):n||e)})),t}),(function(e){return 500===p.size&&p.clear(),e})),p=l.cache,l);var l,p,d=n(187),f=n(5598),h=n(2758),_=d.Z?d.Z.prototype:void 0,v=_?_.toString:void 0;const m=function e(t){if("string"==typeof t)return t;if((0,r.Z)(t))return(0,f.Z)(t,e)+"";if((0,h.Z)(t))return v?v.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},E=function(e){return null==e?"":m(e)},g=function(e,t){return(0,r.Z)(e)?e:(0,o.Z)(e,t)?[e]:c(E(e))}},2436:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6299),o=n(905);const i=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?(0,o.Z)(n,c,l):(0,r.Z)(n,c,l)}return n}},5088:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5546);const o=function(){try{var e=(0,r.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},1380:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(5810),o=n(187),i=n(4248),a=n(7885),s=o.Z?o.Z.isConcatSpreadable:void 0;const u=function(e){return(0,a.Z)(e)||(0,i.Z)(e)||!!(s&&e&&e[s])},c=function e(t,n,o,i,a){var s=-1,c=t.length;for(o||(o=u),a||(a=[]);++s<c;){var l=t[s];n>0&&o(l)?n>1?e(l,n-1,o,i,a):(0,r.Z)(a,l):i||(a[a.length]=l)}return a},l=function(e){return null!=e&&e.length?c(e,1):[]};var p=Math.max;var d=n(5088),f=n(9930);const h=d.Z?function(e,t){return(0,d.Z)(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:f.Z;var _=Date.now;const v=(m=h,E=0,g=0,function(){var e=_(),t=16-(e-g);if(g=e,t>0){if(++E>=800)return arguments[0]}else E=0;return m.apply(void 0,arguments)});var m,E,g;const y=function(e){return v(function(e,t,n){return t=p(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=p(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,void 0,l),e+"")}},2168:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},7245:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(2938),o=n(6808),i=n(298);const a=function(e){return(0,r.Z)(e,i.default,o.Z)}},9878:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(2938),o=n(8390),i=n(7477);const a=function(e){return(0,r.Z)(e,i.Z,o.Z)}},5546:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(8936);const o=n(3221).Z["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var s=n(3122),u=n(6682),c=/^\[object .+?Constructor\]$/,l=Function.prototype,p=Object.prototype,d=l.toString,f=p.hasOwnProperty,h=RegExp("^"+d.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const _=function(e){return!(!(0,s.default)(e)||(t=e,a&&a in t))&&((0,r.Z)(e)?h:c).test((0,u.Z)(e));var t},v=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return _(n)?n:void 0}},9552:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(6048).Z)(Object.getPrototypeOf,Object)},6808:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(813),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const a=i?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(i(e),(function(t){return o.call(e,t)})))}:r.Z},8390:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(5810),o=n(9552),i=n(6808),a=n(813);const s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,r.Z)(t,(0,i.Z)(e)),e=(0,o.Z)(e);return t}:a.Z},8649:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(5546),o=n(3221);const i=(0,r.Z)(o.Z,"DataView");var a=n(8896);const s=(0,r.Z)(o.Z,"Promise"),u=(0,r.Z)(o.Z,"Set"),c=(0,r.Z)(o.Z,"WeakMap");var l=n(9001),p=n(6682),d="[object Map]",f="[object Promise]",h="[object Set]",_="[object WeakMap]",v="[object DataView]",m=(0,p.Z)(i),E=(0,p.Z)(a.Z),g=(0,p.Z)(s),y=(0,p.Z)(u),b=(0,p.Z)(c),A=l.Z;(i&&A(new i(new ArrayBuffer(1)))!=v||a.Z&&A(new a.Z)!=d||s&&A(s.resolve())!=f||u&&A(new u)!=h||c&&A(new c)!=_)&&(A=function(e){var t=(0,l.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,p.Z)(n):"";if(r)switch(r){case m:return v;case E:return d;case g:return f;case y:return h;case b:return _}return t});const O=A},6401:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=/^(?:0|[1-9]\d*)$/;const o=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},3502:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(7885),o=n(2758),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const s=function(e,t){if((0,r.Z)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!(0,o.Z)(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},5441:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=Object.prototype;const o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},7755:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(2168),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o&&r.Z.process;const s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}()},6048:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},3221:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(2168),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.Z||o||Function("return this")()},7969:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(2758);const o=function(e){if("string"==typeof e||(0,r.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},6682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=Function.prototype.toString;const o=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7921:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(7024);const o=function(e){return(0,r.Z)(e,5)}},8804:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return e===t||e!=e&&t!=t}},772:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(9523);const o=function(e,t,n){var o=null==e?void 0:(0,r.Z)(e,t);return void 0===o?n:o}},3488:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});const r=function(e,t){return null!=e&&t in Object(e)};var o=n(7653),i=n(4248),a=n(7885),s=n(6401),u=n(1164),c=n(7969);const l=function(e,t){return null!=e&&function(e,t,n){for(var r=-1,l=(t=(0,o.Z)(t,e)).length,p=!1;++r<l;){var d=(0,c.Z)(t[r]);if(!(p=null!=e&&n(e,d)))break;e=e[d]}return p||++r!=l?p:!!(l=null==e?0:e.length)&&(0,u.Z)(l)&&(0,s.Z)(d,l)&&((0,a.Z)(e)||(0,i.Z)(e))}(e,t,r)}},9930:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return e}},4248:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(9001),o=n(3391);const i=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,s=a.hasOwnProperty,u=a.propertyIsEnumerable;const c=i(function(){return arguments}())?i:function(e){return(0,o.Z)(e)&&s.call(e,"callee")&&!u.call(e,"callee")}},7885:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},3282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(8936),o=n(1164);const i=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,r.Z)(e)}},4975:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(3221);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?r.Z.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},8936:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9001),o=n(3122);const i=function(e){if(!(0,o.default)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1164:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3122:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3391:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},2758:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9001),o=n(3391);const i=function(e){return"symbol"==typeof e||(0,o.Z)(e)&&"[object Symbol]"==(0,r.Z)(e)}},8127:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9001),o=n(1164),i=n(3391),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=n(3225),u=n(7755),c=u.Z&&u.Z.isTypedArray;const l=c?(0,s.Z)(c):function(e){return(0,i.Z)(e)&&(0,o.Z)(e.length)&&!!a[(0,r.Z)(e)]}},298:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(848),o=n(5441);const i=(0,n(6048).Z)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;var s=n(3282);const u=function(e){return(0,s.Z)(e)?(0,r.Z)(e):function(e){if(!(0,o.Z)(e))return i(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}},7477:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(848),o=n(3122),i=n(5441);var a=Object.prototype.hasOwnProperty;const s=function(e){if(!(0,o.default)(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=(0,i.Z)(e),n=[];for(var r in e)("constructor"!=r||!t&&a.call(e,r))&&n.push(r);return n};var u=n(3282);const c=function(e){return(0,u.Z)(e)?(0,r.Z)(e,!0):s(e)}},1395:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>A});var r=n(5598),o=n(7024),i=n(7653);var a=n(9523);const s=function(e,t){return t.length<2?e:(0,a.Z)(e,function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(t,0,-1))};var u=n(7969);const c=function(e,t){return t=(0,i.Z)(t,e),null==(e=s(e,t))||delete e[(0,u.Z)((n=t,r=null==n?0:n.length,r?n[r-1]:void 0))];var n,r};var l=n(2436),p=n(9001),d=n(9552),f=n(3391),h=Function.prototype,_=Object.prototype,v=h.toString,m=_.hasOwnProperty,E=v.call(Object);const g=function(e){return function(e){if(!(0,f.Z)(e)||"[object Object]"!=(0,p.Z)(e))return!1;var t=(0,d.Z)(e);if(null===t)return!0;var n=m.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&v.call(n)==E}(e)?void 0:e};var y=n(1380),b=n(9878);const A=(0,y.Z)((function(e,t){var n={};if(null==e)return n;var a=!1;t=(0,r.Z)(t,(function(t){return t=(0,i.Z)(t,e),a||(a=t.length>1),t})),(0,l.Z)(e,(0,b.Z)(e),n),a&&(n=(0,o.Z)(n,7,g));for(var s=t.length;s--;)c(n,t[s]);return n}))},8337:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(9523),o=n(4187),i=n(7653);var a=n(3488);const s=function(e,t){return function(e,t,n){for(var a=-1,s=t.length,u={};++a<s;){var c=t[a],l=(0,r.Z)(e,c);n(l,c)&&(0,o.Z)(u,(0,i.Z)(c,e),l)}return u}(e,t,(function(t,n){return(0,a.Z)(e,n)}))},u=(0,n(1380).Z)((function(e,t){return null==e?{}:s(e,t)}))},6503:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>z});const r=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n},o=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};var i=n(298);var a=n(3282);const s=(u=function(e,t){return e&&o(e,t,i.default)},function(e,t){if(null==e)return e;if(!(0,a.Z)(e))return u(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e});var u,c=n(6218),l=n(3703);function p(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new l.Z;++t<n;)this.add(e[t])}p.prototype.add=p.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},p.prototype.has=function(e){return this.__data__.has(e)};const d=p,f=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},h=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var p=-1,h=!0,_=2&n?new d:void 0;for(i.set(e,t),i.set(t,e);++p<s;){var v=e[p],m=t[p];if(r)var E=a?r(m,v,p,t,e,i):r(v,m,p,e,t,i);if(void 0!==E){if(E)continue;h=!1;break}if(_){if(!f(t,(function(e,t){if(a=t,!_.has(a)&&(v===e||o(v,e,n,r,i)))return _.push(t);var a}))){h=!1;break}}else if(v!==m&&!o(v,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h};var _=n(187),v=n(8282),m=n(8804);const E=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},g=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var y=_.Z?_.Z.prototype:void 0,b=y?y.valueOf:void 0;var A=n(7245),O=Object.prototype.hasOwnProperty;var C=n(8649),w=n(7885),I=n(4975),S=n(8127),L="[object Arguments]",P="[object Array]",R="[object Object]",T=Object.prototype.hasOwnProperty;const D=function(e,t,n,r,o,i){var a=(0,w.Z)(e),s=(0,w.Z)(t),u=a?P:(0,C.Z)(e),l=s?P:(0,C.Z)(t),p=(u=u==L?R:u)==R,d=(l=l==L?R:l)==R,f=u==l;if(f&&(0,I.Z)(e)){if(!(0,I.Z)(t))return!1;a=!0,p=!1}if(f&&!p)return i||(i=new c.Z),a||(0,S.Z)(e)?h(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new v.Z(e),new v.Z(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,m.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=E;case"[object Set]":var u=1&r;if(s||(s=g),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=h(s(e),s(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(b)return b.call(e)==b.call(t)}return!1}(e,t,u,n,r,o,i);if(!(1&n)){var _=p&&T.call(e,"__wrapped__"),y=d&&T.call(t,"__wrapped__");if(_||y){var D=_?e.value():e,N=y?t.value():t;return i||(i=new c.Z),o(D,N,n,r,i)}}return!!f&&(i||(i=new c.Z),function(e,t,n,r,o,i){var a=1&n,s=(0,A.Z)(e),u=s.length;if(u!=(0,A.Z)(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:O.call(t,l)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var _=e[l=s[c]],v=t[l];if(r)var m=a?r(v,_,l,t,e,i):r(_,v,l,e,t,i);if(!(void 0===m?_===v||o(_,v,n,r,i):m)){f=!1;break}h||(h="constructor"==l)}if(f&&!h){var E=e.constructor,g=t.constructor;E==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof g&&g instanceof g||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,o,i))};var N=n(3391);const x=function e(t,n,r,o,i){return t===n||(null==t||null==n||!(0,N.Z)(t)&&!(0,N.Z)(n)?t!=t&&n!=n:D(t,n,r,o,e,i))};var j=n(3122);const M=function(e){return e==e&&!(0,j.default)(e)},k=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},U=function(e){var t=function(e){for(var t=(0,i.default)(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,M(o)]}return t}(e);return 1==t.length&&t[0][2]?k(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var u=(s=n[o])[0],l=e[u],p=s[1];if(a&&s[2]){if(void 0===l&&!(u in e))return!1}else{var d=new c.Z;if(r)var f=r(l,p,u,e,t,d);if(!(void 0===f?x(p,l,3,r,d):f))return!1}}return!0}(n,e,t)}};var F=n(772),G=n(3488),B=n(3502),H=n(7969);var V=n(9930);var Z=n(9523);const W=function(e){return(0,B.Z)(e)?(t=(0,H.Z)(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return(0,Z.Z)(t,e)}}(e);var t},q=function(e){return"function"==typeof e?e:null==e?V.Z:"object"==typeof e?(0,w.Z)(e)?(t=e[0],n=e[1],(0,B.Z)(t)&&M(n)?k((0,H.Z)(t),n):function(e){var r=(0,F.default)(e,t);return void 0===r&&r===n?(0,G.Z)(e,t):x(n,r,3)}):U(e):W(e);var t,n},$=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n},z=function(e,t,n){var o=(0,w.Z)(e)?r:$,i=arguments.length<3;return o(e,q(t),n,i,s)}},5513:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4187);const o=function(e,t,n){return null==e?e:(0,r.Z)(e,t,n)}},813:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(){return[]}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(4354);return __webpack_exports__})()));
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("form-data"),require("fs-extra"),require("deep-clone"),require("chalk"),require("ora"),require("semver-compare"),require("archiver"),require("easy-table"),require("fast-glob"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("unzipper"),require("inquirer"));else if("function"==typeof define&&define.amd)define(["form-data","fs-extra","deep-clone","chalk","ora","semver-compare","archiver","easy-table","fast-glob","folder-hash","clipboardy","qrcode","qrcode-terminal","unzipper","inquirer"],t);else{var n="object"==typeof exports?t(require("form-data"),require("fs-extra"),require("deep-clone"),require("chalk"),require("ora"),require("semver-compare"),require("archiver"),require("easy-table"),require("fast-glob"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("unzipper"),require("inquirer")):t(e["form-data"],e["fs-extra"],e["deep-clone"],e.chalk,e.ora,e["semver-compare"],e.archiver,e["easy-table"],e["fast-glob"],e["folder-hash"],e.clipboardy,e.qrcode,e["qrcode-terminal"],e.unzipper,e.inquirer);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(global,((__WEBPACK_EXTERNAL_MODULE__6245__,__WEBPACK_EXTERNAL_MODULE__120__,__WEBPACK_EXTERNAL_MODULE__58__,__WEBPACK_EXTERNAL_MODULE__4731__,__WEBPACK_EXTERNAL_MODULE__6924__,__WEBPACK_EXTERNAL_MODULE__746__,__WEBPACK_EXTERNAL_MODULE__6624__,__WEBPACK_EXTERNAL_MODULE__1755__,__WEBPACK_EXTERNAL_MODULE__5063__,__WEBPACK_EXTERNAL_MODULE__1079__,__WEBPACK_EXTERNAL_MODULE__753__,__WEBPACK_EXTERNAL_MODULE__4518__,__WEBPACK_EXTERNAL_MODULE__1645__,__WEBPACK_EXTERNAL_MODULE__6321__,__WEBPACK_EXTERNAL_MODULE__9669__)=>(()=>{var __webpack_modules__={124:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(7891)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7891:(e,t,n)=>{e.exports=function(e){function t(e){let n,o,i,a=null;function s(...e){if(!s.enabled)return;const r=s,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];n=i.call(r,t),e.splice(a,1),a--}return n})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e,t){let n=0,r=0,o=-1,i=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||"*"===t[r]))"*"===t[r]?(o=r,i=n,r++):(n++,r++);else{if(-1===o)return!1;r=o+1,i++,n=i}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(o(e,n))return!1;for(const n of t.names)if(o(e,n))return!0;return!1},t.humanize=n(7250),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},3680:(e,t,n)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=n(124):e.exports=n(5038)},5038:(e,t,n)=>{const r=n(2018),o=n(9023);t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(o.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:o}=this;if(o){const t=this.color,o="[3"+(t<8?t:"8;5;"+t),i=` ${o};1m${r} [0m`;n[0]=i+n[0].split("\n").join("\n"+i),n.push(o+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)},t.destroy=o.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(5600);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=n(7891)(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}},9836:(e,t,n)=>{var r;e.exports=function(){if(!r){try{r=n(3680)("follow-redirects")}catch(e){}"function"!=typeof r&&(r=function(){})}r.apply(null,arguments)}},1251:(e,t,n)=>{var r,o,i,a=n(7016),s=a.URL,u=n(8611),c=n(5692),l=n(2203).Writable,p=n(2613),d=n(9836);r="undefined"!=typeof process,o="undefined"!=typeof window&&"undefined"!=typeof document,i=N(Error.captureStackTrace),r||!o&&i||console.warn("The follow-redirects package should be excluded from browser builds.");var f=!1;try{p(new s(""))}catch(e){f="ERR_INVALID_URL"===e.code}var h=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],_=["abort","aborted","connect","error","socket","timeout"],v=Object.create(null);_.forEach((function(e){v[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var m=L("ERR_INVALID_URL","Invalid URL",TypeError),E=L("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),g=L("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",E),y=L("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),b=L("ERR_STREAM_WRITE_AFTER_END","write after end"),A=l.prototype.destroy||w;function O(e,t){l.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof E?e:new E({cause:e}))}},this._performRequest()}function C(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var o=r+":",i=n[o]=e[r],a=t[r]=Object.create(i);Object.defineProperties(a,{request:{value:function(e,r,i){return s&&e instanceof s?e=P(e):D(e)?e=P(I(e)):(i=r,r=S(e),e={protocol:o}),N(r)&&(i=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,D(r.host)||D(r.hostname)||(r.hostname="::1"),p.equal(r.protocol,o,"protocol mismatch"),d("options",r),new O(r,i)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=a.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function w(){}function I(e){var t;if(f)t=new s(e);else if(!D((t=S(a.parse(e))).protocol))throw new m({input:e});return t}function S(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new m({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new m({input:e.href||e});return e}function P(e,t){var n=t||{};for(var r of h)n[r]=e[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function R(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function L(e,t,n){function r(n){N(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function T(e,t){for(var n of _)e.removeListener(n,v[n]);e.on("error",w),e.destroy(t)}function D(e){return"string"==typeof e||e instanceof String}function N(e){return"function"==typeof e}O.prototype=Object.create(l.prototype),O.prototype.abort=function(){T(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},O.prototype.destroy=function(e){return T(this._currentRequest,e),A.call(this,e),this},O.prototype.write=function(e,t,n){if(this._ending)throw new b;if(!(D(e)||"object"==typeof(r=e)&&"length"in r))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;N(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new y),this.abort()):n&&n()},O.prototype.end=function(e,t,n){if(N(e)?(n=e,e=t=null):N(t)&&(n=t,t=null),e){var r=this,o=this._currentRequest;this.write(e,t,(function(){r._ended=!0,o.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},O.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},O.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},O.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),i()}),e),r(t)}function i(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",i),n.removeListener("error",i),n.removeListener("response",i),n.removeListener("close",i),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",r),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){O.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(O.prototype,e,{get:function(){return this._currentRequest[e]}})})),O.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},O.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var o of(r._redirectable=this,_))r.on(o,v[o]);if(this._currentUrl=/^\//.test(this._options.path)?a.format(this._options):this._options.path,this._isRedirect){var i=0,s=this,u=this._requestBodyBuffers;!function e(t){if(r===s._currentRequest)if(t)s.emit("error",t);else if(i<u.length){var n=u[i++];r.finished||r.write(n.data,n.encoding,e)}else s._ended&&r.end()}()}},O.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,r=e.headers.location;if(!r||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(T(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new g;var o=this._options.beforeRedirect;o&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var i=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],R(/^content-/i,this._options.headers));var u,c,l=R(/^host$/i,this._options.headers),h=I(this._currentUrl),_=l||h.host,v=/^\w+:/.test(r)?this._currentUrl:a.format(Object.assign(h,{host:_})),m=(u=r,c=v,f?new s(u,c):I(a.resolve(c,u)));if(d("redirecting to",m.href),this._isRedirect=!0,P(m,this._options),(m.protocol!==h.protocol&&"https:"!==m.protocol||m.host!==_&&!function(e,t){p(D(e)&&D(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(m.host,_))&&R(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),N(o)){var E={headers:e.headers,statusCode:t},y={url:v,method:i,headers:n};o(this._options,E,y),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=C({http:u,https:c}),e.exports.wrap=C},6071:e=>{"use strict";e.exports=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return-1!==r&&(-1===o||r<o)}},7250:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function a(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,s){s=s||{};var u,c,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===l&&isFinite(e))return s.long?(u=e,(c=Math.abs(u))>=o?a(u,c,o,"day"):c>=r?a(u,c,r,"hour"):c>=n?a(u,c,n,"minute"):c>=t?a(u,c,t,"second"):u+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7549:function(e,t,n){e.exports=(n(5317),n(6982),function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(34)},function(e,t,n){var r=n(29)("wks"),o=n(33),i=n(2).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(9);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(24)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(12),o=n(17);e.exports=n(4)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(14);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports={}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(3),o=n(26),i=n(32),a=Object.defineProperty;t.f=n(4)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(42),o=n(15);e.exports=function(e){return r(o(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(9),o=n(2).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(12).f,o=n(8),i=n(1)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(29)("keys"),o=n(33);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(11),o=n(1)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(2),o=n(6),i=n(7),a=n(5),s="prototype",u=function(e,t,n){var c,l,p,d=e&u.F,f=e&u.G,h=e&u.S,_=e&u.P,v=e&u.B,m=e&u.W,E=f?o:o[t]||(o[t]={}),g=E[s],y=f?r:h?r[t]:(r[t]||{})[s];for(c in f&&(n=t),n)(l=!d&&y&&void 0!==y[c])&&c in E||(p=l?y[c]:n[c],E[c]=f&&"function"!=typeof y[c]?n[c]:v&&l?i(p,r):m&&y[c]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[s]=e[s],t}(p):_&&"function"==typeof p?i(Function.call,p):p,_&&((E.virtual||(E.virtual={}))[c]=p,e&u.R&&g&&!g[c]&&a(g,c,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){e.exports=n(2).document&&document.documentElement},function(e,t,n){e.exports=!n(4)&&!n(24)((function(){return 7!=Object.defineProperty(n(16)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var r=n(28),o=n(23),i=n(57),a=n(5),s=n(8),u=n(10),c=n(45),l=n(18),p=n(52),d=n(1)("iterator"),f=!([].keys&&"next"in[].keys()),h="keys",_="values",v=function(){return this};e.exports=function(e,t,n,m,E,g,y){c(n,t,m);var b,A,O,C=function(e){if(!f&&e in P)return P[e];switch(e){case h:case _:return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",I=E==_,S=!1,P=e.prototype,R=P[d]||P["@@iterator"]||E&&P[E],L=R||C(E),T=E?I?C("entries"):L:void 0,D="Array"==t&&P.entries||R;if(D&&(O=p(D.call(new e)))!==Object.prototype&&(l(O,w,!0),r||s(O,d)||a(O,d,v)),I&&R&&R.name!==_&&(S=!0,L=function(){return R.call(this)}),r&&!y||!f&&!S&&P[d]||a(P,d,L),u[t]=L,u[w]=v,E)if(b={values:I?L:C(_),keys:g?L:C(h),entries:T},y)for(A in b)A in P||i(P,A,b[A]);else o(o.P+o.F*(f||S),t,b);return b}},function(e,t){e.exports=!0},function(e,t,n){var r=n(2),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,n){var r,o,i,a=n(7),s=n(41),u=n(25),c=n(16),l=n(2),p=l.process,d=l.setImmediate,f=l.clearImmediate,h=l.MessageChannel,_=0,v={},m="onreadystatechange",E=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},g=function(e){E.call(e.data)};d&&f||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++_]=function(){s("function"==typeof e?e:Function(e),t)},r(_),_},f=function(e){delete v[e]},"process"==n(11)(p)?r=function(e){p.nextTick(a(E,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=g,r=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",g,!1)):r=m in c("script")?function(e){u.appendChild(c("script"))[m]=function(){u.removeChild(this),E.call(e)}}:function(e){setTimeout(a(E,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,n){var r=n(20),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(9);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){"use strict";function r(e){return(0,s.createHash)("sha256").update(e).digest("hex")}function o(e){switch(u){case"darwin":return e.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error("Unsupported platform: "+process.platform)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(n(35));t.machineIdSync=function(e){var t=o((0,a.execSync)(c[u]).toString());return e?t:r(t)},t.machineId=function(e){return new i.default((function(t,n){return(0,a.exec)(c[u],{},(function(i,a,s){if(i)return n(new Error("Error while obtaining machine id: "+i.stack));var u=o(a.toString());return t(e?u:r(u))}))}))};var a=n(70),s=n(71),u=process.platform,c={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(e,t,n){e.exports={default:n(36),__esModule:!0}},function(e,t,n){n(66),n(68),n(69),n(67),e.exports=n(6).Promise},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(13),o=n(31),i=n(62);e.exports=function(e){return function(t,n,a){var s,u=r(t),c=o(u.length),l=i(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){var r=n(7),o=n(44),i=n(43),a=n(3),s=n(31),u=n(64),c={},l={};t=e.exports=function(e,t,n,p,d){var f,h,_,v,m=d?function(){return e}:u(e),E=r(n,p,t?2:1),g=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(i(m)){for(f=s(e.length);f>g;g++)if((v=t?E(a(h=e[g])[0],h[1]):E(e[g]))===c||v===l)return v}else for(_=m.call(e);!(h=_.next()).done;)if((v=o(_,E,h.value,t))===c||v===l)return v},t.BREAK=c,t.RETURN=l},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(11);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(10),o=n(1)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(3);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){"use strict";var r=n(49),o=n(17),i=n(18),a={};n(5)(a,n(1)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(1)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(2),o=n(30).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(11)(a);e.exports=function(){var e,t,n,c=function(){var r,o;for(u&&(r=a.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(i){var l=!0,p=document.createTextNode("");new i(c).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}else if(s&&s.resolve){var d=s.resolve();n=function(){d.then(c)}}else n=function(){o.call(r,c)};return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){var r=n(3),o=n(50),i=n(22),a=n(19)("IE_PROTO"),s=function(){},u="prototype",c=function(){var e,t=n(16)("iframe"),r=i.length;for(t.style.display="none",n(25).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c[u][i[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[u]=r(e),n=new s,s[u]=null,n[a]=e):n=c(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(12),o=n(3),i=n(54);e.exports=n(4)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(55),o=n(17),i=n(13),a=n(32),s=n(8),u=n(26),c=Object.getOwnPropertyDescriptor;t.f=n(4)?c:function(e,t){if(e=i(e),t=a(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(8),o=n(63),i=n(19)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(8),o=n(13),i=n(39)(!1),a=n(19)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var r=n(53),o=n(22);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(5);e.exports=function(e,t,n){for(var o in t)n&&e[o]?e[o]=t[o]:r(e,o,t[o]);return e}},function(e,t,n){e.exports=n(5)},function(e,t,n){var r=n(9),o=n(3),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(7)(Function.call,n(51).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(12),a=n(4),s=n(1)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:r[e];a&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(3),o=n(14),i=n(1)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r=n(20),o=n(15);e.exports=function(e){return function(t,n){var i,a,s=String(o(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):i:e?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){var r=n(20),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(15);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(21),o=n(1)("iterator"),i=n(10);e.exports=n(6).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){"use strict";var r=n(37),o=n(47),i=n(10),a=n(13);e.exports=n(27)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){},function(e,t,n){"use strict";var r,o,i,a=n(28),s=n(2),u=n(7),c=n(21),l=n(23),p=n(9),d=(n(3),n(14)),f=n(38),h=n(40),_=(n(58).set,n(60)),v=n(30).set,m=n(48)(),E="Promise",g=s.TypeError,y=s.process,b=s[E],A="process"==c(y=s.process),O=function(){},C=!!function(){try{var e=b.resolve(1),t=(e.constructor={})[n(1)("species")]=function(e){e(O,O)};return(A||"function"==typeof PromiseRejectionEvent)&&e.then(O)instanceof t}catch(e){}}(),w=function(e,t){return e===t||e===b&&t===i},I=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},S=function(e){return w(b,e)?new P(e):new o(e)},P=o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw g("Bad Promise constructor");t=e,n=r})),this.resolve=d(t),this.reject=d(n)},R=function(e){try{e()}catch(e){return{error:e}}},L=function(e,t){if(!e._n){e._n=!0;var n=e._c;m((function(){for(var r=e._v,o=1==e._s,i=0,a=function(t){var n,i,a=o?t.ok:t.fail,s=t.resolve,u=t.reject,c=t.domain;try{a?(o||(2==e._h&&N(e),e._h=1),!0===a?n=r:(c&&c.enter(),n=a(r),c&&c.exit()),n===t.promise?u(g("Promise-chain cycle")):(i=I(n))?i.call(n,s,u):s(n)):u(r)}catch(e){u(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&T(e)}))}},T=function(e){v.call(s,(function(){var t,n,r,o=e._v;if(D(e)&&(t=R((function(){A?y.emit("unhandledRejection",o,e):(n=s.onunhandledrejection)?n({promise:e,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)})),e._h=A||D(e)?2:1),e._a=void 0,t)throw t.error}))},D=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if((t=n[r++]).fail||!D(t.promise))return!1;return!0},N=function(e){v.call(s,(function(){var t;A?y.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})}))},x=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),L(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw g("Promise can't be resolved itself");(t=I(e))?m((function(){var r={_w:n,_d:!1};try{t.call(e,u(j,r,1),u(x,r,1))}catch(e){x.call(r,e)}})):(n._v=e,n._s=1,L(n,!1))}catch(e){x.call({_w:n,_d:!1},e)}}};C||(b=function(e){f(this,b,E,"_h"),d(e),r.call(this);try{e(u(j,this,1),u(x,this,1))}catch(e){x.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(56)(b.prototype,{then:function(e,t){var n=S(_(this,b));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=A?y.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),P=function(){var e=new r;this.promise=e,this.resolve=u(j,e,1),this.reject=u(x,e,1)}),l(l.G+l.W+l.F*!C,{Promise:b}),n(18)(b,E),n(59)(E),i=n(6)[E],l(l.S+l.F*!C,E,{reject:function(e){var t=S(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(a||!C),E,{resolve:function(e){if(e instanceof b&&w(e.constructor,this))return e;var t=S(this);return(0,t.resolve)(e),t.promise}}),l(l.S+l.F*!(C&&n(46)((function(e){b.all(e).catch(O)}))),E,{all:function(e){var t=this,n=S(t),r=n.resolve,o=n.reject,i=R((function(){var n=[],i=0,a=1;h(e,!1,(function(e){var s=i++,u=!1;n.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,n[s]=e,--a||r(n))}),o)})),--a||r(n)}));return i&&o(i.error),n.promise},race:function(e){var t=this,n=S(t),r=n.reject,o=R((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return o&&r(o.error),n.promise}})},function(e,t,n){"use strict";var r=n(61)(!0);n(27)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){n(65);for(var r=n(2),o=n(5),i=n(10),a=n(1)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=s[u],l=r[c],p=l&&l.prototype;p&&!p[a]&&o(p,a,c),i[c]=i.Array}},function(e,t){e.exports=n(5317)},function(e,t){e.exports=n(6982)}]))},76:(e,t,n)=>{"use strict";e.exports=n(870)},557:(e,t,n)=>{"use strict";const r=n(6928),o="\\\\/",i=`[^${o}]`,a="\\.",s="\\/",u="[^/]",c=`(?:${s}|$)`,l=`(?:^|${s})`,p=`${a}{1,2}${c}`,d={DOT_LITERAL:a,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:u,END_ANCHOR:c,DOTS_SLASH:p,NO_DOT:`(?!${a})`,NO_DOTS:`(?!${l}${p})`,NO_DOT_SLASH:`(?!${a}{0,1}${c})`,NO_DOTS_SLASH:`(?!${p})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${u}*?`,START_ANCHOR:l},f={...d,SLASH_LITERAL:`[${o}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${a}{1,2}(?:[${o}]|$)`,NO_DOT:`(?!${a})`,NO_DOTS:`(?!(?:^|[${o}])${a}{1,2}(?:[${o}]|$))`,NO_DOT_SLASH:`(?!${a}{0,1}(?:[${o}]|$))`,NO_DOTS_SLASH:`(?!${a}{1,2}(?:[${o}]|$))`,QMARK_NO_DOT:`[^.${o}]`,START_ANCHOR:`(?:^|[${o}])`,END_ANCHOR:`(?:[${o}]|$)`};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:r.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?f:d}},3579:(e,t,n)=>{"use strict";const r=n(557),o=n(8977),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:u,REPLACEMENTS:c}=r,l=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const n=`[${e.join("-")}]`;try{new RegExp(n)}catch(t){return e.map((e=>o.escapeRegex(e))).join("..")}return n},p=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=c[e]||e;const n={...t},f="number"==typeof n.maxLength?Math.min(i,n.maxLength):i;let h=e.length;if(h>f)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${f}`);const _={type:"bos",value:"",output:n.prepend||""},v=[_],m=n.capture?"":"?:",E=o.isWindows(t),g=r.globChars(E),y=r.extglobChars(g),{DOT_LITERAL:b,PLUS_LITERAL:A,SLASH_LITERAL:O,ONE_CHAR:C,DOTS_SLASH:w,NO_DOT:I,NO_DOT_SLASH:S,NO_DOTS_SLASH:P,QMARK:R,QMARK_NO_DOT:L,STAR:T,START_ANCHOR:D}=g,N=e=>`(${m}(?:(?!${D}${e.dot?w:b}).)*?)`,x=n.dot?"":I,j=n.dot?R:L;let M=!0===n.bash?N(n):T;n.capture&&(M=`(${M})`),"boolean"==typeof n.noext&&(n.noextglob=n.noext);const k={input:e,index:-1,start:0,dot:!0===n.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:v};e=o.removePrefix(e,k),h=e.length;const U=[],F=[],G=[];let B,H=_;const V=()=>k.index===h-1,W=k.peek=(t=1)=>e[k.index+t],q=k.advance=()=>e[++k.index]||"",J=()=>e.slice(k.index+1),z=(e="",t=0)=>{k.consumed+=e,k.index+=t},$=e=>{k.output+=null!=e.output?e.output:e.value,z(e.value)},K=()=>{let e=1;for(;"!"===W()&&("("!==W(2)||"?"===W(3));)q(),k.start++,e++;return e%2!=0&&(k.negated=!0,k.start++,!0)},Q=e=>{k[e]++,G.push(e)},Y=e=>{k[e]--,G.pop()},X=e=>{if("globstar"===H.type){const t=k.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||U.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(k.output=k.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=M,k.output+=H.output)}if(U.length&&"paren"!==e.type&&(U[U.length-1].inner+=e.value),(e.value||e.output)&&$(e),H&&"text"===H.type&&"text"===e.type)return H.value+=e.value,void(H.output=(H.output||"")+e.value);e.prev=H,v.push(e),H=e},Z=(e,t)=>{const r={...y[t],conditions:1,inner:""};r.prev=H,r.parens=k.parens,r.output=k.output;const o=(n.capture?"(":"")+r.open;Q("parens"),X({type:e,value:t,output:k.output?"":C}),X({type:"paren",extglob:!0,value:q(),output:o}),U.push(r)},ee=e=>{let r,o=e.close+(n.capture?")":"");if("negate"===e.type){let i=M;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(i=N(n)),(i!==M||V()||/^\)+$/.test(J()))&&(o=e.close=`)$))${i}`),e.inner.includes("*")&&(r=J())&&/^\.[^\\/.]+$/.test(r)){const n=d(r,{...t,fastpaths:!1}).output;o=e.close=`)${n})${i})`}"bos"===e.prev.type&&(k.negatedExtglob=!0)}X({type:"paren",extglob:!0,value:B,output:o}),Y("parens")};if(!1!==n.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let r=!1,i=e.replace(u,((e,t,n,o,i,a)=>"\\"===o?(r=!0,e):"?"===o?t?t+o+(i?R.repeat(i.length):""):0===a?j+(i?R.repeat(i.length):""):R.repeat(n.length):"."===o?b.repeat(n.length):"*"===o?t?t+o+(i?M:""):M:t?e:`\\${e}`));return!0===r&&(i=!0===n.unescape?i.replace(/\\/g,""):i.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),i===e&&!0===n.contains?(k.output=e,k):(k.output=o.wrapOutput(i,k,t),k)}for(;!V();){if(B=q(),"\0"===B)continue;if("\\"===B){const e=W();if("/"===e&&!0!==n.bash)continue;if("."===e||";"===e)continue;if(!e){B+="\\",X({type:"text",value:B});continue}const t=/^\\+/.exec(J());let r=0;if(t&&t[0].length>2&&(r=t[0].length,k.index+=r,r%2!=0&&(B+="\\")),!0===n.unescape?B=q():B+=q(),0===k.brackets){X({type:"text",value:B});continue}}if(k.brackets>0&&("]"!==B||"["===H.value||"[^"===H.value)){if(!1!==n.posix&&":"===B){const e=H.value.slice(1);if(e.includes("[")&&(H.posix=!0,e.includes(":"))){const e=H.value.lastIndexOf("["),t=H.value.slice(0,e),n=H.value.slice(e+2),r=a[n];if(r){H.value=t+r,k.backtrack=!0,q(),_.output||1!==v.indexOf(H)||(_.output=C);continue}}}("["===B&&":"!==W()||"-"===B&&"]"===W())&&(B=`\\${B}`),"]"!==B||"["!==H.value&&"[^"!==H.value||(B=`\\${B}`),!0===n.posix&&"!"===B&&"["===H.value&&(B="^"),H.value+=B,$({value:B});continue}if(1===k.quotes&&'"'!==B){B=o.escapeRegex(B),H.value+=B,$({value:B});continue}if('"'===B){k.quotes=1===k.quotes?0:1,!0===n.keepQuotes&&X({type:"text",value:B});continue}if("("===B){Q("parens"),X({type:"paren",value:B});continue}if(")"===B){if(0===k.parens&&!0===n.strictBrackets)throw new SyntaxError(p("opening","("));const e=U[U.length-1];if(e&&k.parens===e.parens+1){ee(U.pop());continue}X({type:"paren",value:B,output:k.parens?")":"\\)"}),Y("parens");continue}if("["===B){if(!0!==n.nobracket&&J().includes("]"))Q("brackets");else{if(!0!==n.nobracket&&!0===n.strictBrackets)throw new SyntaxError(p("closing","]"));B=`\\${B}`}X({type:"bracket",value:B});continue}if("]"===B){if(!0===n.nobracket||H&&"bracket"===H.type&&1===H.value.length){X({type:"text",value:B,output:`\\${B}`});continue}if(0===k.brackets){if(!0===n.strictBrackets)throw new SyntaxError(p("opening","["));X({type:"text",value:B,output:`\\${B}`});continue}Y("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(B=`/${B}`),H.value+=B,$({value:B}),!1===n.literalBrackets||o.hasRegexChars(e))continue;const t=o.escapeRegex(H.value);if(k.output=k.output.slice(0,-H.value.length),!0===n.literalBrackets){k.output+=t,H.value=t;continue}H.value=`(${m}${t}|${H.value})`,k.output+=H.value;continue}if("{"===B&&!0!==n.nobrace){Q("braces");const e={type:"brace",value:B,output:"(",outputIndex:k.output.length,tokensIndex:k.tokens.length};F.push(e),X(e);continue}if("}"===B){const e=F[F.length-1];if(!0===n.nobrace||!e){X({type:"text",value:B,output:B});continue}let t=")";if(!0===e.dots){const e=v.slice(),r=[];for(let t=e.length-1;t>=0&&(v.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=l(r,n),k.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=k.output.slice(0,e.outputIndex),r=k.tokens.slice(e.tokensIndex);e.value=e.output="\\{",B=t="\\}",k.output=n;for(const e of r)k.output+=e.output||e.value}X({type:"brace",value:B,output:t}),Y("braces"),F.pop();continue}if("|"===B){U.length>0&&U[U.length-1].conditions++,X({type:"text",value:B});continue}if(","===B){let e=B;const t=F[F.length-1];t&&"braces"===G[G.length-1]&&(t.comma=!0,e="|"),X({type:"comma",value:B,output:e});continue}if("/"===B){if("dot"===H.type&&k.index===k.start+1){k.start=k.index+1,k.consumed="",k.output="",v.pop(),H=_;continue}X({type:"slash",value:B,output:O});continue}if("."===B){if(k.braces>0&&"dot"===H.type){"."===H.value&&(H.output=b);const e=F[F.length-1];H.type="dots",H.output+=B,H.value+=B,e.dots=!0;continue}if(k.braces+k.parens===0&&"bos"!==H.type&&"slash"!==H.type){X({type:"text",value:B,output:b});continue}X({type:"dot",value:B,output:b});continue}if("?"===B){if((!H||"("!==H.value)&&!0!==n.noextglob&&"("===W()&&"?"!==W(2)){Z("qmark",B);continue}if(H&&"paren"===H.type){const e=W();let t=B;if("<"===e&&!o.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(J()))&&(t=`\\${B}`),X({type:"text",value:B,output:t});continue}if(!0!==n.dot&&("slash"===H.type||"bos"===H.type)){X({type:"qmark",value:B,output:L});continue}X({type:"qmark",value:B,output:R});continue}if("!"===B){if(!0!==n.noextglob&&"("===W()&&("?"!==W(2)||!/[!=<:]/.test(W(3)))){Z("negate",B);continue}if(!0!==n.nonegate&&0===k.index){K();continue}}if("+"===B){if(!0!==n.noextglob&&"("===W()&&"?"!==W(2)){Z("plus",B);continue}if(H&&"("===H.value||!1===n.regex){X({type:"plus",value:B,output:A});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||k.parens>0){X({type:"plus",value:B});continue}X({type:"plus",value:A});continue}if("@"===B){if(!0!==n.noextglob&&"("===W()&&"?"!==W(2)){X({type:"at",extglob:!0,value:B,output:""});continue}X({type:"text",value:B});continue}if("*"!==B){"$"!==B&&"^"!==B||(B=`\\${B}`);const e=s.exec(J());e&&(B+=e[0],k.index+=e[0].length),X({type:"text",value:B});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=B,H.output=M,k.backtrack=!0,k.globstar=!0,z(B);continue}let t=J();if(!0!==n.noextglob&&/^\([^?]/.test(t)){Z("star",B);continue}if("star"===H.type){if(!0===n.noglobstar){z(B);continue}const r=H.prev,o=r.prev,i="slash"===r.type||"bos"===r.type,a=o&&("star"===o.type||"globstar"===o.type);if(!0===n.bash&&(!i||t[0]&&"/"!==t[0])){X({type:"star",value:B,output:""});continue}const s=k.braces>0&&("comma"===r.type||"brace"===r.type),u=U.length&&("pipe"===r.type||"paren"===r.type);if(!i&&"paren"!==r.type&&!s&&!u){X({type:"star",value:B,output:""});continue}for(;"/**"===t.slice(0,3);){const n=e[k.index+4];if(n&&"/"!==n)break;t=t.slice(3),z("/**",3)}if("bos"===r.type&&V()){H.type="globstar",H.value+=B,H.output=N(n),k.output=H.output,k.globstar=!0,z(B);continue}if("slash"===r.type&&"bos"!==r.prev.type&&!a&&V()){k.output=k.output.slice(0,-(r.output+H.output).length),r.output=`(?:${r.output}`,H.type="globstar",H.output=N(n)+(n.strictSlashes?")":"|$)"),H.value+=B,k.globstar=!0,k.output+=r.output+H.output,z(B);continue}if("slash"===r.type&&"bos"!==r.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";k.output=k.output.slice(0,-(r.output+H.output).length),r.output=`(?:${r.output}`,H.type="globstar",H.output=`${N(n)}${O}|${O}${e})`,H.value+=B,k.output+=r.output+H.output,k.globstar=!0,z(B+q()),X({type:"slash",value:"/",output:""});continue}if("bos"===r.type&&"/"===t[0]){H.type="globstar",H.value+=B,H.output=`(?:^|${O}|${N(n)}${O})`,k.output=H.output,k.globstar=!0,z(B+q()),X({type:"slash",value:"/",output:""});continue}k.output=k.output.slice(0,-H.output.length),H.type="globstar",H.output=N(n),H.value+=B,k.output+=H.output,k.globstar=!0,z(B);continue}const r={type:"star",value:B,output:M};!0!==n.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==n.regex?(k.index!==k.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(k.output+=S,H.output+=S):!0===n.dot?(k.output+=P,H.output+=P):(k.output+=x,H.output+=x),"*"!==W()&&(k.output+=C,H.output+=C)),X(r)):(r.output=B,X(r)):(r.output=".*?","bos"!==H.type&&"slash"!==H.type||(r.output=x+r.output),X(r))}for(;k.brackets>0;){if(!0===n.strictBrackets)throw new SyntaxError(p("closing","]"));k.output=o.escapeLast(k.output,"["),Y("brackets")}for(;k.parens>0;){if(!0===n.strictBrackets)throw new SyntaxError(p("closing",")"));k.output=o.escapeLast(k.output,"("),Y("parens")}for(;k.braces>0;){if(!0===n.strictBrackets)throw new SyntaxError(p("closing","}"));k.output=o.escapeLast(k.output,"{"),Y("braces")}if(!0===n.strictSlashes||"star"!==H.type&&"bracket"!==H.type||X({type:"maybe_slash",value:"",output:`${O}?`}),!0===k.backtrack){k.output="";for(const e of k.tokens)k.output+=null!=e.output?e.output:e.value,e.suffix&&(k.output+=e.suffix)}return k};d.fastpaths=(e,t)=>{const n={...t},a="number"==typeof n.maxLength?Math.min(i,n.maxLength):i,s=e.length;if(s>a)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${a}`);e=c[e]||e;const u=o.isWindows(t),{DOT_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:h,NO_DOTS:_,NO_DOTS_SLASH:v,STAR:m,START_ANCHOR:E}=r.globChars(u),g=n.dot?_:h,y=n.dot?v:h,b=n.capture?"":"?:";let A=!0===n.bash?".*?":m;n.capture&&(A=`(${A})`);const O=e=>!0===e.noglobstar?A:`(${b}(?:(?!${E}${e.dot?f:l}).)*?)`,C=e=>{switch(e){case"*":return`${g}${d}${A}`;case".*":return`${l}${d}${A}`;case"*.*":return`${g}${A}${l}${d}${A}`;case"*/*":return`${g}${A}${p}${d}${y}${A}`;case"**":return g+O(n);case"**/*":return`(?:${g}${O(n)}${p})?${y}${d}${A}`;case"**/*.*":return`(?:${g}${O(n)}${p})?${y}${A}${l}${d}${A}`;case"**/.*":return`(?:${g}${O(n)}${p})?${l}${d}${A}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=C(t[1]);if(!n)return;return n+l+t[2]}}},w=o.removePrefix(e,{negated:!1,prefix:""});let I=C(w);return I&&!0!==n.strictSlashes&&(I+=`${p}?`),I},e.exports=d},870:(e,t,n)=>{"use strict";const r=n(6928),o=n(519),i=n(3579),a=n(8977),s=n(557),u=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map((e=>u(e,t,n))),o=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return o}const r=(o=e)&&"object"==typeof o&&!Array.isArray(o)&&e.tokens&&e.input;var o;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},s=a.isWindows(t),c=r?u.compileRe(e,t):u.makeRe(e,t,!1,!0),l=c.state;delete c.state;let p=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};p=u(i.ignore,e,n)}const d=(n,r=!1)=>{const{isMatch:o,match:a,output:d}=u.test(n,c,t,{glob:e,posix:s}),f={glob:e,state:l,regex:c,posix:s,input:n,output:d,match:a,isMatch:o};return"function"==typeof i.onResult&&i.onResult(f),!1===o?(f.isMatch=!1,!!r&&f):p(n)?("function"==typeof i.onIgnore&&i.onIgnore(f),f.isMatch=!1,!!r&&f):("function"==typeof i.onMatch&&i.onMatch(f),!r||f)};return n&&(d.state=l),d};u.test=(e,t,n,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const i=n||{},s=i.format||(o?a.toPosixSlashes:null);let c=e===r,l=c&&s?s(e):e;return!1===c&&(l=s?s(e):e,c=l===r),!1!==c&&!0!==i.capture||(c=!0===i.matchBase||!0===i.basename?u.matchBase(e,t,n,o):t.exec(l)),{isMatch:Boolean(c),match:c,output:l}},u.matchBase=(e,t,n,o=a.isWindows(n))=>(t instanceof RegExp?t:u.makeRe(t,n)).test(r.basename(e)),u.isMatch=(e,t,n)=>u(t,n)(e),u.parse=(e,t)=>Array.isArray(e)?e.map((e=>u.parse(e,t))):i(e,{...t,fastpaths:!1}),u.scan=(e,t)=>o(e,t),u.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const o=t||{},i=o.contains?"":"^",a=o.contains?"":"$";let s=`${i}(?:${e.output})${a}`;e&&!0===e.negated&&(s=`^(?!${s}).*$`);const c=u.toRegex(s,t);return!0===r&&(c.state=e),c},u.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=i.fastpaths(e,t)),o.output||(o=i(e,t)),u.compileRe(o,t,n,r)},u.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},u.constants=s,e.exports=u},519:(e,t,n)=>{"use strict";const r=n(8977),{CHAR_ASTERISK:o,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:s,CHAR_DOT:u,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:h,CHAR_QUESTION_MARK:_,CHAR_RIGHT_CURLY_BRACE:v,CHAR_RIGHT_PARENTHESES:m,CHAR_RIGHT_SQUARE_BRACKET:E}=n(557),g=e=>e===l||e===a,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const n=t||{},b=e.length-1,A=!0===n.parts||!0===n.scanToEnd,O=[],C=[],w=[];let I,S,P=e,R=-1,L=0,T=0,D=!1,N=!1,x=!1,j=!1,M=!1,k=!1,U=!1,F=!1,G=!1,B=!1,H=0,V={value:"",depth:0,isGlob:!1};const W=()=>R>=b,q=()=>(I=S,P.charCodeAt(++R));for(;R<b;){let e;if(S=q(),S!==a){if(!0===k||S===p){for(H++;!0!==W()&&(S=q());)if(S!==a)if(S!==p){if(!0!==k&&S===u&&(S=q())===u){if(D=V.isBrace=!0,x=V.isGlob=!0,B=!0,!0===A)continue;break}if(!0!==k&&S===s){if(D=V.isBrace=!0,x=V.isGlob=!0,B=!0,!0===A)continue;break}if(S===v&&(H--,0===H)){k=!1,D=V.isBrace=!0,B=!0;break}}else H++;else U=V.backslashes=!0,q();if(!0===A)continue;break}if(S!==l){if(!0!==n.noext&&!0==(S===h||S===i||S===o||S===_||S===c)&&P.charCodeAt(R+1)===d){if(x=V.isGlob=!0,j=V.isExtglob=!0,B=!0,S===c&&R===L&&(G=!0),!0===A){for(;!0!==W()&&(S=q());)if(S!==a){if(S===m){x=V.isGlob=!0,B=!0;break}}else U=V.backslashes=!0,S=q();continue}break}if(S===o){if(I===o&&(M=V.isGlobstar=!0),x=V.isGlob=!0,B=!0,!0===A)continue;break}if(S===_){if(x=V.isGlob=!0,B=!0,!0===A)continue;break}if(S===f){for(;!0!==W()&&(e=q());)if(e!==a){if(e===E){N=V.isBracket=!0,x=V.isGlob=!0,B=!0;break}}else U=V.backslashes=!0,q();if(!0===A)continue;break}if(!0===n.nonegate||S!==c||R!==L){if(!0!==n.noparen&&S===d){if(x=V.isGlob=!0,!0===A){for(;!0!==W()&&(S=q());)if(S!==d){if(S===m){B=!0;break}}else U=V.backslashes=!0,S=q();continue}break}if(!0===x){if(B=!0,!0===A)continue;break}}else F=V.negated=!0,L++}else{if(O.push(R),C.push(V),V={value:"",depth:0,isGlob:!1},!0===B)continue;if(I===u&&R===L+1){L+=2;continue}T=R+1}}else U=V.backslashes=!0,S=q(),S===p&&(k=!0)}!0===n.noext&&(j=!1,x=!1);let J=P,z="",$="";L>0&&(z=P.slice(0,L),P=P.slice(L),T-=L),J&&!0===x&&T>0?(J=P.slice(0,T),$=P.slice(T)):!0===x?(J="",$=P):J=P,J&&""!==J&&"/"!==J&&J!==P&&g(J.charCodeAt(J.length-1))&&(J=J.slice(0,-1)),!0===n.unescape&&($&&($=r.removeBackslashes($)),J&&!0===U&&(J=r.removeBackslashes(J)));const K={prefix:z,input:e,start:L,base:J,glob:$,isBrace:D,isBracket:N,isGlob:x,isExtglob:j,isGlobstar:M,negated:F,negatedExtglob:G};if(!0===n.tokens&&(K.maxDepth=0,g(S)||C.push(V),K.tokens=C),!0===n.parts||!0===n.tokens){let t;for(let r=0;r<O.length;r++){const o=t?t+1:L,i=O[r],a=e.slice(o,i);n.tokens&&(0===r&&0!==L?(C[r].isPrefix=!0,C[r].value=z):C[r].value=a,y(C[r]),K.maxDepth+=C[r].depth),0===r&&""===a||w.push(a),t=i}if(t&&t+1<e.length){const r=e.slice(t+1);w.push(r),n.tokens&&(C[C.length-1].value=r,y(C[C.length-1]),K.maxDepth+=C[C.length-1].depth)}K.slashes=O,K.parts=w}return K}},8977:(e,t,n)=>{"use strict";const r=n(6928),o="win32"===process.platform,{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:a,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:u}=n(557);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>s.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(u,"\\$1"),t.toPosixSlashes=e=>e.replace(i,"/"),t.removeBackslashes=e=>e.replace(a,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===o||"\\"===r.sep,t.escapeLast=(e,n,r)=>{const o=e.lastIndexOf(n,r);return-1===o?e:"\\"===e[o-1]?t.escapeLast(e,n,o-1):`${e.slice(0,o)}\\${e.slice(o)}`},t.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},t.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}},8059:(e,t,n)=>{"use strict";var r=n(7016).parse,o={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},i=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function a(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}t.getProxyForUrl=function(e){var t="string"==typeof e?r(e):e||{},n=t.protocol,s=t.host,u=t.port;if("string"!=typeof s||!s||"string"!=typeof n)return"";if(n=n.split(":",1)[0],!function(e,t){var n=(a("npm_config_no_proxy")||a("no_proxy")).toLowerCase();return!n||"*"!==n&&n.split(/[,\s]/).every((function(n){if(!n)return!0;var r=n.match(/^(.+):(\d+)$/),o=r?r[1]:n,a=r?parseInt(r[2]):0;return!(!a||a===t)||(/^[.*]/.test(o)?("*"===o.charAt(0)&&(o=o.slice(1)),!i.call(e,o)):e!==o)}))}(s=s.replace(/:\d*$/,""),u=parseInt(u)||o[n]||0))return"";var c=a("npm_config_"+n+"_proxy")||a(n+"_proxy")||a("npm_config_proxy")||a("all_proxy");return c&&-1===c.indexOf("://")&&(c=n+"://"+c),c}},5600:(e,t,n)=>{"use strict";const r=n(857),o=n(2018),i=n(6071),{env:a}=process;let s;function u(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e,t){if(0===s)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!t&&void 0===s)return 0;const n=s||0;if("dumb"===a.TERM)return n;if("win32"===process.platform){const e=r.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in a))||"codeship"===a.CI_NAME?1:n;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:n}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?s=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(s=1),"FORCE_COLOR"in a&&(s="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return u(c(e,e&&e.isTTY))},stdout:u(c(!0,o.isatty(1))),stderr:u(c(!0,o.isatty(2)))}},2856:(e,t,n)=>{e.exports=n(3528)},3528:(e,t,n)=>{"use strict";n(9278);var r,o=n(4756),i=n(8611),a=n(5692),s=n(4434),u=(n(2613),n(9023));function c(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||i.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,n,r,o){for(var i=p(n,r,o),a=0,s=t.requests.length;a<s;++a){var u=t.requests[a];if(u.host===i.host&&u.port===i.port)return t.requests.splice(a,1),void u.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function l(e,t){var n=this;c.prototype.createSocket.call(n,e,(function(r){var i=e.request.getHeader("host"),a=d({},n.options,{socket:r,servername:i?i.replace(/:.*$/,""):e.host}),s=o.connect(0,a);n.sockets[n.sockets.indexOf(r)]=s,t(s)}))}function p(e,t,n){return"string"==typeof e?{host:e,port:t,localAddress:n}:e}function d(e){for(var t=1,n=arguments.length;t<n;++t){var r=arguments[t];if("object"==typeof r)for(var o=Object.keys(r),i=0,a=o.length;i<a;++i){var s=o[i];void 0!==r[s]&&(e[s]=r[s])}}return e}t.httpOverHttp=function(e){var t=new c(e);return t.request=i.request,t},t.httpsOverHttp=function(e){var t=new c(e);return t.request=i.request,t.createSocket=l,t.defaultPort=443,t},t.httpOverHttps=function(e){var t=new c(e);return t.request=a.request,t},t.httpsOverHttps=function(e){var t=new c(e);return t.request=a.request,t.createSocket=l,t.defaultPort=443,t},u.inherits(c,s.EventEmitter),c.prototype.addRequest=function(e,t,n,r){var o=this,i=d({request:e},o.options,p(t,n,r));o.sockets.length>=this.maxSockets?o.requests.push(i):o.createSocket(i,(function(t){function n(){o.emit("free",t,i)}function r(e){o.removeSocket(t),t.removeListener("free",n),t.removeListener("close",r),t.removeListener("agentRemove",r)}t.on("free",n),t.on("close",r),t.on("agentRemove",r),e.onSocket(t)}))},c.prototype.createSocket=function(e,t){var n=this,o={};n.sockets.push(o);var i=d({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),r("making CONNECT request");var a=n.request(i);function s(i,s,u){var c;return a.removeAllListeners(),s.removeAllListeners(),200!==i.statusCode?(r("tunneling socket could not be established, statusCode=%d",i.statusCode),s.destroy(),(c=new Error("tunneling socket could not be established, statusCode="+i.statusCode)).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):u.length>0?(r("got illegal response body from proxy"),s.destroy(),(c=new Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):(r("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=s,t(s))}a.useChunkedEncodingByDefault=!1,a.once("response",(function(e){e.upgrade=!0})),a.once("upgrade",(function(e,t,n){process.nextTick((function(){s(e,t,n)}))})),a.once("connect",s),a.once("error",(function(t){a.removeAllListeners(),r("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, cause="+t.message);i.code="ECONNRESET",e.request.emit("error",i),n.removeSocket(o)})),a.end()},c.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var n=this.requests.shift();n&&this.createSocket(n,(function(e){n.request.onSocket(e)}))}},r=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},t.debug=r},197:(e,t,n)=>{const r=n(4434).EventEmitter,o=n(5317).spawn,i=n(6928),a=n(9896);class s{constructor(e,t){this.flags=e,this.required=e.indexOf("<")>=0,this.optional=e.indexOf("[")>=0,this.mandatory=!1,this.negate=-1!==e.indexOf("-no-");const n=e.split(/[ ,|]+/);n.length>1&&!/^[[<]/.test(n[1])&&(this.short=n.shift()),this.long=n.shift(),this.description=t||"",this.defaultValue=void 0}name(){return this.long.replace(/^--/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}is(e){return this.short===e||this.long===e}}class u extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}class c extends r{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=e||"",this._optionValues={},this._storeOptionsAsProperties=!0,this._passCommandToAction=!0,this._actionResults=[],this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._hidden=!1,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._hasImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command"}command(e,t,n){let r=t,o=n;"object"==typeof r&&null!==r&&(o=r,r=null),o=o||{};const i=e.split(/ +/),a=this.createCommand(i.shift());return r&&(a.description(r),a._executableHandler=!0),o.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!o.noHelp&&!o.hidden),a._helpFlags=this._helpFlags,a._helpDescription=this._helpDescription,a._helpShortFlag=this._helpShortFlag,a._helpLongFlag=this._helpLongFlag,a._helpCommandName=this._helpCommandName,a._helpCommandnameAndArgs=this._helpCommandnameAndArgs,a._helpCommandDescription=this._helpCommandDescription,a._exitCallback=this._exitCallback,a._storeOptionsAsProperties=this._storeOptionsAsProperties,a._passCommandToAction=this._passCommandToAction,a._executableFile=o.executableFile||null,this.commands.push(a),a._parseExpectedArgs(i),a.parent=this,r?this:a}createCommand(e){return new c(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");return function e(t){t.forEach((t=>{if(t._executableHandler&&!t._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${t.name()}`);e(t.commands)}))}(e.commands),(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){return!1===e?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,"string"==typeof e&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return void 0===this._hasImplicitHelpCommand&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(e){if(e.length)return e.forEach((e=>{const t={required:!1,name:"",variadic:!1};switch(e[0]){case"<":t.required=!0,t.name=e.slice(1,-1);break;case"[":t.name=e.slice(1,-1)}t.name.length>3&&"..."===t.name.slice(-3)&&(t.variadic=!0,t.name=t.name.slice(0,-3)),t.name&&this._args.push(t)})),this._args.forEach(((e,t)=>{if(e.variadic&&t<this._args.length-1)throw new Error(`only the last argument can be variadic '${e.name}'`)})),this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new u(e,t,n)),process.exit(e)}action(e){return this._actionHandler=t=>{const n=this._args.length,r=t.slice(0,n);this._passCommandToAction?r[n]=this:r[n]=this.opts(),t.length>n&&r.push(t.slice(n));const o=e.apply(this,r);let i=this;for(;i.parent;)i=i.parent;i._actionResults.push(o)},this}_optionEx(e,t,n,r,o){const i=new s(t,n),a=i.name(),u=i.attributeName();if(i.mandatory=!!e.mandatory,"function"!=typeof r)if(r instanceof RegExp){const e=r;r=(t,n)=>{const r=e.exec(t);return r?r[0]:n}}else o=r,r=null;if(i.negate||i.optional||i.required||"boolean"==typeof o){if(i.negate){const e=i.long.replace(/^--no-/,"--");o=!this._findOption(e)||this._getOptionValue(u)}void 0!==o&&(this._setOptionValue(u,o),i.defaultValue=o)}return this.options.push(i),this.on("option:"+a,(e=>{null!==e&&r&&(e=r(e,void 0===this._getOptionValue(u)?o:this._getOptionValue(u))),"boolean"==typeof this._getOptionValue(u)||void 0===this._getOptionValue(u)?null==e?this._setOptionValue(u,!i.negate&&(o||!0)):this._setOptionValue(u,e):null!==e&&this._setOptionValue(u,!i.negate&&e)})),this}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}allowUnknownOption(e){return this._allowUnknownOption=void 0===e||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsProperties=void 0===e||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=void 0===e||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");let n;switch(t=t||{},void 0===e&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&i.basename(this._scriptPath,i.extname(this._scriptPath)),this._parseCommand([],n),this}parseAsync(e,t){return this.parse(e,t),Promise.all(this._actionResults).then((()=>this))}_executeSubCommand(e,t){t=t.slice();let n=!1;const r=[".js",".ts",".mjs"];this._checkForMissingMandatoryOptions();const s=this._scriptPath;let c;try{const e=a.realpathSync(s);c=i.dirname(e)}catch(e){c="."}let l=i.basename(s,i.extname(s))+"-"+e._name;e._executableFile&&(l=e._executableFile);const p=i.join(c,l);let d;a.existsSync(p)?l=p:r.forEach((e=>{a.existsSync(`${p}${e}`)&&(l=`${p}${e}`)})),n=r.includes(i.extname(l)),"win32"!==process.platform?n?(t.unshift(l),t=_(process.execArgv).concat(t),d=o(process.argv[0],t,{stdio:"inherit"})):d=o(l,t,{stdio:"inherit"}):(t.unshift(l),t=_(process.execArgv).concat(t),d=o(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{process.on(e,(()=>{!1===d.killed&&null===d.exitCode&&d.kill(e)}))}));const f=this._exitCallback;f?d.on("close",(()=>{f(new u(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))})):d.on("close",process.exit.bind(process)),d.on("error",(t=>{if("ENOENT"===t.code){const t=`'${l}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(t)}if("EACCES"===t.code)throw new Error(`'${l}' not executable`);if(f){const e=new u(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,f(e)}else process.exit(1)})),this.runningCommand=d}_dispatchSubcommand(e,t,n){const r=this._findCommand(e);r||this._helpAndError(),r._executableHandler?this._executeSubCommand(r,t.concat(n)):r._parseCommand(t,n)}_parseCommand(e,t){const n=this.parseOptions(t);if(e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))this._dispatchSubcommand(e[0],e.slice(1),t);else if(this._lazyHasImplicitHelpCommand()&&e[0]===this._helpCommandName)1===e.length?this.help():this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)f(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this._helpAndError(),f(this,n.unknown),this._checkForMissingMandatoryOptions(),n.unknown.length>0&&this.unknownOption(n.unknown[0]),this._actionHandler){const n=this.args.slice();this._args.forEach(((e,t)=>{e.required&&null==n[t]?this.missingArgument(e.name):e.variadic&&(n[t]=n.splice(t))})),this._actionHandler(n),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(e){if(e)return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach((t=>{t.mandatory&&void 0===e._getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)}))}parseOptions(e){const t=[],n=[];let r=t;const o=e.slice();function i(e){return e.length>1&&"-"===e[0]}for(;o.length;){const e=o.shift();if("--"===e){r===n&&r.push(e),r.push(...o);break}if(i(e)){const t=this._findOption(e);if(t){if(t.required){const e=o.shift();void 0===e&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;o.length>0&&!i(o[0])&&(e=o.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),o.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("="),n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}e.length>1&&"-"===e[0]&&(r=n),r.push(e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let n=0;n<t;n++){const t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}missingArgument(e){const t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let n;n=t?`error: option '${e.flags}' argument missing, got '${t}'`:`error: option '${e.flags}' argument missing`,console.error(n),this._exit(1,"commander.optionMissingArgument",n)}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;console.error(t),this._exit(1,"commander.missingMandatoryOptionValue",t)}unknownOption(e){if(this._allowUnknownOption)return;const t=`error: unknown option '${e}'`;console.error(t),this._exit(1,"commander.unknownOption",t)}unknownCommand(){const e=[this.name()];for(let t=this.parent;t;t=t.parent)e.unshift(t.name());const t=e.join(" "),n=`error: unknown command '${this.args[0]}'. See '${t} ${this._helpLongFlag}'.`;console.error(n),this._exit(1,"commander.unknownCommand",n)}version(e,t,n){if(void 0===e)return this._version;this._version=e;const r=new s(t=t||"-V, --version",n=n||"output the version number");return this._versionOptionName=r.long.substr(2)||"version",this.options.push(r),this.on("option:"+this._versionOptionName,(()=>{process.stdout.write(e+"\n"),this._exit(0,"commander.version",e)})),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,this._argsDescription=t,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach((e=>this.alias(e))),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this._args.map((e=>h(e)));return"[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+e.join(" "):"")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}prepareCommands(){const e=this.commands.filter((e=>!e._hidden)).map((e=>{const t=e._args.map((e=>h(e))).join(" ");return[e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:""),e._description]}));return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce(((e,t)=>Math.max(e,t[0].length)),0)}largestOptionLength(){const e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce(((e,t)=>Math.max(e,t.flags.length)),0)}largestArgLength(){return this._args.reduce(((e,t)=>Math.max(e,t.name.length)),0)}padWidth(){let e=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e}optionHelp(){const e=this.padWidth(),t=(process.stdout.columns||80)-e-4;function n(n,r){return l(n,e)+" "+d(r,t,e+2)}const r=this.options.map((e=>{const t=e.description+(e.negate||void 0===e.defaultValue?"":" (default: "+JSON.stringify(e.defaultValue)+")");return n(e.flags,t)})),o=this._helpShortFlag&&!this._findOption(this._helpShortFlag),i=!this._findOption(this._helpLongFlag);if(o||i){let e=this._helpFlags;o?i||(e=this._helpShortFlag):e=this._helpLongFlag,r.push(n(e,this._helpDescription))}return r.join("\n")}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";const e=this.prepareCommands(),t=this.padWidth(),n=(process.stdout.columns||80)-t-4;return["Commands:",e.map((e=>{const r=e[1]?" "+e[1]:"";return(r?l(e[0],t):e[0])+d(r,n,t+2)})).join("\n").replace(/^/gm," "),""].join("\n")}helpInformation(){let e=[];if(this._description){e=[this._description,""];const t=this._argsDescription;if(t&&this._args.length){const n=this.padWidth(),r=(process.stdout.columns||80)-n-5;e.push("Arguments:"),e.push(""),this._args.forEach((o=>{e.push(" "+l(o.name,n)+" "+p(t[o.name],r,n+4))})),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let n="";for(let e=this.parent;e;e=e.parent)n=e.name()+" "+n;const r=["Usage: "+n+t+" "+this.usage(),""];let o=[];const i=this.commandHelp();i&&(o=[i]);const a=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return r.concat(e).concat(a).concat(o).join("\n")}outputHelp(e){e||(e=e=>e);const t=e(this.helpInformation());if("string"!=typeof t&&!Buffer.isBuffer(t))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(t),this.emit(this._helpLongFlag)}helpOption(e,t){this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;const n=this._helpFlags.split(/[ ,|]+/);return this._helpShortFlag=void 0,n.length>1&&(this._helpShortFlag=n.shift()),this._helpLongFlag=n.shift(),this}help(e){this.outputHelp(e),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}}function l(e,t){const n=Math.max(0,t-e.length);return e+Array(n+1).join(" ")}function p(e,t,n){const r=new RegExp(".{1,"+(t-1)+"}([\\s]|$)|[^\\s]+?([\\s]|$)","g");return(e.match(r)||[]).map(((e,t)=>("\n"===e.slice(-1)&&(e=e.slice(0,e.length-1)),(t>0&&n?Array(n+1).join(" "):"")+e.trimRight()))).join("\n")}function d(e,t,n){return e.match(/[\n]\s+/)||t<40?e:p(e,t,n)}function f(e,t){t.find((t=>t===e._helpLongFlag||t===e._helpShortFlag))&&(e.outputHelp(),e._exit(0,"commander.helpDisplayed","(outputHelp)"))}function h(e){const t=e.name+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"}function _(e){return e.map((e=>{let t=e;if(0===e.indexOf("--inspect")){let n,r,o="127.0.0.1",i="9229";null!==(r=e.match(/^(--inspect(-brk)?)$/))?n=r[1]:null!==(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(n=r[1],/^\d+$/.test(r[3])?i=r[3]:o=r[3]):null!==(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(n=r[1],o=r[3],i=r[4]),n&&"0"!==i&&(t=`${n}=${o}:${parseInt(i)+1}`)}return t}))}(t=e.exports=new c).program=t,t.Command=c,t.Option=s,t.CommanderError=u},3374:function(e,t){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QRCodeError=t.SchemaError=t.CompileError=t.UploadError=t.CompressError=t.PackageSizeError=t.ProjectError=t.HashError=t.MetaError=t.LoginError=t.IDE_ERROR_LEVEL=void 0,t.IDE_ERROR_LEVEL={p0:"p0",p1:"p1",p2:"p2",p3:"p3"};var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Login Error",t}return r(t,e),t}(Error);t.LoginError=o;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Meta Error",t}return r(t,e),t}(Error);t.MetaError=i;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Hash Error",t}return r(t,e),t}(Error);t.HashError=a;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Project Error",t}return r(t,e),t}(Error);t.ProjectError=s;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="PackageSize Error",t}return r(t,e),t}(Error);t.PackageSizeError=u;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Compress Error",t}return r(t,e),t}(Error);t.CompressError=c;var l=function(e){function t(t,n){void 0===n&&(n=-1);var r=e.call(this,t)||this;return r.name="Upload Error",r.code=n,r}return r(t,e),t}(Error);t.UploadError=l;var p=function(e){function t(t,n,r){void 0===n&&(n=""),void 0===r&&(r=0);var o=e.call(this,t)||this;return o.name="Compile Error",o.errLink=n,o.code=r,o}return r(t,e),t}(Error);t.CompileError=p;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Schema Error",t}return r(t,e),t}(Error);t.SchemaError=d;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="QRCode Error",t}return r(t,e),t}(Error);t.QRCodeError=f},2660:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FRONT_PAGE_EVENT=t.IDE_PERFORMANCE_EVENTS=t.IDE_TIMELINE_NAMES=t.IDE_MODULES=t.SLARDAR_EVENT=void 0;var o=n(5179);t.SLARDAR_EVENT=r(r(r({},o.UPDATE_SLARDAR_EVENTS),o.UPDATE_SLARDAR_EVENTS_TECH),{VELA_CLICK_PREVIEW:"VELA_CLICK_PREVIEW",VELA_PREVIEW_FAIL:"VELA_PREVIEW_FAIL",VELA_CLICK_UPLOAD:"VELA_CLICK_UPLOAD",UPLOAD_VERSION_FOCUS:"UPLOAD_VERSION_FOCUS",UPLOAD_VERSION_ERROR:"UPLOAD_VERSION_ERROR",VELA_UPLOAD_FAIL:"VELA_UPLOAD_FAIL",VELA_SHOW_INIT_VIEW_TIME:"VELA_SHOW_INIT_VIEW_TIME",VELA_PREVIEW_TIME:"VELA_PREVIEW_TIME",VELA_UPLOAD_TIME:"VELA_UPLOAD_TIME",VELA_COMPILE_FIRST_END:"VELA_COMPILE_FIRST_END",VELA_COMPILE_TIME:"VELA_COMPILE_TIME",IDE_COMPILE_PERFORMANCE:"IDE_COMPILE_PERFORMANCE",IDE_COMPILE_RESULT:"IDE_COMPILE_RESULT",VELA_SIMULATOR_RENDER_TIME:"VELA_SIMULATOR_RENDER_TIME",VELA_SIMULATOR_FIRST_RENDER_SUCCESS:"VELA_SIMULATOR_FIRST_RENDER_SUCCESS",VELA_AUDIT_SCORE:"VELA_AUDIT_SCORE",MENU_BAR_DEBUG_SETTING_SAVE:"MENU_BAR_DEBUG_SETTING_SAVE",MENU_BAR_DEBUG_SETTING_SAVE_FAIL:"MENU_BAR_DEBUG_SETTING_SAVE_FAIL",MENU_BAR_DEBUG_APPLY_TEST_TMA:"MENU_BAR_DEBUG_APPLY_TEST_TMA",MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL:"MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL",MENU_BAR_DEBUG_APPLY_BOE:"MENU_BAR_DEBUG_APPLY_BOE",MENU_BAR_DEBUG_APPLY_BOE_FAIL:"MENU_BAR_DEBUG_APPLY_BOE_FAIL",MENU_BAR_DEBUG_APPLY_PPE:"MENU_BAR_DEBUG_APPLY_PPE",MENU_BAR_DEBUG_APPLY_PPE_FAIL:"MENU_BAR_DEBUG_APPLY_PPE_FAIL",VELA_POST_MESSAGE_LIST:"VELA_POST_MESSAGE_LIST",VELA_POST_MESSAGE_LIST_FAIL:"VELA_POST_MESSAGE_LIST_FAIL",VELA_AVATAR_LOGOUT:"VELA_AVATAR_LOGOUT",VELA_AVATAR_LOGOUT_FAIL:"VELA_AVATAR_LOGOUT_FAIL",VELA_CLEAR_ALL_SESSION:"VELA_CLEAR_ALL_SESSION",VELA_CLEAR_ALL_SESSION_FAIL:"VELA_CLEAR_ALL_SESSION_FAIL",VELA_CLEAR_DATA_SESSION:"VELA_CLEAR_DATA_SESSION",VELA_CLEAR_DATA_SESSION_FAIL:"VELA_CLEAR_DATA_SESSION_FAIL",VELA_CLEAR_LOGIN_SESSION:"VELA_CLEAR_LOGIN_SESSION",VELA_CLEAR_LOGIN_SESSION_FAIL:"VELA_CLEAR_LOGIN_SESSION_FAIL",VELA_CLEAR_AUTH_SESSION:"VELA_CLEAR_AUTH_SESSION",VELA_CLEAR_AUTH_SESSION_FAIL:"VELA_CLEAR_AUTH_SESSION_FAIL",VELA_ADD_COMPILE_MODE:"VELA_ADD_COMPILE_MODE",VELA_ADD_COMPILE_MODE_FAIL:"VELA_ADD_COMPILE_MODE_FAIL",VELA_COMPILE:"VELA_COMPILE",VELA_COMPILE_FAIL:"VELA_COMPILE_FAIL",VELA_CHANGE_COMPILE_MODE:"VELA_CHANGE_COMPILE_MODE",VELA_CHANGE_COMPILE_MODE_FAIL:"VELA_CHANGE_COMPILE_MODE_FAIL",VELA_SELECT_SDK:"VELA_SELECT_SDK",VELA_SELECT_SDK_FAIL:"VELA_SELECT_SDK_FAIL",VELA_CLICK_CONVERT_TOOL:"VELA_CLICK_CONVERT_TOOL",VELA_CONVERT_EMIT:"VELA_CONVERT_EMIT",VELA_OPEN_PROJECT_FROM_CONVERT_TOOL:"VELA_OPEN_PROJECT_FROM_CONVERT_TOOL",VELA_BUILD_NPM:"VELA_BUILD_NPM",VELA_BUILD_NPM_FAIL:"VELA_BUILD_NPM_FAIL",PACKAGE_SIZE:"PACKAGE_SIZE",UPLOAD_SUCCESS_EVENT:"UPLOAD_SUCCESS_EVENT",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL",IDE_GET_SDK_LIST_FAIL:"IDE_GET_SDK_LIST_FAIL",IDE_REQUEST_START:"IDE_REQUEST_START",IDE_REQUEST_FAIL:"IDE_REQUEST_FAIL",IDE_COLOR_THEME:"IDE_COLOR_THEME",IDE_CODE_WINDOW_ERROR:"IDE_CODE_WINDOW_ERROR",IDE_HELP_DEVELOPER_COMMUNITY:"IDE_HELP_DEVELOPER_COMMUNITY",IDE_MESSAGE_EXPAND_CLICK:"IDE_MESSAGE_EXPAND_CLICK",IDE_MODULE_CLICK:"IDE_MODULE_CLICK",IDE_MODULE_USAGE:"IDE_MODULE_USAGE",IDE_MODULE_LOADTIME:"IDE_MODULE_LOADTIME",IDE_MODULE_PERFORMANCE:"IDE_MODULE_PERFORMANCE",IDE_PERFORMANCE:"IDE_PERFORMANCE",IDE_DEVICE_INFO_DISPLAY:"IDE_DEVICE_INFO_DISPLAY",IDE_DEVICE_INFO_CPU:"IDE_DEVICE_INFO_CPU",IDE_DEVICE_INFO_OS:"IDE_DEVICE_INFO_OS",IDE_SIMULATOR_LOAD_TIME:"IDE_SIMULATOR_LOAD_TIME",IDE_MENU_CLICK:"IDE_MENU_CLICK",IDE_LANGUAGE:"IDE_LANGUAGE",IDE_ROOM_SERVICE_TRACE:"IDE_ROOM_SERVICE_TRACE",IDE_UPDATE_STEP_ERROR:"IDE_UPDATE_STEP_ERROR",IDE_SCENE_START:"IDE_SCENE_START",IDE_SCENE_END:"IDE_SCENE_END",IDE_APPID_SELECT:"IDE_APPID_SELECT",IDE_APPID_CHANGE:"IDE_APPID_CHANGE",IDE_FMP_BREAKDOWN:"IDE_FMP_BREAKDOWN",IDE_JS_LONG_TASK:"IDE_JS_LONG_TASK",IDE_INP_INFO:"IDE_INP_INFO",IDE_LOW_FPS:"IDE_LOW_FPS",IDE_LOW_MEMORY:"IDE_LOW_MEMORY",IDE_FETCH_ADMIN_XCONFIG_TMAR:"IDE_FETCH_ADMIN_XCONFIG_TMAR",IDE_BIG_PACKAGESIZE_CHECK:"IDE_BIG_PACKAGESIZE_CHECK",IDE_WORKBENCH_WILL_RENDER:"IDE_WORKBENCH_WILL_RENDER",IDE_WORKBENCH_RENDERED:"IDE_WORKBENCH_RENDERED",IDE_CODE_WINDOW_NUM:"IDE_CODE_WINDOW_NUM",IDE_NEW_CODE_WINDOW:"IDE_NEW_CODE_WINDOW",IDE_DETAIL_PANEL_OPENED:"IDE_DETAIL_PANEL_OPENED",IDE_DETAIL_PANEL_CLOSED:"IDE_DETAIL_PANEL_CLOSED",IDE_SETTING_PAGE_SHOW:"IDE_SETTING_PAGE_SHOW",IDE_SETTING_PAGE_OPERATION:"IDE_SETTING_PAGE_OPERATION",IDE_SETTING_CHANGE_LITE_MODE:"IDE_SETTING_CHANGE_LITE_MODE:",IDE_MODULE_CLICK_AUTH_REG:"IDE_MODULE_CLICK_AUTH_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_REG:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL:"IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC",IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS:"IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS",IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY:"IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY",IDE_MODULE_AUTH_SCAN_QRCODE:"IDE_MODULE_AUTH_SCAN_QRCODE",IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON:"IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON",IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE",IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_DELETE_PROJECT_FOLDER:"VELA_DELETE_PROJECT_FOLDER",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",IDE_FRONTPAGE_PM_LIST:"IDE_FRONTPAGE_PM_LIST",CREATE_PROGRAM:"CREATE_PROGRAM",IDE_WXTOTT_ERROR:"IDE_WXTOTT_ERROR",IDE_SCENE_USER_OPERATE:"IDE_SCENE_USER_OPERATE",IDE_TEMPLATE_HOVER:"IDE_TEMPLATE_HOVER",IDE_TEMPLATE_DETAIL:"IDE_TEMPLATE_DETAIL",IDE_TEMPLATE_ERROR:"IDE_TEMPLATE_ERROR",IDE_TEMPLATE_DOWNLOAD:"IDE_TEMPLATE_DOWNLOAD",IDE_QUICK_JS_ERROR:"IDE_QUICK_JS_ERROR",IDE_REMOTE_DEBUG_CONNECTION_QUALITY:"IDE_REMOTE_DEBUG_CONNECTION_QUALITY",IDE_LOCAL_COMPILE_TRACE:"IDE_LOCAL_COMPILE_TRACE",IDE_REMOTE_DEBUG_EXCEPTION:"IDE_REMOTE_DEBUG_EXCEPTION",IDE_MODULE_AUTH_FORCE_LOGOUT:"IDE_MODULE_AUTH_FORCE_LOGOUT",IDE_CANVAS_WEBGL_CONTEXT_ENABLE:"IDE_CANVAS_WEBGL_CONTEXT_ENABLE",IDE_LOGIN_DATA_FORMAT:"IDE_LOGIN_DATA_FORMAT",IDE_IS_ENCRYPTION_AVAILABLE:"IDE_IS_ENCRYPTION_AVAILABLE",IDE_ADD_COMPILE_MODE:"IDE_ADD_COMPILE_MODE",IDE_DECODE_QRCODE:"IDE_DECODE_QRCODE",IDE_DECODE_URL:"IDE_DECODE_URL",IDE_MAIN_HELPER_FORK_TIME:"IDE_MAIN_HELPER_FORK_TIME",IDE_MAIN_HELPER_ERROR:"IDE_MAIN_HELPER_ERROR",IDE_INSTALL_PATH:"IDE_INSTALL_PATH",IDE_SWITCH_WORKBENCH_MODE:"IDE_SWITCH_WORKBENCH_MODE",IDE_TOGGLE_REMOTE_VIEW:"IDE_TOGGLE_REMOTE_VIEW",IDE_SIMULATOR_PAUSE_MINIAPP:"IDE_SIMULATOR_PAUSE_MINIAPP",IDE_SIMULATOR_REFRESH_MINIAPP:"IDE_SIMULATOR_REFRESH_MINIAPP",IDE_SIMULATOR_REFRESH:"IDE_SIMULATOR_REFRESH",IDE_SIMULATOR_CLICK_LITE_BANNER:"IDE_SIMULATOR_CLICK_LITE_BANNER",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER",IDE_LITE_NOTICE_MODAL_SHOW:"IDE_LITE_NOTICE_MODAL_SHOW",IDE_LITE_NOTICE_MODAL_CLICK:"IDE_LITE_NOTICE_MODAL_CLICK",IDE_WB_SCENE_START:"IDE_WB_SCENE_START",IDE_WB_SCENE_END:"IDE_WB_SCENE_END",IDE_GECKO_ERROR:"IDE_GECKO_ERROR",PUCK_COMPILE_ERROR:"PUCK_COMPILE_ERROR",IDE_DEVTOOLS_PANEL_INIT:"IDE_DEVTOOLS_PANEL_INIT",IDE_DEVTOOLS_SENSORS_PANEL_USAGE:"IDE_DEVTOOLS_SENSORS_PANEL_USAGE",IDE_FRONT_PAGE_CLICK_SETTINGS:"IDE_FRONT_PAGE_CLICK_SETTINGS",IDE_AI_OPEN:"IDE_AI_OPEN",IDE_AI_QUESTION:"IDE_AI_QUESTION",IDE_AI_FEEDBACK:"IDE_AI_FEEDBACK",IDE_AI_OPEN_LINK:"IDE_AI_OPEN_LINK",IDE_AI_ABNORMAL_REPLY:"IDE_AI_ABNORMAL_REPLY",IDE_AI_BUTTON_SHOW:"IDE_AI_BUTTON_SHOW",IDE_AI_STAY_DURATION:"IDE_AI_STAY_DURATION",IDE_AI_RESPONSE_TIME:"IDE_AI_RESPONSE_TIME",IDE_AI_STREAM_TIME:"IDE_AI_STREAM_TIME",IDE_WS_RECONNECT_FAILED:"IDE_WS_RECONNECT_FAILED",IDE_DETAIL_CONFIG_ITEM_CLICK:"IDE_DETAIL_CONFIG_ITEM_CLICK",IDE_WORKBENCH_VIEW_STATUS:"IDE_WORKBENCH_VIEW_STATUS",IDE_POWER_EVENT:"IDE_POWER_EVENT",IDE_TASK_PERFORMANCE:"IDE_TASK_PERFORMANCE",IDE_EXCEPTION_RECORD:"IDE_EXCEPTION_RECORD",IDE_PROXY_ERROR_TRACE:"IDE_PROXY_ERROR_TRACE",IDE_EDITOR_RESOLVE_SNIPPET:"IDE_EDITOR_RESOLVE_SNIPPET",IDE_EDITOR_SNIPPET_CREATION:"IDE_EDITOR_SNIPPET_CREATION",IDE_EDITOR_REFERENCE:"IDE_EDITOR_REFERENCE",IDE_EDITOR_COMPLETION_SHOW:"IDE_EDITOR_COMPLETION_SHOW",IDE_MAIN_HELPER_FORK:"IDE_MAIN_HELPER_FORK",IDE_MAIN_HELPER_SPAWN:"IDE_MAIN_HELPER_SPAWN",IDE_MAIN_HELPER_READY:"IDE_MAIN_HELPER_READY",IDE_DOUYIN_OAUTH_BIND_CLICK:"IDE_DOUYIN_OAUTH_BIND_CLICK",IDE_USER_LOCAL_IP_COUNT:"IDE_USER_LOCAL_IP_COUNT",IDE_WEB_CREATE:"IDE_WEB_CREATE",IDE_WEB_LOAD:"IDE_WEB_LOAD",IDE_WEB_DETECT:"IDE_WEB_DETECT",IDE_ENABLE_LYNX_DEBUG:"IDE_ENABLE_LYNX_DEBUG",IDE_USE_LYNX_SCHEMA:"IDE_USE_LYNX_SCHEMA",IDE_LIVE_PLUGIN_NOT_DEV_MODE:"IDE_LIVE_PLUGIN_NOT_DEV_MODE",IDE_SHOW_DYCLOUD_MODAL:"IDE_SHOW_DYCLOUD_MODAL",IDE_MODULE_POST_MESSAGE_TITLE_CLICK:"IDE_MODULE_POST_MESSAGE_TITLE_CLICK",SWITCH_BACKEND_RADIO:"SWITCH_BACKEND_RADIO",IDE_MARSCODE_LOGIN_MODAL_SHOW:"IDE_MARSCODE_LOGIN_MODAL_SHOW",IDE_MARSCODE_ERROR_MESSAGE_SHOW:"IDE_MARSCODE_ERROR_MESSAGE_SHOW",IDE_CLOUD_DEPLOY:"IDE_CLOUD_DEPLOY",IDE_CLOUD_PULL:"IDE_CLOUD_PULL",IDE_CLOUD_COPY:"IDE_CLOUD_COPY",IDE_CLOUD_DEBUG:"IDE_CLOUD_DEBUG",IDE_CLOUD_REQUEST:"IDE_CLOUD_REQUEST",IDE_PROJECT_TO_QRCODE_STEP:"IDE_PROJECT_TO_QRCODE_STEP"}),t.IDE_MODULES={LOGIN:"LOGIN",MESSAGE:"MESSAGE",SIMULATOR:"SIMULATOR",SIMULATOR_USAGE:"SIMULATOR_USAGE",DEVTOOL:"DEVTOOL",DEVTOOL_USAGE:"DEVTOOL_USAGE",REFRESH:"REFRESH",CLEAR_CACHE:"CLEAR_CACHE",COMPILE_ORDINARY:"COMPILE_ORDINARY",SELF_COMPILE_MODE:"SELF_COMPILE_MODE",COMPILE:"COMPILE",PREVIEW:"PREVIEW",REMOTE_DEBUG:"REMOTE_DEBUG",UPLOAD:"UPLOAD",SIGN_CHECK:"SIGN_CHECK",INTELLIGENCE:"INTELLIGENCE",PROJECT_INSPECTION:"PROJECT_INSPECTION",WASM_SPLIT:"WASM_SPLIT",AI:"AI",SHARE_PROJECT:"SHARE_PROJECT",PROJECT_MANAGE:"PROJECT_MANAGE",PROJECT_DETAIL:"PROJECT_DETAIL",CHECK_THIRD_PART_MINIAPP:"CHECK_THIRD_PART_MINIAPP",NPM_FUNCTION:"NPM_FUNCTION",EDITOR:"EDITOR",WORKBENCH:"WORKBENCH",SETTING:"SETTING",AVATAR:"AVATAR",UPDATE:"UPDATE",EDITOR_SAVE:"EDITOR_SAVE",MAIN_HELPER:"MAIN_HELPER",WEB_PC_SDK:"WEB_PC_SDK",SIGN_CHECKER_GUARANTEED_PAYMENT:"SIGN_CHECKER_GUARANTEED_PAYMENT",SIGN_CHECKER_TRADE_SYSTEM:"SIGN_CHECKER_TRADE_SYSTEM",TEST_QRCODE:"TEST_QRCODE",LYNX_DEBUG:"LYNX_DEBUG",SIMULATOR_HEART_BEAT:"SIMULATOR_HEART_BEAT",AI_COMMAND:"AI_COMMAND",AI_FAQ:"AI_FAQ",PROJECT_TO_QRCODE:"PROJECT_TO_QRCODE"},t.IDE_TIMELINE_NAMES=r(r({},t.IDE_MODULES),{SIMULATOR_FIRST_LOADING_END:"SIMULATOR_FIRST_LOADING_END",SIMULATOR_LOADING:"SIMULATOR_LOADING",LOCAL_COMPILE:"LOCAL_COMPILE"}),t.IDE_PERFORMANCE_EVENTS={projectmanageCreated:"performance:projectmanageCreated",projectmanageReady:"performance:projectmanageReady",openProject:"performance:openProject",editorReady:"performance:editorReady",workbenchReady:"performance:workbenchReady",simulatorReady:"performance:simulatorReady",simulatorFirstLoadingEnd:"performance:simulatorFirstLoadingEnd",compilePartialEnd:"performance:compilePartialEnd",previewStart:"performance:previewStart",previewCodeReady:"performance:previewCodeReady",uploadStart:"performance:uploadStart",uploadEnd:"performance:uploadEnd",shareStart:"performance:shareStart",shareEnd:"performance:shareEnd",remoteDebugStart:"performance:remoteDebugStart",remoteDebugCodeReady:"performance:remoteDebugCodeReady"},t.FRONT_PAGE_EVENT={VELA_CAPTCHA_REQUEST:"VELA_CAPTCHA_REQUEST",VELA_CAPTCHA_FAIL:"VELA_CAPTCHA_FAIL",VELA_PHONE_CAPTCHA_REQUEST:"VELA_PHONE_CAPTCHA_REQUEST",VELA_PHONE_CAPTCHA_FAIL:"VELA_PHONE_CAPTCHA_FAIL",VELA_PHONE_LOGIN_REQUEST:"VELA_PHONE_LOGIN_REQUEST",VELA_PHONE_LOGIN_FAIL:"VELA_PHONE_LOGIN_FAIL",VELA_MAIL_LOGIN_REQUEST:"VELA_MAIL_LOGIN_REQUEST",VELA_MAIL_LOGIN_FAIL:"VELA_MAIL_LOGIN_FAIL",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_CHECK_EXIST_PROJECT_FAIL:"VELA_CHECK_EXIST_PROJECT_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_CHECK_TEMPLATE_FAIL:"VELA_CHECK_TEMPLATE_FAIL",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_DELETE_PROJECT_FAIL:"VELA_DELETE_PROJECT_FAIL",VELA_IMPORT_PROJECT:"VELA_IMPORT_PROJECT",VELA_IMPORT_PROJECT_FAIL:"VELA_IMPORT_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL:"VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL"}},1189:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PACK_TYPE=t.CompilerPlugin=void 0,(t.CompilerPlugin||(t.CompilerPlugin={})).TYPESCRIPT="typescript",(n=t.PACK_TYPE||(t.PACK_TYPE={})).FILE="file",n.FOLDER="folder",n.SUFFIX="suffix",n.PREFIX="prefix",n.GLOB="glob",n.REGEXP="regexp"},5179:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_SLARDAR_EVENTS_TECH=t.UPDATE_SLARDAR_EVENTS=void 0,t.UPDATE_SLARDAR_EVENTS={IDE_LAUNCH:"IDE_LAUNCH",IDE_UPGRADE_SUGGGEST_POP:"IDE_UPGRADE_SUGGGEST_POP",IDE_UPGRADE_SUGGGEST_POP_CLOSE:"IDE_UPGRADE_SUGGGEST_POP_CLOSE",IDE_UPGRADE_SUGGGEST_POP_NO:"IDE_UPGRADE_SUGGGEST_POP_NO",IDE_UPGRADE_SUGGGEST_POP_YES:"IDE_UPGRADE_SUGGGEST_POP_YES",IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL:"IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL",IDE_UPGRADE_ICON:"IDE_UPGRADE_ICON",IDE_UPGRADE_ICON_CLOSE:"IDE_UPGRADE_ICON_CLOSE",IDE_UPGRADE_ICON_RESTART:"IDE_UPGRADE_ICON_RESTART",IDE_UPGRADE_ICON_VIEWDETAIL:"IDE_UPGRADE_ICON_VIEWDETAIL",IDE_FULLUPGRADE_POP:"IDE_FULLUPGRADE_POP",IDE_FULLUPGRADE_POP_CLOSE:"IDE_FULLUPGRADE_POP_CLOSE",IDE_FULLUPGRADE_POP_NO:"IDE_FULLUPGRADE_POP_NO",IDE_FULLUPGRADE_POP_YESBACK:"IDE_FULLUPGRADE_POP_YESBACK",IDE_FULLUPGRADE_POP_YESONCE:"IDE_FULLUPGRADE_POP_YESONCE",IDE_FULLUPGRADE_POP_VIEWDETAIL:"IDE_FULLUPGRADE_POP_VIEWDETAIL",IDE_FORCE_UPGRADE:"IDE_FORCE_UPGRADE"},t.UPDATE_SLARDAR_EVENTS_TECH={IDE_LOADER_IO_ERROR:"IDE_LOADER_IO_ERROR",IDE_LOADER_INSTALL_RECOVER_ERROR:"IDE_LOADER_INSTALL_RECOVER_ERROR",IDE_LOADER_START_FROM_ENTRY:"IDE_LOADER_START_FROM_ENTRY",IDE_LAUNCH_FAIL:"IDE_LAUNCH_FAIL"}},9756:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AppJSON=void 0;var l=s(n(120)),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.__isGame=!1,t}return o(t,e),t.from=function(e){return u(this,void 0,void 0,(function(){var n,r;return c(this,(function(o){switch(o.label){case 0:return[4,l.readJson(e)];case 1:return n=o.sent(),(r=new t(n,e)).__isGame=e.endsWith("game.json"),[2,r]}}))}))},Object.defineProperty(t.prototype,"isGame",{get:function(){return this.__isGame},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLivePlugin",{get:function(){var e;return Array.isArray(null===(e=this.rawJSON)||void 0===e?void 0:e.liveCards)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subPackages",{get:function(){var e=this.__raw,t=e.subPackages,n=e.subpackages;return t||(void 0===n?[]:n)},enumerable:!1,configurable:!0}),t}(n(2392).JSONContainer);t.AppJSON=p},3748:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtJSON=void 0;var l=s(n(120)),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.from=function(e){return u(this,void 0,void 0,(function(){return c(this,(function(n){switch(n.label){case 0:return[4,l.readJson(e)];case 1:return[2,new t(n.sent(),e)]}}))}))},t}(n(2392).JSONContainer);t.ExtJSON=p},2392:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.JSONContainer=void 0;var u=i(n(120)),c=function(){function e(e,t){this.__raw=e,this.path=t}return Object.defineProperty(e.prototype,"rawJSON",{get:function(){return this.__raw},enumerable:!1,configurable:!0}),e.prototype.getKey=function(e,t){var n;return null!==(n=this.__raw[e])&&void 0!==n?n:t},e.prototype.update=function(e,t,n){return void 0===n&&(n=!1),a(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return this.__raw[e]=t,n?[4,u.writeJson(this.path,this.__raw,{spaces:2})]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},e}();t.JSONContainer=c},8950:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},l=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},p=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectConfig=t.PrivateState=t.getOriginAppid=t.isTestAppid=t.getIDEAppTechType=t.setIDEAppTechType=t.PROJECT_TYPE_MAP=t.DEFAULT_PROJECT_CONFIG=t.setEnvFunctionForProject=void 0;var f=s(n(120)),h=s(n(6928)),_=n(9756),v=n(3748),m=n(2392),E=n(1189),g=n(3357),y=d(n(1128)),b=d(n(3322)),A=d(n(385)),O=d(n(7942)),C=d(n(8964)),w=d(n(8141)),I=d(n(7723)),S=d(n(9413)),P=function(){return g.defaultEnv};t.setEnvFunctionForProject=function(e){P=e};var R={MICROAPP:"tt07e3715e98c9aac0",MICROGAME:"tt975be1e608633d4202",LIVE_PLUGIN:"ttb80eceb32739b50310",get TOYBOX(){return"boe"===P().env.type?"tte05d96e07f3bdfe710":"tt3c174aaaa32e0eb810"}};t.DEFAULT_PROJECT_CONFIG={appid:"testappId",projectname:"默认小程序名",setting:{urlCheck:!0,es6:!0,postcss:!0,minified:!0,newFeature:!0},scripts:{afterOpen:"",beforeCompile:""}},t.PROJECT_TYPE_MAP={microapp:"app",microgame:"game",livePlugin:"liveplugin"};var L="";t.setIDEAppTechType=function(e){L=e},t.getIDEAppTechType=function(){return L};var T,D="testappid";function N(e,t){return void 0===t&&(t="app"),e.toLocaleLowerCase()===D?(null==L?void 0:L.includes("microapp"))?R.MICROAPP:(null==L?void 0:L.includes("microgame"))?R.MICROGAME:(null==L?void 0:L.includes("liveplugin"))?R.LIVE_PLUGIN:"app"===t?R.MICROAPP:R.MICROGAME:e}t.isTestAppid=function(e){return Boolean(e)&&(e===R.MICROAPP||e===R.MICROGAME||e===R.LIVE_PLUGIN||e.toLowerCase()===D)},t.getOriginAppid=N,function(e){e.ALWAYS="ALWAYS",e.NORMAL="NORMAL"}(T=t.PrivateState||(t.PrivateState={}));var x=function(e){function n(t){var n=t.rawJson,r=t.filepath,o=t.privateConfigPath,i=t.projectPath,a=t.publicJson,s=t.privateJson,u=e.call(this,n,r)||this;return u.projectPath=i,u.privateConfigPath=o,u.publicJson=a,u.privateJson=s,u._enablePrivateConfig=!1,u}return o(n,e),n.getKeyPath=function(){return n._keyPath||(n._keyPath=n.generateList(n.PRIVATE_CONFIG_KEYS)),n._keyPath},n.getKeyPathList=function(){return n.getKeyPath().map((function(e){return e[0]}))},n.generateList=function(e,t){return void 0===t&&(t=""),(0,y.default)(e,(function(e,r,o){var i,a=t?"".concat(t,".").concat(o):o;return"string"==typeof(i=r)&&Object.values(T).includes(i)?e.push([a,r]):e.push.apply(e,p([],l(n.generateList(r,a)),!1)),e}),[])},n.from=function(e){return u(this,void 0,void 0,(function(){var t,r,o,i,a,s,u;return c(this,(function(c){switch(c.label){case 0:return t=h.join(e,"project.config.json"),r=h.join(e,"project.private.config.json"),[4,f.readJson(t)];case 1:return o=c.sent(),[4,(i=new n({rawJson:o,filepath:t,projectPath:e,publicJson:o,privateJson:{},privateConfigPath:r})).detectProjectType()];case 2:if("app"===c.sent()){a={};try{s=f.readJSONSync(r),(0,O.default)(s)&&(0,C.default)(s).length>0&&(a=s)}catch(e){}u=this.getMergedConfig(o,a),i.enablePrivateConfig(u,a)}return[2,i]}}))}))},n.fromJson=function(e,t){return new n({rawJson:e,filepath:h.join(t,"project.config.json"),projectPath:t,publicJson:e,privateJson:{},privateConfigPath:h.join(t,"project.private.config.json")})},n.getMergedConfig=function(e,t){var n,r=null!==(n=t.disablePrivate)&&void 0!==n?n:e.disablePrivate,o=(0,b.default)(e);return this.getKeyPath().forEach((function(e){if(e[1]===T.ALWAYS||!r){var n=(0,A.default)(t,e[0]);void 0!==n&&(0,S.default)(o,e[0],n)}})),o},n.prototype.update=function(t,r,o){var i;return u(this,void 0,void 0,(function(){var a,s,u,l,p,d,h;return c(this,(function(c){switch(c.label){case 0:return(null!==(i=this._enablePrivateConfig&&this.privateJson.disablePrivate)&&void 0!==i?i:this.publicJson.disablePrivate)?[4,e.prototype.update.call(this,t,r,o)]:[3,2];case 1:return c.sent(),[2];case 2:return a=n.getKeyPathList(),s=(0,I.default)(((d={})[t]=r,d),a),u=(0,C.default)(s).length>0,l=(0,w.default)(((h={})[t]=r,h),a),p=(0,C.default)(l).length>0,(0,S.default)(this.__raw,t,r),u&&(0,S.default)(this.privateJson,t,s[t]),p&&(0,S.default)(this.publicJson,t,l[t]),o?p?[4,f.writeJSON(this.path,this.publicJson,{spaces:2})]:[3,4]:[3,7];case 3:c.sent(),c.label=4;case 4:return u?[4,f.ensureFile(this.privateConfigPath)]:[3,7];case 5:return c.sent(),[4,f.writeJson(this.privateConfigPath,this.privateJson,{spaces:2})];case 6:c.sent(),c.label=7;case 7:return[2]}}))}))},n.prototype.enablePrivateConfig=function(e,t){this.privateJson=t,this.__raw=e,this._enablePrivateConfig=!0},n.prototype.getPublicRawJSON=function(){return this.publicJson},n.prototype.getPrivateRawJSON=function(){return this.privateJson},n.prototype.getAppid=function(){var e="";return this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),N(e)},n.prototype.getRealAppid=function(){return u(this,void 0,void 0,(function(){var e,t,n,r;return c(this,(function(o){switch(o.label){case 0:return e="",this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),t=N,n=[e],L?(r=void 0,[3,3]):[3,1];case 1:return[4,this.detectProjectType()];case 2:r=o.sent(),o.label=3;case 3:return[2,e=t.apply(void 0,n.concat([r]))]}}))}))},n.prototype.getRealPluginAppid=function(){if(!this.isPluginProject())return null;var e="";return this.__raw.pluginAppid&&(e=this.__raw.pluginAppid),"testpluginappid"===e.toLocaleLowerCase()?"testpluginappid":e},n.prototype.getSetting=function(){var e;return null!==(e=this.__raw.setting)&&void 0!==e?e:t.DEFAULT_PROJECT_CONFIG.setting},n.prototype.getProjectName=function(){var e;return null!==(e=this.__raw.projectname)&&void 0!==e?e:""},n.prototype.getScripts=function(){var e;return null!==(e=this.__raw.scripts)&&void 0!==e?e:{afterOpen:"",beforeCompile:""}},n.prototype.getConditionData=function(e){var t,n;return null!==(n=null===(t=this.__raw.condition)||void 0===t?void 0:t[e])&&void 0!==n?n:{current:-1,list:[]}},n.prototype.getAutoCompileSetting=function(){var e;return!1!==(null===(e=this.__raw.setting)||void 0===e?void 0:e.autoCompile)},n.prototype.getCompileHotReloadSetting=function(){var e,t=null===(e=this.__raw.setting)||void 0===e?void 0:e.compileHotReLoad,n="native"===this.__raw.douyinProjectType;return t||void 0===t&&n},n.prototype.getNativeCompileSetting=function(){var e;return!1!==(null===(e=this.__raw.setting)||void 0===e?void 0:e.nativeCompile)},n.prototype.getLocalPluginsSetting=function(){var e,t;return null!==(t=null===(e=this.__raw.setting)||void 0===e?void 0:e.localPlugins)&&void 0!==t&&t},n.prototype.getAfterOpenScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.afterOpen},n.prototype.getBeforeCompileScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.beforeCompile},n.prototype.getSkipDomainCheck=function(){var e,t,n;return!(null===(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.urlCheck)||void 0===n||n)},n.prototype.getPreviewHotRestartCache=function(){var e,t,n;return null!==(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.IDEPreviewHotRestartCache)&&void 0!==n&&n},n.prototype.getPreviewOpenVConsole=function(){var e,t,n;return null!==(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.IDEPreviewOpenVConsole)&&void 0!==n&&n},n.prototype.getMiniprogramRoot=function(){var e,t;return null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.miniprogramRoot)&&void 0!==t?t:"./"},n.prototype.getCloudfunctionRoot=function(){var e,t;return null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.cloudfunctionRoot)&&void 0!==t?t:""},n.prototype.getPluginRoot=function(){var e,t;return null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.pluginRoot)&&void 0!==t?t:"./plugin"},n.prototype.isPluginProject=function(){return"plugin"===this.__raw.ttProjectType},n.prototype.getBigPackageSizeSupport=function(){var e,t,n;return null!==(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.bigPackageSizeSupport)&&void 0!==n&&n},n.prototype.getWebDetect=function(){var e,t,n;return null===(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.webDetect)||void 0===n||n},n.prototype.getPreviewPreload=function(){var e,t,n;return null===(n=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.previewPreload)||void 0===n||n},n.prototype.getPackOptions=function(){var e,t,n,r,o,i,a=null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.packOptions)&&void 0!==t?t:{},s=Object.values(E.PACK_TYPE),u=function(e){return"string"==typeof e.value&&!!e.value&&s.includes(e.type)};return{ignore:null!==(r=null===(n=a.ignore)||void 0===n?void 0:n.filter(u))&&void 0!==r?r:[],include:null!==(i=null===(o=a.include)||void 0===o?void 0:o.filter(u))&&void 0!==i?i:[]}},n.prototype.getLynxConfig=function(){return this.__raw.lynx},n.prototype.getLynxPackage=function(){var e,t;return JSON.stringify(null!==(t=null===(e=this.__raw.lynx)||void 0===e?void 0:e.debugSchema)&&void 0!==t?t:{})},n.prototype.detectProjectType=function(e){return u(this,void 0,void 0,(function(){var t;return c(this,(function(n){switch(n.label){case 0:return[4,this.getProjectType()];case 1:return t=n.sent(),[2,e?e===t:t]}}))}))},n.prototype.getProjectType=function(){return u(this,void 0,void 0,(function(){var e,n,r,o,i,a,s,u,l;return c(this,(function(c){switch(c.label){case 0:if((null==L?void 0:L.includes("microapp"))||(null==L?void 0:L.includes("microapp-plugin")))return[2,"app"];if((null==L?void 0:L.includes("unity"))||(null==L?void 0:L.includes("microgame")))return[2,"game"];if(this.__raw.ttProjectType)return"plugin"===this.__raw.ttProjectType?[2,"app"]:[2,t.PROJECT_TYPE_MAP[this.__raw.ttProjectType]];e=this.getMiniprogramRoot(),n=h.join(this.projectPath,e,"app.json"),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,f.readJson(n)];case 2:return r=c.sent(),Array.isArray(null==r?void 0:r.liveCards)?[2,"liveplugin"]:[3,4];case 3:return c.sent(),[3,4];case 4:return o=n.replace("app.json","app.ts"),i=n.replace("app.json","app.js"),[4,Promise.all([f.pathExists(n),f.pathExists(i),f.pathExists(o)])];case 5:if(a=c.sent(),this.useTypeScript()){if(a[0]&&(a[1]||a[2]))return[2,"app"]}else if(a[0]&&a[1])return[2,"app"];return s=n.replace("app.json","game.json"),u=s.replace("game.json","game.js"),[4,Promise.all([f.pathExists(s),f.pathExists(u)])];case 6:if((l=c.sent())[0]&&l[1])return[2,"game"];throw new Error("[ProjectConfig]Bad Project Type")}}))}))},n.prototype.getAppJSON=function(){return u(this,void 0,void 0,(function(){var e,t,n;return c(this,(function(r){switch(r.label){case 0:return[4,this.detectProjectType("app")];case 1:return(t=r.sent())?[3,3]:[4,this.detectProjectType("liveplugin")];case 2:t=r.sent(),r.label=3;case 3:return e=t?"app.json":"game.json",n=h.join(this.projectPath,this.getMiniprogramRoot(),e),[4,_.AppJSON.from(n)];case 4:return[2,r.sent()]}}))}))},n.prototype.getExtJSON=function(){return u(this,void 0,void 0,(function(){var e;return c(this,(function(t){switch(t.label){case 0:return e=h.join(this.projectPath,this.getMiniprogramRoot(),"ext.json"),[4,v.ExtJSON.from(e)];case 1:return[2,t.sent()]}}))}))},n.prototype.useTypeScript=function(){var e,t,n;return!!Array.isArray(null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.useCompilerPlugins)&&(null===(n=this.__raw.setting)||void 0===n?void 0:n.useCompilerPlugins.includes(E.CompilerPlugin.TYPESCRIPT))},n.PRIVATE_CONFIG_KEYS={disablePrivate:T.ALWAYS,setting:{urlCheck:T.NORMAL,mockLogin:T.NORMAL,autoPush:T.NORMAL,bigPackageSizeSupport:T.NORMAL,autoCompile:T.NORMAL,compileHotReLoad:T.NORMAL,nativeCompile:T.NORMAL,IDEPreviewHotRestartCache:T.NORMAL,webDetect:T.NORMAL},condition:T.NORMAL,packOptions:T.NORMAL,lynx:T.NORMAL,cloudfunctionRoot:T.NORMAL},n}(m.JSONContainer);t.ProjectConfig=x},7182:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathname=t.watchBrowserINP=void 0;var r=n(2410);t.watchBrowserINP=function(e){var t=new PerformanceObserver((function(n){n.getEntries().forEach((function(n){var o,i=n.duration,a=n.processingEnd-n.startTime,s=n.processingStart-n.startTime,u=n.processingEnd-n.processingStart,c=null===(o=null==n?void 0:n.target)||void 0===o?void 0:o.outerHTML;u<1||a<100||!c||setTimeout((function(){var o=function(e,t,n){var o=(0,r.getINPRelativeInformation)(e,t,n),i={};return o&&(null==o?void 0:o.matchedEvent.before.length)>0&&(i.eventBeforeDelay=o.matchedEvent.before.join(",")),o&&(null==o?void 0:o.matchedEvent.in.length)>0&&(i.eventInDelay=null==o?void 0:o.matchedEvent.in.join(",")),(null==o?void 0:o.stage.left)&&(i.stageBeforeDelay=null==o?void 0:o.stage.left),(null==o?void 0:o.stage.right)&&(i.stageAfterDelay=null==o?void 0:o.stage.right),(null==o?void 0:o.matchedLongtask)&&(i.matchedLongtask=o.matchedLongtask),i}(n.startTime,n.processingStart,i),l=s/n.duration*100,p=u/n.duration*100,d=c;c.length>400&&(d=c.slice(0,400));var f={outerHTML:d,type:n.name};Object.assign(f,o),e({metrics:{inp:i,inpt:a,inputDelay:s,processTime:u,inputDelayPercent:l,processPercent:p},tags:f},(function(){return t.disconnect()}))}),100)}))}));return setTimeout((function(){t.observe({type:"event",buffered:!0})}),3e4),t},t.getPathname=function(){try{return window.location.pathname.split("/dist")[1]}catch(e){return""}}},2410:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getINPRelativeInformation=t.markEvent=t.markSlardarEventAsStage=t.markStage=t.markMaybeLongTask=t.markUnNameLongtask=void 0;var o,i=n(2660);!function(e){e.jsAnalyzeCode="jsAnalyzeCode",e.importTS="importTS",e.registerFileChange="registerFileChange",e.ttmlAnalyzeCode="ttmlAnalyzeCode",e._updateButtonSelected="_updateButtonSelected",e.handleSelectedStatus="handleSelectedStatus",e.getProcessUsage="getProcessUsage",e.flushNetworkCdpMsgAndDisconnect="flushNetworkCdpMsgAndDisconnect"}(o||(o={}));var a=[],s=[],u=[],c=0,l=function(){return c+=1,"uuid-".concat(Date.now(),"-").concat(c)};t.markUnNameLongtask=function(e){var t=r(r({},e),{id:l()});s.push(t),s.length>20&&s.shift()},t.markMaybeLongTask=function(e,t){var n;if("start"===t)s.push({id:l(),tag:e,start:performance.now()}),s.length>20&&s.shift();else{if(!s.length)return;var r=s.reverse().find((function(t){return t.tag===e&&!t.end}));if(!r)return;r.end=performance.now(),r.duration=r.end-r.start,r.duration<200?s=s.filter((function(e){return e.id!==r.id})):n=r}return n};var p=!0,d=[{eventName:i.SLARDAR_EVENT.IDE_LOCAL_COMPILE_TRACE,categoryKeyPath:"step",stage:"afterInit"},{eventName:"IDE_PREVIEW_TRACE",categoryKeyPath:"step",stage:"afterInit"},{eventName:"IDE_SIMULATOR_COMPILE_TRACE",categoryKeyPath:"step",stage:"afterInit"},{eventName:i.SLARDAR_EVENT.IDE_SCENE_START,categoryKeyPath:"scene_name",stage:"afterInit"},{eventName:i.SLARDAR_EVENT.IDE_SCENE_END,categoryKeyPath:"scene_name",stage:"afterInit"},{eventName:"IDE_DEVTOOLS_TRACE",categoryKeyPath:"step",stage:"afterInit"}],f=[{eventName:"VELA_COMPILE_FIRST_END",stage:"init"},{eventName:i.SLARDAR_EVENT.VELA_COMPILE_FIRST_END,stage:"init"},{eventName:"SIMULATOR_FIRST_LOADING_END",stage:"init"},{eventName:"IDE_SIMULATOR_FIRST_RENDER_END",stage:"init"}].concat(d);t.markStage=function(e,t){u.push({stageName:t,timestamp:performance.now()}),u.length>20&&u.shift()},t.markSlardarEventAsStage=function(e,n){var r=f.find((function(t){return t.eventName===e}));r&&("IDE_SIMULATOR_FIRST_RENDER_END"===r.eventName&&(p=!1),(0,t.markStage)(r.stage,r.categoryKeyPath?"".concat(e,"/").concat(n[r.categoryKeyPath]):e))};var h=[{eventName:i.SLARDAR_EVENT.IDE_MODULE_CLICK,categoryKeyPath:"moduleName"},{eventName:"IDE_MODULE_USAGE",categoryKeyPath:"moduleName"}].concat(d),_=[i.SLARDAR_EVENT.IDE_INP_INFO];t.markEvent=function(e,t){if(!_.includes(e)){var n=h.find((function(t){return t.eventName===e}));a.push({eventName:n?"".concat(e,"/").concat(t[n.categoryKeyPath]):e,timestamp:performance.now()}),a.length>30&&a.shift()}};var v=function(e,t){return t-e.timestamp<1e4?e.stageName:p?"durationInit":"afterInit"};t.getINPRelativeInformation=function(e,t,n){if(!(n<500)){var o={},i=u.findIndex((function(t){return t.timestamp>e}));if(-1===i)(c=null==u?void 0:u[u.length-1])&&(o.left=v(c,t));else if(o.right=u[i].stageName,i-1>=0){var c=null==u?void 0:u[i-1];o.left=v(c,t)}var l=a.filter((function(n){return n.timestamp>e&&n.timestamp<t})).map((function(e){return e.eventName})),p=function(e){for(var t=[],n=new Set,r=a.length-1;r>=0;r--){var o=a[r];if(!(e-o.timestamp<0)){if(e-o.timestamp>=500)break;if(!n.has(o.eventName)&&(t.unshift(o.eventName),n.add(o.eventName),3===t.length))break}}return t}(e);a=a.filter((function(t){return t.timestamp>e-3e3}));var d=function(e,t){if(!(t-e<300)){var n=s.map((function(n){if(n.end)return n.start<e&&n.end>e||n.start>e&&n.end<t?r({},n):void 0})).filter(Boolean),o=s.findIndex((function(t){return t.start>=e-1e4}));return s=-1!==o?s.slice(o):[],n.map((function(e){return null==e?void 0:e.tag})).join(",")}}(e,t);return{stage:o,matchedEvent:{in:l,before:p},matchedLongtask:d}}}},6129:function(e,t,n){"use strict";var r,o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultPerfConfigSettings=t.skipReport=t.startTime=t.PROCESS_TYPE=t.compareCacheTriggerCount=t.getModuleUseCache=t.setModuleUseCache=t.timelineMap=t.moduleEventCacheMap=t.getHref=t.commonParams2Context=t.BID=t.getSystemMemory=t.getCPUModel=t.getPathname=void 0;var a=i(n(857)),s=n(7182);Object.defineProperty(t,"getPathname",{enumerable:!0,get:function(){return s.getPathname}});var u="";function c(){try{return u||(u=a.default.cpus()[0].model)}catch(e){return u="none"}}t.getCPUModel=c;var l="";function p(){try{return l||(l=Math.round(a.default.totalmem()/1024/1024/1024).toString())}catch(e){return l="none"}}function d(e,n,r){t.moduleEventCacheMap[e][n]=r}function f(e,n){var r=t.moduleEventCacheMap[e];if(!r)throw Error("invalid event type: "+e);return r[n]||(r[n]={count:0,triggerNum:0}),r[n]}t.getSystemMemory=p,t.BID="electron_12345",t.commonParams2Context=function(e,t,n,r){var o,i,a,s,u,l,d,f,h,_,v,m,E,g;return{user_id:String(null!==(o=null==e?void 0:e.userId)&&void 0!==o?o:""),name:null!==(i=null==e?void 0:e.username)&&void 0!==i?i:"",device_id:null==e?void 0:e.deviceId,ide_version:null==e?void 0:e.ideVersion,os_version:null==e?void 0:e.osVersion,os_platform:null==e?void 0:e.osPlatform,dev_app_id:null!=t?t:"",ext_app_id:null!=r?r:"",tech_type:null!=n?n:"",ide_version_number:null!==(s=null===(a=null==e?void 0:e.ideVersionNumber)||void 0===a?void 0:a.toString())&&void 0!==s?s:"",ide_env:null!==(u=null==e?void 0:e.env)&&void 0!==u?u:"",branch:null!==(l=null==e?void 0:e.branch)&&void 0!==l?l:"",build_id:null!==(d=null==e?void 0:e.buildId)&&void 0!==d?d:"",buildId:null!==(f=null==e?void 0:e.buildId)&&void 0!==f?f:"",arch:null===process||void 0===process?void 0:process.arch,ide_version_int:null!==(h=null==e?void 0:e.ideVersionNumber)&&void 0!==h?h:0,is_sandbox:null!==(_=e.isSandbox)&&void 0!==_?_:"0",frameworkType:null!==(v=null==e?void 0:e.frameworkType)&&void 0!==v?v:"",workbench_mode:null!==(m=e.workbenchMode)&&void 0!==m?m:"",e2e_scene:null!==(g=null===(E=null===process||void 0===process?void 0:process.env)||void 0===E?void 0:E.IDE_E2E_SCENE)&&void 0!==g?g:"",cpu_model:c(),system_memory:p()}},t.getHref=function(){try{return window.location.href}catch(e){return""}},t.moduleEventCacheMap={click:{},call:{}},t.timelineMap=new Map,t.setModuleUseCache=d,t.getModuleUseCache=f,t.compareCacheTriggerCount=function(e,t,n,r,i){var a;if(void 0===i&&(i=Date.now()),1===n)return!0;var s=f(e,t),u=s.startTime,c=void 0===u?0:u,l=s.triggerNum,p=Number(l)+1;if(p<n)return d(e,t,o(o({},s),{triggerNum:p,startTime:null!==(a=s.startTime)&&void 0!==a?a:i})),!1;var h=r&&i-c>r;return d(e,t,o(o({},s),{startTime:h?i:void 0,triggerNum:h?1:0})),!h},t.PROCESS_TYPE={main:"main",renderer:"renderer"},t.startTime=Date.now(),t.skipReport="development"===(null===(r=null===process||void 0===process?void 0:process.env)||void 0===r?void 0:r.NODE_ENV),t.defaultPerfConfigSettings={disabled:!0,fps:{below:20,belowCount:3,maxReporterCount:10},interval:{duration:100,blockFactor:5,reportThreshold:6,longTaskDuration:2e3,longTaskDurationMain:800,maxReporterCount:10},memory:{freePercent:10,free:2097152,duration:1e4,maxReporterCount:10,winUsePowershell:!1},disabledHref:[],disabledMain:!1,ideUsageCollectInterval:3e5,disabledJsonWorker:!1}},2073:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.reportTeaImmediately=t.clearTeaEvents=t.reportTea=t.makeEvent=t.registerDevLogger=void 0;var c=u(n(681)),l=n(6129),p=c.default.create({baseURL:"https://mcs.snssdk.com",timeout:6e4,headers:{"Content-Type":"application/json"}}),d=console.info;function f(e,t,n){return void 0===n&&(n=Date.now()),{event:e,params:JSON.stringify(t),time:Math.floor(n/1e3)}}t.registerDevLogger=function(e){d=e},t.makeEvent=f;var h,_,v=function(){function e(e,t,n){void 0===t&&(t=1e3),void 0===n&&(n=10);var r=this;this._events=[],this.reporterAll=function(){0!==r._events.length&&(r.reporter(s([],a(r._events),!1)),r.clear())},this.add=function(e,t,n){if(r._events.push(f(e,t,n)),r._events.length>=r.cacheLimit)return r.reporterAll();r.timerId||(r.timerId=setTimeout((function(){r.timerId=void 0,r.reporterAll()}),r.cacheDurationLimit))},this.clear=function(){r._events=[]},this.reporter=e,this.cacheDurationLimit=t,this.cacheLimit=n}return Object.defineProperty(e.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),e}();function m(e){var t;return!_&&(null==e?void 0:e.deviceId)&&(_={user:{user_unique_id:e.deviceId},header:{app_id:1733,app_version:e.ideVersion,headers:JSON.stringify({app_full_version:e.ideVersion}),os_name:e.osPlatform,os_version:e.osVersion,custom:{cli_name:null!==(t=e.cliName)&&void 0!==t?t:""}},verbose:1}),_}var E=new Set;function g(e){E.size<100?E.add(e):console.error("失败缓存超过".concat(100,"个,无法继续缓存"))}t.reportTea=function(e,t,n,u){var c=this;void 0===n&&(n={}),h||(h=new v((function(e){return o(c,void 0,void 0,(function(){var n,o,u,c,f,h,_;return i(this,(function(i){switch(i.label){case 0:if(n=Object.assign({},m(t),{events:e}),l.skipReport)return null==d||d("[skip report tea]events ".concat(null===(_=n.events)||void 0===_?void 0:_.length,": "),n.events),[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,p.post("/v1/json",n)];case 2:return i.sent(),[3,4];case 3:throw o=i.sent(),console.error("上报数据出错,进入重试队列",o,n.events),e.forEach((function(e){return g(e)})),u=s([],a(new Set((e||[]).map((function(e){return null==e?void 0:e.event})))),!1).join(","),Error("Tea report error, ".concat((null==o?void 0:o.message)||String(o),", event count: ").concat(null==e?void 0:e.length,", failed events: ").concat(u));case 4:if(!(E.size>0))return[3,8];c=s([],a(E),!1),null==d||d("[will report failed events]count: ".concat(E.size,", events"),c),f=p.post("/v1/json",r(r({},n),{events:c})),E.clear(),i.label=5;case 5:return i.trys.push([5,7,,8]),[4,f];case 6:return i.sent(),[3,8];case 7:return h=i.sent(),console.error("上报数据出错",h,c),null==d||d("重试出错,重新放入队列"),c.forEach((function(e){return g(e)})),[3,8];case 8:return[2]}}))}))}))),h.add(e,n,u)},t.clearTeaEvents=function(){null==h||h.reporterAll()},t.reportTeaImmediately=function(e,t){var n,r=t.map((function(e){return f(e.event,e.params)})),o=Object.assign({},m(e),{events:r});l.skipReport?null==d||d("[skip report tea immediately]events ".concat(null===(n=o.events)||void 0===n?void 0:n.length,": "),o.events):p.post("/v1/json",o).catch((function(e){console.error("上报数据出错",e)}))}},4685:function(e,t){"use strict";var n=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function r(e){return e.endsWith("/")?e:e.concat("/")}Object.defineProperty(t,"__esModule",{value:!0}),t.ensureEndSlash=t.formatSize=t.normalizeSize=void 0,t.normalizeSize=function(e){var t=e.__APP__,o=void 0===t?0:t,i=n(e,["__APP__"]),a={main:{path:"main",size:o},sub:[],total:o};return Object.keys(i).forEach((function(e){var t,n=i[e];null===(t=a.sub)||void 0===t||t.push({path:r(e),size:n}),a.total=a.total+n})),a},t.formatSize=function(e){return e>1048576?(e/1024/1024).toFixed(2)+"MB":e>1024?(e/1024).toFixed(1)+"KB":"".concat(e,"B")},t.ensureEndSlash=r},3357:function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setBoeMap=t.setJestMock=t.setSlardarInstance=t.setEnvFunction=t.defaultEnv=t.AxiosInstance=void 0;var a=i(n(681)),s=n(2660),u=new Map;u.set(/https:\/\/microapp.bytedance.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),u.set(/https:\/\/developer.toutiao.com\/api\/apps\/v3\/meta(.*)/,"http://developer.toutiao.com.boe-gateway.byted.org/api/apps/v3/meta$1"),u.set(/https:\/\/developer.toutiao.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),u.set(/https:\/\/open-sandbox.douyin.com\/(.*)/,"http://open-sandbox-boe.bytedance.net/$1"),u.set(/https:\/\/developer.open-douyin.com\/(.*)/,"https://dy-open-platform-boe.bytedance.net/$1"),u.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/user\/tp_info)/,"http://developer-boe.toutiao.com/$1"),u.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/.*)/,"http://developer-boe.toutiao.com/$1"),u.set(/https:\/\/starkgame.zijieapi.com\/api\/stark_wasm\/(.*)/,"http://starkwasm-boe.bytedance.net/api/stark_wasm/$1"),u.set(/https:\/\/starkgame.zijieapi.com\/(.*)/,"http://starkpublish.bytedance.net/$1"),u.set(/https:\/\/cloud.douyin.com\/(.*)/,"https://douyincloud-boe.bytedance.net/$1");var c=["https://ma.zijieapi.com/api/apps/xconfig_meta"];t.setBoeMap=function(e,t){u.set(e,t)};var l={env:{type:"online",channel:""},proxy:{host:null,port:null}};t.defaultEnv=l;var p=function(){return l},d={reportRequestError:function(){},reportCustomEvent:function(){}},f=[function(e){var t,n,i;if(null===(i=e.headers)||void 0===i?void 0:i.online)return e;var a=p().env,s="boe"===a.type,l=a.channel;if(!s)return e;try{for(var d=r(u),f=d.next();!f.done;f=d.next()){var h=o(f.value,2),_=h[0],v=h[1];if(e.url&&_.test(e.url)&&!c.includes(e.url)){e.url=e.url.replace(_,v);break}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}return l&&e.headers&&!e.headers["ignore-channel"]&&(e.headers["X-TT-ENV"]=l),e},function(e){var t;if(null===(t=e.headers)||void 0===t?void 0:t.online)return e;var n=p().env,r="ppe"===n.type,o=n.channel;return r&&e&&e.headers&&(e.headers["X-USE-PPE"]=1),r&&e.headers&&o&&!e.headers["ignore-channel"]&&(e.headers["X-TT-ENV"]=o),e}],h=a.default.create({adapter:"http",timeout:6e4});t.AxiosInstance=h,h.interceptors.request.use((function(e){var t,r;null==d||d.reportCustomEvent(s.SLARDAR_EVENT.IDE_REQUEST_START,void 0,{url:null!==(t=null==e?void 0:e.url)&&void 0!==t?t:""});var o=p().proxy;return o.host?(null===(r=e.url)||void 0===r?void 0:r.startsWith("https://"))?(e.httpsAgent=n(2856).httpsOverHttp({proxy:{host:o.host,port:o.port},rejectUnauthorized:!1}),e.proxy=!1):e.proxy={host:o.host,port:o.port?+o.port:80}:(null==o?void 0:o.host)&&o.port||(e.proxy=!1),f.forEach((function(t){return t(e)})),e}),(function(e){return null==d||d.reportRequestError({url:null==e?void 0:e.url,statusMessage:String(e),caller:"interceptors.request.error"}),Promise.reject(e)})),h.interceptors.response.use((function(e){var t,n,r,o,i,a,s,u,c,l,p,f,h;return null===e.config.validateStatus||e.status>=200&&e.status<300||null==d||d.reportRequestError({url:null!==(n=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==n?n:null===(r=null==e?void 0:e.request)||void 0===r?void 0:r.url,ttLogId:String(null!==(a=null===(i=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.headers)||void 0===i?void 0:i["x-tt-logid"])&&void 0!==a?a:null===(s=null==e?void 0:e.headers)||void 0===s?void 0:s["x-tt-logid"]),statusCode:null==e?void 0:e.status,statusMessage:null==e?void 0:e.statusText,caller:"interceptors.response"}),process.env.isIDE&&console.info("[request] ",null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.url,"x-tt-logid",null!==(h=null!==(p=null===(l=null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.headers)||void 0===l?void 0:l["x-tt-logid"])&&void 0!==p?p:null===(f=e.headers)||void 0===f?void 0:f["x-tt-logid"])&&void 0!==h?h:""),e}),(function(e){var t,n,r,o,i,a,s,u,c,l,f,h,_,v,m;return console.info("[error request proxy]",p().proxy),null==d||d.reportRequestError({url:null!==(i=null!==(n=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==n?n:null===(o=null===(r=null==e?void 0:e.response)||void 0===r?void 0:r.config)||void 0===o?void 0:o.url)&&void 0!==i?i:null===(a=null==e?void 0:e.request)||void 0===a?void 0:a.url,statusCode:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.status,statusMessage:String(e),ttLogId:null!==(_=null!==(l=null===(c=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.headers)||void 0===c?void 0:c["x-tt-logid"])&&void 0!==l?l:null===(h=null===(f=null==e?void 0:e.response)||void 0===f?void 0:f.headers)||void 0===h?void 0:h["x-tt-logid"])&&void 0!==_?_:null===(m=null===(v=null==e?void 0:e.request)||void 0===v?void 0:v.headers)||void 0===m?void 0:m["x-tt-logid"],caller:"interceptors.response.error"}),Promise.reject(e)})),h.interceptors.request.use((function(e){return e.headers&&!e.headers.ignoreReferer&&(e.headers.Referer="developer.toutiao.com"),e})),t.setEnvFunction=function(e){p=e},t.setSlardarInstance=function(e){d=e},t.setJestMock=function(e){Object.entries(e).forEach((function(e){var t=o(e,2),n=t[0],r=t[1];h[n]=r}))}},1618:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.filterFile=void 0;var o=r(n(6928)),i=n(1189),a=r(n(76));t.filterFile=function(e,t){e=e.replace(/\\/g,"/");var n=t.ignore||[],r=t.include||[];if("project.config.json"===e)return!1;var c=function(t){switch(t.type){case i.PACK_TYPE.FILE:return e===u(t.value);case i.PACK_TYPE.FOLDER:var n=t.value;return n.endsWith("/")&&(n=n.slice(0,-1)),s(u(n))&&(0,a.default)("".concat(u(n),"/**/*"))(e);case i.PACK_TYPE.GLOB:return(0,a.default)(u(t.value))(e);case i.PACK_TYPE.REGEXP:return new RegExp(t.value).test(e);case i.PACK_TYPE.PREFIX:return o.default.basename(e).startsWith(t.value);case i.PACK_TYPE.SUFFIX:return o.default.basename(e).endsWith(t.value);default:return!0}};return!r.some(c)&&n.some(c)};var s=function(e){return e.split("/").every((function(e){return".."!==e&&"."!==e}))},u=function(e){return e.startsWith("/")?e.slice(1):e}},240:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubPath=t.isNeedForceUpdate=t.versionStringCompare=t.retryTask=t.sleep=t.waitUntil=t.parseJson=void 0;var a=i(n(6928));function s(e){return new Promise((function(t){return setTimeout(t,e)}))}t.parseJson=function(e,t){void 0===t&&(t={});try{return JSON.parse(e)}catch(e){return console.error("[parseJson]",e),t}},t.waitUntil=function(e,t,n){void 0===t&&(t=3e3),void 0===n&&(n=500);var r=Date.now(),o=!1;return new Promise((function(i){var a=setInterval((function(){(o||Date.now()-r>=t)&&(i(o),clearInterval(a));try{e().then((function(e){o=e})).catch((function(e){console.error("[waitUntil/task/promise]".concat(e.message))}))}catch(e){console.error("[waitUntil/task]".concat(e.message))}}),n)}))},t.sleep=s,t.retryTask=function(e,t,n){return void 0===t&&(t=10),void 0===n&&(n=1e3),r(this,void 0,void 0,(function(){var i,a,u,c=this;return o(this,(function(l){switch(l.label){case 0:i=0,a=function(){return r(c,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return"function"!=typeof n?[3,2]:[4,n()];case 1:return e.sent(),[3,4];case 2:return[4,s(n)];case 3:e.sent(),e.label=4;case 4:return[2]}}))}))},l.label=1;case 1:return i<t?1==++i?[3,3]:[4,a()]:[3,7];case 2:l.sent(),l.label=3;case 3:return l.trys.push([3,5,,6]),[4,e()];case 4:return l.sent(),[2];case 5:if(u=l.sent(),i===t)throw u;return console.error("task failed, will retry"),[3,6];case 6:return[3,1];case 7:return[2]}}))}))},t.versionStringCompare=function(e,t){void 0===e&&(e=""),void 0===t&&(t="");for(var n=e.split("-")[0].trim().split("."),r=t.split("-")[0].trim().split("."),o=Math.max(n.length,r.length),i=0,a=0;a<o;a++){var s=n.length>a?n[a]:"0",u=isNaN(Number(s))?s.charCodeAt(0):Number(s),c=r.length>a?r[a]:"0",l=isNaN(Number(c))?c.charCodeAt(0):Number(c);if(u<l){i=-1;break}if(u>l){i=1;break}}return i},t.isNeedForceUpdate=function(e){var n=e.curVersion,r=e.updateVersion,o=e.date,i=e.appType;if(r&&-1===(0,t.versionStringCompare)(n,r)){var a=new Date(o),s=new Date(a.getTime()-12096e5),u=new Date,c=a.getFullYear(),l=a.getMonth()+1,p=a.getDate(),d="".concat(c," 年 ").concat(l," 月 ").concat(p," 日");return u>=a?{message:"当前版本 ".concat(n," 在 ").concat(d,"后已不再提供服务,为了给你提供更好的体验,请将 ").concat(i," 升级至最新版本,感谢你的理解与支持。"),type:"force"}:u>=s?{message:"为了给你提供更好的体验,请在 ".concat(d,"前将 ").concat(i," 升级至最新版本。逾期未升级,我们将无法继续提供服务,感谢你的理解与支持。"),type:"warn"}:null}return null},t.isSubPath=function(e,t){var n=a.default.relative(e,t);return n&&!n.startsWith("..")}},1497:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setAppConfig=t.getToken=void 0;var u,c=a(n(120)),l=s(n(6928)),p=n(1831),d=s(n(4351)),f=l.default.join((0,p.getCliDefaultStoragePath)(),"appConfig.json");function h(){var e;try{var t=c.readJsonSync(f);e=(0,p.isObject)(t)?t:{}}catch(t){e={}}return e}t.getToken=function(e){var t;return u||(u=h()),null===(t=u[e])||void 0===t?void 0:t.token},t.setAppConfig=function(e){e.appid?(0,p.isObject)(e.config)?(c.ensureFileSync(f),(u=h())[e.appid]=r(r({},(0,p.isObject)(u[e.appid])?u[e.appid]:{}),e.config),c.writeJSONSync(f,u)):d.default.error("Config must be an object."):d.default.error("Appid is required to set app config.")}},378:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.audit=t.getAuditHostsList=void 0;var s=n(3357),u=a(n(6245)),c=n(7497),l=n(1441);function p(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a,u,l,p;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,p={},[4,(0,c.getLogInfoHeaders)(t)];case 1:p.headers=i.sent(),n=p,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://microapp.bytedance.com/platform_api/v1/app/".concat(t,"/code_manager/versions"),n)];case 3:return r=i.sent(),o=r.data||{},a=o.error,u=o.message,l=o.data,a?[2,{success:!1,msg:u||"Get host failed,please check if your appid is valid",data:l}]:[2,{success:!0,msg:"",data:l}];case 4:return[2,{success:!1,msg:i.sent().message,data:null}];case 5:return[2]}}))}))}function d(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a,u,l,p;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,p={},[4,(0,c.getLogInfoHeaders)(t)];case 1:p.headers=i.sent(),n=p,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://microapp.bytedance.com/platform_api/app/publish/v2/".concat(t,"/audit/host"),n)];case 3:return r=i.sent(),o=r.data||{},a=o.error,u=o.message,l=o.data,a?[2,{success:!1,msg:u||"Get host failed,please check if your appid is valid",hostList:{},preHost:[]}]:l.hostList||l.preHost?[2,{success:!0,hostList:l.hostList,preHost:l.preHost}]:[2,{success:!1,msg:"You do not have permission to audit app",hostList:{},preHost:[]}];case 4:return[2,{success:!1,msg:i.sent().message,hostList:{},preHost:[]}];case 5:return[2]}}))}))}function f(e,t){return o(this,void 0,void 0,(function(){var n,o,a,l,p,d,f;return i(this,(function(i){switch(i.label){case 0:for(a in n="https://microapp.bytedance.com/api/v2/app/".concat(t,"/audit"),o=new u.default,e)o.append(a,e[a]);return f={},p=[{}],[4,(0,c.getLogInfoHeaders)(t)];case 1:f.headers=r.apply(void 0,[r.apply(void 0,p.concat([i.sent()])),o.getHeaders()]),l=f,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.put(n,o,l)];case 3:if((d=i.sent()).data&&0===d.data.error)return[2,void 0];throw new Error(d.data.message);case 4:throw i.sent();case 5:return[2]}}))}))}t.getAuditHostsList=function(e){return o(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:return[4,d({appid:e.appid})];case 1:if(t=i.sent(),n=t.success,r=t.msg,o=t.hostList,n)return[2,Object.keys(o)];throw new Error(r)}}))}))},t.audit=function(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a,s,u;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,n=e.host,r=e.autoPublish,o=e.channel,[4,p({appid:t})];case 1:return a=i.sent(),s=a.success,u=a.msg,[4,(0,l.checkChannel)(t,o)];case 2:if(i.sent(),!s)throw new Error(u);return[4,f({auto_publish:r?1:0,host_chosen:n.toString(),notifyContent:"",test_report:"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1",versionTag:JSON.stringify({Tag:o})},t)];case 3:return i.sent(),[2]}}))}))}},2655:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.cliAuth=void 0;var a=i(n(4731)),s=i(n(9669)),u=i(n(4351)),c=n(1831),l=n(5568);function p(e){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return e.mobile?[2,"mobile"]:e.email?[2,"email"]:[4,s.default.prompt([{name:"action",type:"list",message:"Please choose login type:",choices:[{name:"Mobile",value:"mobile"},{name:"Email",value:"email"},{name:"Cancel",value:!1}]}])];case 1:return[2,t.sent().action]}}))}))}t.cliAuth=function(e){return r(this,void 0,void 0,(function(){var t,n,r,i;return o(this,(function(o){switch(o.label){case 0:return[4,p(e)];case 1:return(t=o.sent())?((0,c.clearConsole)(a.default.bold.green("".concat("mobile"===t?"📱":" 📧"," Sign in with ").concat(t))),[4,s.default.prompt([{name:"inputRet",type:"input",message:"The ".concat("mobile"===t?"mobile number":"email",":")}])]):[2];case 2:return n=o.sent().inputRet,"mobile"!==t?[3,6]:[4,(0,l.sendVerificationCodeToPhone)({phoneNumber:n,partner:null==e?void 0:e.partner})];case 3:return o.sent(),u.default.info("🎉 Send verification code success"),[4,s.default.prompt([{name:"code",type:"input",message:"The verification code:"}])];case 4:return r=o.sent().code,[4,(0,l.loginByPhone)({phoneNumber:n,code:r,partner:null==e?void 0:e.partner})];case 5:return o.sent(),[3,9];case 6:return[4,s.default.prompt([{name:"pwd",type:"password",message:"The password:"}])];case 7:return i=o.sent().pwd,[4,(0,l.loginByEmail)({email:n,password:i,partner:null==e?void 0:e.partner})];case 8:o.sent(),o.label=9;case 9:return u.default.info("🎉 Login success"),[2]}}))}))}},2539:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getConfig=t.setConfig=void 0;var s=n(3357),u=n(8950),c=a(n(58)),l=i(n(120)),p=i(n(6928)),d=n(7016),f=a(n(4351)),h=n(1831),_=(0,h.getCliDefaultStoragePath)(),v=p.join(_,"config.json"),m={proxy:null,tempFilePath:null,storagePath:_,url:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/microapp/make_schema",compileProgress:"https://microapp.bytedance.com/api/v1/app/${appid}/compile_progress",preview:"https://developer.toutiao.com/api/v2/app/${appid}/preview",upload:"https://developer.toutiao.com/api/v2/app/${appid}/testing",check:"https://developer.toutiao.com/api/developer/ide/v1/microapp/query_check_progress",emailLogin:"https://developer.toutiao.com/passport/web/email/login/",mobileLogin:"https://developer.toutiao.com/passport/web/sms_login/",sendLoginCode:"https://developer.toutiao.com/passport/web/send_code/",getUserInfo:"https://microapp.bytedance.com/platform_api/v1/app/microappadmincomm/getUserInfo"},interactGameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/v1/compile_progress",preview:"https://developer.toutiao.com/api/developer/ide/v1/preview",upload:"https://developer.toutiao.com/api/developer/ide/v1/testing"},microgameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/microgame/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/microgame/v1/compile_progress?appid=",preview:"https://developer.toutiao.com/api/developer/ide/microgame/v1/preview?appid=",upload:"https://developer.toutiao.com/api/developer/ide/microgame/v1/testing?appid=",versionInfo:"https://developer.toutiao.com/api/developer/ide/microgame/v1/versions?appid=",sizeLimit:"https://developer.toutiao.com/api/developer/ide/microgame/v1/get_package_size_limit?appid=",unityCompileProgress:"https://developer.toutiao.com/api/developer/ide/microgame/v1/sc_compile_progress",unityPreview:"https://developer.toutiao.com/api/developer/ide/microgame/v1/sc_preview",getChannelNumber:"https://developer.toutiao.com/api/developer/ide/microgame/v1/get_exist_test_version"},env:{type:"online",channel:""},allowReportEvent:!0},E=(0,c.default)(m);if((0,h.isCli)()&&(l.existsSync(v)?((E=l.readJSONSync(v)).url.emailLogin=m.url.emailLogin,E.url.mobileLogin=m.url.mobileLogin,E.url.sendLoginCode=m.url.sendLoginCode,E.url.getUserInfo=m.url.getUserInfo):(l.ensureFileSync(v),l.writeJsonSync(v,m))),!(0,h.isIDE)()){var g=function(){var e=E.proxy,t=e?new d.URL(e):null;return{env:E.env,proxy:{host:t?t.hostname:null,port:t?t.port:null}}};(0,s.setEnvFunction)(g),(0,u.setEnvFunctionForProject)(g)}t.setConfig=function(e,t){if(void 0===t&&(t=!1),t)E=(0,c.default)(m),f.default.info("setConfig "+JSON.stringify(m,null,2));else{for(var n in e)"object"==typeof e[n]?E[n]=Object.assign(E[n],(0,c.default)(e[n])):E[n]=(0,c.default)(e[n]);f.default.info("setConfig "+JSON.stringify(e))}(0,h.isCli)()&&l.writeJsonSync(v,E)},t.getConfig=function(){return Object.assign({},E)}},1553:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProject=void 0;var c=n(3357),l=i(n(120)),p=i(n(6928)),d=u(n(6321)),f=n(5602),h=u(n(4351)),_=n(1831);function v(e,t){return a(this,void 0,void 0,(function(){var n=this;return s(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,o){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n=p.join(t,"template.zip"),i=l.createWriteStream(n),[4,c.AxiosInstance.get(e,{responseType:"stream"})];case 1:return a.sent().data.pipe(i),i.on("finish",(function(){l.createReadStream(n).pipe(d.default.Extract({path:t})).on("close",(function(){l.unlinkSync(n),r()})).on("error",(function(e){l.unlinkSync(n),o(e)}))})).on("error",(function(e){o(e)})),[2]}}))}))}))];case 1:return[2,r.sent()]}}))}))}t.createProject=function(e){return a(this,void 0,void 0,(function(){var t,n,r,o,i,a,u,c;return s(this,(function(s){switch(s.label){case 0:return t=e.projectName,n=e.force,r=e.template,o=e.plugin,i=!0===o,(a=e.type)||(a="js"),(u=e.targetDir)||(u=p.resolve(process.cwd(),t||".")),l.existsSync(u)?n?[4,l.remove(u)]:[3,2]:[3,3];case 1:return s.sent(),h.default.info("Remove ".concat(u)),[3,3];case 2:throw new Error("".concat(u," Exist"));case 3:return l.ensureDirSync(u),i?[4,v(f.TEMPLATE_PLUGIN_DOWNLOAD_URL,u)]:[3,6];case 4:return s.sent(),[4,(0,_.createProjectConfigFile)(t,u,!1,i)];case 5:return s.sent(),[3,11];case 6:return"rich"!==r?[3,8]:(c="js"===a?f.TEMPLATE_DOWNLOAD_URL:f.TS_TEMPLATE_DOWNLOAD_URL,h.default.info("⚙️ Installing template. This might take a while...."),[4,v(c,u)]);case 7:return s.sent(),[3,11];case 8:return"empty"!==r?[3,11]:[4,l.copy(p.join((0,_.getPackageRoot)(),"./templates/".concat("js"===a?"empty":"empty-ts")),u)];case 9:return s.sent(),[4,(0,_.createProjectConfigFile)(t,u,"ts"===a,i)];case 10:s.sent(),s.label=11;case 11:return h.default.info("🎉 Successfully created project ".concat(t)),[2]}}))}))}},5568:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.logout=t.checkSession=t.loginByPhone=t.sendVerificationCodeToPhone=t.loginByEmail=void 0;var s=n(3374),u=n(3357),c=a(n(3480)),l=n(7497),p=a(n(4351)),d=n(1831),f=n(2539),h=n(7004),_=n(7290),v=function(e){return e?{aid:337201}:{aid:1365}};function m(e){return o(this,void 0,void 0,(function(){var t,n,o,a,s,l,p,d;return i(this,(function(i){switch(i.label){case 0:t=e.type,n=e.params,o=e.partner,a=(0,f.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,u.AxiosInstance.post("mobile"===t?a.url.mobileLogin:a.url.emailLogin,c.default.stringify(r(r({},v(o)),n)),{headers:{"content-type":"application/x-www-form-urlencoded","ignore-channel":!0}})];case 2:return s=i.sent(),l=s.data,p=s.headers,[2,{success:d="success"===l.message,cookies:p["set-cookie"],msg:d?"":l.data.description||"Login failed, please try again",userId:l.data.user_id_str}];case 3:return[2,{success:!1,msg:i.sent().message,cookies:null,userId:""}];case 4:return[2]}}))}))}function E(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return t=(0,f.getConfig)(),e?[3,2]:[4,(0,l.getUserCookies)()];case 1:e=i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,u.AxiosInstance.get(t.url.getUserInfo,{params:{},headers:{Cookie:e}})];case 3:return n=i.sent().data,r=!n.error,o=void 0,r&&(a=n.data,o={username:a.name||"",avatar:a.avatar||"",developerId:a.developerId||"",mobile:a.mobile||"",email:a.email||"",auditStatus:a.auditStatus||0,uid:a.uId}),[2,{success:r,userData:o,msg:r?"":"Login fail, please try later"}];case 4:return[2,{success:!1,msg:i.sent().message}];case 5:return[2]}}))}))}function g(e,t){return void 0===t&&(t=!1),o(this,void 0,void 0,(function(){var n,o,a;return i(this,(function(i){switch(i.label){case 0:n=(0,f.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,u.AxiosInstance.get(n.url.sendLoginCode,{params:r(r({},v(t)),{type:24,mobile:e}),headers:{"User-Agent":"bytedanceide"}})];case 2:return o=i.sent().data,[2,{success:a="success"===o.message,msg:a?"":"Get verification code fail, please try later"}];case 3:return[2,{success:!1,msg:i.sent().message}];case 4:return[2]}}))}))}t.loginByEmail=function(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a,u,c,p,f,v,g,y;return i(this,(function(i){switch(i.label){case 0:return t=e.email,n=e.password,r=e.dontSaveCookie,o=e.partner,(0,d.validateEmail)(t),[4,m({type:"email",params:{mix_mode:1,email:(0,d.mixEncode)(t),password:(0,d.mixEncode)(n)},partner:o})];case 1:if(a=i.sent(),u=a.success,c=a.msg,p=a.cookies,f=a.userId,!u||!p)throw new s.LoginError(c);return o?[3,3]:[4,E(p)];case 2:if(v=i.sent(),g=v.success,y=v.msg,!g)throw new s.LoginError(y);i.label=3;case 3:return r||(0,l.saveUserCookies)(p,f),h.CliMonitor.updateCommonParams({userId:f}),_.loginInfo.setLoginInfo({type:"email",partner:o}),[2,p]}}))}))},t.sendVerificationCodeToPhone=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(o){switch(o.label){case 0:return t=e.phoneNumber,n=e.partner,(0,d.validatePhoneNumber)(t),[4,g(t,n)];case 1:if(!(r=o.sent()).success)throw new s.LoginError(r.msg);return[2]}}))}))},t.loginByPhone=function(e){return o(this,void 0,void 0,(function(){var t,n,r,o,a,u,c,p,f,v,g,y;return i(this,(function(i){switch(i.label){case 0:return t=e.phoneNumber,n=e.code,r=e.dontSaveCookie,o=e.partner,(0,d.validatePhoneNumber)(t),(0,d.validateVerificationCode)(n),[4,m({type:"mobile",params:{mobile:t,code:n},partner:o})];case 1:if(a=i.sent(),u=a.success,c=a.msg,p=a.cookies,f=a.userId,!u||!p)throw new s.LoginError(c);return o?[3,3]:[4,E(p)];case 2:if(v=i.sent(),g=v.success,y=v.msg,!g)throw new s.LoginError(y);i.label=3;case 3:return r||(0,l.saveUserCookies)(p,f),h.CliMonitor.updateCommonParams({userId:f}),_.loginInfo.setLoginInfo({type:"mobile",partner:null==e?void 0:e.partner}),[2,p]}}))}))},t.checkSession=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:e={isValid:!1,errMsg:null,username:void 0},i.label=1;case 1:return i.trys.push([1,3,,4]),[4,E()];case 2:return t=i.sent(),n=t.success,r=t.msg,o=t.userData,e.isValid=n,e.errMsg=r,e.username=null==o?void 0:o.username,[3,4];case 3:return a=i.sent(),e.errMsg=a.message,[3,4];case 4:return e.isValid?p.default.info("✅ 已登录(Logged in with ".concat(e.username,")")):p.default.info("❌ 未登录(Not logged in, reason: ".concat(e.errMsg,")")),[2,e]}}))}))},t.logout=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return(0,l.removeUserCookies)(),_.loginInfo.setLoginInfo({type:"",partner:!1}),h.CliMonitor.updateCommonParams({userId:""}),p.default.info("✅ Logout success"),[2]}))}))}},3128:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAppVersions=t.fetchMeta=t.isRealToyId=t.getMeta=void 0;var a=n(3374),s=n(3357),u=n(7497),c=n(1831);function l(e){var t=e.appid,n=e.isGame,r=void 0!==n&&n;return o(this,void 0,void 0,(function(){var e,n,o,c;return i(this,(function(i){switch(i.label){case 0:return e=function(e){return"https://developer.toutiao.com/api/apps/v3/meta?appid=".concat(e,"&aid=13&version=current&ttcode=").concat("OVCNW/U0UREwv0sHdY9Rm16vBgGrCQIBOWurUCmJ1H6d/2XHLKeOYTYfEJIEeC0AOCwBZAR2j34C4tFN7Nqfq9tHVEpM4OuJM2b8qz0INtUs1qLhKFOtnGa9/Ey0WW86GGocJk074eP72MMhzNmePzaTQzXwn/eqEq4GHwyF2Tg=","&aid=1365")}(t),[4,(0,u.getLogInfoHeaders)(t)];case 1:return n=i.sent(),o={},r&&(e="https://developer.toutiao.com/api/developer/ide/v1/version_info",o.app_id=t,o.stage="current"),[4,s.AxiosInstance.get(e,{headers:n,params:o})];case 2:return(c=i.sent().data).error&&0!==c.error||c.code&&0!==c.code?[4,Promise.reject(new a.MetaError(c.data))]:[3,4];case 3:return[2,i.sent()];case 4:return[2,c]}}))}))}t.getMeta=function(e){var t,n;return o(this,void 0,void 0,(function(){var r,o,a,s;return i(this,(function(i){switch(i.label){case 0:return r=e.appid,o=e.isGame,a=void 0!==o&&o,(0,c.validateAppId)(r),[4,l(e)];case 1:return s=i.sent(),a?[2,{version:null===(t=s.data)||void 0===t?void 0:t.current_version}]:[2,{version:null===(n=s.data)||void 0===n?void 0:n.version}]}}))}))},t.isRealToyId=function(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,l({appid:e})];case 1:return[2,!!(t=n.sent().data)&&16===t.tech_type]}}))}))},t.fetchMeta=l,t.getAppVersions=function(e,t){return void 0===t&&(t=!1),o(this,void 0,void 0,(function(){var n,o,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),[4,(0,u.getLogInfoHeaders)(e)];case 1:return n=i.sent(),o={},t&&(o={is_plugin:1}),[4,s.AxiosInstance.get("https://developer.toutiao.com/api/developer/ide/v1/microapp/versions",{headers:n,params:r({app_id:e},o)})];case 2:return(c=i.sent().data).code&&0!==c.code?[4,Promise.reject(new a.MetaError(c.msg))]:[3,4];case 3:return[2,i.sent()];case 4:return[2,c.data];case 5:return i.sent(),[2,{audit_version:"0.0.0"}];case 6:return[2]}}))}))}},8641:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkChannel=t.getChannelLimit=t.projectToQRCode=t.upload=t.preview=void 0;var d=n(3374),f=n(3357),h=p(n(6245)),_=a(n(120)),v=a(n(6928)),m=p(n(746)),E=n(8852),g=n(130),y=n(7497),b=p(n(4351)),A=n(4334),O=n(3777),C=n(4794),w=n(1831),I=n(2539),S=n(2011),P=n(6928),R=n(9959),L=p(n(5063)),T=(0,w.getCliDefaultStoragePath)(),D=v.join(T,"preview.json"),N={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default"},x={preview:N,debug:N};if((0,w.isCli)())if(_.existsSync(D))try{x=_.readJSONSync(D)}catch(e){}else _.ensureFileSync(D),_.writeJsonSync(D,x);function j(e){var t,n,o,i;return s(this,void 0,void 0,(function(){var a,s,c,l,p,v,m,b,A,O,C,w,S,R,L,T,D,N,x,j,M,k,U,F,G,B,V;return u(this,(function(u){switch(u.label){case 0:return a=e.devAppid,s=e.projectPath,c=e.type,l=e.uploadVersion,p=e.uploadChangeLog,v=e.uploadNeedUploadSourcemap,m=e.localCompileVersion,b=e.extraCheckInfoJson,A=e.extraInfoJson,O=e.channel,C=e.supportSourcemap,S=new h.default,[4,(0,g.getSizeLimitConfig)(a)];case 1:return R=u.sent(),L=1024*R.subTotal*1024,[4,(0,E.folderToZipStream)(s,{whiteList:[],useTypeScript:!1},!0,L)];case 2:return T=u.sent(),D=(0,I.getConfig)(),N=f.AxiosInstance.put,"preview"!==c?[3,3]:(w=D.microgameUrl.preview+a,C&&S.append("is_debug","1"),[3,5]);case 3:return[4,H(a,O)];case 4:u.sent(),w=D.microgameUrl.upload+a,S.append("version",l),S.append("intro",p),S.append("need_upload_sourcemap",String(!!v)),S.append("extra_check_info_json",b),O&&S.append("tag",O),u.label=5;case 5:return[4,_.readJson((0,P.join)(s,"game.json"))];case 6:return x=u.sent(),j=null!==(t=x.subPackages)&&void 0!==t?t:x.subpackages,S.append("subpackage",String(Boolean(null==j?void 0:j.length))),S.append("local_compile_version",null!=m?m:"4.0.4-rc.17.ide.2.cli"),S.append("source",T,{filename:"source.zip"}),A&&S.append("extra_info_json",A),F=N,G=[w,S],B={},V={},[4,(0,y.getUserCookies)()];case 7:return[4,F.apply(void 0,G.concat([(B.headers=r.apply(void 0,[(V.Cookie=u.sent(),V),S.getHeaders()]),B.maxBodyLength=L,B)]))];case 8:if(M=u.sent(),k=M.data,U=M.headers,0===k.error||0===k.code)return[2,{metrics:null!==(n=k.performance_metrics)&&void 0!==n?n:{},logId:null!==(o=null==U?void 0:U["x-tt-logid"])&&void 0!==o?o:""}];throw new d.UploadError(null!==(i=k.message)&&void 0!==i?i:k.msg,k.error)}}))}))}function M(e){return s(this,void 0,void 0,(function(){var t,n,r,o;return u(this,(function(i){switch(i.label){case 0:return r={},o={},[4,(0,y.getUserCookies)()];case 1:return r.headers=(o.Cookie=i.sent(),o),t=r,n=(0,I.getConfig)().microgameUrl.compileProgress+e,[4,f.AxiosInstance.get(n,t).then((function(e){var t,n,r,o=e.data||{},i=o.error,a=o.status,s=o.message;return 1===i?{success:!1,done:!1,error:i,msg:s,errLink:null!==(t=e.data.err_link)&&void 0!==t?t:"",passJson:{}}:{success:!0,done:0===i&&2===a,error:i,msg:"",metrics:null!==(n=e.data.performance_metrics)&&void 0!==n?n:{},errLink:null!==(r=e.data.err_link)&&void 0!==r?r:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,i.sent()]}}))}))}function k(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,r){var o=setInterval((function(){return s(t,void 0,void 0,(function(){var t,i,a,s,c,l,p,f,h;return u(this,(function(u){switch(u.label){case 0:return[4,M(e)];case 1:return t=u.sent(),i=t.success,a=t.msg,s=t.error,c=t.errLink,l=t.metrics,p=t.done,f=t.passJson,i||(clearInterval(o),h=new d.CompileError(a,c,s),r(h)),p&&(clearInterval(o),n({metrics:null!=l?l:{},passJson:f})),[2]}}))}))}),1e3)}))];case 1:return[2,n.sent()]}}))}))}function U(e,t){return s(this,void 0,void 0,(function(){var n,r,o,i,a,s,l,p,d;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),n=["**/*.js"],[4,(0,L.default)(n,{cwd:t,onlyFiles:!0,ignore:["**/node_modules/**"]})];case 1:r=u.sent(),o=[],i=function(n){var r=v.join(t,n);try{_.readFileSync(r,"utf-8").split("\n").forEach((function(t,r){t.includes(e)&&o.push("".concat(n,":").concat(r+1))}))}catch(e){console.error("[precheck/code search] 文件读取错误",e)}};try{for(a=c(r),s=a.next();!s.done;s=a.next())l=s.value,i(l)}catch(e){p={error:e}}finally{try{s&&!s.done&&(d=a.return)&&d.call(a)}finally{if(p)throw p.error}}return[2,o];case 2:return u.sent(),[2,[]];case 3:return[2]}}))}))}function F(e){var t,n,o,i,a,p,_=e.appid,v=e.extraCheckInfoJson,m=e.zipStream,E=e.updateStatus,g=e.setCheckResult,b=e.projectPath,A=e.isNewPlatform;return s(this,void 0,void 0,(function(){var e,s,O,C,w,I,S,P,R,L,T,D,N,x,j,M,k,F,G,B,H,V,W,q,J;return u(this,(function(u){switch(u.label){case 0:if(e=new h.default,v)return[3,11];if(!b)return[3,9];s=[["side_bar","navigateToScene"],["add_short_cut","addShortcut"],["subscribe_message","requestSubscribeMessage"],["aweme_pay","openAwemeCustomerService"],["normal_pay","requestGamePayment"],["interstitial_ad","createInterstitialAd"],["reward_video_ad","createRewardedVideoAd"]],O={code_use:{}},u.label=1;case 1:u.trys.push([1,6,7,8]),C=c(s),w=C.next(),u.label=2;case 2:return w.done?[3,5]:(I=l(w.value,2),S=I[0],[4,U(I[1],b)]);case 3:P=u.sent(),O.code_use[S]={use:P.length>0,path:P},u.label=4;case 4:return w=C.next(),[3,2];case 5:return[3,8];case 6:return R=u.sent(),F={error:R},[3,8];case 7:try{w&&!w.done&&(G=C.return)&&G.call(C)}finally{if(F)throw F.error}return[7];case 8:return e.append("extra_check_info_json",JSON.stringify(O)),[3,10];case 9:return[2,!1];case 10:return[3,12];case 11:e.append("extra_check_info_json",v),u.label=12;case 12:return m&&e.append("source",m,{filename:"source.zip"}),D=(T=f.AxiosInstance).request,B={url:"https://developer.toutiao.com/api/developer/ide/microgame/v1/check",method:"put",data:e,params:{appid:_}},H={},[4,(0,y.getUserCookies)()];case 13:return[4,D.apply(T,[(B.headers=r.apply(void 0,[(H.Cookie=u.sent(),H),e.getHeaders()]),B)])];case 14:if(4===(L=u.sent().data).status){console.error("预检审核失败,失败原因");try{for(N=c(null!==(t=L.data.check_list)&&void 0!==t?t:[]),x=N.next();!x.done;x=N.next())4===(null==(k=x.value)?void 0:k.status)&&console.error("error: ",null==k?void 0:k.message),3===(null==k?void 0:k.status)&&console.info("warning: ",null==k?void 0:k.message)}catch(e){V={error:e}}finally{try{x&&!x.done&&(W=N.return)&&W.call(N)}finally{if(V)throw V.error}}return null==A||A(null!==(n=null==L?void 0:L.is_game_migrate)&&void 0!==n&&n),null==E||E({upload:1,check:L.data.check_list?L.status:2,compile:1}),null==g||g({status:L.data.check_list?L.status:2,result:null!==(o=L.data.check_list)&&void 0!==o?o:[]}),[2,!1]}if(3===L.status)try{for(j=c(null!==(i=L.data.check_list)&&void 0!==i?i:[]),M=j.next();!M.done;M=j.next())3===(null==(k=M.value)?void 0:k.status)&&console.info("warning: ",null==k?void 0:k.message)}catch(e){q={error:e}}finally{try{M&&!M.done&&(J=j.return)&&J.call(j)}finally{if(q)throw q.error}}else if(0===L.status)throw new d.UploadError(L.message);return null==A||A(null!==(a=null==L?void 0:L.is_game_migrate)&&void 0!==a&&a),null==E||E({upload:1,check:L.data.check_list?L.status:2,compile:1}),null==g||g({status:L.data.check_list?L.status:2,result:null!==(p=L.data.check_list)&&void 0!==p?p:[]}),[2,!0]}}))}))}function G(e){var t,n,r,o,i;return s(this,void 0,void 0,(function(){var a,s,c,l,p,f,h,v,E,y,I,P,L,T,M,U,G,B,H,V,W,q,J,z,$,K,Q,Y,X,Z,ee,te;return u(this,(function(u){switch(u.label){case 0:return[4,(0,C.isCliNeedForceUpdate)("microgame")];case 1:return u.sent(),a={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},s=e.project,c=e.page,l=e.qrcode,p=e.cache,f=e.uploadOptions,h=e.extraInfoJson,v=e.localCompileVersion,E=e.ideConfig,y=e.debug,I=e.uploadCache,P=e.supportSourcemap,L=e.enableHotRestartCache,T=e.setCheckResult,M=e.updateStatus,U=e.isNewPlatform,G=s.path,[4,(0,R.getProjectHash)(G,!0).catch((function(){return""}))];case 2:return B=u.sent(),H=f?"upload":"preview",V=!1,q=x[W=y?"debug":"preview"]||N,c&&!c.scene&&(c.scene="990001"),p&&((0,w.isCli)()||(null==E?void 0:E.previewScene)===q.previewScene)&&B&&q.hash===B&&q.shortUrl&&q.expireTime>Date.now()/1e3?(a.shortUrl=q.shortUrl,a.expireTime=q.expireTime,a.originSchema=q.originSchema,a.useCache=!0,b.default.info("项目文件无变动,使用缓存"),V=!0,[3,17]):[3,3];case 3:return(0,A.addNodeToMetrics)(a.metrics,"compileCreate"),[4,(0,w.getProjectConfig)(G)];case 4:return[4,(J=u.sent()).getAppid()];case 5:return z=u.sent(),[4,(0,g.validateAppId)(z)];case 6:return u.sent(),(0,A.addFieldToMetrics)(a.metrics,"appId",z),$=b.default.loading("正在准备上传..."),I&&B&&q.hash===B&&q.shortUrl&&q.expireTime>Date.now()/1e3?[3,14]:[4,(0,g.verifyPkgSize)(G,J)];case 7:if(K=u.sent())throw new d.ProjectError(K);return"upload"!==H||(0,w.isIDE)()?[3,9]:[4,(0,S.getMeta)(z)];case 8:if((Q=u.sent())&&f&&1===(0,m.default)(Q,f.version))throw new d.UploadError("".concat(f.version," is smaller than ").concat(Q,"(online version)"));u.label=9;case 9:return"upload"!==H?[3,11]:[4,F({appid:z,extraCheckInfoJson:null!==(t=null==f?void 0:f.extraCheckInfoJson)&&void 0!==t?t:"",updateStatus:M,setCheckResult:T,projectPath:G,isNewPlatform:U})];case 10:if(!u.sent()){if((0,w.isCli)())throw new d.UploadError("审核预检失败");return[2]}u.label=11;case 11:return $.text="正在上传中...",(0,A.addNodeToMetrics)(a.metrics,"IDERequest"),[4,j({devAppid:z,projectPath:G,type:H,uploadChangeLog:null==f?void 0:f.changeLog,uploadVersion:null==f?void 0:f.version,uploadNeedUploadSourcemap:null==f?void 0:f.needUploadSourcemap,extraCheckInfoJson:null!==(n=null==f?void 0:f.extraCheckInfoJson)&&void 0!==n?n:"",extraInfoJson:h,localCompileVersion:v,supportSourcemap:P,channel:null==f?void 0:f.channel})];case 12:return Y=u.sent(),(0,A.addFieldToMetrics)(a.metrics,"logId",Y.logId),$.text="查询编译进度中...",[4,k(z)];case 13:X=u.sent(),a.metrics=(0,A.mergeMetrics)(a.metrics,Y.metrics,X.metrics),a.passJson=X.passJson,(0,A.addNodeToMetrics)(a.metrics,"IDEReceiveResponse"),u.label=14;case 14:return null===(null==l?void 0:l.format)?[3,16]:($.text="生成二维码中...",[4,(0,O.makeSchema)({devAppid:z,extAppid:"",startPage:c.path,query:c.query,scene:c.scene,bdpLog:{launch_from:c.launchFrom,location:c.location},headers:{},ideConfig:E,qrcodeQuery:null==y?void 0:y.query,referrerInfo:c.referrerInfo,hotRestartHash:L&&B?B:"",type:H,uploadOptions:{version:null!==(r=null==f?void 0:f.version)&&void 0!==r?r:"",changeLog:null!==(o=null==f?void 0:f.changeLog)&&void 0!==o?o:"",needUploadSourcemap:null==f?void 0:f.needUploadSourcemap,needUploadCheck:!1,channel:null==f?void 0:f.channel}})]);case 15:Z=u.sent(),a.shortUrl=Z.shortUrl,a.expireTime=Z.expireTime,a.originSchema=Z.originSchema,u.label=16;case 16:(0,A.addNodeToMetrics)(a.metrics,"compileClose"),$.stop(),u.label=17;case 17:return"imageFile"!==(null==l?void 0:l.format)?[3,20]:l.output?[4,(0,O.toQRCodeFile)(a.shortUrl,l.output,l.bgColor)]:[3,19];case 18:ee=u.sent(),a.qrcodeFilePath=ee,b.default.info("二维码图片已存储到 ".concat(ee)),u.label=19;case 19:return[3,23];case 20:return"imageSVG"!==(null==l?void 0:l.format)?[3,23]:V&&q.qrcodeSVG?(a.qrcodeSVG=q.qrcodeSVG,[3,23]):[3,21];case 21:return te=a,[4,(0,O.toQRCodeSVG)(a.shortUrl)];case 22:te.qrcodeSVG=u.sent(),u.label=23;case 23:return function(e,t){x[t]=e,(0,w.isCli)()&&_.writeJsonSync(D,x)}({shortUrl:a.shortUrl,expireTime:a.expireTime,originSchema:a.originSchema,hash:B,previewScene:null!==(i=null==E?void 0:E.previewScene)&&void 0!==i?i:"default",qrcodeSVG:a.qrcodeSVG},W),[2,a]}}))}))}function B(e){var t;return s(this,void 0,void 0,(function(){var n,r,o,i;return u(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),i={},[4,(0,y.getLogInfoHeaders)(e)];case 1:return i.headers=a.sent(),n=i,r=null!==(t=(0,I.getConfig)().microgameUrl.getChannelNumber)&&void 0!==t?t:"https://developer.toutiao.com/api/developer/ide/microgame/v1/get_exist_test_version",[4,f.AxiosInstance.get("".concat(r,"?app_id=").concat(e),n)];case 2:return 0===(o=a.sent()).data.err_no?[2,o.data.data]:[2,null];case 3:throw a.sent(),new Error("获取通道限制失败");case 4:return[2]}}))}))}function H(e,t){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:if(!t)return[2];if(!/^[1-9]\d*$/.test(t))throw new d.UploadError("通道只能是大于0的整数");return[4,B(e)];case 1:if((n=r.sent().limit_num)&&Number(t)>=n)throw new d.UploadError("通道不能大于 ".concat(n-1));return[2]}}))}))}t.preview=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,G(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t,n;return s(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,G({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"",launchFrom:"",location:""},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap,extraCheckInfoJson:null!==(n=e.extraCheckInfoJson)&&void 0!==n?n:"",channel:e.channel},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig,setCheckResult:null==e?void 0:e.setCheckResult,updateStatus:null==e?void 0:e.updateStatus,isNewPlatform:null==e?void 0:e.isNewPlatform})];case 1:return[2,r.sent()]}}))}))},t.projectToQRCode=G,t.getChannelLimit=B,t.checkChannel=H},1724:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(8641),t),o(n(130),t),o(n(2011),t),o(n(4029),t)},2011:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getMicroappInfo=t.getMeta=void 0;var a=n(3374),s=n(3357),u=n(2539),c=n(7497),l=i(n(746));t.getMeta=function(e){return r(void 0,void 0,void 0,(function(){var t,n,r,i,p;return o(this,(function(o){switch(o.label){case 0:return t=(0,u.getConfig)().microgameUrl.versionInfo+e,p={},[4,(0,c.getUserCookies)()];case 1:return p.Cookie=o.sent(),n=p,[4,s.AxiosInstance.get(t,{headers:n})];case 2:return(r=o.sent().data).error&&0!==r.error||r.error&&0!==r.code?[4,Promise.reject(new a.MetaError(r.message))]:[3,4];case 3:return[2,o.sent()];case 4:return[2,(i=[r.audit_version,r.gray_version,r.online_version].filter(Boolean).sort(l.default))[i.length-1]]}}))}))},t.getMicroappInfo=function(e){return r(void 0,void 0,void 0,(function(){var t,n,r,i,a,u,l;return o(this,(function(o){switch(o.label){case 0:return r={},[4,(0,c.getUserCookies)()];case 1:return r.Cookie=o.sent(),t=r,[4,(0,s.AxiosInstance)({url:"https://developer.open-douyin.com/bff_api/app/setting/v2/".concat(e,"/microappinfoservice/getMicroappInfo"),params:{appId:e},headers:t,timeout:2e4})];case 2:return n=o.sent(),[2,null!==(l=null===(u=null===(a=null===(i=n.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.appInfo)||void 0===u?void 0:u.techType)&&void 0!==l?l:null]}}))}))}},4029:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.unityCli=void 0;var s,u=n(3357),c=a(n(6245)),l=n(7497),p=a(n(120)),d=a(n(6928)),f=n(2011),h=a(n(4351)),_=n(2539),v=n(3374),m=n(3777),E=n(1831),g=n(1562);!function(e){e.ONLY_ANDROID_NATIVE="0",e.ANDROID_NATIVE_AND_IOS_WEBGL="1",e.BOTH_WEBGL="2",e.ONLY_ANDROID_WEBGL="3",e.ONLY_ANDROID_INSTANT_GAME="4",e.ANDROID_INSTANT_GAME_AND_IOS_WEBGL="5"}(s||(s={}));var y={0:"队列中",1:"任务已被占用,待执行",2:"构建IL2CPP动态库中",3:"IL2CPP动态库构建完成",4:"从TOS下载文件",5:"打包WebGL",6:"Apk分包",7:"上传文件到TOS",8:"修改sc-config meta配置",9:"发布版本到抖音开放平台",99:"环境准备完成,等待执行",100:"发布成功","-1":"发布失败","-2":"IL2CPP动态库构建失败","-4":"TOS文件下载失败","-5":"打包WebGL失败","-6":"Apk分包","-7":"上传文件到TOS失败","-8":"修改sc-config meta配置失败","-9":"发布版本到抖音开放平台失败","-99":"环境准备失败","-100":"发布超时",uploadError:"",uploadFailed:"发布失败",defaultText:"任务准备中"},b=function(e){return o(void 0,void 0,void 0,(function(){var t,n,o,a,s,u,c,l,f,h,_,v,m,E,g,y,b,A,O,C,w,I,S,P,R,L,T,D;return i(this,(function(i){switch(i.label){case 0:return[4,p.default.readJSON(d.default.join(e,"project.config.json"))];case 1:if(!(t=i.sent()).unity)throw new Error("project.config.json 中没有 unity 字段");return n=r({appid:null!==(o=null==t?void 0:t.appid)&&void 0!==o?o:""},null!==(a=null==t?void 0:t.unity)&&void 0!==a?a:{}),(null===(s=null==n?void 0:n.build)||void 0===s?void 0:s.instantGame)&&!d.default.isAbsolute(null===(u=null==n?void 0:n.build)||void 0===u?void 0:u.instantGame)&&(n.build.instantGame=d.default.resolve(e,null===(c=null==n?void 0:n.build)||void 0===c?void 0:c.instantGame)),(null===(l=null==n?void 0:n.build)||void 0===l?void 0:l.webgl)&&!d.default.isAbsolute(null===(f=null==n?void 0:n.build)||void 0===f?void 0:f.webgl)&&(n.build.webgl=d.default.resolve(e,null===(h=null==n?void 0:n.build)||void 0===h?void 0:h.webgl)),(null===(v=null===(_=null==n?void 0:n.build)||void 0===_?void 0:_.native)||void 0===v?void 0:v.apk)&&!d.default.isAbsolute(null===(E=null===(m=null==n?void 0:n.build)||void 0===m?void 0:m.native)||void 0===E?void 0:E.apk)&&(n.build.native.apk=d.default.resolve(e,null===(y=null===(g=null==n?void 0:n.build)||void 0===g?void 0:g.native)||void 0===y?void 0:y.apk)),(null===(A=null===(b=null==n?void 0:n.build)||void 0===b?void 0:b.native)||void 0===A?void 0:A.il2cpp)&&!d.default.isAbsolute(null===(C=null===(O=null==n?void 0:n.build)||void 0===O?void 0:O.native)||void 0===C?void 0:C.il2cpp)&&(n.build.native.il2cpp=d.default.resolve(e,null===(I=null===(w=null==n?void 0:n.build)||void 0===w?void 0:w.native)||void 0===I?void 0:I.il2cpp)),(null===(P=null===(S=null==n?void 0:n.build)||void 0===S?void 0:S.native)||void 0===P?void 0:P.fullApk)&&!d.default.isAbsolute(null===(L=null===(R=null==n?void 0:n.build)||void 0===R?void 0:R.native)||void 0===L?void 0:L.fullApk)&&(n.build.native.fullApk=d.default.resolve(e,null===(D=null===(T=null==n?void 0:n.build)||void 0===T?void 0:T.native)||void 0===D?void 0:D.fullApk)),[2,n]}}))}))},A=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,p.default.readJSON(d.default.join(e,"game.json"))];case 1:return[2,t.sent()]}}))}))},O=function(e){var t=e.type,n=e.appid,r=e.uid;return o(void 0,void 0,void 0,(function(){var e,o,a,s,c;return i(this,(function(i){switch(i.label){case 0:e=3,i.label=1;case 1:if(!(e>0))return[3,6];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,u.AxiosInstance.get("https://starkgame.zijieapi.com/api/stark_publish/get_version",{params:{uid:r,appid:n,version_type:t}})];case 3:return o=i.sent(),[2,null!==(c=null===(s=null===(a=o.data)||void 0===a?void 0:a.result)||void 0===s?void 0:s[t])&&void 0!==c?c:{ctime:"",version:""}];case 4:return i.sent(),e--,[3,5];case 5:return[3,1];case 6:return[2,{ctime:"",version:""}]}}))}))},C=function(e){var t=e.projectPath,n=e.version,a=e.publishDesc,d=e.ideUid,f=e.channel;return o(void 0,void 0,void 0,(function(){var e,o,h,_,v,m,E,g,y,O,C,w;return i(this,(function(i){switch(i.label){case 0:return(e=(0,l.getUserId)())||d?[4,b(t)]:(console.info("请先登录"),[2]);case 1:return o=i.sent(),[4,R(o)];case 2:return i.sent(),h=o.appid,_=o.publishType,v=o.unityEngineVersion,[4,A(t)];case 3:if(m=i.sent(),!v)throw new Error("unityEngineVersion为必填字段,请修改project.config.json后重试");switch((E=new c.default).append("uid",null!=d?d:parseInt(e)),E.append("app_id",h),E.append("version",n),E.append("publish_type",_),E.append("unity_engine_version",v),E.append("publish_desc",null!=a?a:""),E.append("orientation","portrait"===m.deviceOrientation?"0":"1"),E.append("menu_btn_style","light"===m.menuButtonStyle?"1":"0"),E.append("tag",null!=f?f:""),"".concat(_)){case s.ONLY_ANDROID_NATIVE:g=p.default.createReadStream(o.build.native.il2cpp),E.append("il2cpp_source_file",g,{filename:"il2cpp_source_file.zip"}),y=p.default.createReadStream(o.build.native.apk),E.append("apk_file",y,{filename:"apk_file.apk"});break;case s.ANDROID_NATIVE_AND_IOS_WEBGL:w=p.default.createReadStream(o.build.webgl),E.append("webgl_file",w,{filename:"webgl_file.zip"}),g=p.default.createReadStream(o.build.native.il2cpp),E.append("il2cpp_source_file",g,{filename:"il2cpp_source_file.zip"}),y=p.default.createReadStream(o.build.native.apk),E.append("apk_file",y,{filename:"apk_file.apk"});break;case s.BOTH_WEBGL:case s.ONLY_ANDROID_WEBGL:O=p.default.createReadStream(o.build.webgl),E.append("webgl_file",O,{filename:"webgl_file.zip"});break;case s.ONLY_ANDROID_INSTANT_GAME:C=p.default.createReadStream(o.build.instantGame),E.append("ig_file",C,{filename:"ig_file.json"});break;case s.ANDROID_INSTANT_GAME_AND_IOS_WEBGL:C=p.default.createReadStream(o.build.instantGame),E.append("ig_file",C,{filename:"ig_file.json"}),w=p.default.createReadStream(o.build.webgl),E.append("webgl_file",w,{filename:"webgl_file.zip"});break;default:throw new Error("方案类型错误,请在【详情】中选择方案类型或在project.config.json中修改【unity.publishType】字段")}return[4,u.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/submit",method:"post",data:E,headers:r({},E.getHeaders()),timeout:18e5})];case 4:return[2,i.sent().data]}}))}))},w=function(e){var t=e.projectPath,n=e.version,a=e.publishDesc,f=e.channel;return o(void 0,void 0,void 0,(function(){var e,o,h,_,v,m,E,y,O,C,w,I,S,P,L,T;return i(this,(function(i){switch(i.label){case 0:return[4,b(t)];case 1:return e=i.sent(),[4,R(e)];case 2:return i.sent(),o=e.appid,h=e.publishType,_=e.unityEngineVersion,[4,A(t)];case 3:switch(v=i.sent(),(m=new c.default).append("version",n),m.append("publish_type",h),m.append("unity_engine_version",_),m.append("intro",null!=a?a:""),m.append("orientation","portrait"===v.deviceOrientation?"0":"1"),m.append("menu_btn_style","light"===v.menuButtonStyle?"1":"0"),m.append("tag",null!=f?f:""),m.append("is_debug","0"),E=d.default.join(t,"game.json"),"".concat(h)){case s.ONLY_ANDROID_NATIVE:return[3,4];case s.ANDROID_NATIVE_AND_IOS_WEBGL:return[3,5];case s.BOTH_WEBGL:case s.ONLY_ANDROID_WEBGL:return[3,7];case s.ONLY_ANDROID_INSTANT_GAME:return[3,9];case s.ANDROID_INSTANT_GAME_AND_IOS_WEBGL:return[3,10]}return[3,12];case 4:return y=p.default.createReadStream(e.build.native.il2cpp),m.append("il2cpp_source",y,{filename:"il2cpp_source_file.zip"}),O=p.default.createReadStream(e.build.native.apk),m.append("apk_source",O,{filename:"apk_file.apk"}),m.append("web_gl_source",Buffer.from(""),{filename:"webgl.zip"}),m.append("ig_source",Buffer.from(""),{filename:"ig.json"}),[3,13];case 5:case 7:return[4,(0,g.appendGameJsonToZipForUnity)(E,e.build.webgl)];case 6:return I=i.sent(),m.append("web_gl_source",I,{filename:"webgl_file.zip"}),y=p.default.createReadStream(e.build.native.il2cpp),m.append("il2cpp_source",y,{filename:"il2cpp_source_file.zip"}),O=p.default.createReadStream(e.build.native.apk),m.append("apk_source",O,{filename:"apk_file.apk"}),m.append("ig_source",Buffer.from(""),{filename:"ig.json"}),[3,13];case 8:return C=i.sent(),m.append("web_gl_source",C,{filename:"webgl_file.zip"}),m.append("ig_source",Buffer.from(""),{filename:"ig.json"}),m.append("apk_source",Buffer.from(""),{filename:"source.apk"}),m.append("il2cpp_source",Buffer.from(""),{filename:"il2cpp_source_file.zip"}),[3,13];case 9:return w=p.default.createReadStream(e.build.instantGame),m.append("ig_source",w,{filename:"ig_file.json"}),m.append("web_gl_source",Buffer.from(""),{filename:"webgl.zip"}),m.append("apk_source",Buffer.from(""),{filename:"source.apk"}),m.append("il2cpp_source",Buffer.from(""),{filename:"il2cpp_source_file.zip"}),[3,13];case 10:return w=p.default.createReadStream(e.build.instantGame),m.append("ig_source",w,{filename:"ig_file.json"}),[4,(0,g.appendGameJsonToZipForUnity)(E,e.build.webgl)];case 11:return I=i.sent(),m.append("web_gl_source",I,{filename:"webgl_file.zip"}),m.append("apk_source",Buffer.from(""),{filename:"source.apk"}),m.append("il2cpp_source",Buffer.from(""),{filename:"il2cpp_source_file.zip"}),[3,13];case 12:throw new Error("方案类型错误,请在【详情】中选择方案类型或在project.config.json中修改【unity.publishType】字段");case 13:return P=(S=u.AxiosInstance).request,L={url:"https://developer.toutiao.com/api/developer/ide/microgame/v1/sc_testing",method:"put",data:m,params:{appid:o}},T={},[4,(0,l.getUserCookies)()];case 14:return[4,P.apply(S,[(L.headers=r.apply(void 0,[(T.Cookie=i.sent(),T),m.getHeaders()]),L.timeout=18e5,L)])];case 15:return[2,i.sent().data]}}))}))},I=function(e){var t=e.projectPath,n=e.version,r=e.updateStatus,a=e.ideUid,s=e.channel;return o(void 0,void 0,void 0,(function(){var e,c,p,d,f;return i(this,(function(h){switch(h.label){case 0:return(e=(0,l.getUserId)())||a?[4,b(t)]:(console.info("请先登录"),[2]);case 1:return c=h.sent(),p=c.appid,d=function(){return u.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/query",method:"post",data:JSON.stringify({uid:"".concat(null!=a?a:e),app_id:p,version:n,tag:s}),headers:{"Content-Type":"application/json"}})},f=function(){return new Promise((function(e){var t=setInterval((function(){return o(void 0,void 0,void 0,(function(){var n,o,a,s;return i(this,(function(i){switch(i.label){case 0:return[4,d()];case 1:return n=i.sent(),null==r||r(n.data.result.status),100===n.data.result.status?(clearInterval(t),e(!0)):0===n.data.result.status||"".concat(n.data.result.status).startsWith("-")&&(clearInterval(t),e(!1),console.error("\n发布失败:".concat(y[null!==(s=null===(a=null===(o=n.data)||void 0===o?void 0:o.result)||void 0===a?void 0:a.status)&&void 0!==s?s:"uploadError"]))),[2]}}))}))}),1e3)}))},[4,f()];case 2:return[2,h.sent()]}}))}))},S=function(e){var t=e.projectPath,n=e.updateStatus,r=e.compileId;return o(void 0,void 0,void 0,(function(){var e,a,s,c;return i(this,(function(p){switch(p.label){case 0:return[4,b(t)];case 1:return e=p.sent(),a=e.appid,s=function(){return o(void 0,void 0,void 0,(function(){var e,t,n,o;return i(this,(function(i){switch(i.label){case 0:return t=(e=u.AxiosInstance).request,n={url:(0,_.getConfig)().microgameUrl.unityCompileProgress,method:"get",params:{appid:a,compile_id:r,is_testing:!0}},o={},[4,(0,l.getUserCookies)()];case 1:return[4,t.apply(e,[(n.headers=(o.Cookie=i.sent(),o),n)])];case 2:return[2,i.sent()]}}))}))},c=function(){return new Promise((function(e){var t=setInterval((function(){return o(void 0,void 0,void 0,(function(){var r,o,a;return i(this,(function(i){switch(i.label){case 0:return[4,s()];case 1:return r=i.sent(),null==n||n(r.data.state),100===r.data.state?(clearInterval(t),e(!0)):0===r.data.state||"".concat(r.data.state).startsWith("-")&&(clearInterval(t),e(!1),console.error("\n发布失败:".concat(y[null!==(a=null===(o=r.data)||void 0===o?void 0:o.state)&&void 0!==a?a:"uploadError"]))),[2]}}))}))}),1e3)}))},[4,c()];case 2:return[2,p.sent()]}}))}))},P=function(e){var t=e.projectPath,n=e.version,r=e.publishDesc,a=e.updateStatus,s=e.ideUid,u=e.channel;return o(void 0,void 0,void 0,(function(){var e,o;return i(this,(function(i){switch(i.label){case 0:return[4,w({projectPath:t,version:n,publishDesc:r,ideUid:s,channel:u})];case 1:if(0!==(null==(e=i.sent())?void 0:e.error))throw((null==(o=e.message)?void 0:o.includes("duplicate version"))||(null==o?void 0:o.includes("VERSION_HAS_UPLOADED")))&&(o='无法上传重复版本 "'.concat(n).concat(u?"-通道".concat(u):"",'",请更换版本号或通道后重试')),y.uploadError=null!=o?o:"上传失败",null==a||a("uploadError"),new Error(null!=o?o:"上传失败");return[4,S({projectPath:t,updateStatus:a,compileId:e.CompileId})];case 2:return[2,i.sent()]}}))}))},R=function(e){return o(void 0,void 0,void 0,(function(){var t,n,r,o,a,u,c,l,p,d,f,h;return i(this,(function(i){switch(i.label){case 0:if(!e)throw new Error("unityConfig is empty");switch(t=e.publishType,n=e.build,"".concat(t)){case s.ONLY_ANDROID_NATIVE:return[3,1];case s.ANDROID_NATIVE_AND_IOS_WEBGL:return[3,4];case s.BOTH_WEBGL:case s.ONLY_ANDROID_WEBGL:return[3,8];case s.ONLY_ANDROID_INSTANT_GAME:return[3,10];case s.ANDROID_INSTANT_GAME_AND_IOS_WEBGL:return[3,12]}return[3,15];case 1:return T(null!==(o=null===(r=null==n?void 0:n.native)||void 0===r?void 0:r.apk)&&void 0!==o?o:""),[4,L(null===(a=null==n?void 0:n.native)||void 0===a?void 0:a.il2cpp,"il2cpp产物文件不存在")];case 2:return i.sent(),[4,L(null===(u=null==n?void 0:n.native)||void 0===u?void 0:u.apk,"apk产物文件不存在")];case 3:case 7:case 9:case 11:case 14:return i.sent(),[3,16];case 4:return T(null!==(l=null===(c=null==n?void 0:n.native)||void 0===c?void 0:c.apk)&&void 0!==l?l:""),[4,L(null===(p=null==n?void 0:n.native)||void 0===p?void 0:p.il2cpp,"il2cpp产物文件不存在")];case 5:return i.sent(),[4,L(null===(d=null==n?void 0:n.native)||void 0===d?void 0:d.apk,"apk产物文件不存在")];case 6:case 13:return i.sent(),[4,L(null==n?void 0:n.webgl,"webgl产物文件不存在")];case 8:return[4,L(null==n?void 0:n.webgl,"webgl产物文件不存在")];case 10:return D(null!==(f=null==n?void 0:n.instantGame)&&void 0!==f?f:""),[4,L(null==n?void 0:n.instantGame,"instant game产物文件不存在")];case 12:return D(null!==(h=null==n?void 0:n.instantGame)&&void 0!==h?h:""),[4,L(null==n?void 0:n.instantGame,"instant game产物文件不存在")];case 15:throw new Error("方案类型错误,请在【详情】中选择方案类型或在project.config.json中修改【unity.publishType】字段");case 16:return[2]}}))}))},L=function(e,t){return o(void 0,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,p.default.pathExists(null!=e?e:"")];case 1:if(!n.sent())throw new Error(null!=t?t:"文件不存在");return[2,!0]}}))}))},T=function(e){if(".apk"!==d.default.extname(e))throw new Error("请上传apk文件")},D=function(e){if(".json"!==d.default.extname(e))throw new Error("请上传json文件")},N=function(e){var t=e.appId,n=e.compileId;return o(void 0,void 0,void 0,(function(){var e,r,a;return i(this,(function(s){switch(s.label){case 0:return e=(0,_.getConfig)(),r=function(){return o(void 0,void 0,void 0,(function(){var r,o,a,s;return i(this,(function(i){switch(i.label){case 0:return o=(r=u.AxiosInstance).request,a={url:e.microgameUrl.unityCompileProgress,method:"get",params:{appid:t,compile_id:n}},s={},[4,(0,l.getUserCookies)()];case 1:return[4,o.apply(r,[(a.headers=(s.Cookie=i.sent(),s),a)])];case 2:return[2,i.sent()]}}))}))},a=function(){return new Promise((function(e,t){var n=setInterval((function(){return o(void 0,void 0,void 0,(function(){var o,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,r()];case 1:switch((o=i.sent()).data.compile_status){case 2:break;case 3:clearInterval(n),e(o.data.ctime);break;default:clearInterval(n),console.info("发布失败:",o.data.failed_msg),t(o.data.message||o.data.failed_msg||"发布失败")}return[3,3];case 2:return a=i.sent(),clearInterval(n),console.info("发布失败:",a.message),t(a.message),[3,3];case 3:return[2]}}))}))}),1e3)}))},[4,a()];case 1:return[2,s.sent()]}}))}))},x=function(e){var t=e.appId,n=e.ideConfig,a=e.ctime,s=e.scene,c=void 0===s?"990001":s,p=e.query,d=void 0===p?"":p,f=e.bdpLog,h=void 0===f?"":f,m=e.version,g=e.channel,y=e.debug;return o(void 0,void 0,void 0,(function(){var e,o,s,p,f,b,A,O;return i(this,(function(i){switch(i.label){case 0:return e=(0,_.getConfig)(),o={ide_version:null==n?void 0:n.ideVersion,ide_os:null==n?void 0:n.ideOS,ide_device_id:null==n?void 0:n.ideDid,ide_user_id:null==n?void 0:n.ideUid,iOS_debug_version:+(null==n?void 0:n.iOSDebugVersion),connect_type:null==n?void 0:n.connectType,local_debug:String(null!==(A=null==n?void 0:n.localDebug)&&void 0!==A?A:""),extra_info:null!==(O=null==n?void 0:n.extraInfo)&&void 0!==O?O:{},performance_test:null==n?void 0:n.performanceTest},s={start_page:"",query:d,scene:c,bdp_log:h,penetrate_map_json:JSON.stringify({referer_info:"",ide_inspect_version:6,ide_live_debug:!1,ide_config:o}),ctime:"".concat(a)},[4,(0,l.getLogInfoHeaders)(t)];case 1:return p=i.sent(),"latest"==(f=a?"preview":"latest")?(s.version_num=m,s.tag=g):Object.assign(s,null==y?void 0:y.query),[4,u.AxiosInstance.request({url:e.microgameUrl.makeSchema,method:"post",data:{app_id:t,stage:f,devappid:"",schema_params:s},headers:r({},p)})];case 2:if(0!==(b=i.sent().data).code)throw new v.UploadError(b.msg);return(0,E.isIDE)()&&console.info("生成schema成功:",b.data),[2,b]}}))}))},j=function(e){var t=e.projectPath,n=e.ideUid,a=e.compileMode,f=e.customOptions;return o(void 0,void 0,void 0,(function(){var e,m,E,y,O,C,w,I,S,P,R,L,T,D;return i(this,(function(j){switch(j.label){case 0:return[4,b(t)];case 1:return e=j.sent(),(null==f?void 0:f.publishType)&&(e.publishType=f.publishType),(null==f?void 0:f.webGLSource)&&(null==e?void 0:e.build)&&(e.build.webgl=f.webGLSource),[4,k(e)];case 2:return j.sent(),m=e.appid,E=e.publishType,y=e.unityEngineVersion,O=e.build,[4,A(t)];case 3:C=j.sent(),w=h.default.loading("正在准备上传..."),j.label=4;case 4:return j.trys.push([4,9,10,11]),[4,(M={appId:m,apkSource:null!==(T=null===(L=O.native)||void 0===L?void 0:L.fullApk)&&void 0!==T?T:"",webGLSource:O.webgl,igSource:O.instantGame,isDebug:0,publishType:E,unityEngineVersion:y,menuBtnStyle:C.menuButtonStyle,orientation:"portrait"===C.deviceOrientation?0:1,gameJsonPath:d.default.resolve(t,"game.json")},o(void 0,void 0,void 0,(function(){var e,t,n,o,a,d,f,h,v,m,E,y,b,A,O,C,w,I,S,P,R,L,T,D,N,x,j;return i(this,(function(i){switch(i.label){case 0:if(e=(0,_.getConfig)(),t=M.appId,n=M.apkSource,o=M.webGLSource,a=M.igSource,d=M.isDebug,f=M.publishType,v=M.menuBtnStyle,m=M.orientation,E=M.gameJsonPath,!(h=M.unityEngineVersion))throw new Error("unityEngineVersion为必填字段,请修改project.config.json后重试");switch((y=new c.default).append("publish_type",parseInt(f)),y.append("is_debug",d),y.append("unity_engine_version",h),y.append("menu_btn_style","light"===v?1:0),y.append("orientation",m),f){case s.ONLY_ANDROID_NATIVE:return[3,1];case s.ANDROID_NATIVE_AND_IOS_WEBGL:return[3,2];case s.BOTH_WEBGL:case s.ONLY_ANDROID_WEBGL:return[3,4];case s.ONLY_ANDROID_INSTANT_GAME:return[3,6];case s.ANDROID_INSTANT_GAME_AND_IOS_WEBGL:return[3,7]}return[3,9];case 1:return y.append("apk_source",p.default.createReadStream(n),{filename:"source.apk"}),y.append("web_gl_source",Buffer.from(""),{filename:"webgl.zip"}),y.append("ig_source",Buffer.from(""),{filename:"ig.json"}),[3,10];case 2:return y.append("apk_source",p.default.createReadStream(n),{filename:"source.apk"}),A=(b=y).append,O=["web_gl_source"],[4,(0,g.appendGameJsonToZipForUnity)(E,o)];case 3:return A.apply(b,O.concat([i.sent(),{filename:"webgl.zip"}])),y.append("ig_source",Buffer.from(""),{filename:"ig.json"}),[3,10];case 4:return y.append("apk_source",Buffer.from(""),{filename:"source.apk"}),w=(C=y).append,I=["web_gl_source"],[4,(0,g.appendGameJsonToZipForUnity)(E,o)];case 5:return w.apply(C,I.concat([i.sent(),{filename:"webgl.zip"}])),y.append("ig_source",Buffer.from(""),{filename:"ig.json"}),[3,10];case 6:return y.append("apk_source",Buffer.from(""),{filename:"source.apk"}),y.append("web_gl_source",Buffer.from(""),{filename:"webgl.zip"}),y.append("ig_source",p.default.createReadStream(a),{filename:"ig.json"}),[3,10];case 7:return y.append("apk_source",Buffer.from(""),{filename:"source.apk"}),y.append("ig_source",p.default.createReadStream(a),{filename:"ig.json"}),P=(S=y).append,R=["web_gl_source"],[4,(0,g.appendGameJsonToZipForUnity)(E,o)];case 8:return P.apply(S,R.concat([i.sent(),{filename:"web_gl_source.zip"}])),[3,10];case 9:throw new Error("方案类型错误,请在【详情】中选择方案类型或在project.config.json中修改【unity.publishType】字段");case 10:return D=(T=u.AxiosInstance).put,N=[e.microgameUrl.unityPreview,y],x={params:{appid:t}},j={},[4,(0,l.getUserCookies)()];case 11:return[4,D.apply(T,N.concat([(x.headers=r.apply(void 0,[(j.Cookie=i.sent(),j),y.getHeaders()]),x.timeout=6e5,x)]))];case 12:if(!(L=i.sent().data).CompileId||0!==L.error)throw new Error(L.message);return[2,L.CompileId]}}))})))];case 5:return I=j.sent(),w.text="查询编译进度中...",[4,N({compileId:I,appId:m})];case 6:return S=j.sent(),P=(0,l.getUserId)(),S?[4,x(r({appId:m,ctime:S,debug:(null==f?void 0:f.debug)?{query:{gtoken:null==f?void 0:f.debug.phoneRoomServiceUrl,roomid:null==f?void 0:f.debug.phoneRoomServiceUrl,session:null!==(D=null==f?void 0:f.debug.session)&&void 0!==D?D:""}}:null,ideConfig:{ideUid:null!=P?P:n,performanceTest:null==f?void 0:f.isPerformanceTest}},a))]:[3,8];case 7:return[2,j.sent()];case 8:return[3,11];case 9:throw R=j.sent(),new v.UploadError(R.message||R);case 10:return w.stop(),[7];case 11:return[2]}var M}))}))},M=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,p.default.readFile(e)];case 1:return[2,t.sent().includes("il2cpp.so")];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))},k=function(e){return o(void 0,void 0,void 0,(function(){var t,n,r,o,a,u,c,l,p,d,f,h,_,v;return i(this,(function(i){switch(i.label){case 0:if(!e)throw new Error("unityConfig is empty");switch(t=e.publishType,n=e.build,"".concat(t)){case s.ONLY_ANDROID_NATIVE:return[3,1];case s.ANDROID_NATIVE_AND_IOS_WEBGL:return[3,4];case s.BOTH_WEBGL:case s.ONLY_ANDROID_WEBGL:return[3,8];case s.ONLY_ANDROID_INSTANT_GAME:return[3,10];case s.ANDROID_INSTANT_GAME_AND_IOS_WEBGL:return[3,12]}return[3,15];case 1:return[4,M(null!==(o=null===(r=null==n?void 0:n.native)||void 0===r?void 0:r.fullApk)&&void 0!==o?o:"")];case 2:if(!i.sent())throw new Error("请使用 SC Stark Tool 构建预览时需要的完整APK文件,详情请查看:https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/developer-instrument/development-assistance/unity-game-preview");return T(null!==(u=null===(a=null==n?void 0:n.native)||void 0===a?void 0:a.fullApk)&&void 0!==u?u:""),[4,L(null===(c=null==n?void 0:n.native)||void 0===c?void 0:c.fullApk,"apk产物文件不存在")];case 3:case 7:case 9:case 11:case 14:return i.sent(),[3,16];case 4:return[4,M(null!==(p=null===(l=null==n?void 0:n.native)||void 0===l?void 0:l.fullApk)&&void 0!==p?p:"")];case 5:if(!i.sent())throw new Error("请使用 SC Stark Tool 构建预览时需要的完整APK文件,详情请查看:https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/developer-instrument/development-assistance/unity-game-preview");return[4,L(null===(d=null==n?void 0:n.native)||void 0===d?void 0:d.fullApk,"apk产物文件不存在")];case 6:return i.sent(),T(null!==(h=null===(f=null==n?void 0:n.native)||void 0===f?void 0:f.fullApk)&&void 0!==h?h:""),[4,L(null==n?void 0:n.webgl,"webgl产物文件不存在")];case 8:return[4,L(null==n?void 0:n.webgl,"webgl产物文件不存在")];case 10:return D(null!==(_=null==n?void 0:n.instantGame)&&void 0!==_?_:""),[4,L(null==n?void 0:n.instantGame,"instant game产物文件不存在")];case 12:return D(null!==(v=null==n?void 0:n.instantGame)&&void 0!==v?v:""),[4,L(null==n?void 0:n.instantGame,"instant game产物文件不存在")];case 13:return i.sent(),[4,L(null==n?void 0:n.webgl,"webgl产物文件不存在")];case 15:throw new Error("方案类型错误,请在【详情】中选择方案类型或在project.config.json中修改【unity.publishType】字段");case 16:return[2]}}))}))};t.unityCli={getVersions:function(e){var t=e.projectPath,n=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,r,o,a,s,u;return i(this,(function(i){switch(i.label){case 0:return(e=(0,l.getUserId)())||n?[4,b(t)]:(console.info("请先登录"),[2]);case 1:r=i.sent(),o=r.appid,a={},i.label=2;case 2:return i.trys.push([2,4,,5]),[4,O({uid:null!=n?n:parseInt(e),appid:o,type:"current"})];case 3:return s=i.sent(),Object.assign(a,{current:s}),[3,5];case 4:return i.sent(),[3,5];case 5:return i.trys.push([5,7,,8]),[4,O({uid:null!=n?n:parseInt(e),appid:o,type:"latest"})];case 6:return u=i.sent(),Object.assign(a,{latest:u}),[3,8];case 7:return i.sent(),[3,8];case 8:return[2,a]}}))}))},getLatestVersion:function(e){var t=e.projectPath,n=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,r,o,a;return i(this,(function(i){switch(i.label){case 0:return(e=(0,l.getUserId)())||n?[4,b(t)]:(console.info("请先登录"),[2]);case 1:return r=i.sent(),o=r.appid,[4,O({uid:null!=n?n:parseInt(e),appid:o,type:"latest"})];case 2:return a=i.sent(),/^\d+\.\d+\.\d+$/.test(a.version)||(a.version=""),[2,a]}}))}))},upload:C,queryProgress:I,uploadAndQueryProgress:function(e){var t=e.projectPath,n=e.version,r=e.publishDesc,a=e.updateStatus,s=e.ideUid,u=e.channel;return o(void 0,void 0,void 0,(function(){var e,o;return i(this,(function(i){switch(i.label){case 0:return[4,C({projectPath:t,version:n,publishDesc:r,ideUid:s,channel:u})];case 1:if(0!==(null==(e=i.sent())?void 0:e.code))throw(null==(o=e.message)?void 0:o.includes("duplicate version"))&&(o='无法上传重复版本 "'.concat(n).concat(u?"-通道".concat(u):"",'",请更换版本号或通道后重试')),y.uploadError=null!=o?o:"上传失败",null==a||a("uploadError"),new Error(null!=o?o:"上传失败");return[4,I({projectPath:t,version:n,updateStatus:a,ideUid:s,channel:u})];case 2:return[2,i.sent()]}}))}))},validateFiles:R,validateAppId:function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,(0,f.getMicroappInfo)(e)];case 1:return 7===(t=n.sent())?[2,!0]:null===t?[2,null]:[2,!1]}}))}))},PROGRESS:y,isUnity:function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,b(e)];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))},unityUpload:function(e){return o(void 0,void 0,void 0,(function(){var t,n,r,o,a,s,u,c,l,f,_;return i(this,(function(i){switch(i.label){case 0:return t=e.projectPath,n=e.version,r=e.publishType,o=e.deviceOrientation,a=e.channel,[4,p.default.readJSON(d.default.join(t,"project.config.json"))];case 1:if(s=i.sent(),a&&isNaN(parseInt(a)))throw new Error("channel字段必须为数字");return r&&(null==s?void 0:s.unity)?(s.unity.publishType=r,[4,p.default.writeJSON(d.default.join(t,"project.config.json"),s)]):[3,3];case 2:i.sent(),i.label=3;case 3:return o?[4,p.default.readJSON(d.default.join(t,"game.json"))]:[3,6];case 4:return(null==(u=i.sent())?void 0:u.deviceOrientation)?(u.deviceOrientation=o,[4,p.default.writeJSON(d.default.join(t,"game.json"),u)]):[3,6];case 5:i.sent(),i.label=6;case 6:return[4,P(e)];case 7:if(!i.sent())throw new Error("发布失败");return[4,x({appId:null==s?void 0:s.appid,version:n,channel:a,ideConfig:{}})];case 8:return c=i.sent(),h.default.info("\n"),(0,m.generateTerminalQrCode)(null===(l=null==c?void 0:c.data)||void 0===l?void 0:l.short_url,{}),e.output?[4,(0,m.toQRCodeFile)(null!==(_=null===(f=null==c?void 0:c.data)||void 0===f?void 0:f.short_url)&&void 0!==_?_:"",e.output,null==e?void 0:e.bgColor)]:[3,10];case 9:i.sent(),h.default.info("\n测试二维码图片保存成功:",e.output),i.label=10;case 10:return[2,c.data]}}))}))},preview:j,makeSchema:x,previewForCli:function(e){var t=e.projectPath,n=e.output,r=e.compileMode;return o(void 0,void 0,void 0,(function(){var e,o,a;return i(this,(function(i){switch(i.label){case 0:return[4,j({projectPath:t,compileMode:r})];case 1:return e=i.sent(),n?[4,(0,m.toQRCodeFile)(null!==(a=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.short_url)&&void 0!==a?a:"",n)]:[3,3];case 2:i.sent(),i.label=3;case 3:return[2,null==e?void 0:e.data]}}))}))},validatePreviewFiles:k,uploadAndQueryProgressThroughPlatform:P}},1562:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.appendGameJsonToZipForUnity=t.getPathByteSize=t.getDirByteSize=t.getFileByteSize=t.byte2Mb=t.mb2Byte=void 0;var s=a(n(9896)),u=a(n(5063)),c=n(1618),l=n(6928),p=a(n(6624)),d=a(n(6321));t.mb2Byte=function(e){return 1024*e*1024},t.byte2Mb=function(e,t){return void 0===t&&(t=4),Number((e/1024/1024).toFixed(t))},t.getFileByteSize=function(e,t){return(0,c.filterFile)((0,l.relative)(t.projectPath,e),t.getPackOptions())?0:s.default.statSync(e).size},t.getDirByteSize=function(e,n,i,a){return void 0===n&&(n=[]),void 0===i&&(i=[]),r(void 0,void 0,void 0,(function(){var r;return o(this,(function(o){switch(o.label){case 0:return[4,(0,u.default)(i,{cwd:e,ignore:n,absolute:!0,dot:!0})];case 1:return r=o.sent(),[4,Promise.all(r.map((function(e){return(0,t.getFileByteSize)(e,a)})))];case 2:return[2,o.sent().reduce((function(e,t){return e+t}),0)]}}))}))},t.getPathByteSize=function(e,n,r,o){return void 0===n&&(n=[]),void 0===r&&(r=["**"]),s.default.statSync(e).isDirectory()?(0,t.getDirByteSize)(e,n,r,o):(0,t.getFileByteSize)(e,o)},t.appendGameJsonToZipForUnity=function(e,t){return r(void 0,void 0,void 0,(function(){var n,a;return o(this,(function(u){switch(u.label){case 0:return s.default.existsSync(null!=e?e:"")?[4,(c=t,r(void 0,void 0,void 0,(function(){var e,t,n,r,a,s,u,l,p;return o(this,(function(o){switch(o.label){case 0:return[4,d.default.Open.file(c)];case 1:e=o.sent(),t=[],o.label=2;case 2:o.trys.push([2,7,8,9]),n=i(e.files),r=n.next(),o.label=3;case 3:if(r.done)return[3,6];if("game.json"===(a=r.value).path)throw new Error("包体根目录不允许自定义game.json文件,请修改后上传");return[4,a.buffer()];case 4:s=o.sent(),t.push({path:a.path,buffer:s}),o.label=5;case 5:return r=n.next(),[3,3];case 6:return[3,9];case 7:return u=o.sent(),l={error:u},[3,9];case 8:try{r&&!r.done&&(p=n.return)&&p.call(n)}finally{if(l)throw l.error}return[7];case 9:return[2,t]}}))})))]:[2,s.default.readFileSync(t)];case 1:n=u.sent(),u.label=2;case 2:return u.trys.push([2,4,,5]),a=new Promise((function(t,r){var o,a,s=[],u=(0,p.default)("zip");try{for(var c=i(n),l=c.next();!l.done;l=c.next()){var d=l.value;u.append(d.buffer,{name:d.path})}}catch(e){o={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}u.file(e,{name:"game.json"}),u.on("data",(function(e){s.push(e)})),u.on("finish",(function(){var e=Buffer.concat(s);t(e)})),u.on("error",(function(e){r(e)})),u.finalize()})),[4,a];case 3:return[2,u.sent()];case 4:return u.sent(),[2,s.default.readFileSync(t)];case 5:return[2]}var c}))}))}},130:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateAppId=t.getAppId=t.checkAppId=t.checkUCAppId=t.compressZip=t.getDirHash=t.verifyPkgSize=t.getSizeLimitConfig=t.PKG_HASH_IGNORE_LIST=t.PKG_SIZE_IGNORE_GLOBS=void 0;var c=u(n(6624)),l=n(1079),p=u(n(120)),d=u(n(6928)),f=n(3374),h=n(1562),_=n(3128),v=n(3123),m=n(3357),E=n(7497),g=n(2539);t.PKG_SIZE_IGNORE_GLOBS=["**/.*","**/.*/**/*","**/node_modules/**","**/**.js.map"],t.PKG_HASH_IGNORE_LIST=[".*","node_modules"],t.getSizeLimitConfig=function(e){return o(void 0,void 0,void 0,(function(){var t,n,o,a,s,u,c;return i(this,(function(i){switch(i.label){case 0:return t={normalTotal:16,subMain:4,subPkg:20,subTotal:20,openData:4},a=(o=m.AxiosInstance).get,s=["".concat((0,g.getConfig)().microgameUrl.sizeLimit).concat(e)],u={},c={},[4,(0,E.getUserCookies)()];case 1:return[4,a.apply(o,s.concat([(u.headers=(c.Cookie=i.sent(),c),u)]))];case 2:if(0!==(n=i.sent().data).err_no)throw new Error(null==n?void 0:n.err_msg);return[2,r(r({},t),n.limit)]}}))}))};var y=function(e,t,n){return"".concat(e,"大小为:").concat(t,"MB,超过 ").concat(n,"MB。")};t.verifyPkgSize=function(e,n){return o(void 0,void 0,void 0,(function(){var r,o,s,u,c,l,f,_,m,E,g,b,A,O,C,w,I;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),[4,p.default.readJson(d.default.join(e,"game.json"))];case 1:return r=i.sent(),o=r.openDataContext,s=null!==(I=r.subPackages)&&void 0!==I?I:r.subpackages,[4,(0,t.getAppId)(e)];case 2:return u=i.sent(),[4,(0,t.getSizeLimitConfig)(u)];case 3:return c=i.sent(),l=[],o?[4,(0,h.getPathByteSize)(d.default.join(e,o),t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0),n)]:[3,5];case 4:return _=i.sent(),[3,6];case 5:_=0,i.label=6;case 6:return(f=_)>(0,h.mb2Byte)(c.openData)&&l.push(y("小游戏开放数据域文件",(0,h.byte2Mb)(f),c.openData)),m=!(null==s?void 0:s.length),E=m?c.normalTotal:c.subTotal,[4,(0,h.getPathByteSize)(e,t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0),n)];case 7:return(g=i.sent())>(0,h.mb2Byte)(E)&&l.push(y("小游戏包",(0,h.byte2Mb)(g),E)),m?[2,l.length?l.join("\n")+"\n请调整包大小再进行上传":""]:[4,Promise.all(s.map((function(r){var o=d.default.join(e,r.root);return(0,h.getPathByteSize)(o,t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0),n)})))];case 8:return b=i.sent(),A=b.map((function(e,t){return[s[t],e]})).filter((function(e){var t=a(e,2);return t[0],t[1]>(0,h.mb2Byte)(c.subPkg)})),A.length>0&&l.push("".concat(A.map((function(e){return a(e,1)[0].name})).join("、")," 子包大小为:").concat(A.map((function(e){var t=a(e,2),n=(t[0],t[1]);return"".concat((0,h.byte2Mb)(n),"MB")})).join("、"),",超过 ").concat(c.subPkg,"MB。")),O=b.reduce((function(e,t){return e+t}),0),(C=g-f-O)>(0,h.mb2Byte)(c.subMain)&&l.push(y("小游戏分包主包",(0,h.byte2Mb)(C),c.subMain)),[2,l.length?l.join("\n")+"\n请调整包大小再进行上传":""];case 9:return[2,(w=i.sent())instanceof Error?w.message:String(w)];case 10:return[2]}}))}))},t.getDirHash=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,(0,l.hashElement)(e,{encoding:"hex",folders:{exclude:t.PKG_HASH_IGNORE_LIST}})];case 1:return[2,n.sent().hash]}}))}))},t.compressZip=function(e,n,r){return void 0===r&&(r=[]),new Promise((function(u,l){return o(this,void 0,void 0,(function(){var o,f,h;return i(this,(function(i){switch(i.label){case 0:return o=d.default.resolve(n,"".concat(d.default.basename(e),".zip")),f=p.default.createWriteStream(o),h=(0,c.default)("zip",{zlib:{level:9}}),f.on("close",(function(){return u(o)})),h.on("error",(function(e){return console.error("压缩失败:",e),l(e)})),h.pipe(f),h.glob("**/*",{cwd:e,ignore:s(s([],a(t.PKG_SIZE_IGNORE_GLOBS),!1),a(r),!1)},{}),[4,h.finalize()];case 1:return i.sent(),[2]}}))}))}))},t.checkUCAppId=function(e){return/^tt[0-9a-f]{16}(07)$/.test(e)},t.checkAppId=function(e){return/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e)},t.getAppId=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,p.default.readJson(d.default.join(e,"project.config.json"))];case 1:return"testappid"===(t=n.sent()).appid.toLocaleLowerCase()?[2,"tt975be1e608633d4202"]:[2,t.appid]}}))}))},t.validateAppId=function(e){return o(void 0,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:if((0,t.checkUCAppId)(e))throw n="当前小游戏 AppId 为 ".concat(e,",为Unity&UE小游戏 AppId, 不支持该类型小游戏"),new f.ProjectError(n);if(!(0,t.checkAppId)(e))throw new f.ProjectError("请使用正确的 AppId");return[4,(0,_.fetchMeta)({appid:e})];case 1:if((r=o.sent().data)&&2!==r.tech_type)throw new f.ProjectError("请使用小游戏的 AppId");return[2]}}))}))}},1596:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t},__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildNpm=void 0;var fs_extra_1=__webpack_require__(120),path=__importStar(__webpack_require__(6928));function buildNpm(options){return __awaiter(this,void 0,void 0,(function(){var cwd,_a,projectPath,buildNpm,_this=this;return __generator(this,(function(_b){switch(_b.label){case 0:return cwd=process.cwd(),_a=options.projectPath,projectPath=void 0===_a?cwd:_a,path.isAbsolute(projectPath)||(projectPath=path.resolve(cwd,projectPath)),[4,Promise.all([(0,fs_extra_1.access)(path.resolve(projectPath,"package.json")),(0,fs_extra_1.access)(path.resolve(projectPath,"node_modules"))])];case 1:return _b.sent(),buildNpm=eval("require")("@tt-miniprogram/ext-pack").buildNpm,[4,new Promise((function(e){return __awaiter(_this,void 0,void 0,(function(){var t,n,r;return __generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,buildNpm({projectPath})];case 1:return"success"===(t=o.sent()).result?e({success:!0,reason:t.message.title}):e({success:!1,reason:t.message.content}),[3,3];case 2:return n=o.sent(),e({success:!1,reason:null!==(r=n.message)&&void 0!==r?r:"执行构建 NPM 脚本失败"}),[3,3];case 3:return[2]}}))}))}))];case 2:return[2,_b.sent()]}}))}))}exports.buildNpm=buildNpm},2133:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(n(5317)),u=i(n(120)),c=i(n(6928)),l=n(7004),p=n(5602),d=a(n(4351)),f=n(1831),h=l.CliMonitor.getInstance({cliVersion:"2.0.14",cliName:"tt-minigame-ide-cli"});t.default=function(e,t){var n=e.projectPath,r=e.mode,o=e.type;c.isAbsolute(n)||(n=c.join(process.cwd(),n));var i=!1;try{u.accessSync(n),i=!0}catch(e){d.default.error('The "projectPath" not exist. [path=%s]',n)}var a=(0,f.isMac)()?"open":"start";t&&(a="export BYTEDANCE_IDE_REMOTE_PORT=".concat(t," && ").concat(a));var _="";i?(d.default.info("Open project. [path=%s]",n),_+="path=".concat(n,"&project-type=").concat(o),"full"!==r&&"lite"!==r||(d.default.info("mode=%s",r),_+="&mode=".concat(r))):d.default.info("Open IDE");var v=a+" "+"".concat(p.IDE_SCHEMA,"?").concat(encodeURIComponent(_));return new Promise((function(e,t){s.exec(v,(function(n){n?(d.default.error("Open IDE failed. [err=%o]",n),t(n)):(d.default.info("Open IDE success"),"lite"===r&&h.report(l.CLI_EVENTS.IDE_LITE_MODE_ENTER,{from:"cli"}),e())}))}))}},8852:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},c=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.prettyProjectSize=t.folderToZipStream=t.verifySubPackageSize=t.getProjectSize=t.getFolderSize=void 0;var p=n(3374),d=n(4685),f=l(n(6624)),h=l(n(1755)),_=l(n(5063)),v=i(n(6928)),m=n(1831),E=l(n(120)),g=n(3123),y=n(1618),b=n(240),A=n(1189);function O(e){var t=e.folderPath,n=e.useTypeScript,r=e.options,o=void 0===r?{}:r,i=e.isGame,l=e.isLivePlugin,d=e.gameFiles,f=e.rootPath,h=e.packOptions,b=e.projectConfig;return a(this,void 0,void 0,(function(){var e,r,a,O,C,w,I,S,P,R,L,T;return s(this,(function(s){switch(s.label){case 0:e=o.ignore,r=void 0===e?[]:e,s.label=1;case 1:return s.trys.push([1,6,,7]),[4,E.default.lstat(t)];case 2:if((a=s.sent().isFile())&&!t.endsWith(".js"))throw new Error("subPackage root should be a valid js or a directory");return O=a?v.resolve(t,"../"):t,C=_.default.convertPathToPattern(O),w=_.default.convertPathToPattern(t),[4,(0,_.default)(a?w:(0,g.getWhiteList)(i,{isLivePlugin:l}),{cwd:C,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(r.map((function(e){return(0,m.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})];case 3:return I=s.sent(),(null==d?void 0:d.length)>0?(d=d.filter(m.isGameFileValid),[4,(0,_.default)(d,{cwd:C,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(r.map((function(e){return(0,m.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})]):[3,5];case 4:S=(S=s.sent()).filter((function(e){return g.ALLOWED_MICROGAME_EXTS_REG.test(e.path)&&e.path.startsWith(C)})),I.push.apply(I,c([],u(S),!1)),s.label=5;case 5:return P=new Map,I.forEach((function(e){P.set(e.path,e)})),R=0,L=b.getCloudfunctionRoot(),P.forEach((function(e,t){L&&(0,y.filterFile)(v.relative(b.projectPath,t),{ignore:[{type:A.PACK_TYPE.FOLDER,value:L}]})||(0,y.filterFile)(v.relative(f,t),h)||!n&&t.endsWith(".ts")||n&&t.endsWith(".js")&&P.has(t.replace(/\.js$/,".ts"))||(R+=e.stats?e.stats.size:0)})),[2,R];case 6:throw T=s.sent(),new p.ProjectError(T.toString());case 7:return[2]}}))}))}function C(e,t){return void 0===t&&(t=!1),a(this,void 0,void 0,(function(){var n,r,o,i,u,c,l,p,f,h,_,g,y,b,A,C=this;return s(this,(function(w){switch(w.label){case 0:return v.isAbsolute(e)||(e=v.join(process.cwd(),e)),[4,(0,m.getProjectConfig)(e)];case 1:return[4,(n=w.sent()).getAppJSON()];case 2:return r=w.sent(),o=r.rawJSON,i=r.isLivePlugin,u={main:void 0,sub:[],openData:void 0,total:0},c=0,l=t?e:v.join(e,n.getMiniprogramRoot()),p=o.subPackages||o.subpackages||[],f=n.useTypeScript(),h=Array.isArray(o.gameFiles)?o.gameFiles:[],_=n.getPackOptions(),[4,O({folderPath:l,useTypeScript:f,options:{ignore:p.filter((function(e){return Boolean(e.root)})).map((function(e){var t=v.join(l,e.root);return E.default.lstatSync(t).isFile()?t:v.join(t,"**")}))},isGame:t,isLivePlugin:i,gameFiles:h,rootPath:e,packOptions:_,projectConfig:n})];case 3:return g=w.sent(),Array.isArray(p)&&p.length>0?(y=p.reduce((function(e,t){return!t.root||e.includes(t.root)||e.push(t.root),e}),[]),[4,Promise.all(y.map((function(e){return a(C,void 0,void 0,(function(){var r;return s(this,(function(o){switch(o.label){case 0:return[4,O({folderPath:v.join(l,e),useTypeScript:f,options:{},isGame:t,isLivePlugin:i,packOptions:_,rootPath:l,projectConfig:n})];case 1:return r=o.sent(),[2,{path:(0,d.ensureEndSlash)(e),size:r}]}}))}))})))]):[3,5];case 4:b=w.sent(),c+=b.reduce((function(e,t){return e+t.size}),0),u.sub=b,w.label=5;case 5:return t&&o.openDataContext?[4,O({folderPath:v.join(l,o.openDataContext),useTypeScript:f,options:{},isGame:t,isLivePlugin:i,rootPath:l,packOptions:_,projectConfig:n})]:[3,7];case 6:A=w.sent(),u.openData={path:(0,d.ensureEndSlash)(o.openDataContext),size:A},c+=A,g-=A,w.label=7;case 7:return u.total=c+g,u.main={path:l,size:g},[2,u]}}))}))}t.getFolderSize=O,t.getProjectSize=C,t.verifySubPackageSize=function(e,t){return a(this,void 0,void 0,(function(){var n,r,o,i,a,u,c,l,f,h;return s(this,(function(s){switch(s.label){case 0:return[4,e.getAppJSON()];case 1:n=s.sent(),r=n.isGame,o=e.projectPath,i={mainMax:4194304,subMax:2097152,totalMax:16777216},"preview"===t&&e.getBigPackageSizeSupport()&&(i.mainMax=8388608,i.subMax=4194304,i.totalMax=25165824),(r||n.isLivePlugin)&&(i.mainMax=1/0,i.subMax=1/0,i.totalMax=20971520),a=[],s.label=2;case 2:return s.trys.push([2,4,,7]),[4,C(o,r)];case 3:return u=s.sent(),[3,7];case 4:return c=s.sent(),console.error("获取包体积失败",c),[4,(0,m.sleep)(1e3)];case 5:return s.sent(),[4,C(o,r)];case 6:return u=s.sent(),[3,7];case 7:if(!u)throw Error("获取包体积失败");if(u.total>i.totalMax&&a.push("项目源码包大小 ".concat((0,d.formatSize)(u.total),",超过 ").concat((0,d.formatSize)(i.totalMax),"。")),(u.sub.length>0||u.openData)&&(l=u.main,f=u.sub,h=u.openData,l.size>i.mainMax&&a.push("主包大小为 ".concat((0,d.formatSize)(l.size),",超过 ").concat((0,d.formatSize)(i.mainMax),"。")),null==f||f.forEach((function(e){e.size>i.subMax&&a.push("".concat(e.path," 子包大小为 ").concat((0,d.formatSize)(e.size),", 超过 ").concat((0,d.formatSize)(i.subMax),"。"))})),(null==h?void 0:h.size)>i.subMax&&a.push("开放数据域大小为 ".concat((0,d.formatSize)(h.size),", 超过 ").concat((0,d.formatSize)(i.subMax),"。"))),a.length>0)throw new p.PackageSizeError("".concat(a.join("\n"),"\n可点击【查看解决方案】查看包体积优化方案,修改后重试。"));return[2]}}))}))};var w=new Map;t.folderToZipStream=function(e,t,n,r,o){var i=t.whiteList,l=void 0===i?[]:i,d=t.useTypeScript;return void 0===r&&(r=m.HIGH_WATER_MARK),void 0===o&&(o={}),a(this,void 0,void 0,(function(){var t,i,h,E,O,C,I=this;return s(this,(function(S){switch(S.label){case 0:return t=function(e,t){var r=t.getCloudfunctionRoot();if(r)return(0,y.filterFile)(e,{ignore:[{type:A.PACK_TYPE.FOLDER,value:r}]});if(n)return(0,y.filterFile)(e,t.getPackOptions());var o=t.getMiniprogramRoot();return(0,b.isSubPath)(o,e)&&(0,y.filterFile)(v.relative(o,e),t.getPackOptions())},i=function(){return a(I,void 0,void 0,(function(){var i,h,E,y,b,A,O,C,w,I,S,P,R=this;return s(this,(function(L){switch(L.label){case 0:return i=(0,f.default)("zip",{highWaterMark:r,statConcurrency:(0,m.maxConcurrency)()}),h=Date.now(),[4,(0,m.getProjectConfig)(e)];case 1:return E=L.sent(),y=E.isPluginProject(),b=(0,g.getWhiteList)(n,{isLivePlugin:o.isLivePlugin,isMicroappPlugin:y}).concat(l),[4,(0,_.default)(b,{cwd:e,stats:!1,dot:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})];case 2:return A=L.sent(),n?[3,6]:(O=E.getMiniprogramRoot(),C=v.join(e,O),[4,E.getAppJSON()]);case 3:return[4,L.sent().getKey("gameFiles")];case 4:return w=null!==(P=L.sent())&&void 0!==P?P:[],Array.isArray(w)&&w.length>0?(w=w.filter(m.isGameFileValid),[4,(0,_.default)(w,{cwd:C,dot:!1,stats:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})]):[3,6];case 5:I=(I=L.sent()).filter((function(e){return g.ALLOWED_MICROGAME_EXTS_REG.test(e)&&!e.startsWith("..")})).map((function(e){return v.join(O,e)})),A.push.apply(A,c([],u(I),!1)),L.label=6;case 6:return(S=new Set(A)).forEach((function(n){t(n,E)||!y&&d&&n.endsWith(".js")&&S.has(n.replace(/\.js$/,".ts"))||(y||d||!n.endsWith(".ts"))&&i.file(v.join(e,n),{name:n})})),[4,new Promise((function(e,t){i.on("warning",(function(e){"ENOENT"===e.code?console.warn("archiver with error ".concat(e.message)):t(new p.CompressError(e.message))})).on("error",(function(e){t(new p.CompressError(e.message))})),setTimeout((function(){return a(R,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,i.finalize()];case 1:return t.sent(),(0,m.isIDE)()&&console.info("[打包完成]耗时: ".concat(Date.now()-h,"ms,highWaterMark: ").concat(r,", statConcurrency: ").concat((0,m.maxConcurrency)())),e(i),[2]}}))}))}),100)}))];case 7:return[2,L.sent()]}}))}))},(h=w.get(e))?[4,h]:[3,2];case 1:S.sent(),S.label=2;case 2:E=i(),w.set(e,E),S.label=3;case 3:return S.trys.push([3,5,,6]),[4,E];case 4:return O=S.sent(),w.delete(e),[2,O];case 5:throw C=S.sent(),w.delete(e),C;case 6:return[2]}}))}))},t.prettyProjectSize=function(e){var t=e.total,n=e.main,r=e.sub,o=e.openData,i=[["主包",n.size]];null==r||r.sort((function(e,t){return t.size-e.size})).forEach((function(e){i.push([e.path,e.size])})),o&&i.push(["开放数据文件夹(".concat(o.path,")"),o.size]);var a=new h.default;return i.forEach((function(e){a.cell("路径",e[0]),a.cell("体积",(0,d.formatSize)(e[1]),h.default.leftPadder(" ")),a.newRow()})),a.total("体积",{reduce:function(e,n,r,o){return t},printer:function(e,n){return"总体积:"+(0,d.formatSize)(t)}}),a.toString()}},1441:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},l=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.projectToQRCode=t.upload=t.preview=t.checkProjectMatchAppid=t.checkChannel=void 0;var d=n(3374),f=n(3357),h=p(n(6245)),_=a(n(120)),v=n(6928),m=p(n(746)),E=n(8852),g=n(1453),y=n(9959),b=n(7497),A=p(n(4351)),O=n(4334),C=n(3777),w=n(1831),I=n(2539),S=n(3128),P=n(4794),R=n(240),L=n(5602);function T(e,t){if(!e)throw new Error("请检查 url 配置是否正常");return e.replace(/\$\{appid\}/g,t)}var D=(0,w.getCliDefaultStoragePath)(),N=(0,v.join)(D,"preview.json"),x={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default",page:{},previewPluginMode:"normal"};if((0,w.isCli)())if(_.existsSync(N))try{x=_.readJSONSync(N)}catch(e){}else _.ensureFileSync(N),_.writeJsonSync(N,x);function j(e){var t,n,o;return s(this,void 0,void 0,(function(){var i,a,s,c,l,p,_,v,m,g,y,A,O,C,S,P,R,D,N,x,j,k,U,F,G,B,H,V,W,q,J,z,$,K,Q,Y,X,Z,ee,te;return u(this,(function(u){switch(u.label){case 0:return i=e.devAppid,a=e.extAppid,s=e.pluginAppid,c=e.projectPath,l=e.type,p=e.uploadVersion,_=e.uploadChangeLog,v=e.uploadNeedUploadSourcemap,m=e.uploadNeedCheck,g=e.extraCheckInfoJson,y=e.localCompileVersion,A=e.extraInfoJson,O=e.interactGame,C=e.supportSourcemap,S=e.useTypeScript,P=e.channel,R=e.lynxPackages,D=e.openApplicationType,N=e.minJssdk,x=e.pluginList,j=e.timeReporter,U=new h.default,F=i,G="",O||"upload"!==l?[3,2]:(B=null==j?void 0:j.startStep(L.PROJECT_TO_QR_CODE_STEP.channelCheck),[4,M(i,P)]);case 1:u.sent(),null==B||B(),u.label=2;case 2:return H="liveplugin"===D,V=null==j?void 0:j.startStep(L.PROJECT_TO_QR_CODE_STEP.zip),[4,(0,E.folderToZipStream)(c,{whiteList:O?["**/*"]:v?["**/*.map"]:void 0,useTypeScript:S},!1,void 0,{isLivePlugin:H})];case 3:return W=u.sent(),q=(0,I.getConfig)(),J=f.AxiosInstance.put,O?[3,4]:(s?(U.append("plugin_app_id",s),U.append("is_plugin_project",1)):(null==x?void 0:x.length)&&U.append("dependency_plugin_info",JSON.stringify({dependency_plugin_list:x})),"preview"===l?(a&&(F=a,G="?devappid=".concat(i)),k=T(q.url.preview,F)+G,R&&U.append("lynx_packages",R)):(k=T(q.url.upload,F)+G,s?N&&U.append("min_jssdk",N):(U.append("need_check",String(!!m)),U.append("extra_check_info_json",g)),U.append("version",p),U.append("intro",_),U.append("need_upload_sourcemap",String(!!v)),P&&U.append("tag",P)),U.append("source",W,{filename:"source.zip"}),U.append("local_compile_version",null!=y?y:"4.0.0-cli"),A&&U.append("extra_info_json",A),H&&U.append("submit_app_type",1),[3,6]);case 4:return J=f.AxiosInstance.post,U.append("app_id",F),U.append("tech_type",16),[4,(0,w.getMD5Stream)(W)];case 5:z=u.sent(),U.append("src_md5",z.__md5),U.append("src",z,{filename:"src.zip"}),"preview"===l?(k=q.interactGameUrl.preview,U.append("extra_json",A)):(k=q.interactGameUrl.upload,U.append("version",p),U.append("intro",_),U.append("extra_json",A)),u.label=6;case 6:return C&&U.append("is_debug","1"),null==V||V(),$=null==j?void 0:j.startStep(L.PROJECT_TO_QR_CODE_STEP.upload),X=J,Z=[k,U],te={},ee=[{}],[4,(0,b.getLogInfoHeaders)(i)];case 7:return[4,X.apply(void 0,Z.concat([(te.headers=r.apply(void 0,[r.apply(void 0,ee.concat([u.sent()])),U.getHeaders()]),te.maxBodyLength=s?1/0:33554432,te)]))];case 8:if(K=u.sent(),Q=K.data,Y=K.headers,0===Q.error||0===Q.code)return null==$||$(),[2,{metrics:null!==(t=Q.performance_metrics)&&void 0!==t?t:{},logId:null!==(n=null==Y?void 0:Y["x-tt-logid"])&&void 0!==n?n:""}];if(100001===Q.error)throw new d.UploadError("请先完成开发配置",Q.error);if(100002===Q.error)throw new d.UploadError("请检查 appid 是否为直播互动插件类型",Q.error);throw new d.UploadError(null!==(o=Q.message)&&void 0!==o?o:Q.msg,Q.error)}}))}))}function M(e,t){return s(this,void 0,void 0,(function(){var n;return u(this,(function(r){switch(r.label){case 0:if(!t)return[2];if(!/^[1-9]\d*$/.test(t))throw new d.UploadError("通道只能是大于0的整数");return[4,k(e)];case 1:if((n=r.sent().limit_num)&&Number(t)>=n)throw new d.UploadError("通道不能大于 ".concat(n-1));return[4,q(e)];case 2:if(r.sent())throw new d.UploadError("沙盒小程序不支持通道");return[2]}}))}))}function k(e){return s(this,void 0,void 0,(function(){var t,n,r;return u(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),r={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return r.headers=o.sent(),t=r,[4,f.AxiosInstance.get("https://microapp.bytedance.com/api/developer/ide/v1/microapp/get_exist_test_version?app_id=".concat(e),t)];case 2:if(0===(n=o.sent()).data.code)return[2,n.data.data];throw new Error(n.data.msg);case 3:throw o.sent(),new Error("获取通道限制失败");case 4:return[2]}}))}))}function U(e,t,n,r,o){return void 0===r&&(r=!1),s(this,void 0,void 0,(function(){var i,a,s,c,l;return u(this,(function(u){switch(u.label){case 0:return l={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return l.headers=u.sent(),l.params={},i=l,a=e,s="",c="",n&&t&&(a=t,s="?devappid=".concat(e)),r?c="".concat((0,I.getConfig)().interactGameUrl.compileProgress,"?app_id=").concat(e,"&stage=").concat(n?"preview":"latest"):(o&&(i.params={is_plugin_project:1,plugin_app_id:o}),c=T((0,I.getConfig)().url.compileProgress,a)+s),[4,f.AxiosInstance.get(c,i).then((function(e){var t,n,o,i,a,s,u,c,l,p,d=e.data||{},f=d.error,h=d.status,_=d.message;return r&&(f=null===(t=e.data)||void 0===t?void 0:t.code,h=null===(o=null===(n=e.data)||void 0===n?void 0:n.data)||void 0===o?void 0:o.status,_=null!==(s=null===(a=null===(i=e.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.msg)&&void 0!==s?s:null===(u=e.data)||void 0===u?void 0:u.msg),1===f||r&&(1===h||0!==f)?{success:!1,done:!1,error:f,msg:_,errLink:null!==(c=e.data.err_link)&&void 0!==c?c:"",passJson:{}}:{success:!0,done:0===f&&2===h,error:f,msg:"",metrics:null!==(l=e.data.performance_metrics)&&void 0!==l?l:{},errLink:null!==(p=e.data.err_link)&&void 0!==p?p:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,u.sent()]}}))}))}function F(e,t,n,r,o){return void 0===r&&(r=!1),s(this,void 0,void 0,(function(){var i,a=this;return u(this,(function(c){switch(c.label){case 0:return i=0,[4,new Promise((function(c,l){var p=setInterval((function(){return s(a,void 0,void 0,(function(){var a,s,f,h,_,v,m,E,g;return u(this,(function(u){switch(u.label){case 0:return[4,U(e,t,n,r,o)];case 1:return a=u.sent(),s=a.success,f=a.msg,h=a.error,_=a.errLink,v=a.metrics,m=a.done,E=a.passJson,(i+=1)>100&&(clearInterval(p),l(new d.CompileError("查询编译进度超时"))),s||(clearInterval(p),g=new d.CompileError(f,_,h),l(g)),m&&(clearInterval(p),c({metrics:null!=v?v:{},passJson:E})),[2]}}))}))}),1e3)}))];case 1:return[2,c.sent()]}}))}))}function G(e){return s(this,void 0,void 0,(function(){var t,n,r;return u(this,(function(o){switch(o.label){case 0:return r={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return r.headers=o.sent(),t=r,n="".concat((0,I.getConfig)().url.check,"?app_id=").concat(e),[4,f.AxiosInstance.get(n,t).then((function(e){var t,n,r,o,i=e.data||{},a=i.code,s=i.err_msg;if(0!==a)return{success:!1,done:!1,error:a,msg:s,status:1};var u=null===(n=null===(t=e.data)||void 0===t?void 0:t.data)||void 0===n?void 0:n.status;return{success:!0,done:2===u||3===u,error:a,msg:"",status:u,result:(null===(o=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===o?void 0:o.check_list)||[]}})).catch((function(e){return{success:!1,error:-1,msg:e.message,status:1,done:!1}}))];case 2:return[2,o.sent()]}}))}))}function B(e){return s(this,void 0,void 0,(function(){var t=this;return u(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,r){var o=setInterval((function(){return s(t,void 0,void 0,(function(){var t,i,a,s,c,l,p;return u(this,(function(u){switch(u.label){case 0:return[4,G(e)];case 1:return t=u.sent(),i=t.success,a=t.msg,s=t.done,c=t.status,l=t.result,p=void 0===l?[]:l,i||(clearInterval(o),r({msg:a})),s&&(clearInterval(o),n({status:c,result:p})),[2]}}))}))}),1e3)}))];case 1:return[2,n.sent()]}}))}))}function H(e,t){return void 0===t&&(t=e.getAppid()),s(this,void 0,void 0,(function(){var n,r,o,i;return u(this,(function(a){switch(a.label){case 0:return[4,Promise.all([e.detectProjectType("game"),e.detectProjectType("liveplugin"),(0,S.isRealToyId)(t)])];case 1:if(n=c.apply(void 0,[a.sent(),3]),r=n[0],o=n[1],i=n[2],o&&i)return[2];if(!r&&i)throw new d.ProjectError('当前项目为小程序项目,但是 "'.concat(t,'" 属于小玩法 ID。'));if(r&&!i)throw new d.ProjectError('当前项目为小玩法项目,但是 "'.concat(t,'" 属于小程序 ID。'));return[2]}}))}))}function V(e,t){var n,r;if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o=o.filter((function(t){return void 0!==e[t]})),i=i.filter((function(e){return void 0!==t[e]})),o.length!==i.length)return!1;try{for(var a=l(o),s=a.next();!s.done;s=a.next()){var u=s.value;if(!i.includes(u)||!V(e[u],t[u]))return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return!0}function W(e,t){var n,o;return void 0===t&&(t=5e3),s(this,void 0,void 0,(function(){var i,a,s,c,l,p,f,h,v,b,I,R,T,D,M,k,U,G,W,q,z,$,K,Q,Y,X,Z,ee,te,ne,re,oe,ie,ae,se,ue,ce,le,pe,de,fe,he,_e,ve,me,Ee,ge,ye,be,Ae,Oe,Ce,we,Ie,Se;return u(this,(function(u){switch(u.label){case 0:return i=(0,w.createTimeReporter)(),[4,(0,P.isCliNeedForceUpdate)("microapp")];case 1:return u.sent(),a={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},s=e.project,c=e.page,l=e.qrcode,p=e.cache,f=e.uploadOptions,h=e.localCompileVersion,v=e.ideConfig,b=e.debug,I=e.uploadCache,R=e.interactGame,T=e.supportSourcemap,D=e.enableHotRestartCache,M=e.penetrateMapJson,k=e.updateStatus,U=e.setCheckResult,G=e.traceVersion,W=e.traceMode,q=e.useLocalSchema,z=e.previewPluginMode,$=void 0===z?"normal":z,c&&function(e){var t,n;function r(e){for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(n<32||127===n)return!0}return!1}if(r(null!==(t=e.path)&&void 0!==t?t:"")||r(null!==(n=e.query)&&void 0!==n?n:""))throw new d.ProjectError("页面路径和页面参数中不能包含控制字符")}(c),K=s.path,Q=e.lynxPackages,Y="",I||p?(X=i.startStep(L.PROJECT_TO_QR_CODE_STEP.hash),[4,(0,y.getProjectHash)(K,!1,t)]):[3,3];case 2:Y=u.sent(),X(),u.label=3;case 3:return Z=f?"upload":"preview",ee=!1,p&&((0,w.isCli)()||(null==v?void 0:v.previewScene)===x.previewScene)&&Y&&x.hash===Y&&x.shortUrl&&x.previewPluginMode===$&&x.expireTime>Date.now()/1e3&&V(c,x.page)&&Q===x.lynxPackages&&!q?(a.shortUrl=x.shortUrl,a.expireTime=x.expireTime,a.originSchema=x.originSchema,x.previewPluginMode=$,a.useCache=!0,A.default.info("项目文件无变动,使用缓存"),ee=!0,[3,22]):[3,4];case 4:return te=i.startStep(L.PROJECT_TO_QR_CODE_STEP.prepare),(0,O.addNodeToMetrics)(a.metrics,"compileCreate"),[4,(0,w.getProjectConfig)(K)];case 5:return[4,(ne=u.sent()).getRealAppid()];case 6:return re=u.sent(),(0,w.validateAppId)(re),[4,H(ne,re)];case 7:return u.sent(),(0,O.addFieldToMetrics)(a.metrics,"appId",re),oe=ne.isPluginProject(),[4,ne.getRealPluginAppid()];case 8:if(ie=u.sent(),oe&&!ie)throw new d.ProjectError("当前为插件项目,但是 project.config.json 不存在 pluginAppid 或为空,请检查 project.config.json 配置。");if(oe&&"testpluginappid"===ie)throw new d.ProjectError("pluginAppid 为测试号,无法预览,请检查 project.config.json 配置。");return ae=null,[4,(0,g.detectValidExtApp)(re,K)];case 9:if((se=u.sent()).invalidReason||(ae=se.ext.extAppid),se.invalidReason&&se.invalidReason.reason!==g.INVALID_EXTAPP_REASON.EXT_DISABLED&&se.invalidReason.reason!==g.INVALID_EXTAPP_REASON.INVALID_EXT_JSON)throw new d.ProjectError('当前 ext.json "extEnable" 为 true,但是由于三方配置异常,当前工程仍为普通小程序工程,错误原因是:'.concat(se.invalidReason.errMsg));return ue=A.default.loading("正在准备上传..."),q&&!Q&&(Q=ne.getLynxPackage()),ce=!(I&&Y&&x.hash===Y&&x.shortUrl&&x.expireTime>Date.now()/1e3&&Q===x.lynxPackages),te(),ce?(le=i.startStep(L.PROJECT_TO_QR_CODE_STEP.check),[4,(0,E.verifySubPackageSize)(ne,Z)]):[3,19];case 10:return u.sent(),"upload"!==Z||R||(0,w.isIDE)()||oe?[3,12]:[4,(0,S.getAppVersions)(re)];case 11:if(pe=u.sent().audit_version,f.version||(f.version=(0,w.getNextVersion)(pe),A.default.info("\nThe default version is ".concat(f.version,"."))),pe&&f&&1===(0,m.default)(pe,f.version))throw new d.UploadError("".concat(f.version," is smaller than ").concat(pe,"(pre order version)"));u.label=12;case 12:return de={upload:1,check:1,compile:1},ue.text="正在上传中...",null==k||k(de),(0,O.addNodeToMetrics)(a.metrics,"IDERequest"),fe=[],ie?[3,14]:[4,ne.getAppJSON()];case 13:if(he=u.sent(),_e=he.rawJSON,ve=null==_e?void 0:_e.plugins)try{(null==(me=null===(n=Object.values(ve))||void 0===n?void 0:n.map((function(e){return{plugin_id:e.provider,plugin_version:e.version}})))?void 0:me.length)>0&&(fe=me)}catch(e){console.error("[upload] get plugins list error in app.json",e)}u.label=14;case 14:return le(),[4,j({devAppid:re,extAppid:ae,pluginAppid:ie,projectPath:K,type:Z,uploadChangeLog:null==f?void 0:f.changeLog,uploadVersion:null==f?void 0:f.version,uploadNeedUploadSourcemap:null==f?void 0:f.needUploadSourcemap,uploadNeedCheck:null==f?void 0:f.needUploadCheck,extraCheckInfoJson:null==f?void 0:f.extraCheckInfoJson,extraInfoJson:J(ne,Z,e.extraInfoJson),localCompileVersion:h,interactGame:R,supportSourcemap:T,useTypeScript:ne.useTypeScript(),channel:null==f?void 0:f.channel,minJssdk:null==f?void 0:f.minJssdk,lynxPackages:Q,openApplicationType:null==v?void 0:v.openApplicationType,pluginList:fe,timeReporter:i})];case 15:return Ee=u.sent(),de.upload=2,null==k||k(de),(0,O.addFieldToMetrics)(a.metrics,"logId",Ee.logId),ge=i.startStep(L.PROJECT_TO_QR_CODE_STEP.compile),(null==f?void 0:f.needUploadCheck)?(ue.text="查询预检进度中...",ye=i.startStep(L.PROJECT_TO_QR_CODE_STEP.preCheck),[4,B(re)]):[3,17];case 16:be=u.sent(),ye(),de.check=be.status,null==k||k(de),null==U||U(be),u.label=17;case 17:return ue.text="查询编译进度中...",[4,F(re,ae,"preview"===Z,!!R,ie)];case 18:Ae=u.sent(),ge(),de.compile=2,null==k||k(de),a.metrics=(0,O.mergeMetrics)(a.metrics,Ee.metrics,Ae.metrics),a.passJson=Ae.passJson,(0,O.addNodeToMetrics)(a.metrics,"IDEReceiveResponse"),u.label=19;case 19:return null===(null==l?void 0:l.format)?[3,21]:(ue.text="生成二维码中...",Oe=i.startStep(L.PROJECT_TO_QR_CODE_STEP.makeSchema),[4,(0,C.makeSchema)({devAppid:re,extAppid:ae,startPage:c.path,query:c.query,scene:c.scene,bdpLog:{launch_from:c.launchFrom,location:c.location,entrance_form:"990001",enter_from_merge:"scan",enter_position:"qr_code"},headers:{},ideConfig:v,qrcodeQuery:null==b?void 0:b.query,referrerInfo:c.referrerInfo,hotRestartHash:D&&Y?Y:"",type:Z,penetrateMapJson:M,traceVersion:G,traceMode:W,isInteractGame:!!R,uploadOptions:f,pluginAppid:ie,previewPluginMode:$})]);case 20:Ce=u.sent(),Oe(),a.shortUrl=Ce.shortUrl,a.expireTime=Ce.expireTime,a.originSchema=Ce.originSchema,u.label=21;case 21:(0,O.addNodeToMetrics)(a.metrics,"compileClose"),ue.stop(),u.label=22;case 22:return"imageFile"!==(null==l?void 0:l.format)?[3,25]:l.output?[4,(0,C.toQRCodeFile)(a.shortUrl,l.output)]:[3,24];case 23:we=u.sent(),a.qrcodeFilePath=we,A.default.info("二维码图片已存储到 ".concat(we)),u.label=24;case 24:return[3,28];case 25:return"imageSVG"!==(null==l?void 0:l.format)?[3,28]:ee&&x.qrcodeSVG?(a.qrcodeSVG=x.qrcodeSVG,[3,28]):[3,26];case 26:return Ie=a,[4,(0,C.toQRCodeSVG)(a.shortUrl)];case 27:Ie.qrcodeSVG=u.sent(),u.label=28;case 28:return function(e){x=e,(0,w.isCli)()&&_.writeJsonSync(N,x)}({shortUrl:a.shortUrl,expireTime:a.expireTime,originSchema:a.originSchema,hash:Y,previewScene:null!==(o=null==v?void 0:v.previewScene)&&void 0!==o?o:"default",qrcodeSVG:a.qrcodeSVG,page:c,lynxPackages:Q}),Se=i.finish(),e.needTimeReport?[2,r(r({},a),{timeReport:Se})]:[2,a]}}))}))}function q(e){var t,n,o;return s(this,void 0,void 0,(function(){var i,a,s,c;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),a=f.AxiosInstance,c={url:"https://developer.open-douyin.com/bff_api/app/setting/v2/".concat(e,"/microappinfoservice/getMicroappInfo"),params:{appId:e}},s=[{}],[4,(0,b.getLogInfoHeaders)(e)];case 1:return[4,a.apply(void 0,[(c.headers=r.apply(void 0,s.concat([u.sent()])),c.timeout=2e4,c)])];case 2:return i=u.sent(),[2,(null===(o=null===(n=null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.data)||void 0===n?void 0:n.appInfo)||void 0===o?void 0:o.isSandboxApp)||!1];case 3:return u.sent(),[2,!1];case 4:return[2]}}))}))}function J(e,t,n){if("preview"===t&&e.getBigPackageSizeSupport()){var r=(0,R.parseJson)(null!=n?n:"{}");return r.bigPackageSizeSupport=!0,JSON.stringify(r)}return n}t.checkChannel=M,t.checkProjectMatchAppid=H,t.preview=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,(0,w.verifyLoginTypeAuth)(e.project.path)];case 1:return t.sent(),A.default.info("⚙️ Start to preview project..."),[4,W(e)];case 2:return[2,t.sent()]}}))}))},t.upload=function(e){var t;return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,(0,w.verifyLoginTypeAuth)(e.project.path)];case 1:return n.sent(),[4,W({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"990001",launchFrom:"scan",location:"qr_code"},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap,needUploadCheck:!!e.needUploadCheck,extraCheckInfoJson:JSON.stringify({}),channel:e.channel,minJssdk:e.minJssdk},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig,interactGame:e.interactGame,penetrateMapJson:e.penetrateMapJson})];case 2:return[2,n.sent()]}}))}))},t.projectToQRCode=W},1453:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.detectValidExtApp=t.INVALID_EXTAPP_REASON=void 0;var a,s=n(8950),u=n(3357),c=n(7497),l=i(n(4351)),p=n(3374);!function(e){e[e.INVALID_APPID_META=0]="INVALID_APPID_META",e[e.INVALID_EXTAPPID=1]="INVALID_EXTAPPID",e[e.EXT_DISABLED=2]="EXT_DISABLED",e[e.INVALID_EXT_JSON=3]="INVALID_EXT_JSON",e[e.INVALID_AUTH=4]="INVALID_AUTH",e[e.NULL=5]="NULL"}(a=t.INVALID_EXTAPP_REASON||(t.INVALID_EXTAPP_REASON={}));var d=function(){function e(){this._thirdPartyMetaMap={}}return e.prototype.getThirdPartyMeta=function(e){var t,n,i,a;return r(this,void 0,void 0,(function(){var r,s,d,f,h,_;return o(this,(function(o){switch(o.label){case 0:return this._thirdPartyMetaMap[e]?[2,this._thirdPartyMetaMap[e]]:(r={isThirdPartyApp:!1,thirdPartyName:""},[4,(0,c.getLogInfoHeaders)(e)]);case 1:s=o.sent(),d="https://microapp.bytedance.com/api/v1/app/".concat(e,"/meta"),f={headers:s},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.AxiosInstance.get(d,f)];case 3:return h=o.sent().data,this._thirdPartyMetaMap[e]={isThirdPartyApp:h.data.is_thirdparty_dev,thirdPartyName:h.data.thirdparty.name},[3,5];case 4:if(_=o.sent(),401===(null===(t=_.response)||void 0===t?void 0:t.status))throw new p.LoginError(null!==(a=null===(i=null===(n=_.response)||void 0===n?void 0:n.data)||void 0===i?void 0:i.message)&&void 0!==a?a:"尚未登录");return l.default.error("getThirdPartyMeta",_),[2,r];case 5:return[2,this._thirdPartyMetaMap[e]]}}))}))},e.prototype.checkExtAppIdAuth=function(e,t){var n,i,a,s;return r(this,void 0,void 0,(function(){var r,d,f,h;return o(this,(function(o){switch(o.label){case 0:return r="https://microapp.bytedance.com/api/thirdparty/validate_ext_appid?dev_appid=".concat(e,"&ext_appid=").concat(t),[4,(0,c.getLogInfoHeaders)(e)];case 1:d=o.sent(),f={headers:d},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,u.AxiosInstance.get(r,f)];case 3:return[2,0===o.sent().data.error];case 4:if(h=o.sent(),401===(null===(n=h.response)||void 0===n?void 0:n.status))throw new p.LoginError(null!==(s=null===(a=null===(i=h.response)||void 0===i?void 0:i.data)||void 0===a?void 0:a.message)&&void 0!==s?s:"尚未登录");return l.default.error("checkExtAppIdAuth",h),[2,!1];case 5:return[2]}}))}))},e.prototype.getExtData=function(e){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,s.ProjectConfig.from(e)];case 1:return[4,t.sent().getExtJSON()];case 2:return[2,t.sent().rawJSON];case 3:return t.sent(),[2,null];case 4:return[2]}}))}))},e.prototype.detectValidExtApp=function(e,t){return r(this,void 0,void 0,(function(){var n,r,i,s,u;return o(this,(function(o){switch(o.label){case 0:return n={invalidReason:null,ext:null,thirdPartyName:null},[4,this.getExtData(t)];case 1:return(r=o.sent())?r.extEnable?r.extAppid?[4,this.getThirdPartyMeta(e)]:(n.invalidReason={reason:a.INVALID_EXTAPPID,errMsg:"ext.json 中 extAppid 异常"},[2,n]):(n.invalidReason={reason:a.EXT_DISABLED,errMsg:"ext.json 中 extEnable 为 false"},[2,n]):(n.invalidReason={reason:a.INVALID_EXT_JSON,errMsg:"请检查项目根目录 ext.json 是否存在或者格式是否正确"},[2,n]);case 2:return i=o.sent(),s=i.isThirdPartyApp,u=i.thirdPartyName,s?[4,this.checkExtAppIdAuth(e,r.extAppid)]:(n.invalidReason={reason:a.INVALID_APPID_META,errMsg:"当前 appid 获取不到第三方平台信息,请检查当前 appId 是否可以合法预览并且正常关联第三方平台"},[2,n]);case 3:return o.sent()?(n.ext=r,n.thirdPartyName=u,[2,n]):(n.invalidReason={reason:a.INVALID_AUTH,errMsg:"当前 AppID 没有资质开发对应的第三方小程序,请检查 project.config.json 中的 “appid” 字段以及 ext.json 中的 “extAppid” 字段是否填写正确"},[2,n])}}))}))},e.Instance=new e,e}();t.detectValidExtApp=d.Instance.detectValidExtApp.bind(d.Instance)},3681:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PROJECT_TO_QR_CODE_STEP=t.getProjectToQRCodeStepReporterDesc=t.setProjectHashFn=t.getProjectHash=t.microgame=t.folderToZipStream=t.setAppConfig=t.makeSchema=t.INVALID_EXTAPP_REASON=t.checkProjectMatchAppid=t.verifySubPackageSize=t.getProjectSize=t.detectValidExtApp=t.getConfig=t.setCookieFn=t.projectToQRCode=t.upload=t.preview=t.buildNpm=t.getAuditHostsList=t.audit=t.checkSession=t.sendVerificationCodeToPhone=t.logout=t.loginByPhone=t.loginByEmail=t.create=t.setConfig=t.open=void 0;var l=n(378);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return l.audit}}),Object.defineProperty(t,"getAuditHostsList",{enumerable:!0,get:function(){return l.getAuditHostsList}});var p=n(2539);Object.defineProperty(t,"getConfig",{enumerable:!0,get:function(){return p.getConfig}}),Object.defineProperty(t,"setConfig",{enumerable:!0,get:function(){return p.setConfig}});var d=n(1553);Object.defineProperty(t,"create",{enumerable:!0,get:function(){return d.createProject}});var f=n(5568);Object.defineProperty(t,"checkSession",{enumerable:!0,get:function(){return f.checkSession}}),Object.defineProperty(t,"loginByEmail",{enumerable:!0,get:function(){return f.loginByEmail}}),Object.defineProperty(t,"loginByPhone",{enumerable:!0,get:function(){return f.loginByPhone}}),Object.defineProperty(t,"logout",{enumerable:!0,get:function(){return f.logout}}),Object.defineProperty(t,"sendVerificationCodeToPhone",{enumerable:!0,get:function(){return f.sendVerificationCodeToPhone}});var h=n(1596),_=c(n(2133)),v=n(8852);Object.defineProperty(t,"getProjectSize",{enumerable:!0,get:function(){return v.getProjectSize}}),Object.defineProperty(t,"verifySubPackageSize",{enumerable:!0,get:function(){return v.verifySubPackageSize}});var m=n(1441);Object.defineProperty(t,"checkProjectMatchAppid",{enumerable:!0,get:function(){return m.checkProjectMatchAppid}}),Object.defineProperty(t,"preview",{enumerable:!0,get:function(){return m.preview}}),Object.defineProperty(t,"projectToQRCode",{enumerable:!0,get:function(){return m.projectToQRCode}});var E=n(1453);Object.defineProperty(t,"detectValidExtApp",{enumerable:!0,get:function(){return E.detectValidExtApp}}),Object.defineProperty(t,"INVALID_EXTAPP_REASON",{enumerable:!0,get:function(){return E.INVALID_EXTAPP_REASON}});var g=n(7497);Object.defineProperty(t,"setCookieFn",{enumerable:!0,get:function(){return g.setCookieFn}});var y=n(3777);Object.defineProperty(t,"makeSchema",{enumerable:!0,get:function(){return y.makeSchema}});var b=n(7004),A=n(1497);Object.defineProperty(t,"setAppConfig",{enumerable:!0,get:function(){return A.setAppConfig}}),t.open=function(e){return s(this,void 0,void 0,(function(){var t,n;return u(this,(function(r){switch(r.label){case 0:return t=e.project,n=e.remotePort,[4,(0,_.default)({projectPath:t.path,mode:t.mode,type:"microapp"},n)];case 1:return[2,r.sent()]}}))}))},t.buildNpm=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){switch(n.label){case 0:return t=e.project,[4,(0,h.buildNpm)({projectPath:t.path})];case 1:return[2,n.sent()]}}))}))},t.upload=function(e){var t,n;return s(this,void 0,void 0,(function(){var r;return u(this,(function(o){switch(o.label){case 0:return S.reportCommandCall("upload"),[4,(0,m.upload)(e)];case 1:return r=o.sent(),S.report(b.CLI_EVENTS.IDE_CLI_UPLOAD_SUCCESS,{appid:(null===(t=r.metrics)||void 0===t?void 0:t.appId)||"",logid:(null===(n=r.metrics)||void 0===n?void 0:n.logId)||""}),[2,r]}}))}))},i(n(3128),t);var O=n(8852);Object.defineProperty(t,"folderToZipStream",{enumerable:!0,get:function(){return O.folderToZipStream}}),i(n(4334),t),t.microgame=a(n(1724));var C=n(9959);Object.defineProperty(t,"getProjectHash",{enumerable:!0,get:function(){return C.getProjectHash}}),Object.defineProperty(t,"setProjectHashFn",{enumerable:!0,get:function(){return C.setProjectHashFn}});var w=n(1831);Object.defineProperty(t,"getProjectToQRCodeStepReporterDesc",{enumerable:!0,get:function(){return w.getProjectToQRCodeStepReporterDesc}});var I=n(5602);Object.defineProperty(t,"PROJECT_TO_QR_CODE_STEP",{enumerable:!0,get:function(){return I.PROJECT_TO_QR_CODE_STEP}});var S=b.CliMonitor.getInstance({cliVersion:"2.0.14",cliName:"tt-minigame-ide-cli"});S.report(b.CLI_EVENTS.IDE_CLI_LAUNCH)},4973:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CliMonitor=void 0;var i=n(2073),a=o(n(857)),s=n(7549),u=n(2539),c=n(201),l=n(1831),p=n(7497),d="";function f(){if(!d)try{d=(0,s.machineIdSync)(!0)}catch(e){console.error(e)}return d}var h=function(){function e(e){this._didReportLaunch=!1;var t=e.cliVersion,n=e.cliName;"true"!==process.env.isIDE?(this._commonParams={ideVersion:t,deviceId:f(),osPlatform:a.default.platform(),osVersion:a.default.release(),cliName:n},this._commonData={userId:(0,p.getUserId)(),username:""}):(this._commonParams={ideVersion:t,deviceId:"",osPlatform:a.default.platform(),osVersion:a.default.release(),cliName:n},this._commonData={userId:"",username:""})}return e.updateCommonParams=function(e){this._instance._commonData=Object.assign(this._instance._commonData,e)},e.getInstance=function(t){return this._instance||(this._instance=new e(t)),this._instance},e.prototype.shouldReport=function(e){return!(!1===(0,u.getConfig)().allowReportEvent||"true"===process.env.isIDE||e===c.CLI_EVENTS.IDE_CLI_LAUNCH&&this._didReportLaunch||"no"===process.env.ALLOW_REPORT_EVENT)},e.prototype.report=function(e,t){void 0===t&&(t={}),this.shouldReport(e)&&(e===c.CLI_EVENTS.IDE_CLI_LAUNCH&&(this._didReportLaunch=!0,t.scene=(0,l.isCli)()?"cli":"require"),(0,i.reportTeaImmediately)(this._commonParams,[{event:e,params:r(r({},t),this._commonData)}]))},e.prototype.reportCommandCall=function(e){this.report("IDE_CLI_COMMAND_CALL",{command_name:e})},e}();t.CliMonitor=h},201:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=void 0,t.CLI_EVENTS={IDE_CLI_LAUNCH:"IDE_CLI_LAUNCH",IDE_CLI_COMMAND_CALL:"IDE_CLI_COMMAND_CALL",IDE_CLI_PREVIEW_SUCCESS:"IDE_CLI_PREVIEW_SUCCESS",IDE_CLI_PREVIEW_FAIL:"IDE_CLI_PREVIEW_FAIL",IDE_CLI_UPLOAD_SUCCESS:"IDE_CLI_UPLOAD_SUCCESS",IDE_CLI_UPLOAD_FAIL:"IDE_CLI_UPLOAD_FAIL",IDE_CLI_ERROR:"IDE_CLI_ERROR",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER",IDE_CLI_FORCE_UPGRADE:"IDE_CLI_FORCE_UPGRADE"}},7004:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=t.CliMonitor=void 0;var r=n(4973);Object.defineProperty(t,"CliMonitor",{enumerable:!0,get:function(){return r.CliMonitor}});var o=n(201);Object.defineProperty(t,"CLI_EVENTS",{enumerable:!0,get:function(){return o.CLI_EVENTS}})},5602:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PROJECT_TO_QR_CODE_STEP_DESC=t.PROJECT_TO_QR_CODE_STEP=t.TEMPLATE_PLUGIN_DOWNLOAD_URL=t.TS_TEMPLATE_DOWNLOAD_URL=t.TEMPLATE_DOWNLOAD_URL=t.IDE_SCHEMA=void 0,t.IDE_SCHEMA="bytedanceide:",t.TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master.zip",t.TS_TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master-ts.zip",t.TEMPLATE_PLUGIN_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/microapp-plugin-template-js.zip",t.PROJECT_TO_QR_CODE_STEP={channelCheck:"channel_check",zip:"source_zip",upload:"upload_source_zip",hash:"hash_project",prepare:"prepare",check:"check",compile:"cloud_download_and_compile",preCheck:"pre_check",makeSchema:"make_schema"},t.PROJECT_TO_QR_CODE_STEP_DESC=((n={})[t.PROJECT_TO_QR_CODE_STEP.channelCheck]="通道检查耗时",n[t.PROJECT_TO_QR_CODE_STEP.zip]="打压缩包耗时",n[t.PROJECT_TO_QR_CODE_STEP.upload]="上传压缩包耗时",n[t.PROJECT_TO_QR_CODE_STEP.hash]="hash计算耗时",n[t.PROJECT_TO_QR_CODE_STEP.prepare]="各项检测准备耗时",n[t.PROJECT_TO_QR_CODE_STEP.check]="包体检查耗时",n[t.PROJECT_TO_QR_CODE_STEP.compile]="云端下载编译耗时",n[t.PROJECT_TO_QR_CODE_STEP.preCheck]="项目预检耗时",n[t.PROJECT_TO_QR_CODE_STEP.makeSchema]="schema生成耗时",n)},7497:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.getLogInfoHeaders=t.setCookieFn=t.removeUserCookies=t.saveUserCookies=t.getUserId=t.getUserCookies=void 0;var c=i(n(120)),l=i(n(6928)),p=n(2539),d=n(1831),f=n(1497),h="",_="";function v(){var e=(0,p.getConfig)();return l.join(e.storagePath,".cookies")}t.getUserCookies=function(){return a(void 0,void 0,void 0,(function(){var e,t;return s(this,(function(n){if(h)return[2,h];try{return[2,h=null!==(t=null===(e=c.readFileSync(v(),"utf-8").split("\n")[0])||void 0===e?void 0:e.trim())&&void 0!==t?t:""]}catch(e){throw h="",new Error("检测到本地无 Cookie,请重新登录")}return[2]}))}))},t.getUserId=function(){var e,t;if(_)return _;try{_=null!==(t=null===(e=c.readFileSync(v(),"utf-8").split("\n")[1])||void 0===e?void 0:e.trim())&&void 0!==t?t:""}catch(e){_=""}return _},t.saveUserCookies=function(e,t){if(_=t,e&&!(e.length<1)){var n=v();c.ensureFileSync(n),h=function(e){void 0===e&&(e=[]);var t=function(e){return void 0===e&&(e=[]),e.map((function(e){var t={name:"",value:""};return e.split("; ").reduce((function(e,t,n){var r=u(t.split("="),2),o=r[0],i=r[1];return 0===n?(e.name=o,e.value=i,e):(e[o]=i,e)}),t),t}))}(e);return function(e,t,n){void 0===t&&(t="sessionid_microapp"),void 0===n&&(n="sessionid_dy_open");var r=function(e,t){return void 0===t&&(t="sessionid_microapp"),e.find((function(e){return e.name===t}))}(e,t);return e.concat([Object.assign({},r,{name:"sessionid"}),Object.assign({},r,{name:n})])}(t)}(e).map((function(e){var t=e.name,n=e.value;return"".concat(t,"=").concat(n)})).join(";");var r=h+"\n"+t;c.writeFileSync(l.join(n),r)}},t.removeUserCookies=function(){h="",_="";try{c.removeSync(v())}catch(e){if("ENOENT"===e.code)return;throw e}},t.setCookieFn=function(e){t.getUserCookies=e},t.getLogInfoHeaders=function(e){return a(void 0,void 0,void 0,(function(){var n,r,o;return s(this,(function(i){switch(i.label){case 0:if((0,d.isIDE)()||!(n=(0,f.getToken)(e)))return[3,5];if(!n)return[3,5];r=void 0,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,t.getUserCookies)()];case 2:return r=i.sent(),[3,4];case 3:return i.sent(),r="",[3,4];case 4:return[2,{"x-cli-token":n,"x-cli-appid":e,Cookie:r}];case 5:return o={},[4,(0,t.getUserCookies)()];case 6:return[2,(o.Cookie=i.sent(),o)]}}))}))}},9959:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.setProjectHashFn=t.getProjectHash=void 0;var i=n(1079),a=n(3374),s=n(1831),u=n(3123);t.getProjectHash=function(e,t,n,c){return void 0===c&&(c={}),r(void 0,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),n=(0,s.isMac)()?(0,u.getWhiteList)(t,c):(0,u.getWhiteList)(t,c).map((function(e){return"*".concat(e.slice(3))})),[4,(0,i.hashElement)(".",e,{encoding:"hex",folders:{exclude:[".*","node_modules"]},files:{include:n,matchBasename:!1,matchPath:!0}})];case 1:return[2,o.sent().hash];case 2:throw r=o.sent(),new a.HashError("获取工程文件夹 hash 失败:".concat(r.toString()));case 3:return[2]}}))}))},t.setProjectHashFn=function(e){return r(this,void 0,void 0,(function(){var n=this;return o(this,(function(i){return t.getProjectHash=function(t,i,a,s){return void 0===a&&(a=5e3),void 0===s&&(s={}),r(n,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n){var r=setTimeout((function(){console.info("[hash project timeout]"),n("")}),a);e(t,i,a,s).then((function(e){clearTimeout(r),n(e)})).catch((function(){clearTimeout(r),n("")}))}))];case 1:return[2,n.sent()]}}))}))},[2]}))}))}},4351:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(4731)),s=i(n(6924)),u=n(9023),c=n(1831),l=function(){function e(){}return e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.loading=function(e){return{color:"green",text:e,stop:function(){}}},e.prototype.stopLoading=function(){},e}(),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l),d=null,f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.info(a.default.green(u.format.apply(null,e)))},t.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.warn(a.default.yellow(u.format.apply(null,e)))},t.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error(a.default.red(u.format.apply(null,e)))},t.prototype.loading=function(e){return d=(0,s.default)({text:e,interval:80}).start()},t.prototype.stopLoading=function(){d&&(d.stop(),d=null)},t}(l),h=(0,c.isCli)()?new f:new p;t.default=h},7290:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.loginInfo=void 0;var o=n(2539),i=r(n(6928)),a=r(n(120)),s=function(){var e=(0,o.getConfig)();return i.default.join(e.storagePath,".login")},u=function(){function e(){this._loginInfo={type:"",partner:!1}}return e.prototype.readCache=function(){try{var e=s();a.default.ensureFileSync(e);var t=a.default.readFileSync(e,"utf-8"),n=JSON.parse(t);this._loginInfo=n}catch(e){throw console.error("读取缓存出错:",e),e}},e.prototype.writeCache=function(){try{var e=s();a.default.ensureFileSync(e);var t=JSON.stringify(this._loginInfo,null,2);a.default.writeFileSync(e,t,"utf-8")}catch(e){console.error("写入缓存出错:",e)}},e.prototype.getLoginInfo=function(){return""===this._loginInfo.type&&this.readCache(),this._loginInfo},e.prototype.setLoginInfo=function(e){this._loginInfo=Object.assign({},this._loginInfo,e),this.writeCache()},e}();t.loginInfo=new u},4334:function(e,t){"use strict";var n=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Metrics=t.mergeMetrics=t.addFieldToMetrics=t.addNodeToMetrics=void 0,t.addNodeToMetrics=function(e,t){e.nodes||(e.nodes=[]),e.nodes.push({node:t,timestamp:Date.now()})},t.addFieldToMetrics=function(e,t,n){"nodes"!==t&&void 0!==n&&(e[t]=n)},t.mergeMetrics=function(){for(var e,t,a,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];var c={nodes:[]};try{for(var l=r(s.filter(Boolean)),p=l.next();!p.done;p=l.next()){var d=p.value,f=d.nodes,h=n(d,["nodes"]);for(var _ in(a=c.nodes).push.apply(a,i([],o(null!=f?f:[]),!1)),h)void 0!==h[_]&&null!==h[_]&&(c[_]=h[_])}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}return c};var a=function(){function e(){this.nodes=[],this.tags={}}return e.prototype.addNode=function(e,t){return void 0===t&&(t=Date.now()),this.nodes.push({node:e,timestamp:t}),this},e.prototype.updateField=function(e,t){return void 0!==t?this.tags[e]=t:delete this.tags[e],this},e.prototype.merge=function(){for(var e,t,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];try{for(var a=r(o.filter(Boolean)),s=a.next();!s.done;s=a.next()){var u=s.value,c=u.nodes,l=n(u,["nodes"]);for(var p in this.nodes=this.nodes.concat(c),l)void 0!==l[p]&&(this.tags[p]=l[p])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this},e.prototype.settle=function(e){void 0===e&&(e=!1);var t=Object.assign({},this.tags);return t.nodes=this.nodes,e&&this.clear(),t},e.prototype.clear=function(){return this.nodes=[],this.tags={},this},e}();t.Metrics=a},3777:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateTerminalQrCode=t.toQRCodeFile=t.toQRCodeSVG=t.makeSchema=void 0;var l=n(3374),p=n(3357),d=c(n(753)),f=c(n(6928)),h=c(n(4518)),_=a(n(1645)),v=n(2539),m=n(7497),E=c(n(4351)),g=n(1831);t.makeSchema=function(e){var t=this;return new Promise((function(n,o){return s(t,void 0,void 0,(function(){var t,i,a,s,c,d,f,h,_,E,y,b,A,O,C,w,I,S,P,R,L,T,D,N,x,j,M,k,U,F,G,B,H,V,W,q,J;return u(this,(function(u){switch(u.label){case 0:return t=e.devAppid,i=e.extAppid,a=e.startPage,s=e.query,c=e.scene,d=e.bdpLog,f=e.qrcodeQuery,h=e.headers,_=e.ideConfig,E=e.isInteractGame,y=e.referrerInfo,b=e.hotRestartHash,A=e.type,O=e.penetrateMapJson,C=e.traceVersion,w=e.traceMode,I=e.uploadOptions,S=e.pluginAppid,P=e.previewPluginMode,R=(0,v.getConfig)().url.makeSchema,L={},i&&(L={devappid:t}),[4,(0,m.getLogInfoHeaders)(t)];case 1:T=u.sent(),D=a?"".concat(a,"?").concat(s):"",N={skip_domain_check:!!(null==_?void 0:_.skipDomainCheck),inspect_platform:null!==(F=null==_?void 0:_.inspectPlatform)&&void 0!==F?F:"all",ide_version:null==_?void 0:_.ideVersion,ide_os:null==_?void 0:_.ideOS,ide_device_id:null==_?void 0:_.ideDid,ide_user_id:null==_?void 0:_.ideUid,iOS_debug_version:+(null==_?void 0:_.iOSDebugVersion),connect_type:null==_?void 0:_.connectType,local_debug:String(null==_?void 0:_.localDebug),dycloud_config:{call_container:null!==(B=null===(G=null==_?void 0:_.dycloudConfig)||void 0===G?void 0:G.callContainer)&&void 0!==B?B:null,websocket:null!==(V=null===(H=null==_?void 0:_.dycloudConfig)||void 0===H?void 0:H.websocket)&&void 0!==V?V:null},extra_info:null!==(W=null==_?void 0:_.extraInfo)&&void 0!==W?W:{},performance_test:null==_?void 0:_.performanceTest},(null==_?void 0:_.isSandbox)&&Object.assign(N,{is_sandbox:!0,random_key:_.randomKey,account_name:_.accountName,app_id:_.appId,app_name:_.appName,expire_time:_.expireTime}),x={start_page:encodeURIComponent(D),query:null!=s?s:"",scene:"".concat(c),bdp_log:JSON.stringify(d),penetrate_map_json:JSON.stringify(null!=O?O:r({referer_info:y,ide_inspect_version:6,trace_version:C,ide_live_debug:"live"===(null==_?void 0:_.previewScene),ide_config:N,trace_mode:w},b&&{hot_restart_version:b}))},"upload"===A&&(x.version_num=null==I?void 0:I.version,x.tag=null==I?void 0:I.channel),(null===(q=null==_?void 0:_.extraInfo)||void 0===q?void 0:q.preload)&&Object.assign(x,{preload:null==_?void 0:_.extraInfo.preload}),f&&Object.assign(x,f),E&&(R=(0,v.getConfig)().interactGameUrl.makeSchema),j={},S&&(j={plugin_app_id:S,is_plugin_project:1},"plugin"===P&&(j=r(r({},j),{is_plugin_schema:1}))),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,p.AxiosInstance.post(R,r(r(r({app_id:i||t,shelled_tech_type:null!==(J=e.shelledTechType)&&void 0!==J?J:2,stage:"upload"===A?"latest":"preview"},L),{schema_params:x}),j),{headers:Object.assign(T,h)})];case 3:return M=u.sent(),(0,g.isIDE)()&&console.info("makeSchema result",M),0===M.data.code?((0,g.isIDE)()&&console.info("makeSchema",M.data.data),k=+M.data.data.expire_time,n({originSchema:E?M.data.data.schema_v2:M.data.data.origin_schema,shortUrl:M.data.data.short_url,expireTime:0===k?-1:k})):o(new l.SchemaError(M.data.msg)),[3,5];case 4:return U=u.sent(),o(new l.SchemaError(U.toString())),[3,5];case 5:return[2]}}))}))}))},t.toQRCodeSVG=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){switch(n.label){case 0:return n.trys.push([0,1,,3]),[2,h.default.toString(e,{type:"svg",margin:0,color:{light:"#00000000"}})];case 1:return t=n.sent(),[4,Promise.reject(new l.QRCodeError(t.toString()))];case 2:return[2,n.sent()];case 3:return[2]}}))}))},t.toQRCodeFile=function(e,t,n){return s(this,void 0,void 0,(function(){var r;return u(this,(function(o){switch(o.label){case 0:f.default.isAbsolute(t)||(t=f.default.resolve(process.cwd(),t)),o.label=1;case 1:return o.trys.push([1,3,,5]),[4,h.default.toFile(t,e,{color:{light:null!=n?n:"#0000"}})];case 2:return o.sent(),[2,t];case 3:return r=o.sent(),[4,Promise.reject(new l.QRCodeError(r.toString()))];case 4:return[2,o.sent()];case 5:return[2]}}))}))},t.generateTerminalQrCode=function(e,t){_.generate(e,{small:t.small});var n="";t.copy&&(d.default.writeSync(e),n="(已拷贝到剪贴板)"),t.small&&E.default.warn("small QR Code may not work in some environments"),E.default.info("二维码信息:".concat(e," ").concat(n))}},4794:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isCliNeedForceUpdate=t.getForceUpdateConfig=t.getIDESettings=void 0;var s=n(3357),u=n(240),c=n(7497),l=a(n(4351)),p=a(n(932)),d=n(1831),f=n(7004),h=f.CliMonitor.getInstance({cliVersion:"2.0.14",cliName:"tt-minigame-ide-cli"});function _(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:t=(0,c.getUserId)(),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,s.AxiosInstance.get("https://is.snssdk.com/service/settings/v2/",{params:r({device_id:"".concat(t),user_id:"".concat(t),app:1,aid:13,caller_name:"microapp_ide"},null==e?void 0:e.params)})];case 2:return[2,n.sent().data.data.app];case 3:return n.sent(),[2,null];case 4:return[2]}}))}))}function v(e){var t;return o(this,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:return[4,_()];case 1:return(n=o.sent())?(r=null===(t=n.ide_config)||void 0===t?void 0:t.forceUpdate)?[2,{date:r.date,updateVersion:r.cli[e]}]:[2,null]:[2]}}))}))}t.getIDESettings=_,t.getForceUpdateConfig=v,t.isCliNeedForceUpdate=function(e){return o(this,void 0,void 0,(function(){var t,n,o,a;return i(this,(function(i){switch(i.label){case 0:return(0,d.isCli)()?[4,v(e)]:[2];case 1:return(t=i.sent())?((n=(0,u.isNeedForceUpdate)(r(r({},t),{curVersion:"2.0.14",appType:"CLI"})))&&(o=n.message,a=n.type,h.report(f.CLI_EVENTS.IDE_CLI_FORCE_UPGRADE,{force_update_type:a}),"force"===a?(l.default.error(o),p.default.exit()):l.default.warn(o)),[2]):[2,null]}}))}))}},1831:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getProjectToQRCodeStepReporterDesc=t.createTimeReporter=t.verifyLoginTypeAuth=t.sleep=t.isObject=t.isGameFileValid=t.getNextVersion=t.getMD5Stream=t.getAppJson=t.getProjectConfig=t.getAppid=t.getCliDefaultStoragePath=t.clearConsole=t.mixEncode=t.validateAppId=t.validateEmail=t.validateVerificationCode=t.validatePhoneNumber=t.getPackageRoot=t.createProjectConfigFile=t.cleanArgs=t.maxConcurrency=t.isIDE=t.isMiniGameCli=t.isCli=t.isMac=t.getHighWaterMarkByTotalMem=t.HIGH_WATER_MARK=t.loginInfo=void 0;var l=n(3374),p=n(8950),d=c(n(6982)),f=a(n(120)),h=a(n(857)),_=a(n(6928)),v=a(n(3785)),m=n(7290);Object.defineProperty(t,"loginInfo",{enumerable:!0,get:function(){return m.loginInfo}});var E,g=n(2203),y=n(5602);function b(){try{var e=h.totalmem(),t=33554432;return e<=8589934592?t=8388608:e<=17179869184&&(t=16777216),t}catch(e){return 16777216}}function A(){return"true"===process.env.isMiniGameCli}function O(e){if(!/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e))throw new l.ProjectError('AppId "'.concat(e,'" is not valid'))}function C(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,4]),[4,p.ProjectConfig.from(e)];case 1:case 3:return[2,n.sent()];case 2:return t=n.sent(),[4,Promise.reject(new l.ProjectError('Parsing "project.config.json" with error. '.concat(t.toString())))];case 4:return[2]}}))}))}t.HIGH_WATER_MARK=b(),t.getHighWaterMarkByTotalMem=b,t.isMac=function(){return"darwin"===process.platform},t.isCli=function(){return"true"===process.env.isCli},t.isMiniGameCli=A,t.isIDE=function(){return"true"===process.env.isIDE},t.maxConcurrency=function(){return E||(E=Math.floor(h.cpus().length/2)),E>4?4:E>=1?E:1},t.cleanArgs=function(e){return e.options.reduce((function(t,n){var r=n.long.replace(/^--/,"").replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}));return"function"!=typeof e[r]&&void 0!==e[r]&&(t[r]=e[r]),t}),{})},t.createProjectConfigFile=function(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),s(this,void 0,void 0,(function(){var o,i;return u(this,(function(a){switch(a.label){case 0:return o=_.resolve(t,"project.config.json"),r?(i='{\n "setting": {\n "urlCheck": true,\n "es6": true,\n "postcss": true,\n "minified": true,\n "newFeature": true\n },\n "appid": "testAppId",\n "pluginAppid": "testPluginAppId",\n "projectname": "'.concat(e,'",\n "douyinProjectType": "native",\n "miniprogramRoot": "miniprogram",\n "pluginRoot": "plugin",\n "ttProjectType": "plugin"\n }'),[4,f.writeFile(o,i)]):[3,2];case 1:case 3:return[2,a.sent()];case 2:return i='{\n "setting": {\n "urlCheck": true,\n "es6": true,\n "postcss": true,\n "minified": true,\n "newFeature": true,\n "useCompilerPlugins": ['.concat(n?'"typescript"':"",']\n },\n "miniprogramRoot": "./",\n "appid": "testappId",\n "projectname": "').concat(e,'"\n }'),[4,f.writeFile(o,i)]}}))}))},t.getPackageRoot=function(){return _.join(__dirname,"..")},t.validatePhoneNumber=function(e){if(!/^1[2-9]\d{9}$/.test(e))throw new l.LoginError('PhoneNumber "'.concat(e,'" is invalid'))},t.validateVerificationCode=function(e){if(!/^\d{4}$/.test(e))throw new l.LoginError('VerificationCode "'.concat(e,'" is invalid'))},t.validateEmail=function(e){if(!/^([A-Za-z0-9_\-.])+@([A-Za-z0-9_\-.])+\.([A-Za-z]{2,4})$/.test(e))throw new l.LoginError('Email "'.concat(e,'" is invalid'))},t.validateAppId=O,t.mixEncode=function(e){for(var t=e.toString(),n=[],r=0,o=t.length;r<o;r++)n.push(t.charCodeAt(r));return n.map((function(e){return(5^e).toString(16)})).join("")},t.clearConsole=function(e){if(process.stdout.isTTY){var t="\n".repeat(process.stdout.rows);console.log(t),v.cursorTo(process.stdout,0,0),v.clearScreenDown(process.stdout),e&&console.log(e)}},t.getCliDefaultStoragePath=function(){var e=A()?".tmg-cli/":".tma-cli/";return _.join(h.homedir(),e)},t.getAppid=function(e){var t=e.getAppid();return O(t),t},t.getProjectConfig=C,t.getAppJson=function(e,t,n){return s(this,void 0,void 0,(function(){var r,o,i,a;return u(this,(function(s){switch(s.label){case 0:r="".concat(n?"game":"app",".json"),s.label=1;case 1:return s.trys.push([1,3,,5]),o=e.getMiniprogramRoot(),i=_.join(t,o,r),[4,f.readJSON(i)];case 2:return[2,s.sent()];case 3:return a=s.sent(),[4,Promise.reject(new l.ProjectError('Parsing "'.concat(r,'" file with error. ').concat(a.toString())))];case 4:return[2,s.sent()];case 5:return[2]}}))}))},t.getMD5Stream=function(e){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,r){var o=d.default.createHash("md5"),i=new g.Transform({writableHighWaterMark:t.HIGH_WATER_MARK,readableHighWaterMark:t.HIGH_WATER_MARK,transform:function(e,t,n){o.update(e),n(null,e)}});i.__md5="",e.pipe(i),e.on("end",(function(){i.__md5=o.digest("hex"),n(i)})).on("error",(function(e){r(new l.CompressError("MD5 calculation failed ".concat(e.message)))}))}))];case 1:return[2,n.sent()]}}))}))},t.getNextVersion=function(e){try{var t=e.match(/\d+/g);return t[2]=(parseInt(t[2])+1).toString(),t.join(".")}catch(e){return"0.0.1"}},t.isGameFileValid=function(e){return!(".."===e||/\.\.(\\|\/)/.test(e)||/(\\|\/)\.\./.test(e))},t.isObject=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)},t.sleep=function(e){return new Promise((function(t){setTimeout((function(){t(null)}),e)}))},t.verifyLoginTypeAuth=function(e){return s(this,void 0,void 0,(function(){var t;return u(this,(function(n){switch(n.label){case 0:return""===m.loginInfo.getLoginInfo().type?[2]:[4,C(e)];case 1:if(t=n.sent(),m.loginInfo.getLoginInfo().partner&&!t.isPluginProject())throw new l.ProjectError("当前为服务商登录账号,小程序不支持预览和发布");if(!m.loginInfo.getLoginInfo().partner&&t.isPluginProject())throw new l.ProjectError("当前为开发者登录账号,小程序插件不支持预览和发布");return[2]}}))}))},t.createTimeReporter=function(){var e={},t=null;return{startStep:function(n){null===t&&(t=Date.now());var r=Date.now();return function(){var t=Date.now();e[n]=t-r}},finish:function(){var n=Date.now(),o=t?n-t:0,i=r({},e);return i.total=o,e={},t=null,i}}},t.getProjectToQRCodeStepReporterDesc=function(e){try{var t={总耗时:"".concat((e.total/1e3).toFixed(2),"s")};return Object.keys(y.PROJECT_TO_QR_CODE_STEP_DESC).forEach((function(n){var r=y.PROJECT_TO_QR_CODE_STEP_DESC[n],o=e[n];o&&(t[r]="".concat(Number(o/1e3).toFixed(2),"s"))})),t}catch(e){console.error("[getProjectToQRCodeStepReporterDesc/error]",e)}}},3123:function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.getWhiteList=t.ALLOWED_MICROGAME_EXTS_REG=void 0;var i=n(1831),a=Object.freeze(["**/*.json","**/*.js","**/*.png","**/*.jpg","**/*.jpeg","**/*.gif","**/*.svg","**/*.cer","**/*.mp3","**/*.aac","**/*.m4a","**/*.mp4","**/*.wav","**/*.flac","**/*.ape","**/*.ogg","**/*.wma","**/*.midi","**/*.ogv","**/*.webm","**/*.mkv","**/*.ttc","**/*.ttf","**/*.woff","**/*.otf","**/*.obj","**/*.dae","**/*.fbx","**/*.mtl","**/*.stl","**/*.3ds","**/*.pvr","**/*.plist","**/*.fnt","**/*.gz","**/*.ccz","**/*.bmp","**/*.atlas","**/*.swf","**/*.ani","**/*.part","**/*.proto","**/*.bin","**/*.sk","**/*.mipmaps","**/*.txt","**/*.zip","**/*.tt","**/*.map","**/*.silk","**/*.dbbin","**/*.dbmv","**/*.etc","**/*.lmat","**/*.lm","**/*.ls","**/*.lh","**/*.lani","**/*.lav","**/*.lsani","**/*.ltc","**/*.xml","**/*.pkm","**/*.scene","**/*.csv","**/*.prefab","**/*.mesh","**/*.wasm","**/*.wasm.br","**/*.heic","**/*.astc","**/*.ico","**/*.cur"]);t.ALLOWED_MICROGAME_EXTS_REG=new RegExp("\\.(".concat(a.map((function(e){return e.match(/\.([^.]+)$/)[1]})).join("|"),")$"));var s=Object.freeze(["**/*.js","**/*.json","**/*.sjs","**/*.ts","**/*.ttml","**/*.ttss","**/*.wxml","**/*.wxs","**/*.wxss","**/*.sk","**/*.md","**/*.aac","**/*.bmp","**/*.br","**/*.cer","**/*.eot","**/*.gif","**/*.jpeg","**/*.jpg","**/*.m4a","**/*.mp3","**/*.mp4","**/*.ogg","**/*.otf","**/*.png","**/*.silk","**/*.svg","**/*.ttf","**/*.wasm","**/*.wav","**/*.webp","**/*.woff","**/*.wxs","**/*.wasm.br","**/*.heic"]),u=Object.freeze(["**/*.jsx","**/*.tsx","**/*.css"]),c=o([],r(new Set(o(o([],r(a),!1),r(s),!1))),!1),l=o([],r(new Set(o(o([],r(u),!1),r(s),!1))),!1);t.getWhiteList=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t={}),t.isMicroappPlugin?l:t.isLivePlugin?c:(0,i.isCli)()?(0,i.isMiniGameCli)()?a:s:e?a:s}},8186:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(197)),s=n(2539),u=n(1831),c=i(n(4351)),l=n(3681),p=n(2655),d=i(n(6928)),f=n(3777),h=n(1596),_=i(n(120)),v=n(7004),m=i(n(2133)),E=v.CliMonitor.getInstance({cliVersion:"2.0.14",cliName:"tt-minigame-ide-cli"});a.default.version("2.0.14","-V, --version","Output the current version"),a.default.command("open <project-path>").option("--mode <mode>","lite | full").description("Open target project by path").action((function(e,t){E.reportCommandCall(t.name());var n=(0,u.cleanArgs)(t).mode;(0,m.default)({projectPath:e,mode:n,type:"microgame"})})),a.default.command("login").description("Login to the developer platform").option("-m, --mobile","Login by mobile").option("-e, --email","Login by email").option("-p, --proxy <proxy>","Login with proxy").action((function(e){E.reportCommandCall(e.name());var t=(0,u.cleanArgs)(e);void 0!==t.proxy&&(0,s.setConfig)({proxy:t.proxy}),(0,p.cliAuth)(t)})),a.default.command("login-e [email] [password]").description("Login to the developer platform by E-mail").option("-p, --proxy <proxy>","Login with proxy").action((function(e,t,n){E.reportCommandCall(n.name());var r=(0,u.cleanArgs)(n);void 0!==r.proxy&&(0,s.setConfig)({proxy:r.proxy}),(0,l.loginByEmail)({email:e,password:t})})),a.default.command("logout").description("Logout and clear the session.").action((function(e){E.reportCommandCall(e.name()),(0,l.logout)()})),a.default.command("preview [entry]").description("Preview project by remote").option("-f, --force","Preview project without local cache(deprecated)").option("--disable-cache","Preview project without local cache").option("-s, --small","Use small QR Code, it may fail in some environments").option("-u, --copy","Copy remote url to clipboard").option("-p, --proxy <proxy>","Preview with proxy").option("-o, --output <path>","QRCode image output path").option("--minigame-query <query>","Minigame query").option("--minigame-scene <scene>","Minigame scene").option("--minigame-launch-from <launchFrom>","Minigame launchFrom").option("--minigame-location <location>","Minigame location").action((function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,i,a,p,h,_,m,g,y,b,A,O,C,w,I;return o(this,(function(o){switch(o.label){case 0:return E.reportCommandCall(t.name()),void 0!==(n=(0,u.cleanArgs)(t)).proxy&&(0,s.setConfig)({proxy:n.proxy}),e?d.default.isAbsolute(e)||(e=d.default.join(process.cwd(),e)):e=process.cwd(),[4,l.microgame.unityCli.isUnity(e)];case 1:if(!o.sent())return[3,6];o.label=2;case 2:return o.trys.push([2,4,,5]),[4,l.microgame.unityCli.previewForCli({projectPath:e,output:n.output,compileMode:{scene:null!==(h=null==n?void 0:n.minigameScene)&&void 0!==h?h:"990001",query:null!==(_=null==n?void 0:n.minigameQuery)&&void 0!==_?_:"",bdpLog:JSON.stringify({launch_from:null!==(m=null==n?void 0:n.minigameLaunchFrom)&&void 0!==m?m:"",location:null!==(g=null==n?void 0:n.minigameLocation)&&void 0!==g?g:""})}})];case 3:return a=o.sent(),(0,f.generateTerminalQrCode)(null!==(y=null==a?void 0:a.short_url)&&void 0!==y?y:"",{copy:n.copy,small:n.small}),[3,5];case 4:return r=o.sent(),c.default.stopLoading(),c.default.error(null!==(b=r.message)&&void 0!==b?b:r),E.report(v.CLI_EVENTS.IDE_CLI_PREVIEW_FAIL,{type:r.name,message:null!==(A=r.message)&&void 0!==A?A:r}),[3,5];case 5:return[2];case 6:i=!0,(n.force||n.disableCache)&&(i=!1),o.label=7;case 7:return o.trys.push([7,9,,10]),[4,l.microgame.preview({project:{path:e},page:{path:n.minigamePath,query:n.minigameQuery,scene:n.minigameScene,launchFrom:n.minigameLaunchFrom,location:n.minigameLocation},qrcode:{format:n.output?"imageFile":"terminal",output:n.output,options:{small:n.small}},localCompileVersion:"4.0.4-rc.17.ide.2.cli",cache:i,copyToClipboard:n.copy})];case 8:return(a=o.sent()).useCache||E.report(v.CLI_EVENTS.IDE_CLI_PREVIEW_SUCCESS,{appid:(null===(O=a.metrics)||void 0===O?void 0:O.appId)||"",logid:(null===(C=a.metrics)||void 0===C?void 0:C.logId)||""}),(0,f.generateTerminalQrCode)(a.shortUrl,{copy:n.copy,small:n.small}),[3,10];case 9:return p=o.sent(),c.default.stopLoading(),c.default.error(null!==(w=p.stack)&&void 0!==w?w:p),E.report(v.CLI_EVENTS.IDE_CLI_PREVIEW_FAIL,{type:p.name,message:null!==(I=p.message)&&void 0!==I?I:p}),[3,10];case 10:return[2]}}))}))})),a.default.command("upload [entry]").description("Upload project to the developer platform").requiredOption("-v, --app-version <version>","App version (eg: [major].[minor].[patch])").requiredOption("-c, --app-changelog <log>","Changelog for this version").option("-p, --proxy <proxy>","Update request proxy").option("-u, --copy","Copy remote url to clipboard").option("-s, --small","Use small QR Code, it may fail in some environments").option("-o, --output <path>","QRCode image output path").option("-b, --background-color <bgColor>","QRCode image output with custom background color. Color value must be in hex format (RGBA).For example, solid white color is '#ffffffff'.","#ffffff00").option("--channel <channel>","Test Channel").action((function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,i,a,p,h,_,m,g,y,b;return o(this,(function(o){switch(o.label){case 0:return E.reportCommandCall(t.name()),void 0!==(n=(0,u.cleanArgs)(t)).proxy&&(0,s.setConfig)({proxy:n.proxy}),e?d.default.isAbsolute(e)||(e=d.default.join(process.cwd(),e)):e=process.cwd(),[4,l.microgame.unityCli.isUnity(e)];case 1:if(!o.sent())return[3,6];o.label=2;case 2:return o.trys.push([2,4,5,6]),r=c.default.loading("正在准备上传..."),[4,l.microgame.unityCli.unityUpload({projectPath:e,version:n.appVersion,publishDesc:n.appChangelog,updateStatus:function(e){r.text=l.microgame.unityCli.PROGRESS[e]},output:n.output,channel:null==n?void 0:n.channel,bgColor:null==n?void 0:n.backgroundColor})];case 3:return o.sent(),r.stop(),c.default.info("🎉 Upload success"),[2];case 4:return i=o.sent(),c.default.stopLoading(),c.default.error(null!==(h=i.stack)&&void 0!==h?h:i),E.report(v.CLI_EVENTS.IDE_CLI_UPLOAD_FAIL,{type:i.name,message:null!==(_=i.message)&&void 0!==_?_:i}),process.exit(1),[3,6];case 5:return[2];case 6:return o.trys.push([6,8,,9]),[4,l.microgame.upload({project:{path:e},qrcode:{format:n.output?"imageFile":"terminal",output:n.output,options:{small:n.small},bgColor:null==n?void 0:n.backgroundColor},channel:null==n?void 0:n.channel,localCompileVersion:"4.0.4-rc.17.ide.2.cli",copyToClipboard:n.copy,changeLog:n.appChangelog,version:n.appVersion})];case 7:return a=o.sent(),E.report(v.CLI_EVENTS.IDE_CLI_UPLOAD_SUCCESS,{appid:(null===(m=a.metrics)||void 0===m?void 0:m.appId)||"",logid:(null===(g=a.metrics)||void 0===g?void 0:g.logId)||""}),(0,f.generateTerminalQrCode)(a.shortUrl,{copy:n.copy,small:n.small}),c.default.info("🎉 Upload success"),[3,9];case 8:return p=o.sent(),c.default.stopLoading(),c.default.error(null!==(y=p.stack)&&void 0!==y?y:p),E.report(v.CLI_EVENTS.IDE_CLI_UPLOAD_FAIL,{type:p.name,message:null!==(b=p.message)&&void 0!==b?b:p}),[3,9];case 9:return[2]}}))}))})),a.default.command("build-npm [projectPath]").description("build npm packages in node_modules").action((function(e,t){return r(void 0,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return E.reportCommandCall(t.name()),[4,(0,h.buildNpm)({projectPath:e})];case 1:return(n=r.sent()).success?c.default.info("🎉 Build success"):c.default.error("Build failed.[message=%s]",n.reason),[2]}}))}))})),a.default.command("version [entry]").description("Get latest released version of project").action((function(e,t){return r(void 0,void 0,void 0,(function(){var n,r,i,a,s,u;return o(this,(function(o){switch(o.label){case 0:return E.reportCommandCall(t.name()),e?d.default.isAbsolute(e)||(e=d.default.join(process.cwd(),e)):e=process.cwd(),n=d.default.join(e,"project.config.json"),[4,_.default.pathExists(n)];case 1:return o.sent()?[4,l.microgame.unityCli.isUnity(e)]:(c.default.error("Invalid project: project.config.json file not found"),[2]);case 2:return o.sent()?[4,l.microgame.unityCli.getVersions({projectPath:e})]:[3,4];case 3:return r=o.sent(),console.info("当前最新测试版本:",r.latest.version||"无"),console.info("当前最新线上版本:",r.current.version||"无"),[2];case 4:return[4,_.default.readFile(n,"utf-8")];case 5:return i=o.sent(),a=JSON.parse(i),(s=a.ttappid||a.appid)?[4,(0,l.getMeta)({appid:s})]:(c.default.error('Require parameter "appid".'),[2]);case 6:return u=o.sent(),c.default.info(u.version),[2]}}))}))})),a.default.command("set-config").description("Set tt-minigame-ide-cli config").option("-p, --proxy <proxy>","Set global proxy").option("--default","Use default").option("--envType <envType>","Set env type(online | boe | ppe)").option("--envChannel <envChannel>","Set env channel").option("-r, --allow-report-event <allowReportEvent>","allow report event when using, yes or no").action((function(e){E.reportCommandCall(e.name());var t=(0,u.cleanArgs)(e),n={};if(n.env={type:t.envType,channel:t.envChannel},void 0!==t.proxy&&(n.proxy=t.proxy),void 0!==t.allowReportEvent){if("yes"!==t.allowReportEvent&&"no"!==t.allowReportEvent)return void c.default.error('allowReportEvent can only be "yes" or "no"');n.allowReportEvent="yes"===t.allowReportEvent}(0,s.setConfig)(n,t.default)})),a.default.parse(process.argv),process.on("unhandledRejection",(function(e){var t;c.default.stopLoading(),c.default.error(null!==(t=e.stack)&&void 0!==t?t:e),E.report(v.CLI_EVENTS.IDE_CLI_ERROR,{type:"unhandledRejection",message:e.toString()})})),process.on("uncaughtException",(function(e){var t;c.default.stopLoading(),c.default.error(null!==(t=e.stack)&&void 0!==t?t:e),E.report(v.CLI_EVENTS.IDE_CLI_ERROR,{type:"uncaughtException",message:e.toString()})}))},2613:e=>{"use strict";e.exports=require("assert")},5317:e=>{"use strict";e.exports=require("child_process")},6982:e=>{"use strict";e.exports=require("crypto")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},8611:e=>{"use strict";e.exports=require("http")},5692:e=>{"use strict";e.exports=require("https")},9278:e=>{"use strict";e.exports=require("net")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},932:e=>{"use strict";e.exports=require("process")},3480:e=>{"use strict";e.exports=require("querystring")},3785:e=>{"use strict";e.exports=require("readline")},2203:e=>{"use strict";e.exports=require("stream")},4756:e=>{"use strict";e.exports=require("tls")},2018:e=>{"use strict";e.exports=require("tty")},7016:e=>{"use strict";e.exports=require("url")},9023:e=>{"use strict";e.exports=require("util")},3106:e=>{"use strict";e.exports=require("zlib")},6624:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6624__},4731:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__4731__},753:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__753__},58:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__58__},1755:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1755__},5063:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__5063__},1079:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1079__},6245:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6245__},120:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__120__},9669:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9669__},6924:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6924__},4518:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__4518__},1645:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1645__},746:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__746__},6321:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6321__},681:(e,t,n)=>{"use strict";const r=n(6245),o=n(7016),i=n(8059),a=n(8611),s=n(5692),u=n(9023),c=n(1251),l=n(3106),p=n(2203),d=n(4434);function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const h=f(r),_=f(o),v=f(a),m=f(s),E=f(u),g=f(c),y=f(l),b=f(p),A=f(d);function O(e,t){return function(){return e.apply(t,arguments)}}const{toString:C}=Object.prototype,{getPrototypeOf:w}=Object,I=(S=Object.create(null),e=>{const t=C.call(e);return S[t]||(S[t]=t.slice(8,-1).toLowerCase())});var S;const P=e=>(e=e.toLowerCase(),t=>I(t)===e),R=e=>t=>typeof t===e,{isArray:L}=Array,T=R("undefined"),D=P("ArrayBuffer"),N=R("string"),x=R("function"),j=R("number"),M=e=>null!==e&&"object"==typeof e,k=e=>{if("object"!==I(e))return!1;const t=w(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},U=P("Date"),F=P("File"),G=P("Blob"),B=P("FileList"),H=P("URLSearchParams");function V(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),L(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function W(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,J=e=>!T(e)&&e!==q,z=($="undefined"!=typeof Uint8Array&&w(Uint8Array),e=>$&&e instanceof $);var $;const K=P("HTMLFormElement"),Q=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Y=P("RegExp"),X=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};V(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},Z="abcdefghijklmnopqrstuvwxyz",ee="0123456789",te={DIGIT:ee,ALPHA:Z,ALPHA_DIGIT:Z+Z.toUpperCase()+ee},ne=P("AsyncFunction"),re={isArray:L,isArrayBuffer:D,isBuffer:function(e){return null!==e&&!T(e)&&null!==e.constructor&&!T(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||x(e.append)&&("formdata"===(t=I(e))||"object"===t&&x(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&D(e.buffer),t},isString:N,isNumber:j,isBoolean:e=>!0===e||!1===e,isObject:M,isPlainObject:k,isUndefined:T,isDate:U,isFile:F,isBlob:G,isRegExp:Y,isFunction:x,isStream:e=>M(e)&&x(e.pipe),isURLSearchParams:H,isTypedArray:z,isFileList:B,forEach:V,merge:function e(){const{caseless:t}=J(this)&&this||{},n={},r=(r,o)=>{const i=t&&W(n,o)||o;k(n[i])&&k(r)?n[i]=e(n[i],r):k(r)?n[i]=e({},r):L(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&V(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(V(t,((t,r)=>{n&&x(t)?e[r]=O(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&w(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:I,kindOfTest:P,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(L(e))return e;let t=e.length;if(!j(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:K,hasOwnProperty:Q,hasOwnProp:Q,reduceDescriptors:X,freezeMethods:e=>{X(e,((t,n)=>{if(x(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];x(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return L(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:W,global:q,isContextDefined:J,ALPHABET:te,generateString:(e=16,t=te.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&x(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(M(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=L(e)?[]:{};return V(e,((e,t)=>{const i=n(e,r+1);!T(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:ne,isThenable:e=>e&&(M(e)||x(e))&&x(e.then)&&x(e.catch)};function oe(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}re.inherits(oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:re.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ie=oe.prototype,ae={};function se(e){return re.isPlainObject(e)||re.isArray(e)}function ue(e){return re.endsWith(e,"[]")?e.slice(0,-2):e}function ce(e,t,n){return e?e.concat(t).map((function(e,t){return e=ue(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ae[e]={value:e}})),Object.defineProperties(oe,ae),Object.defineProperty(ie,"isAxiosError",{value:!0}),oe.from=(e,t,n,r,o,i)=>{const a=Object.create(ie);return re.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),oe.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const le=re.toFlatObject(re,{},null,(function(e){return/^is[A-Z]/.test(e)}));function pe(e,t,n){if(!re.isObject(e))throw new TypeError("target must be an object");t=t||new(h.default||FormData);const r=(n=re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!re.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&re.isSpecCompliantForm(t);if(!re.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(re.isDate(e))return e.toISOString();if(!s&&re.isBlob(e))throw new oe("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(e)||re.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(re.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(re.isArray(e)&&function(e){return re.isArray(e)&&!e.some(se)}(e)||(re.isFileList(e)||re.endsWith(n,"[]"))&&(s=re.toArray(e)))return n=ue(n),s.forEach((function(e,r){!re.isUndefined(e)&&null!==e&&t.append(!0===a?ce([n],r,i):null===a?n:n+"[]",u(e))})),!1;return!!se(e)||(t.append(ce(o,n,i),u(e)),!1)}const l=[],p=Object.assign(le,{defaultVisitor:c,convertValue:u,isVisitable:se});if(!re.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!re.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),re.forEach(n,(function(n,i){!0===(!(re.isUndefined(n)||null===n)&&o.call(t,n,re.isString(i)?i.trim():i,r,p))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t}function de(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function fe(e,t){this._pairs=[],e&&pe(e,this,t)}const he=fe.prototype;function _e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ve(e,t,n){if(!t)return e;const r=n&&n.encode||_e,o=n&&n.serialize;let i;if(i=o?o(t,n):re.isURLSearchParams(t)?t.toString():new fe(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}he.append=function(e,t){this._pairs.push([e,t])},he.toString=function(e){const t=e?function(t){return e.call(this,t,de)}:de;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const me=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){re.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ge={isNode:!0,classes:{URLSearchParams:_.default.URLSearchParams,FormData:h.default,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]},ye="undefined"!=typeof window&&"undefined"!=typeof document,be=(Ae="undefined"!=typeof navigator&&navigator.product,ye&&["ReactNative","NativeScript","NS"].indexOf(Ae)<0);var Ae;const Oe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ce={...Object.freeze({__proto__:null,hasBrowserEnv:ye,hasStandardBrowserWebWorkerEnv:Oe,hasStandardBrowserEnv:be}),...ge};function we(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;return i=!i&&re.isArray(r)?r.length:i,s?(re.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&re.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&re.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a)}if(re.isFormData(e)&&re.isFunction(e.entries)){const n={};return re.forEachEntry(e,((e,r)=>{t(function(e){return re.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const Ie={transitional:Ee,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=re.isObject(e);if(o&&re.isHTMLForm(e)&&(e=new FormData(e)),re.isFormData(e))return r&&r?JSON.stringify(we(e)):e;if(re.isArrayBuffer(e)||re.isBuffer(e)||re.isStream(e)||re.isFile(e)||re.isBlob(e))return e;if(re.isArrayBufferView(e))return e.buffer;if(re.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return pe(e,new Ce.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Ce.isNode&&re.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=re.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return pe(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(re.isString(e))try{return(0,JSON.parse)(e),re.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ie.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&re.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw oe.from(e,oe.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ce.classes.FormData,Blob:Ce.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};re.forEach(["delete","get","head","post","put","patch"],(e=>{Ie.headers[e]={}}));const Se=Ie,Pe=re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Re=Symbol("internals");function Le(e){return e&&String(e).trim().toLowerCase()}function Te(e){return!1===e||null==e?e:re.isArray(e)?e.map(Te):String(e)}function De(e,t,n,r,o){return re.isFunction(r)?r.call(this,t,n):(o&&(t=n),re.isString(t)?re.isString(r)?-1!==t.indexOf(r):re.isRegExp(r)?r.test(t):void 0:void 0)}class Ne{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Le(t);if(!o)throw new Error("header name must be a non-empty string");const i=re.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Te(e))}const i=(e,t)=>re.forEach(e,((e,n)=>o(e,n,t)));return re.isPlainObject(e)||e instanceof this.constructor?i(e,t):re.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Pe[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=Le(e)){const n=re.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(re.isFunction(t))return t.call(this,e,n);if(re.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Le(e)){const n=re.findKey(this,e);return!(!n||void 0===this[n]||t&&!De(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Le(e)){const o=re.findKey(n,e);!o||t&&!De(0,n[o],o,t)||(delete n[o],r=!0)}}return re.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!De(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return re.forEach(this,((r,o)=>{const i=re.findKey(n,o);if(i)return t[i]=Te(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Te(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return re.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&re.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Re]=this[Re]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Le(e);t[r]||(function(e,t){const n=re.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return re.isArray(e)?e.forEach(r):r(e),this}}Ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors(Ne.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),re.freezeMethods(Ne);const xe=Ne;function je(e,t){const n=this||Se,r=t||n,o=xe.from(r.headers);let i=r.data;return re.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Me(e){return!(!e||!e.__CANCEL__)}function ke(e,t,n){oe.call(this,null==e?"canceled":e,oe.ERR_CANCELED,t,n),this.name="CanceledError"}function Ue(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new oe("Request failed with status code "+n.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function Fe(e,t){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}re.inherits(ke,oe,{__CANCEL__:!0});const Ge="1.6.5";function Be(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const He=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Ve(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const u=Date.now(),c=r[a];o||(o=u),n[i]=s,r[i]=u;let l=a,p=0;for(;l!==i;)p+=n[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o<t)return;const d=c&&u-c;return d?Math.round(1e3*p/d):void 0}}const We=Symbol("internals");class qe extends b.default.Transform{constructor(e){super({readableHighWaterMark:(e=re.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,t)=>!re.isUndefined(t[e])))).chunkSize});const t=this,n=this[We]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},r=Ve(n.ticksRate*e.samplesCount,n.timeWindow);this.on("newListener",(e=>{"progress"===e&&(n.isCaptured||(n.isCaptured=!0))}));let o=0;n.updateProgress=function(e,t){let n=0;const r=1e3/t;let o=null;return function(t,i){const a=Date.now();if(t||a-n>r)return o&&(clearTimeout(o),o=null),n=a,e.apply(null,i);o||(o=setTimeout((()=>(o=null,n=Date.now(),e.apply(null,i))),r-(a-n)))}}((function(){const e=n.length,i=n.bytesSeen,a=i-o;if(!a||t.destroyed)return;const s=r(a);o=i,process.nextTick((()=>{t.emit("progress",{loaded:i,total:e,progress:e?i/e:void 0,bytes:a,rate:s||void 0,estimated:s&&e&&i<=e?(e-i)/s:void 0})}))}),n.ticksRate);const i=()=>{n.updateProgress(!0)};this.once("end",i),this.once("error",i)}_read(e){const t=this[We];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){const r=this,o=this[We],i=o.maxRate,a=this.readableHighWaterMark,s=o.timeWindow,u=i/(1e3/s),c=!1!==o.minChunkSize?Math.max(o.minChunkSize,.01*u):0,l=(e,t)=>{const n=Buffer.byteLength(e);let l,p=null,d=a,f=0;if(i){const e=Date.now();(!o.ts||(f=e-o.ts)>=s)&&(o.ts=e,l=u-o.bytes,o.bytes=l<0?-l:0,f=0),l=u-o.bytes}if(i){if(l<=0)return setTimeout((()=>{t(null,e)}),s-f);l<d&&(d=l)}d&&n>d&&n-d>c&&(p=e.subarray(d),e=e.subarray(0,d)),function(e,t){const n=Buffer.byteLength(e);o.bytesSeen+=n,o.bytes+=n,o.isCaptured&&o.updateProgress(),r.push(e)?process.nextTick(t):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(t)}}(e,p?()=>{process.nextTick(t,null,p)}:t)};l(e,(function e(t,r){if(t)return n(t);r?l(r,e):n(null)}))}setLength(e){return this[We].length=+e,this}}const Je=qe,{asyncIterator:ze}=Symbol,$e=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[ze]?yield*e[ze]():yield e},Ke=re.ALPHABET.ALPHA_DIGIT+"-_",Qe=new u.TextEncoder,Ye="\r\n",Xe=Qe.encode(Ye);class Ze{constructor(e,t){const{escapeName:n}=this.constructor,r=re.isString(t);let o=`Content-Disposition: form-data; name="${n(e)}"${!r&&t.name?`; filename="${n(t.name)}"`:""}${Ye}`;r?t=Qe.encode(String(t).replace(/\r?\n|\r\n?/g,Ye)):o+=`Content-Type: ${t.type||"application/octet-stream"}${Ye}`,this.headers=Qe.encode(o+Ye),this.contentLength=r?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;re.isTypedArray(e)?yield e:yield*$e(e),yield Xe}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}class et extends b.default.Transform{__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,n)}}const tt=et,nt=(e,t)=>re.isAsyncFn(e)?function(...n){const r=n.pop();e.apply(this,n).then((e=>{try{t?r(null,...t(e)):r(null,e)}catch(e){r(e)}}),r)}:e,rt={flush:y.default.constants.Z_SYNC_FLUSH,finishFlush:y.default.constants.Z_SYNC_FLUSH},ot={flush:y.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:y.default.constants.BROTLI_OPERATION_FLUSH},it=re.isFunction(y.default.createBrotliDecompress),{http:at,https:st}=g.default,ut=/https:?/,ct=Ce.protocols.map((e=>e+":"));function lt(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function pt(e,t,n){let r=t;if(!r&&!1!==r){const e=i.getProxyForUrl(n);e&&(r=new URL(e))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));const t=Buffer.from(r.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=r.hostname||r.host;e.hostname=t,e.host=t,e.port=r.port,e.path=n,r.protocol&&(e.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}e.beforeRedirects.proxy=function(e){pt(e,t,e.href)}}const dt=(e,t)=>(({address:e,family:t})=>{if(!re.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})(re.isObject(e)?e:{address:e,family:t}),ft=Ce.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];re.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),re.isString(r)&&a.push("path="+r),re.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}},ht=Ce.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=re.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function _t(e,t){let n=0;const r=Ve(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,u=r(s);n=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const vt={http:function(e){return t=async function(t,n,r){let{data:o,lookup:i,family:a}=e;const{responseType:s,responseEncoding:u}=e,c=e.method.toUpperCase();let l,d,f=!1;if(i){const e=nt(i,(e=>re.isArray(e)?e:[e]));i=(t,n,r)=>{e(t,n,((e,t,o)=>{if(e)return r(e);const i=re.isArray(t)?t.map((e=>dt(e))):[dt(t,o)];n.all?r(e,i):r(e,i[0].address,i[0].family)}))}}const h=new A.default,_=()=>{e.cancelToken&&e.cancelToken.unsubscribe(g),e.signal&&e.signal.removeEventListener("abort",g),h.removeAllListeners()};function g(t){h.emit("abort",!t||t.type?new ke(null,e,d):t)}r(((e,t)=>{l=!0,t&&(f=!0,_())})),h.once("abort",n),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(g),e.signal&&(e.signal.aborted?g():e.signal.addEventListener("abort",g)));const O=Fe(e.baseURL,e.url),C=new URL(O,"http://localhost"),w=C.protocol||ct[0];if("data:"===w){let r;if("GET"!==c)return Ue(t,n,{status:405,statusText:"method not allowed",headers:{},config:e});try{r=function(e,t,n){const r=n&&n.Blob||Ce.classes.Blob,o=Be(e);if(void 0===t&&r&&(t=!0),"data"===o){e=o.length?e.slice(o.length+1):e;const n=He.exec(e);if(!n)throw new oe("Invalid URL",oe.ERR_INVALID_URL);const i=n[1],a=n[2],s=n[3],u=Buffer.from(decodeURIComponent(s),a?"base64":"utf8");if(t){if(!r)throw new oe("Blob is not supported",oe.ERR_NOT_SUPPORT);return new r([u],{type:i})}return u}throw new oe("Unsupported protocol "+o,oe.ERR_NOT_SUPPORT)}(e.url,"blob"===s,{Blob:e.env&&e.env.Blob})}catch(t){throw oe.from(t,oe.ERR_BAD_REQUEST,e)}return"text"===s?(r=r.toString(u),u&&"utf8"!==u||(r=re.stripBOM(r))):"stream"===s&&(r=b.default.Readable.from(r)),Ue(t,n,{data:r,status:200,statusText:"OK",headers:new xe,config:e})}if(-1===ct.indexOf(w))return n(new oe("Unsupported protocol "+w,oe.ERR_BAD_REQUEST,e));const I=xe.from(e.headers).normalize();I.set("User-Agent","axios/"+Ge,!1);const S=e.onDownloadProgress,P=e.onUploadProgress,R=e.maxRate;let L,T;if(re.isSpecCompliantForm(o)){const e=I.getContentType(/boundary=([-_\w\d]{10,70})/i);o=((e,t,n)=>{const{tag:r="form-data-boundary",size:o=25,boundary:i=r+"-"+re.generateString(o,Ke)}=n||{};if(!re.isFormData(e))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");const a=Qe.encode("--"+i+Ye),s=Qe.encode("--"+i+"--"+Ye+Ye);let u=s.byteLength;const c=Array.from(e.entries()).map((([e,t])=>{const n=new Ze(e,t);return u+=n.size,n}));u+=a.byteLength*c.length,u=re.toFiniteNumber(u);const l={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(u)&&(l["Content-Length"]=u),t&&t(l),p.Readable.from(async function*(){for(const e of c)yield a,yield*e.encode();yield s}())})(o,(e=>{I.set(e)}),{tag:`axios-${Ge}-boundary`,boundary:e&&e[1]||void 0})}else if(re.isFormData(o)&&re.isFunction(o.getHeaders)){if(I.set(o.getHeaders()),!I.hasContentLength())try{const e=await E.default.promisify(o.getLength).call(o);Number.isFinite(e)&&e>=0&&I.setContentLength(e)}catch(e){}}else if(re.isBlob(o))o.size&&I.setContentType(o.type||"application/octet-stream"),I.setContentLength(o.size||0),o=b.default.Readable.from($e(o));else if(o&&!re.isStream(o)){if(Buffer.isBuffer(o));else if(re.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else{if(!re.isString(o))return n(new oe("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",oe.ERR_BAD_REQUEST,e));o=Buffer.from(o,"utf-8")}if(I.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return n(new oe("Request body larger than maxBodyLength limit",oe.ERR_BAD_REQUEST,e))}const D=re.toFiniteNumber(I.getContentLength());let N,x;re.isArray(R)?(L=R[0],T=R[1]):L=T=R,o&&(P||L)&&(re.isStream(o)||(o=b.default.Readable.from(o,{objectMode:!1})),o=b.default.pipeline([o,new Je({length:D,maxRate:re.toFiniteNumber(L)})],re.noop),P&&o.on("progress",(e=>{P(Object.assign(e,{upload:!0}))}))),e.auth&&(N=(e.auth.username||"")+":"+(e.auth.password||"")),!N&&C.username&&(N=C.username+":"+C.password),N&&I.delete("authorization");try{x=ve(C.pathname+C.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const r=new Error(t.message);return r.config=e,r.url=e.url,r.exists=!0,n(r)}I.set("Accept-Encoding","gzip, compress, deflate"+(it?", br":""),!1);const j={path:x,method:c,headers:I.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:N,protocol:w,family:a,beforeRedirect:lt,beforeRedirects:{}};let M;!re.isUndefined(i)&&(j.lookup=i),e.socketPath?j.socketPath=e.socketPath:(j.hostname=C.hostname,j.port=C.port,pt(j,e.proxy,w+"//"+C.hostname+(C.port?":"+C.port:"")+j.path));const k=ut.test(j.protocol);if(j.agent=k?e.httpsAgent:e.httpAgent,e.transport?M=e.transport:0===e.maxRedirects?M=k?m.default:v.default:(e.maxRedirects&&(j.maxRedirects=e.maxRedirects),e.beforeRedirect&&(j.beforeRedirects.config=e.beforeRedirect),M=k?st:at),e.maxBodyLength>-1?j.maxBodyLength=e.maxBodyLength:j.maxBodyLength=1/0,e.insecureHTTPParser&&(j.insecureHTTPParser=e.insecureHTTPParser),d=M.request(j,(function(r){if(d.destroyed)return;const o=[r],i=+r.headers["content-length"];if(S){const e=new Je({length:re.toFiniteNumber(i),maxRate:re.toFiniteNumber(T)});S&&e.on("progress",(e=>{S(Object.assign(e,{download:!0}))})),o.push(e)}let a=r;const l=r.req||d;if(!1!==e.decompress&&r.headers["content-encoding"])switch("HEAD"!==c&&204!==r.statusCode||delete r.headers["content-encoding"],(r.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":o.push(y.default.createUnzip(rt)),delete r.headers["content-encoding"];break;case"deflate":o.push(new tt),o.push(y.default.createUnzip(rt)),delete r.headers["content-encoding"];break;case"br":it&&(o.push(y.default.createBrotliDecompress(ot)),delete r.headers["content-encoding"])}a=o.length>1?b.default.pipeline(o,re.noop):o[0];const p=b.default.finished(a,(()=>{p(),_()})),v={status:r.statusCode,statusText:r.statusMessage,headers:new xe(r.headers),config:e,request:l};if("stream"===s)v.data=a,Ue(t,n,v);else{const r=[];let o=0;a.on("data",(function(t){r.push(t),o+=t.length,e.maxContentLength>-1&&o>e.maxContentLength&&(f=!0,a.destroy(),n(new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l)))})),a.on("aborted",(function(){if(f)return;const t=new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l);a.destroy(t),n(t)})),a.on("error",(function(t){d.destroyed||n(oe.from(t,null,e,l))})),a.on("end",(function(){try{let e=1===r.length?r[0]:Buffer.concat(r);"arraybuffer"!==s&&(e=e.toString(u),u&&"utf8"!==u||(e=re.stripBOM(e))),v.data=e}catch(t){return n(oe.from(t,null,e,v.request,v))}Ue(t,n,v)}))}h.once("abort",(e=>{a.destroyed||(a.emit("error",e),a.destroy())}))})),h.once("abort",(e=>{n(e),d.destroy(e)})),d.on("error",(function(t){n(oe.from(t,null,e,d))})),d.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void n(new oe("error trying to parse `config.timeout` to int",oe.ERR_BAD_OPTION_VALUE,e,d));d.setTimeout(t,(function(){if(l)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Ee;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new oe(t,r.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,d)),g()}))}if(re.isStream(o)){let t=!1,n=!1;o.on("end",(()=>{t=!0})),o.once("error",(e=>{n=!0,d.destroy(e)})),o.on("close",(()=>{t||n||g(new ke("Request stream has been aborted",e,d))})),o.pipe(d)}else d.end(o)},new Promise(((e,n)=>{let r,o;const i=(e,t)=>{o||(o=!0,r&&r(e,t))},a=e=>{i(e,!0),n(e)};t((t=>{i(t),e(t)}),a,(e=>r=e)).catch(a)}));var t},xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=xe.from(e.headers).normalize();let i,a,{responseType:s,withXSRFToken:u}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(re.isFormData(r))if(Ce.hasStandardBrowserEnv||Ce.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(a=o.getContentType())){const[e,...t]=a?a.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const p=Fe(e.baseURL,e.url);function d(){if(!l)return;const r=xe.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());Ue((function(e){t(e),c()}),(function(e){n(e),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),ve(p,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new oe("Request aborted",oe.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new oe("Network Error",oe.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Ee;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new oe(t,r.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,l)),l=null},Ce.hasStandardBrowserEnv&&(u&&re.isFunction(u)&&(u=u(e)),u||!1!==u&&ht(p))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&ft.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&re.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),re.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&"json"!==s&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",_t(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",_t(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(n(!t||t.type?new ke(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const f=Be(p);f&&-1===Ce.protocols.indexOf(f)?n(new oe("Unsupported protocol "+f+":",oe.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};re.forEach(vt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const mt=e=>`- ${e}`,Et=e=>re.isFunction(e)||null===e||!1===e,gt=e=>{e=re.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Et(n)&&(r=vt[(t=String(n)).toLowerCase()],void 0===r))throw new oe(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new oe("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(mt).join("\n"):" "+mt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function yt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ke(null,e)}function bt(e){return yt(e),e.headers=xe.from(e.headers),e.data=je.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gt(e.adapter||Se.adapter)(e).then((function(t){return yt(e),t.data=je.call(e,e.transformResponse,t),t.headers=xe.from(t.headers),t}),(function(t){return Me(t)||(yt(e),t&&t.response&&(t.response.data=je.call(e,e.transformResponse,t.response),t.response.headers=xe.from(t.response.headers))),Promise.reject(t)}))}const At=e=>e instanceof xe?e.toJSON():e;function Ot(e,t){t=t||{};const n={};function r(e,t,n){return re.isPlainObject(e)&&re.isPlainObject(t)?re.merge.call({caseless:n},e,t):re.isPlainObject(t)?re.merge({},t):re.isArray(t)?t.slice():t}function o(e,t,n){return re.isUndefined(t)?re.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!re.isUndefined(t))return r(void 0,t)}function a(e,t){return re.isUndefined(t)?re.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>o(At(e),At(t),!0)};return re.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=u[r]||o,a=i(e[r],t[r],r);re.isUndefined(a)&&i!==s||(n[r]=a)})),n}const Ct={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ct[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const wt={};Ct.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new oe(r(o," has been removed"+(t?" in "+t:"")),oe.ERR_DEPRECATED);return t&&!wt[o]&&(wt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};const It={assertOptions:function(e,t,n){if("object"!=typeof e)throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new oe("option "+i+" must be "+n,oe.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new oe("Unknown option "+i,oe.ERR_BAD_OPTION)}},validators:Ct},St=It.validators;class Pt{constructor(e){this.defaults=e,this.interceptors={request:new me,response:new me}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ot(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&It.assertOptions(n,{silentJSONParsing:St.transitional(St.boolean),forcedJSONParsing:St.transitional(St.boolean),clarifyTimeoutError:St.transitional(St.boolean)},!1),null!=r&&(re.isFunction(r)?t.paramsSerializer={serialize:r}:It.assertOptions(r,{encode:St.function,serialize:St.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&re.merge(o.common,o[t.method]);o&&re.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=xe.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,p=0;if(!s){const e=[bt.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);p<l;)c=c.then(e[p++],e[p++]);return c}l=a.length;let d=t;for(p=0;p<l;){const e=a[p++],t=a[p++];try{d=e(d)}catch(e){t.call(this,e);break}}try{c=bt.call(this,d)}catch(e){return Promise.reject(e)}for(p=0,l=u.length;p<l;)c=c.then(u[p++],u[p++]);return c}getUri(e){return ve(Fe((e=Ot(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}re.forEach(["delete","get","head","options"],(function(e){Pt.prototype[e]=function(t,n){return this.request(Ot(n||{},{method:e,url:t,data:(n||{}).data}))}})),re.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Ot(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Pt.prototype[e]=t(),Pt.prototype[e+"Form"]=t(!0)}));const Rt=Pt;class Lt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new ke(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Lt((function(t){e=t})),cancel:e}}}const Tt=Lt,Dt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dt).forEach((([e,t])=>{Dt[t]=e}));const Nt=Dt,xt=function e(t){const n=new Rt(t),r=O(Rt.prototype.request,n);return re.extend(r,Rt.prototype,n,{allOwnKeys:!0}),re.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ot(t,n))},r}(Se);xt.Axios=Rt,xt.CanceledError=ke,xt.CancelToken=Tt,xt.isCancel=Me,xt.VERSION=Ge,xt.toFormData=pe,xt.AxiosError=oe,xt.Cancel=xt.CanceledError,xt.all=function(e){return Promise.all(e)},xt.spread=function(e){return function(t){return e.apply(null,t)}},xt.isAxiosError=function(e){return re.isObject(e)&&!0===e.isAxiosError},xt.mergeConfig=Ot,xt.AxiosHeaders=xe,xt.formToJSON=e=>we(re.isHTMLForm(e)?new FormData(e):e),xt.getAdapter=gt,xt.HttpStatusCode=Nt,xt.default=xt,e.exports=xt},6096:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6979);const o=function(e,t){for(var n=e.length;n--;)if((0,r.A)(e[n][0],t))return n;return-1};var i=Array.prototype.splice;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=o(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const s=a},5436:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(123),o=n(9600);const i=(0,r.A)(o.A,"Map")},3269:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});const r=(0,n(123).A)(Object,"create");var o=Object.prototype.hasOwnProperty;var i=Object.prototype.hasOwnProperty;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}a.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this};const s=a;var u=n(6096),c=n(5436);const l=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function p(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}p.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(c.A||u.A),string:new s}},p.prototype.delete=function(e){var t=l(this,e).delete(e);return this.size-=t?1:0,t},p.prototype.get=function(e){return l(this,e).get(e)},p.prototype.has=function(e){return l(this,e).has(e)},p.prototype.set=function(e,t){var n=l(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const d=p},6781:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6096);var o=n(5436),i=n(3269);function a(e){var t=this.__data__=new r.A(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new r.A,this.size=0},a.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var n=this.__data__;if(n instanceof r.A){var a=n.__data__;if(!o.A||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i.A(a)}return n.set(e,t),this.size=n.size,this};const s=a},3516:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9600).A.Symbol},7913:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9600).A.Uint8Array},7252:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(8748),o=n(6956),i=n(4517),a=n(5378),s=n(2888),u=Object.prototype.hasOwnProperty;const c=function(e,t){var n=(0,o.A)(e),c=!n&&(0,r.A)(e),l=!n&&!c&&(0,i.A)(e),p=!n&&!c&&!l&&(0,s.A)(e),d=n||c||l||p,f=d?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],h=f.length;for(var _ in e)!t&&!u.call(e,_)||d&&("length"==_||l&&("offset"==_||"parent"==_)||p&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||(0,a.A)(_,h))||f.push(_);return f}},5133:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},3271:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},6124:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9271),o=n(6979),i=Object.prototype.hasOwnProperty;const a=function(e,t,n){var a=e[t];i.call(e,t)&&(0,o.A)(a,n)&&(void 0!==n||t in e)||(0,r.A)(e,t,n)}},9271:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1758);const o=function(e,t,n){"__proto__"==t&&r.A?(0,r.A)(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},4711:(e,t,n)=>{"use strict";n.d(t,{A:()=>W});var r=n(6781);var o=n(6124),i=n(8078),a=n(8964);var s=n(1594);var u=n(9600),c="object"==typeof exports&&exports&&!exports.nodeType&&exports,l=c&&"object"==typeof module&&module&&!module.nodeType&&module,p=l&&l.exports===c?u.A.Buffer:void 0,d=p?p.allocUnsafe:void 0;var f=n(4402);var h=n(6430);var _=n(2475),v=n(7096),m=n(6881),E=Object.prototype.hasOwnProperty;var g=n(7913);const y=function(e){var t=new e.constructor(e.byteLength);return new g.A(t).set(new g.A(e)),t};var b=/\w*$/;var A=n(3516),O=A.A?A.A.prototype:void 0,C=O?O.valueOf:void 0;const w=function(e,t,n){var r,o,i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return y(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var n=t?y(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?y(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new(o=e).constructor(o.source,b.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return r=e,C?Object(C.call(r)):{}}};var I=n(7942),S=Object.create;const P=function(){function e(){}return function(t){if(!(0,I.default)(t))return{};if(S)return S(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var R=n(4878),L=n(1140);var T=n(6956),D=n(4517),N=n(7313);var x=n(8126),j=n(248),M=j.A&&j.A.isMap;const k=M?(0,x.A)(M):function(e){return(0,N.A)(e)&&"[object Map]"==(0,m.A)(e)};var U=j.A&&j.A.isSet;const F=U?(0,x.A)(U):function(e){return(0,N.A)(e)&&"[object Set]"==(0,m.A)(e)};var G="[object Arguments]",B="[object Function]",H="[object Object]",V={};V[G]=V["[object Array]"]=V["[object ArrayBuffer]"]=V["[object DataView]"]=V["[object Boolean]"]=V["[object Date]"]=V["[object Float32Array]"]=V["[object Float64Array]"]=V["[object Int8Array]"]=V["[object Int16Array]"]=V["[object Int32Array]"]=V["[object Map]"]=V["[object Number]"]=V[H]=V["[object RegExp]"]=V["[object Set]"]=V["[object String]"]=V["[object Symbol]"]=V["[object Uint8Array]"]=V["[object Uint8ClampedArray]"]=V["[object Uint16Array]"]=V["[object Uint32Array]"]=!0,V["[object Error]"]=V[B]=V["[object WeakMap]"]=!1;const W=function e(t,n,u,c,l,p){var g,y=1&n,b=2&n,A=4&n;if(u&&(g=l?u(t,c,l,p):u(t)),void 0!==g)return g;if(!(0,I.default)(t))return t;var O=(0,T.A)(t);if(O){if(g=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&E.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!y)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(t,g)}else{var C=(0,m.A)(t),S=C==B||"[object GeneratorFunction]"==C;if((0,D.A)(t))return function(e,t){if(t)return e.slice();var n=e.length,r=d?d(n):new e.constructor(n);return e.copy(r),r}(t,y);if(C==H||C==G||S&&!l){if(g=b||S?{}:function(e){return"function"!=typeof e.constructor||(0,L.A)(e)?{}:P((0,R.A)(e))}(t),!y)return b?function(e,t){return(0,i.A)(e,(0,h.A)(e),t)}(t,function(e,t){return e&&(0,i.A)(t,(0,s.A)(t),e)}(g,t)):function(e,t){return(0,i.A)(e,(0,f.A)(e),t)}(t,function(e,t){return e&&(0,i.A)(t,(0,a.default)(t),e)}(g,t))}else{if(!V[C])return l?t:{};g=w(t,C,y)}}p||(p=new r.A);var N=p.get(t);if(N)return N;p.set(t,g),F(t)?t.forEach((function(r){g.add(e(r,n,u,r,t,p))})):k(t)&&t.forEach((function(r,o){g.set(o,e(r,n,u,o,t,p))}));var x=A?b?v.A:_.A:b?s.A:a.default,j=O?void 0:x(t);return function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););}(j||t,(function(r,i){j&&(r=t[i=r]),(0,o.A)(g,i,e(r,n,u,i,t,p))})),g}},5841:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(371),o=n(9322);const i=function(e,t){for(var n=0,i=(t=(0,r.A)(t,e)).length;null!=e&&n<i;)e=e[(0,o.A)(t[n++])];return n&&n==i?e:void 0}},4494:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(3271),o=n(6956);const i=function(e,t,n){var i=t(e);return(0,o.A)(e)?i:(0,r.A)(i,n(e))}},4044:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(3516),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r.A?r.A.toStringTag:void 0;var u=Object.prototype.toString;var c=r.A?r.A.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}(e):function(e){return u.call(e)}(e)}},4869:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(6124),o=n(371),i=n(5378),a=n(7942),s=n(9322);const u=function(e,t,n,u){if(!(0,a.default)(e))return e;for(var c=-1,l=(t=(0,o.A)(t,e)).length,p=l-1,d=e;null!=d&&++c<l;){var f=(0,s.A)(t[c]),h=n;if("__proto__"===f||"constructor"===f||"prototype"===f)return e;if(c!=p){var _=d[f];void 0===(h=u?u(_,f,d):void 0)&&(h=(0,a.default)(_)?_:(0,i.A)(t[c+1])?[]:{})}(0,r.A)(d,f,h),d=d[f]}return e}},8126:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return function(t){return e(t)}}},371:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(6956),o=n(1677),i=n(3269);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(a.Cache||i.A),n}a.Cache=i.A;var s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g;const c=(l=a((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(s,(function(e,n,r,o){t.push(r?o.replace(u,"$1"):n||e)})),t}),(function(e){return 500===p.size&&p.clear(),e})),p=l.cache,l);var l,p,d=n(3516),f=n(5133),h=n(4089),_=d.A?d.A.prototype:void 0,v=_?_.toString:void 0;const m=function e(t){if("string"==typeof t)return t;if((0,r.A)(t))return(0,f.A)(t,e)+"";if((0,h.A)(t))return v?v.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},E=function(e){return null==e?"":m(e)},g=function(e,t){return(0,r.A)(e)?e:(0,o.A)(e,t)?[e]:c(E(e))}},8078:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6124),o=n(9271);const i=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),a?(0,o.A)(n,c,l):(0,r.A)(n,c,l)}return n}},1758:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(123);const o=function(){try{var e=(0,r.A)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},1787:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(3271),o=n(3516),i=n(8748),a=n(6956),s=o.A?o.A.isConcatSpreadable:void 0;const u=function(e){return(0,a.A)(e)||(0,i.A)(e)||!!(s&&e&&e[s])},c=function e(t,n,o,i,a){var s=-1,c=t.length;for(o||(o=u),a||(a=[]);++s<c;){var l=t[s];n>0&&o(l)?n>1?e(l,n-1,o,i,a):(0,r.A)(a,l):i||(a[a.length]=l)}return a},l=function(e){return null!=e&&e.length?c(e,1):[]};var p=Math.max;var d=n(1758),f=n(4151);const h=d.A?function(e,t){return(0,d.A)(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:f.A;var _=Date.now;const v=(m=h,E=0,g=0,function(){var e=_(),t=16-(e-g);if(g=e,t>0){if(++E>=800)return arguments[0]}else E=0;return m.apply(void 0,arguments)});var m,E,g;const y=function(e){return v(function(e,t,n){return t=p(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=p(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,s)}}(e,void 0,l),e+"")}},6713:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},2475:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(4494),o=n(4402),i=n(8964);const a=function(e){return(0,r.A)(e,i.default,o.A)}},7096:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(4494),o=n(6430),i=n(1594);const a=function(e){return(0,r.A)(e,i.A,o.A)}},123:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(405);const o=n(9600).A["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var s=n(7942),u=n(1548),c=/^\[object .+?Constructor\]$/,l=Function.prototype,p=Object.prototype,d=l.toString,f=p.hasOwnProperty,h=RegExp("^"+d.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const _=function(e){return!(!(0,s.default)(e)||(t=e,a&&a in t))&&((0,r.A)(e)?h:c).test((0,u.A)(e));var t},v=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return _(n)?n:void 0}},4878:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(0,n(7244).A)(Object.getPrototypeOf,Object)},4402:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1276),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const a=i?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(i(e),(function(t){return o.call(e,t)})))}:r.A},6430:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(3271),o=n(4878),i=n(4402),a=n(1276);const s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,r.A)(t,(0,i.A)(e)),e=(0,o.A)(e);return t}:a.A},6881:(e,t,n)=>{"use strict";n.d(t,{A:()=>O});var r=n(123),o=n(9600);const i=(0,r.A)(o.A,"DataView");var a=n(5436);const s=(0,r.A)(o.A,"Promise"),u=(0,r.A)(o.A,"Set"),c=(0,r.A)(o.A,"WeakMap");var l=n(4044),p=n(1548),d="[object Map]",f="[object Promise]",h="[object Set]",_="[object WeakMap]",v="[object DataView]",m=(0,p.A)(i),E=(0,p.A)(a.A),g=(0,p.A)(s),y=(0,p.A)(u),b=(0,p.A)(c),A=l.A;(i&&A(new i(new ArrayBuffer(1)))!=v||a.A&&A(new a.A)!=d||s&&A(s.resolve())!=f||u&&A(new u)!=h||c&&A(new c)!=_)&&(A=function(e){var t=(0,l.A)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,p.A)(n):"";if(r)switch(r){case m:return v;case E:return d;case g:return f;case y:return h;case b:return _}return t});const O=A},5378:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=/^(?:0|[1-9]\d*)$/;const o=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},1677:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6956),o=n(4089),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const s=function(e,t){if((0,r.A)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!(0,o.A)(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},1140:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=Object.prototype;const o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},248:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6713),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o&&r.A.process;const s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}()},7244:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},9600:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6713),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.A||o||Function("return this")()},9322:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(4089);const o=function(e){if("string"==typeof e||(0,r.A)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},1548:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=Function.prototype.toString;const o=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},3322:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4711);const o=function(e){return(0,r.A)(e,5)}},6979:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e,t){return e===t||e!=e&&t!=t}},385:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5841);const o=function(e,t,n){var o=null==e?void 0:(0,r.A)(e,t);return void 0===o?n:o}},2272:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});const r=function(e,t){return null!=e&&t in Object(e)};var o=n(371),i=n(8748),a=n(6956),s=n(5378),u=n(7893),c=n(9322);const l=function(e,t){return null!=e&&function(e,t,n){for(var r=-1,l=(t=(0,o.A)(t,e)).length,p=!1;++r<l;){var d=(0,c.A)(t[r]);if(!(p=null!=e&&n(e,d)))break;e=e[d]}return p||++r!=l?p:!!(l=null==e?0:e.length)&&(0,u.A)(l)&&(0,s.A)(d,l)&&((0,a.A)(e)||(0,i.A)(e))}(e,t,r)}},4151:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return e}},8748:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(4044),o=n(7313);const i=function(e){return(0,o.A)(e)&&"[object Arguments]"==(0,r.A)(e)};var a=Object.prototype,s=a.hasOwnProperty,u=a.propertyIsEnumerable;const c=i(function(){return arguments}())?i:function(e){return(0,o.A)(e)&&s.call(e,"callee")&&!u.call(e,"callee")}},6956:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=Array.isArray},1475:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(405),o=n(7893);const i=function(e){return null!=e&&(0,o.A)(e.length)&&!(0,r.A)(e)}},4517:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(9600);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?r.A.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},405:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(4044),o=n(7942);const i=function(e){if(!(0,o.default)(e))return!1;var t=(0,r.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},7893:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7942:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7313:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},4089:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(4044),o=n(7313);const i=function(e){return"symbol"==typeof e||(0,o.A)(e)&&"[object Symbol]"==(0,r.A)(e)}},2888:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(4044),o=n(7893),i=n(7313),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=n(8126),u=n(248),c=u.A&&u.A.isTypedArray;const l=c?(0,s.A)(c):function(e){return(0,i.A)(e)&&(0,o.A)(e.length)&&!!a[(0,r.A)(e)]}},8964:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(7252),o=n(1140);const i=(0,n(7244).A)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;var s=n(1475);const u=function(e){return(0,s.A)(e)?(0,r.A)(e):function(e){if(!(0,o.A)(e))return i(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}},1594:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(7252),o=n(7942),i=n(1140);var a=Object.prototype.hasOwnProperty;const s=function(e){if(!(0,o.default)(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=(0,i.A)(e),n=[];for(var r in e)("constructor"!=r||!t&&a.call(e,r))&&n.push(r);return n};var u=n(1475);const c=function(e){return(0,u.A)(e)?(0,r.A)(e,!0):s(e)}},8141:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>A});var r=n(5133),o=n(4711),i=n(371);var a=n(5841);const s=function(e,t){return t.length<2?e:(0,a.A)(e,function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(t,0,-1))};var u=n(9322);const c=function(e,t){return t=(0,i.A)(t,e),null==(e=s(e,t))||delete e[(0,u.A)((n=t,r=null==n?0:n.length,r?n[r-1]:void 0))];var n,r};var l=n(8078),p=n(4044),d=n(4878),f=n(7313),h=Function.prototype,_=Object.prototype,v=h.toString,m=_.hasOwnProperty,E=v.call(Object);const g=function(e){return function(e){if(!(0,f.A)(e)||"[object Object]"!=(0,p.A)(e))return!1;var t=(0,d.A)(e);if(null===t)return!0;var n=m.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&v.call(n)==E}(e)?void 0:e};var y=n(1787),b=n(7096);const A=(0,y.A)((function(e,t){var n={};if(null==e)return n;var a=!1;t=(0,r.A)(t,(function(t){return t=(0,i.A)(t,e),a||(a=t.length>1),t})),(0,l.A)(e,(0,b.A)(e),n),a&&(n=(0,o.A)(n,7,g));for(var s=t.length;s--;)c(n,t[s]);return n}))},7723:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(5841),o=n(4869),i=n(371);var a=n(2272);const s=function(e,t){return function(e,t,n){for(var a=-1,s=t.length,u={};++a<s;){var c=t[a],l=(0,r.A)(e,c);n(l,c)&&(0,o.A)(u,(0,i.A)(c,e),l)}return u}(e,t,(function(t,n){return(0,a.A)(e,n)}))},u=(0,n(1787).A)((function(e,t){return null==e?{}:s(e,t)}))},1128:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>$});const r=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n},o=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};var i=n(8964);var a=n(1475);const s=(u=function(e,t){return e&&o(e,t,i.default)},function(e,t){if(null==e)return e;if(!(0,a.A)(e))return u(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e});var u,c=n(6781),l=n(3269);function p(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new l.A;++t<n;)this.add(e[t])}p.prototype.add=p.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},p.prototype.has=function(e){return this.__data__.has(e)};const d=p,f=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},h=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var p=-1,h=!0,_=2&n?new d:void 0;for(i.set(e,t),i.set(t,e);++p<s;){var v=e[p],m=t[p];if(r)var E=a?r(m,v,p,t,e,i):r(v,m,p,e,t,i);if(void 0!==E){if(E)continue;h=!1;break}if(_){if(!f(t,(function(e,t){if(a=t,!_.has(a)&&(v===e||o(v,e,n,r,i)))return _.push(t);var a}))){h=!1;break}}else if(v!==m&&!o(v,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h};var _=n(3516),v=n(7913),m=n(6979);const E=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},g=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var y=_.A?_.A.prototype:void 0,b=y?y.valueOf:void 0;var A=n(2475),O=Object.prototype.hasOwnProperty;var C=n(6881),w=n(6956),I=n(4517),S=n(2888),P="[object Arguments]",R="[object Array]",L="[object Object]",T=Object.prototype.hasOwnProperty;const D=function(e,t,n,r,o,i){var a=(0,w.A)(e),s=(0,w.A)(t),u=a?R:(0,C.A)(e),l=s?R:(0,C.A)(t),p=(u=u==P?L:u)==L,d=(l=l==P?L:l)==L,f=u==l;if(f&&(0,I.A)(e)){if(!(0,I.A)(t))return!1;a=!0,p=!1}if(f&&!p)return i||(i=new c.A),a||(0,S.A)(e)?h(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new v.A(e),new v.A(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,m.A)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=E;case"[object Set]":var u=1&r;if(s||(s=g),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=h(s(e),s(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(b)return b.call(e)==b.call(t)}return!1}(e,t,u,n,r,o,i);if(!(1&n)){var _=p&&T.call(e,"__wrapped__"),y=d&&T.call(t,"__wrapped__");if(_||y){var D=_?e.value():e,N=y?t.value():t;return i||(i=new c.A),o(D,N,n,r,i)}}return!!f&&(i||(i=new c.A),function(e,t,n,r,o,i){var a=1&n,s=(0,A.A)(e),u=s.length;if(u!=(0,A.A)(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:O.call(t,l)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var _=e[l=s[c]],v=t[l];if(r)var m=a?r(v,_,l,t,e,i):r(_,v,l,e,t,i);if(!(void 0===m?_===v||o(_,v,n,r,i):m)){f=!1;break}h||(h="constructor"==l)}if(f&&!h){var E=e.constructor,g=t.constructor;E==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof g&&g instanceof g||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,o,i))};var N=n(7313);const x=function e(t,n,r,o,i){return t===n||(null==t||null==n||!(0,N.A)(t)&&!(0,N.A)(n)?t!=t&&n!=n:D(t,n,r,o,e,i))};var j=n(7942);const M=function(e){return e==e&&!(0,j.default)(e)},k=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},U=function(e){var t=function(e){for(var t=(0,i.default)(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,M(o)]}return t}(e);return 1==t.length&&t[0][2]?k(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var u=(s=n[o])[0],l=e[u],p=s[1];if(a&&s[2]){if(void 0===l&&!(u in e))return!1}else{var d=new c.A;if(r)var f=r(l,p,u,e,t,d);if(!(void 0===f?x(p,l,3,r,d):f))return!1}}return!0}(n,e,t)}};var F=n(385),G=n(2272),B=n(1677),H=n(9322);var V=n(4151);var W=n(5841);const q=function(e){return(0,B.A)(e)?(t=(0,H.A)(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return(0,W.A)(t,e)}}(e);var t},J=function(e){return"function"==typeof e?e:null==e?V.A:"object"==typeof e?(0,w.A)(e)?(t=e[0],n=e[1],(0,B.A)(t)&&M(n)?k((0,H.A)(t),n):function(e){var r=(0,F.default)(e,t);return void 0===r&&r===n?(0,G.A)(e,t):x(n,r,3)}):U(e):q(e);var t,n},z=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n},$=function(e,t,n){var o=(0,w.A)(e)?r:z,i=arguments.length<3;return o(e,J(t),n,i,s)}},9413:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4869);const o=function(e,t,n){return null==e?e:(0,r.A)(e,t,n)}},1276:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(){return[]}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(8186);return __webpack_exports__})()));
|