warcraft-vscode 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +23 -0
- package/.lua-format +4 -0
- package/.vscodeignore +16 -0
- package/CHANGELOG.md +432 -0
- package/LICENSE.md +21 -0
- package/README.md +136 -0
- package/bin/MopaqPack-rs.exe +0 -0
- package/bin/ObjEditing.exe +0 -0
- package/images/icon.png +0 -0
- package/out/cli.js +3 -0
- package/out/cli.js.LICENSE.txt +1 -0
- package/out/standalone.js +2 -0
- package/out/standalone.js.LICENSE.txt +8 -0
- package/package.json +258 -0
- package/res/.version.json +1 -0
- package/res/def.zip +0 -0
- package/warcraft_validation.json +28 -0
package/out/cli.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see cli.js.LICENSE.txt */
|
|
2
|
+
(()=>{var __webpack_modules__={657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="undefined"==typeof URL?r(7310).URL:URL,o=Object.prototype.toString,i=e=>t=>typeof t===e,s=e=>!u.nullOrUndefined(e)&&!u.nullOrUndefined(e.constructor)&&u.function_(e.constructor.isBuffer)&&e.constructor.isBuffer(e),a=e=>o.call(e).slice(8,-1)||null,c=e=>t=>a(t)===e;function u(e){switch(e){case null:return"null";case!0:case!1:return"boolean"}switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"symbol":return"symbol"}if(u.function_(e))return"Function";if(u.observable(e))return"Observable";if(Array.isArray(e))return"Array";if(s(e))return"Buffer";const t=a(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}!function(e){const t=e=>"object"==typeof e;e.undefined=i("undefined"),e.string=i("string"),e.number=i("number"),e.function_=i("function"),e.null_=e=>null===e,e.class_=t=>e.function_(t)&&t.toString().startsWith("class "),e.boolean=e=>!0===e||!1===e,e.symbol=i("symbol"),e.numericString=t=>e.string(t)&&t.length>0&&!Number.isNaN(Number(t)),e.array=Array.isArray,e.buffer=s,e.nullOrUndefined=t=>e.null_(t)||e.undefined(t),e.object=r=>!e.nullOrUndefined(r)&&(e.function_(r)||t(r)),e.iterable=t=>!e.nullOrUndefined(t)&&e.function_(t[Symbol.iterator]),e.asyncIterable=t=>!e.nullOrUndefined(t)&&e.function_(t[Symbol.asyncIterator]),e.generator=t=>e.iterable(t)&&e.function_(t.next)&&e.function_(t.throw),e.nativePromise=e=>c("Promise")(e),e.promise=r=>e.nativePromise(r)||(r=>!e.null_(r)&&t(r)&&e.function_(r.then)&&e.function_(r.catch))(r),e.generatorFunction=c("GeneratorFunction"),e.asyncFunction=c("AsyncFunction"),e.boundFunction=t=>e.function_(t)&&!t.hasOwnProperty("prototype"),e.regExp=c("RegExp"),e.date=c("Date"),e.error=c("Error"),e.map=e=>c("Map")(e),e.set=e=>c("Set")(e),e.weakMap=e=>c("WeakMap")(e),e.weakSet=e=>c("WeakSet")(e),e.int8Array=c("Int8Array"),e.uint8Array=c("Uint8Array"),e.uint8ClampedArray=c("Uint8ClampedArray"),e.int16Array=c("Int16Array"),e.uint16Array=c("Uint16Array"),e.int32Array=c("Int32Array"),e.uint32Array=c("Uint32Array"),e.float32Array=c("Float32Array"),e.float64Array=c("Float64Array"),e.arrayBuffer=c("ArrayBuffer"),e.sharedArrayBuffer=c("SharedArrayBuffer"),e.dataView=c("DataView"),e.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,e.urlInstance=e=>c("URL")(e),e.urlString=t=>{if(!e.string(t))return!1;try{return new n(t),!0}catch(e){return!1}},e.truthy=e=>Boolean(e),e.falsy=e=>!e,e.nan=e=>Number.isNaN(e);const r=new Set(["undefined","string","number","boolean","symbol"]);e.primitive=t=>e.null_(t)||r.has(typeof t),e.integer=e=>Number.isInteger(e),e.safeInteger=e=>Number.isSafeInteger(e),e.plainObject=e=>{let t;return"Object"===a(e)&&(t=Object.getPrototypeOf(e),null===t||t===Object.getPrototypeOf({}))};const o=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"]);e.typedArray=e=>{const t=a(e);return null!==t&&o.has(t)},e.arrayLike=t=>!e.nullOrUndefined(t)&&!e.function_(t)&&(t=>e.safeInteger(t)&&t>-1)(t.length),e.inRange=(t,r)=>{if(e.number(r))return t>=Math.min(0,r)&&t<=Math.max(r,0);if(e.array(r)&&2===r.length)return t>=Math.min(...r)&&t<=Math.max(...r);throw new TypeError(`Invalid range: ${JSON.stringify(r)}`)};const u=["innerHTML","ownerDocument","style","attributes","nodeValue"];e.domElement=t=>e.object(t)&&1===t.nodeType&&e.string(t.nodeName)&&!e.plainObject(t)&&u.every((e=>e in t)),e.observable=e=>!!(e&&(e[Symbol.observable]&&e===e[Symbol.observable]()||e["@@observable"]&&e===e["@@observable"]())),e.nodeStream=r=>!e.nullOrUndefined(r)&&t(r)&&e.function_(r.pipe)&&!e.observable(r),e.infinite=e=>e===1/0||e===-1/0;const l=t=>r=>e.integer(r)&&Math.abs(r%2)===t;e.even=l(0),e.odd=l(1),e.emptyArray=t=>e.array(t)&&0===t.length,e.nonEmptyArray=t=>e.array(t)&&t.length>0,e.emptyString=t=>e.string(t)&&0===t.length,e.nonEmptyString=t=>e.string(t)&&t.length>0,e.emptyStringOrWhitespace=t=>e.emptyString(t)||(t=>e.string(t)&&!1===/\S/.test(t))(t),e.emptyObject=t=>e.object(t)&&!e.map(t)&&!e.set(t)&&0===Object.keys(t).length,e.nonEmptyObject=t=>e.object(t)&&!e.map(t)&&!e.set(t)&&Object.keys(t).length>0,e.emptySet=t=>e.set(t)&&0===t.size,e.nonEmptySet=t=>e.set(t)&&t.size>0,e.emptyMap=t=>e.map(t)&&0===t.size,e.nonEmptyMap=t=>e.map(t)&&t.size>0;const f=(t,r,n)=>{if(!1===e.function_(r))throw new TypeError(`Invalid predicate: ${JSON.stringify(r)}`);if(0===n.length)throw new TypeError("Invalid number of values");return t.call(n,r)};e.any=(e,...t)=>f(Array.prototype.some,e,t),e.all=(e,...t)=>f(Array.prototype.every,e,t)}(u||(u={})),Object.defineProperties(u,{class:{value:u.class_},function:{value:u.function_},null:{value:u.null_}}),t.default=u,e.exports=u,e.exports.default=u},5113:(e,t,r)=>{"use strict";const n=r(3174);e.exports=e=>{const t={start:Date.now(),socket:null,lookup:null,connect:null,upload:null,response:null,end:null,error:null,phases:{wait:null,dns:null,tcp:null,request:null,firstByte:null,download:null,total:null}},r=e=>{const r=e.emit.bind(e);e.emit=(n,...o)=>("error"===n&&(t.error=Date.now(),t.phases.total=t.error-t.start,e.emit=r),r(n,...o))};let o=!1;const i=()=>{t.upload=Date.now(),t.phases.request=t.upload-t.connect};return r(e),e.once("socket",(e=>{t.socket=Date.now(),t.phases.wait=t.socket-t.start;const r=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};e.once("lookup",r),n(e,(()=>{t.connect=Date.now(),null===t.lookup&&(e.removeListener("lookup",r),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup,o&&!t.upload&&i()}))})),e.once("finish",(()=>{o=!0,t.connect&&i()})),e.once("response",(e=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,r(e),e.once("end",(()=>{t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start}))})),t}},2779:(e,t,r)=>{var n=r(4300).Buffer,o=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function i(e){if(n.isBuffer(e))return e;var t="function"==typeof n.alloc&&"function"==typeof n.from;if("number"==typeof e)return t?n.alloc(e):new n(e);if("string"==typeof e)return t?n.from(e):new n(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function s(e,t){e=i(e),n.isBuffer(t)&&(t=t.readUInt32BE(0));for(var r=-1^~~t,s=0;s<e.length;s++)r=o[255&(r^e[s])]^r>>>8;return-1^r}function a(){return e=s.apply(null,arguments),(t=i(4)).writeInt32BE(e,0),t;var e,t}"undefined"!=typeof Int32Array&&(o=new Int32Array(o)),a.signed=function(){return s.apply(null,arguments)},a.unsigned=function(){return s.apply(null,arguments)>>>0},e.exports=a},490:(e,t,r)=>{"use strict";const{PassThrough:n}=r(2781);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const o="buffer"===r;let i=!1;t?i=!(r||o):r=r||"utf8",o&&(r=null);const s=new n({objectMode:i});r&&s.setEncoding(r);let a=0;const c=[];return s.on("data",(e=>{c.push(e),i?a=c.length:a+=e.length})),s.getBufferedValue=()=>t?c:o?Buffer.concat(c,a):c.join(""),s.getBufferedLength=()=>a,s}},7769:(e,t,r)=>{"use strict";const n=r(4286),o=r(490);class i extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function s(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t={maxBuffer:1/0,...t};const{maxBuffer:r}=t;let s;return await new Promise(((a,c)=>{const u=e=>{e&&(e.bufferedData=s.getBufferedValue()),c(e)};s=n(e,o(t),(e=>{e?u(e):a()})),s.on("data",(()=>{s.getBufferedLength()>r&&u(new i)}))})),s.getBufferedValue()}e.exports=s,e.exports.default=s,e.exports.buffer=(e,t)=>s(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>s(e,{...t,array:!0}),e.exports.MaxBufferError=i},9421:e=>{"use strict";e.exports=e=>{const t={};for(const[r,n]of Object.entries(e))t[r.toLowerCase()]=n;return t}},3481:(e,t,r)=>{"use strict";const n=r(2361),o=r(7310),i=r(15),s=r(7769),a=r(6214),c=r(4259),u=r(9421),l=r(9715),f=r(4958);class d{constructor(e,t){if("function"!=typeof e)throw new TypeError("Parameter `request` must be a function");return this.cache=new f({uri:"string"==typeof t&&t,store:"string"!=typeof t&&t,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let f;if("string"==typeof t)f=h(o.parse(t)),t={};else if(t instanceof o.URL)f=h(o.parse(t.toString())),t={};else{const[e,...r]=(t.path||"").split("?"),n=r.length>0?`?${r.join("?")}`:"";f=h({...t,pathname:e,search:n})}(t={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...t,...p(f)}).headers=u(t.headers);const m=new n,g=i(o.format(f),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),y=`${t.method}:${g}`;let v=!1,A=!1;const b=t=>{A=!0;let n,o=!1;const i=new Promise((e=>{n=()=>{o||(o=!0,e())}})),u=e=>{if(v&&!t.forceRefresh){e.status=e.statusCode;const r=a.fromObject(v.cachePolicy).revalidatedPolicy(t,e);if(!r.modified){const t=r.policy.responseHeaders();(e=new c(v.statusCode,t,v.body,v.url)).cachePolicy=r.policy,e.fromCache=!0}}let n;e.fromCache||(e.cachePolicy=new a(t,e,t),e.fromCache=!1),t.cache&&e.cachePolicy.storable()?(n=l(e),(async()=>{try{const r=s.buffer(e);if(await Promise.race([i,new Promise((t=>e.once("end",t)))]),o)return;const n=await r,a={cachePolicy:e.cachePolicy.toObject(),url:e.url,statusCode:e.fromCache?v.statusCode:e.statusCode,body:n};let c=t.strictTtl?e.cachePolicy.timeToLive():void 0;t.maxTtl&&(c=c?Math.min(c,t.maxTtl):t.maxTtl),await this.cache.set(y,a,c)}catch(e){m.emit("error",new d.CacheError(e))}})()):t.cache&&v&&(async()=>{try{await this.cache.delete(y)}catch(e){m.emit("error",new d.CacheError(e))}})(),m.emit("response",n||e),"function"==typeof r&&r(n||e)};try{const r=e(t,u);r.once("error",n),r.once("abort",n),m.emit("request",r)}catch(e){m.emit("error",new d.RequestError(e))}};return(async()=>{const e=async e=>{await Promise.resolve();const t=e.cache?await this.cache.get(y):void 0;if(void 0===t)return b(e);const n=a.fromObject(t.cachePolicy);if(n.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=n.responseHeaders(),o=new c(t.statusCode,e,t.body,t.url);o.cachePolicy=n,o.fromCache=!0,m.emit("response",o),"function"==typeof r&&r(o)}else v=t,e.headers=n.revalidationHeaders(e),b(e)},n=e=>m.emit("error",new d.CacheError(e));this.cache.once("error",n),m.on("response",(()=>this.cache.removeListener("error",n)));try{await e(t)}catch(e){t.automaticFailover&&!A&&b(t),m.emit("error",new d.CacheError(e))}})(),m}}}function p(e){const t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t}function h(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}d.RequestError=class extends Error{constructor(e){super(e.message),this.name="RequestError",Object.assign(this,e)}},d.CacheError=class extends Error{constructor(e){super(e.message),this.name="CacheError",Object.assign(this,e)}},e.exports=d},9715:(e,t,r)=>{"use strict";const n=r(2781).PassThrough,o=r(6344);e.exports=e=>{if(!e||!e.pipe)throw new TypeError("Parameter `response` must be a response stream.");const t=new n;return o(e,t),e.pipe(t)}},6854:(e,t,r)=>{e.exports=r(7866)},7866:e=>{e.exports=function(e,t,r){if(r=r||!1,!e)throw new Error("tdArray must be provided");if(!t)throw new Error("indicator must be provided");e=JSON.parse(JSON.stringify(e));var n={},o=0,i={};e.forEach((function(o,s){o.forEach((function(a,c){var u=t(a,c,s),l=[];if(e[s-1]&&void 0!==e[s-1][c]&&l.push(i[c+"_"+(s-1)]),void 0!==o[c-1]&&l.push(i[c-1+"_"+s]),r||(e[s-1]&&void 0!==e[s-1][c-1]&&l.push(i[c-1+"_"+(s-1)]),e[s-1]&&void 0!==e[s-1][c+1]&&l.push(i[c+1+"_"+(s-1)])),l.length){var d=!1;l.forEach((function(e){if(e.identifier==u)if(d){var t=i[c+"_"+s];e.domainId!=t.domainId&&(r=e.domainId,o=t.domainId,l=n[r],f=n[o],l.identifier==f.identifier&&(f.domainId=l.domainId,f.points.forEach((function(e){e.domainId=l.domainId,i[e.x+"_"+e.y].domainId=l.domainId})),l.points=l.points.concat(f.points),delete n[o]))}else!function(e,t,r,o){var s=n[o],a={value:e,x:t,y:r,identifier:s.identifier,domainId:o};i[t+"_"+r]={value:e,identifier:s.identifier,domainId:o},s.points.push(a)}(a,c,s,e.domainId),d=!0;var r,o,l,f})),d||f(a,c,s,u)}else f(a,c,s,u)}))}));var s={domains:[],totalDomains:0,groupByIdentifier:{},totalIdentifiers:0},a=null,c=null,u=null;for(a in n)(u=n[a]).bounding=l(u.points),c=u.identifier,s.domains.push(u),s.totalDomains++,c in s.groupByIdentifier||(s.groupByIdentifier[c]=[],s.totalIdentifiers++),s.groupByIdentifier[c].push(u);function l(e){var t=null,r=null,n=null,o=null;return e.forEach((function(e){(null===t||e.x<t)&&(t=e.x),(null===r||e.y<r)&&(r=e.y),(null===n||e.x>n)&&(n=e.x),(null===o||e.y>o)&&(o=e.y)})),{x:t,y:r,w:n-t,h:o-r}}function f(e,t,r,s){var a={identifier:s,domainId:++o,bounding:{},points:[]},c={value:e,x:t,y:r,identifier:s,domainId:a.domainId};i[t+"_"+r]={value:e,identifier:s,domainId:a.domainId},a.points.push(c),n[a.domainId]=a}return s}},346:(e,t,r)=>{"use strict";const n=r(2781).PassThrough,o=r(9796),i=r(6344);e.exports=e=>{if(-1===["gzip","deflate"].indexOf(e.headers["content-encoding"]))return e;const t=o.createUnzip(),r=new n;return i(e,r),t.on("error",(e=>{"Z_BUF_ERROR"!==e.code?r.emit("error",e):r.end()})),e.pipe(t).pipe(r),r}},3174:e=>{"use strict";e.exports=(e,t)=>{e.writable&&!e.connecting?t():e.once("connect",t)}},8869:(e,t,r)=>{"use strict";var n=r(2781);function o(e,t,r){void 0===r&&(r=t,t=e,e=null),n.Duplex.call(this,e),"function"!=typeof r.read&&(r=new n.Readable(e).wrap(r)),this._writable=t,this._readable=r,this._waiting=!1;var o=this;t.once("finish",(function(){o.end()})),this.once("finish",(function(){t.end()})),r.on("readable",(function(){o._waiting&&(o._waiting=!1,o._read())})),r.once("end",(function(){o.push(null)})),e&&void 0!==e.bubbleErrors&&!e.bubbleErrors||(t.on("error",(function(e){o.emit("error",e)})),r.on("error",(function(e){o.emit("error",e)})))}o.prototype=Object.create(n.Duplex.prototype,{constructor:{value:o}}),o.prototype._write=function(e,t,r){this._writable.write(e,t,r)},o.prototype._read=function(){for(var e,t=0;null!==(e=this._readable.read());)this.push(e),t++;0===t&&(this._waiting=!0)},e.exports=function(e,t,r){return new o(e,t,r)},e.exports.DuplexWrapper=o},2840:(e,t,r)=>{var n=r(778),o=function(){},i=function(e,t,r){if("function"==typeof t)return i(e,null,t);t||(t={}),r=n(r||o);var s=e._writableState,a=e._readableState,c=t.readable||!1!==t.readable&&e.readable,u=t.writable||!1!==t.writable&&e.writable,l=function(){e.writable||f()},f=function(){u=!1,c||r.call(e)},d=function(){c=!1,u||r.call(e)},p=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},h=function(t){r.call(e,t)},m=function(){return(!c||a&&a.ended)&&(!u||s&&s.ended)?void 0:r.call(e,new Error("premature close"))},g=function(){e.req.on("finish",f)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",f),e.on("abort",m),e.req?g():e.on("request",g)):u&&!s&&(e.on("end",l),e.on("close",l)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",p),e.on("end",d),e.on("finish",f),!1!==t.error&&e.on("error",h),e.on("close",m),function(){e.removeListener("complete",f),e.removeListener("abort",m),e.removeListener("request",g),e.req&&e.req.removeListener("finish",f),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",f),e.removeListener("exit",p),e.removeListener("end",d),e.removeListener("error",h),e.removeListener("close",m)}};e.exports=i},9346:(e,t,r)=>{!function(){var t=r(2361);function n(e,t){var r;if("function"!=typeof t)throw new TypeError("interceptor must be a function");return this.emit("newInterceptor",e,t),this._interceptors[e]?this._interceptors[e].push(t):this._interceptors[e]=[t],this._interceptors[e].warned||(r=void 0!==this._maxInterceptors?this._maxInterceptors:d.defaultMaxInterceptors)&&r>0&&this._interceptors[e].length>r&&(this._interceptors[e].warned=!0,console.error("(node) warning: possible events-intercept EventEmitter memory leak detected. %d interceptors added. Use emitter.setMaxInterceptors(n) to increase limit.",this._interceptors[e].length),console.trace()),this}function o(e){return function(t){var r,n,o=this;return o._interceptors||(o._interceptors={}),(n=o._interceptors[t])?(r=0,function i(s){var a;if(!s)return r===n.length?e.apply(o,[t].concat(Array.prototype.slice.call(arguments).slice(1))):(a=Array.prototype.slice.call(arguments).slice(1).concat([i]),n[(r+=1)-1].apply(o,a));o.emit("error",s)}.apply(o,[null].concat(Array.prototype.slice.call(arguments).slice(1)))):e.apply(o,arguments)}}function i(e){return this._interceptors&&this._interceptors[e]?this._interceptors[e].slice():[]}function s(e,t){var r,n,o,i;if("function"!=typeof t)throw new TypeError("interceptor must be a function");if(!this._interceptors||!this._interceptors[e])return this;for(n=-1,i=(o=(r=this._interceptors[e]).length)-1;i>=0;i--)if(r[i]===t){n=i;break}return n<0||(1===o?delete this._interceptors[e]:r.splice(n,1),this.emit("removeInterceptor",e,t)),this}function a(e){return function(t){var r,n=e.call(this,t),o=n.slice();return"newListener"===t||"removeListener"===t?(-1!==(r=n.indexOf(c))&&o.splice(r,1),o):n}}function c(){}function u(e){e.on("newListener",c),e.on("removeListener",c)}function l(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError("n must be a positive number");return this._maxInterceptors=e,this}function f(e){var t,r,n;if(!this._interceptors||0===Object.getOwnPropertyNames(this._interceptors).length)return this;if(0===arguments.length){for(t in this._interceptors)this._interceptors.hasOwnProperty(t)&&"removeInterceptor"!==t&&this.removeAllInterceptors(t);this.removeAllInterceptors("removeInterceptor"),this._interceptors={}}else if(this._interceptors[e]){for(n=(r=this._interceptors[e]).length-1;n>=0;n--)this.removeInterceptor(e,r[n]);delete this._interceptors[e]}return this}function d(){t.EventEmitter.call(this),u(this)}r(3837).inherits(d,t.EventEmitter),d.prototype.intercept=n,d.prototype.emit=o(d.super_.prototype.emit),d.prototype.interceptors=i,d.prototype.removeInterceptor=s,d.prototype.removeAllInterceptors=f,d.prototype.setMaxInterceptors=l,d.prototype.listeners=a(d.super_.prototype.listeners),d.defaultMaxInterceptors=10,e.exports={EventEmitter:d,patch:function(e){var t=e.emit,r=e.listeners;e.emit=o(t),e.intercept=n,e.interceptors=i,e.removeInterceptor=s,e.removeAllInterceptors=f,e.setMaxInterceptors=l,e.listeners=a(r),u(e)}}}()},8913:(e,t,r)=>{var n=r(7147),o=r(3837),i=r(2781),s=i.Readable,a=i.Writable,c=i.PassThrough,u=r(9916),l=r(2361).EventEmitter;function f(e,t){t=t||{},l.call(this),this.fd=e,this.pend=new u,this.pend.max=1,this.refCount=0,this.autoClose=!!t.autoClose}function d(e,t){t=t||{},s.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end,this.pos=this.start,this.destroyed=!1}function p(e,t){t=t||{},a.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=null==t.end?1/0:+t.end,this.bytesWritten=0,this.pos=this.start,this.destroyed=!1,this.on("finish",this.destroy.bind(this))}function h(e,t){l.call(this),t=t||{},this.refCount=0,this.buffer=e,this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}t.createFromBuffer=function(e,t){return new h(e,t)},t.createFromFd=function(e,t){return new f(e,t)},t.BufferSlicer=h,t.FdSlicer=f,o.inherits(f,l),f.prototype.read=function(e,t,r,o,i){var s=this;s.pend.go((function(a){n.read(s.fd,e,t,r,o,(function(e,t,r){a(),i(e,t,r)}))}))},f.prototype.write=function(e,t,r,o,i){var s=this;s.pend.go((function(a){n.write(s.fd,e,t,r,o,(function(e,t,r){a(),i(e,t,r)}))}))},f.prototype.createReadStream=function(e){return new d(this,e)},f.prototype.createWriteStream=function(e){return new p(this,e)},f.prototype.ref=function(){this.refCount+=1},f.prototype.unref=function(){var e=this;if(e.refCount-=1,!(e.refCount>0)){if(e.refCount<0)throw new Error("invalid unref");e.autoClose&&n.close(e.fd,(function(t){t?e.emit("error",t):e.emit("close")}))}},o.inherits(d,s),d.prototype._read=function(e){var t=this;if(!t.destroyed){var r=Math.min(t._readableState.highWaterMark,e);if(null!=t.endOffset&&(r=Math.min(r,t.endOffset-t.pos)),r<=0)return t.destroyed=!0,t.push(null),void t.context.unref();t.context.pend.go((function(e){if(t.destroyed)return e();var o=new Buffer(r);n.read(t.context.fd,o,0,r,t.pos,(function(r,n){r?t.destroy(r):0===n?(t.destroyed=!0,t.push(null),t.context.unref()):(t.pos+=n,t.push(o.slice(0,n))),e()}))}))}},d.prototype.destroy=function(e){this.destroyed||(e=e||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",e),this.context.unref())},o.inherits(p,a),p.prototype._write=function(e,t,r){var o=this;if(!o.destroyed){if(o.pos+e.length>o.endOffset){var i=new Error("maximum file length exceeded");return i.code="ETOOBIG",o.destroy(),void r(i)}o.context.pend.go((function(t){if(o.destroyed)return t();n.write(o.context.fd,e,0,e.length,o.pos,(function(e,n){e?(o.destroy(),t(),r(e)):(o.bytesWritten+=n,o.pos+=n,o.emit("progress"),t(),r())}))}))}},p.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.context.unref())},o.inherits(h,l),h.prototype.read=function(e,t,r,n,o){var i=n+r,s=i-this.buffer.length,a=s>0?s:r;this.buffer.copy(e,t,n,i),setImmediate((function(){o(null,a)}))},h.prototype.write=function(e,t,r,n,o){e.copy(this.buffer,n,t,t+r),setImmediate((function(){o(null,r,e)}))},h.prototype.createReadStream=function(e){var t=new c(e=e||{});t.destroyed=!1,t.start=e.start||0,t.endOffset=e.end,t.pos=t.endOffset||this.buffer.length;for(var r=this.buffer.slice(t.start,t.pos),n=0;;){var o=n+this.maxChunkSize;if(o>=r.length){n<r.length&&t.write(r.slice(n,r.length));break}t.write(r.slice(n,o)),n=o}return t.end(),t.destroy=function(){t.destroyed=!0},t},h.prototype.createWriteStream=function(e){var t=this,r=new a(e=e||{});return r.start=e.start||0,r.endOffset=null==e.end?this.buffer.length:+e.end,r.bytesWritten=0,r.pos=r.start,r.destroyed=!1,r._write=function(e,n,o){if(!r.destroyed){var i=r.pos+e.length;if(i>r.endOffset){var s=new Error("maximum file length exceeded");return s.code="ETOOBIG",r.destroyed=!0,void o(s)}e.copy(t.buffer,r.pos,0,e.length),r.bytesWritten+=e.length,r.pos=i,r.emit("progress"),o()}},r.destroy=function(){r.destroyed=!0},r},h.prototype.ref=function(){this.refCount+=1},h.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")}},5302:(e,t,r)=>{"use strict";const n=r(2650),o=r(1017),i=r(1381).mkdirsSync,s=r(318).utimesMillisSync,a=r(2733);function c(e,t,r,i){if(!i.filter||i.filter(t,r))return function(e,t,r,i){const s=(i.dereference?n.statSync:n.lstatSync)(t);return s.isDirectory()?function(e,t,r,o,i){if(!t)return function(e,t,r,o){return n.mkdirSync(r),l(t,r,o),n.chmodSync(r,e.mode)}(e,r,o,i);if(t&&!t.isDirectory())throw new Error(`Cannot overwrite non-directory '${o}' with directory '${r}'.`);return l(r,o,i)}(s,e,t,r,i):s.isFile()||s.isCharacterDevice()||s.isBlockDevice()?function(e,t,r,o,i){return t?function(e,t,r,o){if(o.overwrite)return n.unlinkSync(r),u(e,t,r,o);if(o.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,o,i):u(e,r,o,i)}(s,e,t,r,i):s.isSymbolicLink()?function(e,t,r,i){let s=n.readlinkSync(t);if(i.dereference&&(s=o.resolve(process.cwd(),s)),e){let e;try{e=n.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlinkSync(s,r);throw e}if(i.dereference&&(e=o.resolve(process.cwd(),e)),a.isSrcSubdir(s,e))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`);if(n.statSync(r).isDirectory()&&a.isSrcSubdir(e,s))throw new Error(`Cannot overwrite '${e}' with '${s}'.`);return function(e,t){return n.unlinkSync(t),n.symlinkSync(e,t)}(s,r)}return n.symlinkSync(s,r)}(e,t,r,i):void 0}(e,t,r,i)}function u(e,t,o,i){return"function"==typeof n.copyFileSync?(n.copyFileSync(t,o),n.chmodSync(o,e.mode),i.preserveTimestamps?s(o,e.atime,e.mtime):void 0):function(e,t,o,i){const s=r(7065)(65536),a=n.openSync(t,"r"),c=n.openSync(o,"w",e.mode);let u=0;for(;u<e.size;){const e=n.readSync(a,s,0,65536,u);n.writeSync(c,s,0,e),u+=e}i.preserveTimestamps&&n.futimesSync(c,e.atime,e.mtime),n.closeSync(a),n.closeSync(c)}(e,t,o,i)}function l(e,t,r){n.readdirSync(e).forEach((n=>function(e,t,r,n){const i=o.join(t,e),s=o.join(r,e),{destStat:u}=a.checkPathsSync(i,s,"copy");return c(u,i,s,n)}(n,e,t,r)))}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:s,destStat:u}=a.checkPathsSync(e,t,"copy");return a.checkParentPathsSync(e,s,t,"copy"),function(e,t,r,s){if(s.filter&&!s.filter(t,r))return;const a=o.dirname(r);return n.existsSync(a)||i(a),c(e,t,r,s)}(u,e,t,r)}},8690:(e,t,r)=>{"use strict";e.exports={copySync:r(5302)}},7189:(e,t,r)=>{"use strict";const n=r(2650),o=r(1017),i=r(1381).mkdirs,s=r(9257).pathExists,a=r(318).utimesMillis,c=r(2733);function u(e,t,r,n,a){const c=o.dirname(r);s(c,((o,s)=>o?a(o):s?f(e,t,r,n,a):void i(c,(o=>o?a(o):f(e,t,r,n,a)))))}function l(e,t,r,n,o,i){Promise.resolve(o.filter(r,n)).then((s=>s?e(t,r,n,o,i):i()),(e=>i(e)))}function f(e,t,r,n,o){return n.filter?l(d,e,t,r,n,o):d(e,t,r,n,o)}function d(e,t,r,i,s){(i.dereference?n.stat:n.lstat)(t,((a,u)=>a?s(a):u.isDirectory()?function(e,t,r,o,i,s){return t?t&&!t.isDirectory()?s(new Error(`Cannot overwrite non-directory '${o}' with directory '${r}'.`)):m(r,o,i,s):function(e,t,r,o,i){n.mkdir(r,(s=>{if(s)return i(s);m(t,r,o,(t=>t?i(t):n.chmod(r,e.mode,i)))}))}(e,r,o,i,s)}(u,e,t,r,i,s):u.isFile()||u.isCharacterDevice()||u.isBlockDevice()?function(e,t,r,o,i,s){return t?function(e,t,r,o,i){if(!o.overwrite)return o.errorOnExist?i(new Error(`'${r}' already exists`)):i();n.unlink(r,(n=>n?i(n):p(e,t,r,o,i)))}(e,r,o,i,s):p(e,r,o,i,s)}(u,e,t,r,i,s):u.isSymbolicLink()?function(e,t,r,i,s){n.readlink(t,((t,a)=>t?s(t):(i.dereference&&(a=o.resolve(process.cwd(),a)),e?void n.readlink(r,((t,u)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?n.symlink(a,r,s):s(t):(i.dereference&&(u=o.resolve(process.cwd(),u)),c.isSrcSubdir(a,u)?s(new Error(`Cannot copy '${a}' to a subdirectory of itself, '${u}'.`)):e.isDirectory()&&c.isSrcSubdir(u,a)?s(new Error(`Cannot overwrite '${u}' with '${a}'.`)):function(e,t,r){n.unlink(t,(o=>o?r(o):n.symlink(e,t,r)))}(a,r,s)))):n.symlink(a,r,s))))}(e,t,r,i,s):void 0))}function p(e,t,r,o,i){return"function"==typeof n.copyFile?n.copyFile(t,r,(t=>t?i(t):h(e,r,o,i))):function(e,t,r,o,i){const s=n.createReadStream(t);s.on("error",(e=>i(e))).once("open",(()=>{const t=n.createWriteStream(r,{mode:e.mode});t.on("error",(e=>i(e))).on("open",(()=>s.pipe(t))).once("close",(()=>h(e,r,o,i)))}))}(e,t,r,o,i)}function h(e,t,r,o){n.chmod(t,e.mode,(n=>n?o(n):r.preserveTimestamps?a(t,e.atime,e.mtime,o):o()))}function m(e,t,r,o){n.readdir(e,((n,i)=>n?o(n):g(i,e,t,r,o)))}function g(e,t,r,n,i){const s=e.pop();return s?function(e,t,r,n,i,s){const a=o.join(r,t),u=o.join(n,t);c.checkPaths(a,u,"copy",((t,o)=>{if(t)return s(t);const{destStat:c}=o;f(c,a,u,i,(t=>t?s(t):g(e,r,n,i,s)))}))}(e,s,t,r,n,i):i()}e.exports=function(e,t,r,n){"function"!=typeof r||n?"function"==typeof r&&(r={filter:r}):(n=r,r={}),n=n||function(){},(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),c.checkPaths(e,t,"copy",((o,i)=>{if(o)return n(o);const{srcStat:s,destStat:a}=i;c.checkParentPaths(e,s,t,"copy",(o=>o?n(o):r.filter?l(u,a,e,t,r,n):u(a,e,t,r,n)))}))}},6464:(e,t,r)=>{"use strict";const n=r(8981).E;e.exports={copy:n(r(7189))}},5590:(e,t,r)=>{"use strict";const n=r(8981).E,o=r(2650),i=r(1017),s=r(1381),a=r(4542),c=n((function(e,t){t=t||function(){},o.readdir(e,((r,n)=>{if(r)return s.mkdirs(e,t);n=n.map((t=>i.join(e,t))),function e(){const r=n.pop();if(!r)return t();a.remove(r,(r=>{if(r)return t(r);e()}))}()}))}));function u(e){let t;try{t=o.readdirSync(e)}catch(t){return s.mkdirsSync(e)}t.forEach((t=>{t=i.join(e,t),a.removeSync(t)}))}e.exports={emptyDirSync:u,emptydirSync:u,emptyDir:c,emptydir:c}},6530:(e,t,r)=>{"use strict";const n=r(8981).E,o=r(1017),i=r(2650),s=r(1381),a=r(9257).pathExists;e.exports={createFile:n((function(e,t){function r(){i.writeFile(e,"",(e=>{if(e)return t(e);t()}))}i.stat(e,((n,i)=>{if(!n&&i.isFile())return t();const c=o.dirname(e);a(c,((e,n)=>e?t(e):n?r():void s.mkdirs(c,(e=>{if(e)return t(e);r()}))))}))})),createFileSync:function(e){let t;try{t=i.statSync(e)}catch(e){}if(t&&t.isFile())return;const r=o.dirname(e);i.existsSync(r)||s.mkdirsSync(r),i.writeFileSync(e,"")}}},1720:(e,t,r)=>{"use strict";const n=r(6530),o=r(4147),i=r(3635);e.exports={createFile:n.createFile,createFileSync:n.createFileSync,ensureFile:n.createFile,ensureFileSync:n.createFileSync,createLink:o.createLink,createLinkSync:o.createLinkSync,ensureLink:o.createLink,ensureLinkSync:o.createLinkSync,createSymlink:i.createSymlink,createSymlinkSync:i.createSymlinkSync,ensureSymlink:i.createSymlink,ensureSymlinkSync:i.createSymlinkSync}},4147:(e,t,r)=>{"use strict";const n=r(8981).E,o=r(1017),i=r(2650),s=r(1381),a=r(9257).pathExists;e.exports={createLink:n((function(e,t,r){function n(e,t){i.link(e,t,(e=>{if(e)return r(e);r(null)}))}a(t,((c,u)=>c?r(c):u?r(null):void i.lstat(e,(i=>{if(i)return i.message=i.message.replace("lstat","ensureLink"),r(i);const c=o.dirname(t);a(c,((o,i)=>o?r(o):i?n(e,t):void s.mkdirs(c,(o=>{if(o)return r(o);n(e,t)}))))}))))})),createLinkSync:function(e,t){if(i.existsSync(t))return;try{i.lstatSync(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const r=o.dirname(t);return i.existsSync(r)||s.mkdirsSync(r),i.linkSync(e,t)}}},6072:(e,t,r)=>{"use strict";const n=r(1017),o=r(2650),i=r(9257).pathExists;e.exports={symlinkPaths:function(e,t,r){if(n.isAbsolute(e))return o.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),r(t)):r(null,{toCwd:e,toDst:e})));{const s=n.dirname(t),a=n.join(s,e);return i(a,((t,i)=>t?r(t):i?r(null,{toCwd:a,toDst:e}):o.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),r(t)):r(null,{toCwd:e,toDst:n.relative(s,e)})))))}},symlinkPathsSync:function(e,t){let r;if(n.isAbsolute(e)){if(r=o.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const i=n.dirname(t),s=n.join(i,e);if(r=o.existsSync(s),r)return{toCwd:s,toDst:e};if(r=o.existsSync(e),!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(i,e)}}}}},9259:(e,t,r)=>{"use strict";const n=r(2650);e.exports={symlinkType:function(e,t,r){if(r="function"==typeof t?t:r,t="function"!=typeof t&&t)return r(null,t);n.lstat(e,((e,n)=>{if(e)return r(null,"file");t=n&&n.isDirectory()?"dir":"file",r(null,t)}))},symlinkTypeSync:function(e,t){let r;if(t)return t;try{r=n.lstatSync(e)}catch(e){return"file"}return r&&r.isDirectory()?"dir":"file"}}},3635:(e,t,r)=>{"use strict";const n=r(8981).E,o=r(1017),i=r(2650),s=r(1381),a=s.mkdirs,c=s.mkdirsSync,u=r(6072),l=u.symlinkPaths,f=u.symlinkPathsSync,d=r(9259),p=d.symlinkType,h=d.symlinkTypeSync,m=r(9257).pathExists;e.exports={createSymlink:n((function(e,t,r,n){n="function"==typeof r?r:n,r="function"!=typeof r&&r,m(t,((s,c)=>s?n(s):c?n(null):void l(e,t,((s,c)=>{if(s)return n(s);e=c.toDst,p(c.toCwd,r,((r,s)=>{if(r)return n(r);const c=o.dirname(t);m(c,((r,o)=>r?n(r):o?i.symlink(e,t,s,n):void a(c,(r=>{if(r)return n(r);i.symlink(e,t,s,n)}))))}))}))))})),createSymlinkSync:function(e,t,r){if(i.existsSync(t))return;const n=f(e,t);e=n.toDst,r=h(n.toCwd,r);const s=o.dirname(t);return i.existsSync(s)||c(s),i.symlinkSync(e,t,r)}}},7749:(e,t,r)=>{"use strict";const n=r(8981).E,o=r(2650),i=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof o[e]));Object.keys(o).forEach((e=>{"promises"!==e&&(t[e]=o[e])})),i.forEach((e=>{t[e]=n(o[e])})),t.exists=function(e,t){return"function"==typeof t?o.exists(e,t):new Promise((t=>o.exists(e,t)))},t.read=function(e,t,r,n,i,s){return"function"==typeof s?o.read(e,t,r,n,i,s):new Promise(((s,a)=>{o.read(e,t,r,n,i,((e,t,r)=>{if(e)return a(e);s({bytesRead:t,buffer:r})}))}))},t.write=function(e,t,...r){return"function"==typeof r[r.length-1]?o.write(e,t,...r):new Promise(((n,i)=>{o.write(e,t,...r,((e,t,r)=>{if(e)return i(e);n({bytesWritten:t,buffer:r})}))}))},"function"==typeof o.realpath.native&&(t.realpath.native=n(o.realpath.native))},5674:(e,t,r)=>{"use strict";e.exports=Object.assign({},r(7749),r(8690),r(6464),r(5590),r(1720),r(6573),r(1381),r(4026),r(530),r(1315),r(9257),r(4542));const n=r(7147);Object.getOwnPropertyDescriptor(n,"promises")&&Object.defineProperty(e.exports,"promises",{get:()=>n.promises})},6573:(e,t,r)=>{"use strict";const n=r(8981).E,o=r(7183);o.outputJson=n(r(3508)),o.outputJsonSync=r(9578),o.outputJSON=o.outputJson,o.outputJSONSync=o.outputJsonSync,o.writeJSON=o.writeJson,o.writeJSONSync=o.writeJsonSync,o.readJSON=o.readJson,o.readJSONSync=o.readJsonSync,e.exports=o},7183:(e,t,r)=>{"use strict";const n=r(8981).E,o=r(6813);e.exports={readJson:n(o.readFile),readJsonSync:o.readFileSync,writeJson:n(o.writeFile),writeJsonSync:o.writeFileSync}},9578:(e,t,r)=>{"use strict";const n=r(2650),o=r(1017),i=r(1381),s=r(7183);e.exports=function(e,t,r){const a=o.dirname(e);n.existsSync(a)||i.mkdirsSync(a),s.writeJsonSync(e,t,r)}},3508:(e,t,r)=>{"use strict";const n=r(1017),o=r(1381),i=r(9257).pathExists,s=r(7183);e.exports=function(e,t,r,a){"function"==typeof r&&(a=r,r={});const c=n.dirname(e);i(c,((n,i)=>n?a(n):i?s.writeJson(e,t,r,a):void o.mkdirs(c,(n=>{if(n)return a(n);s.writeJson(e,t,r,a)}))))}},1381:(e,t,r)=>{"use strict";const n=(0,r(8981).E)(r(4887)),o=r(1452);e.exports={mkdirs:n,mkdirsSync:o,mkdirp:n,mkdirpSync:o,ensureDir:n,ensureDirSync:o}},1452:(e,t,r)=>{"use strict";const n=r(2650),o=r(1017),i=r(2660).invalidWin32Path,s=parseInt("0777",8);e.exports=function e(t,r,a){r&&"object"==typeof r||(r={mode:r});let c=r.mode;const u=r.fs||n;if("win32"===process.platform&&i(t)){const e=new Error(t+" contains invalid WIN32 path characters.");throw e.code="EINVAL",e}void 0===c&&(c=s&~process.umask()),a||(a=null),t=o.resolve(t);try{u.mkdirSync(t,c),a=a||t}catch(n){if("ENOENT"===n.code){if(o.dirname(t)===t)throw n;a=e(o.dirname(t),r,a),e(t,r,a)}else{let e;try{e=u.statSync(t)}catch(e){throw n}if(!e.isDirectory())throw n}}return a}},4887:(e,t,r)=>{"use strict";const n=r(2650),o=r(1017),i=r(2660).invalidWin32Path,s=parseInt("0777",8);e.exports=function e(t,r,a,c){if("function"==typeof r?(a=r,r={}):r&&"object"==typeof r||(r={mode:r}),"win32"===process.platform&&i(t)){const e=new Error(t+" contains invalid WIN32 path characters.");return e.code="EINVAL",a(e)}let u=r.mode;const l=r.fs||n;void 0===u&&(u=s&~process.umask()),c||(c=null),a=a||function(){},t=o.resolve(t),l.mkdir(t,u,(n=>{if(!n)return a(null,c=c||t);if("ENOENT"===n.code){if(o.dirname(t)===t)return a(n);e(o.dirname(t),r,((n,o)=>{n?a(n,o):e(t,r,a,o)}))}else l.stat(t,((e,t)=>{e||!t.isDirectory()?a(n,c):a(null,c)}))}))}},2660:(e,t,r)=>{"use strict";const n=r(1017);function o(e){return(e=n.normalize(n.resolve(e)).split(n.sep)).length>0?e[0]:null}const i=/[<>:"|?*]/;e.exports={getRootPath:o,invalidWin32Path:function(e){const t=o(e);return e=e.replace(t,""),i.test(e)}}},4026:(e,t,r)=>{"use strict";e.exports={moveSync:r(6006)}},6006:(e,t,r)=>{"use strict";const n=r(2650),o=r(1017),i=r(8690).copySync,s=r(4542).removeSync,a=r(1381).mkdirpSync,c=r(2733);function u(e,t,r){try{n.renameSync(e,t)}catch(n){if("EXDEV"!==n.code)throw n;return function(e,t,r){return i(e,t,{overwrite:r,errorOnExist:!0}),s(e)}(e,t,r)}}e.exports=function(e,t,r){const i=(r=r||{}).overwrite||r.clobber||!1,{srcStat:l}=c.checkPathsSync(e,t,"move");return c.checkParentPathsSync(e,l,t,"move"),a(o.dirname(t)),function(e,t,r){if(r)return s(t),u(e,t,r);if(n.existsSync(t))throw new Error("dest already exists.");return u(e,t,r)}(e,t,i)}},530:(e,t,r)=>{"use strict";const n=r(8981).E;e.exports={move:n(r(436))}},436:(e,t,r)=>{"use strict";const n=r(2650),o=r(1017),i=r(6464).copy,s=r(4542).remove,a=r(1381).mkdirp,c=r(9257).pathExists,u=r(2733);function l(e,t,r,o){n.rename(e,t,(n=>n?"EXDEV"!==n.code?o(n):function(e,t,r,n){i(e,t,{overwrite:r,errorOnExist:!0},(t=>t?n(t):s(e,n)))}(e,t,r,o):o()))}e.exports=function(e,t,r,n){"function"==typeof r&&(n=r,r={});const i=r.overwrite||r.clobber||!1;u.checkPaths(e,t,"move",((r,f)=>{if(r)return n(r);const{srcStat:d}=f;u.checkParentPaths(e,d,t,"move",(r=>{if(r)return n(r);a(o.dirname(t),(r=>r?n(r):function(e,t,r,n){if(r)return s(t,(o=>o?n(o):l(e,t,r,n)));c(t,((o,i)=>o?n(o):i?n(new Error("dest already exists.")):l(e,t,r,n)))}(e,t,i,n)))}))}))}},1315:(e,t,r)=>{"use strict";const n=r(8981).E,o=r(2650),i=r(1017),s=r(1381),a=r(9257).pathExists;e.exports={outputFile:n((function(e,t,r,n){"function"==typeof r&&(n=r,r="utf8");const c=i.dirname(e);a(c,((i,a)=>i?n(i):a?o.writeFile(e,t,r,n):void s.mkdirs(c,(i=>{if(i)return n(i);o.writeFile(e,t,r,n)}))))})),outputFileSync:function(e,...t){const r=i.dirname(e);if(o.existsSync(r))return o.writeFileSync(e,...t);s.mkdirsSync(r),o.writeFileSync(e,...t)}}},9257:(e,t,r)=>{"use strict";const n=r(8981).p,o=r(7749);e.exports={pathExists:n((function(e){return o.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:o.existsSync}},4542:(e,t,r)=>{"use strict";const n=r(8981).E,o=r(3456);e.exports={remove:n(o),removeSync:o.sync}},3456:(e,t,r)=>{"use strict";const n=r(2650),o=r(1017),i=r(9491),s="win32"===process.platform;function a(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||n[t],e[t+="Sync"]=e[t]||n[t]})),e.maxBusyTries=e.maxBusyTries||3}function c(e,t,r){let n=0;"function"==typeof t&&(r=t,t={}),i(e,"rimraf: missing path"),i.strictEqual(typeof e,"string","rimraf: path should be a string"),i.strictEqual(typeof r,"function","rimraf: callback function required"),i(t,"rimraf: invalid options argument provided"),i.strictEqual(typeof t,"object","rimraf: options should be object"),a(t),u(e,t,(function o(i){if(i){if(("EBUSY"===i.code||"ENOTEMPTY"===i.code||"EPERM"===i.code)&&n<t.maxBusyTries)return n++,setTimeout((()=>u(e,t,o)),100*n);"ENOENT"===i.code&&(i=null)}r(i)}))}function u(e,t,r){i(e),i(t),i("function"==typeof r),t.lstat(e,((n,o)=>n&&"ENOENT"===n.code?r(null):n&&"EPERM"===n.code&&s?l(e,t,n,r):o&&o.isDirectory()?d(e,t,n,r):void t.unlink(e,(n=>{if(n){if("ENOENT"===n.code)return r(null);if("EPERM"===n.code)return s?l(e,t,n,r):d(e,t,n,r);if("EISDIR"===n.code)return d(e,t,n,r)}return r(n)}))))}function l(e,t,r,n){i(e),i(t),i("function"==typeof n),r&&i(r instanceof Error),t.chmod(e,438,(o=>{o?n("ENOENT"===o.code?null:r):t.stat(e,((o,i)=>{o?n("ENOENT"===o.code?null:r):i.isDirectory()?d(e,t,r,n):t.unlink(e,n)}))}))}function f(e,t,r){let n;i(e),i(t),r&&i(r instanceof Error);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw r}try{n=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw r}n.isDirectory()?h(e,t,r):t.unlinkSync(e)}function d(e,t,r,n){i(e),i(t),r&&i(r instanceof Error),i("function"==typeof n),t.rmdir(e,(s=>{!s||"ENOTEMPTY"!==s.code&&"EEXIST"!==s.code&&"EPERM"!==s.code?s&&"ENOTDIR"===s.code?n(r):n(s):function(e,t,r){i(e),i(t),i("function"==typeof r),t.readdir(e,((n,i)=>{if(n)return r(n);let s,a=i.length;if(0===a)return t.rmdir(e,r);i.forEach((n=>{c(o.join(e,n),t,(n=>{if(!s)return n?r(s=n):void(0==--a&&t.rmdir(e,r))}))}))}))}(e,t,n)}))}function p(e,t){let r;a(t=t||{}),i(e,"rimraf: missing path"),i.strictEqual(typeof e,"string","rimraf: path should be a string"),i(t,"rimraf: missing options"),i.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e)}catch(r){if("ENOENT"===r.code)return;"EPERM"===r.code&&s&&f(e,t,r)}try{r&&r.isDirectory()?h(e,t,null):t.unlinkSync(e)}catch(r){if("ENOENT"===r.code)return;if("EPERM"===r.code)return s?f(e,t,r):h(e,t,r);if("EISDIR"!==r.code)throw r;h(e,t,r)}}function h(e,t,r){i(e),i(t),r&&i(r instanceof Error);try{t.rmdirSync(e)}catch(n){if("ENOTDIR"===n.code)throw r;if("ENOTEMPTY"===n.code||"EEXIST"===n.code||"EPERM"===n.code)!function(e,t){if(i(e),i(t),t.readdirSync(e).forEach((r=>p(o.join(e,r),t))),!s)return t.rmdirSync(e,t);{const r=Date.now();do{try{return t.rmdirSync(e,t)}catch(e){}}while(Date.now()-r<500)}}(e,t);else if("ENOENT"!==n.code)throw n}}e.exports=c,c.sync=p},7065:e=>{"use strict";e.exports=function(e){if("function"==typeof Buffer.allocUnsafe)try{return Buffer.allocUnsafe(e)}catch(t){return new Buffer(e)}return new Buffer(e)}},2733:(e,t,r)=>{"use strict";const n=r(2650),o=r(1017),i=process.versions.node.split("."),s=Number.parseInt(i[0],10),a=Number.parseInt(i[1],10),c=Number.parseInt(i[2],10);function u(){if(s>10)return!0;if(10===s){if(a>5)return!0;if(5===a&&c>=0)return!0}return!1}function l(e,t){const r=o.resolve(e).split(o.sep).filter((e=>e)),n=o.resolve(t).split(o.sep).filter((e=>e));return r.reduce(((e,t,r)=>e&&n[r]===t),!0)}function f(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:function(e,t,r,o){!function(e,t,r){u()?n.stat(e,{bigint:!0},((e,o)=>{if(e)return r(e);n.stat(t,{bigint:!0},((e,t)=>e?"ENOENT"===e.code?r(null,{srcStat:o,destStat:null}):r(e):r(null,{srcStat:o,destStat:t})))})):n.stat(e,((e,o)=>{if(e)return r(e);n.stat(t,((e,t)=>e?"ENOENT"===e.code?r(null,{srcStat:o,destStat:null}):r(e):r(null,{srcStat:o,destStat:t})))}))}(e,t,((n,i)=>{if(n)return o(n);const{srcStat:s,destStat:a}=i;return a&&a.ino&&a.dev&&a.ino===s.ino&&a.dev===s.dev?o(new Error("Source and destination must not be the same.")):s.isDirectory()&&l(e,t)?o(new Error(f(e,t,r))):o(null,{srcStat:s,destStat:a})}))},checkPathsSync:function(e,t,r){const{srcStat:o,destStat:i}=function(e,t){let r,o;r=u()?n.statSync(e,{bigint:!0}):n.statSync(e);try{o=u()?n.statSync(t,{bigint:!0}):n.statSync(t)}catch(e){if("ENOENT"===e.code)return{srcStat:r,destStat:null};throw e}return{srcStat:r,destStat:o}}(e,t);if(i&&i.ino&&i.dev&&i.ino===o.ino&&i.dev===o.dev)throw new Error("Source and destination must not be the same.");if(o.isDirectory()&&l(e,t))throw new Error(f(e,t,r));return{srcStat:o,destStat:i}},checkParentPaths:function e(t,r,i,s,a){const c=o.resolve(o.dirname(t)),l=o.resolve(o.dirname(i));if(l===c||l===o.parse(l).root)return a();u()?n.stat(l,{bigint:!0},((n,o)=>n?"ENOENT"===n.code?a():a(n):o.ino&&o.dev&&o.ino===r.ino&&o.dev===r.dev?a(new Error(f(t,i,s))):e(t,r,l,s,a))):n.stat(l,((n,o)=>n?"ENOENT"===n.code?a():a(n):o.ino&&o.dev&&o.ino===r.ino&&o.dev===r.dev?a(new Error(f(t,i,s))):e(t,r,l,s,a)))},checkParentPathsSync:function e(t,r,i,s){const a=o.resolve(o.dirname(t)),c=o.resolve(o.dirname(i));if(c===a||c===o.parse(c).root)return;let l;try{l=u()?n.statSync(c,{bigint:!0}):n.statSync(c)}catch(e){if("ENOENT"===e.code)return;throw e}if(l.ino&&l.dev&&l.ino===r.ino&&l.dev===r.dev)throw new Error(f(t,i,s));return e(t,r,c,s)},isSrcSubdir:l}},318:(e,t,r)=>{"use strict";const n=r(2650),o=r(2037),i=r(1017);e.exports={hasMillisRes:function(e){let t=i.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));t=i.join(o.tmpdir(),t);const r=new Date(1435410243862);n.writeFile(t,"https://github.com/jprichardson/node-fs-extra/pull/141",(o=>{if(o)return e(o);n.open(t,"r+",((o,i)=>{if(o)return e(o);n.futimes(i,r,r,(r=>{if(r)return e(r);n.close(i,(r=>{if(r)return e(r);n.stat(t,((t,r)=>{if(t)return e(t);e(null,r.mtime>1435410243e3)}))}))}))}))}))},hasMillisResSync:function(){let e=i.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));e=i.join(o.tmpdir(),e);const t=new Date(1435410243862);n.writeFileSync(e,"https://github.com/jprichardson/node-fs-extra/pull/141");const r=n.openSync(e,"r+");return n.futimesSync(r,t,t),n.closeSync(r),n.statSync(e).mtime>1435410243e3},timeRemoveMillis:function(e){if("number"==typeof e)return 1e3*Math.floor(e/1e3);if(e instanceof Date)return new Date(1e3*Math.floor(e.getTime()/1e3));throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")},utimesMillis:function(e,t,r,o){n.open(e,"r+",((e,i)=>{if(e)return o(e);n.futimes(i,t,r,(e=>{n.close(i,(t=>{o&&o(e||t)}))}))}))},utimesMillisSync:function(e,t,r){const o=n.openSync(e,"r+");return n.futimesSync(o,t,r),n.closeSync(o)}}},2639:e=>{"use strict";e.exports=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:e.__proto__};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t}},2650:(e,t,r)=>{var n,o,i=r(7147),s=r(70),a=r(7443),c=r(2639),u=[],l=r(3837),f=function(){};function d(e){s(e),e.gracefulify=d,e.FileReadStream=f,e.FileWriteStream=m,e.createReadStream=function(e,t){return new f(e,t)},e.createWriteStream=function(e,t){return new m(e,t)};var t=e.readFile;e.readFile=function(e,r,n){return"function"==typeof r&&(n=r,r=null),function e(r,n,o){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?("function"==typeof o&&o.apply(this,arguments),h()):p([e,[r,n,o]])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,o){return"function"==typeof n&&(o=n,n=null),function e(t,n,o,i){return r(t,n,o,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?("function"==typeof i&&i.apply(this,arguments),h()):p([e,[t,n,o,i]])}))}(e,t,n,o)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,o){return"function"==typeof r&&(o=r,r=null),function e(t,r,o,i){return n(t,r,o,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?("function"==typeof i&&i.apply(this,arguments),h()):p([e,[t,r,o,i]])}))}(e,t,r,o)});var o=e.readdir;function i(t){return o.apply(e,t)}if(e.readdir=function(e,t,r){var n=[e];return"function"!=typeof t?n.push(t):r=t,n.push((function(e,t){t&&t.sort&&t.sort(),!e||"EMFILE"!==e.code&&"ENFILE"!==e.code?("function"==typeof r&&r.apply(this,arguments),h()):p([i,[n]])})),i(n)},"v0.8"===process.version.substr(0,4)){var c=a(e);f=c.ReadStream,m=c.WriteStream}var u=e.ReadStream;u&&(f.prototype=Object.create(u.prototype),f.prototype.open=function(){var e=this;y(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var l=e.WriteStream;function f(e,t){return this instanceof f?(u.apply(this,arguments),this):f.apply(Object.create(f.prototype),arguments)}function m(e,t){return this instanceof m?(l.apply(this,arguments),this):m.apply(Object.create(m.prototype),arguments)}l&&(m.prototype=Object.create(l.prototype),m.prototype.open=function(){var e=this;y(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),e.ReadStream=f,e.WriteStream=m;var g=e.open;function y(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,o){return g(t,r,n,(function(i,s){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?("function"==typeof o&&o.apply(this,arguments),h()):p([e,[t,r,n,o]])}))}(e,t,r,n)}return e.open=y,e}function p(e){f("ENQUEUE",e[0].name,e[1]),u.push(e)}function h(){var e=u.shift();e&&(f("RETRY",e[0].name,e[1]),e[0].apply(null,e[1]))}l.debuglog?f=l.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(f=function(){var e=l.format.apply(l,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){f(u),r(9491).equal(u.length,0)})),e.exports=d(c(i)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched&&(e.exports=d(i),i.__patched=!0),e.exports.close=(n=i.close,function(e,t){return n.call(i,e,(function(e){e||h(),"function"==typeof t&&t.apply(this,arguments)}))}),e.exports.closeSync=(o=i.closeSync,function(e){var t=o.apply(i,arguments);return h(),t}),/\bgraceful-fs\b/.test(i.closeSync.toString())||(i.closeSync=e.exports.closeSync,i.close=e.exports.close)},7443:(e,t,r)=>{var n=r(2781).Stream;e.exports=function(e){return{ReadStream:function t(r,o){if(!(this instanceof t))return new t(r,o);n.call(this);var i=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,o=o||{};for(var s=Object.keys(o),a=0,c=s.length;a<c;a++){var u=s[a];this[u]=o[u]}if(this.encoding&&this.setEncoding(this.encoding),void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}null===this.fd?e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()})):process.nextTick((function(){i._read()}))},WriteStream:function t(r,o){if(!(this instanceof t))return new t(r,o);n.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,o=o||{};for(var i=Object.keys(o),s=0,a=i.length;s<a;s++){var c=i[s];this[c]=o[c]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}},70:(e,t,r)=>{var n=r(2057),o=process.cwd,i=null,s=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return i||(i=o.call(process)),i};try{process.cwd()}catch(e){}var a=process.chdir;process.chdir=function(e){i=null,a.call(process,e)},e.exports=function(e){var t,r,o;function i(t){return t?function(r,n,o){return t.call(e,r,n,(function(e){d(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function a(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!d(e))throw e}}:t}function c(t){return t?function(r,n,o,i){return t.call(e,r,n,o,(function(e){d(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function u(t){return t?function(r,n,o){try{return t.call(e,r,n,o)}catch(e){if(!d(e))throw e}}:t}function l(t){return t?function(r,n,o){function i(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),o&&o.apply(this,arguments)}return"function"==typeof n&&(o=n,n=null),n?t.call(e,r,n,i):t.call(e,r,i)}:t}function f(t){return t?function(r,n){var o=n?t.call(e,r,n):t.call(e,r);return o.uid<0&&(o.uid+=4294967296),o.gid<0&&(o.gid+=4294967296),o}:t}function d(e){return!e||"ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,o){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){t?o&&o(t):e.fchmod(n,r,(function(t){e.close(n,(function(e){o&&o(t||e)}))}))}))},e.lchmodSync=function(t,r){var o,i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),s=!0;try{o=e.fchmodSync(i,r),s=!1}finally{if(s)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return o}}(e),e.lutimes||function(e){n.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,r,o,i){e.open(t,n.O_SYMLINK,(function(t,n){t?i&&i(t):e.futimes(n,r,o,(function(t){e.close(n,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,o){var i,s=e.openSync(t,n.O_SYMLINK),a=!0;try{i=e.futimesSync(s,r,o),a=!1}finally{if(a)try{e.closeSync(s)}catch(e){}else e.closeSync(s)}return i}):(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e),e.chown=c(e.chown),e.fchown=c(e.fchown),e.lchown=c(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=u(e.chownSync),e.fchownSync=u(e.fchownSync),e.lchownSync=u(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=f(e.statSync),e.fstatSync=f(e.fstatSync),e.lstatSync=f(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){}),e.lchown||(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){}),"win32"===s&&(e.rename=(t=e.rename,function(r,n,o){var i=Date.now(),s=0;t(r,n,(function a(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-i<6e4)return setTimeout((function(){e.stat(n,(function(e,i){e&&"ENOENT"===e.code?t(r,n,a):o(c)}))}),s),void(s<100&&(s+=10));o&&o(c)}))})),e.read=(o=e.read,function(t,r,n,i,s,a){var c;if(a&&"function"==typeof a){var u=0;c=function(l,f,d){if(l&&"EAGAIN"===l.code&&u<10)return u++,o.call(e,t,r,n,i,s,c);a.apply(this,arguments)}}return o.call(e,t,r,n,i,s,c)}),e.readSync=(r=e.readSync,function(t,n,o,i,s){for(var a=0;;)try{return r.call(e,t,n,o,i,s)}catch(e){if("EAGAIN"===e.code&&a<10){a++;continue}throw e}})}},5105:(e,t,r)=>{"use strict";const{PassThrough:n}=r(2781);e.exports=e=>{e=Object.assign({},e);const{array:t}=e;let{encoding:r}=e;const o="buffer"===r;let i=!1;t?i=!(r||o):r=r||"utf8",o&&(r=null);let s=0;const a=[],c=new n({objectMode:i});return r&&c.setEncoding(r),c.on("data",(e=>{a.push(e),i?s=a.length:s+=e.length})),c.getBufferedValue=()=>t?a:o?Buffer.concat(a,s):a.join(""),c.getBufferedLength=()=>s,c}},31:(e,t,r)=>{"use strict";const n=r(4286),o=r(5105);class i extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}function s(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t=Object.assign({maxBuffer:1/0},t);const{maxBuffer:r}=t;let s;return new Promise(((a,c)=>{const u=e=>{e&&(e.bufferedData=s.getBufferedValue()),c(e)};s=n(e,o(t),(e=>{e?u(e):a()})),s.on("data",(()=>{s.getBufferedLength()>r&&u(new i)}))})).then((()=>s.getBufferedValue()))}e.exports=s,e.exports.buffer=(e,t)=>s(e,Object.assign({},t,{encoding:"buffer"})),e.exports.array=(e,t)=>s(e,Object.assign({},t,{array:!0})),e.exports.MaxBufferError=i},2712:(e,t,r)=>{"use strict";const n=r(2361),o=r(31),i=r(657),s=r(341),a=r(4578),{HTTPError:c,ParseError:u,ReadError:l}=r(6435),{options:f}=r(2943),{reNormalize:d}=r(7027),p=e=>{const t=new n,r=new s(((r,n,s)=>{const h=a(e);s(h.abort),h.on("response",(async s=>{t.emit("response",s);const a=i.null(e.encoding)?o.buffer(s):o(s,e);let m;try{m=await a}catch(t){return void n(new l(t,e))}const g=e.followRedirect?299:399;s.body=m;try{for(const[t,r]of Object.entries(e.hooks.afterResponse))s=await r(s,(r=>((r=d(f(e,{...r,retry:0,throwHttpErrors:!1}))).hooks.afterResponse=e.hooks.afterResponse.slice(0,t),p(r))))}catch(e){return void n(e)}const{statusCode:y}=s;if(e.json&&s.body)try{s.body=JSON.parse(s.body)}catch(t){if(y>=200&&y<300){const r=new u(t,y,e,m);return Object.defineProperty(r,"response",{value:s}),void n(r)}}if(304!==y&&(y<200||y>g)){const t=new c(s,e);if(Object.defineProperty(t,"response",{value:s}),!1===h.retry(t)){if(e.throwHttpErrors)return void n(t);r(s)}}else r(s)})),h.once("error",n),["request","redirect","uploadProgress","downloadProgress"].forEach((e=>h.on(e,((...r)=>t.emit(e,...r)))))}));return r.on=(e,n)=>(t.on(e,n),r),r};e.exports=p},1436:(e,t,r)=>{"use strict";const{PassThrough:n}=r(2781),o=r(8869),i=r(4578),{HTTPError:s,ReadError:a}=r(6435);e.exports=e=>{const t=new n,r=new n,c=o(t,r),u=new Set;let l=!1;e.retry.retries=()=>0,e.body&&(c.write=()=>{throw new Error("Got's stream is not writable when the `body` option is used")});const f=i(e,t);c._destroy=f.abort,f.on("response",(t=>{const{statusCode:n}=t;if(t.on("error",(t=>{c.emit("error",new a(t,e))})),e.throwHttpErrors&&304!==n&&(n<200||n>299))c.emit("error",new s(t,e),null,t);else{l=!0,t.pipe(r);for(const r of u)if(!r.headersSent){for(const[n,o]of Object.entries(t.headers))(!e.decompress||"content-encoding"!==n)&&r.setHeader(n,o);r.statusCode=t.statusCode}c.emit("response",t)}})),["error","request","redirect","uploadProgress","downloadProgress"].forEach((e=>f.on(e,((...t)=>c.emit(e,...t)))));const d=c.pipe.bind(c),p=c.unpipe.bind(c);return c.pipe=(e,t)=>{if(l)throw new Error("Failed to pipe. The response has been emitted already.");const r=d(e,t);return Reflect.has(e,"setHeader")&&u.add(e),r},c.unpipe=e=>(u.delete(e),p(e)),c}},6326:(e,t,r)=>{"use strict";const n=r(6435),o=r(1436),i=r(2712),s=r(7027),a=r(2943),c=r(4753),u=e=>e.stream?o(e):i(e),l=["get","post","put","patch","head","delete"],f=e=>{function t(t,r){try{return e.handler(s(t,r,e),u)}catch(e){if(r&&r.stream)throw e;return Promise.reject(e)}}e=a({},e),s.preNormalize(e.options),e.handler||(e.handler=(e,t)=>t(e)),t.create=f,t.extend=t=>{let r;return t&&Reflect.has(t,"mutableDefaults")?(r=t.mutableDefaults,delete t.mutableDefaults):r=e.mutableDefaults,f({options:a.options(e.options,t),handler:e.handler,mutableDefaults:r})},t.mergeInstances=(...e)=>f(a.instances(e)),t.stream=(e,r)=>t(e,{...r,stream:!0});for(const e of l)t[e]=(r,n)=>t(r,{...n,method:e}),t.stream[e]=(r,n)=>t.stream(r,{...n,method:e});return Object.assign(t,{...n,mergeOptions:a.options}),Object.defineProperty(t,"defaults",{value:e.mutableDefaults?e:c(e),writable:e.mutableDefaults,configurable:e.mutableDefaults,enumerable:!0}),t};e.exports=f},6435:(e,t,r)=>{"use strict";const n=r(7310),o=r(3685),i=r(341),s=r(657);class a extends Error{constructor(e,t,r){super(e),Error.captureStackTrace(this,this.constructor),this.name="GotError",s.undefined(t.code)||(this.code=t.code),Object.assign(this,{host:r.host,hostname:r.hostname,method:r.method,path:r.path,socketPath:r.socketPath,protocol:r.protocol,url:r.href,gotOptions:r})}}e.exports.GotError=a,e.exports.CacheError=class extends a{constructor(e,t){super(e.message,e,t),this.name="CacheError"}},e.exports.RequestError=class extends a{constructor(e,t){super(e.message,e,t),this.name="RequestError"}},e.exports.ReadError=class extends a{constructor(e,t){super(e.message,e,t),this.name="ReadError"}},e.exports.ParseError=class extends a{constructor(e,t,r,i){super(`${e.message} in "${n.format(r)}": \n${i.slice(0,77)}...`,e,r),this.name="ParseError",this.statusCode=t,this.statusMessage=o.STATUS_CODES[this.statusCode]}},e.exports.HTTPError=class extends a{constructor(e,t){const{statusCode:r}=e;let{statusMessage:n}=e;n=n?n.replace(/\r?\n/g," ").trim():o.STATUS_CODES[r],super(`Response code ${r} (${n})`,{},t),this.name="HTTPError",this.statusCode=r,this.statusMessage=n,this.headers=e.headers,this.body=e.body}},e.exports.MaxRedirectsError=class extends a{constructor(e,t,r){super("Redirected 10 times. Aborting.",{},r),this.name="MaxRedirectsError",this.statusCode=e,this.statusMessage=o.STATUS_CODES[this.statusCode],this.redirectUrls=t}},e.exports.UnsupportedProtocolError=class extends a{constructor(e){super(`Unsupported protocol "${e.protocol}"`,{},e),this.name="UnsupportedProtocolError"}},e.exports.TimeoutError=class extends a{constructor(e,t){super(e.message,{code:"ETIMEDOUT"},t),this.name="TimeoutError",this.event=e.event}},e.exports.CancelError=i.CancelError},4869:(e,t,r)=>{"use strict";const n=r(346),o=r(657),i=r(6344),s=r(9569);e.exports=(e,t,r)=>{const a=Number(e.headers["content-length"])||null,c=s.download(e,r,a);i(e,c);const u=!0===t.decompress&&o.function(n)&&"HEAD"!==t.method?n(c):c;!t.decompress&&["gzip","deflate"].includes(e.headers["content-encoding"])&&(t.encoding=null),r.emit("response",u),r.emit("downloadProgress",{percent:0,transferred:0,total:a}),e.pipe(c)}},6921:(e,t,r)=>{"use strict";const n=r(4046),o=r(6326)({options:{retry:{retries:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]},headers:{"user-agent":`${n.name}/${n.version} (https://github.com/sindresorhus/got)`},hooks:{beforeRequest:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},decompress:!0,throwHttpErrors:!0,followRedirect:!0,stream:!1,form:!1,json:!1,cache:!1,useElectronNet:!1},mutableDefaults:!1});e.exports=o},1112:e=>{"use strict";e.exports=["beforeError","init","beforeRequest","beforeRedirect","beforeRetry","afterResponse"]},2943:(e,t,r)=>{"use strict";const{URL:n}=r(7310),o=r(657),i=r(1112),s=(e,...t)=>{for(const r of t)for(const[t,i]of Object.entries(r)){if(o.undefined(i))continue;const r=e[t];o.urlInstance(r)&&(o.urlInstance(i)||o.string(i))?e[t]=new n(i,r):o.plainObject(i)?o.plainObject(r)?e[t]=s({},r,i):e[t]=s({},i):o.array(i)?e[t]=s([],i):e[t]=i}return e},a=(...e)=>{e=e.map((e=>e||{}));const t=s({},...e),r={};for(const e of i)r[e]=[];for(const t of e)if(t.hooks)for(const e of i)r[e]=r[e].concat(t.hooks[e]);return t.hooks=r,t};e.exports=s,e.exports.options=a,e.exports.instances=(e,t)=>{const r=e.map((e=>e.defaults.handler)),n=e.length-1;return{methods:t,options:a(...e.map((e=>e.defaults.options))),handler:(e,t)=>{let o=-1;const i=e=>r[++o](e,o===n?t:i);return i(e)}}}},7027:(e,t,r)=>{"use strict";const{URL:n,URLSearchParams:o}=r(7310),i=r(7310),s=r(657),a=r(6601),c=r(5989),u=r(7415),l=r(5648),f=r(2943),d=r(1112),p=new Set([413,429,503]),h=(e,t)=>{if(s.nullOrUndefined(e.headers)?e.headers={}:e.headers=c(e.headers),e.baseUrl&&!e.baseUrl.toString().endsWith("/")&&(e.baseUrl+="/"),e.stream&&(e.json=!1),s.nullOrUndefined(e.hooks))e.hooks={};else if(!s.object(e.hooks))throw new TypeError(`Parameter \`hooks\` must be an object, not ${s(e.hooks)}`);for(const r of d)s.nullOrUndefined(e.hooks[r])&&(e.hooks[r]=t?[...t.hooks[r]]:[]);s.number(e.timeout)?e.gotTimeout={request:e.timeout}:s.object(e.timeout)&&(e.gotTimeout=e.timeout),delete e.timeout;const{retry:r}=e;return e.retry={retries:0,methods:[],statusCodes:[],errorCodes:[]},s.nonEmptyObject(t)&&!1!==r&&(e.retry={...t.retry}),!1!==r&&(s.number(r)?e.retry.retries=r:e.retry={...e.retry,...r}),e.gotTimeout&&(e.retry.maxRetryAfter=Math.min(...[e.gotTimeout.request,e.gotTimeout.connection].filter((e=>!s.nullOrUndefined(e))))),s.array(e.retry.methods)&&(e.retry.methods=new Set(e.retry.methods.map((e=>e.toUpperCase())))),s.array(e.retry.statusCodes)&&(e.retry.statusCodes=new Set(e.retry.statusCodes)),s.array(e.retry.errorCodes)&&(e.retry.errorCodes=new Set(e.retry.errorCodes)),e},m=(e,t,r)=>{if(s.plainObject(e)&&(e=(t={...e,...t}).url||{},delete t.url),t=r?f({},r.options,t?h(t,r.options):{}):f({},h(t)),!s.string(e)&&!s.object(e))throw new TypeError(`Parameter \`url\` must be a string or object, not ${s(e)}`);s.string(e)?t.baseUrl?(e.toString().startsWith("/")&&(e=e.toString().slice(1)),e=u(new n(e,t.baseUrl))):(e=e.replace(/^unix:/,"http://$&"),e=a(e)):"URL"===s(e)&&(e=u(e)),t=f({path:""},e,{protocol:e.protocol||"https:"},t);for(const e of t.hooks.init){const r=e(t);if(s.promise(r))throw new TypeError("The `init` hook must be a synchronous function")}const{baseUrl:i}=t;Object.defineProperty(t,"baseUrl",{set:()=>{throw new Error("Failed to set baseUrl. Options are normalized already.")},get:()=>i});const{query:c}=t;if((s.nonEmptyString(c)||s.nonEmptyObject(c)||c instanceof o)&&(s.string(c)||(t.query=new o(c).toString()),t.path=`${t.path.split("?")[0]}?${t.query}`,delete t.query),"unix"===t.hostname){const e=/(.+?):(.+)/.exec(t.path);if(e){const[,r,n]=e;t={...t,socketPath:r,path:n,host:null}}}const{headers:d}=t;for(const[e,t]of Object.entries(d))s.nullOrUndefined(t)&&delete d[e];t.json&&s.undefined(d.accept)&&(d.accept="application/json"),t.decompress&&s.undefined(d["accept-encoding"])&&(d["accept-encoding"]="gzip, deflate");const{body:m}=t;if(s.nullOrUndefined(m))t.method=t.method?t.method.toUpperCase():"GET";else{const e=s.object(m)&&!s.buffer(m)&&!s.nodeStream(m);if(!(s.nodeStream(m)||s.string(m)||s.buffer(m)||t.form||t.json))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(t.json&&!e&&!s.array(m))throw new TypeError("The `body` option must be an Object or Array when the `json` option is used");if(t.form&&!e)throw new TypeError("The `body` option must be an Object when the `form` option is used");l(m)?d["content-type"]=d["content-type"]||`multipart/form-data; boundary=${m.getBoundary()}`:t.form?(d["content-type"]=d["content-type"]||"application/x-www-form-urlencoded",t.body=new o(m).toString()):t.json&&(d["content-type"]=d["content-type"]||"application/json",t.body=JSON.stringify(m)),t.method=t.method?t.method.toUpperCase():"POST"}if(!s.function(t.retry.retries)){const{retries:e}=t.retry;t.retry.retries=(r,n)=>{if(r>e)return 0;if(!(n&&t.retry.errorCodes.has(n.code)||t.retry.methods.has(n.method)&&t.retry.statusCodes.has(n.statusCode)))return 0;if(Reflect.has(n,"headers")&&Reflect.has(n.headers,"retry-after")&&p.has(n.statusCode)){let e=Number(n.headers["retry-after"]);return s.nan(e)?e=Date.parse(n.headers["retry-after"])-Date.now():e*=1e3,e>t.retry.maxRetryAfter?0:e}return 413===n.statusCode?0:2**(r-1)*1e3+100*Math.random()}}return t};e.exports=m,e.exports.preNormalize=h,e.exports.reNormalize=e=>m(i.format(e),e)},9569:(e,t,r)=>{"use strict";const{Transform:n}=r(2781);e.exports={download(e,t,r){let o=0;return new n({transform(e,n,i){o+=e.length;const s=r?o/r:0;s<1&&t.emit("downloadProgress",{percent:s,transferred:o,total:r}),i(null,e)},flush(e){t.emit("downloadProgress",{percent:1,transferred:o,total:r}),e()}})},upload(e,t,r){let n,o=0;t.emit("uploadProgress",{percent:0,transferred:0,total:r}),e.once("error",(()=>{clearInterval(n)})),e.once("response",(()=>{clearInterval(n),t.emit("uploadProgress",{percent:1,transferred:o,total:r})})),e.once("socket",(i=>{const s=()=>{n=setInterval((()=>{const n=o,s=e._header?Buffer.byteLength(e._header):0;o=i.bytesWritten-s,o!==n&&o!==r&&t.emit("uploadProgress",{percent:r?o/r:0,transferred:o,total:r})}),150)};i.connecting?i.once("connect",s):i.writable&&s()}))}}},4578:(e,t,r)=>{"use strict";const{URL:n}=r(7310),o=r(3837),i=r(2361),s=r(3685),a=r(5687),c=r(7310),u=r(3481),l=r(3072),f=r(657),d=r(5113),p=r(2416),h=r(4198),m=r(4869),g=r(9569),{CacheError:y,UnsupportedProtocolError:v,MaxRedirectsError:A,RequestError:b,TimeoutError:w}=r(6435),_=r(7415),E=new Set([300,301,302,303,304,305,307,308]),S=new Set([300,303,307,308]);e.exports=(e,t)=>{const x=new i,O=[];let C,k,F,j,P=0,L=!1;const I=e.cookieJar?o.promisify(e.cookieJar.setCookie.bind(e.cookieJar)):null,T=e.cookieJar?o.promisify(e.cookieJar.getCookieString.bind(e.cookieJar)):null,N=f.object(e.agent)?e.agent:null,R=async t=>{try{for(const r of e.hooks.beforeError)t=await r(t);x.emit("error",t)}catch(e){x.emit("error",e)}},B=async e=>{const o=F||k;if("http:"!==e.protocol&&"https:"!==e.protocol)throw new v(e);let i,c;if(decodeURI(o),i=f.function(e.request)?{request:e.request}:"https:"===e.protocol?a:s,N){const t="https:"===e.protocol?"https":"http";e.agent=N[t]||e.agent}if(e.useElectronNet&&process.versions.electron){const e=(0,{x:r(363)}["yx".slice(1)])("electron");i=e.net||e.remote.net}if(e.cookieJar){const t=await T(o,{});f.nonEmptyString(t)&&(e.headers.cookie=t)}const l=async t=>{try{e.useElectronNet&&(t=new Proxy(t,{get:(e,t)=>{if("trailers"===t||"rawTrailers"===t)return[];const r=e[t];return f.function(r)?r.bind(e):r}}));const{statusCode:r}=t;t.url=o,t.requestUrl=k,t.retryCount=P,t.timings=c,t.redirectUrls=O,t.request={gotOptions:e};const i=t.headers["set-cookie"];if(e.cookieJar&&i&&await Promise.all(i.map((e=>I(e,t.url)))),e.followRedirect&&"location"in t.headers&&(S.has(r)||E.has(r)&&("GET"===e.method||"HEAD"===e.method))){if(t.resume(),303===r&&(e.method="GET"),O.length>=10)throw new A(r,O,e);const i=Buffer.from(t.headers.location,"binary").toString(),s=new n(i,o);F=s.toString(),O.push(F);const a={...e,..._(s)};for(const t of e.hooks.beforeRedirect)await t(a);return x.emit("redirect",t,a),void await B(a)}m(t,e,x)}catch(e){R(e)}},h=r=>{if(L)return r.once("error",(()=>{})),void r.abort();C=r,r.once("error",(t=>{r.aborted||(t=t instanceof p.TimeoutError?new w(t,e):new b(t,e),!1===x.retry(t)&&R(t))})),c=d(r),g.upload(r,x,j),e.gotTimeout&&p(r,e.gotTimeout,e),x.emit("request",r);const n=()=>{r.emit("upload-complete")};try{f.nodeStream(e.body)?(e.body.once("end",n),e.body.pipe(r),e.body=void 0):e.body?r.end(e.body,n):!t||"POST"!==e.method&&"PUT"!==e.method&&"PATCH"!==e.method?r.end(n):(t.once("end",n),t.pipe(r))}catch(t){R(new b(t,e))}};if(e.cache){const t=new u(i.request,e.cache)(e,l);t.once("error",(t=>{t instanceof u.RequestError?R(new b(t,e)):R(new y(t,e))})),t.once("request",h)}else try{h(i.request(e,l))}catch(t){R(new b(t,e))}};return x.retry=t=>{let r;try{r=e.retry.retries(++P,t)}catch(e){return void R(e)}if(r){const n=async e=>{try{for(const r of e.hooks.beforeRetry)await r(e,t,P);await B(e)}catch(e){R(e)}};return setTimeout(n,r,{...e,forceRefresh:!0}),!0}return!1},x.abort=()=>{C?(C.once("error",(()=>{})),C.abort()):L=!0},setImmediate((async()=>{try{const{body:t}=e;f.buffer(t)?(e.body=l(t),j=t.length):j=await h(e),f.undefined(e.headers["content-length"])&&f.undefined(e.headers["transfer-encoding"])&&(j>0||"PUT"===e.method)&&!f.null(j)&&(e.headers["content-length"]=j);for(const t of e.hooks.beforeRequest)await t(e);k=e.href||new n(e.path,c.format(e)).toString(),await B(e)}catch(e){R(e)}})),x}},4753:(e,t,r)=>{"use strict";const n=r(657);e.exports=function e(t){for(const[r,o]of Object.entries(t))(n.plainObject(o)||n.array(o))&&e(t[r]);return Object.freeze(t)}},4198:(e,t,r)=>{"use strict";const n=r(7147),o=r(3837),i=r(657),s=r(5648);e.exports=async e=>{const{body:t}=e;if(e.headers["content-length"])return Number(e.headers["content-length"]);if(!t&&!e.stream)return 0;if(i.string(t))return Buffer.byteLength(t);if(s(t))return o.promisify(t.getLength.bind(t))();if(t instanceof n.ReadStream){const{size:e}=await o.promisify(n.stat)(t.path);return e}return null}},5648:(e,t,r)=>{"use strict";const n=r(657);e.exports=e=>n.nodeStream(e)&&n.function(e.getBoundary)},2416:(e,t,r)=>{"use strict";const n=r(1808);class o extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`),this.name="TimeoutError",this.code="ETIMEDOUT",this.event=t}}const i=Symbol("reentry"),s=()=>{};e.exports=(e,t,r)=>{if(e[i])return;e[i]=!0;let a=!1;const c=(e,t,...r)=>{if(a)return s;let n;const o=setTimeout((()=>{n=setImmediate(t,e,...r),n.unref&&n.unref()}),e);o.unref&&o.unref();const i=()=>{clearTimeout(o),clearImmediate(n)};return d.push(i),i},{host:u,hostname:l}=r,f=(t,r)=>{e.emit("error",new o(t,r)),e.once("error",(()=>{})),e.abort()},d=[],p=()=>{a=!0,d.forEach((e=>e()))};if(e.once("error",p),e.once("response",(e=>{e.once("end",p)})),void 0!==t.request&&c(t.request,f,"request"),void 0!==t.socket){const r=()=>{f(t.socket,"socket")};e.setTimeout(t.socket,r),d.push((()=>e.removeListener("timeout",r)))}void 0===t.lookup||e.socketPath||n.isIP(l||u)||e.once("socket",(e=>{if(e.connecting){const r=c(t.lookup,f,"lookup");e.once("lookup",r)}})),void 0!==t.connect&&e.once("socket",(r=>{if(r.connecting){const o=()=>c(t.connect,f,"connect");e.socketPath||n.isIP(l||u)?r.once("connect",o()):r.once("lookup",(e=>{null===e&&r.once("connect",o())}))}})),void 0!==t.secureConnect&&"https:"===r.protocol&&e.once("socket",(e=>{e.connecting&&e.once("connect",(()=>{const r=c(t.secureConnect,f,"secureConnect");e.once("secureConnect",r)}))})),void 0!==t.send&&e.once("socket",(r=>{const n=()=>c(t.send,f,"send");r.connecting?r.once("connect",(()=>{e.once("upload-complete",n())})):e.once("upload-complete",n())})),void 0!==t.response&&e.once("upload-complete",(()=>{const r=c(t.response,f,"response");e.once("response",r)}))},e.exports.TimeoutError=o},7415:(e,t,r)=>{"use strict";const n=r(657);e.exports=e=>{const t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href};return n.string(e.port)&&e.port.length>0&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username}:${e.password}`),t.path=n.null(e.search)?e.pathname:`${e.pathname}${e.search}`,t}},363:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=363,e.exports=t},6458:e=>{"use strict";e.exports=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:e.__proto__};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t}},77:(e,t,r)=>{var n,o,i=r(7147),s=r(2161),a=r(8520),c=r(6458),u=[],l=r(3837),f=function(){};function d(e){s(e),e.gracefulify=d,e.FileReadStream=f,e.FileWriteStream=m,e.createReadStream=function(e,t){return new f(e,t)},e.createWriteStream=function(e,t){return new m(e,t)};var t=e.readFile;e.readFile=function(e,r,n){return"function"==typeof r&&(n=r,r=null),function e(r,n,o){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?("function"==typeof o&&o.apply(this,arguments),h()):p([e,[r,n,o]])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,o){return"function"==typeof n&&(o=n,n=null),function e(t,n,o,i){return r(t,n,o,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?("function"==typeof i&&i.apply(this,arguments),h()):p([e,[t,n,o,i]])}))}(e,t,n,o)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,o){return"function"==typeof r&&(o=r,r=null),function e(t,r,o,i){return n(t,r,o,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?("function"==typeof i&&i.apply(this,arguments),h()):p([e,[t,r,o,i]])}))}(e,t,r,o)});var o=e.readdir;function i(t){return o.apply(e,t)}if(e.readdir=function(e,t,r){var n=[e];return"function"!=typeof t?n.push(t):r=t,n.push((function(e,t){t&&t.sort&&t.sort(),!e||"EMFILE"!==e.code&&"ENFILE"!==e.code?("function"==typeof r&&r.apply(this,arguments),h()):p([i,[n]])})),i(n)},"v0.8"===process.version.substr(0,4)){var c=a(e);f=c.ReadStream,m=c.WriteStream}var u=e.ReadStream;u&&(f.prototype=Object.create(u.prototype),f.prototype.open=function(){var e=this;y(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var l=e.WriteStream;function f(e,t){return this instanceof f?(u.apply(this,arguments),this):f.apply(Object.create(f.prototype),arguments)}function m(e,t){return this instanceof m?(l.apply(this,arguments),this):m.apply(Object.create(m.prototype),arguments)}l&&(m.prototype=Object.create(l.prototype),m.prototype.open=function(){var e=this;y(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),e.ReadStream=f,e.WriteStream=m;var g=e.open;function y(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,o){return g(t,r,n,(function(i,s){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?("function"==typeof o&&o.apply(this,arguments),h()):p([e,[t,r,n,o]])}))}(e,t,r,n)}return e.open=y,e}function p(e){f("ENQUEUE",e[0].name,e[1]),u.push(e)}function h(){var e=u.shift();e&&(f("RETRY",e[0].name,e[1]),e[0].apply(null,e[1]))}l.debuglog?f=l.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(f=function(){var e=l.format.apply(l,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){f(u),r(9491).equal(u.length,0)})),e.exports=d(c(i)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched&&(e.exports=d(i),i.__patched=!0),e.exports.close=(n=i.close,function(e,t){return n.call(i,e,(function(e){e||h(),"function"==typeof t&&t.apply(this,arguments)}))}),e.exports.closeSync=(o=i.closeSync,function(e){var t=o.apply(i,arguments);return h(),t}),/\bgraceful-fs\b/.test(i.closeSync.toString())||(i.closeSync=e.exports.closeSync,i.close=e.exports.close)},8520:(e,t,r)=>{var n=r(2781).Stream;e.exports=function(e){return{ReadStream:function t(r,o){if(!(this instanceof t))return new t(r,o);n.call(this);var i=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,o=o||{};for(var s=Object.keys(o),a=0,c=s.length;a<c;a++){var u=s[a];this[u]=o[u]}if(this.encoding&&this.setEncoding(this.encoding),void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}null===this.fd?e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()})):process.nextTick((function(){i._read()}))},WriteStream:function t(r,o){if(!(this instanceof t))return new t(r,o);n.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,o=o||{};for(var i=Object.keys(o),s=0,a=i.length;s<a;s++){var c=i[s];this[c]=o[c]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}},2161:(e,t,r)=>{var n=r(2057),o=process.cwd,i=null,s=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return i||(i=o.call(process)),i};try{process.cwd()}catch(e){}var a=process.chdir;process.chdir=function(e){i=null,a.call(process,e)},e.exports=function(e){var t,r,o;function i(t){return t?function(r,n,o){return t.call(e,r,n,(function(e){d(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function a(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!d(e))throw e}}:t}function c(t){return t?function(r,n,o,i){return t.call(e,r,n,o,(function(e){d(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function u(t){return t?function(r,n,o){try{return t.call(e,r,n,o)}catch(e){if(!d(e))throw e}}:t}function l(t){return t?function(r,n){return t.call(e,r,(function(e,t){if(!t)return n.apply(this,arguments);t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296),n&&n.apply(this,arguments)}))}:t}function f(t){return t?function(r){var n=t.call(e,r);return n.uid<0&&(n.uid+=4294967296),n.gid<0&&(n.gid+=4294967296),n}:t}function d(e){return!e||"ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,o){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){t?o&&o(t):e.fchmod(n,r,(function(t){e.close(n,(function(e){o&&o(t||e)}))}))}))},e.lchmodSync=function(t,r){var o,i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),s=!0;try{o=e.fchmodSync(i,r),s=!1}finally{if(s)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return o}}(e),e.lutimes||function(e){n.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,r,o,i){e.open(t,n.O_SYMLINK,(function(t,n){t?i&&i(t):e.futimes(n,r,o,(function(t){e.close(n,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,o){var i,s=e.openSync(t,n.O_SYMLINK),a=!0;try{i=e.futimesSync(s,r,o),a=!1}finally{if(a)try{e.closeSync(s)}catch(e){}else e.closeSync(s)}return i}):(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e),e.chown=c(e.chown),e.fchown=c(e.fchown),e.lchown=c(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=u(e.chownSync),e.fchownSync=u(e.fchownSync),e.lchownSync=u(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=f(e.statSync),e.fstatSync=f(e.fstatSync),e.lstatSync=f(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){}),e.lchown||(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){}),"win32"===s&&(e.rename=(t=e.rename,function(r,n,o){var i=Date.now(),s=0;t(r,n,(function a(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-i<6e4)return setTimeout((function(){e.stat(n,(function(e,i){e&&"ENOENT"===e.code?t(r,n,a):o(c)}))}),s),void(s<100&&(s+=10));o&&o(c)}))})),e.read=(o=e.read,function(t,r,n,i,s,a){var c;if(a&&"function"==typeof a){var u=0;c=function(l,f,d){if(l&&"EAGAIN"===l.code&&u<10)return u++,o.call(e,t,r,n,i,s,c);a.apply(this,arguments)}}return o.call(e,t,r,n,i,s,c)}),e.readSync=(r=e.readSync,function(t,n,o,i,s){for(var a=0;;)try{return r.call(e,t,n,o,i,s)}catch(e){if("EAGAIN"===e.code&&a<10){a++;continue}throw e}})}},6214:e=>{"use strict";const t=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),r=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),n=new Set([500,502,503,504]),o={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},i={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function s(e){const t=parseInt(e,10);return isFinite(t)?t:0}function a(e){const t={};if(!e)return t;const r=e.trim().split(/,/);for(const e of r){const[r,n]=e.split(/=/,2);t[r.trim()]=void 0===n||n.trim().replace(/^"|"$/g,"")}return t}function c(e){let t=[];for(const r in e){const n=e[r];t.push(!0===n?r:r+"="+n)}if(t.length)return t.join(", ")}e.exports=class{constructor(e,t,{shared:r,cacheHeuristic:n,immutableMinTimeToLive:o,ignoreCargoCult:i,_fromObject:s}={}){if(s)this._fromObject(s);else{if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=!1!==r,this._cacheHeuristic=void 0!==n?n:.1,this._immutableMinTtl=void 0!==o?o:864e5,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=a(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=a(e.headers["cache-control"]),i&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":c(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),null==t.headers["cache-control"]&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}}now(){return Date.now()}storable(){return!(this._reqcc["no-store"]||!("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())||!r.has(this._status)||this._rescc["no-store"]||this._isShared&&this._rescc.private||this._isShared&&!this._noAuthorization&&!this._allowsStoringAuthenticated()||!(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||t.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=a(e.headers["cache-control"]);return!t["no-cache"]&&!/no-cache/.test(e.headers.pragma)&&(!(t["max-age"]&&this.age()>t["max-age"])&&(!(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"])&&(!(this.stale()&&(!t["max-stale"]||this._rescc["must-revalidate"]||!(!0===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge())))&&this._requestMatches(e,!1))))}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if("*"===this._resHeaders.vary)return!1;const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const r of t)if(e.headers[r]!==this._reqHeaders[r])return!1;return!0}_copyWithoutHopByHopHeaders(e){const t={};for(const r in e)o[r]||(t[r]=e[r]);if(e.connection){const r=e.connection.trim().split(/\s*,\s*/);for(const e of r)delete t[e]}if(t.warning){const e=t.warning.split(/,/).filter((e=>!/^\s*1[0-9][0-9]/.test(e)));e.length?t.warning=e.join(",").trim():delete t.warning}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>86400&&!this._hasExplicitExpiration()&&this.maxAge()>86400&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){const e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){return this._ageValue()+(this.now()-this._responseTime)/1e3}_ageValue(){return s(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"])return 0;if(this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)return 0;if("*"===this._resHeaders.vary)return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return s(this._rescc["s-maxage"])}if(this._rescc["max-age"])return s(this._rescc["max-age"]);const e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){const r=Date.parse(this._resHeaders.expires);return Number.isNaN(r)||r<t?0:Math.max(e,(r-t)/1e3)}if(this._resHeaders["last-modified"]){const r=Date.parse(this._resHeaders["last-modified"]);if(isFinite(r)&&t>r)return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}return e}timeToLive(){const e=this.maxAge()-this.age(),t=e+s(this._rescc["stale-if-error"]),r=e+s(this._rescc["stale-while-revalidate"]);return 1e3*Math.max(0,e,t,r)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+s(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+s(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||1!==e.v)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=void 0!==e.imm?e.imm:864e5,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;if(this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&"GET"!=this._method){if(delete t["if-modified-since"],t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter((e=>!/^\s*W\//.test(e)));e.length?t["if-none-match"]=e.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&function(e){return!e||n.has(e.status)}(t))return{modified:!1,matches:!1,policy:this};if(!t||!t.headers)throw Error("Response headers missing");let r=!1;if(void 0!==t.status&&304!=t.status?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:this._resHeaders.etag||this._resHeaders["last-modified"]||t.headers.etag||t.headers["last-modified"]||(r=!0),!r)return{policy:new this.constructor(e,t),modified:304!=t.status,matches:!1};const o={};for(const e in this._resHeaders)o[e]=e in t.headers&&!i[e]?t.headers[e]:this._resHeaders[e];const s=Object.assign({},t,{status:this._status,method:this._method,headers:o});return{policy:new this.constructor(e,s,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}},7566:e=>{e.exports=function(t){if(e.exports.stub!==e.exports)return e.exports.stub.apply(this,arguments);try{return process.kill(t,0)}catch(e){return"EPERM"===e.code}},e.exports.stub=e.exports},1085:(e,t)=>{t.stringify=function e(t){if(void 0===t)return t;if(t&&Buffer.isBuffer(t))return JSON.stringify(":base64:"+t.toString("base64"));if(t&&t.toJSON&&(t=t.toJSON()),t&&"object"==typeof t){var r="",n=Array.isArray(t);r=n?"[":"{";var o=!0;for(var i in t){var s="function"==typeof t[i]||!n&&void 0===t[i];Object.hasOwnProperty.call(t,i)&&!s&&(o||(r+=","),o=!1,n?null==t[i]?r+="null":r+=e(t[i]):void 0!==t[i]&&(r+=e(i)+":"+e(t[i])))}return r+(n?"]":"}")}return"string"==typeof t?JSON.stringify(/^:/.test(t)?":"+t:t):void 0===t?"null":JSON.stringify(t)},t.parse=function(e){return JSON.parse(e,(function(e,t){return"string"==typeof t?/^:base64:/.test(t)?new Buffer(t.substring(8),"base64"):/^:/.test(t)?t.substring(1):t:t}))}},6813:(e,t,r)=>{var n;try{n=r(77)}catch(e){n=r(7147)}function o(e,t){var r,n="\n";return"object"==typeof t&&null!==t&&(t.spaces&&(r=t.spaces),t.EOL&&(n=t.EOL)),JSON.stringify(e,t?t.replacer:null,r).replace(/\n/g,n)+n}function i(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}var s={readFile:function(e,t,r){null==r&&(r=t,t={}),"string"==typeof t&&(t={encoding:t});var o=(t=t||{}).fs||n,s=!0;"throws"in t&&(s=t.throws),o.readFile(e,t,(function(n,o){if(n)return r(n);var a;o=i(o);try{a=JSON.parse(o,t?t.reviver:null)}catch(t){return s?(t.message=e+": "+t.message,r(t)):r(null,null)}r(null,a)}))},readFileSync:function(e,t){"string"==typeof(t=t||{})&&(t={encoding:t});var r=t.fs||n,o=!0;"throws"in t&&(o=t.throws);try{var s=r.readFileSync(e,t);return s=i(s),JSON.parse(s,t.reviver)}catch(t){if(o)throw t.message=e+": "+t.message,t;return null}},writeFile:function(e,t,r,i){null==i&&(i=r,r={});var s=(r=r||{}).fs||n,a="";try{a=o(t,r)}catch(e){return void(i&&i(e,null))}s.writeFile(e,a,r,i)},writeFileSync:function(e,t,r){var i=(r=r||{}).fs||n,s=o(t,r);return i.writeFileSync(e,s,r)}};e.exports=s},4958:(e,t,r)=>{"use strict";const n=r(2361),o=r(1085);e.exports=class extends n{constructor(e,t){if(super(),this.opts=Object.assign({namespace:"keyv",serialize:o.stringify,deserialize:o.parse},"string"==typeof e?{uri:e}:e,t),!this.opts.store){const e=Object.assign({},this.opts);this.opts.store=(e=>{const t={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(e.adapter||e.uri){const n=e.adapter||/^[^:]*/.exec(e.uri)[0];return new(r(3196)(t[n]))(e)}return new Map})(e)}"function"==typeof this.opts.store.on&&this.opts.store.on("error",(e=>this.emit("error",e))),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e){e=this._getKeyPrefix(e);const t=this.opts.store;return Promise.resolve().then((()=>t.get(e))).then((t=>{if(void 0!==(t="string"==typeof t?this.opts.deserialize(t):t)){if(!("number"==typeof t.expires&&Date.now()>t.expires))return t.value;this.delete(e)}}))}set(e,t,r){e=this._getKeyPrefix(e),void 0===r&&(r=this.opts.ttl),0===r&&(r=void 0);const n=this.opts.store;return Promise.resolve().then((()=>{const o="number"==typeof r?Date.now()+r:null;return t={value:t,expires:o},n.set(e,this.opts.serialize(t),r)})).then((()=>!0))}delete(e){e=this._getKeyPrefix(e);const t=this.opts.store;return Promise.resolve().then((()=>t.delete(e)))}clear(){const e=this.opts.store;return Promise.resolve().then((()=>e.clear()))}}},3196:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=3196,e.exports=t},5989:e=>{"use strict";e.exports=function(e){for(var t={},r=Object.keys(Object(e)),n=0;n<r.length;n++)t[r[n].toLowerCase()]=e[r[n]];return t}},8225:function(e,t,r){var n;e=r.nmd(e),function(o){var i=(e&&e.exports,"object"==typeof global&&global);i.global!==i&&i.window!==i||(o=i);var s=o.luaparse||r(5233);s.defaultOptions.comments=!1,s.defaultOptions.scope=!0;var a,c,u,l=s.parse,f=/[a-zA-Z_]/,d=/[a-zA-Z0-9_]/,p=/[0-9]/,h={or:1,and:2,"<":3,">":3,"<=":3,">=":3,"~=":3,"==":3,"|":4,"~":5,"&":6,"<<":7,">>":7,"..":8,"+":9,"-":9,"*":10,"/":10,"//":10,"%":10,unarynot:11,"unary#":11,"unary-":11,"unary~":11,"^":12},m=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","_"],g=m.length-1,y=function(e,t){for(var r=-1,n=e.length,o=n-1;++r<n;)t(e[r],r<o)},v=function(e,t){for(var r=-1,n=e.length;++r<n;)if(e[r]==t)return r},A={}.hasOwnProperty,b=function(e){var t="0",r="";if(e<1)return r;if(1==e)return t;for(;e;)1&e&&(r+=t),(e>>=1)&&(t+=t);return r};function w(e){switch(e.length){case 2:return"do"==e||"if"==e||"in"==e||"or"==e;case 3:return"and"==e||"end"==e||"for"==e||"nil"==e||"not"==e;case 4:return"else"==e||"goto"==e||"then"==e||"true"==e;case 5:return"break"==e||"false"==e||"local"==e||"until"==e||"while"==e;case 6:return"elseif"==e||"repeat"==e||"return"==e;case 8:return"function"==e}return!1}var _=function(e){if("self"==e)return e;if(A.call(c,e))return c[e];for(var t,r,n=a.length,o=n-1;o>=0;){if(t=a.charAt(o),(r=v(m,t))!=g)return w(a=a.substring(0,o)+m[r+1]+b(n-(o+1)))||v(u,a)>-1?_(e):(c[e]=a,a);--o}return a="a"+b(n),v(u,a)>-1?_(e):(c[e]=a,a)},E=function(e,t,r){r||(r=" ");var n=e.slice(-1),o=t.charAt(0);if(""==n||""==o)return e+t;if(f.test(n))return d.test(o)?e+r+t:e+t;if(p.test(n))return"("==o||"."!=o&&!f.test(o)?e+t:e+r+t;if(n==o&&"-"==n)return e+r+t;var i=e.slice(-2,-1);return"."==n&&"."!=i&&d.test(o)?e+r+t:e+t},S=function(e){var t="",r=e.type,n=e.inParens&&("BinaryExpression"==r||"FunctionDeclaration"==r||"TableConstructorExpression"==r||"LogicalExpression"==r||"StringLiteral"==r);return n&&(t+="("),t+=x(e),n&&(t+=")"),t},x=function(e,t){t=function(e,t){var r;if(t)for(r in t)A.call(t,r)&&(e[r]=t[r]);return e}({precedence:0,preserveIdentifiers:!1},t);var r,n,o,i="",s=e.type;if("Identifier"==s)i=e.isLocal&&!t.preserveIdentifiers?_(e.name):e.name;else if("StringLiteral"==s||"NumericLiteral"==s||"BooleanLiteral"==s||"NilLiteral"==s||"VarargLiteral"==s)i=e.raw;else if("LogicalExpression"==s||"BinaryExpression"==s)o=e.operator,r=h[o],n="left",i=x(e.left,{precedence:r,direction:"left",parent:o}),i=E(i,o),i=E(i,x(e.right,{precedence:r,direction:"right",parent:o})),"^"!=o&&".."!=o||(n="right"),(r<t.precedence||r==t.precedence&&n!=t.direction&&"+"!=t.parent&&("*"!=t.parent||"/"!=o&&"*"!=o))&&(i="("+i+")");else if("UnaryExpression"==s)o=e.operator,r=h["unary"+o],i=E(o,x(e.argument,{precedence:r})),r<t.precedence&&("^"!=t.parent||"right"!=t.direction)&&(i="("+i+")");else if("CallExpression"==s)i=S(e.base)+"(",y(e.arguments,(function(e,t){i+=x(e),t&&(i+=",")})),i+=")";else if("TableCallExpression"==s)i=x(e.base)+x(e.arguments);else if("StringCallExpression"==s)i=x(e.base)+x(e.argument);else if("IndexExpression"==s)i=S(e.base)+"["+x(e.index)+"]";else if("MemberExpression"==s)i=S(e.base)+e.indexer+x(e.identifier,{preserveIdentifiers:!0});else if("FunctionDeclaration"==s)i="function(",e.parameters.length&&y(e.parameters,(function(e,t){i+=e.name?_(e.name):e.value,t&&(i+=",")})),i=E(i+=")",O(e.body)),i=E(i,"end");else{if("TableConstructorExpression"!=s)throw TypeError("Unknown expression type: `"+s+"`");i="{",y(e.fields,(function(e,t){"TableKey"==e.type?i+="["+x(e.key)+"]="+x(e.value):"TableValue"==e.type?i+=x(e.value):i+=x(e.key,{preserveIdentifiers:!0})+"="+x(e.value),t&&(i+=",")})),i+="}"}return i},O=function(e){var t="";return y(e,(function(e){t=E(t,C(e),";")})),t},C=function(e){var t="",r=e.type;if("AssignmentStatement"==r)y(e.variables,(function(e,r){t+=x(e),r&&(t+=",")})),t+="=",y(e.init,(function(e,r){t+=x(e),r&&(t+=",")}));else if("LocalStatement"==r)t="local ",y(e.variables,(function(e,r){t+=_(e.name),r&&(t+=",")})),e.init.length&&(t+="=",y(e.init,(function(e,r){t+=x(e),r&&(t+=",")})));else if("CallStatement"==r)t=x(e.expression);else if("IfStatement"==r)t=E("if",x(e.clauses[0].condition)),t=E(t,"then"),t=E(t,O(e.clauses[0].body)),y(e.clauses.slice(1),(function(e){e.condition?(t=E(t,"elseif"),t=E(t,x(e.condition)),t=E(t,"then")):t=E(t,"else"),t=E(t,O(e.body))})),t=E(t,"end");else if("WhileStatement"==r)t=E("while",x(e.condition)),t=E(t,"do"),t=E(t,O(e.body)),t=E(t,"end");else if("DoStatement"==r)t=E("do",O(e.body)),t=E(t,"end");else if("ReturnStatement"==r)t="return",y(e.arguments,(function(e,r){t=E(t,x(e)),r&&(t+=",")}));else if("BreakStatement"==r)t="break";else if("RepeatStatement"==r)t=E("repeat",O(e.body)),t=E(t,"until"),t=E(t,x(e.condition));else if("FunctionDeclaration"==r)t=(e.isLocal?"local ":"")+"function ",t+=x(e.identifier),t+="(",e.parameters.length&&y(e.parameters,(function(e,r){t+=e.name?_(e.name):e.value,r&&(t+=",")})),t=E(t+=")",O(e.body)),t=E(t,"end");else if("ForGenericStatement"==r)t="for ",y(e.variables,(function(e,r){t+=_(e.name),r&&(t+=",")})),t+=" in",y(e.iterators,(function(e,r){t=E(t,x(e)),r&&(t+=",")})),t=E(t,"do"),t=E(t,O(e.body)),t=E(t,"end");else if("ForNumericStatement"==r)t="for "+_(e.variable.name)+"=",t+=x(e.start)+","+x(e.end),e.step&&(t+=","+x(e.step)),t=E(t,"do"),t=E(t,O(e.body)),t=E(t,"end");else if("LabelStatement"==r)t="::"+_(e.label.name)+"::";else{if("GotoStatement"!=r)throw TypeError("Unknown statement type: `"+r+"`");t="goto "+_(e.label.name)}return t},k={version:"1.0.4",minify:function(e){var t="string"==typeof e?l(e):e;if(c={},u=[],a="9",!t.globals)throw Error("Missing required AST property: `globals`");return y(t.globals,(function(e){var t=e.name;c[t]=t,u.push(t)})),c._ENV="_ENV",u.push("_ENV"),O(t.body)}};void 0===(n=function(){return k}.call(t,r,t,e))||(e.exports=n)}(this)},5233:function(e,t,r){var n,o,i;e=r.nmd(e),function(r,s,a){"use strict";var c={function:!0,object:!0},u=c[typeof t]&&t&&!t.nodeType&&t,l=c.object&&e&&!e.nodeType&&e,f=u&&l&&"object"==typeof global&&global,d=l&&l.exports===u&&u;!f||f.global!==f&&f.window!==f&&f.self,o=[t],void 0===(i="function"==typeof(n=a)?n.apply(t,o):n)||(e.exports=i),u&&d&&a(l.exports)}(0,0,(function(e){"use strict";var t,r,n;e.version="0.2.1";var o=e.defaultOptions={wait:!1,comments:!0,scope:!1,locations:!1,ranges:!1,onCreateNode:null,onCreateScope:null,onDestroyScope:null},i=1,s=2,a=4,c=8,u=16,l=32,f=64,d=128,p=256;e.tokenTypes={EOF:i,StringLiteral:s,Keyword:a,Identifier:c,NumericLiteral:u,Punctuator:l,BooleanLiteral:f,NilLiteral:d,VarargLiteral:p};var h=e.errors={unexpected:"unexpected %1 '%2' near '%3'",expected:"'%1' expected near '%2'",expectedToken:"%1 expected near '%2'",unfinishedString:"unfinished string near '%1'",malformedNumber:"malformed number near '%1'",invalidVar:"invalid left-hand side of assignment near '%1'"},m=e.ast={labelStatement:function(e){return{type:"LabelStatement",label:e}},breakStatement:function(){return{type:"BreakStatement"}},gotoStatement:function(e){return{type:"GotoStatement",label:e}},returnStatement:function(e){return{type:"ReturnStatement",arguments:e}},ifStatement:function(e){return{type:"IfStatement",clauses:e}},ifClause:function(e,t){return{type:"IfClause",condition:e,body:t}},elseifClause:function(e,t){return{type:"ElseifClause",condition:e,body:t}},elseClause:function(e){return{type:"ElseClause",body:e}},whileStatement:function(e,t){return{type:"WhileStatement",condition:e,body:t}},doStatement:function(e){return{type:"DoStatement",body:e}},repeatStatement:function(e,t){return{type:"RepeatStatement",condition:e,body:t}},localStatement:function(e,t){return{type:"LocalStatement",variables:e,init:t}},assignmentStatement:function(e,t){return{type:"AssignmentStatement",variables:e,init:t}},callStatement:function(e){return{type:"CallStatement",expression:e}},functionStatement:function(e,t,r,n){return{type:"FunctionDeclaration",identifier:e,isLocal:r,parameters:t,body:n}},forNumericStatement:function(e,t,r,n,o){return{type:"ForNumericStatement",variable:e,start:t,end:r,step:n,body:o}},forGenericStatement:function(e,t,r){return{type:"ForGenericStatement",variables:e,iterators:t,body:r}},chunk:function(e){return{type:"Chunk",body:e}},identifier:function(e){return{type:"Identifier",name:e}},literal:function(e,t,r){return{type:e=e===s?"StringLiteral":e===u?"NumericLiteral":e===f?"BooleanLiteral":e===d?"NilLiteral":"VarargLiteral",value:t,raw:r}},tableKey:function(e,t){return{type:"TableKey",key:e,value:t}},tableKeyString:function(e,t){return{type:"TableKeyString",key:e,value:t}},tableValue:function(e){return{type:"TableValue",value:e}},tableConstructorExpression:function(e){return{type:"TableConstructorExpression",fields:e}},binaryExpression:function(e,t,r){return{type:"and"===e||"or"===e?"LogicalExpression":"BinaryExpression",operator:e,left:t,right:r}},unaryExpression:function(e,t){return{type:"UnaryExpression",operator:e,argument:t}},memberExpression:function(e,t,r){return{type:"MemberExpression",indexer:t,identifier:r,base:e}},indexExpression:function(e,t){return{type:"IndexExpression",base:e,index:t}},callExpression:function(e,t){return{type:"CallExpression",base:e,arguments:t}},tableCallExpression:function(e,t){return{type:"TableCallExpression",base:e,arguments:t}},stringCallExpression:function(e,t){return{type:"StringCallExpression",base:e,argument:t}},comment:function(e,t){return{type:"Comment",value:e,raw:t}}};function g(e){if(re){var t=ne.pop();t.complete(),r.locations&&(e.loc=t.loc),r.ranges&&(e.range=t.range)}return r.onCreateNode&&r.onCreateNode(e),e}var y,v,A,b,w,_,E,S,x,O,C,k=Array.prototype.slice,F=(Object.prototype.toString,function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1});function j(e){var t=k.call(arguments,1);return e=e.replace(/%(\d)/g,(function(e,r){return""+t[r-1]||""})),e}function P(e){var t,r,n=j.apply(null,k.call(arguments,1));throw void 0!==e.line?(r=e.range[0]-e.lineStart,(t=new SyntaxError(j("[%1:%2] %3",e.line,r,n))).line=e.line,t.index=e.range[0],t.column=r):(r=y-S+1,(t=new SyntaxError(j("[%1:%2] %3",E,r,n))).index=y,t.line=E,t.column=r),t}function L(e,t){P(t,h.expectedToken,e,t.value)}function I(e,t){if(void 0===t&&(t=b.value),void 0!==e.type){var r;switch(e.type){case s:r="string";break;case a:r="keyword";break;case c:r="identifier";break;case u:r="number";break;case l:r="symbol";break;case f:r="boolean";break;case d:return P(e,h.unexpected,"symbol","nil",t)}return P(e,h.unexpected,r,e.value,t)}return P(e,h.unexpected,"symbol",e,t)}function T(){for(R();45===t.charCodeAt(y)&&45===t.charCodeAt(y+1);)H(),R();if(y>=n)return{type:i,value:"<eof>",line:E,lineStart:S,range:[y,y]};var e,r=t.charCodeAt(y),o=t.charCodeAt(y+1);if(_=y,function(e){return e>=65&&e<=90||e>=97&&e<=122||95===e}(r))return function(){for(var e,r;Z(t.charCodeAt(++y)););return!function(e){switch(e.length){case 2:return"do"===e||"if"===e||"in"===e||"or"===e;case 3:return"and"===e||"end"===e||"for"===e||"not"===e;case 4:return"else"===e||"goto"===e||"then"===e;case 5:return"break"===e||"local"===e||"until"===e||"while"===e;case 6:return"elseif"===e||"repeat"===e||"return"===e;case 8:return"function"===e}return!1}(e=t.slice(_,y))?"true"===e||"false"===e?(r=f,e="true"===e):"nil"===e?(r=d,e=null):r=c:r=a,{type:r,value:e,line:E,lineStart:S,range:[_,y]}}();switch(r){case 39:case 34:return function(){for(var e,r=t.charCodeAt(y++),o=y,i="";y<n&&r!==(e=t.charCodeAt(y++));)92===e?(i+=t.slice(o,y-1)+M(),o=y):(y>=n||q(e))&&(i+=t.slice(o,y-1),P({},h.unfinishedString,i+String.fromCharCode(e)));return i+=t.slice(o,y-1),{type:s,value:i,line:E,lineStart:S,range:[_,y]}}();case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return D();case 46:return G(o)?D():46===o?46===t.charCodeAt(y+2)?{type:p,value:"...",line:E,lineStart:S,range:[_,y+=3]}:B(".."):B(".");case 61:return B(61===o?"==":"=");case 62:return B(61===o?">=":62===o?">>":">");case 60:return B(60===o?"<<":61===o?"<=":"<");case 126:return B(61===o?"~=":"~");case 58:return B(58===o?"::":":");case 91:return 91===o||61===o?(!1===(e=V())&&P(v,h.expected,"[",v.value),{type:s,value:e,line:E,lineStart:S,range:[_,y]}):B("[");case 47:return B(47===o?"//":"/");case 42:case 94:case 37:case 44:case 123:case 124:case 125:case 93:case 40:case 41:case 59:case 38:case 35:case 45:case 43:return B(t.charAt(y))}return I(t.charAt(y))}function N(){var e=t.charCodeAt(y),r=t.charCodeAt(y+1);return!!q(e)&&(10===e&&13===r&&y++,13===e&&10===r&&y++,E++,S=++y,!0)}function R(){for(;y<n;)if(9===(e=t.charCodeAt(y))||32===e||11===e||12===e)y++;else if(!N())break;var e}function B(e){return y+=e.length,{type:l,value:e,line:E,lineStart:S,range:[_,y]}}function D(){var e=t.charAt(y),r=t.charAt(y+1),n="0"===e&&"xX".indexOf(r||null)>=0?function(){var e,r,n,o,i=0,s=1,a=1;for(o=y+=2,Q(t.charCodeAt(y))||P({},h.malformedNumber,t.slice(_,y));Q(t.charCodeAt(y));)y++;if(e=parseInt(t.slice(o,y),16),"."===t.charAt(y)){for(r=++y;Q(t.charCodeAt(y));)y++;i=t.slice(r,y),i=r===y?0:parseInt(i,16)/Math.pow(16,y-r)}if("pP".indexOf(t.charAt(y)||null)>=0){for(y++,"+-".indexOf(t.charAt(y)||null)>=0&&(a="+"===t.charAt(y++)?1:-1),n=y,G(t.charCodeAt(y))||P({},h.malformedNumber,t.slice(_,y));G(t.charCodeAt(y));)y++;s=t.slice(n,y),s=Math.pow(2,s*a)}return(e+i)*s}():function(){for(;G(t.charCodeAt(y));)y++;if("."===t.charAt(y))for(y++;G(t.charCodeAt(y));)y++;if("eE".indexOf(t.charAt(y)||null)>=0)for(y++,"+-".indexOf(t.charAt(y)||null)>=0&&y++,G(t.charCodeAt(y))||P({},h.malformedNumber,t.slice(_,y));G(t.charCodeAt(y));)y++;return parseFloat(t.slice(_,y))}();return{type:u,value:n,line:E,lineStart:S,range:[_,y]}}function M(){var e=y;switch(t.charAt(y)){case"n":return y++,"\n";case"r":return y++,"\r";case"t":return y++,"\t";case"v":return y++,"\v";case"b":return y++,"\b";case"f":return y++,"\f";case"z":return y++,R(),"";case"x":return Q(t.charCodeAt(y+1))&&Q(t.charCodeAt(y+2))?(y+=3,"\\"+t.slice(e,y)):"\\"+t.charAt(y++);default:if(G(t.charCodeAt(y))){for(;G(t.charCodeAt(++y)););return"\\"+t.slice(e,y)}return t.charAt(y++)}}function H(){_=y,y+=2;var e=t.charAt(y),o="",i=!1,s=y,a=S,c=E;if("["===e&&(!1===(o=V())?o=e:i=!0),!i){for(;y<n&&!q(t.charCodeAt(y));)y++;r.comments&&(o=t.slice(s,y))}if(r.comments){var u=m.comment(o,t.slice(_,y));r.locations&&(u.loc={start:{line:c,column:_-a},end:{line:E,column:y-S}}),r.ranges&&(u.range=[_,y]),r.onCreateNode&&r.onCreateNode(u),w.push(u)}}function V(){var e,r=0,o="",i=!1;for(y++;"="===t.charAt(y+r);)r++;if("["!==t.charAt(y+r))return!1;for(y+=r+1,q(t.charCodeAt(y))&&N(),e=y;y<n;){if(q(t.charCodeAt(y))&&N(),"]"===t.charAt(y++)){i=!0;for(var s=0;s<r;s++)"="!==t.charAt(y+s)&&(i=!1);"]"!==t.charAt(y+r)&&(i=!1)}if(i)break}return o+=t.slice(e,y-1),y+=r+1,o}function z(){A=v,v=b,b=T()}function U(e){return e===v.value&&(z(),!0)}function W(e){e===v.value?z():P(v,h.expected,e,v.value)}function q(e){return 10===e||13===e}function G(e){return e>=48&&e<=57}function Q(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function Z(e){return e>=65&&e<=90||e>=97&&e<=122||95===e||e>=48&&e<=57}function $(e){if(i===e.type)return!0;if(a!==e.type)return!1;switch(e.value){case"else":case"elseif":case"end":case"until":return!0;default:return!1}}function J(){var e=Array.apply(null,x[O++]);x.push(e),r.onCreateScope&&r.onCreateScope()}function Y(){x.pop(),O--,r.onDestroyScope&&r.onDestroyScope()}function X(e){-1===F(x[O],e)&&x[O].push(e)}function K(e){X(e.name),ee(e,!0)}function ee(e,t){t||-1!==function(e,t,r){for(var n=0,o=e.length;n<o;n++)if(e[n].name===r)return n;return-1}(C,0,e.name)||C.push(e),e.isLocal=t}function te(e){return-1!==F(x[O],e)}e.lex=T;var re,ne=[];function oe(){return new ie(v)}function ie(e){r.locations&&(this.loc={start:{line:e.line,column:e.range[0]-e.lineStart},end:{line:0,column:0}}),r.ranges&&(this.range=[e.range[0],0])}function se(){re&&ne.push(oe())}function ae(e){re&&ne.push(e)}function ce(e){for(var t,r=[];!$(v);){if("return"===v.value){r.push(ue());break}(t=ue())&&r.push(t)}return r}function ue(){if(se(),a===v.type)switch(v.value){case"local":return z(),function(){var e;if(c===v.type){var t=[],n=[];do{e=fe(),t.push(e)}while(U(","));if(U("="))do{var o=me();n.push(o)}while(U(","));if(r.scope)for(var i=0,s=t.length;i<s;i++)K(t[i]);return g(m.localStatement(t,n))}if(U("function"))return e=fe(),r.scope&&(K(e),J()),de(e,!0);L("<name>",v)}();case"if":return z(),function(){var e,t,n,o=[];for(re&&(n=ne[ne.length-1],ne.push(n)),e=me(),W("then"),r.scope&&J(),t=ce(),r.scope&&Y(),o.push(g(m.ifClause(e,t))),re&&(n=oe());U("elseif");)ae(n),e=me(),W("then"),r.scope&&J(),t=ce(),r.scope&&Y(),o.push(g(m.elseifClause(e,t))),re&&(n=oe());return U("else")&&(re&&(n=new ie(A),ne.push(n)),r.scope&&J(),t=ce(),r.scope&&Y(),o.push(g(m.elseClause(t)))),W("end"),g(m.ifStatement(o))}();case"return":return z(),function(){var e=[];if("end"!==v.value){var t=he();for(null!=t&&e.push(t);U(",");)t=me(),e.push(t);U(";")}return g(m.returnStatement(e))}();case"function":return z(),de(function(){var e,t,n;for(re&&(n=oe()),e=fe(),r.scope&&(ee(e,te(e.name)),J());U(".");)ae(n),t=fe(),e=g(m.memberExpression(e,".",t));return U(":")&&(ae(n),t=fe(),e=g(m.memberExpression(e,":",t)),r.scope&&X("self")),e}());case"while":return z(),function(){var e=me();W("do"),r.scope&&J();var t=ce();return r.scope&&Y(),W("end"),g(m.whileStatement(e,t))}();case"for":return z(),function(){var e,t=fe();if(r.scope&&(J(),K(t)),U("=")){var n=me();W(",");var o=me(),i=U(",")?me():null;return W("do"),e=ce(),W("end"),r.scope&&Y(),g(m.forNumericStatement(t,n,o,i,e))}for(var s=[t];U(",");)t=fe(),r.scope&&K(t),s.push(t);W("in");var a=[];do{var c=me();a.push(c)}while(U(","));return W("do"),e=ce(),W("end"),r.scope&&Y(),g(m.forGenericStatement(s,a,e))}();case"repeat":return z(),function(){r.scope&&J();var e=ce();W("until");var t=me();return r.scope&&Y(),g(m.repeatStatement(t,e))}();case"break":return z(),g(m.breakStatement());case"do":return z(),function(){r.scope&&J();var e=ce();return r.scope&&Y(),W("end"),g(m.doStatement(e))}();case"goto":return z(),function(){v.value;var e=fe();return g(m.gotoStatement(e))}()}return l===v.type&&U("::")?function(){var e=v.value,t=fe();return r.scope&&(X("::"+e+"::"),ee(t,!0)),W("::"),g(m.labelStatement(t))}():(re&&ne.pop(),U(";")?void 0:function(){var e,t,r=v;if(re&&(t=oe()),null==(e=ve()))return I(v);if(",=".indexOf(v.value)>=0){var n,o=[e],i=[];for(le(e);U(",");)null==(n=ve())&&L("<expression>",v),le(n),o.push(n);W("=");do{n=me(),i.push(n)}while(U(","));return ae(t),g(m.assignmentStatement(o,i))}return function(e){switch(e.type){case"CallExpression":case"TableCallExpression":case"StringCallExpression":return!0}return!1}(e)?(ae(t),g(m.callStatement(e))):I(r)}())}function le(e){(e.inParens||-1===["Identifier","MemberExpression","IndexExpression"].indexOf(e.type))&&P(v,h.invalidVar,v.value)}function fe(){se();var e=v.value;return c!==v.type&&L("<name>",v),z(),g(m.identifier(e))}function de(e,t){var n=[];if(W("("),!U(")"))for(;;)if(c===v.type){var o=fe();if(r.scope&&K(o),n.push(o),U(","))continue;if(U(")"))break}else{if(p===v.type){n.push(be()),W(")");break}L("<name> or '...'",v)}var i=ce();return W("end"),r.scope&&Y(),t=t||!1,g(m.functionStatement(e,n,t,i))}function pe(){for(var e,t,r=[];;){if(se(),l===v.type&&U("["))e=me(),W("]"),W("="),t=me(),r.push(g(m.tableKey(e,t)));else if(c===v.type)"="===b.value?(e=fe(),z(),t=me(),r.push(g(m.tableKeyString(e,t)))):(t=me(),r.push(g(m.tableValue(t))));else{if(null==(t=he())){ne.pop();break}r.push(g(m.tableValue(t)))}if(!(",;".indexOf(v.value)>=0))break;z()}return W("}"),g(m.tableConstructorExpression(r))}function he(){return ye(0)}function me(){var e=he();if(null!=e)return e;L("<expression>",v)}function ge(e){var t=e.charCodeAt(0),r=e.length;if(1===r)switch(t){case 94:return 12;case 42:case 47:case 37:return 10;case 43:case 45:return 9;case 38:return 6;case 126:return 5;case 124:return 4;case 60:case 62:return 3}else if(2===r)switch(t){case 47:return 10;case 46:return 8;case 60:case 62:return"<<"===e||">>"===e?7:3;case 61:case 126:return 3;case 111:return 1}else if(97===t&&"and"===e)return 2;return 0}function ye(e){var t,r,n,o=v.value;if(re&&(r=oe()),function(e){return l===e.type?"#-~".indexOf(e.value)>=0:a===e.type&&"not"===e.value}(v)){se(),z();var i=ye(10);null==i&&L("<expression>",v),t=g(m.unaryExpression(o,i))}if(null==t&&null==(t=be())&&(t=ve()),null==t)return null;for(;o=v.value,!(0===(n=l===v.type||a===v.type?ge(o):0)||n<=e);){"^"!==o&&".."!==o||n--,z();var s=ye(n);null==s&&L("<expression>",v),re&&ne.push(r),t=g(m.binaryExpression(o,t,s))}return t}function ve(){var e,t,n,o,i;if(re&&(n=oe()),c===v.type)t=v.value,e=fe(),r.scope&&ee(e,te(t));else{if(!U("("))return null;e=me(),W(")"),e.inParens=!0}for(;;)if(l===v.type)switch(v.value){case"[":ae(n),z(),o=me(),e=g(m.indexExpression(e,o)),W("]");break;case".":ae(n),z(),i=fe(),e=g(m.memberExpression(e,".",i));break;case":":ae(n),z(),i=fe(),e=g(m.memberExpression(e,":",i)),ae(n),e=Ae(e);break;case"(":case"{":ae(n),e=Ae(e);break;default:return e}else{if(s!==v.type)break;ae(n),e=Ae(e)}return e}function Ae(e){if(l===v.type)switch(v.value){case"(":z();var t=[],r=he();for(null!=r&&t.push(r);U(",");)r=me(),t.push(r);return W(")"),g(m.callExpression(e,t));case"{":se(),z();var n=pe();return g(m.tableCallExpression(e,n))}else if(s===v.type)return g(m.stringCallExpression(e,be()));L("function arguments",v)}function be(){var e,n=s|u|f|d|p,o=v.value,i=v.type;if(re&&(e=oe()),i&n){ae(e);var c=t.slice(v.range[0],v.range[1]);return z(),g(m.literal(i,o,c))}return a===i&&"function"===o?(ae(e),z(),r.scope&&J(),de(null)):U("{")?(ae(e),pe()):void 0}function we(r){return t+=String(r),n=t.length,e}function _e(e){void 0!==e&&we(e),t&&"#!"===t.substr(0,2)&&(t=t.replace(/^.*/,(function(e){return e.replace(/./g," ")}))),n=t.length,re=r.locations||r.ranges,b=T();var o=function(){z(),se(),r.scope&&J();var e=ce();return r.scope&&Y(),i!==v.type&&I(v),re&&!e.length&&(A=v),g(m.chunk(e))}();if(r.comments&&(o.comments=w),r.scope&&(o.globals=C),ne.length>0)throw new Error("Location tracking failed. This is most likely a bug in luaparse");return o}ie.prototype.complete=function(){r.locations&&(this.loc.end.line=A.line,this.loc.end.column=A.range[1]-A.lineStart),r.ranges&&(this.range[1]=A.range[1])},e.parse=function(i,s){return void 0===s&&"object"==typeof i&&(s=i,i=void 0),s||(s={}),t=i||"",r=function(){for(var e,t,r=k.call(arguments),n={},o=0,i=r.length;o<i;o++)for(t in e=r[o])e.hasOwnProperty(t)&&(n[t]=e[t]);return n}(o,s),y=0,E=1,S=0,n=t.length,x=[[]],O=0,C=[],ne=[],r.comments&&(w=[]),r.wait?e:_e()},e.write=we,e.end=_e}))},6344:e=>{"use strict";const t=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];e.exports=(e,r)=>{const n=new Set(Object.keys(e).concat(t));for(const t of n)t in r||(r[t]="function"==typeof e[t]?e[t].bind(e):e[t])}},15:(e,t,r)=>{"use strict";const n="undefined"==typeof URL?r(7310).URL:URL,o=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e)),i=(e,t)=>{if(t={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...t},Reflect.has(t,"normalizeHttps"))throw new Error("options.normalizeHttps is renamed to options.forceHttp");if(Reflect.has(t,"normalizeHttp"))throw new Error("options.normalizeHttp is renamed to options.forceHttps");if(Reflect.has(t,"stripFragment"))throw new Error("options.stripFragment is renamed to options.stripHash");if(e=e.trim(),/^data:/i.test(e))return((e,{stripHash:t})=>{const r=e.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!r)throw new Error(`Invalid URL: ${e}`);const n=r[1].split(";"),o=r[2],i=t?"":r[3];let s=!1;"base64"===n[n.length-1]&&(n.pop(),s=!0);const a=(n.shift()||"").toLowerCase(),c=[...n.map((e=>{let[t,r=""]=e.split("=").map((e=>e.trim()));return"charset"===t&&(r=r.toLowerCase(),"us-ascii"===r)?"":`${t}${r?`=${r}`:""}`})).filter(Boolean)];return s&&c.push("base64"),(0!==c.length||a&&"text/plain"!==a)&&c.unshift(a),`data:${c.join(";")},${s?o.trim():o}${i?`#${i}`:""}`})(e,t);const r=e.startsWith("//");!r&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const i=new n(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===i.protocol&&(i.protocol="http:"),t.forceHttps&&"http:"===i.protocol&&(i.protocol="https:"),t.stripAuthentication&&(i.username="",i.password=""),t.stripHash&&(i.hash=""),i.pathname&&(i.pathname=i.pathname.replace(/((?!:).|^)\/{2,}/g,((e,t)=>/^(?!\/)/g.test(t)?`${t}/`:"/"))),i.pathname&&(i.pathname=decodeURI(i.pathname)),!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=i.pathname.split("/");const r=e[e.length-1];o(r,t.removeDirectoryIndex)&&(e=e.slice(0,e.length-1),i.pathname=e.slice(1).join("/")+"/")}if(i.hostname&&(i.hostname=i.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(i.hostname)&&(i.hostname=i.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const e of[...i.searchParams.keys()])o(e,t.removeQueryParameters)&&i.searchParams.delete(e);return t.sortQueryParameters&&i.searchParams.sort(),t.removeTrailingSlash&&(i.pathname=i.pathname.replace(/\/$/,"")),e=i.toString(),!t.removeTrailingSlash&&"/"!==i.pathname||""!==i.hash||(e=e.replace(/\/$/,"")),r&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e};e.exports=i,e.exports.default=i},778:(e,t,r)=>{var n=r(2479);function o(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function i(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(o),e.exports.strict=n(i),o.proto=o((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return o(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return i(this)},configurable:!0})}))},341:e=>{"use strict";class t extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}}class r{static fn(e){return(...t)=>new r(((r,n,o)=>{t.push(o),e(...t).then(r,n)}))}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise(((t,r)=>{this._reject=r;const n=e=>{this._cancelHandlers.push(e)};return Object.defineProperties(n,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}}),e((e=>{this._isPending=!1,t(e)}),(e=>{this._isPending=!1,r(e)}),n)}))}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(this._isPending&&!this._isCanceled){if(this._cancelHandlers.length>0)try{for(const e of this._cancelHandlers)e()}catch(e){this._reject(e)}this._isCanceled=!0,this._rejectOnCancel&&this._reject(new t(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(r.prototype,Promise.prototype),e.exports=r,e.exports.default=r,e.exports.CancelError=t},9916:e=>{function t(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}function r(e){e.pending+=1;var t=!1;return function(o){if(t)throw new Error("callback called twice");if(t=!0,e.error=e.error||o,e.pending-=1,e.waiting.length>0&&e.pending<e.max)n(e,e.waiting.shift());else if(0===e.pending){var i=e.listeners;e.listeners=[],i.forEach(r)}};function r(t){t(e.error)}}function n(e,t){t(r(e))}e.exports=t,t.prototype.go=function(e){this.pending<this.max?n(this,e):this.waiting.push(e)},t.prototype.wait=function(e){0===this.pending?e(this.error):this.listeners.push(e)},t.prototype.hold=function(){return r(this)}},6574:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof e}\``);return e=e.trim(),t=Object.assign({https:!1},t),/^\.*\/|^(?!localhost)\w+:/.test(e)?e:e.replace(/^(?!(?:\w+:)?\/\/)/,t.https?"https://":"http://")}},1922:(e,t,r)=>{e.exports=r(2544)},2544:(e,t,r)=>{var n=r(2081),o="win32"===process.platform,i=r(8135),s=/(\r\n)|(\n\r)|\n|\r/,a=r(2037).EOL,c=e.exports=t=function(e,t){var r=n.spawn;if(o){var i=r("cmd"),c="",u=null;i.stdout.on("data",(function(e){c+=e.toString()})),i.stderr.on("data",(function(e){null===u?u=e.toString():u+=e.toString()})),i.on("exit",(function(){var e;(c=c.split(s)).forEach((function(t,r){t&&void 0===e&&0===t.indexOf("CommandLine")&&(e=r)})),c.splice(c.length-1,1),c.splice(0,e),t(u,c.join(a)||!1)})),i.stdin.write("wmic process get ProcessId,ParentProcessId,CommandLine \n"),i.stdin.end()}else{"string"==typeof e&&(e=e.split(/\s+/));const n=r("ps",e);c="",u=null,n.stdout.on("data",(function(e){c+=e.toString()})),n.stderr.on("data",(function(e){null===u?u=e.toString():u+=e.toString()})),n.on("exit",(function(){if(u)return t(u.toString());t(null,c||!1)}))}};t.lookup=function(e,t){var r,n=e.psargs||["lx"],o={};return e.pid&&(r=(r=Array.isArray(e.pid)?e.pid:[e.pid]).map((function(e){return String(e)}))),e.command&&(o.command=new RegExp(e.command,"i")),e.arguments&&(o.arguments=new RegExp(e.arguments,"i")),e.ppid&&(o.ppid=new RegExp(e.ppid)),c(n,(function(e,n){if(e)return t(e);var s=function(e){return e?(t=i.parse(e),r=[],t.forEach((function(e){var t=e.PID&&e.PID[0]||e.ProcessId&&e.ProcessId[0]||void 0,n=e.CMD||e.CommandLine||e.COMMAND||void 0,o=e.PPID&&e.PPID[0]||e.ParentProcessId&&e.ParentProcessId[0]||void 0;if(t&&n){var i=n[0],s="";n.length>1&&(s=n.slice(1)),r.push({pid:t,command:i,arguments:s,ppid:o})}})),r):[];var t,r}(n),a=[];s.forEach((function(e){var t,n=!0;if(!(r&&r.indexOf(String(e.pid))<0)){for(t in o)n=!!o[t].test(e[t])&&n;n&&a.push(e)}})),t(null,a)}))},t.kill=function(e,r,n){2==arguments.length&&"function"==typeof r&&(n=r,r=void 0);var o=r&&r.timeout||30;"object"==typeof r&&(r=r.signal);try{process.kill(e,r)}catch(e){return n&&n(e)}var i=0,s=null,a=!1;n&&function r(n){t.lookup({pid:e},(function(e,t){a||(e?(clearTimeout(s),n&&n(e)):t.length>0?(i=i-1||0,r(n)):5==++i?(clearTimeout(s),n&&n()):r(n))}))}(n),s=n&&setTimeout((function(){a=!0,n(new Error("Kill process timeout"))}),1e3*o)}},4286:(e,t,r)=>{var n=r(778),o=r(2840),i=r(7147),s=function(){},a=/^v?\.0/.test(process.version),c=function(e){return"function"==typeof e},u=function(e){e()},l=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=c(t[t.length-1]||s)&&t.pop()||s;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var f=t.map((function(l,d){var p=d<t.length-1;return function(e,t,r,u){u=n(u);var l=!1;e.on("close",(function(){l=!0})),o(e,{readable:t,writable:r},(function(e){if(e)return u(e);l=!0,u()}));var f=!1;return function(t){if(!l&&!f)return f=!0,function(e){return!!a&&!!i&&(e instanceof(i.ReadStream||s)||e instanceof(i.WriteStream||s))&&c(e.close)}(e)?e.close(s):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void u(t||new Error("stream was destroyed"))}}(l,p,d>0,(function(t){e||(e=t),t&&f.forEach(u),p||(f.forEach(u),r(e))}))}));return t.reduce(l)}},4259:(e,t,r)=>{"use strict";const n=r(2781).Readable,o=r(5989);e.exports=class extends n{constructor(e,t,r,n){if("number"!=typeof e)throw new TypeError("Argument `statusCode` should be a number");if("object"!=typeof t)throw new TypeError("Argument `headers` should be an object");if(!(r instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if("string"!=typeof n)throw new TypeError("Argument `url` should be a string");super(),this.statusCode=e,this.headers=o(t),this.body=r,this.url=n}_read(){this.push(this.body),this.push(null)}}},7012:(e,t,r)=>{var n={child:r(2081),crypto:r(6113),fs:r(7147),os:r(2037),path:r(1017),process,util:r(3837)};function o(e,t){var r=n.process.platform;return"darwin"===r?function(e,t){var r=n.os.tmpdir();return r?n.process.env.USER?void a(e,(function(o,a){if(o)return t(o);function c(r,o,i){s(n.path.dirname(e.path),(function(e){return r?t(r):e?t(e):void t(void 0,o,i)}))}e.uuid=a,e.path=n.path.join(r,e.uuid,e.options.name+".app"),function(e,t){var r=n.path.dirname(e.path);n.fs.mkdir(r,(function(o){if(o)return t(o);var s=n.path.join(r,"sudo-prompt-applet.zip");n.fs.writeFile(s,l,"base64",(function(r){if(r)return t(r);var o=[];o.push("/usr/bin/unzip"),o.push("-o"),o.push('"'+i(s)+'"'),o.push('-d "'+i(e.path)+'"'),o=o.join(" "),n.child.exec(o,{encoding:"utf-8"},t)}))}))}(e,(function(t,r,o){if(t)return c(t,r,o);!function(e,t){if(!e.options.icns)return t();n.fs.readFile(e.options.icns,(function(r,o){if(r)return t(r);var i=n.path.join(e.path,"Contents","Resources","applet.icns");n.fs.writeFile(i,o,t)}))}(e,(function(t){if(t)return c(t);!function(e,t){var r=i(n.path.join(e.path,"Contents","Info.plist")),o=i("CFBundleName"),s=e.options.name+" Password Prompt";if(/'/.test(s))return t(new Error("Value should not contain single quotes."));var a=[];a.push("/usr/bin/defaults"),a.push("write"),a.push('"'+r+'"'),a.push('"'+o+'"'),a.push("'"+s+"'"),a=a.join(" "),n.child.exec(a,{encoding:"utf-8"},t)}(e,(function(t,r,o){if(t)return c(t,r,o);!function(e,t){var r=n.path.join(e.path,"Contents","MacOS","sudo-prompt-command"),o=[];for(var s in o.push('cd "'+i(n.process.cwd())+'"'),e.options.env){var a=e.options.env[s];o.push("export "+s+'="'+i(a)+'"')}o.push(e.command),o=o.join("\n"),n.fs.writeFile(r,o,"utf-8",t)}(e,(function(t){if(t)return c(t);!function(e,t){var r=n.path.join(e.path,"Contents","MacOS","applet"),o={cwd:n.path.dirname(r),encoding:"utf-8"};n.child.exec("./"+n.path.basename(r),o,t)}(e,(function(t,r,o){if(t)return c(t,r,o);!function(e,t){var r=n.path.join(e.path,"Contents","MacOS");n.fs.readFile(n.path.join(r,"code"),"utf-8",(function(o,i){if(o){if("ENOENT"===o.code)return t(new Error(f));t(o)}else n.fs.readFile(n.path.join(r,"stdout"),"utf-8",(function(o,s){if(o)return t(o);n.fs.readFile(n.path.join(r,"stderr"),"utf-8",(function(r,n){if(r)return t(r);0===(i=parseInt(i.trim(),10))?t(void 0,s,n):((r=new Error("Command failed: "+e.command+"\n"+n)).code=i,t(r,s,n))}))}))}))}(e,c)}))}))}))}))}))})):t(new Error("env['USER'] not defined.")):t(new Error("os.tmpdir() not defined."))}(e,t):"linux"===r?function(e,t){!function(e,t){var r=0,o=["/usr/bin/kdesudo","/usr/bin/pkexec"];!function e(){if(r===o.length)return t(new Error("Unable to find pkexec or kdesudo."));var i=o[r++];n.fs.stat(i,(function(r){if(r){if("ENOTDIR"===r.code)return e();if("ENOENT"===r.code)return e();t(r)}else t(void 0,i)}))}()}(0,(function(r,o){if(r)return t(r);var s=[];for(var a in s.push('cd "'+i(n.process.cwd())+'";'),e.options.env){var c=e.options.env[a];s.push("export "+a+'="'+i(c)+'";')}s.push('"'+i(o)+'"'),/kdesudo/i.test(o)?(s.push("--comment",'"'+e.options.name+' wants to make changes. Enter your password to allow this."'),s.push("-d"),s.push("--")):/pkexec/i.test(o)&&s.push("--disable-internal-agent");var u="SUDOPROMPT\n";s.push('/bin/bash -c "echo '+i(u.trim())+"; "+i(e.command)+'"'),s=s.join(" "),n.child.exec(s,{encoding:"utf-8",maxBuffer:p},(function(e,r,n){var o=r&&r.slice(0,11)===u;o&&(r=r.slice(11)),e&&!o&&(/No authentication agent found/.test(n)?e.message=d:e.message=f),t(e,r,n)}))}))}(e,t):"win32"===r?function(e,t){var r=n.os.tmpdir();if(!r)return t(new Error("os.tmpdir() not defined."));a(e,(function(o,i){return o?t(o):(e.uuid=i,e.path=n.path.join(r,e.uuid),/"/.test(e.path)?t(new Error("instance.path cannot contain double-quotes.")):(e.pathElevate=n.path.join(e.path,"elevate.vbs"),e.pathExecute=n.path.join(e.path,"execute.bat"),e.pathCommand=n.path.join(e.path,"command.bat"),e.pathStdout=n.path.join(e.path,"stdout"),e.pathStderr=n.path.join(e.path,"stderr"),e.pathStatus=n.path.join(e.path,"status"),void n.fs.mkdir(e.path,(function(r){if(r)return t(r);function o(r,n,o){s(e.path,(function(e){return r?t(r):e?t(e):void t(void 0,n,o)}))}!function(e,t){var r=[];r.push("@echo off"),r.push('call "'+e.pathCommand+'" > "'+e.pathStdout+'" 2> "'+e.pathStderr+'"'),r.push('(echo %ERRORLEVEL%) > "'+e.pathStatus+'"'),r=r.join("\r\n"),n.fs.writeFile(e.pathExecute,r,"utf-8",t)}(e,(function(t){if(t)return o(t);!function(e,t){var r=n.process.cwd();if(/"/.test(r))return t(new Error("process.cwd() cannot contain double-quotes."));var o=[];for(var i in o.push("@echo off"),o.push("chcp 65001>nul"),o.push('cd /d "'+r+'"'),e.options.env){var s=e.options.env[i];o.push("set "+i+"="+s.replace(/([<>\\|&^])/g,"^$1"))}o.push(e.command),o=o.join("\r\n"),n.fs.writeFile(e.pathCommand,o,"utf-8",t)}(e,(function(t){if(t)return o(t);!function(e,t){var r=[];r.push("powershell.exe"),r.push("Start-Process"),r.push("-FilePath"),r.push("\"'"+e.pathExecute.replace(/'/g,"`'")+"'\""),r.push("-WindowStyle hidden"),r.push("-Verb runAs"),r=r.join(" ");var o=n.child.exec(r,{encoding:"utf-8"},(function(e,r,n){if(e)return t(new Error(f),r,n);t()}));o.stdin.end()}(e,(function(t,r,i){if(t)return o(t,r,i);u(e,(function(t){if(t)return o(t);!function(e,t){n.fs.readFile(e.pathStatus,"utf-8",(function(r,o){if(r)return t(r);n.fs.readFile(e.pathStdout,"utf-8",(function(r,i){if(r)return t(r);n.fs.readFile(e.pathStderr,"utf-8",(function(r,n){if(r)return t(r);0===(o=parseInt(o.trim(),10))?t(void 0,i,n):((r=new Error("Command failed: "+e.command+"\r\n"+n)).code=o,t(r,i,n))}))}))}))}(e,o)}))}))}))}))}))))}))}(e,t):void t(new Error("Platform not yet supported."))}function i(e){if("string"!=typeof e)throw new Error("Expected a string.");return e.replace(/"/g,'\\"')}function s(e,t){if("string"!=typeof e||!e.trim())return t(new Error("Argument path not defined."));var r=[];if("win32"===n.process.platform){if(/"/.test(e))return t(new Error("Argument path cannot contain double-quotes."));r.push('rmdir /s /q "'+e+'"')}else r.push("/bin/rm"),r.push("-rf"),r.push('"'+i(n.path.normalize(e))+'"');r=r.join(" "),n.child.exec(r,{encoding:"utf-8"},t)}function a(e,t){n.crypto.randomBytes(256,(function(r,o){r&&(o=Date.now()+""+Math.random());var i=n.crypto.createHash("SHA256");i.update("sudo-prompt-3"),i.update(e.options.name),i.update(e.command),i.update(o);var s=i.digest("hex").slice(-32);if(!s||"string"!=typeof s||32!==s.length)return t(new Error("Expected a valid UUID."));t(void 0,s)}))}function c(e){return!(!/^[a-z0-9 ]+$/i.test(e)||0===e.trim().length||e.length>70)}function u(e,t){n.fs.stat(e.pathStatus,(function(r,o){r&&"ENOENT"===r.code||o.size<2?setTimeout((function(){n.fs.stat(e.pathStdout,(function(r){if(r)return t(new Error(f));u(e,t)}))}),1e3):r?t(r):t()}))}e.exports.exec=function(){if(arguments.length<1||arguments.length>3)throw new Error("Wrong number of arguments.");var e=arguments[0],t={},r=function(){};if("string"!=typeof e)throw new Error("Command should be a string.");if(2===arguments.length)if(n.util.isObject(arguments[1]))t=arguments[1];else{if(!n.util.isFunction(arguments[1]))throw new Error("Expected options or callback.");r=arguments[1]}else if(3===arguments.length){if(!n.util.isObject(arguments[1]))throw new Error("Expected options to be an object.");if(t=arguments[1],!n.util.isFunction(arguments[2]))throw new Error("Expected callback to be a function.");r=arguments[2]}if(/^sudo/i.test(e))return r(new Error('Command should not be prefixed with "sudo".'));if(void 0===t.name){var i=n.process.title;if(!c(i))return r(new Error("process.title cannot be used as a valid name."));t.name=i}else if(!c(t.name))return r(new Error("options.name must be alphanumeric only (spaces are allowed) and <= 70 characters."));if(void 0!==t.icns){if("string"!=typeof t.icns)return r(new Error("options.icns must be a string if provided."));if(0===t.icns.trim().length)return r(new Error("options.icns must not be empty if provided."))}if(void 0!==t.env){if("object"!=typeof t.env)return r(new Error("options.env must be an object if provided."));if(0===Object.keys(t.env).length)return r(new Error("options.env must not be empty if provided."));for(var s in t.env){var a=t.env[s];if("string"!=typeof s||"string"!=typeof a)return r(new Error("options.env environment variables must be strings."));if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(s))return r(new Error("options.env has an invalid environment variable name: "+JSON.stringify(s)));if(/[\r\n]/.test(a))return r(new Error("options.env has an invalid environment variable value: "+JSON.stringify(a)))}}var u=n.process.platform;if("darwin"!==u&&"linux"!==u&&"win32"!==u)return r(new Error("Platform not yet supported."));o({command:e,options:t,uuid:void 0,path:void 0},r)};var l="UEsDBAoAAAAAAO1YcEcAAAAAAAAAAAAAAAAJABwAQ29udGVudHMvVVQJAAPNnElWLZEQV3V4CwABBPUBAAAEFAAAAFBLAwQUAAAACACgeXBHlHaGqKEBAAC+AwAAEwAcAENvbnRlbnRzL0luZm8ucGxpc3RVVAkAA1zWSVYtkRBXdXgLAAEE9QEAAAQUAAAAfZNRb5swFIWfl1/BeA9OpSmqJkqVBCJFop1VyKQ9Ta59S6wa27NNCfv1M0naJWTsEXO+c8+9vo7v97UI3sBYruRdeBPNwgAkVYzL6i7cluvpbXifTOLP6bdV+QNngRbcugBvl/lmFYRThBZaC0AoLdMA55uiDLwHQtljGIQ75/RXhNq2jUiviqiqe6FF2CgNxnW5N5t6IGKOhb7M0f0ijj9lnLpk8il+hS5ZrZeNZAIWQqj2ge+B5YoSwX8T5xEbo17ktc40gIZQCm8glK5BuieovP5Dbp3xHSeZrHyCXYxO3wM+2wNtHHkWMAQP/bkxbkOVXPMxKuK0Dz6CMh+Wv3AwQ9gPM7INU1NtVK3Ha8sXlfoB+m6J6b4fRzv0mkezMf6R1Fe5MbG2VYYF+L+lMaGvpIKy01cOC4zzMazYKeNOQYuDYkjfjMcteCWJa8w/Zi2ugubFA5e8buqisw7qU81ltzB0xx3QC5/TFh7J/e385/zL+7+/wWbR/LwIOl/dvHiCXw03YFfEPJ9dwsWu5sV2kwnod3QoeLeL0eGdJJM/UEsDBAoAAAAAAHSBjkgAAAAAAAAAAAAAAAAPABwAQ29udGVudHMvTWFjT1MvVVQJAAMbpQ9XLZEQV3V4CwABBPUBAAAEFAAAAFBLAwQUAAAACABVHBdH7Dk4KTIIAADIYQAAFQAcAENvbnRlbnRzL01hY09TL2FwcGxldFVUCQADMiPZVVOlD1d1eAsAAQT1AQAABBQAAADtnG9sHEcVwGfti7M1/rONLNVtXHqpzsipis+pHOSWFOzEm25at3XrJI2ozbK+W/suuds79vaSuCKSpaOIxRy1+NSPRPAhlWj7AVRaQCWpTRz+CEo+RSKCCho4K67kVhUyAeV4b3fWt17fXZqKFgHvp8zO3/dmdmfPmtl5L7+8/uPXGWMNELZCaGRMgmjHIlxaBCibdcoGsewCljGCIAiCIAiCIAiCIP7r+M21d67zjb/zEaAdwr1bGHuWMQH2/2wAgqqODj0kf0F+8nGfoFRbJ8p9U0C5g/KRgwEZqZLGfrfwwJx+LP2kVWkelD9zJ2NfBr1nWt2xrhNisxWZ3Ex6MpNSc1Z+soqOO+5i7JMYt7vj9BC5jiZXBwirCT2V1c0qOgZAxwMYt9cbRyxnmUljusa9mKBjGON2tgG/PlXNGyeSRlxNGlOZKjpeBR0KxsFx+MB7VJy5GB46OOSrCLPKfEjrH3/gFry+4zOpuH8sm+VF5srW6ltVjZQ3HVnL3KRDDLsflMSADpyDyjuR0urp6AAdHRgHdOD9iOs6Ypl0OmPUupeecOW19OsQAmn3tzBy4LFH5OED3jz0MbYouM8D460BOdTXCaEF6tsgLkF8GeJPQBj16Rb4PTf5xl2NH4J8a5Vy1N3F3OcZzefMaCo5GeVTuJ2P4cUf/aH5qbbP73/utpfeevdbLzwfYfy+Q80woGan/1E+ljo/703g77IaOJY479t5rqFLDag9OjaTs/R0dCQ5aWrmTHS/qaX1ExnzWC66L2PqY7p5PBnTc71TXnn0sG7mkhkjFx3a0IL30e/rQxB+EXL68J4BBLe73r298DySk5tlGPtJY1BmOhZTc727PBH2Ke+ZhF35nTyP80oQBEEQBPFRcJTZVwpvrxZWpLmJkN0VKT4q2iORUGFBOPfnBuFX9nhELOG67f1D9pWxpw4XVrrmTklz+ZY5Wfwurm/t3ffi9cE+uM41vYbbj2fP5kNXt9sXiopwVRj6xhPlr160mttfuVi4Fs2vXv2rfc5u7UeZfxQ+y4pPh/JrpyUUBjmrofzmadGXKf0eui7KK/ZwJLQUiuRAe+mLUFQ+tFKUV3npd7AU9ytz8iqIiXYoUnoBsqdxDbXk3CXcRov9lYhoW5EQjBxb4NoSY9iQsvn5+QSuusrduAybL3eHIIIbLqyIS9CHlY3loB8rldVKuLfyOsE1+a6zhUVxYsFp3Amqz8tr7Lz8dza1JF8TmC3/syivYVtcfxcWOycWQDvuLcrdnc61y7mGnWsErgmsXDbK5TKkscnypJvGhsuH3TQ2X37YTaPQ8ucw7W6t1LR2TFfjekqb0SGTiedTOmz0klZSSyWf0U01pqVSufXGmThsjs20OpU3Yrjuxbnu4u+GP8b1LO6PcX2L4Q6+v8Q07u9aQFLy71Ckt54TIfjfNdzfDkMYhTAOIXHXh39vCYIgCIIgCIIgCIL4z3Nm+84/Ci1Nn8b0ryHsgbBX1rbgOXD7LZJzNtrC0/gFqYOn8csQ/GONguQchPXzcvy+9CBzvk84HxkO+tJH3bRz5Fb0pb/nS3/fl/6BL/2aL43faLzz3Wbmju8W5p6pttaoR9THjgyZ0zEeH2eqqmbNzLShpXVIpxOqflKP5S1dTehaXDeZqhvHk2bGYOo+LZXal0lnM4ZuWMPJXFazYgmmPp7VjWF9SsunrPVa1HpMn0lPm2r8hGZO3aea+nQyZ+mmmtNjFp5i4oG0lTChE+eDj2pm8lbSgDFoln4yCRp00zQyEDmZtBZLbGxnanHzgWh092d29e/uv+/f+DIQBEEQBEEQBEEQ/7P81rX/FxoZm/Xs/5UmtP8PO/W3M9fGvKoPAEfYXLQJ1HOpmk+AJx80OOb5m/URGG9z9c378rVs9F15tPXP1dS3wvVtC+Q9/H4DFX21fQcY9zvo9eXrj6++D0Af1zfqy9eyx3f16QnVMayufr+zXN+sL99YRx/O69er+RdIgXkNxJv9DfBTDIxLPa6Zudr6enz5euO6ke9Bj7TRzr0noK+JbczfyA9hgOvr9OX98t57XNFX3ydhlOsL+2T8+oK/ucrvNOCfEHbbXhAqeebLB/0V7oYp7+Pt8PsZWnl1+urRpAn7SUCcYBX/hkth95kd2cFYllX3bxB4+xCrzcCO6v4PbXzo1fwbEM/H4ds/f/nCgZH+8k+j0vNPv7Jlz7qPQ1PFx+FVPoZ76ozj42K87YP9/cT7xuf9UfpSeP0MsJvzp0A8/4g3w+78ef4R+F4QBEEQBPH/w1Gm2FeUwturytwpUSnmJfta4Q3h3J8aFeE9xf7d1ZBSOCcqhftZ/m+YKuG6wV4qaQzdGED0Z2jJ/zpa9ZcegjIF7fkVaIBrt11nJxYOOepXpPPyKjsvvytOLcnvCWxJfh87V+xTa0rx1Kpj0a8UFqWJhXL3fgHt9xXn+rCz7Bop3rkTEkNj5e7bIZ7HNRZb/ku5XE6g58HyZUzdj6mLjh1/Pbt7XMt5dvfvtLl1Fbv7BtbhrtyEPW6V038H1yE88yQTTkqC1LJVnIeaCNe7dr3sEPEe6lCb9LWGfa3efvNG8pe5fF8NeW8g3n7jCI+/xOOEVH19KvF9oudHH2n/YOtYgiAIgiAIgiAIgiA+fm69mx3aO8bYtkHn/xlwDq8nkwaavz9h9swzc+DWwRrm71A5CJVVjeChTtk26Fqwu0fxQjUL+9vqHVV/KC53OUd+bJxVfBkw7/gzCO5pr3dOK/g+WUQDeZlV/A2QRwJ5THjn1/xcd9BfhlT1KbgpVwLn+W2amGr2//8CUEsDBBQAAAAIAAVHj0ga7FYjfQEAAKoCAAAhABwAQ29udGVudHMvTWFjT1Mvc3Vkby1wcm9tcHQtc2NyaXB0VVQJAAOJkBBXipAQV3V4CwABBPUBAAAEFAAAAI1SO08cMRDu91cMHIKGxUB5xSGEUqTlFKWMvPYca+EXnjGXy6/PeNcg0qVay+PvObs5U5OLatI0DxvYIwNVm4BdQGIdMhxSkauJ8K1i7FOjvSdwB2A+/WJnXpEJdEGwjvTk0W6HhTW8WldgzKDedVF2Ug2tLn7svz3DDpTFdxWr93C/u7wbVKWyoDhVM/8XZAOPOXvcm+IyXxGcizeaUca0XJ1D0CfQnlEysE2VwbuII0br4gvdCMF37m9IoC39+oxTO2EpS8oZJdtRS0aIKY5/sCQoyLVEMMki6Ghl0BGN9SeuICkPIctXDHDDSB9oGEQi1yZWUAda8EZnIcR/eIOOVao+9TrbkpYFjLmkkHk0KYSGvdt12/e71cP6Hs2c4OJBemtsYusplVX+GLHQ7DKkQ098/ZF38dLEpRCeNUMlMW90BIseeQkWtuu2qKmIyDHCuqFuo1N11Ud/1Cf6CHb7Sfxld2ATklQoUGEDActfZ5326WU74G/HcDv8BVBLAwQKAAAAAADtWHBHqiAGewgAAAAIAAAAEAAcAENvbnRlbnRzL1BrZ0luZm9VVAkAA82cSVYqkRBXdXgLAAEE9QEAAAQUAAAAQVBQTGFwbHRQSwMECgAAAAAAm3lwRwAAAAAAAAAAAAAAABMAHABDb250ZW50cy9SZXNvdXJjZXMvVVQJAANW1klWLZEQV3V4CwABBPUBAAAEFAAAAFBLAwQUAAAACACAeXBHfrnysfYGAAAf3AAAHgAcAENvbnRlbnRzL1Jlc291cmNlcy9hcHBsZXQuaWNuc1VUCQADH9ZJVnGlD1d1eAsAAQT1AQAABBQAAADt3Xk81Hkcx/Hvb5yVo5bGsVlKbcpRRqFlGZGS5JikRBIdI0OZttMZloqiYwrVjD1UqJaUokTRubG72bZVjqR1VZNjp2XEGo9H+9gt+9h/9tHx8H7N4/fw5MHjYeaPz+P7+P7x/bL9griEPNBm+001J0S+ZbvL/NmKwzWHE0IUHebYuRFCEckjL9v/xSvk2EpCpBXZtrYuDra2Oi4hwSvZgSsIMU9MdPdePcZd1aqQu0p3fDkrcFrs+mPWihMU9y6clp5XEFFdbRrEczCtGtfkL3pWfvBGublJ4ct051kuocYtaaqll/IjdfR+V75vlTdl//AJVZU6elZ5f0S7NO3MaE2xMElhF+TUrHgW2nFYeGTrs/OrhDJN5zMX8ZJVKXrqSUM1Rj03bnf85/pJMXECNdl0D1ctfe/j82imziM2nllSa3t5q8+vP1f38k/k22uN1lmnvfz0b8dGxO+mnh91v7WB2tKdrG3d4vmJaHlTvjGzdMqWcw/9frnCtQpPZK9sMKi/Ey/jzgqIPzBy9/dlf9griI2/u+sjcApozWx6/NXytC+qBTlrhb69fE7J6tgOzpWjFSl8qxihr5dYf/qExoeupY6Ze/j2PfL1azhhZ8fU3eelJY+ylk16UJN6KmOU0M4r+75cZhH/mxNndowNb4wx7TCoN4yvMGu8ySq5l5W5t+xQyYbS/Ome7e0W0sXbC5aktl0LEXNYR9obH7dMT721dbNdT/eFzXNEYSH8GU+bQ5s6YniGcj3fHtgXPbo0Oj4i3d5G1Fjfm/Ng7kgpjQDNxw4RRnu+Vloy5ZE3J6OpwlFBzaxS25He2h3lJuizO70zJPLUYtks14RE5yrD8y2tXa5l5Wqh/NBY06yoiCLF08Nk9A5Ojbs43GmR1Ch/PaZsLf3e6uPRSrIM1ROqGjt80leqfdxYbNn+WV7K7ZKiy/t6r1/3ie46V5432T/Oahs9V7NnVzb9zoq2rFgvPxXrcAMzmvWnGjof/RpdsZThIEpex6DGbd5h6STaOyZXxV/YfW9u4KyllmZ3X15IMHHLSJtVPSOvULCsz2TyPC/WL9kGSme/1L01SSzjfbHnqk+OV7OBmevZeo3DBR7lXT5drT0MkX5PwDd1EQ0ebfkh1zy/L8ydd+VJ4CLuRndNjuwj+vMfU8q2l2l1rGtr8FC2D+fdSGk81eltuTjYSMk++4BMd0DXQo35iXbZndGdcXkGFyeG6b28evF22M2w22HlYSXetGSLW4cfFT00WqvN9bkqCujQ9KzdSt+snr+qmbcme+5Y3cDRn9BDLps+dPVltE9UkPeb6XovineiVUznTznyuZaSn/ZvR8VeRUYLqe3iHFqnU6+7+4LmtfsmaS0MdjIvslFJGG/rn7DPdMGLcx4d6eP2Oz92Y49kWbBUjudU2ijHnc7YIODQxD1aPx8PynVr+cmvJoy2+M5nQa2Kt0dvdPxp73LNU6aTeaktTfHH1L+8Pm/XalZcFcfzYxlhTefuzjRGobLKEqPZh8QKxUXWbU/ERvW78ghvTGTUNd0g9YqbcjUy5h0xVbn3S7SS54SOqKt88UR0qZuxKfxlZfODUm52o2HkGTOLw5dqhevvWjH7ssiqxAhKwA91d1nWG9w/GJIc7GwWbKKe/mAsGRqXBb87P10jH8/0LY6kpGQV1KcuAwAAeCt4LiVFWRJKs4DJ6p9GxGHWfLuTM5dt61/pzCCE7vLmSodGJM/ASqdzU2U3VjpY6WClg5XOICudUaI3VjocuWCsdAAAAAAAAAAAAAAAAD5o1Gmr054TSoqWxPvnfrLxVEIc29/cT5YmkmdgPzlCSz8a+8nYT8Z+MvaTB9lPZpJX+8lRktFyRdDF0m6IdcF2MgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8ddD8G5oJkUuQnAXwnvxLAAAAADDkEFURRckVE6rIv+Tb1078MiZEetubJ34RHckzcOIXd8uWTpz4hRO/cOIXTvwa5MQvoidZ5S8a9h8nfl1QVhipQ6jyyWeuvTaBGP3D5fwgE4gpeQYmUCZ7XQ0mECYQJhAm0GATyOfVmYOU4sAdNi+cOUpm/9cdNv2Di8kkFN3mYOtrg8sE14xicGFwYXDhmlEAAD5w/Os1o8bTcM0oVjpY6WClg2tGAQAAAAAAAAAAAAAAgL/wb9eMBpow+r817yN/fwnJf33P5g78nWofEZNXD3u95GdSkh3o135/aL2i3vl/gHf/7t59oDlnDSHS8gQhNGQL8uWs6P+iwPYLDuIOzARqyM+E9QOfA3PIfw4IIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhND70J9QSwMEFAAAAAgA7VhwR/dYplZAAAAAagEAAB4AHABDb250ZW50cy9SZXNvdXJjZXMvYXBwbGV0LnJzcmNVVAkAA82cSVZTpQ9XdXgLAAEE9QEAAAQUAAAAY2BgZGBgYFQBEiDsxjDygJQDPlkmEIEaRpJAQg8kLAMML8bi5OIqIFuouKA4A0jLMTD8/w+S5AdrB7PlBIAEAFBLAwQKAAAAAADtWHBHAAAAAAAAAAAAAAAAJAAcAENvbnRlbnRzL1Jlc291cmNlcy9kZXNjcmlwdGlvbi5ydGZkL1VUCQADzZxJVi2REFd1eAsAAQT1AQAABBQAAABQSwMEFAAAAAgA7VhwRzPLNU9TAAAAZgAAACsAHABDb250ZW50cy9SZXNvdXJjZXMvZGVzY3JpcHRpb24ucnRmZC9UWFQucnRmVVQJAAPNnElWU6UPV3V4CwABBPUBAAAEFAAAACWJOw6AIBAFe08DCBVX2QbWhZgQ1vCpCHcXtHkzkzegtCDB5Xp/g0+UyihARnb70kL/UbvffYpjQODcmk9zKXListxCoUsZA7EQ5S0+dVq085gvUEsDBAoAAAAAAIeBjkgAAAAAAAAAAAAAAAAbABwAQ29udGVudHMvUmVzb3VyY2VzL1NjcmlwdHMvVVQJAAM9pQ9XLZEQV3V4CwABBPUBAAAEFAAAAFBLAwQUAAAACAAJgI5ICl5liTUBAADMAQAAJAAcAENvbnRlbnRzL1Jlc291cmNlcy9TY3JpcHRzL21haW4uc2NwdFVUCQADcaIPV1OlD1d1eAsAAQT1AQAABBQAAAB9UMtOAkEQrNldd9dhH3Dz6NGYiPIJHjTxLCZeF9iDcXEJC0RvfoI/4sEfIvoHPEQEhbIHvOok01U16emu7vOkaF2dXu7XqrUTcyMATkxCwYKthCAUbmciAQ8O11yFcGBfbF/4jR24WmCvWjwUeXqfNutn13XyEeYYHkqKam+kghdJGfUCvwIfB6jiGAX6aCHHETroCrYFe6IKNEXfGOXChc0v7HKpBRzdSFrtELvbumKVC80F/FIjzwe9bj91uZRuXJuwAiLjNi7DlsxPaJSUAMrCFOeac3GfpINennQ6d/0sA4z7JxzKiVCCV+YHAs74LuuIONUi//4RIoC63czrIbYQS3PFicWJcTMTv1JHmocmROLJ45gjzfHvXJqjf7ZZ4RT+61uaBbDipGh2ZanBcjh8/gFQSwECHgMKAAAAAADtWHBHAAAAAAAAAAAAAAAACQAYAAAAAAAAABAA7UEAAAAAQ29udGVudHMvVVQFAAPNnElWdXgLAAEE9QEAAAQUAAAAUEsBAh4DFAAAAAgAoHlwR5R2hqihAQAAvgMAABMAGAAAAAAAAQAAAKSBQwAAAENvbnRlbnRzL0luZm8ucGxpc3RVVAUAA1zWSVZ1eAsAAQT1AQAABBQAAABQSwECHgMKAAAAAAB0gY5IAAAAAAAAAAAAAAAADwAYAAAAAAAAABAA7UExAgAAQ29udGVudHMvTWFjT1MvVVQFAAMbpQ9XdXgLAAEE9QEAAAQUAAAAUEsBAh4DFAAAAAgAVRwXR+w5OCkyCAAAyGEAABUAGAAAAAAAAAAAAO2BegIAAENvbnRlbnRzL01hY09TL2FwcGxldFVUBQADMiPZVXV4CwABBPUBAAAEFAAAAFBLAQIeAxQAAAAIAAVHj0ga7FYjfQEAAKoCAAAhABgAAAAAAAEAAADtgfsKAABDb250ZW50cy9NYWNPUy9zdWRvLXByb21wdC1zY3JpcHRVVAUAA4mQEFd1eAsAAQT1AQAABBQAAABQSwECHgMKAAAAAADtWHBHqiAGewgAAAAIAAAAEAAYAAAAAAABAAAApIHTDAAAQ29udGVudHMvUGtnSW5mb1VUBQADzZxJVnV4CwABBPUBAAAEFAAAAFBLAQIeAwoAAAAAAJt5cEcAAAAAAAAAAAAAAAATABgAAAAAAAAAEADtQSUNAABDb250ZW50cy9SZXNvdXJjZXMvVVQFAANW1klWdXgLAAEE9QEAAAQUAAAAUEsBAh4DFAAAAAgAgHlwR3658rH2BgAAH9wAAB4AGAAAAAAAAAAAAKSBcg0AAENvbnRlbnRzL1Jlc291cmNlcy9hcHBsZXQuaWNuc1VUBQADH9ZJVnV4CwABBPUBAAAEFAAAAFBLAQIeAxQAAAAIAO1YcEf3WKZWQAAAAGoBAAAeABgAAAAAAAAAAACkgcAUAABDb250ZW50cy9SZXNvdXJjZXMvYXBwbGV0LnJzcmNVVAUAA82cSVZ1eAsAAQT1AQAABBQAAABQSwECHgMKAAAAAADtWHBHAAAAAAAAAAAAAAAAJAAYAAAAAAAAABAA7UFYFQAAQ29udGVudHMvUmVzb3VyY2VzL2Rlc2NyaXB0aW9uLnJ0ZmQvVVQFAAPNnElWdXgLAAEE9QEAAAQUAAAAUEsBAh4DFAAAAAgA7VhwRzPLNU9TAAAAZgAAACsAGAAAAAAAAQAAAKSBthUAAENvbnRlbnRzL1Jlc291cmNlcy9kZXNjcmlwdGlvbi5ydGZkL1RYVC5ydGZVVAUAA82cSVZ1eAsAAQT1AQAABBQAAABQSwECHgMKAAAAAACHgY5IAAAAAAAAAAAAAAAAGwAYAAAAAAAAABAA7UFuFgAAQ29udGVudHMvUmVzb3VyY2VzL1NjcmlwdHMvVVQFAAM9pQ9XdXgLAAEE9QEAAAQUAAAAUEsBAh4DFAAAAAgACYCOSApeZYk1AQAAzAEAACQAGAAAAAAAAAAAAKSBwxYAAENvbnRlbnRzL1Jlc291cmNlcy9TY3JpcHRzL21haW4uc2NwdFVUBQADcaIPV3V4CwABBPUBAAAEFAAAAFBLBQYAAAAADQANANwEAABWGAAAAAA=",f="User did not grant permission.",d="No polkit authentication agent found.",p=134217728},8135:(e,t,r)=>{e.exports=r(1533)},1533:(e,t,r)=>{var n=r(6854),o=/\s/;function i(e,t,r,n){return e>r&&e<n||t>r&&t<n||e<=r&&t>=n}function s(e){var t=e.match(/"/g);if(t&&1!=t.length){var r=[],n=null,o=!1,i=!1,s=0,a=t.length%2==0?t.length:t.length-1,c=null,u=e.split("");return u.forEach((function(e,t){" "!==e?'"'===e?!1===o&&s<=a?(o=!0,s++," "===c||null===c?(i=!0,n=""):n+=e):!0===o&&(o=!1,s++,!0===i?(i=!1,r.push(n),n=null):n+=e):!1!==o||" "!==c&&null!==c?n+=e:n=e:o?n+=e:null!==n&&(r.push(n),n=null),c=e,t==u.length-1&&null!==n&&(r.push(n),n=null)})),r}return e.split(/\s+/)}e.exports.parse=function(e){var t=e.split(/(\r\n)|(\n\r)|\n|\r/),r=[],a={},c=[];t.forEach((function(e){e&&e.trim()&&r.push(e)})),r.forEach((function(e,t){if(0==t){var r=e.split(/\s+/);r.forEach((function(t,n){if(t){var o=a[t]={},i=e.indexOf(t),s=i+t.length;o.titleBegin=0==n?0:i,n==r.length-1?o.titleEnd=e.length-1:o.titleEnd=s}}))}else c[t-1]=e.split("")}));var u=n(c,(function(e){return o.test(e)?-1:1}),!0),l=[];u.domains.sort((function(e,t){return e.bounding.x-t.bounding.x})),u.domains.forEach((function(e){if(1===e.identifier){var t=!1;l.forEach((function(r){var n=e.bounding,o=n.x,s=n.x+n.w;i(o,s,r.begin,r.end)&&(t=!0,r.domains.push(e),r.begin=r.begin>o?o:r.begin,r.end=r.end<s?s:r.end)})),t||l.push({begin:e.bounding.x,end:e.bounding.x+e.bounding.w,domains:[e]})}})),l.forEach((function(e){var t=null,r=null,n=!1,o=null,s=null,c=null;for(t in a)r=a[t],e.begin>r.titleBegin&&(c=e.begin-r.titleBegin,(!s||c<o)&&(s=t,o=c)),i(e.begin,e.end,r.titleBegin,r.titleEnd)&&(n=!0,r.titleBegin=r.titleBegin>e.begin?e.begin:r.titleBegin,r.titleEnd=r.titleEnd<e.end?e.end:r.titleEnd);if(!n&&s){var u=a[s];u.titleBegin=u.titleBegin>e.begin?e.begin:u.titleBegin,u.titleEnd=u.titleEnd<e.end?e.end:u.titleEnd}}));var f=[];return r.forEach((function(e,t){if(t>0){var r={},n=null,o=null,i=null;for(n in a)o=a[n],i=e.substring(o.titleBegin,o.titleEnd+1),r[n]=s(i.trim());f.push(r)}})),f}},3072:(e,t,r)=>{"use strict";const{Readable:n}=r(2781);e.exports=e=>new n({read(){this.push(e),this.push(null)}})},2007:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCompiler=void 0;const n=r(4896),o=r(9144),i=r(5928),s=r(5674);t.BaseCompiler=class{processCodeMacros(e){const t=this.getCommentEqual(e),r=[],i=[];r.push("remove"),this.type()===n.ConfigurationType.Release&&(r.push("debug"),i.push("non-debug")),o.env.config.warcraftVersion===n.WarcraftVersionType.Classic?(r.push("reforge"),i.push("non-reforge")):(r.push("classic"),i.push("non-classic")),e=e.trimRight();for(const n of r)e=e.replace(RegExp(`--\\s*@${n}@`,"g"),`--[${t}[@${n}@`).replace(RegExp(`--\\s*@end-${n}@`,"g"),`--@end-${n}@]${t}]`);for(const t of i)e=e.replace(RegExp(`--\\s*\\[=*\\[@${t}@`,"g"),`--@${t}@`).replace(RegExp(`--\\s*@end-${t}@\\]=*\\]`,"g"),`--@end-${t}@`);return e}getCommentEqual(e){const t=e.match(/\[(=*)\[|\](=*)\]/g),r=new Set(t?t.map((e=>e.length-2)):[]);let n=0;for(;r.has(n);)n++;return"=".repeat(n)}async extractWar3mapJass(e,t){if(!await i.extractFileFromMap(e,t)){if(await i.extractFileFromMap(e,"scripts\\"+t))return!0;throw Error(n.localize("error.noMapScriptFile",`Not found: ${t} file`))}return!1}async injectWar3mapJass(){const e=o.env.asBuildPath(n.globals.FILE_ENTRY_JASS);o.env.config.jassfile&&await s.pathExists(o.env.config.jassfile)?await s.copyFile(o.env.config.jassfile,e):await this.extractWar3mapJass(e,n.globals.FILE_ENTRY_JASS);const t=(await s.readFile(e)).toString().split("\r\n");let r=!1,i=0;for(const e of t){if(e.includes("function main takes nothing returns nothing")&&(r=!0),r&&e.includes("endfunction")){t.splice(i,1,'call Cheat("exec-lua:war3map")',"endfunction");break}i++}if(!r)throw Error(n.localize("error.noMapScriptFileMain","Not found: main function in War3map.j file"));await s.writeFile(e,t.join("\r\n"))}async getOriginMapScript(){let e;return(await s.stat(o.env.mapFolder)).isFile()?(e=o.env.asBuildPath("orig"+n.globals.FILE_ENTRY),await this.extractWar3mapJass(e,n.globals.FILE_ENTRY)):e=o.env.asMapPath(n.globals.FILE_ENTRY),e}}},1498:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.debugCompiler=void 0;const o=r(5674),i=r(1017),s=r(9144),a=r(4896),c=r(3800),u=r(5928),l=r(2007);class f extends l.BaseCompiler{constructor(){super()}type(){return a.ConfigurationType.Debug}async execute(){if(!(await o.stat(s.env.sourceFolder)).isDirectory())throw Error(a.localize("error.noSrcFolder","Not found: source folder"));const e=[...await Promise.all((await u.getAllFiles(s.env.sourceFolder)).filter((e=>!u.isHiddenFile(e)&&u.isLuaFile(e))).map((e=>this.genFile(e))))];if(!s.env.config.classic){const t=await this.getOriginMapScript();e.push(await this.genFile(t,"orig"+a.globals.FILE_ENTRY))}const t=e.join("\n"),r=c.debug.main({code:t,package:s.env.config.lua.package,classic:s.env.config.classic}),n=s.env.asBuildPath(a.globals.FILE_ENTRY);await o.mkdirp(i.dirname(n)),await o.writeFile(n,r),s.env.config.classic&&await this.injectWar3mapJass()}async genFile(e,t){const r=this.processCodeMacros(await u.readFile(e)),n=this.getCommentEqual(r);return t||(t=u.posixCase(i.relative(s.env.sourceFolder,e))),c.debug.file({name:t,comment:n,body:r})}}n([u.report(a.localize("report.compile","Compiling script"))],f.prototype,"execute",null),t.debugCompiler=new f},9228:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(1498),t),o(r(7575),t)},7575:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.releaseCompiler=void 0;const o=r(5674),i=r(1017),s=r(5233),a=r(8225),c=r(5928),u=r(3800),l=r(6378),f=r(9144),d=r(4896),p=r(2007),h=r(8072);class m extends p.BaseCompiler{constructor(){super(),this.files=new Map}type(){return d.ConfigurationType.Release}convert(e){return l.default(e)?{file:e}:e}getMaybeFiles(e){if(e.isRequire){const t=e.file.split(".").filter((e=>""!==e)).join("/");return f.env.config.lua.package.path.map((e=>f.env.asSourcePath(e.replace("?",t))))}return[i.isAbsolute(e.file)?e.file:f.env.asSourcePath(e.file)]}async resolveFile(e){const t=this.getMaybeFiles(e);for(const e of t)if(await o.pathExists(e))return e;if(!f.env.config.classic)throw Error(d.localize("error.notFound","Not found {0}",e.file));return""}async processFiles(...e){await Promise.all(e.map((e=>this.convert(e))).map((async e=>{try{const t=await this.resolveFile(e);if(0===t.length)return;const r=e.name||c.posixCase(i.relative(f.env.sourceFolder,t));if(this.files.has(r))return;const n=this.processCodeMacros(await c.readFile(t));if(this.files.has(r))return;const o=[],u=s.parse(n,{locations:!0,ranges:!0,scope:!0,onCreateNode:e=>{let t;if("CallExpression"===e.type&&"Identifier"===e.base.type&&this.isRequireFunction(e.base.name)){if(1!==e.arguments.length)return;t=e.arguments[0]}else{if("StringCallExpression"!==e.type||"Identifier"!==e.base.type||!this.isRequireFunction(e.base.name))return;t=e.argument}"StringLiteral"===t.type&&o.push({file:t.value,isRequire:"require"===e.base.name})}});this.files.set(r,a.minify(u)),await this.processFiles(...o)}catch(t){throw Error(d.localize("error.processFilesFailure",["Item: "+e.file,"Error: "+t.message,"Stack: "+t.stack].join("\n")))}})))}isRequireFunction(e){switch(e){case"require":case"dofile":case"loadfile":return!0;default:return!1}}async execute(){if(!(await o.stat(f.env.sourceFolder)).isDirectory())throw Error(d.localize("error.noSrcFolder","Not found: source folder"));if(this.files.clear(),await this.processFiles("main.lua",...f.env.config.files),!f.env.config.classic){const e=await this.getOriginMapScript();await this.processFiles({name:"origwar3map.lua",file:e})}const e=[...this.files.entries()].map((([e,t])=>u.release.file({body:t,name:e}))).join("\n");let t=u.release.main({code:e,package:f.env.config.lua.package,classic:f.env.config.classic});t=f.env.config.codeConfusion?a.minify(h.SimpleConfuser.parse(t)):a.minify(t);const r=f.env.asBuildPath(d.globals.FILE_ENTRY);await o.mkdirp(i.dirname(r)),await o.writeFile(r,t),f.env.config.classic&&await this.injectWar3mapJass()}}n([c.report(d.localize("report.compile","Compiling script"))],m.prototype,"execute",null),t.releaseCompiler=new m},7541:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(6242),t)},6242:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.objediting=t.ObjEditing=void 0;const n=r(5674),o=r(7070),i=r(1017),s=r(5928),a=r(9144),c=r(3469),u=r(4896);class l{constructor(){this.checkDefine()}async checkDefine(){if(!c.runtime.workspaceFolders||c.runtime.workspaceFolders.length>1)return;const e=i.resolve(c.runtime.extensionFolder,u.globals.FILE_PROJECT);await n.pathExists(e)&&await this.readProjectVersion()!==await this.readCurrentVersion()&&this.updateDefine()}async updateDefine(){await s.extractFile(await o.fromBuffer(await n.readFile(a.env.asExetensionPath("res/def.zip"))),a.env.asRootPath(".def"))}async readCurrentVersion(){const e=await n.readJson(a.env.asExetensionPath("res/.version.json"));return e&&e.def||""}async readProjectVersion(){const e=a.env.asRootPath(".def/.version");if(await n.pathExists(e))return(await s.readFile(e)).trim()}async prepareObjectFiles(){const e=a.env.asBuildPath("objediting.source");await n.emptyDir(e);const t=["w3u","w3t","w3b","w3h","w3d","w3a","w3q"];for(const r of t){const t="war3map."+r;if(a.env.config.classic)await s.extractFileFromMap(i.join(e,t),t);else{const r=i.join(a.env.mapFolder,t);await n.pathExists(r)&&await n.copy(r,i.join(e,t))}}return e}async execute(){const e=a.env.asRootPath("objediting/main.lua");if(!await n.pathExists(e))return;await a.env.checkMapFolder();const t=a.env.asBuildPath("objediting");await n.emptyDir(t);const r=await this.prepareObjectFiles();await s.execFile(a.env.asExetensionPath("bin/ObjEditing.exe"),["-m",r,"-o",t,e])}}t.ObjEditing=l,t.objediting=new l},2392:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(1867),t)},1867:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(t,"__esModule",{value:!0}),t.releasePacker=t.debugPacker=void 0;const o=r(1017),i=r(5674),s=r(5928),a=r(9144),c=r(4896);class u{constructor(e){this._type=e}type(){return this._type}async generatePackList(){const e=[],t=await i.readdir(a.env.asSourcePath(c.globals.FOLDER_LIBRARIES)),r=[c.globals.FOLDER_IMPORTS,`${c.globals.FOLDER_IMPORTS}.${c.ConfigurationType[this.type()].toLowerCase()}`,`${c.globals.FOLDER_IMPORTS}.${c.WarcraftVersionType[a.env.config.warcraftVersion].toLowerCase()}`];e.push(...await this.generatePackItems(a.env.mapFolder,(e=>!s.isLuaFile(e))));for(const n of r){for(const r of t)e.push(...await this.generatePackItems(a.env.asSourcePath(c.globals.FOLDER_LIBRARIES,r,n)));e.push(...await this.generatePackItems(a.env.asRootPath(n)))}e.push(...await this.generatePackItems(a.env.asBuildPath("objediting"))),e.push([c.globals.FILE_ENTRY,a.env.asBuildPath(c.globals.FILE_ENTRY)]),a.env.config.classic&&e.push([c.globals.FILE_ENTRY_JASS,a.env.asBuildPath(c.globals.FILE_ENTRY_JASS)]);const n=new Set;await i.writeFile(a.env.asBuildPath(c.globals.FILE_PACKLIST),JSON.stringify(e.reduceRight(((e,t)=>(n.has(t[0])?console.log(t[0],t[1]):(n.add(t[0]),e.push(t)),e)),[])))}async packByPackList(){const e=[];a.env.config.classic?(await i.copy(a.env.mapFolder,a.env.outFilePath),e.push("pack"),e.push("-m",a.env.outFilePath),e.push("-i",a.env.asBuildPath(c.globals.FILE_PACKLIST))):(e.push("generate"),this.type()===c.ConfigurationType.Debug&&e.push("-f"),e.push("-o",a.env.outFilePath),e.push("-i",a.env.asBuildPath(c.globals.FILE_PACKLIST))),await s.execFile(a.env.asExetensionPath("bin/MopaqPack-rs.exe"),e)}async execute(){await this.generatePackList(),await this.packByPackList()}async generatePackItems(e,t){if(!await i.pathExists(e)||!(await i.stat(e)).isDirectory())return[];let r=(await s.getAllFiles(e)).filter((e=>!s.isHiddenFile(e)));return t&&(r=r.filter(t)),r.map((t=>this.generatePackItem(t,e)))}generatePackItem(e,t){return[o.relative(t,e),e]}}n([s.report(c.localize("report.pack","Packing map"))],u.prototype,"execute",null),t.debugPacker=new u(c.ConfigurationType.Debug),t.releasePacker=new u(c.ConfigurationType.Release)},323:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;const n=r(1017),o=r(5674),i=r(5928),s=r(3469),a=r(7771),c=r(6378),u=r(3505),l=r(9360),f=r(7514),d=r(4896);t.Config=class{constructor(){this.defaultConfig={files:[],lua:{package:{path:["./?.lua","./?/init.lua"]}}},this.projectConfig=this.defaultConfig,s.runtime.inVscode&&this.reload()}reload(){return this.waiter=this.waiter||new Promise((e=>{this.readProjectConfig().then((t=>{this.projectConfig=t||this.defaultConfig,e()})).finally((()=>{this.waiter=void 0}))}))}async waitLoaded(){this.waiter&&await this.waiter}get config(){return s.runtime.getConfiguration("warcraft")}async readProjectConfig(){var e,t;if(!s.runtime.workspaceFolder)return;const r=n.resolve(s.runtime.workspaceFolder,d.globals.FILE_PROJECT);if(!await o.pathExists(r))return;if(!(await o.stat(r)).isFile())return;const i=await o.readJson(r);return f.default(i)?{mapdir:i.mapdir,files:i.files||[],jassfile:i.jassfile,lua:{package:{path:[...(null===(t=null===(e=i.lua)||void 0===e?void 0:e.package)||void 0===t?void 0:t.path)||["./?.lua","./?/init.lua"]]}}}:void 0}get gamePath(){var e;const t=null===(e=this.config)||void 0===e?void 0:e.get(this.classic?"gamePathClassic":"gamePath");if(!t)throw Error(d.localize("error.noGamePath","Not found: Warcraft III.exe"));return t}set gamePath(e){var t;null===(t=this.config)||void 0===t||t.update(this.classic?"gamePathClassic":"gamePath",e,s.ConfigurationTarget.Global)}get wePath(){var e;const t=null===(e=this.config)||void 0===e?void 0:e.get(this.classic?"wePathClassic":"wePath");if(!t)throw Error(d.localize("error.noEditorPath","Not found: World Editor.exe"));return t}set wePath(e){var t;null===(t=this.config)||void 0===t||t.update(this.classic?"wePathClassic":"wePath",e,s.ConfigurationTarget.Global)}get kkwePath(){var e;const t=null===(e=this.config)||void 0===e?void 0:e.get("kkwePath");if(!t)throw Error(d.localize("error.noKKWEPath","Not found: YDWEConfig.exe"));return t}set kkwePath(e){var t;null===(t=this.config)||void 0===t||t.update("kkwePath",e,s.ConfigurationTarget.Global)}parseArguments(e){const t=[];for(const r of e){let e=r;for(;e.length>0;){const n=e.startsWith('"'),o=e.indexOf(n?'"':" ",n?1:0);if(o<0){if(n)throw Error(d.localize("error.invalidGameArgs",`Invalid argument with qoutes ${r}`));t.push(e);break}t.push(e.substr(0,n?o+1:o)),e=e.substr(o+1)}}return t}get gameArgs(){var e;const t=(null===(e=this.config)||void 0===e?void 0:e.get(this.classic?"gameArgsClassic":"gameArgs"))||[];return this.parseArguments(t)}get weArgs(){var e;const t=(null===(e=this.config)||void 0===e?void 0:e.get(this.classic?"weArgsClassic":"weArgs"))||[];return this.parseArguments(t)}get autoCloseClient(){var e;return(null===(e=this.config)||void 0===e?void 0:e.get("autoCloseClient"))||!1}set autoCloseClient(e){var t;null===(t=this.config)||void 0===t||t.update("autoCloseClient",e,s.ConfigurationTarget.Global)}get configuration(){var e;return this.config?d.ConfigurationType[(null===(e=this.config)||void 0===e?void 0:e.get("configuration"))||""]||d.ConfigurationType.Debug:this.isRelease?d.ConfigurationType.Release:d.ConfigurationType.Debug}set configuration(e){var t;null===(t=this.config)||void 0===t||t.update("configuration",d.ConfigurationType[e],s.ConfigurationTarget.Workspace)}get warcraftVersion(){var e;return d.WarcraftVersionType[(null===(e=this.config)||void 0===e?void 0:e.get("warcraftVersion"))||""]||d.WarcraftVersionType.Reforge}set warcraftVersion(e){var t;null===(t=this.config)||void 0===t||t.update("warcraftVersion",d.WarcraftVersionType[e],s.ConfigurationTarget.Workspace)}get classic(){return this.config?this.warcraftVersion===d.WarcraftVersionType.Classic:1==this.isClassic}get codeConfusion(){var e;return(null===(e=this.config)||void 0===e?void 0:e.get("codeConfusion"))||!1}set codeConfusion(e){var t;null===(t=this.config)||void 0===t||t.update("codeConfusion",e,s.ConfigurationTarget.Global)}get mapDir(){if(!this.projectConfig.mapdir)throw Error(d.localize("error.noMapFolder","Not found: map folder"));return this.projectConfig.mapdir}set mapDir(e){if(!s.runtime.workspaceFolder)return;this.projectConfig.mapdir=e;const t=s.runtime.workspaceFolder;o.writeFile(n.resolve(t,d.globals.FILE_PROJECT),JSON.stringify(this.projectConfig,void 0,2))}get files(){return this.projectConfig.files}get jassfile(){return s.runtime.workspaceFolder&&this.projectConfig.jassfile?n.resolve(s.runtime.workspaceFolder,this.projectConfig.jassfile):null}get lua(){return this.projectConfig.lua}get libraryOrganizations(){var e;const t=null===(e=this.config)||void 0===e?void 0:e.get("libraryOrganizations");if(!t||!a.default(t))return;const r=t.map((e=>i.pick(e,{name:c.default,type:e=>l.default(e)||c.default(e)&&("user"===e||"organization"===e),ssh:e=>l.default(e)||u.default(e)}))).filter((e=>e.name));return r.length>0?r:void 0}}},6661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.env=void 0;const n=r(1017),o=r(5674),i=r(323),s=r(3469),a=r(4896);t.env=new class{constructor(){this.config=new i.Config,this.extensionFolder=s.runtime.extensionFolder}asExetensionPath(...e){if(!this.extensionFolder)throw Error(a.localize("error.noExtFolder","Not found: Extension Folder"));return n.resolve(this.extensionFolder,...e)}asMapPath(...e){return n.resolve(this.mapFolder,...e)}asBuildPath(...e){return n.resolve(this.buildFolder,...e)}asGamePath(...e){return n.resolve(n.dirname(this.config.gamePath),...e)}asRootPath(...e){if(!this.rootPath)throw Error(a.localize("error.notProject","Not Warcraft III project"));return n.resolve(this.rootPath,...e)}asSourcePath(...e){return this.asRootPath(a.globals.FOLDER_SOURCE,...e)}asKKWEPath(...e){return n.resolve(n.dirname(this.config.kkwePath),...e)}get rootPath(){return s.runtime.workspaceFolder}get sourceFolder(){return this.asRootPath(a.globals.FOLDER_SOURCE)}get mapFolder(){return this.asRootPath(this.config.mapDir)}get buildFolder(){return this.asRootPath(a.globals.FOLDER_BUILD)}get outFilePath(){const e=(this.config.configuration===a.ConfigurationType.Release?a.globals.FILE_RELEASE_MAP:a.globals.FILE_DEBUG_MAP)+this.mapExtName;return this.asBuildPath(e)}get mapExtName(){return n.extname(this.config.mapDir)}async productDB(){let e=t.env.asGamePath();for(let t=0;t<3;t++){const t=n.resolve(e,".product.db");if(await o.pathExists(t))return t;e=n.resolve(e,"../")}return""}async checkMapFolder(){const e=this.mapFolder;if(t.env.config.classic&&!(await o.stat(e)).isFile())throw Error(a.localize("error.invalidMapFile","Classic version ONLY support .w3x/.w3m format map file."))}}},9144:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(6661),t)},3469:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.runtime=t.ProgressLocation=t.ConfigurationTarget=void 0;const n=r(2602),o=r(1017);var i,s;(s=t.ConfigurationTarget||(t.ConfigurationTarget={}))[s.Global=1]="Global",s[s.Workspace=2]="Workspace",s[s.WorkspaceFolder=3]="WorkspaceFolder",(i=t.ProgressLocation||(t.ProgressLocation={}))[i.SourceControl=1]="SourceControl",i[i.Window=10]="Window",i[i.Notification=15]="Notification",t.runtime=new class{constructor(){Promise.resolve().then((()=>r(9496))).then((e=>this.vscode=e)).catch((()=>this.vscode=void 0))}get workspace(){var e;return null===(e=this.vscode)||void 0===e?void 0:e.workspace}getConfiguration(e,t){var r;return null===(r=this.workspace)||void 0===r?void 0:r.getConfiguration(e,t)}get workspaceFolders(){var e;return null===(e=this.workspace)||void 0===e?void 0:e.workspaceFolders}get workspaceFolder(){return this.workspaceFolders?this.workspaceFolders[0].uri.fsPath:this.rootPath}get extensionFolder(){var e,t;let r=null===(t=null===(e=this.vscode)||void 0===e?void 0:e.extensions.getExtension(n.globals.EXTENSION_ID))||void 0===t?void 0:t.extensionPath;return r||(r=o.resolve(__dirname,"../")),r}get inVscode(){return null!=this.vscode}showWarningMessage(e,...t){var r;return this.vscode||console.error(e,...t),null===(r=this.vscode)||void 0===r?void 0:r.window.showWarningMessage(e,...t)}withProgress(e,t){var r;return null===(r=this.vscode)||void 0===r?void 0:r.window.withProgress(e,t)}showInformationMessage(e,t,...r){var n;return null===(n=this.vscode)||void 0===n?void 0:n.window.showInformationMessage(e,t,...r)}showOpenDialog(e){var t;return null===(t=this.vscode)||void 0===t?void 0:t.window.showOpenDialog(e)}showQuickPick(e,t,r){var n;return null===(n=this.vscode)||void 0===n?void 0:n.window.showQuickPick(e,t,r)}executeCommand(e,...t){var r;return null===(r=this.vscode)||void 0===r?void 0:r.commands.executeCommand(e,...t)}}},2602:(e,t)=>{"use strict";var r,n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.WarcraftVersionType=t.ConfigurationType=t.globals=void 0,(o=t.globals||(t.globals={})).LUA=".lua",o.TEMPLATE_URL="https://github.com/warcraft-iii/warcraft-template/archive/master.zip",o.TEMPLATE_CLASSIC_URL="https://github.com/warcraft-iii/warcraft-template-classic/archive/main.zip",o.EXTENSION_ID="Dencer.warcraft-vscode",o.FILE_DEBUG_MAP="_warcraft_vscode_test",o.FILE_RELEASE_MAP="release",o.FILE_ENTRY="war3map.lua",o.FILE_ENTRY_JASS="war3map.j",o.FILE_ENTRY_SCRIPTS_JASS="scripts\\war3map.j",o.FILE_PACKLIST="packlist.json",o.FILE_PROJECT="warcraft.json",o.FOLDER_BUILD=".build",o.FOLDER_IMPORTS="imports",o.FOLDER_LIBRARIES="lib",o.FOLDER_SOURCE="src",o.MAP_FILE_EXT="*.w3x|*.w3m",o.FILE_KKWE_CONFIG="bin/YDWEConfig.exe",(n=t.ConfigurationType||(t.ConfigurationType={}))[n.Debug=0]="Debug",n[n.Release=1]="Release",(r=t.WarcraftVersionType||(t.WarcraftVersionType={}))[r.Reforge=0]="Reforge",r[r.Classic=1]="Classic"},4896:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(2602),t),o(r(2814),t)},2814:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localize=void 0;const n=r(8472);t.localize=n.loadMessageBundle()},3800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.release=t.debug=void 0;const n=r(1613),o=r(2702),i=r(9942),s=r(2835);var a,c;(c=t.debug||(t.debug={})).main=n,c.file=o,(a=t.release||(t.release={})).main=i,a.file=s},8072:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleConfuser=void 0;const n=r(5233);t.SimpleConfuser=class{static stringToByteString(e){const t=Buffer.from(e);let r="";for(const e of t)r+=`\\x${e.toString(16).padStart(2,"0")}`;return r}static formatExpression(e){if(e)switch(e.type){case"FunctionDeclaration":this.formatStatementList(e.body);break;case"Identifier":case"NumericLiteral":case"BooleanLiteral":case"NilLiteral":case"VarargLiteral":break;case"StringLiteral":e.raw="'"+this.stringToByteString(e.value)+"'";break;case"TableConstructorExpression":e.fields.forEach((e=>{"TableKey"===e.type&&this.formatExpression(e.key),this.formatExpression(e.value)}));break;case"BinaryExpression":case"LogicalExpression":this.formatExpression(e.left),this.formatExpression(e.right);break;case"UnaryExpression":this.formatExpression(e.argument);break;case"MemberExpression":case"CallExpression":case"TableCallExpression":this.formatExpression(e.base);break;case"IndexExpression":this.formatExpression(e.base),this.formatExpression(e.index);break;case"StringCallExpression":this.formatExpression(e.base),this.formatExpression(e.argument)}}static formatExpressionList(e){e&&e.forEach((e=>{this.formatExpression(e)}))}static formatStatementList(e){e&&e.forEach((e=>{try{this.formatStatement(e)}catch(e){console.log(e)}}))}static formatStatement(e){if(e)switch(e.type){case"LabelStatement":case"BreakStatement":case"GotoStatement":break;case"ReturnStatement":e.arguments.forEach((e=>{this.formatExpression(e)}));break;case"IfStatement":e.clauses.forEach((e=>{this.formatStatementList(e.body)}));break;case"WhileStatement":case"RepeatStatement":this.formatExpression(e.condition),this.formatStatementList(e.body);break;case"DoStatement":case"FunctionDeclaration":this.formatStatementList(e.body);break;case"LocalStatement":this.formatExpressionList(e.init);break;case"AssignmentStatement":e.variables.forEach((e=>{"IndexExpression"===e.type&&this.formatExpression(e.index)})),this.formatExpressionList(e.init);break;case"CallStatement":this.formatExpression(e.expression);break;case"ForNumericStatement":this.formatExpression(e.start),this.formatExpression(e.end),e.step&&this.formatExpression(e.step);break;case"ForGenericStatement":this.formatExpressionList(e.iterators),this.formatStatementList(e.body)}}static parse(e){const t=n.parse(e);return this.formatStatementList(t.body),t}}},7238:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=t.once=void 0;const n=r(2807),o=r(9111);t.once=function(e,t,r){return r.value&&(r.value=n.default(r.value)),r},t.debounce=function(e){return(t,r,n)=>(n.value&&(n.value=o.default(n.value,e)),n)}},5928:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(974),t),o(r(2967),t),o(r(5951),t),o(r(7238),t)},5951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.execFile=t.spawn=t.Process=void 0;const n=r(2081),o=r(974),i=r(3837),s=r(1922),a=r(7012),c=r(7566);class u{constructor(e,t,r){this.childprocess=void 0,this.process=n.spawn(e,t,{detached:!0});const o=()=>{r&&this.checkChildProcess(),this.process=void 0};this.process.on("exit",o),this.process.on("close",o)}checkChildProcess(){this.process&&s.lookup({ppid:this.process.pid},((e,t)=>{e||1!==t.length||(this.childprocess=t[0])}))}async kill(){if(this.process)for(this.process.kill();this.process;)await o.sleep(100);if(this.childprocess){let e;for(e="win32"===process.platform?"taskkill /f /pid ":"kill -9 ",a.exec(e+this.childprocess.pid,{name:"Warcraft VSCode"},(()=>{this.childprocess=void 0}));this.childprocess;)await o.sleep(100)}}isAlive(){return!!this.process||!!this.childprocess&&c(this.childprocess.pid)}}t.Process=u,t.spawn=function(e,t,r){return new u(e,t,r)};const l=i.promisify(n.execFile);t.execFile=async function(e,t){let r,n;try{let{stdout:o,stderr:i}=await l(e,t);o=o.trim(),i=i.trim(),i?(r=!1,n=i):(r=!0,n=o)}catch(e){r=!1,n=e.message}if(!r)throw Error(n);return n}},2967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withReport=t.report=void 0;const n=r(3469),o=r(974),i=new class{constructor(){this.enabled=!1}wait(){return new Promise((e=>{this.resolver?e():n.runtime.withProgress({cancellable:!1,location:n.ProgressLocation.Notification,title:"[Warcraft vscode] "},(async t=>{this.reporter=t,await new Promise((t=>{this.resolver=t,e()})),this.reporter=void 0}))}))}async report(e){this.enabled&&(await this.wait(),this.reporter&&this.reporter.report({message:e}),await o.sleep(100))}enter(){this.enabled=!0}leave(){this.resolver&&this.resolver(),this.resolver=void 0,this.reporter=void 0,this.enabled=!1}};t.report=function(e){return(t,r,n)=>{const o=n.value;return n.value=async function(...t){return await i.report(e),await o.apply(this,t)},n}},t.withReport=async function(e){i.enter();try{await e()}catch(e){throw e}finally{i.leave()}}},974:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractFileFromMap=t.downloadZip=t.extractFile=t.pick=t.confirm=t.posixCase=t.readFile=t.isHiddenFile=t.isLuaFile=t.sleep=t.getAllFiles=t.ConfirmResult=void 0;const n=r(5674),o=r(1017),i=r(6921),s=r(7070),a=r(6930),c=r(9144),u=r(3469),l=r(5951);async function f(e,t,r,i){const s=(await n.readdir(e)).map((t=>o.resolve(e,t)));for(const e of s)(await n.stat(e)).isDirectory()?(i&&await f(e,t,r,i),r&&t.push(e)):r||t.push(e);return t}var d;function p(e){return".lua"===o.extname(e).toLowerCase()}!function(e){e[e.Cancel=0]="Cancel",e[e.Ok=1]="Ok",e[e.Alt=2]="Alt"}(d=t.ConfirmResult||(t.ConfirmResult={})),t.getAllFiles=function(e,t=!1,r=!0){return f(e,[],t,r)},t.sleep=function(e){return new Promise((t=>setTimeout((()=>t()),e)))},t.isLuaFile=p,t.isHiddenFile=function(e){const t=o.basename(e);return!!t.startsWith(".")||!(!p(e)||!t.startsWith("@"))},t.readFile=function(e){return n.readFile(e,{encoding:"utf-8"})},t.posixCase=function(e){return e.split(o.normalize(o.sep)).join(o.posix.sep)},t.confirm=async function(e,t="Ok",r){const n=[{title:t,value:d.Ok}];r&&n.push({title:r,value:d.Alt});const o=await u.runtime.showInformationMessage(e,{modal:!0},...n);return o?o.value:d.Cancel},t.pick=function(e,t){return a.default(e,((e,r)=>!!t[r]&&t[r](e)))},t.extractFile=async function(e,t,r){let i;if("string"==typeof t){const e=t;i=t=>o.resolve(e,r?o.relative(r,t.fileName):t.fileName)}else i=t;await e.walkEntries((e=>{if(!e.fileName.endsWith("/"))return new Promise(((t,r)=>{const s=i(e);n.mkdirp(o.dirname(s)).then((()=>e.openReadStream())).then((e=>e.pipe(n.createWriteStream(s)).on("close",(()=>t())).on("error",(e=>r(e)))))}))}))},t.downloadZip=async function(e){return await s.fromBuffer((await i(e,{encoding:null})).body)},t.extractFileFromMap=async function(e,t){return await n.remove(e),await n.mkdirp(o.dirname(e)),await l.execFile(c.env.asExetensionPath("bin/MopaqPack-rs.exe"),["extract","-o",e,"-m",c.env.mapFolder,"-f",t]),await n.pathExists(e)}},2702:module=>{module.exports=function(obj){obj||(obj={});var __t,__p="",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)print(`P['${name}'] = [${comment}[${body}]${comment}]`),__p+="\r\n";return __p}},1613:module=>{module.exports=function(obj){obj||(obj={});var __t,__p="",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+="package = {}\r\npackage.path = '",print(package.path.join(";")),__p+="'\r\n\r\nlocal P\r\ndo\r\n local preloadType, preload, _errorhandler\r\n do\r\n preloadType = 'string'\r\n preload = load\r\n _errorhandler = function(msg)\r\n return print(msg)\r\n end\r\n end\r\n\r\n local _G = _G\r\n local package = package\r\n local string, table = string, table\r\n local error, xpcall, type, setmetatable, tostring, ipairs, load = error, xpcall, type, setmetatable, tostring,\r\n ipairs, load\r\n\r\n local _FILES = {}\r\n local _LOADED_MODULES = {}\r\n local _LOADED_FILES = {}\r\n local _LOADING_FILES = {}\r\n\r\n local function errorhandler(msg)\r\n if _errorhandler and msg then\r\n return _errorhandler(msg)\r\n end\r\n end\r\n\r\n local function resolvefile(module)\r\n module = module:gsub('[./\\\\]+', '/')\r\n\r\n for item in package.path:gmatch('[^;]+') do\r\n local filename = item:gsub('^%.[/\\\\]+', ''):gsub('%?', module)\r\n if _FILES[filename] then\r\n return filename\r\n end\r\n end\r\n end\r\n\r\n local function compilefile(filename, mode, env, level)\r\n local code = _FILES[filename]\r\n if not code then\r\n error(string.format('cannot open %s: No such file or directory', filename), (level or 1) + 1)\r\n end\r\n return preload(code, '@' .. filename, mode, env or _G)\r\n end\r\n\r\n ",classic||print("--[==["),__p+="\r\n local orgRequire = require\r\n ",classic||print("]==]--"),__p+="\r\n\r\n function require(module)\r\n local loaded = _LOADED_MODULES[module]\r\n if loaded then\r\n return loaded\r\n end\r\n\r\n local filename = resolvefile(module)\r\n if not filename then\r\n ",classic||print("--[==["),__p+="\r\n if orgRequire then\r\n return orgRequire(module)\r\n end\r\n ",classic||print("]==]--"),__p+="\r\n error(string.format('module \\'%s\\' not found', module), 2)\r\n end\r\n\r\n loaded = _LOADED_FILES[filename]\r\n if loaded then\r\n return loaded\r\n end\r\n\r\n if _LOADING_FILES[filename] then\r\n error('critical dependency', 2)\r\n end\r\n\r\n local f, err = compilefile(filename, nil, nil, 2)\r\n if not f then\r\n error(err, 2)\r\n end\r\n\r\n _LOADING_FILES[filename] = true\r\n local ok, ret = xpcall(f, errorhandler, module, filename)\r\n _LOADING_FILES[filename] = false\r\n if not ok then\r\n error()\r\n end\r\n\r\n ret = ret or true\r\n\r\n _LOADED_MODULES[module] = ret\r\n _LOADED_FILES[filename] = ret\r\n\r\n return ret\r\n end\r\n\r\n function loadfile(filename, mode, env)\r\n return compilefile(filename, mode, env, 2)\r\n end\r\n\r\n function dofile(filename)\r\n compilefile(filename, nil, nil, 2)()\r\n end\r\n\r\n function seterrorhandler(handler)\r\n if type(handler) ~= 'function' then\r\n error(string.format('bad argument #1 to `seterrorhandler` (function expected, got %s)', type(handler)), 2)\r\n end\r\n _errorhandler = handler\r\n end\r\n\r\n function geterrorhandler()\r\n return _errorhandler\r\n end\r\n\r\n -- hook for errorhandler\r\n do\r\n local function tryreturn(ok, ...)\r\n if ok then\r\n return ...\r\n end\r\n end\r\n\r\n local function generate(index, count)\r\n local args = {}\r\n for i = 1, count do\r\n table.insert(args, 'ARG' .. i)\r\n end\r\n args = table.concat(args, ',')\r\n\r\n local code = [[\r\nlocal o, r, e = ...\r\nreturn function({ARGS})\r\n if type(ARG{N}) == 'function' then\r\n local c = ARG{N}\r\n ARG{N} = function(...)\r\n return r(xpcall(c, e, ...))\r\n end\r\n end\r\n return o({ARGS})\r\nend\r\n]]\r\n code = code:gsub('{N}', tostring(index)):gsub('{ARGS}', args)\r\n\r\n return load(code)\r\n end\r\n\r\n local apis = {\r\n {'TimerStart', 4, 4}, {'ForGroup', 2, 2}, {'ForForce', 2, 2}, {'Condition', 1, 1}, {'Filter', 1, 1},\r\n {'EnumDestructablesInRect', 3, 3}, {'EnumItemsInRect', 3, 3}, {'TriggerAddAction', 2, 2},\r\n }\r\n\r\n for _, v in ipairs(apis) do\r\n local name, index, count = v[1], v[2], v[3]\r\n _G[name] = generate(index, count)(_G[name], tryreturn, errorhandler)\r\n end\r\n end\r\n\r\n P = setmetatable({}, {\r\n __newindex = function(t, k, v)\r\n if type(v) ~= preloadType then\r\n error('PRELOADED value must be ' .. preloadType)\r\n end\r\n _FILES[k] = v\r\n end,\r\n __index = function(t, k)\r\n error('Can`t read')\r\n end,\r\n __metatable = false,\r\n })\r\nend\r\n\r\n"+(null==(__t=code)?"":__t)+"\r\n",classic&&print("--[==["),__p+="\r\ndofile('origwar3map.lua')\r\nlocal __main = main\r\n",classic&&print("]==]--"),__p+="\r\nfunction main()\r\n xpcall(function()\r\n ",classic&&print("--[==["),__p+="\r\n __main()\r\n ",classic&&print("]==]--"),__p+="\r\n dofile('main.lua')\r\n end, function(msg)\r\n local handler = geterrorhandler()\r\n if handler and msg then\r\n return handler(msg)\r\n end\r\n end)\r\nend\r\n\r\n",classic||print("--[==["),__p+="\r\nmain()\r\n",classic||print("]==]--"),__p+="\r\n";return __p}},2835:module=>{module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+="P['"+(null==(__t=name)?"":__t)+"'] = function(_ENV, ...)\r\n"+(null==(__t=body)?"":__t)+"\r\nend\r\n";return __p}},9942:module=>{module.exports=function(obj){obj||(obj={});var __t,__p="",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+="package = {}\r\npackage.path = '",print(package.path.join(";")),__p+="'\r\n\r\nlocal P\r\ndo\r\n local preloadType, preload, _errorhandler\r\n do\r\n preloadType = 'function'\r\n preload = function(chunk, _, _, env)\r\n return function(...)\r\n return chunk(env or _G, ...)\r\n end\r\n end\r\n end\r\n\r\n local _G = _G\r\n local package = package\r\n local string, table = string, table\r\n local error, xpcall, type, setmetatable, tostring, ipairs, load = error, xpcall, type, setmetatable, tostring,\r\n ipairs, load\r\n\r\n local _FILES = {}\r\n local _LOADED_MODULES = {}\r\n local _LOADED_FILES = {}\r\n local _LOADING_FILES = {}\r\n\r\n local function errorhandler(msg)\r\n if _errorhandler and msg then\r\n return _errorhandler(msg)\r\n end\r\n end\r\n\r\n local function resolvefile(module)\r\n module = module:gsub('[./\\\\]+', '/')\r\n\r\n for item in package.path:gmatch('[^;]+') do\r\n local filename = item:gsub('^%.[/\\\\]+', ''):gsub('%?', module)\r\n if _FILES[filename] then\r\n return filename\r\n end\r\n end\r\n end\r\n\r\n local function compilefile(filename, mode, env, level)\r\n local code = _FILES[filename]\r\n if not code then\r\n error(string.format('cannot open %s: No such file or directory', filename), (level or 1) + 1)\r\n end\r\n return preload(code, '@' .. filename, mode, env or _G)\r\n end\r\n\r\n ",classic||print("--[==["),__p+="\r\n local orgRequire = require\r\n ",classic||print("]==]--"),__p+="\r\n\r\n function require(module)\r\n local loaded = _LOADED_MODULES[module]\r\n if loaded then\r\n return loaded\r\n end\r\n\r\n local filename = resolvefile(module)\r\n if not filename then\r\n ",classic||print("--[==["),__p+="\r\n if orgRequire then\r\n return orgRequire(module)\r\n end\r\n ",classic||print("]==]--"),__p+="\r\n error(string.format('module \\'%s\\' not found', module), 2)\r\n end\r\n\r\n loaded = _LOADED_FILES[filename]\r\n if loaded then\r\n return loaded\r\n end\r\n\r\n if _LOADING_FILES[filename] then\r\n error('critical dependency', 2)\r\n end\r\n\r\n local f, err = compilefile(filename, nil, nil, 2)\r\n if not f then\r\n error(err, 2)\r\n end\r\n\r\n _LOADING_FILES[filename] = true\r\n local ok, ret = xpcall(f, errorhandler, module, filename)\r\n _LOADING_FILES[filename] = false\r\n if not ok then\r\n error()\r\n end\r\n\r\n ret = ret or true\r\n\r\n _LOADED_MODULES[module] = ret\r\n _LOADED_FILES[filename] = ret\r\n\r\n return ret\r\n end\r\n\r\n function loadfile(filename, mode, env)\r\n return compilefile(filename, mode, env, 2)\r\n end\r\n\r\n function dofile(filename)\r\n compilefile(filename, nil, nil, 2)()\r\n end\r\n\r\n function seterrorhandler(handler)\r\n if type(handler) ~= 'function' then\r\n error(string.format('bad argument #1 to `seterrorhandler` (function expected, got %s)', type(handler)), 2)\r\n end\r\n _errorhandler = handler\r\n end\r\n\r\n function geterrorhandler()\r\n return _errorhandler\r\n end\r\n\r\n -- hook for errorhandler\r\n do\r\n local function tryreturn(ok, ...)\r\n if ok then\r\n return ...\r\n end\r\n end\r\n\r\n local function generate(index, count)\r\n local args = {}\r\n for i = 1, count do\r\n table.insert(args, 'ARG' .. i)\r\n end\r\n args = table.concat(args, ',')\r\n\r\n local code = [[\r\nlocal o, r, e = ...\r\nreturn function({ARGS})\r\n if type(ARG{N}) == 'function' then\r\n local c = ARG{N}\r\n ARG{N} = function(...)\r\n return r(xpcall(c, e, ...))\r\n end\r\n end\r\n return o({ARGS})\r\nend\r\n]]\r\n code = code:gsub('{N}', tostring(index)):gsub('{ARGS}', args)\r\n\r\n return load(code)\r\n end\r\n\r\n local apis = {\r\n {'TimerStart', 4, 4}, {'ForGroup', 2, 2}, {'ForForce', 2, 2}, {'Condition', 1, 1}, {'Filter', 1, 1},\r\n {'EnumDestructablesInRect', 3, 3}, {'EnumItemsInRect', 3, 3}, {'TriggerAddAction', 2, 2},\r\n }\r\n\r\n for _, v in ipairs(apis) do\r\n local name, index, count = v[1], v[2], v[3]\r\n _G[name] = generate(index, count)(_G[name], tryreturn, errorhandler)\r\n end\r\n end\r\n\r\n P = setmetatable({}, {\r\n __newindex = function(t, k, v)\r\n if type(v) ~= preloadType then\r\n error('PRELOADED value must be ' .. preloadType)\r\n end\r\n _FILES[k] = v\r\n end,\r\n __index = function(t, k)\r\n error('Can`t read')\r\n end,\r\n __metatable = false,\r\n })\r\nend\r\n\r\n"+(null==(__t=code)?"":__t)+"\r\n",classic&&print("--[==["),__p+="\r\ndofile('origwar3map.lua')\r\nlocal __main = main\r\n",classic&&print("]==]--"),__p+="\r\nfunction main()\r\n xpcall(function()\r\n ",classic&&print("--[==["),__p+="\r\n __main()\r\n ",classic&&print("]==]--"),__p+="\r\n dofile('main.lua')\r\n end, function(msg)\r\n local handler = geterrorhandler()\r\n if handler and msg then\r\n return handler(msg)\r\n end\r\n end)\r\nend\r\n\r\n",classic||print("--[==["),__p+="\r\nmain()\r\n",classic||print("]==]--"),__p+="\r\n";return __p}},8981:(e,t)=>{"use strict";t.E=function(e){return Object.defineProperty((function(){if("function"!=typeof arguments[arguments.length-1])return new Promise(((t,r)=>{arguments[arguments.length]=(e,n)=>{if(e)return r(e);t(n)},arguments.length++,e.apply(this,arguments)}));e.apply(this,arguments)}),"name",{value:e.name})},t.p=function(e){return Object.defineProperty((function(){const t=arguments[arguments.length-1];if("function"!=typeof t)return e.apply(this,arguments);e.apply(this,arguments).then((e=>t(null,e)),t)}),"name",{value:e.name})}},6601:(e,t,r)=>{"use strict";const n=r(7310),o=r(6574);e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof e}\` instead.`);const r=o(e,Object.assign({https:!0},t));return n.parse(r)}},800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var n,o,i,s=r(1926);function a(e){return void 0!==e}function c(e,r){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===r.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var n=t[0],o=r[n],i=e;return"string"==typeof o?i=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(i=String(o)),i}))}(i=t.MessageFormat||(t.MessageFormat={})).file="file",i.bundle="bundle",i.both="both",(o=t.BundleFormat||(t.BundleFormat={})).standalone="standalone",o.languagePack="languagePack",function(e){e.is=function(e){var t=e;return t&&a(t.key)&&a(t.comment)}}(n||(n={})),t.isDefined=a,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=c,t.localize=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return c(t,r)},t.loadMessageBundle=function(e){return s.default().loadMessageBundle(e)},t.config=function(e){return s.default().config(e)}},1926:(e,t)=>{"use strict";var r;function n(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");r=e}}(n||(n={})),t.default=n},8472:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=void 0;var n=r(1017),o=r(7147),i=r(1926),s=r(800),a=r(800);Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}});var c,u,l=Object.prototype.toString;function f(e){return"[object String]"===l.call(e)}function d(e){return JSON.parse(o.readFileSync(e,"utf8"))}function p(e){return function(t,r){for(var n,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];return n=t,"[object Number]"===l.call(n)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: "+new Error("").stack):s.format(e[t],o):f(r)?(console.warn("Message "+r+" didn't get externalized correctly."),s.format(r,o)):void console.error("Broken localize call found. Stacktrace is\n: "+new Error("").stack)}}function h(e,t){return c[e]=t,t}function m(e){try{return function(e){var t=d(n.join(e,"nls.metadata.json")),r=Object.create(null);for(var o in t){var i=t[o];r[o]=i.messages}return r}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function g(e,t){var r;if(!0===u.languagePackSupport&&void 0!==u.cacheRoot&&void 0!==u.languagePackId&&void 0!==u.translationsConfigFile&&void 0!==u.translationsConfig)try{r=function(e,t){var r,i,s,a=n.join(u.cacheRoot,e.id+"-"+e.hash+".json"),c=!1,l=!1;try{return r=JSON.parse(o.readFileSync(a,{encoding:"utf8",flag:"r"})),i=a,s=new Date,o.utimes(i,s,s,(function(){})),r}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: "+e.message+"."),o.unlink(a,(function(e){e&&console.error("Deleting corrupted bundle "+a+" failed.")})),c=!0}}if(r=function(e,t){var r=u.translationsConfig[e.id];if(r){var o=d(r).contents,i=d(n.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in i){var c=i[a],l=o[e.outDir+"/"+a];if(l){for(var p=[],h=0;h<c.keys.length;h++){var m=c.keys[h],g=l[f(m)?m:m.key];void 0===g&&(g=c.messages[h]),p.push(g)}s[a]=p}else s[a]=c.messages}return s}}(e,t),!r||c)return r;if(l)try{o.writeFileSync(a,JSON.stringify(r),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return r;throw e}return r}(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!r){if(u.languagePackSupport)return m(t);var i=function(e){for(var t=u.language;t;){var r=n.join(e,"nls.bundle."+t+".json");if(o.existsSync(r))return r;var i=t.lastIndexOf("-");t=i>0?t.substring(0,i):void 0}if(void 0===t&&(r=n.join(e,"nls.bundle.json"),o.existsSync(r)))return r}(t);if(i)try{return d(i)}catch(e){console.log("Loading in the box message bundle failed.",e)}r=m(t)}return r}function y(e){if(!e)return s.localize;var t=n.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.bundle){var r=function(e){for(var t,r=n.dirname(e);t=n.join(r,"nls.metadata.header.json"),!o.existsSync(t);){var i=n.dirname(r);if(i===r){t=void 0;break}r=i}return t}(e);if(r){var i=n.dirname(r),a=c[i];if(void 0===a)try{var l=JSON.parse(o.readFileSync(r,"utf8"));try{var f=g(l,i);a=h(i,f?{header:l,nlsBundle:f}:null)}catch(e){console.error("Failed to load nls bundle",e),a=h(i,null)}}catch(e){console.error("Failed to read header file",e),a=h(i,null)}if(a){var m=e.substr(i.length+1).replace(/\\/g,"/"),y=a.nlsBundle[m];return void 0===y?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):p(y)}}}if(u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.file)try{var v=d(function(e){var t;if(u.cacheLanguageResolution&&t);else{if(s.isPseudo||!u.language)t=".nls.json";else for(var r=u.language;r;){var n=".nls."+r+".json";if(o.existsSync(e+n)){t=n;break}var i=r.lastIndexOf("-");i>0?r=r.substring(0,i):(t=".nls.json",r=null)}u.cacheLanguageResolution}return e+t}(e));return Array.isArray(v)?p(v):s.isDefined(v.messages)&&s.isDefined(v.keys)?p(v.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}function v(e){return e&&(f(e.locale)&&(u.locale=e.locale.toLowerCase(),u.language=u.locale,c=Object.create(null)),void 0!==e.messageFormat&&(u.messageFormat=e.messageFormat),e.bundleFormat===s.BundleFormat.standalone&&!0===u.languagePackSupport&&(u.languagePackSupport=!1)),s.setPseudo("pseudo"===u.locale),y}!function(){if(u={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:s.MessageFormat.bundle},f(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var r=e.availableLanguages["*"];f(r)&&(t=r)}if(f(e.locale)&&(u.locale=e.locale.toLowerCase()),void 0===t?u.language=u.locale:"en"!==t&&(u.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(u.languagePackSupport=e._languagePackSupport),f(e._cacheRoot)&&(u.cacheRoot=e._cacheRoot),f(e._languagePackId)&&(u.languagePackId=e._languagePackId),f(e._translationsConfigFile)){u.translationsConfigFile=e._translationsConfigFile;try{u.translationsConfig=d(u.translationsConfigFile)}catch(t){if(e._corruptedFile){var i=n.dirname(e._corruptedFile);o.exists(i,(function(t){t&&o.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}s.setPseudo("pseudo"===u.locale),c=Object.create(null)}(),t.loadMessageBundle=y,t.config=v,i.default.install(Object.freeze({loadMessageBundle:y,config:v}))},2479:e=>{e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),o=e[e.length-1];return"function"==typeof n&&n!==o&&Object.keys(o).forEach((function(e){n[e]=o[e]})),n}}},673:(e,t,r)=>{"use strict";const n=r(3837),o=r(9346);function i(e,t){s(e,"open",t),s(e,"fromFd",t),s(e,"fromBuffer",t),s(e,"fromRandomAccessReader",t)}function s(e,t,r){const n=e[t];if("fromRandomAccessReader"==t){const t=r(n);e.fromRandomAccessReader=function(e,r,n,o){return"function"==typeof n?(o=n,n={}):n||(n={}),t.call(this,e,r,n,o)}}else{const o=r((function(e,t,r,o){return n.call(this,e,r,o)}));e[t]=function(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),o.call(this,e,null,t,r)}}return e[t]}e.exports={clone:function(e,t){if((t=Object.assign({clone:!0,subclassZipFile:!1,subclassEntry:!1,eventsIntercept:!1},t)).subclassEntry&&(t.eventsIntercept=!0),t.clone&&(e=Object.assign({},e)),t.subclassZipFile){const t=e.ZipFile;e.ZipFile=function(){t.apply(this,arguments)},n.inherits(e.ZipFile,t),i(e,(t=>function(e,t){return function(r,n,o,i){const{lazyEntries:s}=o,a=o.hasOwnProperty("lazyEntries");return s||(o.lazyEntries=!0),e.call(this,r,n,o,(function(e,r){if(e)return i(e);const n=r;r=Object.assign(Object.create(t.prototype),r),n.emit=r.emit.bind(r),s||(a?o.lazyEntries=s:delete o.lazyEntries,r.lazyEntries=!1,n.lazyEntries=!1,r._readEntry()),i(null,r)}))}}(t,e.ZipFile)))}if(t.eventsIntercept){const t=e.ZipFile.prototype;t.intercept||(o.patch(t),["_events","_eventsCount","_interceptors"].forEach((e=>delete t[e])))}if(t.subclassEntry){const t=e.Entry;e.Entry=function(){t.apply(this,arguments)},n.inherits(e.Entry,t),i(e,(t=>function(e,t){return function(r,n,o,i){return e.call(this,r,n,o,(function(e,r){if(e)return i(e);r.intercept("entry",(function(e,r){r(null,e=Object.assign(Object.create(t.prototype),e))})),i(null,r)}))}}(t,e.Entry)))}return e},patch:s,patchAll:i}},7070:(e,t,r)=>{"use strict";const n=r(7766),o=r(673),i=r(7643),s=r(8544);e.exports=function e(t,r,a){return a=Object.assign({clone:!0},a),t||(t=i),r||(r=n),a.clone?r=o.clone(r,{subclassZipFile:!0,subclassEntry:!0}):o.clone(r,{clone:!1,eventsIntercept:!0}),t?s(r,t):r={},r.use=e,r.usePromise=function(t){return e(t,null)},r.useYauzl=function(t,r){return e(null,t,r)},r}()},7643:e=>{"use strict";let t;try{t=Promise}catch(e){}e.exports=t},8544:(e,t,r)=>{"use strict";const n=r(673),o=Symbol(),i=Symbol();function s(e,t,r){const o="fromBuffer"==r;n.patch(e,r,(r=>function(n,i,s){return new t(((t,c)=>{s=Object.assign({},s,{lazyEntries:!0,autoClose:!1}),r(n,i,s,((r,n)=>{if(r)return c(r);!function(e,t,r,n){r&&(e.reader.unref=n.RandomAccessReader.prototype.unref,e.reader.close=e=>e()),h(e),g(e),e.intercept("entry",l),e.intercept("end",f),e.intercept("close",u),e.intercept("error",a),t(e)}(n,t,o,e)}))}))}))}function a(e){const t=d(this);if(t)return h(this),t.reject(e);m(this)||function(e,t){e[i]=t}(this,e)}function c(e,t){const r=m(e);g(e),t(r)}function u(){const e=d(this);if(!e||"close"!=e.action)return this.emit("error",new Error("Unexpected 'close' event emitted"));h(this),e.resolve()}function l(e){const t=d(this);if(!t||"read"!=t.action)return this.emit("error",new Error(`Unexpected '${e?"entry":"end"}' event emitted`));h(this),e&&(e.zipFile=this),t.resolve(e)}function f(){l.call(this,null)}function d(e){return e[o]}function p(e,t){e[o]=t}function h(e){e[o]=void 0}function m(e){return e[i]}function g(e){e[i]=void 0}function y(e){const t=[];return this.walkEntries((e=>{t.push(e)}),e).then((()=>t))}function v(e,t,r,n,o){if(r&&n==r)return o();e.readEntry().then((i=>i?t(i).then((()=>{v(e,t,r,n+1,o)})):o())).catch((e=>{o(e)}))}function A(e){return this.zipFile.openReadStream(this,e)}e.exports=(e,t)=>{const{ZipFile:r,Entry:n}=e;s(e,t,"open"),s(e,t,"fromFd"),s(e,t,"fromBuffer"),s(e,t,"fromRandomAccessReader"),function(e,t){const r=e.prototype.close;e.prototype.close=function(){return new t(((e,t)=>m(this)?c(this,t):this.isOpen?d(this)?t(new Error("Previous operation has not completed yet")):(p(this,{action:"close",resolve:e,reject:t}),void r.call(this)):e()))}}(r,t),function(e,t){const r=e.prototype.readEntry;e.prototype.readEntry=function(){return new t(((e,t)=>m(this)?c(this,t):this.isOpen?d(this)?t(new Error("Previous operation has not completed yet")):(p(this,{action:"read",resolve:e,reject:t}),void r.call(this)):t(new Error("ZipFile is not open"))))}}(r,t),r.prototype.readEntries=y,function(e,t){e.prototype.walkEntries=function(e,r){return e=function(e,t){return function(){try{const r=e.apply(this,arguments);return r instanceof t?r:t.resolve(r)}catch(e){return new t(((t,r)=>{r(e)}))}}}(e,t),new t(((t,n)=>{v(this,e,r,0,(e=>{if(e)return n(e);t()}))}))}}(r,t),function(e,t){const r=e.prototype.openReadStream;e.prototype.openReadStream=function(e,n){return new t(((t,o)=>{if(m(this))return c(this,o);r.call(this,e,n||{},((e,r)=>{if(e)return o(e);t(r)}))}))}}(r,t),n.prototype.openReadStream=A,r.Entry=n}},7766:(e,t,r)=>{var n=r(7147),o=r(9796),i=r(8913),s=r(2779),a=r(3837),c=r(2361).EventEmitter,u=r(2781).Transform,l=r(2781).PassThrough,f=r(2781).Writable;function d(e,t,r){"function"==typeof t&&(r=t,t=null),null==t&&(t={}),null==t.autoClose&&(t.autoClose=!1),null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),null==r&&(r=k),n.fstat(e,(function(n,o){if(n)return r(n);p(i.createFromFd(e,{autoClose:!0}),o.size,t,r)}))}function p(e,t,r,n){"function"==typeof r&&(n=r,r=null),null==r&&(r={}),null==r.autoClose&&(r.autoClose=!0),null==r.lazyEntries&&(r.lazyEntries=!1),null==r.decodeStrings&&(r.decodeStrings=!0);var o=!!r.decodeStrings;if(null==r.validateEntrySizes&&(r.validateEntrySizes=!0),null==r.strictFileNames&&(r.strictFileNames=!1),null==n&&(n=k),"number"!=typeof t)throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");e.ref();var i=Math.min(65557,t),s=S(i),a=t-s.length;b(e,s,0,i,a,(function(c){if(c)return n(c);for(var u=i-22;u>=0;u-=1)if(101010256===s.readUInt32LE(u)){var l=s.slice(u),f=l.readUInt16LE(4);if(0!==f)return n(new Error("multi-disk zip files are not supported: found disk number: "+f));var d=l.readUInt16LE(10),p=l.readUInt32LE(16),m=l.readUInt16LE(20),g=l.length-22;if(m!==g)return n(new Error("invalid comment length. expected: "+g+". found: "+m));var y=o?O(l,22,l.length,!1):l.slice(22);if(65535!==d&&4294967295!==p)return n(null,new h(e,p,t,d,y,r.autoClose,r.lazyEntries,o,r.validateEntrySizes,r.strictFileNames));var v=S(20),A=a+u-v.length;return void b(e,v,0,v.length,A,(function(i){if(i)return n(i);if(117853008!==v.readUInt32LE(0))return n(new Error("invalid zip64 end of central directory locator signature"));var s=C(v,8),a=S(56);b(e,a,0,a.length,s,(function(i){return i?n(i):101075792!==a.readUInt32LE(0)?n(new Error("invalid zip64 end of central directory record signature")):(d=C(a,32),p=C(a,48),n(null,new h(e,p,t,d,y,r.autoClose,r.lazyEntries,o,r.validateEntrySizes,r.strictFileNames)))}))}))}n(new Error("end of central directory record signature not found"))}))}function h(e,t,r,n,o,i,s,a,u,l){var f=this;c.call(f),f.reader=e,f.reader.on("error",(function(e){g(f,e)})),f.reader.once("close",(function(){f.emit("close")})),f.readEntryCursor=t,f.fileSize=r,f.entryCount=n,f.comment=o,f.entriesRead=0,f.autoClose=!!i,f.lazyEntries=!!s,f.decodeStrings=!!a,f.validateEntrySizes=!!u,f.strictFileNames=!!l,f.isOpen=!0,f.emittedError=!1,f.lazyEntries||f._readEntry()}function m(e,t){e.autoClose&&e.close(),g(e,t)}function g(e,t){e.emittedError||(e.emittedError=!0,e.emit("error",t))}function y(){}function v(e,t){return new Date(1980+(e>>9&127),(e>>5&15)-1,31&e,t>>11&31,t>>5&63,2*(31&t),0)}function A(e){return-1!==e.indexOf("\\")?"invalid characters in fileName: "+e:/^[a-zA-Z]:/.test(e)||/^\//.test(e)?"absolute path: "+e:-1!==e.split("/").indexOf("..")?"invalid relative path: "+e:null}function b(e,t,r,n,o,i){if(0===n)return setImmediate((function(){i(null,S(0))}));e.read(t,r,n,o,(function(e,t){return e?i(e):t<n?i(new Error("unexpected EOF")):void i()}))}function w(e){u.call(this),this.actualByteCount=0,this.expectedByteCount=e}function _(){c.call(this),this.refCount=0}function E(e){l.call(this),this.context=e,this.context.ref(),this.unreffedYet=!1}t.open=function(e,t,r){"function"==typeof t&&(r=t,t=null),null==t&&(t={}),null==t.autoClose&&(t.autoClose=!0),null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),null==r&&(r=k),n.open(e,"r",(function(e,o){if(e)return r(e);d(o,t,(function(e,t){e&&n.close(o,k),r(e,t)}))}))},t.fromFd=d,t.fromBuffer=function(e,t,r){"function"==typeof t&&(r=t,t=null),null==t&&(t={}),t.autoClose=!1,null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),p(i.createFromBuffer(e,{maxChunkSize:65536}),e.length,t,r)},t.fromRandomAccessReader=p,t.dosDateTimeToDate=v,t.validateFileName=A,t.ZipFile=h,t.Entry=y,t.RandomAccessReader=_,a.inherits(h,c),h.prototype.close=function(){this.isOpen&&(this.isOpen=!1,this.reader.unref())},h.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()},h.prototype._readEntry=function(){var e=this;if(e.entryCount!==e.entriesRead){if(!e.emittedError){var t=S(46);b(e.reader,t,0,t.length,e.readEntryCursor,(function(r){if(r)return m(e,r);if(!e.emittedError){var n=new y,o=t.readUInt32LE(0);if(33639248!==o)return m(e,new Error("invalid central directory file header signature: 0x"+o.toString(16)));if(n.versionMadeBy=t.readUInt16LE(4),n.versionNeededToExtract=t.readUInt16LE(6),n.generalPurposeBitFlag=t.readUInt16LE(8),n.compressionMethod=t.readUInt16LE(10),n.lastModFileTime=t.readUInt16LE(12),n.lastModFileDate=t.readUInt16LE(14),n.crc32=t.readUInt32LE(16),n.compressedSize=t.readUInt32LE(20),n.uncompressedSize=t.readUInt32LE(24),n.fileNameLength=t.readUInt16LE(28),n.extraFieldLength=t.readUInt16LE(30),n.fileCommentLength=t.readUInt16LE(32),n.internalFileAttributes=t.readUInt16LE(36),n.externalFileAttributes=t.readUInt32LE(38),n.relativeOffsetOfLocalHeader=t.readUInt32LE(42),64&n.generalPurposeBitFlag)return m(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46,t=S(n.fileNameLength+n.extraFieldLength+n.fileCommentLength),b(e.reader,t,0,t.length,e.readEntryCursor,(function(r){if(r)return m(e,r);if(!e.emittedError){var o=0!=(2048&n.generalPurposeBitFlag);n.fileName=e.decodeStrings?O(t,0,n.fileNameLength,o):t.slice(0,n.fileNameLength);var i=n.fileNameLength+n.extraFieldLength,a=t.slice(n.fileNameLength,i);n.extraFields=[];for(var c=0;c<a.length-3;){var u=a.readUInt16LE(c+0),l=a.readUInt16LE(c+2),f=c+4,d=f+l;if(d>a.length)return m(e,new Error("extra field length exceeds extra field buffer size"));var p=S(l);a.copy(p,0,f,d),n.extraFields.push({id:u,data:p}),c=d}if(n.fileComment=e.decodeStrings?O(t,i,i+n.fileCommentLength,o):t.slice(i,i+n.fileCommentLength),n.comment=n.fileComment,e.readEntryCursor+=t.length,e.entriesRead+=1,4294967295===n.uncompressedSize||4294967295===n.compressedSize||4294967295===n.relativeOffsetOfLocalHeader){var h=null;for(c=0;c<n.extraFields.length;c++)if(1===(y=n.extraFields[c]).id){h=y.data;break}if(null==h)return m(e,new Error("expected zip64 extended information extra field"));var g=0;if(4294967295===n.uncompressedSize){if(g+8>h.length)return m(e,new Error("zip64 extended information extra field does not include uncompressed size"));n.uncompressedSize=C(h,g),g+=8}if(4294967295===n.compressedSize){if(g+8>h.length)return m(e,new Error("zip64 extended information extra field does not include compressed size"));n.compressedSize=C(h,g),g+=8}if(4294967295===n.relativeOffsetOfLocalHeader){if(g+8>h.length)return m(e,new Error("zip64 extended information extra field does not include relative header offset"));n.relativeOffsetOfLocalHeader=C(h,g),g+=8}}if(e.decodeStrings)for(c=0;c<n.extraFields.length;c++){var y;if(28789===(y=n.extraFields[c]).id){if(y.data.length<6)continue;if(1!==y.data.readUInt8(0))continue;var v=y.data.readUInt32LE(1);if(s.unsigned(t.slice(0,n.fileNameLength))!==v)continue;n.fileName=O(y.data,5,y.data.length,!0);break}}if(e.validateEntrySizes&&0===n.compressionMethod){var b=n.uncompressedSize;if(n.isEncrypted()&&(b+=12),n.compressedSize!==b){var w="compressed/uncompressed size mismatch for stored file: "+n.compressedSize+" != "+n.uncompressedSize;return m(e,new Error(w))}}if(e.decodeStrings){e.strictFileNames||(n.fileName=n.fileName.replace(/\\/g,"/"));var _=A(n.fileName,e.validateFileNameOptions);if(null!=_)return m(e,new Error(_))}e.emit("entry",n),e.lazyEntries||e._readEntry()}}))}}))}}else setImmediate((function(){e.autoClose&&e.close(),e.emittedError||e.emit("end")}))},h.prototype.openReadStream=function(e,t,r){var n=this,i=0,s=e.compressedSize;if(null==r)r=t,t={};else{if(null!=t.decrypt){if(!e.isEncrypted())throw new Error("options.decrypt can only be specified for encrypted entries");if(!1!==t.decrypt)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()&&!1!==t.decompress)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}if(null!=t.decompress){if(!e.isCompressed())throw new Error("options.decompress can only be specified for compressed entries");if(!1!==t.decompress&&!0!==t.decompress)throw new Error("invalid options.decompress value: "+t.decompress)}if(null!=t.start||null!=t.end){if(e.isCompressed()&&!1!==t.decompress)throw new Error("start/end range not allowed for compressed entry without options.decompress === false");if(e.isEncrypted()&&!1!==t.decrypt)throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}if(null!=t.start){if((i=t.start)<0)throw new Error("options.start < 0");if(i>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(null!=t.end){if((s=t.end)<0)throw new Error("options.end < 0");if(s>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(s<i)throw new Error("options.end < options.start")}}if(!n.isOpen)return r(new Error("closed"));if(e.isEncrypted()&&!1!==t.decrypt)return r(new Error("entry is encrypted, and options.decrypt !== false"));n.reader.ref();var a=S(30);b(n.reader,a,0,a.length,e.relativeOffsetOfLocalHeader,(function(c){try{if(c)return r(c);var u=a.readUInt32LE(0);if(67324752!==u)return r(new Error("invalid local file header signature: 0x"+u.toString(16)));var l,f=a.readUInt16LE(26),d=a.readUInt16LE(28),p=e.relativeOffsetOfLocalHeader+a.length+f+d;if(0===e.compressionMethod)l=!1;else{if(8!==e.compressionMethod)return r(new Error("unsupported compression method: "+e.compressionMethod));l=null==t.decompress||t.decompress}var h=p,m=h+e.compressedSize;if(0!==e.compressedSize&&m>n.fileSize)return r(new Error("file data overflows file bounds: "+h+" + "+e.compressedSize+" > "+n.fileSize));var g=n.reader.createReadStream({start:h+i,end:h+s}),y=g;if(l){var v=!1,A=o.createInflateRaw();g.on("error",(function(e){setImmediate((function(){v||A.emit("error",e)}))})),g.pipe(A),n.validateEntrySizes?(y=new w(e.uncompressedSize),A.on("error",(function(e){setImmediate((function(){v||y.emit("error",e)}))})),A.pipe(y)):y=A,y.destroy=function(){v=!0,A!==y&&A.unpipe(y),g.unpipe(A),g.destroy()}}r(null,y)}finally{n.reader.unref()}}))},y.prototype.getLastModDate=function(){return v(this.lastModFileDate,this.lastModFileTime)},y.prototype.isEncrypted=function(){return 0!=(1&this.generalPurposeBitFlag)},y.prototype.isCompressed=function(){return 8===this.compressionMethod},a.inherits(w,u),w.prototype._transform=function(e,t,r){if(this.actualByteCount+=e.length,this.actualByteCount>this.expectedByteCount){var n="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return r(new Error(n))}r(null,e)},w.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()},a.inherits(_,c),_.prototype.ref=function(){this.refCount+=1},_.prototype.unref=function(){var e=this;if(e.refCount-=1,!(e.refCount>0)){if(e.refCount<0)throw new Error("invalid unref");e.close((function(t){if(t)return e.emit("error",t);e.emit("close")}))}},_.prototype.createReadStream=function(e){var t=e.start,r=e.end;if(t===r){var n=new l;return setImmediate((function(){n.end()})),n}var o=this._readStreamForRange(t,r),i=!1,s=new E(this);o.on("error",(function(e){setImmediate((function(){i||s.emit("error",e)}))})),s.destroy=function(){o.unpipe(s),s.unref(),o.destroy()};var a=new w(r-t);return s.on("error",(function(e){setImmediate((function(){i||a.emit("error",e)}))})),a.destroy=function(){i=!0,s.unpipe(a),s.destroy()},o.pipe(s).pipe(a)},_.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")},_.prototype.read=function(e,t,r,n,o){var i=this.createReadStream({start:n,end:n+r}),s=new f,a=0;s._write=function(r,n,o){r.copy(e,t+a,0,r.length),a+=r.length,o()},s.on("finish",o),i.on("error",(function(e){o(e)})),i.pipe(s)},_.prototype.close=function(e){setImmediate(e)},a.inherits(E,l),E.prototype._flush=function(e){this.unref(),e()},E.prototype.unref=function(e){this.unreffedYet||(this.unreffedYet=!0,this.context.unref())};var S,x="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";function O(e,t,r,n){if(n)return e.toString("utf8",t,r);for(var o="",i=t;i<r;i++)o+=x[e[i]];return o}function C(e,t){var r=e.readUInt32LE(t);return 4294967296*e.readUInt32LE(t+4)+r}function k(e){if(e)throw e}S="function"==typeof Buffer.allocUnsafe?function(e){return Buffer.allocUnsafe(e)}:function(e){return new Buffer(e)}},9496:e=>{"use strict";e.exports=require("vscode")},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},2057:e=>{"use strict";e.exports=require("constants")},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")},7718:e=>{"use strict";e.exports=require("node:child_process")},5673:e=>{"use strict";e.exports=require("node:events")},7561:e=>{"use strict";e.exports=require("node:fs")},9411:e=>{"use strict";e.exports=require("node:path")},7742:e=>{"use strict";e.exports=require("node:process")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},7461:(e,t,r)=>{const{Argument:n}=r(8998),{Command:o}=r(5282),{CommanderError:i,InvalidArgumentError:s}=r(8056),{Help:a}=r(8917),{Option:c}=r(5790);t.program=new o,t.createCommand=e=>new o(e),t.createOption=(e,t)=>new c(e,t),t.createArgument=(e,t)=>new n(e,t),t.Command=o,t.Option=c,t.Argument=n,t.Help=a,t.CommanderError=i,t.InvalidArgumentError=s,t.InvalidOptionArgumentError=s},8998:(e,t,r)=>{const{InvalidArgumentError:n}=r(8056);t.Argument=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.length>3&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new n(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},t.humanReadableArgName=function(e){const t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"}},5282:(e,t,r)=>{const n=r(5673).EventEmitter,o=r(7718),i=r(9411),s=r(7561),a=r(7742),{Argument:c,humanReadableArgName:u}=r(8998),{CommanderError:l}=r(8056),{Help:f}=r(8917),{Option:d,DualOptions:p}=r(5790),{suggestSimilar:h}=r(1812);class m extends n{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:e=>a.stdout.write(e),writeErr:e=>a.stderr.write(e),getOutHelpWidth:()=>a.stdout.isTTY?a.stdout.columns:void 0,getErrHelpWidth:()=>a.stderr.isTTY?a.stderr.columns:void 0,outputError:(e,t)=>t(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){const e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,r){let n=t,o=r;"object"==typeof n&&null!==n&&(o=n,n=null),o=o||{};const[,i,s]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(i);return n&&(a.description(n),a._executableHandler=!0),o.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!o.noHelp&&!o.hidden),a._executableFile=o.executableFile||null,s&&a.arguments(s),this._registerCommand(a),a.parent=this,a.copyInheritedSettings(this),n?this:a}createCommand(e){return new m(e)}createHelp(){return Object.assign(new f,this.configureHelp())}configureHelp(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return void 0===e?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return"string"!=typeof e&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new c(e,t)}argument(e,t,r,n){const o=this.createArgument(e,t);return"function"==typeof r?o.default(n).argParser(r):o.default(r),this.addArgument(o),this}arguments(e){return e.trim().split(/ +/).forEach((e=>{this.argument(e)})),this}addArgument(e){const t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if("boolean"==typeof e)return this._addImplicitHelpCommand=e,this;e=e??"help [command]";const[,r,n]=e.match(/([^ ]+) *(.*)/),o=t??"display help for command",i=this.createCommand(r);return i.helpOption(!1),n&&i.arguments(n),o&&i.description(o),this._addImplicitHelpCommand=!0,this._helpCommand=i,this}addHelpCommand(e,t){return"object"!=typeof e?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(void 0===this._helpCommand&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){const r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new l(e,t,r)),a.exit(e)}action(e){return this._actionHandler=t=>{const r=this.registeredArguments.length,n=t.slice(0,r);return this._storeOptionsAsProperties?n[r]=this:n[r]=this.opts(),n.push(this),e.apply(this,n)},this}createOption(e,t){return new d(e,t)}_callParseArg(e,t,r,n){try{return e.parseArg(t,r)}catch(e){if("commander.invalidArgument"===e.code){const t=`${n} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){const t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){const r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'\n- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){const t=e=>[e.name()].concat(e.aliases()),r=t(e).find((e=>this._findCommand(e)));if(r){const n=t(this._findCommand(r)).join("|"),o=t(e).join("|");throw new Error(`cannot add command '${o}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);const t=e.name(),r=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");this._findOption(t)||this.setOptionValueWithSource(r,void 0===e.defaultValue||e.defaultValue,"default")}else void 0!==e.defaultValue&&this.setOptionValueWithSource(r,e.defaultValue,"default");const n=(t,n,o)=>{null==t&&void 0!==e.presetArg&&(t=e.presetArg);const i=this.getOptionValue(r);null!==t&&e.parseArg?t=this._callParseArg(e,t,i,n):null!==t&&e.variadic&&(t=e._concatValue(t,i)),null==t&&(t=!e.negate&&(!(!e.isBoolean()&&!e.optional)||"")),this.setOptionValueWithSource(r,t,o)};return this.on("option:"+t,(t=>{const r=`error: option '${e.flags}' argument '${t}' is invalid.`;n(t,r,"cli")})),e.envVar&&this.on("optionEnv:"+t,(t=>{const r=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;n(t,r,"env")})),this}_optionEx(e,t,r,n,o){if("object"==typeof t&&t instanceof d)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const i=this.createOption(t,r);if(i.makeOptionMandatory(!!e.mandatory),"function"==typeof n)i.default(o).argParser(n);else if(n instanceof RegExp){const e=n;n=(t,r)=>{const n=e.exec(t);return n?n[0]:r},i.default(o).argParser(n)}else i.default(n);return this.addOption(i)}option(e,t,r,n){return this._optionEx({},e,t,r,n)}requiredOption(e,t,r,n){return this._optionEx({mandatory:!0},e,t,r,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,r){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach((r=>{void 0!==r.getOptionValueSource(e)&&(t=r.getOptionValueSource(e))})),t}_prepareUserArgs(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},void 0===e&&void 0===t.from){a.versions?.electron&&(t.from="electron");const e=a.execArgv??[];(e.includes("-e")||e.includes("--eval")||e.includes("-p")||e.includes("--print"))&&(t.from="eval")}let r;switch(void 0===e&&(e=a.argv),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":a.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,t){const r=this._prepareUserArgs(e,t);return this._parseCommand([],r),this}async parseAsync(e,t){const r=this._prepareUserArgs(e,t);return await this._parseCommand([],r),this}_executeSubCommand(e,t){t=t.slice();let r=!1;const n=[".js",".ts",".tsx",".mjs",".cjs"];function c(e,t){const r=i.resolve(e,t);if(s.existsSync(r))return r;if(n.includes(i.extname(t)))return;const o=n.find((e=>s.existsSync(`${r}${e}`)));return o?`${r}${o}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u,f=e._executableFile||`${this._name}-${e._name}`,d=this._executableDir||"";if(this._scriptPath){let e;try{e=s.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}d=i.resolve(i.dirname(e),d)}if(d){let t=c(d,f);if(!t&&!e._executableFile&&this._scriptPath){const r=i.basename(this._scriptPath,i.extname(this._scriptPath));r!==this._name&&(t=c(d,`${r}-${e._name}`))}f=t||f}r=n.includes(i.extname(f)),"win32"!==a.platform?r?(t.unshift(f),t=g(a.execArgv).concat(t),u=o.spawn(a.argv[0],t,{stdio:"inherit"})):u=o.spawn(f,t,{stdio:"inherit"}):(t.unshift(f),t=g(a.execArgv).concat(t),u=o.spawn(a.execPath,t,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{a.on(e,(()=>{!1===u.killed&&null===u.exitCode&&u.kill(e)}))}));const p=this._exitCallback;u.on("close",(e=>{e=e??1,p?p(new l(e,"commander.executeSubCommandAsync","(close)")):a.exit(e)})),u.on("error",(t=>{if("ENOENT"===t.code){const t=d?`searched for local subcommand relative to directory '${d}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",r=`'${f}' 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 or path\n - ${t}`;throw new Error(r)}if("EACCES"===t.code)throw new Error(`'${f}' not executable`);if(p){const e=new l(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,p(e)}else a.exit(1)})),this.runningCommand=u}_dispatchSubcommand(e,t,r){const n=this._findCommand(e);let o;return n||this.help({error:!0}),o=this._chainOrCallSubCommandHook(o,n,"preSubcommand"),o=this._chainOrCall(o,(()=>{if(!n._executableHandler)return n._parseCommand(t,r);this._executeSubCommand(n,t.concat(r))})),o}_dispatchHelpCommand(e){e||this.help();const t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach(((e,t)=>{e.required&&null==this.args[t]&&this.missingArgument(e.name())})),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic||this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){const e=(e,t,r)=>{let n=t;if(null!==t&&e.parseArg){const o=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;n=this._callParseArg(e,t,r,o)}return n};this._checkNumberOfArguments();const t=[];this.registeredArguments.forEach(((r,n)=>{let o=r.defaultValue;r.variadic?n<this.args.length?(o=this.args.slice(n),r.parseArg&&(o=o.reduce(((t,n)=>e(r,n,t)),r.defaultValue))):void 0===o&&(o=[]):n<this.args.length&&(o=this.args[n],r.parseArg&&(o=e(r,o,r.defaultValue))),t[n]=o})),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&"function"==typeof e.then?e.then((()=>t())):t()}_chainOrCallHooks(e,t){let r=e;const n=[];return this._getCommandAndAncestors().reverse().filter((e=>void 0!==e._lifeCycleHooks[t])).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{n.push({hookedCommand:e,callback:t})}))})),"postAction"===t&&n.reverse(),n.forEach((e=>{r=this._chainOrCall(r,(()=>e.callback(e.hookedCommand,this)))})),r}_chainOrCallSubCommandHook(e,t,r){let n=e;return void 0!==this._lifeCycleHooks[r]&&this._lifeCycleHooks[r].forEach((e=>{n=this._chainOrCall(n,(()=>e(this,t)))})),n}_parseCommand(e,t){const r=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),t=r.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const n=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){let r;return n(),this._processArguments(),r=this._chainOrCallHooks(r,"preAction"),r=this._chainOrCall(r,(()=>this._actionHandler(this.processedArgs))),this.parent&&(r=this._chainOrCall(r,(()=>{this.parent.emit(o,e,t)}))),r=this._chainOrCallHooks(r,"postAction"),r}if(this.parent&&this.parent.listenerCount(o))n(),this._processArguments(),this.parent.emit(o,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_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(){this._getCommandAndAncestors().forEach((e=>{e.options.forEach((t=>{t.mandatory&&void 0===e.getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)}))}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();return void 0!==this.getOptionValue(t)&&"default"!==this.getOptionValueSource(t)}));e.filter((e=>e.conflictsWith.length>0)).forEach((t=>{const r=e.find((e=>t.conflictsWith.includes(e.attributeName())));r&&this._conflictingOption(t,r)}))}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((e=>{e._checkForConflictingLocalOptions()}))}parseOptions(e){const t=[],r=[];let n=t;const o=e.slice();function i(e){return e.length>1&&"-"===e[0]}let s=null;for(;o.length;){const e=o.shift();if("--"===e){n===r&&n.push(e),n.push(...o);break}if(!s||i(e)){if(s=null,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()}`);s=t.variadic?t:null;continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional&&this._combineFlagAndOptionalValue?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("="),r=this._findOption(e.slice(0,t));if(r&&(r.required||r.optional)){this.emit(`option:${r.name()}`,e.slice(t+1));continue}}if(i(e)&&(n=r),(this._enablePositionalOptions||this._passThroughOptions)&&0===t.length&&0===r.length){if(this._findCommand(e)){t.push(e),o.length>0&&r.push(...o);break}if(this._getHelpCommand()&&e===this._getHelpCommand().name()){t.push(e),o.length>0&&t.push(...o);break}if(this._defaultCommandName){r.push(e),o.length>0&&r.push(...o);break}}if(this._passThroughOptions){n.push(e),o.length>0&&n.push(...o);break}n.push(e)}else this.emit(`option:${s.name()}`,e)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let r=0;r<t;r++){const t=this.options[r].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(((e,t)=>Object.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const r=t||{},n=r.exitCode||1,o=r.code||"commander.error";this._exit(n,o,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in a.env){const t=e.attributeName();(void 0===this.getOptionValue(t)||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,a.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}}))}_parseOptionsImplied(){const e=new p(this.options),t=e=>void 0!==this.getOptionValue(e)&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((r=>void 0!==r.implied&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r))).forEach((e=>{Object.keys(e.implied).filter((e=>!t(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const r=e=>{const t=e.attributeName(),r=this.getOptionValue(t),n=this.options.find((e=>e.negate&&t===e.attributeName())),o=this.options.find((e=>!e.negate&&t===e.attributeName()));return n&&(void 0===n.presetArg&&!1===r||void 0!==n.presetArg&&r===n.presetArg)?n:o||e},n=e=>{const t=r(e),n=t.attributeName();return"env"===this.getOptionValueSource(n)?`environment variable '${t.envVar}'`:`option '${t.flags}'`},o=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[],n=this;do{const e=n.createHelp().visibleOptions(n).filter((e=>e.long)).map((e=>e.long));r=r.concat(e),n=n.parent}while(n&&!n._enablePositionalOptions);t=h(e,r)}const r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this.registeredArguments.length,r=1===t?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${r} but got ${e.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const r=[];this.createHelp().visibleCommands(this).forEach((e=>{r.push(e.name()),e.alias()&&r.push(e.alias())})),t=h(e,r)}const r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(void 0===e)return this._version;this._version=e,t=t||"-V, --version",r=r||"output the version number";const n=this.createOption(t,r);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,"commander.version",e)})),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return void 0===e?this._summary:(this._summary=e,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");const r=this.parent?._findCommand(e);if(r){const t=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}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.registeredArguments.map((e=>u(e)));return[].concat(this.options.length||null!==this._helpOption?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?e:[]).join(" ")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=i.basename(e,i.extname(e)),this}executableDir(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp();return void 0===t.helpWidth&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){const t={error:!!(e=e||{}).error};let r;return r=t.error?e=>this._outputConfiguration.writeErr(e):e=>this._outputConfiguration.writeOut(e),t.write=e.write||r,t.command=this,t}outputHelp(e){let t;"function"==typeof e&&(t=e,e=void 0);const r=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach((e=>e.emit("beforeAllHelp",r))),this.emit("beforeHelp",r);let n=this.helpInformation(r);if(t&&(n=t(n),"string"!=typeof n&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(n),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach((e=>e.emit("afterAllHelp",r)))}helpOption(e,t){return"boolean"==typeof e?(this._helpOption=e?this._helpOption??void 0:null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return void 0===this._helpOption&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=a.exitCode||0;0===t&&e&&"function"!=typeof e&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${r.join("', '")}'`);const n=`${e}Help`;return this.on(n,(e=>{let r;r="function"==typeof t?t({error:e.error,command:e.command}):t,r&&e.write(`${r}\n`)})),this}_outputHelpIfRequested(e){const t=this._getHelpOption();t&&e.find((e=>t.is(e)))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}}function g(e){return e.map((e=>{if(!e.startsWith("--inspect"))return e;let t,r,n="127.0.0.1",o="9229";return null!==(r=e.match(/^(--inspect(-brk)?)$/))?t=r[1]:null!==(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=r[1],/^\d+$/.test(r[3])?o=r[3]:n=r[3]):null!==(r=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=r[1],n=r[3],o=r[4]),t&&"0"!==o?`${t}=${n}:${parseInt(o)+1}`:e}))}t.Command=m},8056:(e,t)=>{class r extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}t.CommanderError=r,t.InvalidArgumentError=class extends r{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}},8917:(e,t,r)=>{const{humanReadableArgName:n}=r(8998);t.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden)),r=e._getHelpCommand();return r&&!r._hidden&&t.push(r),this.sortSubcommands&&t.sort(((e,t)=>e.name().localeCompare(t.name()))),t}compareOptions(e,t){const r=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return r(e).localeCompare(r(t))}visibleOptions(e){const t=e.options.filter((e=>!e.hidden)),r=e._getHelpOption();if(r&&!r.hidden){const n=r.short&&e._findOption(r.short),o=r.long&&e._findOption(r.long);n||o?r.long&&!o?t.push(e.createOption(r.long,r.description)):r.short&&!n&&t.push(e.createOption(r.short,r.description)):t.push(r)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let r=e.parent;r;r=r.parent){const e=r.options.filter((e=>!e.hidden));t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""})),e.registeredArguments.find((e=>e.description))?e.registeredArguments:[]}subcommandTerm(e){const t=e.registeredArguments.map((e=>n(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,r)=>Math.max(e,t.subcommandTerm(r).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,r)=>Math.max(e,t.optionTerm(r).length)),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce(((e,r)=>Math.max(e,t.optionTerm(r).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,r)=>Math.max(e,t.argumentTerm(r).length)),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let r="";for(let t=e.parent;t;t=t.parent)r=t.name()+" "+r;return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue&&(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),void 0!==e.presetArg&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,t){const r=t.padWidth(e,t),n=t.helpWidth||80;function o(e,o){if(o){const i=`${e.padEnd(r+2)}${o}`;return t.wrap(i,n-2,r+2)}return e}function i(e){return e.join("\n").replace(/^/gm," ".repeat(2))}let s=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);a.length>0&&(s=s.concat([t.wrap(a,n,0),""]));const c=t.visibleArguments(e).map((e=>o(t.argumentTerm(e),t.argumentDescription(e))));c.length>0&&(s=s.concat(["Arguments:",i(c),""]));const u=t.visibleOptions(e).map((e=>o(t.optionTerm(e),t.optionDescription(e))));if(u.length>0&&(s=s.concat(["Options:",i(u),""])),this.showGlobalOptions){const r=t.visibleGlobalOptions(e).map((e=>o(t.optionTerm(e),t.optionDescription(e))));r.length>0&&(s=s.concat(["Global Options:",i(r),""]))}const l=t.visibleCommands(e).map((e=>o(t.subcommandTerm(e),t.subcommandDescription(e))));return l.length>0&&(s=s.concat(["Commands:",i(l),""])),s.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,r,n=40){const o=new RegExp("[\\n][ \\f\\t\\v - \ufeff]+");if(e.match(o))return e;const i=t-r;if(i<n)return e;const s=e.slice(0,r),a=e.slice(r).replace("\r\n","\n"),c=" ".repeat(r),u="\\s",l=new RegExp(`\n|.{1,${i-1}}([${u}]|$)|[^${u}]+?([${u}]|$)`,"g");return s+(a.match(l)||[]).map(((e,t)=>"\n"===e?"":(t>0?c:"")+e.trimEnd())).join("\n")}}},5790:(e,t,r)=>{const{InvalidArgumentError:n}=r(8056);t.Option=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const r=function(e){let t,r;const n=e.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(t=n.shift()),r=n.shift(),!t&&/^-[^-]$/.test(r)&&(t=r,r=void 0),{shortFlag:t,longFlag:r}}(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return"string"==typeof e&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new n(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}name(){return this.long?this.long.replace(/^--/,""):this.short.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}isBoolean(){return!this.required&&!this.optional&&!this.negate}},t.DualOptions=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach((e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)})),this.negativeOptions.forEach(((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)}))}valueFromOption(e,t){const r=t.attributeName();if(!this.dualOptions.has(r))return!0;const n=this.negativeOptions.get(r).presetArg,o=void 0!==n&&n;return t.negate===(o===e)}}},1812:(e,t)=>{t.suggestSimilar=function(e,t){if(!t||0===t.length)return"";t=Array.from(new Set(t));const r=e.startsWith("--");r&&(e=e.slice(2),t=t.map((e=>e.slice(2))));let n=[],o=3;return t.forEach((t=>{if(t.length<=1)return;const r=function(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);const r=[];for(let t=0;t<=e.length;t++)r[t]=[t];for(let e=0;e<=t.length;e++)r[0][e]=e;for(let n=1;n<=t.length;n++)for(let o=1;o<=e.length;o++){let i=1;i=e[o-1]===t[n-1]?0:1,r[o][n]=Math.min(r[o-1][n]+1,r[o][n-1]+1,r[o-1][n-1]+i),o>1&&n>1&&e[o-1]===t[n-2]&&e[o-2]===t[n-1]&&(r[o][n]=Math.min(r[o][n],r[o-2][n-2]+1))}return r[e.length][t.length]}(e,t),i=Math.max(e.length,t.length);(i-r)/i>.4&&(r<o?(o=r,n=[t]):r===o&&n.push(t))})),n.sort(((e,t)=>e.localeCompare(t))),r&&(n=n.map((e=>`--${e}`))),n.length>1?`\n(Did you mean one of ${n.join(", ")}?)`:1===n.length?`\n(Did you mean ${n[0]}?)`:""}},7685:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(6092).Z.Symbol},3243:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(7685),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=n.Z?n.Z.toStringTag:void 0;var c=Object.prototype.toString;var u=n.Z?n.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var o=s.call(e);return n&&(t?e[a]=r:delete e[a]),o}(e):function(e){return c.call(e)}(e)}},3413:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n="object"==typeof global&&global&&global.Object===Object&&global},2513:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=(0,r(1851).Z)(Object.getPrototypeOf,Object)},1851:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){return function(r){return e(t(r))}}},6092:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(3413),o="object"==typeof self&&self&&self.Object===Object&&self;const i=n.Z||o||Function("return this")()},9111:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(7226),o=r(6092);const i=function(){return o.Z.Date.now()};var s=r(3782),a=Math.max,c=Math.min;const u=function(e,t,r){var o,u,l,f,d,p,h=0,m=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var r=o,n=u;return o=u=void 0,h=t,f=e.apply(n,r)}function A(e){var r=e-p;return void 0===p||r>=t||r<0||g&&e-h>=l}function b(){var e=i();if(A(e))return w(e);d=setTimeout(b,function(e){var r=t-(e-p);return g?c(r,l-(e-h)):r}(e))}function w(e){return d=void 0,y&&o?v(e):(o=u=void 0,f)}function _(){var e=i(),r=A(e);if(o=arguments,u=this,p=e,r){if(void 0===d)return function(e){return h=e,d=setTimeout(b,t),m?v(e):f}(p);if(g)return clearTimeout(d),d=setTimeout(b,t),v(p)}return void 0===d&&(d=setTimeout(b,t)),f}return t=(0,s.Z)(t)||0,(0,n.Z)(r)&&(m=!!r.leading,l=(g="maxWait"in r)?a((0,s.Z)(r.maxWait)||0,t):l,y="trailing"in r?!!r.trailing:y),_.cancel=function(){void 0!==d&&clearTimeout(d),h=0,o=p=u=d=void 0},_.flush=function(){return void 0===d?f:w(i())},_}},7771:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n=Array.isArray},3505:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=r(3243),o=r(8533);const i=function(e){return!0===e||!1===e||(0,o.Z)(e)&&"[object Boolean]"==(0,n.Z)(e)}},7226:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},8533:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return null!=e&&"object"==typeof e}},7514:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var n=r(3243),o=r(2513),i=r(8533),s=Function.prototype,a=Object.prototype,c=s.toString,u=a.hasOwnProperty,l=c.call(Object);const f=function(e){if(!(0,i.Z)(e)||"[object Object]"!=(0,n.Z)(e))return!1;var t=(0,o.Z)(e);if(null===t)return!0;var r=u.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==l}},6378:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(3243),o=r(7771),i=r(8533);const s=function(e){return"string"==typeof e||!(0,o.default)(e)&&(0,i.Z)(e)&&"[object String]"==(0,n.Z)(e)}},2714:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(3243),o=r(8533);const i=function(e){return"symbol"==typeof e||(0,o.Z)(e)&&"[object Symbol]"==(0,n.Z)(e)}},9360:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n=function(e){return void 0===e}},2807:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=r(3782);const o=function(e){var t=function(e){return e?1/0===(e=(0,n.Z)(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}(e),r=t%1;return t==t?r?t-r:t:0},i=function(e){return function(e,t){var r;if("function"!=typeof t)throw new TypeError("Expected a function");return e=o(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}(2,e)}},6930:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>Tt});const n=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},o=function(e,t){return e===t||e!=e&&t!=t},i=function(e,t){for(var r=e.length;r--;)if(o(e[r][0],t))return r;return-1};var s=Array.prototype.splice;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,r=i(t,e);return!(r<0||(r==t.length-1?t.pop():s.call(t,r,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,r=i(t,e);return r<0?void 0:t[r][1]},a.prototype.has=function(e){return i(this.__data__,e)>-1},a.prototype.set=function(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};const c=a;var u=r(3243),l=r(7226);const f=function(e){if(!(0,l.Z)(e))return!1;var t=(0,u.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var d=r(6092);const p=d.Z["__core-js_shared__"];var h,m=(h=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"";var g=Function.prototype.toString;const y=function(e){if(null!=e){try{return g.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var v=/^\[object .+?Constructor\]$/,A=Function.prototype,b=Object.prototype,w=A.toString,_=b.hasOwnProperty,E=RegExp("^"+w.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const S=function(e){return!(!(0,l.Z)(e)||(t=e,m&&m in t))&&(f(e)?E:v).test(y(e));var t},x=function(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return S(r)?r:void 0},O=x(d.Z,"Map"),C=x(Object,"create");var k=Object.prototype.hasOwnProperty;var F=Object.prototype.hasOwnProperty;function j(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}j.prototype.clear=function(){this.__data__=C?C(null):{},this.size=0},j.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},j.prototype.get=function(e){var t=this.__data__;if(C){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return k.call(t,e)?t[e]:void 0},j.prototype.has=function(e){var t=this.__data__;return C?void 0!==t[e]:F.call(t,e)},j.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=C&&void 0===t?"__lodash_hash_undefined__":t,this};const P=j,L=function(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map};function I(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}I.prototype.clear=function(){this.size=0,this.__data__={hash:new P,map:new(O||c),string:new P}},I.prototype.delete=function(e){var t=L(this,e).delete(e);return this.size-=t?1:0,t},I.prototype.get=function(e){return L(this,e).get(e)},I.prototype.has=function(e){return L(this,e).has(e)},I.prototype.set=function(e,t){var r=L(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};const T=I;function N(e){var t=this.__data__=new c(e);this.size=t.size}N.prototype.clear=function(){this.__data__=new c,this.size=0},N.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},N.prototype.get=function(e){return this.__data__.get(e)},N.prototype.has=function(e){return this.__data__.has(e)},N.prototype.set=function(e,t){var r=this.__data__;if(r instanceof c){var n=r.__data__;if(!O||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new T(n)}return r.set(e,t),this.size=r.size,this};const R=N;function B(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new T;++t<r;)this.add(e[t])}B.prototype.add=B.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},B.prototype.has=function(e){return this.__data__.has(e)};const D=B,M=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},H=function(e,t,r,n,o,i){var s=1&r,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var f=-1,d=!0,p=2&r?new D:void 0;for(i.set(e,t),i.set(t,e);++f<a;){var h=e[f],m=t[f];if(n)var g=s?n(m,h,f,t,e,i):n(h,m,f,e,t,i);if(void 0!==g){if(g)continue;d=!1;break}if(p){if(!M(t,(function(e,t){if(s=t,!p.has(s)&&(h===e||o(h,e,r,n,i)))return p.push(t);var s}))){d=!1;break}}else if(h!==m&&!o(h,m,r,n,i)){d=!1;break}}return i.delete(e),i.delete(t),d};var V=r(7685);const z=d.Z.Uint8Array,U=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r},W=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r};var q=V.Z?V.Z.prototype:void 0,G=q?q.valueOf:void 0;const Q=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e};var Z=r(7771);const $=function(e,t,r){var n=t(e);return(0,Z.default)(e)?n:Q(n,r(e))},J=function(){return[]};var Y=Object.prototype.propertyIsEnumerable,X=Object.getOwnPropertySymbols;const K=X?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}(X(e),(function(t){return Y.call(e,t)})))}:J;var ee=r(8533);const te=function(e){return(0,ee.Z)(e)&&"[object Arguments]"==(0,u.Z)(e)};var re=Object.prototype,ne=re.hasOwnProperty,oe=re.propertyIsEnumerable;const ie=te(function(){return arguments}())?te:function(e){return(0,ee.Z)(e)&&ne.call(e,"callee")&&!oe.call(e,"callee")};var se="object"==typeof exports&&exports&&!exports.nodeType&&exports,ae=se&&"object"==typeof module&&module&&!module.nodeType&&module,ce=ae&&ae.exports===se?d.Z.Buffer:void 0;const ue=(ce?ce.isBuffer:void 0)||function(){return!1};var le=/^(?:0|[1-9]\d*)$/;const fe=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&le.test(e))&&e>-1&&e%1==0&&e<t},de=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var pe={};pe["[object Float32Array]"]=pe["[object Float64Array]"]=pe["[object Int8Array]"]=pe["[object Int16Array]"]=pe["[object Int32Array]"]=pe["[object Uint8Array]"]=pe["[object Uint8ClampedArray]"]=pe["[object Uint16Array]"]=pe["[object Uint32Array]"]=!0,pe["[object Arguments]"]=pe["[object Array]"]=pe["[object ArrayBuffer]"]=pe["[object Boolean]"]=pe["[object DataView]"]=pe["[object Date]"]=pe["[object Error]"]=pe["[object Function]"]=pe["[object Map]"]=pe["[object Number]"]=pe["[object Object]"]=pe["[object RegExp]"]=pe["[object Set]"]=pe["[object String]"]=pe["[object WeakMap]"]=!1;var he=r(3413),me="object"==typeof exports&&exports&&!exports.nodeType&&exports,ge=me&&"object"==typeof module&&module&&!module.nodeType&&module,ye=ge&&ge.exports===me&&he.Z.process,ve=function(){try{return ge&&ge.require&&ge.require("util").types||ye&&ye.binding&&ye.binding("util")}catch(e){}}(),Ae=ve&&ve.isTypedArray;const be=Ae?(we=Ae,function(e){return we(e)}):function(e){return(0,ee.Z)(e)&&de(e.length)&&!!pe[(0,u.Z)(e)]};var we,_e=Object.prototype.hasOwnProperty;const Ee=function(e,t){var r=(0,Z.default)(e),n=!r&&ie(e),o=!r&&!n&&ue(e),i=!r&&!n&&!o&&be(e),s=r||n||o||i,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=a.length;for(var u in e)!t&&!_e.call(e,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||fe(u,c))||a.push(u);return a};var Se=Object.prototype;const xe=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Se)},Oe=(0,r(1851).Z)(Object.keys,Object);var Ce=Object.prototype.hasOwnProperty;const ke=function(e){return null!=e&&de(e.length)&&!f(e)},Fe=function(e){return ke(e)?Ee(e):function(e){if(!xe(e))return Oe(e);var t=[];for(var r in Object(e))Ce.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)},je=function(e){return $(e,Fe,K)};var Pe=Object.prototype.hasOwnProperty;const Le=x(d.Z,"DataView"),Ie=x(d.Z,"Promise"),Te=x(d.Z,"Set"),Ne=x(d.Z,"WeakMap");var Re="[object Map]",Be="[object Promise]",De="[object Set]",Me="[object WeakMap]",He="[object DataView]",Ve=y(Le),ze=y(O),Ue=y(Ie),We=y(Te),qe=y(Ne),Ge=u.Z;(Le&&Ge(new Le(new ArrayBuffer(1)))!=He||O&&Ge(new O)!=Re||Ie&&Ge(Ie.resolve())!=Be||Te&&Ge(new Te)!=De||Ne&&Ge(new Ne)!=Me)&&(Ge=function(e){var t=(0,u.Z)(e),r="[object Object]"==t?e.constructor:void 0,n=r?y(r):"";if(n)switch(n){case Ve:return He;case ze:return Re;case Ue:return Be;case We:return De;case qe:return Me}return t});const Qe=Ge;var Ze="[object Arguments]",$e="[object Array]",Je="[object Object]",Ye=Object.prototype.hasOwnProperty;const Xe=function(e,t,r,n,i,s){var a=(0,Z.default)(e),c=(0,Z.default)(t),u=a?$e:Qe(e),l=c?$e:Qe(t),f=(u=u==Ze?Je:u)==Je,d=(l=l==Ze?Je:l)==Je,p=u==l;if(p&&ue(e)){if(!ue(t))return!1;a=!0,f=!1}if(p&&!f)return s||(s=new R),a||be(e)?H(e,t,r,n,i,s):function(e,t,r,n,i,s,a){switch(r){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||!s(new z(e),new z(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+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 c=U;case"[object Set]":var u=1&n;if(c||(c=W),e.size!=t.size&&!u)return!1;var l=a.get(e);if(l)return l==t;n|=2,a.set(e,t);var f=H(c(e),c(t),n,i,s,a);return a.delete(e),f;case"[object Symbol]":if(G)return G.call(e)==G.call(t)}return!1}(e,t,u,r,n,i,s);if(!(1&r)){var h=f&&Ye.call(e,"__wrapped__"),m=d&&Ye.call(t,"__wrapped__");if(h||m){var g=h?e.value():e,y=m?t.value():t;return s||(s=new R),i(g,y,r,n,s)}}return!!p&&(s||(s=new R),function(e,t,r,n,o,i){var s=1&r,a=je(e),c=a.length;if(c!=je(t).length&&!s)return!1;for(var u=c;u--;){var l=a[u];if(!(s?l in t:Pe.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=s;++u<c;){var m=e[l=a[u]],g=t[l];if(n)var y=s?n(g,m,l,t,e,i):n(m,g,l,e,t,i);if(!(void 0===y?m===g||o(m,g,r,n,i):y)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var v=e.constructor,A=t.constructor;v==A||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof A&&A instanceof A||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,r,n,i,s))},Ke=function e(t,r,n,o,i){return t===r||(null==t||null==r||!(0,ee.Z)(t)&&!(0,ee.Z)(r)?t!=t&&r!=r:Xe(t,r,n,o,e,i))},et=function(e){return e==e&&!(0,l.Z)(e)},tt=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}},rt=function(e){var t=function(e){for(var t=Fe(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,et(o)]}return t}(e);return 1==t.length&&t[0][2]?tt(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,s=!n;if(null==e)return!i;for(e=Object(e);o--;){var a=r[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var c=(a=r[o])[0],u=e[c],l=a[1];if(s&&a[2]){if(void 0===u&&!(c in e))return!1}else{var f=new R;if(n)var d=n(u,l,c,e,t,f);if(!(void 0===d?Ke(l,u,3,n,f):d))return!1}}return!0}(r,e,t)}};var nt=r(2714),ot=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,it=/^\w*$/;const st=function(e,t){if((0,Z.default)(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!(0,nt.Z)(e))||it.test(e)||!ot.test(e)||null!=t&&e in Object(t)};function at(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(at.Cache||T),r}at.Cache=T;var ct=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ut=/\\(\\)?/g;const lt=(ft=at((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ct,(function(e,r,n,o){t.push(n?o.replace(ut,"$1"):r||e)})),t}),(function(e){return 500===dt.size&&dt.clear(),e})),dt=ft.cache,ft);var ft,dt,pt=V.Z?V.Z.prototype:void 0,ht=pt?pt.toString:void 0;const mt=function e(t){if("string"==typeof t)return t;if((0,Z.default)(t))return n(t,e)+"";if((0,nt.Z)(t))return ht?ht.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r},gt=function(e){return null==e?"":mt(e)},yt=function(e,t){return(0,Z.default)(e)?e:st(e,t)?[e]:lt(gt(e))},vt=function(e){if("string"==typeof e||(0,nt.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},At=function(e,t){for(var r=0,n=(t=yt(t,e)).length;null!=e&&r<n;)e=e[vt(t[r++])];return r&&r==n?e:void 0},bt=function(e,t){return null!=e&&t in Object(e)},wt=function(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=yt(t,e)).length,i=!1;++n<o;){var s=vt(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&de(o)&&fe(s,o)&&((0,Z.default)(e)||ie(e))}(e,t,bt)},_t=function(e,t){return st(e)&&et(t)?tt(vt(e),t):function(r){var n=function(e,t,r){var n=null==e?void 0:At(e,t);return void 0===n?r:n}(r,e);return void 0===n&&n===t?wt(r,e):Ke(t,n,3)}},Et=function(e){return e},St=function(e){return st(e)?(t=vt(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return At(t,e)}}(e);var t},xt=function(){try{var e=x(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Ot=Object.prototype.hasOwnProperty;const Ct=function(e,t,r){var n=e[t];Ot.call(e,t)&&o(n,r)&&(void 0!==r||t in e)||function(e,t,r){"__proto__"==t&&xt?xt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}(e,t,r)},kt=function(e,t,r,n){if(!(0,l.Z)(e))return e;for(var o=-1,i=(t=yt(t,e)).length,s=i-1,a=e;null!=a&&++o<i;){var c=vt(t[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var f=a[c];void 0===(u=n?n(f,c,a):void 0)&&(u=(0,l.Z)(f)?f:fe(t[o+1])?[]:{})}Ct(a,c,u),a=a[c]}return e};var Ft=r(2513);const jt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Q(t,K(e)),e=(0,Ft.Z)(e);return t}:J;var Pt=Object.prototype.hasOwnProperty;const Lt=function(e){if(!(0,l.Z)(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=xe(e),r=[];for(var n in e)("constructor"!=n||!t&&Pt.call(e,n))&&r.push(n);return r},It=function(e){return ke(e)?Ee(e,!0):Lt(e)},Tt=function(e,t){if(null==e)return{};var r,o=n(function(e){return $(e,It,jt)}(e),(function(e){return[e]}));return t="function"==typeof(r=t)?r:null==r?Et:"object"==typeof r?(0,Z.default)(r)?_t(r[0],r[1]):rt(r):St(r),function(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var s=t[n],a=At(e,s);r(a,s)&&kt(i,yt(s,e),a)}return i}(e,o,(function(e,r){return t(e,r[0])}))}},3782:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});var n=/\s/;var o=/^\s+/;const i=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}(e)+1).replace(o,""):e};var s=r(7226),a=r(2714),c=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,f=parseInt;const d=function(e){if("number"==typeof e)return e;if((0,a.Z)(e))return NaN;if((0,s.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,s.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var r=u.test(e);return r||l.test(e)?f(e.slice(2),r?2:8):c.test(e)?NaN:+e}},4046:e=>{"use strict";e.exports=JSON.parse('{"name":"got","version":"9.6.0","description":"Simplified HTTP requests","license":"MIT","repository":"sindresorhus/got","main":"source","engines":{"node":">=8.6"},"scripts":{"test":"xo && nyc ava","release":"np"},"files":["source"],"keywords":["http","https","get","got","url","uri","request","util","utility","simple","curl","wget","fetch","net","network","electron"],"dependencies":{"@sindresorhus/is":"^0.14.0","@szmarczak/http-timer":"^1.1.2","cacheable-request":"^6.0.0","decompress-response":"^3.3.0","duplexer3":"^0.1.4","get-stream":"^4.1.0","lowercase-keys":"^1.0.1","mimic-response":"^1.0.1","p-cancelable":"^1.0.0","to-readable-stream":"^1.0.0","url-parse-lax":"^3.0.0"},"devDependencies":{"ava":"^1.1.0","coveralls":"^3.0.0","delay":"^4.1.0","form-data":"^2.3.3","get-port":"^4.0.0","np":"^3.1.0","nyc":"^13.1.0","p-event":"^2.1.0","pem":"^1.13.2","proxyquire":"^2.0.1","sinon":"^7.2.2","slow-stream":"0.0.4","tempfile":"^2.0.0","tempy":"^0.2.1","tough-cookie":"^3.0.0","xo":"^0.24.0"},"ava":{"concurrency":4},"browser":{"decompress-response":false,"electron":false}}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__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})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};(()=>{"use strict";var e=__webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0});const t=__webpack_require__(1017),r=__webpack_require__(5674),n=__webpack_require__(7461),o=__webpack_require__(7541),i=__webpack_require__(3469),s=__webpack_require__(9144),a=__webpack_require__(9228),c=__webpack_require__(2392);new class{constructor(){n.program.command("pack").argument("[project path]").description("Pack map").option("-o --output <output>","Output map path","").option("-t --target <map>","Map file/folder path","").option("-c --classic","Compile Classic Edition",!1).option("-r --release","Compile Debug/Release?",!1).action((async(e,n)=>{i.runtime.rootPath=e,await s.env.config.reload(),s.env.config.isClassic=n.classic,s.env.config.isRelease=n.release,s.env.config.projectConfig.mapdir=t.isAbsolute(n.target)?t.resolve(n.target):t.resolve(e,n.target),await o.objediting.execute(),n.release?(await a.releaseCompiler.execute(),await c.releasePacker.execute()):(await a.debugCompiler.execute(),await c.debugPacker.execute()),n.target.length>0&&(await r.mkdirp(t.dirname(n.output)),await r.copyFile(s.env.outFilePath,n.output)),console.log("finished!")})),n.program.parse(process.argv)}}})(),module.exports=__webpack_exports__})();
|
|
3
|
+
//# sourceMappingURL=cli.js.map
|