2 lines
113 KiB
JavaScript
2 lines
113 KiB
JavaScript
require('./sourcemap-register.js');module.exports=(()=>{var t={7351:function(t,e,n){"use strict";var i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const r=i(n(2087));const o=n(5278);function issueCommand(t,e,n){const i=new Command(t,e,n);process.stdout.write(i.toString()+r.EOL)}e.issueCommand=issueCommand;function issue(t,e=""){issueCommand(t,{},e)}e.issue=issue;const a="::";class Command{constructor(t,e,n){if(!t){t="missing.command"}this.command=t;this.properties=e;this.message=n}toString(){let t=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let e=true;for(const n in this.properties){if(this.properties.hasOwnProperty(n)){const i=this.properties[n];if(i){if(e){e=false}else{t+=","}t+=`${n}=${escapeProperty(i)}`}}}}t+=`${a}${escapeData(this.message)}`;return t}}function escapeData(t){return o.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(t){return o.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(t,e,n){"use strict";var i=this&&this.__awaiter||function(t,e,n,i){function adopt(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?n(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())})};var r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const o=n(7351);const a=n(717);const s=n(5278);const c=r(n(2087));const u=r(n(5622));var f;(function(t){t[t["Success"]=0]="Success";t[t["Failure"]=1]="Failure"})(f=e.ExitCode||(e.ExitCode={}));function exportVariable(t,e){const n=s.toCommandValue(e);process.env[t]=n;const i=process.env["GITHUB_ENV"]||"";if(i){const e="_GitHubActionsFileCommandDelimeter_";const i=`${t}<<${e}${c.EOL}${n}${c.EOL}${e}`;a.issueCommand("ENV",i)}else{o.issueCommand("set-env",{name:t},n)}}e.exportVariable=exportVariable;function setSecret(t){o.issueCommand("add-mask",{},t)}e.setSecret=setSecret;function addPath(t){const e=process.env["GITHUB_PATH"]||"";if(e){a.issueCommand("PATH",t)}else{o.issueCommand("add-path",{},t)}process.env["PATH"]=`${t}${u.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(t,e){const n=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!n){throw new Error(`Input required and not supplied: ${t}`)}return n.trim()}e.getInput=getInput;function setOutput(t,e){o.issueCommand("set-output",{name:t},e)}e.setOutput=setOutput;function setCommandEcho(t){o.issue("echo",t?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(t){process.exitCode=f.Failure;error(t)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(t){o.issueCommand("debug",{},t)}e.debug=debug;function error(t){o.issue("error",t instanceof Error?t.toString():t)}e.error=error;function warning(t){o.issue("warning",t instanceof Error?t.toString():t)}e.warning=warning;function info(t){process.stdout.write(t+c.EOL)}e.info=info;function startGroup(t){o.issue("group",t)}e.startGroup=startGroup;function endGroup(){o.issue("endgroup")}e.endGroup=endGroup;function group(t,e){return i(this,void 0,void 0,function*(){startGroup(t);let n;try{n=yield e()}finally{endGroup()}return n})}e.group=group;function saveState(t,e){o.issueCommand("save-state",{name:t},e)}e.saveState=saveState;function getState(t){return process.env[`STATE_${t}`]||""}e.getState=getState},717:function(t,e,n){"use strict";var i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(Object.hasOwnProperty.call(t,n))e[n]=t[n];e["default"]=t;return e};Object.defineProperty(e,"__esModule",{value:true});const r=i(n(5747));const o=i(n(2087));const a=n(5278);function issueCommand(t,e){const n=process.env[`GITHUB_${t}`];if(!n){throw new Error(`Unable to find environment variable for file command ${t}`)}if(!r.existsSync(n)){throw new Error(`Missing file at path: ${n}`)}r.appendFileSync(n,`${a.toCommandValue(e)}${o.EOL}`,{encoding:"utf8"})}e.issueCommand=issueCommand},5278:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});function toCommandValue(t){if(t===null||t===undefined){return""}else if(typeof t==="string"||t instanceof String){return t}return JSON.stringify(t)}e.toCommandValue=toCommandValue},7888:function(t,e){(function(t,n){true?n(e):0})(this,function(t){"use strict";function apply(t,...e){return(...n)=>t(...e,...n)}function initialParams(t){return function(...e){var n=e.pop();return t.call(this,e,n)}}var e=typeof setImmediate==="function"&&setImmediate;var n=typeof process==="object"&&typeof process.nextTick==="function";function fallback(t){setTimeout(t,0)}function wrap(t){return(e,...n)=>t(()=>e(...n))}var i;if(e){i=setImmediate}else if(n){i=process.nextTick}else{i=fallback}var r=wrap(i);function asyncify(t){if(isAsync(t)){return function(...e){const n=e.pop();const i=t.apply(this,e);return handlePromise(i,n)}}return initialParams(function(e,n){var i;try{i=t.apply(this,e)}catch(t){return n(t)}if(i&&typeof i.then==="function"){return handlePromise(i,n)}else{n(null,i)}})}function handlePromise(t,e){return t.then(t=>{invokeCallback(e,null,t)},t=>{invokeCallback(e,t&&t.message?t:new Error(t))})}function invokeCallback(t,e,n){try{t(e,n)}catch(t){r(t=>{throw t},t)}}function isAsync(t){return t[Symbol.toStringTag]==="AsyncFunction"}function isAsyncGenerator(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function isAsyncIterable(t){return typeof t[Symbol.asyncIterator]==="function"}function wrapAsync(t){if(typeof t!=="function")throw new Error("expected a function");return isAsync(t)?asyncify(t):t}function awaitify(t,e=t.length){if(!e)throw new Error("arity is undefined");function awaitable(...n){if(typeof n[e-1]==="function"){return t.apply(this,n)}return new Promise((i,r)=>{n[e-1]=((t,...e)=>{if(t)return r(t);i(e.length>1?e:e[0])});t.apply(this,n)})}return awaitable}function applyEach(t){return function applyEach(e,...n){const i=awaitify(function(i){var r=this;return t(e,(t,e)=>{wrapAsync(t).apply(r,n.concat(e))},i)});return i}}function _asyncMap(t,e,n,i){e=e||[];var r=[];var o=0;var a=wrapAsync(n);return t(e,(t,e,n)=>{var i=o++;a(t,(t,e)=>{r[i]=e;n(t)})},t=>{i(t,r)})}function isArrayLike(t){return t&&typeof t.length==="number"&&t.length>=0&&t.length%1===0}const o={};function once(t){function wrapper(...e){if(t===null)return;var n=t;t=null;n.apply(this,e)}Object.assign(wrapper,t);return wrapper}function getIterator(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}function createArrayIterator(t){var e=-1;var n=t.length;return function next(){return++e<n?{value:t[e],key:e}:null}}function createES2015Iterator(t){var e=-1;return function next(){var n=t.next();if(n.done)return null;e++;return{value:n.value,key:e}}}function createObjectIterator(t){var e=t?Object.keys(t):[];var n=-1;var i=e.length;return function next(){var r=e[++n];return n<i?{value:t[r],key:r}:null}}function createIterator(t){if(isArrayLike(t)){return createArrayIterator(t)}var e=getIterator(t);return e?createES2015Iterator(e):createObjectIterator(t)}function onlyOnce(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var n=t;t=null;n.apply(this,e)}}function asyncEachOfLimit(t,e,n,i){let r=false;let a=false;let s=false;let c=0;let u=0;function replenish(){if(c>=e||s||r)return;s=true;t.next().then(({value:t,done:e})=>{if(a||r)return;s=false;if(e){r=true;if(c<=0){i(null)}return}c++;n(t,u,iterateeCallback);u++;replenish()}).catch(handleError)}function iterateeCallback(t,e){c-=1;if(a)return;if(t)return handleError(t);if(t===false){r=true;a=true;return}if(e===o||r&&c<=0){r=true;return i(null)}replenish()}function handleError(t){if(a)return;s=false;r=true;i(t)}replenish()}var a=t=>{return(e,n,i)=>{i=once(i);if(t<=0){throw new RangeError("concurrency limit cannot be less than 1")}if(!e){return i(null)}if(isAsyncGenerator(e)){return asyncEachOfLimit(e,t,n,i)}if(isAsyncIterable(e)){return asyncEachOfLimit(e[Symbol.asyncIterator](),t,n,i)}var r=createIterator(e);var a=false;var s=false;var c=0;var u=false;function iterateeCallback(t,e){if(s)return;c-=1;if(t){a=true;i(t)}else if(t===false){a=true;s=true}else if(e===o||a&&c<=0){a=true;return i(null)}else if(!u){replenish()}}function replenish(){u=true;while(c<t&&!a){var e=r();if(e===null){a=true;if(c<=0){i(null)}return}c+=1;n(e.value,e.key,onlyOnce(iterateeCallback))}u=false}replenish()}};function eachOfLimit$1(t,e,n,i){return a(e)(t,wrapAsync(n),i)}var s=awaitify(eachOfLimit$1,4);function eachOfArrayLike(t,e,n){n=once(n);var i=0,r=0,{length:a}=t,s=false;if(a===0){n(null)}function iteratorCallback(t,e){if(t===false){s=true}if(s===true)return;if(t){n(t)}else if(++r===a||e===o){n(null)}}for(;i<a;i++){e(t[i],i,onlyOnce(iteratorCallback))}}function eachOfGeneric(t,e,n){return s(t,Infinity,e,n)}function eachOf(t,e,n){var i=isArrayLike(t)?eachOfArrayLike:eachOfGeneric;return i(t,wrapAsync(e),n)}var c=awaitify(eachOf,3);function map(t,e,n){return _asyncMap(c,t,e,n)}var u=awaitify(map,3);var f=applyEach(u);function eachOfSeries(t,e,n){return s(t,1,e,n)}var l=awaitify(eachOfSeries,3);function mapSeries(t,e,n){return _asyncMap(l,t,e,n)}var h=awaitify(mapSeries,3);var y=applyEach(h);const m=Symbol("promiseCallback");function promiseCallback(){let t,e;function callback(n,...i){if(n)return e(n);t(i.length>1?i:i[0])}callback[m]=new Promise((n,i)=>{t=n,e=i});return callback}function auto(t,e,n){if(typeof e!=="number"){n=e;e=null}n=once(n||promiseCallback());var i=Object.keys(t).length;if(!i){return n(null)}if(!e){e=i}var r={};var o=0;var a=false;var s=false;var c=Object.create(null);var u=[];var f=[];var l={};Object.keys(t).forEach(e=>{var n=t[e];if(!Array.isArray(n)){enqueueTask(e,[n]);f.push(e);return}var i=n.slice(0,n.length-1);var r=i.length;if(r===0){enqueueTask(e,n);f.push(e);return}l[e]=r;i.forEach(o=>{if(!t[o]){throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+o+"` in "+i.join(", "))}addListener(o,()=>{r--;if(r===0){enqueueTask(e,n)}})})});checkForDeadlocks();processQueue();function enqueueTask(t,e){u.push(()=>runTask(t,e))}function processQueue(){if(a)return;if(u.length===0&&o===0){return n(null,r)}while(u.length&&o<e){var t=u.shift();t()}}function addListener(t,e){var n=c[t];if(!n){n=c[t]=[]}n.push(e)}function taskComplete(t){var e=c[t]||[];e.forEach(t=>t());processQueue()}function runTask(t,e){if(s)return;var i=onlyOnce((e,...i)=>{o--;if(e===false){a=true;return}if(i.length<2){[i]=i}if(e){var u={};Object.keys(r).forEach(t=>{u[t]=r[t]});u[t]=i;s=true;c=Object.create(null);if(a)return;n(e,u)}else{r[t]=i;taskComplete(t)}});o++;var u=wrapAsync(e[e.length-1]);if(e.length>1){u(r,i)}else{u(i)}}function checkForDeadlocks(){var t;var e=0;while(f.length){t=f.pop();e++;getDependents(t).forEach(t=>{if(--l[t]===0){f.push(t)}})}if(e!==i){throw new Error("async.auto cannot execute tasks due to a recursive dependency")}}function getDependents(e){var n=[];Object.keys(t).forEach(i=>{const r=t[i];if(Array.isArray(r)&&r.indexOf(e)>=0){n.push(i)}});return n}return n[m]}var d=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/;var p=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/;var g=/,/;var v=/(=.+)?(\s*)$/;var w=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function parseParams(t){const e=t.toString().replace(w,"");let n=e.match(d);if(!n){n=e.match(p)}if(!n)throw new Error("could not parse args in autoInject\nSource:\n"+e);let[,i]=n;return i.replace(/\s/g,"").split(g).map(t=>t.replace(v,"").trim())}function autoInject(t,e){var n={};Object.keys(t).forEach(e=>{var i=t[e];var r;var o=isAsync(i);var a=!o&&i.length===1||o&&i.length===0;if(Array.isArray(i)){r=[...i];i=r.pop();n[e]=r.concat(r.length>0?newTask:i)}else if(a){n[e]=i}else{r=parseParams(i);if(i.length===0&&!o&&r.length===0){throw new Error("autoInject task functions require explicit parameters.")}if(!o)r.pop();n[e]=r.concat(newTask)}function newTask(t,e){var n=r.map(e=>t[e]);n.push(e);wrapAsync(i)(...n)}});return auto(n,e)}class DLL{constructor(){this.head=this.tail=null;this.length=0}removeLink(t){if(t.prev)t.prev.next=t.next;else this.head=t.next;if(t.next)t.next.prev=t.prev;else this.tail=t.prev;t.prev=t.next=null;this.length-=1;return t}empty(){while(this.head)this.shift();return this}insertAfter(t,e){e.prev=t;e.next=t.next;if(t.next)t.next.prev=e;else this.tail=e;t.next=e;this.length+=1}insertBefore(t,e){e.prev=t.prev;e.next=t;if(t.prev)t.prev.next=e;else this.head=e;t.prev=e;this.length+=1}unshift(t){if(this.head)this.insertBefore(this.head,t);else setInitial(this,t)}push(t){if(this.tail)this.insertAfter(this.tail,t);else setInitial(this,t)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){var t=this.head;while(t){yield t.data;t=t.next}}remove(t){var e=this.head;while(e){var{next:n}=e;if(t(e)){this.removeLink(e)}e=n}return this}}function setInitial(t,e){t.length=1;t.head=t.tail=e}function queue(t,e,n){if(e==null){e=1}else if(e===0){throw new RangeError("Concurrency must not be zero")}var i=wrapAsync(t);var o=0;var a=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function on(t,e){s[t].push(e)}function once(t,e){const n=(...i)=>{off(t,n);e(...i)};s[t].push(n)}function off(t,e){if(!t)return Object.keys(s).forEach(t=>s[t]=[]);if(!e)return s[t]=[];s[t]=s[t].filter(t=>t!==e)}function trigger(t,...e){s[t].forEach(t=>t(...e))}var c=false;function _insert(t,e,n,i){if(i!=null&&typeof i!=="function"){throw new Error("task callback must be a function")}l.started=true;var o,a;function promiseCallback(t,...e){if(t)return n?a(t):o();if(e.length<=1)return o(e[0]);o(e)}var s={data:t,callback:n?promiseCallback:i||promiseCallback};if(e){l._tasks.unshift(s)}else{l._tasks.push(s)}if(!c){c=true;r(()=>{c=false;l.process()})}if(n||!i){return new Promise((t,e)=>{o=t;a=e})}}function _createCB(t){return function(e,...n){o-=1;for(var i=0,r=t.length;i<r;i++){var s=t[i];var c=a.indexOf(s);if(c===0){a.shift()}else if(c>0){a.splice(c,1)}s.callback(e,...n);if(e!=null){trigger("error",e,s.data)}}if(o<=l.concurrency-l.buffer){trigger("unsaturated")}if(l.idle()){trigger("drain")}l.process()}}function _maybeDrain(t){if(t.length===0&&l.idle()){r(()=>trigger("drain"));return true}return false}const u=t=>e=>{if(!e){return new Promise((e,n)=>{once(t,(t,i)=>{if(t)return n(t);e(i)})})}off(t);on(t,e)};var f=false;var l={_tasks:new DLL,*[Symbol.iterator](){yield*l._tasks[Symbol.iterator]()},concurrency:e,payload:n,buffer:e/4,started:false,paused:false,push(t,e){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map(t=>_insert(t,false,false,e))}return _insert(t,false,false,e)},pushAsync(t,e){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map(t=>_insert(t,false,true,e))}return _insert(t,false,true,e)},kill(){off();l._tasks.empty()},unshift(t,e){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map(t=>_insert(t,true,false,e))}return _insert(t,true,false,e)},unshiftAsync(t,e){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map(t=>_insert(t,true,true,e))}return _insert(t,true,true,e)},remove(t){l._tasks.remove(t)},process(){if(f){return}f=true;while(!l.paused&&o<l.concurrency&&l._tasks.length){var t=[],e=[];var n=l._tasks.length;if(l.payload)n=Math.min(n,l.payload);for(var r=0;r<n;r++){var s=l._tasks.shift();t.push(s);a.push(s);e.push(s.data)}o+=1;if(l._tasks.length===0){trigger("empty")}if(o===l.concurrency){trigger("saturated")}var c=onlyOnce(_createCB(t));i(e,c)}f=false},length(){return l._tasks.length},running(){return o},workersList(){return a},idle(){return l._tasks.length+o===0},pause(){l.paused=true},resume(){if(l.paused===false){return}l.paused=false;r(l.process)}};Object.defineProperties(l,{saturated:{writable:false,value:u("saturated")},unsaturated:{writable:false,value:u("unsaturated")},empty:{writable:false,value:u("empty")},drain:{writable:false,value:u("drain")},error:{writable:false,value:u("error")}});return l}function cargo(t,e){return queue(t,1,e)}function cargo$1(t,e,n){return queue(t,e,n)}function reduce(t,e,n,i){i=once(i);var r=wrapAsync(n);return l(t,(t,n,i)=>{r(e,t,(t,n)=>{e=n;i(t)})},t=>i(t,e))}var E=awaitify(reduce,4);function seq(...t){var e=t.map(wrapAsync);return function(...t){var n=this;var i=t[t.length-1];if(typeof i=="function"){t.pop()}else{i=promiseCallback()}E(e,t,(t,e,i)=>{e.apply(n,t.concat((t,...e)=>{i(t,e)}))},(t,e)=>i(t,...e));return i[m]}}function compose(...t){return seq(...t.reverse())}function mapLimit(t,e,n,i){return _asyncMap(a(e),t,n,i)}var S=awaitify(mapLimit,4);function concatLimit(t,e,n,i){var r=wrapAsync(n);return S(t,e,(t,e)=>{r(t,(t,...n)=>{if(t)return e(t);return e(t,n)})},(t,e)=>{var n=[];for(var r=0;r<e.length;r++){if(e[r]){n=n.concat(...e[r])}}return i(t,n)})}var T=awaitify(concatLimit,4);function concat(t,e,n){return T(t,Infinity,e,n)}var b=awaitify(concat,3);function concatSeries(t,e,n){return T(t,1,e,n)}var F=awaitify(concatSeries,3);function constant(...t){return function(...e){var n=e.pop();return n(null,...t)}}function _createTester(t,e){return(n,i,r,a)=>{var s=false;var c;const u=wrapAsync(r);n(i,(n,i,r)=>{u(n,(i,a)=>{if(i||i===false)return r(i);if(t(a)&&!c){s=true;c=e(true,n);return r(null,o)}r()})},t=>{if(t)return a(t);a(null,s?c:e(false))})}}function detect(t,e,n){return _createTester(t=>t,(t,e)=>e)(c,t,e,n)}var x=awaitify(detect,3);function detectLimit(t,e,n,i){return _createTester(t=>t,(t,e)=>e)(a(e),t,n,i)}var A=awaitify(detectLimit,4);function detectSeries(t,e,n){return _createTester(t=>t,(t,e)=>e)(a(1),t,e,n)}var _=awaitify(detectSeries,3);function consoleFunc(t){return(e,...n)=>wrapAsync(e)(...n,(e,...n)=>{if(typeof console==="object"){if(e){if(console.error){console.error(e)}}else if(console[t]){n.forEach(e=>console[t](e))}}})}var O=consoleFunc("dir");function doWhilst(t,e,n){n=onlyOnce(n);var i=wrapAsync(t);var r=wrapAsync(e);var o;function next(t,...e){if(t)return n(t);if(t===false)return;o=e;r(...e,check)}function check(t,e){if(t)return n(t);if(t===false)return;if(!e)return n(null,...o);i(next)}return check(null,true)}var C=awaitify(doWhilst,3);function doUntil(t,e,n){const i=wrapAsync(e);return C(t,(...t)=>{const e=t.pop();i(...t,(t,n)=>e(t,!n))},n)}function _withoutIndex(t){return(e,n,i)=>t(e,i)}function eachLimit(t,e,n){return c(t,_withoutIndex(wrapAsync(e)),n)}var N=awaitify(eachLimit,3);function eachLimit$1(t,e,n,i){return a(e)(t,_withoutIndex(wrapAsync(n)),i)}var I=awaitify(eachLimit$1,4);function eachSeries(t,e,n){return I(t,1,e,n)}var D=awaitify(eachSeries,3);function ensureAsync(t){if(isAsync(t))return t;return function(...e){var n=e.pop();var i=true;e.push((...t)=>{if(i){r(()=>n(...t))}else{n(...t)}});t.apply(this,e);i=false}}function every(t,e,n){return _createTester(t=>!t,t=>!t)(c,t,e,n)}var k=awaitify(every,3);function everyLimit(t,e,n,i){return _createTester(t=>!t,t=>!t)(a(e),t,n,i)}var L=awaitify(everyLimit,4);function everySeries(t,e,n){return _createTester(t=>!t,t=>!t)(l,t,e,n)}var P=awaitify(everySeries,3);function filterArray(t,e,n,i){var r=new Array(e.length);t(e,(t,e,i)=>{n(t,(t,n)=>{r[e]=!!n;i(t)})},t=>{if(t)return i(t);var n=[];for(var o=0;o<e.length;o++){if(r[o])n.push(e[o])}i(null,n)})}function filterGeneric(t,e,n,i){var r=[];t(e,(t,e,i)=>{n(t,(n,o)=>{if(n)return i(n);if(o){r.push({index:e,value:t})}i(n)})},t=>{if(t)return i(t);i(null,r.sort((t,e)=>t.index-e.index).map(t=>t.value))})}function _filter(t,e,n,i){var r=isArrayLike(e)?filterArray:filterGeneric;return r(t,e,wrapAsync(n),i)}function filter(t,e,n){return _filter(c,t,e,n)}var j=awaitify(filter,3);function filterLimit(t,e,n,i){return _filter(a(e),t,n,i)}var B=awaitify(filterLimit,4);function filterSeries(t,e,n){return _filter(l,t,e,n)}var R=awaitify(filterSeries,3);function forever(t,e){var n=onlyOnce(e);var i=wrapAsync(ensureAsync(t));function next(t){if(t)return n(t);if(t===false)return;i(next)}return next()}var K=awaitify(forever,2);function groupByLimit(t,e,n,i){var r=wrapAsync(n);return S(t,e,(t,e)=>{r(t,(n,i)=>{if(n)return e(n);return e(n,{key:i,val:t})})},(t,e)=>{var n={};var{hasOwnProperty:r}=Object.prototype;for(var o=0;o<e.length;o++){if(e[o]){var{key:a}=e[o];var{val:s}=e[o];if(r.call(n,a)){n[a].push(s)}else{n[a]=[s]}}}return i(t,n)})}var M=awaitify(groupByLimit,4);function groupBy(t,e,n){return M(t,Infinity,e,n)}function groupBySeries(t,e,n){return M(t,1,e,n)}var $=consoleFunc("log");function mapValuesLimit(t,e,n,i){i=once(i);var r={};var o=wrapAsync(n);return a(e)(t,(t,e,n)=>{o(t,e,(t,i)=>{if(t)return n(t);r[e]=i;n(t)})},t=>i(t,r))}var W=awaitify(mapValuesLimit,4);function mapValues(t,e,n){return W(t,Infinity,e,n)}function mapValuesSeries(t,e,n){return W(t,1,e,n)}function memoize(t,e=(t=>t)){var n=Object.create(null);var i=Object.create(null);var o=wrapAsync(t);var a=initialParams((t,a)=>{var s=e(...t);if(s in n){r(()=>a(null,...n[s]))}else if(s in i){i[s].push(a)}else{i[s]=[a];o(...t,(t,...e)=>{if(!t){n[s]=e}var r=i[s];delete i[s];for(var o=0,a=r.length;o<a;o++){r[o](t,...e)}})}});a.memo=n;a.unmemoized=t;return a}var U;if(n){U=process.nextTick}else if(e){U=setImmediate}else{U=fallback}var G=wrap(U);var V=awaitify((t,e,n)=>{var i=isArrayLike(e)?[]:{};t(e,(t,e,n)=>{wrapAsync(t)((t,...r)=>{if(r.length<2){[r]=r}i[e]=r;n(t)})},t=>n(t,i))},3);function parallel$1(t,e){return V(c,t,e)}function parallelLimit(t,e,n){return V(a(e),t,n)}function queue$1(t,e){var n=wrapAsync(t);return queue((t,e)=>{n(t[0],e)},e,1)}class Heap{constructor(){this.heap=[];this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){this.heap=[];return this}percUp(t){let e;while(t>0&&smaller(this.heap[t],this.heap[e=parent(t)])){let n=this.heap[t];this.heap[t]=this.heap[e];this.heap[e]=n;t=e}}percDown(t){let e;while((e=leftChi(t))<this.heap.length){if(e+1<this.heap.length&&smaller(this.heap[e+1],this.heap[e])){e=e+1}if(smaller(this.heap[t],this.heap[e])){break}let n=this.heap[t];this.heap[t]=this.heap[e];this.heap[e]=n;t=e}}push(t){t.pushCount=++this.pushCount;this.heap.push(t);this.percUp(this.heap.length-1)}unshift(t){return this.heap.push(t)}shift(){let[t]=this.heap;this.heap[0]=this.heap[this.heap.length-1];this.heap.pop();this.percDown(0);return t}toArray(){return[...this]}*[Symbol.iterator](){for(let t=0;t<this.heap.length;t++){yield this.heap[t].data}}remove(t){let e=0;for(let n=0;n<this.heap.length;n++){if(!t(this.heap[n])){this.heap[e]=this.heap[n];e++}}this.heap.splice(e);for(let t=parent(this.heap.length-1);t>=0;t--){this.percDown(t)}return this}}function leftChi(t){return(t<<1)+1}function parent(t){return(t+1>>1)-1}function smaller(t,e){if(t.priority!==e.priority){return t.priority<e.priority}else{return t.pushCount<e.pushCount}}function priorityQueue(t,e){var n=queue$1(t,e);n._tasks=new Heap;n.push=function(t,e=0,i=(()=>{})){if(typeof i!=="function"){throw new Error("task callback must be a function")}n.started=true;if(!Array.isArray(t)){t=[t]}if(t.length===0&&n.idle()){return r(()=>n.drain())}for(var o=0,a=t.length;o<a;o++){var s={data:t[o],priority:e,callback:i};n._tasks.push(s)}r(n.process)};delete n.unshift;return n}function race(t,e){e=once(e);if(!Array.isArray(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var n=0,i=t.length;n<i;n++){wrapAsync(t[n])(e)}}var q=awaitify(race,2);function reduceRight(t,e,n,i){var r=[...t].reverse();return E(r,e,n,i)}function reflect(t){var e=wrapAsync(t);return initialParams(function reflectOn(t,n){t.push((t,...e)=>{let i={};if(t){i.error=t}if(e.length>0){var r=e;if(e.length<=1){[r]=e}i.value=r}n(null,i)});return e.apply(this,t)})}function reflectAll(t){var e;if(Array.isArray(t)){e=t.map(reflect)}else{e={};Object.keys(t).forEach(n=>{e[n]=reflect.call(this,t[n])})}return e}function reject(t,e,n,i){const r=wrapAsync(n);return _filter(t,e,(t,e)=>{r(t,(t,n)=>{e(t,!n)})},i)}function reject$1(t,e,n){return reject(c,t,e,n)}var Y=awaitify(reject$1,3);function rejectLimit(t,e,n,i){return reject(a(e),t,n,i)}var Q=awaitify(rejectLimit,4);function rejectSeries(t,e,n){return reject(l,t,e,n)}var J=awaitify(rejectSeries,3);function constant$1(t){return function(){return t}}const H=5;const X=0;function retry(t,e,n){var i={times:H,intervalFunc:constant$1(X)};if(arguments.length<3&&typeof t==="function"){n=e||promiseCallback();e=t}else{parseTimes(i,t);n=n||promiseCallback()}if(typeof e!=="function"){throw new Error("Invalid arguments for async.retry")}var r=wrapAsync(e);var o=1;function retryAttempt(){r((t,...e)=>{if(t===false)return;if(t&&o++<i.times&&(typeof i.errorFilter!="function"||i.errorFilter(t))){setTimeout(retryAttempt,i.intervalFunc(o-1))}else{n(t,...e)}})}retryAttempt();return n[m]}function parseTimes(t,e){if(typeof e==="object"){t.times=+e.times||H;t.intervalFunc=typeof e.interval==="function"?e.interval:constant$1(+e.interval||X);t.errorFilter=e.errorFilter}else if(typeof e==="number"||typeof e==="string"){t.times=+e||H}else{throw new Error("Invalid arguments for async.retry")}}function retryable(t,e){if(!e){e=t;t=null}let n=t&&t.arity||e.length;if(isAsync(e)){n+=1}var i=wrapAsync(e);return initialParams((e,r)=>{if(e.length<n-1||r==null){e.push(r);r=promiseCallback()}function taskFn(t){i(...e,t)}if(t)retry(t,taskFn,r);else retry(taskFn,r);return r[m]})}function series(t,e){return V(l,t,e)}function some(t,e,n){return _createTester(Boolean,t=>t)(c,t,e,n)}var z=awaitify(some,3);function someLimit(t,e,n,i){return _createTester(Boolean,t=>t)(a(e),t,n,i)}var Z=awaitify(someLimit,4);function someSeries(t,e,n){return _createTester(Boolean,t=>t)(l,t,e,n)}var tt=awaitify(someSeries,3);function sortBy(t,e,n){var i=wrapAsync(e);return u(t,(t,e)=>{i(t,(n,i)=>{if(n)return e(n);e(n,{value:t,criteria:i})})},(t,e)=>{if(t)return n(t);n(null,e.sort(comparator).map(t=>t.value))});function comparator(t,e){var n=t.criteria,i=e.criteria;return n<i?-1:n>i?1:0}}var et=awaitify(sortBy,3);function timeout(t,e,n){var i=wrapAsync(t);return initialParams((r,o)=>{var a=false;var s;function timeoutCallback(){var e=t.name||"anonymous";var i=new Error('Callback function "'+e+'" timed out.');i.code="ETIMEDOUT";if(n){i.info=n}a=true;o(i)}r.push((...t)=>{if(!a){o(...t);clearTimeout(s)}});s=setTimeout(timeoutCallback,e);i(...r)})}function range(t){var e=Array(t);while(t--){e[t]=t}return e}function timesLimit(t,e,n,i){var r=wrapAsync(n);return S(range(t),e,r,i)}function times(t,e,n){return timesLimit(t,Infinity,e,n)}function timesSeries(t,e,n){return timesLimit(t,1,e,n)}function transform(t,e,n,i){if(arguments.length<=3&&typeof e==="function"){i=n;n=e;e=Array.isArray(t)?[]:{}}i=once(i||promiseCallback());var r=wrapAsync(n);c(t,(t,n,i)=>{r(e,t,n,i)},t=>i(t,e));return i[m]}function tryEach(t,e){var n=null;var i;return D(t,(t,e)=>{wrapAsync(t)((t,...r)=>{if(t===false)return e(t);if(r.length<2){[i]=r}else{i=r}n=t;e(t?null:{})})},()=>e(n,i))}var nt=awaitify(tryEach);function unmemoize(t){return(...e)=>{return(t.unmemoized||t)(...e)}}function whilst(t,e,n){n=onlyOnce(n);var i=wrapAsync(e);var r=wrapAsync(t);var o=[];function next(t,...e){if(t)return n(t);o=e;if(t===false)return;r(check)}function check(t,e){if(t)return n(t);if(t===false)return;if(!e)return n(null,...o);i(next)}return r(check)}var it=awaitify(whilst,3);function until(t,e,n){const i=wrapAsync(t);return it(t=>i((e,n)=>t(e,!n)),e,n)}function waterfall(t,e){e=once(e);if(!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var n=0;function nextTask(e){var i=wrapAsync(t[n++]);i(...e,onlyOnce(next))}function next(i,...r){if(i===false)return;if(i||n===t.length){return e(i,...r)}nextTask(r)}nextTask([])}var rt=awaitify(waterfall);var ot={apply:apply,applyEach:f,applyEachSeries:y,asyncify:asyncify,auto:auto,autoInject:autoInject,cargo:cargo,cargoQueue:cargo$1,compose:compose,concat:b,concatLimit:T,concatSeries:F,constant:constant,detect:x,detectLimit:A,detectSeries:_,dir:O,doUntil:doUntil,doWhilst:C,each:N,eachLimit:I,eachOf:c,eachOfLimit:s,eachOfSeries:l,eachSeries:D,ensureAsync:ensureAsync,every:k,everyLimit:L,everySeries:P,filter:j,filterLimit:B,filterSeries:R,forever:K,groupBy:groupBy,groupByLimit:M,groupBySeries:groupBySeries,log:$,map:u,mapLimit:S,mapSeries:h,mapValues:mapValues,mapValuesLimit:W,mapValuesSeries:mapValuesSeries,memoize:memoize,nextTick:G,parallel:parallel$1,parallelLimit:parallelLimit,priorityQueue:priorityQueue,queue:queue$1,race:q,reduce:E,reduceRight:reduceRight,reflect:reflect,reflectAll:reflectAll,reject:Y,rejectLimit:Q,rejectSeries:J,retry:retry,retryable:retryable,seq:seq,series:series,setImmediate:r,some:z,someLimit:Z,someSeries:tt,sortBy:et,timeout:timeout,times:times,timesLimit:timesLimit,timesSeries:timesSeries,transform:transform,tryEach:nt,unmemoize:unmemoize,until:until,waterfall:rt,whilst:it,all:k,allLimit:L,allSeries:P,any:z,anyLimit:Z,anySeries:tt,find:x,findLimit:A,findSeries:_,flatMap:b,flatMapLimit:T,flatMapSeries:F,forEach:N,forEachSeries:D,forEachLimit:I,forEachOf:c,forEachOfSeries:l,forEachOfLimit:s,inject:E,foldl:E,foldr:reduceRight,select:j,selectLimit:B,selectSeries:R,wrapSync:asyncify,during:it,doDuring:C};t.default=ot;t.apply=apply;t.applyEach=f;t.applyEachSeries=y;t.asyncify=asyncify;t.auto=auto;t.autoInject=autoInject;t.cargo=cargo;t.cargoQueue=cargo$1;t.compose=compose;t.concat=b;t.concatLimit=T;t.concatSeries=F;t.constant=constant;t.detect=x;t.detectLimit=A;t.detectSeries=_;t.dir=O;t.doUntil=doUntil;t.doWhilst=C;t.each=N;t.eachLimit=I;t.eachOf=c;t.eachOfLimit=s;t.eachOfSeries=l;t.eachSeries=D;t.ensureAsync=ensureAsync;t.every=k;t.everyLimit=L;t.everySeries=P;t.filter=j;t.filterLimit=B;t.filterSeries=R;t.forever=K;t.groupBy=groupBy;t.groupByLimit=M;t.groupBySeries=groupBySeries;t.log=$;t.map=u;t.mapLimit=S;t.mapSeries=h;t.mapValues=mapValues;t.mapValuesLimit=W;t.mapValuesSeries=mapValuesSeries;t.memoize=memoize;t.nextTick=G;t.parallel=parallel$1;t.parallelLimit=parallelLimit;t.priorityQueue=priorityQueue;t.queue=queue$1;t.race=q;t.reduce=E;t.reduceRight=reduceRight;t.reflect=reflect;t.reflectAll=reflectAll;t.reject=Y;t.rejectLimit=Q;t.rejectSeries=J;t.retry=retry;t.retryable=retryable;t.seq=seq;t.series=series;t.setImmediate=r;t.some=z;t.someLimit=Z;t.someSeries=tt;t.sortBy=et;t.timeout=timeout;t.times=times;t.timesLimit=timesLimit;t.timesSeries=timesSeries;t.transform=transform;t.tryEach=nt;t.unmemoize=unmemoize;t.until=until;t.waterfall=rt;t.whilst=it;t.all=k;t.allLimit=L;t.allSeries=P;t.any=z;t.anyLimit=Z;t.anySeries=tt;t.find=x;t.findLimit=A;t.findSeries=_;t.flatMap=b;t.flatMapLimit=T;t.flatMapSeries=F;t.forEach=N;t.forEachSeries=D;t.forEachLimit=I;t.forEachOf=c;t.forEachOfSeries=l;t.forEachOfLimit=s;t.inject=E;t.foldl=E;t.foldr=reduceRight;t.select=j;t.selectLimit=B;t.selectSeries=R;t.wrapSync=asyncify;t.during=it;t.doDuring=C;Object.defineProperty(t,"__esModule",{value:true})})},5995:t=>{t.exports=(t=>{const e=process.versions.node.split(".").map(t=>parseInt(t,10));t=t.split(".").map(t=>parseInt(t,10));return e[0]>t[0]||e[0]===t[0]&&(e[1]>t[1]||e[1]===t[1]&&e[2]>=t[2])})},3338:(t,e,n)=>{"use strict";const i=n(7758);const r=n(5622);const o=n(8605).mkdirsSync;const a=n(2548).utimesMillisSync;const s=n(3901);function copySync(t,e,n){if(typeof n==="function"){n={filter:n}}n=n||{};n.clobber="clobber"in n?!!n.clobber:true;n.overwrite="overwrite"in n?!!n.overwrite:n.clobber;if(n.preserveTimestamps&&process.arch==="ia32"){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:i,destStat:r}=s.checkPathsSync(t,e,"copy");s.checkParentPathsSync(t,i,e,"copy");return handleFilterAndCopy(r,t,e,n)}function handleFilterAndCopy(t,e,n,a){if(a.filter&&!a.filter(e,n))return;const s=r.dirname(n);if(!i.existsSync(s))o(s);return startCopy(t,e,n,a)}function startCopy(t,e,n,i){if(i.filter&&!i.filter(e,n))return;return getStats(t,e,n,i)}function getStats(t,e,n,r){const o=r.dereference?i.statSync:i.lstatSync;const a=o(e);if(a.isDirectory())return onDir(a,t,e,n,r);else if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return onFile(a,t,e,n,r);else if(a.isSymbolicLink())return onLink(t,e,n,r)}function onFile(t,e,n,i,r){if(!e)return copyFile(t,n,i,r);return mayCopyFile(t,n,i,r)}function mayCopyFile(t,e,n,r){if(r.overwrite){i.unlinkSync(n);return copyFile(t,e,n,r)}else if(r.errorOnExist){throw new Error(`'${n}' already exists`)}}function copyFile(t,e,n,r){i.copyFileSync(e,n);if(r.preserveTimestamps)handleTimestamps(t.mode,e,n);return setDestMode(n,t.mode)}function handleTimestamps(t,e,n){if(fileIsNotWritable(t))makeFileWritable(n,t);return setDestTimestamps(e,n)}function fileIsNotWritable(t){return(t&128)===0}function makeFileWritable(t,e){return setDestMode(t,e|128)}function setDestMode(t,e){return i.chmodSync(t,e)}function setDestTimestamps(t,e){const n=i.statSync(t);return a(e,n.atime,n.mtime)}function onDir(t,e,n,i,r){if(!e)return mkDirAndCopy(t.mode,n,i,r);if(e&&!e.isDirectory()){throw new Error(`Cannot overwrite non-directory '${i}' with directory '${n}'.`)}return copyDir(n,i,r)}function mkDirAndCopy(t,e,n,r){i.mkdirSync(n);copyDir(e,n,r);return setDestMode(n,t)}function copyDir(t,e,n){i.readdirSync(t).forEach(i=>copyDirItem(i,t,e,n))}function copyDirItem(t,e,n,i){const o=r.join(e,t);const a=r.join(n,t);const{destStat:c}=s.checkPathsSync(o,a,"copy");return startCopy(c,o,a,i)}function onLink(t,e,n,o){let a=i.readlinkSync(e);if(o.dereference){a=r.resolve(process.cwd(),a)}if(!t){return i.symlinkSync(a,n)}else{let t;try{t=i.readlinkSync(n)}catch(t){if(t.code==="EINVAL"||t.code==="UNKNOWN")return i.symlinkSync(a,n);throw t}if(o.dereference){t=r.resolve(process.cwd(),t)}if(s.isSrcSubdir(a,t)){throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${t}'.`)}if(i.statSync(n).isDirectory()&&s.isSrcSubdir(t,a)){throw new Error(`Cannot overwrite '${t}' with '${a}'.`)}return copyLink(a,n)}}function copyLink(t,e){i.unlinkSync(e);return i.symlinkSync(t,e)}t.exports=copySync},1135:(t,e,n)=>{"use strict";t.exports={copySync:n(3338)}},8834:(t,e,n)=>{"use strict";const i=n(7758);const r=n(5622);const o=n(8605).mkdirs;const a=n(3835).pathExists;const s=n(2548).utimesMillis;const c=n(3901);function copy(t,e,n,i){if(typeof n==="function"&&!i){i=n;n={}}else if(typeof n==="function"){n={filter:n}}i=i||function(){};n=n||{};n.clobber="clobber"in n?!!n.clobber:true;n.overwrite="overwrite"in n?!!n.overwrite:n.clobber;if(n.preserveTimestamps&&process.arch==="ia32"){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(t,e,"copy",(r,o)=>{if(r)return i(r);const{srcStat:a,destStat:s}=o;c.checkParentPaths(t,a,e,"copy",r=>{if(r)return i(r);if(n.filter)return handleFilter(checkParentDir,s,t,e,n,i);return checkParentDir(s,t,e,n,i)})})}function checkParentDir(t,e,n,i,s){const c=r.dirname(n);a(c,(r,a)=>{if(r)return s(r);if(a)return startCopy(t,e,n,i,s);o(c,r=>{if(r)return s(r);return startCopy(t,e,n,i,s)})})}function handleFilter(t,e,n,i,r,o){Promise.resolve(r.filter(n,i)).then(a=>{if(a)return t(e,n,i,r,o);return o()},t=>o(t))}function startCopy(t,e,n,i,r){if(i.filter)return handleFilter(getStats,t,e,n,i,r);return getStats(t,e,n,i,r)}function getStats(t,e,n,r,o){const a=r.dereference?i.stat:i.lstat;a(e,(i,a)=>{if(i)return o(i);if(a.isDirectory())return onDir(a,t,e,n,r,o);else if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return onFile(a,t,e,n,r,o);else if(a.isSymbolicLink())return onLink(t,e,n,r,o)})}function onFile(t,e,n,i,r,o){if(!e)return copyFile(t,n,i,r,o);return mayCopyFile(t,n,i,r,o)}function mayCopyFile(t,e,n,r,o){if(r.overwrite){i.unlink(n,i=>{if(i)return o(i);return copyFile(t,e,n,r,o)})}else if(r.errorOnExist){return o(new Error(`'${n}' already exists`))}else return o()}function copyFile(t,e,n,r,o){i.copyFile(e,n,i=>{if(i)return o(i);if(r.preserveTimestamps)return handleTimestampsAndMode(t.mode,e,n,o);return setDestMode(n,t.mode,o)})}function handleTimestampsAndMode(t,e,n,i){if(fileIsNotWritable(t)){return makeFileWritable(n,t,r=>{if(r)return i(r);return setDestTimestampsAndMode(t,e,n,i)})}return setDestTimestampsAndMode(t,e,n,i)}function fileIsNotWritable(t){return(t&128)===0}function makeFileWritable(t,e,n){return setDestMode(t,e|128,n)}function setDestTimestampsAndMode(t,e,n,i){setDestTimestamps(e,n,e=>{if(e)return i(e);return setDestMode(n,t,i)})}function setDestMode(t,e,n){return i.chmod(t,e,n)}function setDestTimestamps(t,e,n){i.stat(t,(t,i)=>{if(t)return n(t);return s(e,i.atime,i.mtime,n)})}function onDir(t,e,n,i,r,o){if(!e)return mkDirAndCopy(t.mode,n,i,r,o);if(e&&!e.isDirectory()){return o(new Error(`Cannot overwrite non-directory '${i}' with directory '${n}'.`))}return copyDir(n,i,r,o)}function mkDirAndCopy(t,e,n,r,o){i.mkdir(n,i=>{if(i)return o(i);copyDir(e,n,r,e=>{if(e)return o(e);return setDestMode(n,t,o)})})}function copyDir(t,e,n,r){i.readdir(t,(i,o)=>{if(i)return r(i);return copyDirItems(o,t,e,n,r)})}function copyDirItems(t,e,n,i,r){const o=t.pop();if(!o)return r();return copyDirItem(t,o,e,n,i,r)}function copyDirItem(t,e,n,i,o,a){const s=r.join(n,e);const u=r.join(i,e);c.checkPaths(s,u,"copy",(e,r)=>{if(e)return a(e);const{destStat:c}=r;startCopy(c,s,u,o,e=>{if(e)return a(e);return copyDirItems(t,n,i,o,a)})})}function onLink(t,e,n,o,a){i.readlink(e,(e,s)=>{if(e)return a(e);if(o.dereference){s=r.resolve(process.cwd(),s)}if(!t){return i.symlink(s,n,a)}else{i.readlink(n,(e,u)=>{if(e){if(e.code==="EINVAL"||e.code==="UNKNOWN")return i.symlink(s,n,a);return a(e)}if(o.dereference){u=r.resolve(process.cwd(),u)}if(c.isSrcSubdir(s,u)){return a(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${u}'.`))}if(t.isDirectory()&&c.isSrcSubdir(u,s)){return a(new Error(`Cannot overwrite '${u}' with '${s}'.`))}return copyLink(s,n,a)})}})}function copyLink(t,e,n){i.unlink(e,r=>{if(r)return n(r);return i.symlink(t,e,n)})}t.exports=copy},1335:(t,e,n)=>{"use strict";const i=n(9046).E;t.exports={copy:i(n(8834))}},6970:(t,e,n)=>{"use strict";const i=n(9046).E;const r=n(7758);const o=n(5622);const a=n(8605);const s=n(7357);const c=i(function emptyDir(t,e){e=e||function(){};r.readdir(t,(n,i)=>{if(n)return a.mkdirs(t,e);i=i.map(e=>o.join(t,e));deleteItem();function deleteItem(){const t=i.pop();if(!t)return e();s.remove(t,t=>{if(t)return e(t);deleteItem()})}})});function emptyDirSync(t){let e;try{e=r.readdirSync(t)}catch{return a.mkdirsSync(t)}e.forEach(e=>{e=o.join(t,e);s.removeSync(e)})}t.exports={emptyDirSync:emptyDirSync,emptydirSync:emptyDirSync,emptyDir:c,emptydir:c}},2164:(t,e,n)=>{"use strict";const i=n(9046).E;const r=n(5622);const o=n(7758);const a=n(8605);function createFile(t,e){function makeFile(){o.writeFile(t,"",t=>{if(t)return e(t);e()})}o.stat(t,(n,i)=>{if(!n&&i.isFile())return e();const s=r.dirname(t);o.stat(s,(t,n)=>{if(t){if(t.code==="ENOENT"){return a.mkdirs(s,t=>{if(t)return e(t);makeFile()})}return e(t)}if(n.isDirectory())makeFile();else{o.readdir(s,t=>{if(t)return e(t)})}})})}function createFileSync(t){let e;try{e=o.statSync(t)}catch{}if(e&&e.isFile())return;const n=r.dirname(t);try{if(!o.statSync(n).isDirectory()){o.readdirSync(n)}}catch(t){if(t&&t.code==="ENOENT")a.mkdirsSync(n);else throw t}o.writeFileSync(t,"")}t.exports={createFile:i(createFile),createFileSync:createFileSync}},55:(t,e,n)=>{"use strict";const i=n(2164);const r=n(3797);const o=n(2549);t.exports={createFile:i.createFile,createFileSync:i.createFileSync,ensureFile:i.createFile,ensureFileSync:i.createFileSync,createLink:r.createLink,createLinkSync:r.createLinkSync,ensureLink:r.createLink,ensureLinkSync:r.createLinkSync,createSymlink:o.createSymlink,createSymlinkSync:o.createSymlinkSync,ensureSymlink:o.createSymlink,ensureSymlinkSync:o.createSymlinkSync}},3797:(t,e,n)=>{"use strict";const i=n(9046).E;const r=n(5622);const o=n(7758);const a=n(8605);const s=n(3835).pathExists;function createLink(t,e,n){function makeLink(t,e){o.link(t,e,t=>{if(t)return n(t);n(null)})}s(e,(i,c)=>{if(i)return n(i);if(c)return n(null);o.lstat(t,i=>{if(i){i.message=i.message.replace("lstat","ensureLink");return n(i)}const o=r.dirname(e);s(o,(i,r)=>{if(i)return n(i);if(r)return makeLink(t,e);a.mkdirs(o,i=>{if(i)return n(i);makeLink(t,e)})})})})}function createLinkSync(t,e){const n=o.existsSync(e);if(n)return undefined;try{o.lstatSync(t)}catch(t){t.message=t.message.replace("lstat","ensureLink");throw t}const i=r.dirname(e);const s=o.existsSync(i);if(s)return o.linkSync(t,e);a.mkdirsSync(i);return o.linkSync(t,e)}t.exports={createLink:i(createLink),createLinkSync:createLinkSync}},3727:(t,e,n)=>{"use strict";const i=n(5622);const r=n(7758);const o=n(3835).pathExists;function symlinkPaths(t,e,n){if(i.isAbsolute(t)){return r.lstat(t,e=>{if(e){e.message=e.message.replace("lstat","ensureSymlink");return n(e)}return n(null,{toCwd:t,toDst:t})})}else{const a=i.dirname(e);const s=i.join(a,t);return o(s,(e,o)=>{if(e)return n(e);if(o){return n(null,{toCwd:s,toDst:t})}else{return r.lstat(t,e=>{if(e){e.message=e.message.replace("lstat","ensureSymlink");return n(e)}return n(null,{toCwd:t,toDst:i.relative(a,t)})})}})}}function symlinkPathsSync(t,e){let n;if(i.isAbsolute(t)){n=r.existsSync(t);if(!n)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{const o=i.dirname(e);const a=i.join(o,t);n=r.existsSync(a);if(n){return{toCwd:a,toDst:t}}else{n=r.existsSync(t);if(!n)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:i.relative(o,t)}}}}t.exports={symlinkPaths:symlinkPaths,symlinkPathsSync:symlinkPathsSync}},8254:(t,e,n)=>{"use strict";const i=n(7758);function symlinkType(t,e,n){n=typeof e==="function"?e:n;e=typeof e==="function"?false:e;if(e)return n(null,e);i.lstat(t,(t,i)=>{if(t)return n(null,"file");e=i&&i.isDirectory()?"dir":"file";n(null,e)})}function symlinkTypeSync(t,e){let n;if(e)return e;try{n=i.lstatSync(t)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}t.exports={symlinkType:symlinkType,symlinkTypeSync:symlinkTypeSync}},2549:(t,e,n)=>{"use strict";const i=n(9046).E;const r=n(5622);const o=n(7758);const a=n(8605);const s=a.mkdirs;const c=a.mkdirsSync;const u=n(3727);const f=u.symlinkPaths;const l=u.symlinkPathsSync;const h=n(8254);const y=h.symlinkType;const m=h.symlinkTypeSync;const d=n(3835).pathExists;function createSymlink(t,e,n,i){i=typeof n==="function"?n:i;n=typeof n==="function"?false:n;d(e,(a,c)=>{if(a)return i(a);if(c)return i(null);f(t,e,(a,c)=>{if(a)return i(a);t=c.toDst;y(c.toCwd,n,(n,a)=>{if(n)return i(n);const c=r.dirname(e);d(c,(n,r)=>{if(n)return i(n);if(r)return o.symlink(t,e,a,i);s(c,n=>{if(n)return i(n);o.symlink(t,e,a,i)})})})})})}function createSymlinkSync(t,e,n){const i=o.existsSync(e);if(i)return undefined;const a=l(t,e);t=a.toDst;n=m(a.toCwd,n);const s=r.dirname(e);const u=o.existsSync(s);if(u)return o.symlinkSync(t,e,n);c(s);return o.symlinkSync(t,e,n)}t.exports={createSymlink:i(createSymlink),createSymlinkSync:createSymlinkSync}},1176:(t,e,n)=>{"use strict";const i=n(9046).E;const r=n(7758);const o=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>{return typeof r[t]==="function"});Object.keys(r).forEach(t=>{if(t==="promises"){return}e[t]=r[t]});o.forEach(t=>{e[t]=i(r[t])});e.exists=function(t,e){if(typeof e==="function"){return r.exists(t,e)}return new Promise(e=>{return r.exists(t,e)})};e.read=function(t,e,n,i,o,a){if(typeof a==="function"){return r.read(t,e,n,i,o,a)}return new Promise((a,s)=>{r.read(t,e,n,i,o,(t,e,n)=>{if(t)return s(t);a({bytesRead:e,buffer:n})})})};e.write=function(t,e,...n){if(typeof n[n.length-1]==="function"){return r.write(t,e,...n)}return new Promise((i,o)=>{r.write(t,e,...n,(t,e,n)=>{if(t)return o(t);i({bytesWritten:e,buffer:n})})})};if(typeof r.writev==="function"){e.writev=function(t,e,...n){if(typeof n[n.length-1]==="function"){return r.writev(t,e,...n)}return new Promise((i,o)=>{r.writev(t,e,...n,(t,e,n)=>{if(t)return o(t);i({bytesWritten:e,buffers:n})})})}}if(typeof r.realpath.native==="function"){e.realpath.native=i(r.realpath.native)}},5630:(t,e,n)=>{"use strict";t.exports={...n(1176),...n(1135),...n(1335),...n(6970),...n(55),...n(213),...n(8605),...n(9665),...n(1497),...n(6570),...n(3835),...n(7357)};const i=n(5747);if(Object.getOwnPropertyDescriptor(i,"promises")){Object.defineProperty(t.exports,"promises",{get(){return i.promises}})}},213:(t,e,n)=>{"use strict";const i=n(9046).p;const r=n(8970);r.outputJson=i(n(531));r.outputJsonSync=n(9421);r.outputJSON=r.outputJson;r.outputJSONSync=r.outputJsonSync;r.writeJSON=r.writeJson;r.writeJSONSync=r.writeJsonSync;r.readJSON=r.readJson;r.readJSONSync=r.readJsonSync;t.exports=r},8970:(t,e,n)=>{"use strict";const i=n(6160);t.exports={readJson:i.readFile,readJsonSync:i.readFileSync,writeJson:i.writeFile,writeJsonSync:i.writeFileSync}},9421:(t,e,n)=>{"use strict";const{stringify:i}=n(5902);const{outputFileSync:r}=n(6570);function outputJsonSync(t,e,n){const o=i(e,n);r(t,o,n)}t.exports=outputJsonSync},531:(t,e,n)=>{"use strict";const{stringify:i}=n(5902);const{outputFile:r}=n(6570);async function outputJson(t,e,n={}){const o=i(e,n);await r(t,o,n)}t.exports=outputJson},8605:(t,e,n)=>{"use strict";const i=n(9046).p;const{makeDir:r,makeDirSync:o}=n(2751);const a=i(r);t.exports={mkdirs:a,mkdirsSync:o,mkdirp:a,mkdirpSync:o,ensureDir:a,ensureDirSync:o}},2751:(t,e,n)=>{"use strict";const i=n(1176);const r=n(5622);const o=n(5995);const a=o("10.12.0");const s=t=>{if(process.platform==="win32"){const e=/[<>:"|?*]/.test(t.replace(r.parse(t).root,""));if(e){const e=new Error(`Path contains invalid characters: ${t}`);e.code="EINVAL";throw e}}};const c=t=>{const e={mode:511};if(typeof t==="number")t={mode:t};return{...e,...t}};const u=t=>{const e=new Error(`operation not permitted, mkdir '${t}'`);e.code="EPERM";e.errno=-4048;e.path=t;e.syscall="mkdir";return e};t.exports.makeDir=(async(t,e)=>{s(t);e=c(e);if(a){const n=r.resolve(t);return i.mkdir(n,{mode:e.mode,recursive:true})}const n=async t=>{try{await i.mkdir(t,e.mode)}catch(e){if(e.code==="EPERM"){throw e}if(e.code==="ENOENT"){if(r.dirname(t)===t){throw u(t)}if(e.message.includes("null bytes")){throw e}await n(r.dirname(t));return n(t)}try{const n=await i.stat(t);if(!n.isDirectory()){throw new Error("The path is not a directory")}}catch{throw e}}};return n(r.resolve(t))});t.exports.makeDirSync=((t,e)=>{s(t);e=c(e);if(a){const n=r.resolve(t);return i.mkdirSync(n,{mode:e.mode,recursive:true})}const n=t=>{try{i.mkdirSync(t,e.mode)}catch(e){if(e.code==="EPERM"){throw e}if(e.code==="ENOENT"){if(r.dirname(t)===t){throw u(t)}if(e.message.includes("null bytes")){throw e}n(r.dirname(t));return n(t)}try{if(!i.statSync(t).isDirectory()){throw new Error("The path is not a directory")}}catch{throw e}}};return n(r.resolve(t))})},9665:(t,e,n)=>{"use strict";t.exports={moveSync:n(6445)}},6445:(t,e,n)=>{"use strict";const i=n(7758);const r=n(5622);const o=n(1135).copySync;const a=n(7357).removeSync;const s=n(8605).mkdirpSync;const c=n(3901);function moveSync(t,e,n){n=n||{};const i=n.overwrite||n.clobber||false;const{srcStat:o}=c.checkPathsSync(t,e,"move");c.checkParentPathsSync(t,o,e,"move");s(r.dirname(e));return doRename(t,e,i)}function doRename(t,e,n){if(n){a(e);return rename(t,e,n)}if(i.existsSync(e))throw new Error("dest already exists.");return rename(t,e,n)}function rename(t,e,n){try{i.renameSync(t,e)}catch(i){if(i.code!=="EXDEV")throw i;return moveAcrossDevice(t,e,n)}}function moveAcrossDevice(t,e,n){const i={overwrite:n,errorOnExist:true};o(t,e,i);return a(t)}t.exports=moveSync},1497:(t,e,n)=>{"use strict";const i=n(9046).E;t.exports={move:i(n(2231))}},2231:(t,e,n)=>{"use strict";const i=n(7758);const r=n(5622);const o=n(1335).copy;const a=n(7357).remove;const s=n(8605).mkdirp;const c=n(3835).pathExists;const u=n(3901);function move(t,e,n,i){if(typeof n==="function"){i=n;n={}}const o=n.overwrite||n.clobber||false;u.checkPaths(t,e,"move",(n,a)=>{if(n)return i(n);const{srcStat:c}=a;u.checkParentPaths(t,c,e,"move",n=>{if(n)return i(n);s(r.dirname(e),n=>{if(n)return i(n);return doRename(t,e,o,i)})})})}function doRename(t,e,n,i){if(n){return a(e,r=>{if(r)return i(r);return rename(t,e,n,i)})}c(e,(r,o)=>{if(r)return i(r);if(o)return i(new Error("dest already exists."));return rename(t,e,n,i)})}function rename(t,e,n,r){i.rename(t,e,i=>{if(!i)return r();if(i.code!=="EXDEV")return r(i);return moveAcrossDevice(t,e,n,r)})}function moveAcrossDevice(t,e,n,i){const r={overwrite:n,errorOnExist:true};o(t,e,r,e=>{if(e)return i(e);return a(t,i)})}t.exports=move},6570:(t,e,n)=>{"use strict";const i=n(9046).E;const r=n(7758);const o=n(5622);const a=n(8605);const s=n(3835).pathExists;function outputFile(t,e,n,i){if(typeof n==="function"){i=n;n="utf8"}const c=o.dirname(t);s(c,(o,s)=>{if(o)return i(o);if(s)return r.writeFile(t,e,n,i);a.mkdirs(c,o=>{if(o)return i(o);r.writeFile(t,e,n,i)})})}function outputFileSync(t,...e){const n=o.dirname(t);if(r.existsSync(n)){return r.writeFileSync(t,...e)}a.mkdirsSync(n);r.writeFileSync(t,...e)}t.exports={outputFile:i(outputFile),outputFileSync:outputFileSync}},3835:(t,e,n)=>{"use strict";const i=n(9046).p;const r=n(1176);function pathExists(t){return r.access(t).then(()=>true).catch(()=>false)}t.exports={pathExists:i(pathExists),pathExistsSync:r.existsSync}},7357:(t,e,n)=>{"use strict";const i=n(9046).E;const r=n(8761);t.exports={remove:i(r),removeSync:r.sync}},8761:(t,e,n)=>{"use strict";const i=n(7758);const r=n(5622);const o=n(2357);const a=process.platform==="win32";function defaults(t){const e=["unlink","chmod","stat","lstat","rmdir","readdir"];e.forEach(e=>{t[e]=t[e]||i[e];e=e+"Sync";t[e]=t[e]||i[e]});t.maxBusyTries=t.maxBusyTries||3}function rimraf(t,e,n){let i=0;if(typeof e==="function"){n=e;e={}}o(t,"rimraf: missing path");o.strictEqual(typeof t,"string","rimraf: path should be a string");o.strictEqual(typeof n,"function","rimraf: callback function required");o(e,"rimraf: invalid options argument provided");o.strictEqual(typeof e,"object","rimraf: options should be object");defaults(e);rimraf_(t,e,function CB(r){if(r){if((r.code==="EBUSY"||r.code==="ENOTEMPTY"||r.code==="EPERM")&&i<e.maxBusyTries){i++;const n=i*100;return setTimeout(()=>rimraf_(t,e,CB),n)}if(r.code==="ENOENT")r=null}n(r)})}function rimraf_(t,e,n){o(t);o(e);o(typeof n==="function");e.lstat(t,(i,r)=>{if(i&&i.code==="ENOENT"){return n(null)}if(i&&i.code==="EPERM"&&a){return fixWinEPERM(t,e,i,n)}if(r&&r.isDirectory()){return rmdir(t,e,i,n)}e.unlink(t,i=>{if(i){if(i.code==="ENOENT"){return n(null)}if(i.code==="EPERM"){return a?fixWinEPERM(t,e,i,n):rmdir(t,e,i,n)}if(i.code==="EISDIR"){return rmdir(t,e,i,n)}}return n(i)})})}function fixWinEPERM(t,e,n,i){o(t);o(e);o(typeof i==="function");e.chmod(t,438,r=>{if(r){i(r.code==="ENOENT"?null:n)}else{e.stat(t,(r,o)=>{if(r){i(r.code==="ENOENT"?null:n)}else if(o.isDirectory()){rmdir(t,e,n,i)}else{e.unlink(t,i)}})}})}function fixWinEPERMSync(t,e,n){let i;o(t);o(e);try{e.chmodSync(t,438)}catch(t){if(t.code==="ENOENT"){return}else{throw n}}try{i=e.statSync(t)}catch(t){if(t.code==="ENOENT"){return}else{throw n}}if(i.isDirectory()){rmdirSync(t,e,n)}else{e.unlinkSync(t)}}function rmdir(t,e,n,i){o(t);o(e);o(typeof i==="function");e.rmdir(t,r=>{if(r&&(r.code==="ENOTEMPTY"||r.code==="EEXIST"||r.code==="EPERM")){rmkids(t,e,i)}else if(r&&r.code==="ENOTDIR"){i(n)}else{i(r)}})}function rmkids(t,e,n){o(t);o(e);o(typeof n==="function");e.readdir(t,(i,o)=>{if(i)return n(i);let a=o.length;let s;if(a===0)return e.rmdir(t,n);o.forEach(i=>{rimraf(r.join(t,i),e,i=>{if(s){return}if(i)return n(s=i);if(--a===0){e.rmdir(t,n)}})})})}function rimrafSync(t,e){let n;e=e||{};defaults(e);o(t,"rimraf: missing path");o.strictEqual(typeof t,"string","rimraf: path should be a string");o(e,"rimraf: missing options");o.strictEqual(typeof e,"object","rimraf: options should be object");try{n=e.lstatSync(t)}catch(n){if(n.code==="ENOENT"){return}if(n.code==="EPERM"&&a){fixWinEPERMSync(t,e,n)}}try{if(n&&n.isDirectory()){rmdirSync(t,e,null)}else{e.unlinkSync(t)}}catch(n){if(n.code==="ENOENT"){return}else if(n.code==="EPERM"){return a?fixWinEPERMSync(t,e,n):rmdirSync(t,e,n)}else if(n.code!=="EISDIR"){throw n}rmdirSync(t,e,n)}}function rmdirSync(t,e,n){o(t);o(e);try{e.rmdirSync(t)}catch(i){if(i.code==="ENOTDIR"){throw n}else if(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM"){rmkidsSync(t,e)}else if(i.code!=="ENOENT"){throw i}}}function rmkidsSync(t,e){o(t);o(e);e.readdirSync(t).forEach(n=>rimrafSync(r.join(t,n),e));if(a){const n=Date.now();do{try{const n=e.rmdirSync(t,e);return n}catch{}}while(Date.now()-n<500)}else{const n=e.rmdirSync(t,e);return n}}t.exports=rimraf;rimraf.sync=rimrafSync},3901:(t,e,n)=>{"use strict";const i=n(1176);const r=n(5622);const o=n(1669);const a=n(5995);const s=a("10.5.0");const c=t=>s?i.stat(t,{bigint:true}):i.stat(t);const u=t=>s?i.statSync(t,{bigint:true}):i.statSync(t);function getStats(t,e){return Promise.all([c(t),c(e).catch(t=>{if(t.code==="ENOENT")return null;throw t})]).then(([t,e])=>({srcStat:t,destStat:e}))}function getStatsSync(t,e){let n;const i=u(t);try{n=u(e)}catch(t){if(t.code==="ENOENT")return{srcStat:i,destStat:null};throw t}return{srcStat:i,destStat:n}}function checkPaths(t,e,n,i){o.callbackify(getStats)(t,e,(r,o)=>{if(r)return i(r);const{srcStat:a,destStat:s}=o;if(s&&areIdentical(a,s)){return i(new Error("Source and destination must not be the same."))}if(a.isDirectory()&&isSrcSubdir(t,e)){return i(new Error(errMsg(t,e,n)))}return i(null,{srcStat:a,destStat:s})})}function checkPathsSync(t,e,n){const{srcStat:i,destStat:r}=getStatsSync(t,e);if(r&&areIdentical(i,r)){throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&isSrcSubdir(t,e)){throw new Error(errMsg(t,e,n))}return{srcStat:i,destStat:r}}function checkParentPaths(t,e,n,o,a){const c=r.resolve(r.dirname(t));const u=r.resolve(r.dirname(n));if(u===c||u===r.parse(u).root)return a();const f=(i,r)=>{if(i){if(i.code==="ENOENT")return a();return a(i)}if(areIdentical(e,r)){return a(new Error(errMsg(t,n,o)))}return checkParentPaths(t,e,u,o,a)};if(s)i.stat(u,{bigint:true},f);else i.stat(u,f)}function checkParentPathsSync(t,e,n,i){const o=r.resolve(r.dirname(t));const a=r.resolve(r.dirname(n));if(a===o||a===r.parse(a).root)return;let s;try{s=u(a)}catch(t){if(t.code==="ENOENT")return;throw t}if(areIdentical(e,s)){throw new Error(errMsg(t,n,i))}return checkParentPathsSync(t,e,a,i)}function areIdentical(t,e){if(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev){if(s||e.ino<Number.MAX_SAFE_INTEGER){return true}if(e.size===t.size&&e.mode===t.mode&&e.nlink===t.nlink&&e.atimeMs===t.atimeMs&&e.mtimeMs===t.mtimeMs&&e.ctimeMs===t.ctimeMs&&e.birthtimeMs===t.birthtimeMs){return true}}return false}function isSrcSubdir(t,e){const n=r.resolve(t).split(r.sep).filter(t=>t);const i=r.resolve(e).split(r.sep).filter(t=>t);return n.reduce((t,e,n)=>t&&i[n]===e,true)}function errMsg(t,e,n){return`Cannot ${n} '${t}' to a subdirectory of itself, '${e}'.`}t.exports={checkPaths:checkPaths,checkPathsSync:checkPathsSync,checkParentPaths:checkParentPaths,checkParentPathsSync:checkParentPathsSync,isSrcSubdir:isSrcSubdir}},2548:(t,e,n)=>{"use strict";const i=n(7758);function utimesMillis(t,e,n,r){i.open(t,"r+",(t,o)=>{if(t)return r(t);i.futimes(o,e,n,t=>{i.close(o,e=>{if(r)r(t||e)})})})}function utimesMillisSync(t,e,n){const r=i.openSync(t,"r+");i.futimesSync(r,e,n);return i.closeSync(r)}t.exports={utimesMillis:utimesMillis,utimesMillisSync:utimesMillisSync}},7356:t=>{"use strict";t.exports=clone;function clone(t){if(t===null||typeof t!=="object")return t;if(t instanceof Object)var e={__proto__:t.__proto__};else var e=Object.create(null);Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))});return e}},7758:(t,e,n)=>{var i=n(5747);var r=n(263);var o=n(3086);var a=n(7356);var s=n(1669);var c;var u;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){c=Symbol.for("graceful-fs.queue");u=Symbol.for("graceful-fs.previous")}else{c="___graceful-fs.queue";u="___graceful-fs.previous"}function noop(){}function publishQueue(t,e){Object.defineProperty(t,c,{get:function(){return e}})}var f=noop;if(s.debuglog)f=s.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))f=function(){var t=s.format.apply(s,arguments);t="GFS4: "+t.split(/\n/).join("\nGFS4: ");console.error(t)};if(!i[c]){var l=global[c]||[];publishQueue(i,l);i.close=function(t){function close(e,n){return t.call(i,e,function(t){if(!t){retry()}if(typeof n==="function")n.apply(this,arguments)})}Object.defineProperty(close,u,{value:t});return close}(i.close);i.closeSync=function(t){function closeSync(e){t.apply(i,arguments);retry()}Object.defineProperty(closeSync,u,{value:t});return closeSync}(i.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",function(){f(i[c]);n(2357).equal(i[c].length,0)})}}if(!global[c]){publishQueue(global,i[c])}t.exports=patch(a(i));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched){t.exports=patch(i);i.__patched=true}function patch(t){r(t);t.gracefulify=patch;t.createReadStream=createReadStream;t.createWriteStream=createWriteStream;var e=t.readFile;t.readFile=readFile;function readFile(t,n,i){if(typeof n==="function")i=n,n=null;return go$readFile(t,n,i);function go$readFile(t,n,i){return e(t,n,function(e){if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))enqueue([go$readFile,[t,n,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}})}}var n=t.writeFile;t.writeFile=writeFile;function writeFile(t,e,i,r){if(typeof i==="function")r=i,i=null;return go$writeFile(t,e,i,r);function go$writeFile(t,e,i,r){return n(t,e,i,function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$writeFile,[t,e,i,r]]);else{if(typeof r==="function")r.apply(this,arguments);retry()}})}}var i=t.appendFile;if(i)t.appendFile=appendFile;function appendFile(t,e,n,r){if(typeof n==="function")r=n,n=null;return go$appendFile(t,e,n,r);function go$appendFile(t,e,n,r){return i(t,e,n,function(i){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$appendFile,[t,e,n,r]]);else{if(typeof r==="function")r.apply(this,arguments);retry()}})}}var a=t.readdir;t.readdir=readdir;function readdir(t,e,n){var i=[t];if(typeof e!=="function"){i.push(e)}else{n=e}i.push(go$readdir$cb);return go$readdir(i);function go$readdir$cb(t,e){if(e&&e.sort)e.sort();if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readdir,[i]]);else{if(typeof n==="function")n.apply(this,arguments);retry()}}}function go$readdir(e){return a.apply(t,e)}if(process.version.substr(0,4)==="v0.8"){var s=o(t);ReadStream=s.ReadStream;WriteStream=s.WriteStream}var c=t.ReadStream;if(c){ReadStream.prototype=Object.create(c.prototype);ReadStream.prototype.open=ReadStream$open}var u=t.WriteStream;if(u){WriteStream.prototype=Object.create(u.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(t,"ReadStream",{get:function(){return ReadStream},set:function(t){ReadStream=t},enumerable:true,configurable:true});Object.defineProperty(t,"WriteStream",{get:function(){return WriteStream},set:function(t){WriteStream=t},enumerable:true,configurable:true});var f=ReadStream;Object.defineProperty(t,"FileReadStream",{get:function(){return f},set:function(t){f=t},enumerable:true,configurable:true});var l=WriteStream;Object.defineProperty(t,"FileWriteStream",{get:function(){return l},set:function(t){l=t},enumerable:true,configurable:true});function ReadStream(t,e){if(this instanceof ReadStream)return c.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var t=this;open(t.path,t.flags,t.mode,function(e,n){if(e){if(t.autoClose)t.destroy();t.emit("error",e)}else{t.fd=n;t.emit("open",n);t.read()}})}function WriteStream(t,e){if(this instanceof WriteStream)return u.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var t=this;open(t.path,t.flags,t.mode,function(e,n){if(e){t.destroy();t.emit("error",e)}else{t.fd=n;t.emit("open",n)}})}function createReadStream(e,n){return new t.ReadStream(e,n)}function createWriteStream(e,n){return new t.WriteStream(e,n)}var h=t.open;t.open=open;function open(t,e,n,i){if(typeof n==="function")i=n,n=null;return go$open(t,e,n,i);function go$open(t,e,n,i){return h(t,e,n,function(r,o){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$open,[t,e,n,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}})}}return t}function enqueue(t){f("ENQUEUE",t[0].name,t[1]);i[c].push(t)}function retry(){var t=i[c].shift();if(t){f("RETRY",t[0].name,t[1]);t[0].apply(null,t[1])}}},3086:(t,e,n)=>{var i=n(2413).Stream;t.exports=legacy;function legacy(t){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(e,n){if(!(this instanceof ReadStream))return new ReadStream(e,n);i.call(this);var r=this;this.path=e;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;n=n||{};var o=Object.keys(n);for(var a=0,s=o.length;a<s;a++){var c=o[a];this[c]=n[c]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.end===undefined){this.end=Infinity}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}if(this.fd!==null){process.nextTick(function(){r._read()});return}t.open(this.path,this.flags,this.mode,function(t,e){if(t){r.emit("error",t);r.readable=false;return}r.fd=e;r.emit("open",e);r._read()})}function WriteStream(e,n){if(!(this instanceof WriteStream))return new WriteStream(e,n);i.call(this);this.path=e;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;n=n||{};var r=Object.keys(n);for(var o=0,a=r.length;o<a;o++){var s=r[o];this[s]=n[s]}if(this.start!==undefined){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=false;this._queue=[];if(this.fd===null){this._open=t.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},263:(t,e,n)=>{var i=n(7619);var r=process.cwd;var o=null;var a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!o)o=r.call(process);return o};try{process.cwd()}catch(t){}var s=process.chdir;process.chdir=function(t){o=null;s.call(process,t)};t.exports=patch;function patch(t){if(i.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(t)}if(!t.lutimes){patchLutimes(t)}t.chown=chownFix(t.chown);t.fchown=chownFix(t.fchown);t.lchown=chownFix(t.lchown);t.chmod=chmodFix(t.chmod);t.fchmod=chmodFix(t.fchmod);t.lchmod=chmodFix(t.lchmod);t.chownSync=chownFixSync(t.chownSync);t.fchownSync=chownFixSync(t.fchownSync);t.lchownSync=chownFixSync(t.lchownSync);t.chmodSync=chmodFixSync(t.chmodSync);t.fchmodSync=chmodFixSync(t.fchmodSync);t.lchmodSync=chmodFixSync(t.lchmodSync);t.stat=statFix(t.stat);t.fstat=statFix(t.fstat);t.lstat=statFix(t.lstat);t.statSync=statFixSync(t.statSync);t.fstatSync=statFixSync(t.fstatSync);t.lstatSync=statFixSync(t.lstatSync);if(!t.lchmod){t.lchmod=function(t,e,n){if(n)process.nextTick(n)};t.lchmodSync=function(){}}if(!t.lchown){t.lchown=function(t,e,n,i){if(i)process.nextTick(i)};t.lchownSync=function(){}}if(a==="win32"){t.rename=function(e){return function(n,i,r){var o=Date.now();var a=0;e(n,i,function CB(s){if(s&&(s.code==="EACCES"||s.code==="EPERM")&&Date.now()-o<6e4){setTimeout(function(){t.stat(i,function(t,o){if(t&&t.code==="ENOENT")e(n,i,CB);else r(s)})},a);if(a<100)a+=10;return}if(r)r(s)})}}(t.rename)}t.read=function(e){function read(n,i,r,o,a,s){var c;if(s&&typeof s==="function"){var u=0;c=function(f,l,h){if(f&&f.code==="EAGAIN"&&u<10){u++;return e.call(t,n,i,r,o,a,c)}s.apply(this,arguments)}}return e.call(t,n,i,r,o,a,c)}read.__proto__=e;return read}(t.read);t.readSync=function(e){return function(n,i,r,o,a){var s=0;while(true){try{return e.call(t,n,i,r,o,a)}catch(t){if(t.code==="EAGAIN"&&s<10){s++;continue}throw t}}}}(t.readSync);function patchLchmod(t){t.lchmod=function(e,n,r){t.open(e,i.O_WRONLY|i.O_SYMLINK,n,function(e,i){if(e){if(r)r(e);return}t.fchmod(i,n,function(e){t.close(i,function(t){if(r)r(e||t)})})})};t.lchmodSync=function(e,n){var r=t.openSync(e,i.O_WRONLY|i.O_SYMLINK,n);var o=true;var a;try{a=t.fchmodSync(r,n);o=false}finally{if(o){try{t.closeSync(r)}catch(t){}}else{t.closeSync(r)}}return a}}function patchLutimes(t){if(i.hasOwnProperty("O_SYMLINK")){t.lutimes=function(e,n,r,o){t.open(e,i.O_SYMLINK,function(e,i){if(e){if(o)o(e);return}t.futimes(i,n,r,function(e){t.close(i,function(t){if(o)o(e||t)})})})};t.lutimesSync=function(e,n,r){var o=t.openSync(e,i.O_SYMLINK);var a;var s=true;try{a=t.futimesSync(o,n,r);s=false}finally{if(s){try{t.closeSync(o)}catch(t){}}else{t.closeSync(o)}}return a}}else{t.lutimes=function(t,e,n,i){if(i)process.nextTick(i)};t.lutimesSync=function(){}}}function chmodFix(e){if(!e)return e;return function(n,i,r){return e.call(t,n,i,function(t){if(chownErOk(t))t=null;if(r)r.apply(this,arguments)})}}function chmodFixSync(e){if(!e)return e;return function(n,i){try{return e.call(t,n,i)}catch(t){if(!chownErOk(t))throw t}}}function chownFix(e){if(!e)return e;return function(n,i,r,o){return e.call(t,n,i,r,function(t){if(chownErOk(t))t=null;if(o)o.apply(this,arguments)})}}function chownFixSync(e){if(!e)return e;return function(n,i,r){try{return e.call(t,n,i,r)}catch(t){if(!chownErOk(t))throw t}}}function statFix(e){if(!e)return e;return function(n,i,r){if(typeof i==="function"){r=i;i=null}function callback(t,e){if(e){if(e.uid<0)e.uid+=4294967296;if(e.gid<0)e.gid+=4294967296}if(r)r.apply(this,arguments)}return i?e.call(t,n,i,callback):e.call(t,n,callback)}}function statFixSync(e){if(!e)return e;return function(n,i){var r=i?e.call(t,n,i):e.call(t,n);if(r.uid<0)r.uid+=4294967296;if(r.gid<0)r.gid+=4294967296;return r}}function chownErOk(t){if(!t)return true;if(t.code==="ENOSYS")return true;var e=!process.getuid||process.getuid()!==0;if(e){if(t.code==="EINVAL"||t.code==="EPERM")return true}return false}}},6160:(t,e,n)=>{let i;try{i=n(7758)}catch(t){i=n(5747)}const r=n(7133);const{stringify:o,stripBom:a}=n(5902);async function _readFile(t,e={}){if(typeof e==="string"){e={encoding:e}}const n=e.fs||i;const o="throws"in e?e.throws:true;let s=await r.fromCallback(n.readFile)(t,e);s=a(s);let c;try{c=JSON.parse(s,e?e.reviver:null)}catch(e){if(o){e.message=`${t}: ${e.message}`;throw e}else{return null}}return c}const s=r.fromPromise(_readFile);function readFileSync(t,e={}){if(typeof e==="string"){e={encoding:e}}const n=e.fs||i;const r="throws"in e?e.throws:true;try{let i=n.readFileSync(t,e);i=a(i);return JSON.parse(i,e.reviver)}catch(e){if(r){e.message=`${t}: ${e.message}`;throw e}else{return null}}}async function _writeFile(t,e,n={}){const a=n.fs||i;const s=o(e,n);await r.fromCallback(a.writeFile)(t,s,n)}const c=r.fromPromise(_writeFile);function writeFileSync(t,e,n={}){const r=n.fs||i;const a=o(e,n);return r.writeFileSync(t,a,n)}const u={readFile:s,readFileSync:readFileSync,writeFile:c,writeFileSync:writeFileSync};t.exports=u},7133:(t,e)=>{"use strict";e.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]==="function")t.apply(this,e);else{return new Promise((n,i)=>{t.call(this,...e,(t,e)=>t!=null?i(t):n(e))})}},"name",{value:t.name})};e.fromPromise=function(t){return Object.defineProperty(function(...e){const n=e[e.length-1];if(typeof n!=="function")return t.apply(this,e);else t.apply(this,e.slice(0,-1)).then(t=>n(null,t),n)},"name",{value:t.name})}},5902:t=>{function stringify(t,{EOL:e="\n",finalEOL:n=true,replacer:i=null,spaces:r}={}){const o=n?e:"";const a=JSON.stringify(t,i,r);return a.replace(/\n/g,e)+o}function stripBom(t){if(Buffer.isBuffer(t))t=t.toString("utf8");return t.replace(/^\uFEFF/,"")}t.exports={stringify:stringify,stripBom:stripBom}},6235:(t,e,n)=>{"use strict";const i=n(5747);class LineByLine{constructor(t,e){e=e||{};if(!e.readChunk)e.readChunk=1024;if(!e.newLineCharacter){e.newLineCharacter=10}else{e.newLineCharacter=e.newLineCharacter.charCodeAt(0)}if(typeof t==="number"){this.fd=t}else{this.fd=i.openSync(t,"r")}this.options=e;this.newLineCharacter=e.newLineCharacter;this.reset()}_searchInBuffer(t,e){let n=-1;for(let i=0;i<=t.length;i++){let r=t[i];if(r===e){n=i;break}}return n}reset(){this.eofReached=false;this.linesCache=[];this.fdPosition=0}close(){i.closeSync(this.fd);this.fd=null}_extractLines(t){let e;const n=[];let i=0;let r=0;while(true){let o=t[i++];if(o===this.newLineCharacter){e=t.slice(r,i);n.push(e);r=i}else if(o===undefined){break}}let o=t.slice(r,i);if(o.length){n.push(o)}return n}_readChunk(t){let e=0;let n;const r=[];do{const t=new Buffer(this.options.readChunk);n=i.readSync(this.fd,t,0,this.options.readChunk,this.fdPosition);e=e+n;this.fdPosition=this.fdPosition+n;r.push(t)}while(n&&this._searchInBuffer(r[r.length-1],this.options.newLineCharacter)===-1);let o=Buffer.concat(r);if(n<this.options.readChunk){this.eofReached=true;o=o.slice(0,e)}if(e){this.linesCache=this._extractLines(o);if(t){this.linesCache[0]=Buffer.concat([t,this.linesCache[0]])}}return e}next(){if(!this.fd)return false;let t=false;if(this.eofReached&&this.linesCache.length===0){return t}let e;if(!this.linesCache.length){e=this._readChunk()}if(this.linesCache.length){t=this.linesCache.shift();const n=t[t.length-1];if(n!==this.newLineCharacter){e=this._readChunk(t);if(e){t=this.linesCache.shift()}}}if(this.eofReached&&this.linesCache.length===0){this.close()}if(t&&t[t.length-1]===this.newLineCharacter){t=t.slice(0,t.length-1)}return t}}t.exports=LineByLine},2043:(t,e,n)=>{(function(t){t.parser=function(t,e){return new SAXParser(t,e)};t.SAXParser=SAXParser;t.SAXStream=SAXStream;t.createStream=createStream;t.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function SAXParser(e,n){if(!(this instanceof SAXParser)){return new SAXParser(e,n)}var i=this;clearBuffers(i);i.q=i.c="";i.bufferCheckPosition=t.MAX_BUFFER_LENGTH;i.opt=n||{};i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags;i.looseCase=i.opt.lowercase?"toLowerCase":"toUpperCase";i.tags=[];i.closed=i.closedRoot=i.sawRoot=false;i.tag=i.error=null;i.strict=!!e;i.noscript=!!(e||i.opt.noscript);i.state=m.BEGIN;i.strictEntities=i.opt.strictEntities;i.ENTITIES=i.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES);i.attribList=[];if(i.opt.xmlns){i.ns=Object.create(u)}i.trackPosition=i.opt.position!==false;if(i.trackPosition){i.position=i.line=i.column=0}emit(i,"onready")}if(!Object.create){Object.create=function(t){function F(){}F.prototype=t;var e=new F;return e}}if(!Object.keys){Object.keys=function(t){var e=[];for(var n in t)if(t.hasOwnProperty(n))e.push(n);return e}}function checkBufferLength(n){var i=Math.max(t.MAX_BUFFER_LENGTH,10);var r=0;for(var o=0,a=e.length;o<a;o++){var s=n[e[o]].length;if(s>i){switch(e[o]){case"textNode":closeText(n);break;case"cdata":emitNode(n,"oncdata",n.cdata);n.cdata="";break;case"script":emitNode(n,"onscript",n.script);n.script="";break;default:error(n,"Max buffer length exceeded: "+e[o])}}r=Math.max(r,s)}var c=t.MAX_BUFFER_LENGTH-r;n.bufferCheckPosition=c+n.position}function clearBuffers(t){for(var n=0,i=e.length;n<i;n++){t[e[n]]=""}}function flushBuffers(t){closeText(t);if(t.cdata!==""){emitNode(t,"oncdata",t.cdata);t.cdata=""}if(t.script!==""){emitNode(t,"onscript",t.script);t.script=""}}SAXParser.prototype={end:function(){end(this)},write:write,resume:function(){this.error=null;return this},close:function(){return this.write(null)},flush:function(){flushBuffers(this)}};var i;try{i=n(2413).Stream}catch(t){i=function(){}}var r=t.EVENTS.filter(function(t){return t!=="error"&&t!=="end"});function createStream(t,e){return new SAXStream(t,e)}function SAXStream(t,e){if(!(this instanceof SAXStream)){return new SAXStream(t,e)}i.apply(this);this._parser=new SAXParser(t,e);this.writable=true;this.readable=true;var n=this;this._parser.onend=function(){n.emit("end")};this._parser.onerror=function(t){n.emit("error",t);n._parser.error=null};this._decoder=null;r.forEach(function(t){Object.defineProperty(n,"on"+t,{get:function(){return n._parser["on"+t]},set:function(e){if(!e){n.removeAllListeners(t);n._parser["on"+t]=e;return e}n.on(t,e)},enumerable:true,configurable:false})})}SAXStream.prototype=Object.create(i.prototype,{constructor:{value:SAXStream}});SAXStream.prototype.write=function(t){if(typeof Buffer==="function"&&typeof Buffer.isBuffer==="function"&&Buffer.isBuffer(t)){if(!this._decoder){var e=n(4304).StringDecoder;this._decoder=new e("utf8")}t=this._decoder.write(t)}this._parser.write(t.toString());this.emit("data",t);return true};SAXStream.prototype.end=function(t){if(t&&t.length){this.write(t)}this._parser.end();return true};SAXStream.prototype.on=function(t,e){var n=this;if(!n._parser["on"+t]&&r.indexOf(t)!==-1){n._parser["on"+t]=function(){var e=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t);n.emit.apply(n,e)}}return i.prototype.on.call(n,t,e)};var o="[CDATA[";var a="DOCTYPE";var s="http://www.w3.org/XML/1998/namespace";var c="http://www.w3.org/2000/xmlns/";var u={xml:s,xmlns:c};var f=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;var l=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;var h=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;var y=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function isWhitespace(t){return t===" "||t==="\n"||t==="\r"||t==="\t"}function isQuote(t){return t==='"'||t==="'"}function isAttribEnd(t){return t===">"||isWhitespace(t)}function isMatch(t,e){return t.test(e)}function notMatch(t,e){return!isMatch(t,e)}var m=0;t.STATE={BEGIN:m++,BEGIN_WHITESPACE:m++,TEXT:m++,TEXT_ENTITY:m++,OPEN_WAKA:m++,SGML_DECL:m++,SGML_DECL_QUOTED:m++,DOCTYPE:m++,DOCTYPE_QUOTED:m++,DOCTYPE_DTD:m++,DOCTYPE_DTD_QUOTED:m++,COMMENT_STARTING:m++,COMMENT:m++,COMMENT_ENDING:m++,COMMENT_ENDED:m++,CDATA:m++,CDATA_ENDING:m++,CDATA_ENDING_2:m++,PROC_INST:m++,PROC_INST_BODY:m++,PROC_INST_ENDING:m++,OPEN_TAG:m++,OPEN_TAG_SLASH:m++,ATTRIB:m++,ATTRIB_NAME:m++,ATTRIB_NAME_SAW_WHITE:m++,ATTRIB_VALUE:m++,ATTRIB_VALUE_QUOTED:m++,ATTRIB_VALUE_CLOSED:m++,ATTRIB_VALUE_UNQUOTED:m++,ATTRIB_VALUE_ENTITY_Q:m++,ATTRIB_VALUE_ENTITY_U:m++,CLOSE_TAG:m++,CLOSE_TAG_SAW_WHITE:m++,SCRIPT:m++,SCRIPT_ENDING:m++};t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(t.ENTITIES).forEach(function(e){var n=t.ENTITIES[e];var i=typeof n==="number"?String.fromCharCode(n):n;t.ENTITIES[e]=i});for(var d in t.STATE){t.STATE[t.STATE[d]]=d}m=t.STATE;function emit(t,e,n){t[e]&&t[e](n)}function emitNode(t,e,n){if(t.textNode)closeText(t);emit(t,e,n)}function closeText(t){t.textNode=textopts(t.opt,t.textNode);if(t.textNode)emit(t,"ontext",t.textNode);t.textNode=""}function textopts(t,e){if(t.trim)e=e.trim();if(t.normalize)e=e.replace(/\s+/g," ");return e}function error(t,e){closeText(t);if(t.trackPosition){e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c}e=new Error(e);t.error=e;emit(t,"onerror",e);return t}function end(t){if(t.sawRoot&&!t.closedRoot)strictFail(t,"Unclosed root tag");if(t.state!==m.BEGIN&&t.state!==m.BEGIN_WHITESPACE&&t.state!==m.TEXT){error(t,"Unexpected end")}closeText(t);t.c="";t.closed=true;emit(t,"onend");SAXParser.call(t,t.strict,t.opt);return t}function strictFail(t,e){if(typeof t!=="object"||!(t instanceof SAXParser)){throw new Error("bad call to strictFail")}if(t.strict){error(t,e)}}function newTag(t){if(!t.strict)t.tagName=t.tagName[t.looseCase]();var e=t.tags[t.tags.length-1]||t;var n=t.tag={name:t.tagName,attributes:{}};if(t.opt.xmlns){n.ns=e.ns}t.attribList.length=0;emitNode(t,"onopentagstart",n)}function qname(t,e){var n=t.indexOf(":");var i=n<0?["",t]:t.split(":");var r=i[0];var o=i[1];if(e&&t==="xmlns"){r="xmlns";o=""}return{prefix:r,local:o}}function attrib(t){if(!t.strict){t.attribName=t.attribName[t.looseCase]()}if(t.attribList.indexOf(t.attribName)!==-1||t.tag.attributes.hasOwnProperty(t.attribName)){t.attribName=t.attribValue="";return}if(t.opt.xmlns){var e=qname(t.attribName,true);var n=e.prefix;var i=e.local;if(n==="xmlns"){if(i==="xml"&&t.attribValue!==s){strictFail(t,"xml: prefix must be bound to "+s+"\n"+"Actual: "+t.attribValue)}else if(i==="xmlns"&&t.attribValue!==c){strictFail(t,"xmlns: prefix must be bound to "+c+"\n"+"Actual: "+t.attribValue)}else{var r=t.tag;var o=t.tags[t.tags.length-1]||t;if(r.ns===o.ns){r.ns=Object.create(o.ns)}r.ns[i]=t.attribValue}}t.attribList.push([t.attribName,t.attribValue])}else{t.tag.attributes[t.attribName]=t.attribValue;emitNode(t,"onattribute",{name:t.attribName,value:t.attribValue})}t.attribName=t.attribValue=""}function openTag(t,e){if(t.opt.xmlns){var n=t.tag;var i=qname(t.tagName);n.prefix=i.prefix;n.local=i.local;n.uri=n.ns[i.prefix]||"";if(n.prefix&&!n.uri){strictFail(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName));n.uri=i.prefix}var r=t.tags[t.tags.length-1]||t;if(n.ns&&r.ns!==n.ns){Object.keys(n.ns).forEach(function(e){emitNode(t,"onopennamespace",{prefix:e,uri:n.ns[e]})})}for(var o=0,a=t.attribList.length;o<a;o++){var s=t.attribList[o];var c=s[0];var u=s[1];var f=qname(c,true);var l=f.prefix;var h=f.local;var y=l===""?"":n.ns[l]||"";var d={name:c,value:u,prefix:l,local:h,uri:y};if(l&&l!=="xmlns"&&!y){strictFail(t,"Unbound namespace prefix: "+JSON.stringify(l));d.uri=l}t.tag.attributes[c]=d;emitNode(t,"onattribute",d)}t.attribList.length=0}t.tag.isSelfClosing=!!e;t.sawRoot=true;t.tags.push(t.tag);emitNode(t,"onopentag",t.tag);if(!e){if(!t.noscript&&t.tagName.toLowerCase()==="script"){t.state=m.SCRIPT}else{t.state=m.TEXT}t.tag=null;t.tagName=""}t.attribName=t.attribValue="";t.attribList.length=0}function closeTag(t){if(!t.tagName){strictFail(t,"Weird empty close tag.");t.textNode+="</>";t.state=m.TEXT;return}if(t.script){if(t.tagName!=="script"){t.script+="</"+t.tagName+">";t.tagName="";t.state=m.SCRIPT;return}emitNode(t,"onscript",t.script);t.script=""}var e=t.tags.length;var n=t.tagName;if(!t.strict){n=n[t.looseCase]()}var i=n;while(e--){var r=t.tags[e];if(r.name!==i){strictFail(t,"Unexpected close tag")}else{break}}if(e<0){strictFail(t,"Unmatched closing tag: "+t.tagName);t.textNode+="</"+t.tagName+">";t.state=m.TEXT;return}t.tagName=n;var o=t.tags.length;while(o-- >e){var a=t.tag=t.tags.pop();t.tagName=t.tag.name;emitNode(t,"onclosetag",t.tagName);var s={};for(var c in a.ns){s[c]=a.ns[c]}var u=t.tags[t.tags.length-1]||t;if(t.opt.xmlns&&a.ns!==u.ns){Object.keys(a.ns).forEach(function(e){var n=a.ns[e];emitNode(t,"onclosenamespace",{prefix:e,uri:n})})}}if(e===0)t.closedRoot=true;t.tagName=t.attribValue=t.attribName="";t.attribList.length=0;t.state=m.TEXT}function parseEntity(t){var e=t.entity;var n=e.toLowerCase();var i;var r="";if(t.ENTITIES[e]){return t.ENTITIES[e]}if(t.ENTITIES[n]){return t.ENTITIES[n]}e=n;if(e.charAt(0)==="#"){if(e.charAt(1)==="x"){e=e.slice(2);i=parseInt(e,16);r=i.toString(16)}else{e=e.slice(1);i=parseInt(e,10);r=i.toString(10)}}e=e.replace(/^0+/,"");if(isNaN(i)||r.toLowerCase()!==e){strictFail(t,"Invalid character entity");return"&"+t.entity+";"}return String.fromCodePoint(i)}function beginWhiteSpace(t,e){if(e==="<"){t.state=m.OPEN_WAKA;t.startTagPosition=t.position}else if(!isWhitespace(e)){strictFail(t,"Non-whitespace before first tag.");t.textNode=e;t.state=m.TEXT}}function charAt(t,e){var n="";if(e<t.length){n=t.charAt(e)}return n}function write(t){var e=this;if(this.error){throw this.error}if(e.closed){return error(e,"Cannot write after close. Assign an onready handler.")}if(t===null){return end(e)}if(typeof t==="object"){t=t.toString()}var n=0;var i="";while(true){i=charAt(t,n++);e.c=i;if(!i){break}if(e.trackPosition){e.position++;if(i==="\n"){e.line++;e.column=0}else{e.column++}}switch(e.state){case m.BEGIN:e.state=m.BEGIN_WHITESPACE;if(i==="\ufeff"){continue}beginWhiteSpace(e,i);continue;case m.BEGIN_WHITESPACE:beginWhiteSpace(e,i);continue;case m.TEXT:if(e.sawRoot&&!e.closedRoot){var r=n-1;while(i&&i!=="<"&&i!=="&"){i=charAt(t,n++);if(i&&e.trackPosition){e.position++;if(i==="\n"){e.line++;e.column=0}else{e.column++}}}e.textNode+=t.substring(r,n-1)}if(i==="<"&&!(e.sawRoot&&e.closedRoot&&!e.strict)){e.state=m.OPEN_WAKA;e.startTagPosition=e.position}else{if(!isWhitespace(i)&&(!e.sawRoot||e.closedRoot)){strictFail(e,"Text data outside of root node.")}if(i==="&"){e.state=m.TEXT_ENTITY}else{e.textNode+=i}}continue;case m.SCRIPT:if(i==="<"){e.state=m.SCRIPT_ENDING}else{e.script+=i}continue;case m.SCRIPT_ENDING:if(i==="/"){e.state=m.CLOSE_TAG}else{e.script+="<"+i;e.state=m.SCRIPT}continue;case m.OPEN_WAKA:if(i==="!"){e.state=m.SGML_DECL;e.sgmlDecl=""}else if(isWhitespace(i)){}else if(isMatch(f,i)){e.state=m.OPEN_TAG;e.tagName=i}else if(i==="/"){e.state=m.CLOSE_TAG;e.tagName=""}else if(i==="?"){e.state=m.PROC_INST;e.procInstName=e.procInstBody=""}else{strictFail(e,"Unencoded <");if(e.startTagPosition+1<e.position){var s=e.position-e.startTagPosition;i=new Array(s).join(" ")+i}e.textNode+="<"+i;e.state=m.TEXT}continue;case m.SGML_DECL:if((e.sgmlDecl+i).toUpperCase()===o){emitNode(e,"onopencdata");e.state=m.CDATA;e.sgmlDecl="";e.cdata=""}else if(e.sgmlDecl+i==="--"){e.state=m.COMMENT;e.comment="";e.sgmlDecl=""}else if((e.sgmlDecl+i).toUpperCase()===a){e.state=m.DOCTYPE;if(e.doctype||e.sawRoot){strictFail(e,"Inappropriately located doctype declaration")}e.doctype="";e.sgmlDecl=""}else if(i===">"){emitNode(e,"onsgmldeclaration",e.sgmlDecl);e.sgmlDecl="";e.state=m.TEXT}else if(isQuote(i)){e.state=m.SGML_DECL_QUOTED;e.sgmlDecl+=i}else{e.sgmlDecl+=i}continue;case m.SGML_DECL_QUOTED:if(i===e.q){e.state=m.SGML_DECL;e.q=""}e.sgmlDecl+=i;continue;case m.DOCTYPE:if(i===">"){e.state=m.TEXT;emitNode(e,"ondoctype",e.doctype);e.doctype=true}else{e.doctype+=i;if(i==="["){e.state=m.DOCTYPE_DTD}else if(isQuote(i)){e.state=m.DOCTYPE_QUOTED;e.q=i}}continue;case m.DOCTYPE_QUOTED:e.doctype+=i;if(i===e.q){e.q="";e.state=m.DOCTYPE}continue;case m.DOCTYPE_DTD:e.doctype+=i;if(i==="]"){e.state=m.DOCTYPE}else if(isQuote(i)){e.state=m.DOCTYPE_DTD_QUOTED;e.q=i}continue;case m.DOCTYPE_DTD_QUOTED:e.doctype+=i;if(i===e.q){e.state=m.DOCTYPE_DTD;e.q=""}continue;case m.COMMENT:if(i==="-"){e.state=m.COMMENT_ENDING}else{e.comment+=i}continue;case m.COMMENT_ENDING:if(i==="-"){e.state=m.COMMENT_ENDED;e.comment=textopts(e.opt,e.comment);if(e.comment){emitNode(e,"oncomment",e.comment)}e.comment=""}else{e.comment+="-"+i;e.state=m.COMMENT}continue;case m.COMMENT_ENDED:if(i!==">"){strictFail(e,"Malformed comment");e.comment+="--"+i;e.state=m.COMMENT}else{e.state=m.TEXT}continue;case m.CDATA:if(i==="]"){e.state=m.CDATA_ENDING}else{e.cdata+=i}continue;case m.CDATA_ENDING:if(i==="]"){e.state=m.CDATA_ENDING_2}else{e.cdata+="]"+i;e.state=m.CDATA}continue;case m.CDATA_ENDING_2:if(i===">"){if(e.cdata){emitNode(e,"oncdata",e.cdata)}emitNode(e,"onclosecdata");e.cdata="";e.state=m.TEXT}else if(i==="]"){e.cdata+="]"}else{e.cdata+="]]"+i;e.state=m.CDATA}continue;case m.PROC_INST:if(i==="?"){e.state=m.PROC_INST_ENDING}else if(isWhitespace(i)){e.state=m.PROC_INST_BODY}else{e.procInstName+=i}continue;case m.PROC_INST_BODY:if(!e.procInstBody&&isWhitespace(i)){continue}else if(i==="?"){e.state=m.PROC_INST_ENDING}else{e.procInstBody+=i}continue;case m.PROC_INST_ENDING:if(i===">"){emitNode(e,"onprocessinginstruction",{name:e.procInstName,body:e.procInstBody});e.procInstName=e.procInstBody="";e.state=m.TEXT}else{e.procInstBody+="?"+i;e.state=m.PROC_INST_BODY}continue;case m.OPEN_TAG:if(isMatch(l,i)){e.tagName+=i}else{newTag(e);if(i===">"){openTag(e)}else if(i==="/"){e.state=m.OPEN_TAG_SLASH}else{if(!isWhitespace(i)){strictFail(e,"Invalid character in tag name")}e.state=m.ATTRIB}}continue;case m.OPEN_TAG_SLASH:if(i===">"){openTag(e,true);closeTag(e)}else{strictFail(e,"Forward-slash in opening tag not followed by >");e.state=m.ATTRIB}continue;case m.ATTRIB:if(isWhitespace(i)){continue}else if(i===">"){openTag(e)}else if(i==="/"){e.state=m.OPEN_TAG_SLASH}else if(isMatch(f,i)){e.attribName=i;e.attribValue="";e.state=m.ATTRIB_NAME}else{strictFail(e,"Invalid attribute name")}continue;case m.ATTRIB_NAME:if(i==="="){e.state=m.ATTRIB_VALUE}else if(i===">"){strictFail(e,"Attribute without value");e.attribValue=e.attribName;attrib(e);openTag(e)}else if(isWhitespace(i)){e.state=m.ATTRIB_NAME_SAW_WHITE}else if(isMatch(l,i)){e.attribName+=i}else{strictFail(e,"Invalid attribute name")}continue;case m.ATTRIB_NAME_SAW_WHITE:if(i==="="){e.state=m.ATTRIB_VALUE}else if(isWhitespace(i)){continue}else{strictFail(e,"Attribute without value");e.tag.attributes[e.attribName]="";e.attribValue="";emitNode(e,"onattribute",{name:e.attribName,value:""});e.attribName="";if(i===">"){openTag(e)}else if(isMatch(f,i)){e.attribName=i;e.state=m.ATTRIB_NAME}else{strictFail(e,"Invalid attribute name");e.state=m.ATTRIB}}continue;case m.ATTRIB_VALUE:if(isWhitespace(i)){continue}else if(isQuote(i)){e.q=i;e.state=m.ATTRIB_VALUE_QUOTED}else{strictFail(e,"Unquoted attribute value");e.state=m.ATTRIB_VALUE_UNQUOTED;e.attribValue=i}continue;case m.ATTRIB_VALUE_QUOTED:if(i!==e.q){if(i==="&"){e.state=m.ATTRIB_VALUE_ENTITY_Q}else{e.attribValue+=i}continue}attrib(e);e.q="";e.state=m.ATTRIB_VALUE_CLOSED;continue;case m.ATTRIB_VALUE_CLOSED:if(isWhitespace(i)){e.state=m.ATTRIB}else if(i===">"){openTag(e)}else if(i==="/"){e.state=m.OPEN_TAG_SLASH}else if(isMatch(f,i)){strictFail(e,"No whitespace between attributes");e.attribName=i;e.attribValue="";e.state=m.ATTRIB_NAME}else{strictFail(e,"Invalid attribute name")}continue;case m.ATTRIB_VALUE_UNQUOTED:if(!isAttribEnd(i)){if(i==="&"){e.state=m.ATTRIB_VALUE_ENTITY_U}else{e.attribValue+=i}continue}attrib(e);if(i===">"){openTag(e)}else{e.state=m.ATTRIB}continue;case m.CLOSE_TAG:if(!e.tagName){if(isWhitespace(i)){continue}else if(notMatch(f,i)){if(e.script){e.script+="</"+i;e.state=m.SCRIPT}else{strictFail(e,"Invalid tagname in closing tag.")}}else{e.tagName=i}}else if(i===">"){closeTag(e)}else if(isMatch(l,i)){e.tagName+=i}else if(e.script){e.script+="</"+e.tagName;e.tagName="";e.state=m.SCRIPT}else{if(!isWhitespace(i)){strictFail(e,"Invalid tagname in closing tag")}e.state=m.CLOSE_TAG_SAW_WHITE}continue;case m.CLOSE_TAG_SAW_WHITE:if(isWhitespace(i)){continue}if(i===">"){closeTag(e)}else{strictFail(e,"Invalid characters in closing tag")}continue;case m.TEXT_ENTITY:case m.ATTRIB_VALUE_ENTITY_Q:case m.ATTRIB_VALUE_ENTITY_U:var c;var u;switch(e.state){case m.TEXT_ENTITY:c=m.TEXT;u="textNode";break;case m.ATTRIB_VALUE_ENTITY_Q:c=m.ATTRIB_VALUE_QUOTED;u="attribValue";break;case m.ATTRIB_VALUE_ENTITY_U:c=m.ATTRIB_VALUE_UNQUOTED;u="attribValue";break}if(i===";"){e[u]+=parseEntity(e);e.entity="";e.state=c}else if(isMatch(e.entity.length?y:h,i)){e.entity+=i}else{strictFail(e,"Invalid character in entity name");e[u]+="&"+e.entity+i;e.entity="";e.state=c}continue;default:throw new Error(e,"Unknown state: "+e.state)}}if(e.position>=e.bufferCheckPosition){checkBufferLength(e)}return e}if(!String.fromCodePoint){(function(){var t=String.fromCharCode;var e=Math.floor;var n=function(){var n=16384;var i=[];var r;var o;var a=-1;var s=arguments.length;if(!s){return""}var c="";while(++a<s){var u=Number(arguments[a]);if(!isFinite(u)||u<0||u>1114111||e(u)!==u){throw RangeError("Invalid code point: "+u)}if(u<=65535){i.push(u)}else{u-=65536;r=(u>>10)+55296;o=u%1024+56320;i.push(r,o)}if(a+1===s||i.length>n){c+=t.apply(null,i);i.length=0}}return c};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:n,configurable:true,writable:true})}else{String.fromCodePoint=n}})()}})(false?0:e)},9046:(t,e)=>{"use strict";e.E=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]==="function")t.apply(this,e);else{return new Promise((n,i)=>{t.apply(this,e.concat([(t,e)=>t?i(t):n(e)]))})}},"name",{value:t.name})};e.p=function(t){return Object.defineProperty(function(...e){const n=e[e.length-1];if(typeof n!=="function")return t.apply(this,e);else t.apply(this,e.slice(0,-1)).then(t=>n(null,t),n)},"name",{value:t.name})}},1709:t=>{t.exports={isArray:function(t){if(Array.isArray){return Array.isArray(t)}return Object.prototype.toString.call(t)==="[object Array]"}}},8821:(t,e,n)=>{var i=n(2903);var r=n(8919);var o=n(4453);var a=n(1900);t.exports={xml2js:i,xml2json:r,js2xml:o,json2xml:a}},4453:(t,e,n)=>{var i=n(6717);var r=n(1709).isArray;var o,a;function validateOptions(t){var e=i.copyOptions(t);i.ensureFlagExists("ignoreDeclaration",e);i.ensureFlagExists("ignoreInstruction",e);i.ensureFlagExists("ignoreAttributes",e);i.ensureFlagExists("ignoreText",e);i.ensureFlagExists("ignoreComment",e);i.ensureFlagExists("ignoreCdata",e);i.ensureFlagExists("ignoreDoctype",e);i.ensureFlagExists("compact",e);i.ensureFlagExists("indentText",e);i.ensureFlagExists("indentCdata",e);i.ensureFlagExists("indentAttributes",e);i.ensureFlagExists("indentInstruction",e);i.ensureFlagExists("fullTagEmptyElement",e);i.ensureFlagExists("noQuotesForNativeAttributes",e);i.ensureSpacesExists(e);if(typeof e.spaces==="number"){e.spaces=Array(e.spaces+1).join(" ")}i.ensureKeyExists("declaration",e);i.ensureKeyExists("instruction",e);i.ensureKeyExists("attributes",e);i.ensureKeyExists("text",e);i.ensureKeyExists("comment",e);i.ensureKeyExists("cdata",e);i.ensureKeyExists("doctype",e);i.ensureKeyExists("type",e);i.ensureKeyExists("name",e);i.ensureKeyExists("elements",e);i.checkFnExists("doctype",e);i.checkFnExists("instruction",e);i.checkFnExists("cdata",e);i.checkFnExists("comment",e);i.checkFnExists("text",e);i.checkFnExists("instructionName",e);i.checkFnExists("elementName",e);i.checkFnExists("attributeName",e);i.checkFnExists("attributeValue",e);i.checkFnExists("attributes",e);i.checkFnExists("fullTagEmptyElement",e);return e}function writeIndentation(t,e,n){return(!n&&t.spaces?"\n":"")+Array(e+1).join(t.spaces)}function writeAttributes(t,e,n){if(e.ignoreAttributes){return""}if("attributesFn"in e){t=e.attributesFn(t,a,o)}var i,r,s,c,u=[];for(i in t){if(t.hasOwnProperty(i)&&t[i]!==null&&t[i]!==undefined){c=e.noQuotesForNativeAttributes&&typeof t[i]!=="string"?"":'"';r=""+t[i];r=r.replace(/"/g,""");s="attributeNameFn"in e?e.attributeNameFn(i,r,a,o):i;u.push(e.spaces&&e.indentAttributes?writeIndentation(e,n+1,false):" ");u.push(s+"="+c+("attributeValueFn"in e?e.attributeValueFn(r,i,a,o):r)+c)}}if(t&&Object.keys(t).length&&e.spaces&&e.indentAttributes){u.push(writeIndentation(e,n,false))}return u.join("")}function writeDeclaration(t,e,n){o=t;a="xml";return e.ignoreDeclaration?"":"<?"+"xml"+writeAttributes(t[e.attributesKey],e,n)+"?>"}function writeInstruction(t,e,n){if(e.ignoreInstruction){return""}var i;for(i in t){if(t.hasOwnProperty(i)){break}}var r="instructionNameFn"in e?e.instructionNameFn(i,t[i],a,o):i;if(typeof t[i]==="object"){o=t;a=r;return"<?"+r+writeAttributes(t[i][e.attributesKey],e,n)+"?>"}else{var s=t[i]?t[i]:"";if("instructionFn"in e)s=e.instructionFn(s,i,a,o);return"<?"+r+(s?" "+s:"")+"?>"}}function writeComment(t,e){return e.ignoreComment?"":"\x3c!--"+("commentFn"in e?e.commentFn(t,a,o):t)+"--\x3e"}function writeCdata(t,e){return e.ignoreCdata?"":"<![CDATA["+("cdataFn"in e?e.cdataFn(t,a,o):t.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function writeDoctype(t,e){return e.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in e?e.doctypeFn(t,a,o):t)+">"}function writeText(t,e){if(e.ignoreText)return"";t=""+t;t=t.replace(/&/g,"&");t=t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return"textFn"in e?e.textFn(t,a,o):t}function hasContent(t,e){var n;if(t.elements&&t.elements.length){for(n=0;n<t.elements.length;++n){switch(t.elements[n][e.typeKey]){case"text":if(e.indentText){return true}break;case"cdata":if(e.indentCdata){return true}break;case"instruction":if(e.indentInstruction){return true}break;case"doctype":case"comment":case"element":return true;default:return true}}}return false}function writeElement(t,e,n){o=t;a=t.name;var i=[],r="elementNameFn"in e?e.elementNameFn(t.name,t):t.name;i.push("<"+r);if(t[e.attributesKey]){i.push(writeAttributes(t[e.attributesKey],e,n))}var s=t[e.elementsKey]&&t[e.elementsKey].length||t[e.attributesKey]&&t[e.attributesKey]["xml:space"]==="preserve";if(!s){if("fullTagEmptyElementFn"in e){s=e.fullTagEmptyElementFn(t.name,t)}else{s=e.fullTagEmptyElement}}if(s){i.push(">");if(t[e.elementsKey]&&t[e.elementsKey].length){i.push(writeElements(t[e.elementsKey],e,n+1));o=t;a=t.name}i.push(e.spaces&&hasContent(t,e)?"\n"+Array(n+1).join(e.spaces):"");i.push("</"+r+">")}else{i.push("/>")}return i.join("")}function writeElements(t,e,n,i){return t.reduce(function(t,r){var o=writeIndentation(e,n,i&&!t);switch(r.type){case"element":return t+o+writeElement(r,e,n);case"comment":return t+o+writeComment(r[e.commentKey],e);case"doctype":return t+o+writeDoctype(r[e.doctypeKey],e);case"cdata":return t+(e.indentCdata?o:"")+writeCdata(r[e.cdataKey],e);case"text":return t+(e.indentText?o:"")+writeText(r[e.textKey],e);case"instruction":var a={};a[r[e.nameKey]]=r[e.attributesKey]?r:r[e.instructionKey];return t+(e.indentInstruction?o:"")+writeInstruction(a,e,n)}},"")}function hasContentCompact(t,e,n){var i;for(i in t){if(t.hasOwnProperty(i)){switch(i){case e.parentKey:case e.attributesKey:break;case e.textKey:if(e.indentText||n){return true}break;case e.cdataKey:if(e.indentCdata||n){return true}break;case e.instructionKey:if(e.indentInstruction||n){return true}break;case e.doctypeKey:case e.commentKey:return true;default:return true}}}return false}function writeElementCompact(t,e,n,i,r){o=t;a=e;var s="elementNameFn"in n?n.elementNameFn(e,t):e;if(typeof t==="undefined"||t===null||t===""){return"fullTagEmptyElementFn"in n&&n.fullTagEmptyElementFn(e,t)||n.fullTagEmptyElement?"<"+s+"></"+s+">":"<"+s+"/>"}var c=[];if(e){c.push("<"+s);if(typeof t!=="object"){c.push(">"+writeText(t,n)+"</"+s+">");return c.join("")}if(t[n.attributesKey]){c.push(writeAttributes(t[n.attributesKey],n,i))}var u=hasContentCompact(t,n,true)||t[n.attributesKey]&&t[n.attributesKey]["xml:space"]==="preserve";if(!u){if("fullTagEmptyElementFn"in n){u=n.fullTagEmptyElementFn(e,t)}else{u=n.fullTagEmptyElement}}if(u){c.push(">")}else{c.push("/>");return c.join("")}}c.push(writeElementsCompact(t,n,i+1,false));o=t;a=e;if(e){c.push((r?writeIndentation(n,i,false):"")+"</"+s+">")}return c.join("")}function writeElementsCompact(t,e,n,i){var o,a,s,c=[];for(a in t){if(t.hasOwnProperty(a)){s=r(t[a])?t[a]:[t[a]];for(o=0;o<s.length;++o){switch(a){case e.declarationKey:c.push(writeDeclaration(s[o],e,n));break;case e.instructionKey:c.push((e.indentInstruction?writeIndentation(e,n,i):"")+writeInstruction(s[o],e,n));break;case e.attributesKey:case e.parentKey:break;case e.textKey:c.push((e.indentText?writeIndentation(e,n,i):"")+writeText(s[o],e));break;case e.cdataKey:c.push((e.indentCdata?writeIndentation(e,n,i):"")+writeCdata(s[o],e));break;case e.doctypeKey:c.push(writeIndentation(e,n,i)+writeDoctype(s[o],e));break;case e.commentKey:c.push(writeIndentation(e,n,i)+writeComment(s[o],e));break;default:c.push(writeIndentation(e,n,i)+writeElementCompact(s[o],a,e,n,hasContentCompact(s[o],e)))}i=i&&!c.length}}}return c.join("")}t.exports=function(t,e){e=validateOptions(e);var n=[];o=t;a="_root_";if(e.compact){n.push(writeElementsCompact(t,e,0,true))}else{if(t[e.declarationKey]){n.push(writeDeclaration(t[e.declarationKey],e,0))}if(t[e.elementsKey]&&t[e.elementsKey].length){n.push(writeElements(t[e.elementsKey],e,0,!n.length))}}return n.join("")}},1900:(t,e,n)=>{var i=n(4453);t.exports=function(t,e){if(t instanceof Buffer){t=t.toString()}var n=null;if(typeof t==="string"){try{n=JSON.parse(t)}catch(t){throw new Error("The JSON structure is invalid")}}else{n=t}return i(n,e)}},6717:(t,e,n)=>{var i=n(1709).isArray;t.exports={copyOptions:function(t){var e,n={};for(e in t){if(t.hasOwnProperty(e)){n[e]=t[e]}}return n},ensureFlagExists:function(t,e){if(!(t in e)||typeof e[t]!=="boolean"){e[t]=false}},ensureSpacesExists:function(t){if(!("spaces"in t)||typeof t.spaces!=="number"&&typeof t.spaces!=="string"){t.spaces=0}},ensureAlwaysArrayExists:function(t){if(!("alwaysArray"in t)||typeof t.alwaysArray!=="boolean"&&!i(t.alwaysArray)){t.alwaysArray=false}},ensureKeyExists:function(t,e){if(!(t+"Key"in e)||typeof e[t+"Key"]!=="string"){e[t+"Key"]=e.compact?"_"+t:t}},checkFnExists:function(t,e){return t+"Fn"in e}}},2903:(t,e,n)=>{var i=n(2043);var r={on:function(){},parse:function(){}};var o=n(6717);var a=n(1709).isArray;var s;var c=true;var u;function validateOptions(t){s=o.copyOptions(t);o.ensureFlagExists("ignoreDeclaration",s);o.ensureFlagExists("ignoreInstruction",s);o.ensureFlagExists("ignoreAttributes",s);o.ensureFlagExists("ignoreText",s);o.ensureFlagExists("ignoreComment",s);o.ensureFlagExists("ignoreCdata",s);o.ensureFlagExists("ignoreDoctype",s);o.ensureFlagExists("compact",s);o.ensureFlagExists("alwaysChildren",s);o.ensureFlagExists("addParent",s);o.ensureFlagExists("trim",s);o.ensureFlagExists("nativeType",s);o.ensureFlagExists("nativeTypeAttributes",s);o.ensureFlagExists("sanitize",s);o.ensureFlagExists("instructionHasAttributes",s);o.ensureFlagExists("captureSpacesBetweenElements",s);o.ensureAlwaysArrayExists(s);o.ensureKeyExists("declaration",s);o.ensureKeyExists("instruction",s);o.ensureKeyExists("attributes",s);o.ensureKeyExists("text",s);o.ensureKeyExists("comment",s);o.ensureKeyExists("cdata",s);o.ensureKeyExists("doctype",s);o.ensureKeyExists("type",s);o.ensureKeyExists("name",s);o.ensureKeyExists("elements",s);o.ensureKeyExists("parent",s);o.checkFnExists("doctype",s);o.checkFnExists("instruction",s);o.checkFnExists("cdata",s);o.checkFnExists("comment",s);o.checkFnExists("text",s);o.checkFnExists("instructionName",s);o.checkFnExists("elementName",s);o.checkFnExists("attributeName",s);o.checkFnExists("attributeValue",s);o.checkFnExists("attributes",s);return s}function nativeType(t){var e=Number(t);if(!isNaN(e)){return e}var n=t.toLowerCase();if(n==="true"){return true}else if(n==="false"){return false}return t}function addField(t,e){var n;if(s.compact){if(!u[s[t+"Key"]]&&(a(s.alwaysArray)?s.alwaysArray.indexOf(s[t+"Key"])!==-1:s.alwaysArray)){u[s[t+"Key"]]=[]}if(u[s[t+"Key"]]&&!a(u[s[t+"Key"]])){u[s[t+"Key"]]=[u[s[t+"Key"]]]}if(t+"Fn"in s&&typeof e==="string"){e=s[t+"Fn"](e,u)}if(t==="instruction"&&("instructionFn"in s||"instructionNameFn"in s)){for(n in e){if(e.hasOwnProperty(n)){if("instructionFn"in s){e[n]=s.instructionFn(e[n],n,u)}else{var i=e[n];delete e[n];e[s.instructionNameFn(n,i,u)]=i}}}}if(a(u[s[t+"Key"]])){u[s[t+"Key"]].push(e)}else{u[s[t+"Key"]]=e}}else{if(!u[s.elementsKey]){u[s.elementsKey]=[]}var r={};r[s.typeKey]=t;if(t==="instruction"){for(n in e){if(e.hasOwnProperty(n)){break}}r[s.nameKey]="instructionNameFn"in s?s.instructionNameFn(n,e,u):n;if(s.instructionHasAttributes){r[s.attributesKey]=e[n][s.attributesKey];if("instructionFn"in s){r[s.attributesKey]=s.instructionFn(r[s.attributesKey],n,u)}}else{if("instructionFn"in s){e[n]=s.instructionFn(e[n],n,u)}r[s.instructionKey]=e[n]}}else{if(t+"Fn"in s){e=s[t+"Fn"](e,u)}r[s[t+"Key"]]=e}if(s.addParent){r[s.parentKey]=u}u[s.elementsKey].push(r)}}function manipulateAttributes(t){if("attributesFn"in s&&t){t=s.attributesFn(t,u)}if((s.trim||"attributeValueFn"in s||"attributeNameFn"in s||s.nativeTypeAttributes)&&t){var e;for(e in t){if(t.hasOwnProperty(e)){if(s.trim)t[e]=t[e].trim();if(s.nativeTypeAttributes){t[e]=nativeType(t[e])}if("attributeValueFn"in s)t[e]=s.attributeValueFn(t[e],e,u);if("attributeNameFn"in s){var n=t[e];delete t[e];t[s.attributeNameFn(e,t[e],u)]=n}}}}return t}function onInstruction(t){var e={};if(t.body&&(t.name.toLowerCase()==="xml"||s.instructionHasAttributes)){var n=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;var i;while((i=n.exec(t.body))!==null){e[i[1]]=i[2]||i[3]||i[4]}e=manipulateAttributes(e)}if(t.name.toLowerCase()==="xml"){if(s.ignoreDeclaration){return}u[s.declarationKey]={};if(Object.keys(e).length){u[s.declarationKey][s.attributesKey]=e}if(s.addParent){u[s.declarationKey][s.parentKey]=u}}else{if(s.ignoreInstruction){return}if(s.trim){t.body=t.body.trim()}var r={};if(s.instructionHasAttributes&&Object.keys(e).length){r[t.name]={};r[t.name][s.attributesKey]=e}else{r[t.name]=t.body}addField("instruction",r)}}function onStartElement(t,e){var n;if(typeof t==="object"){e=t.attributes;t=t.name}e=manipulateAttributes(e);if("elementNameFn"in s){t=s.elementNameFn(t,u)}if(s.compact){n={};if(!s.ignoreAttributes&&e&&Object.keys(e).length){n[s.attributesKey]={};var i;for(i in e){if(e.hasOwnProperty(i)){n[s.attributesKey][i]=e[i]}}}if(!(t in u)&&(a(s.alwaysArray)?s.alwaysArray.indexOf(t)!==-1:s.alwaysArray)){u[t]=[]}if(u[t]&&!a(u[t])){u[t]=[u[t]]}if(a(u[t])){u[t].push(n)}else{u[t]=n}}else{if(!u[s.elementsKey]){u[s.elementsKey]=[]}n={};n[s.typeKey]="element";n[s.nameKey]=t;if(!s.ignoreAttributes&&e&&Object.keys(e).length){n[s.attributesKey]=e}if(s.alwaysChildren){n[s.elementsKey]=[]}u[s.elementsKey].push(n)}n[s.parentKey]=u;u=n}function onText(t){if(s.ignoreText){return}if(!t.trim()&&!s.captureSpacesBetweenElements){return}if(s.trim){t=t.trim()}if(s.nativeType){t=nativeType(t)}if(s.sanitize){t=t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}addField("text",t)}function onComment(t){if(s.ignoreComment){return}if(s.trim){t=t.trim()}addField("comment",t)}function onEndElement(t){var e=u[s.parentKey];if(!s.addParent){delete u[s.parentKey]}u=e}function onCdata(t){if(s.ignoreCdata){return}if(s.trim){t=t.trim()}addField("cdata",t)}function onDoctype(t){if(s.ignoreDoctype){return}t=t.replace(/^ /,"");if(s.trim){t=t.trim()}addField("doctype",t)}function onError(t){t.note=t}t.exports=function(t,e){var n=c?i.parser(true,{}):n=new r.Parser("UTF-8");var o={};u=o;s=validateOptions(e);if(c){n.opt={strictEntities:true};n.onopentag=onStartElement;n.ontext=onText;n.oncomment=onComment;n.onclosetag=onEndElement;n.onerror=onError;n.oncdata=onCdata;n.ondoctype=onDoctype;n.onprocessinginstruction=onInstruction}else{n.on("startElement",onStartElement);n.on("text",onText);n.on("comment",onComment);n.on("endElement",onEndElement);n.on("error",onError)}if(c){n.write(t).close()}else{if(!n.parse(t)){throw new Error("XML parsing error: "+n.getError())}}if(o[s.elementsKey]){var a=o[s.elementsKey];delete o[s.elementsKey];o[s.elementsKey]=a;delete o.text}return o}},8919:(t,e,n)=>{var i=n(6717);var r=n(2903);function validateOptions(t){var e=i.copyOptions(t);i.ensureSpacesExists(e);return e}t.exports=function(t,e){var n,i,o,a;n=validateOptions(e);i=r(t,n);a="compact"in n&&n.compact?"_parent":"parent";if("addParent"in n&&n.addParent){o=JSON.stringify(i,function(t,e){return t===a?"_":e},n.spaces)}else{o=JSON.stringify(i,null,n.spaces)}return o.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}},6144:function(t,e,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){if(i===undefined)i=n;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[n]}})}:function(t,e,n,i){if(i===undefined)i=n;t[i]=e[n]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)if(n!=="default"&&Object.prototype.hasOwnProperty.call(t,n))i(e,t,n);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.logError=e.logInfo=void 0;const a=o(n(2186));const s=n(7888);const c=n(5747);const u=n(5630);const f=n(5622);const l=n(8821);const h=n(1314);const y={spraxdev:{url:"https://github.com/SpraxDev/Spigot-BuildTools/releases/latest/download/BuildTools.jar",prepareArgs:["--exit-after-fetch"]},spigotmc:{url:"https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar",prepareArgs:["--compile","None"]}};const m=(a.getInput("buildToolProvider")||"SpigotMC").toLowerCase();let d=h.fixArgArr((a.getInput("versions")||"latest").toLowerCase().split(","));const p=a.getInput("generateSrc")=="true";const g=a.getInput("generateDoc")=="true";const v=a.getInput("disableJavaCheck")=="true";const w=a.getInput("forceRun")=="true";const E=h.isNumeric(a.getInput("threads"))?parseInt(a.getInput("threads")):h.cpuCount;const S=h.resetWorkingDir();const T=f.join(S.logs,"SpraxDev_Actions-SpigotMC.log");const b=c.createWriteStream(T,{encoding:"utf-8",flags:"a"});async function run(){return new Promise(async(t,e)=>{try{if(d.length==0)return t({code:0,msg:"No version(s) provided to build"});if(!Object.keys(y).includes(m)){return e(new Error(`'${m}' is not a valid BuildTool-Provider (${Object.keys(y).join(", ")})`))}else if(m=="spraxdev"){logError(`SpraxDev's BuildTool has known issues causing builds to fail, please use 'SpigotMC' if you encounter any problems`)}if(!w){d=await removeExistingVersions(d,(t,e)=>{logInfo(`Skipping version '${t}' because it has been found in the local maven repository: ${e}`)});if(d.length==0)return t({code:0,msg:"No new versions to build"})}const n=y[m];logInfo("Installed Java-Version:");await h.runCmd("java",["-version"],S.base,b);logInfo(`\nDownloading '${n.url}'...`);await h.downloadFile(n.url,f.join(S.cache,"BuildTools.jar"));const i=d.length!=1;if(i){logInfo("Prepare for future tasks by running BuildTools...");await a.group("Prepare BuildTools",async()=>{try{return h.runCmd("java",["-jar","BuildTools.jar",v?"--disable-java-check":"",...n.prepareArgs],S.cache,b)}catch(t){logError(t);logError(`\nPrinting last 30 lines from '${f.resolve(T)}':`);for(const t of h.readLastLines(T,30)){logError(t)}return h.exit(1)}})}const r=["-jar","BuildTools.jar","--compile","Spigot"];if(p){r.push("--generate-source")}if(g){r.push("--generate-docs")}if(v){r.push("--disable-java-check")}const o=[];for(const t of d){o.push(async()=>{return new Promise(async(e,n)=>{const o=Date.now();const a=f.join(S.logs,`${t}.log`);logInfo(`Building version '${t}'...`);const s=i?f.join(S.base,`${t}`):S.cache;if(i){await u.copy(S.cache,s)}try{await h.runCmd("java",[...r,"--rev",t],s,a,true);if(i){c.rmdirSync(s,{recursive:true})}const u=Date.now();logInfo(`Finished '${t}' in ${((u-o)/6e4).toFixed(2)} minutes`);e()}catch(e){logInfo(`An error occurred while building '${t}'`);logError(e);logError(`\nPrinting last 30 lines from '${f.resolve(a)}':`);for(const t of h.readLastLines(a,30)){logError(t)}n(e)}})})}s.parallelLimit(o,E,n=>{if(n)return e(n);t({code:0})})}catch(t){e(t)}})}async function removeExistingVersions(t,e){return new Promise(async(n,i)=>{var r,o,a;const s=[];for(const n of t){let t=false;let i=n!="latest"?n:null;try{const t=await h.downloadFile(`https://hub.spigotmc.org/versions/${n}.json`,null);const e=t instanceof Buffer?JSON.parse(t.toString("utf-8")):null;const s=(r=e===null||e===void 0?void 0:e.refs)===null||r===void 0?void 0:r.Bukkit;if(s){const t=await h.downloadFile(`https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/raw/pom.xml?at=${s}`,null);if(t instanceof Buffer){const e=l.xml2js(t.toString("utf-8"),{compact:true,ignoreComment:true,ignoreAttributes:true});i=(a=(o=e.project)===null||o===void 0?void 0:o.version)===null||a===void 0?void 0:a._text}}}catch(t){logError(t)}const u=f.resolve(f.join(h.userHomeDir,`/.m2/repository/org/spigotmc/spigot/${i}/spigot-${i}.jar`));if(i){t=c.existsSync(u)}if(t){e(n,u)}else{s.push(n)}}n(s)})}function logInfo(t){console.log(t);b.write(t+"\n")}e.logInfo=logInfo;function logError(t){if(typeof t!="string"){t=JSON.stringify(t,null,2)}console.error(t);b.write(t+"\n")}e.logError=logError;run().then(t=>h.exit(t.code,t.msg)).catch(t=>h.exit(1,t))},1314:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.exit=e.resetWorkingDir=e.readLastLines=e.downloadFile=e.runCmd=e.isNumeric=e.fixArgArr=e.userHomeDir=e.cpuCount=void 0;const r=n(3129);const o=n(5747);const a=n(5876);const s=n(7211);const c=i(n(6235));const u=n(2087);const f=n(5622);const l=n(6144);const h=JSON.parse(o.readFileSync(n.ab+"package.json","utf-8"));const y=`${h.name||"Action-SpigotMC"}/${h.version||"UNKNOWN_VERSION"} (+${h.homepage||"https://github.com/SpraxDev/Action-SpigotMC"})`;e.cpuCount=u.cpus().length;e.userHomeDir=u.homedir();function fixArgArr(t){const e=[];for(const n of t){const t=n.trim();if(t&&!e.includes(t)){e.push(t)}}return e}e.fixArgArr=fixArgArr;function isNumeric(t){return/^[0-9]+$/.test(t)}e.isNumeric=isNumeric;async function runCmd(t,e,n,i,a=false){return new Promise((s,c)=>{const u=typeof i=="string";const f=typeof i!="string"?i:o.createWriteStream(i,{encoding:"utf-8",flags:"a"});const l=r.spawn(t,e,{shell:true,cwd:n,env:process.env});l.stdout.on("data",t=>{f.write(t);if(!a){process.stdout.write(t)}});l.stderr.on("data",t=>{f.write(t);if(!a){process.stderr.write(t)}});l.on("close",e=>{if(u){f.close()}if(e!=0){return c({err:new Error(`process exited with code ${e}`),cmd:t,workingDir:n})}s()})})}e.runCmd=runCmd;async function downloadFile(t,e,n=0){const i=t.toLowerCase().startsWith("http://")?a.get:s.get;return new Promise((r,a)=>{let s=null;const c=function(t){if(s){s.close();s=null;if(t&&e!=null){o.rmdirSync(e,{recursive:true})}}};i(t,{headers:{"User-Agent":y}},t=>{if(t.statusCode!=200){const i=t.headers.location;if(n<12&&i&&(t.statusCode==301||t.statusCode==302||t.statusCode==303||t.statusCode==307||t.statusCode==308)){c(false);if(!/https?:\/\//g.test(i)){return a(new Error(`Server responded with ${t.statusCode} and a relative Location-Header value (${i})`))}return downloadFile(i,e,++n).then(r).catch(a)}else{c(true);return a(new Error(`Server responded with ${t.statusCode}`))}}if(e!=null){s=o.createWriteStream(e,{encoding:"binary"}).on("finish",()=>{c(false);return r()}).on("error",t=>{c(true);return a(t)});t.pipe(s)}else{const e=[];t.on("data",t=>{e.push(Buffer.from(t,"binary"))});t.on("end",()=>{r(Buffer.concat(e))})}}).on("error",t=>{c(true);return a(t)})})}e.downloadFile=downloadFile;function readLastLines(t,e,n="utf-8"){const i=[];const r=new c.default(t);let o;while(o=r.next()){i.push(o.toString(n));if(i.length>e){i.shift()}}return i}e.readLastLines=readLastLines;function resetWorkingDir(){const t=f.join(u.tmpdir(),"SpraxDev-Action-SpigotMC");const e=f.join(t,"cache");const n=f.join(t,"logs");o.rmdirSync(t,{recursive:true});o.mkdirSync(e,{recursive:true});o.mkdirSync(n);return{base:t,cache:e,logs:n}}e.resetWorkingDir=resetWorkingDir;function exit(t,e){if(e){if(typeof e=="string"){l.logInfo(e)}else{l.logError(e)}}return process.exit(t)}e.exit=exit},2357:t=>{"use strict";t.exports=require("assert")},3129:t=>{"use strict";t.exports=require("child_process")},7619:t=>{"use strict";t.exports=require("constants")},5747:t=>{"use strict";t.exports=require("fs")},5876:t=>{"use strict";t.exports=require("http")},7211:t=>{"use strict";t.exports=require("https")},2087:t=>{"use strict";t.exports=require("os")},5622:t=>{"use strict";t.exports=require("path")},2413:t=>{"use strict";t.exports=require("stream")},4304:t=>{"use strict";t.exports=require("string_decoder")},1669:t=>{"use strict";t.exports=require("util")}};var e={};function __webpack_require__(n){if(e[n]){return e[n].exports}var i=e[n]={exports:{}};var r=true;try{t[n].call(i.exports,i,i.exports,__webpack_require__);r=false}finally{if(r)delete e[n]}return i.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(6144)})();
|
|
//# sourceMappingURL=index.js.map
|