@shopify/create-app 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/commands/init.js +64 -60
- package/dist/index.js +51 -51
- package/package.json +1 -1
- package/templates/app/README.md +2 -4
- package/templates/app/package.json +1 -1
package/dist/commands/init.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
var
|
|
2
|
-
`),l=a.length;for(l>0&&a.includes("unstyle")&&(a=[...new Set(["unstyle",...a])].reverse());l-- >0;)o=r(t.styles[a[l]],o,u);return o},i=(s,a,o)=>{t.styles[s]=e({name:s,codes:a}),(t.keys[o]||(t.keys[o]=[])).push(s),Reflect.defineProperty(t,s,{configurable:!0,enumerable:!0,set(l){t.alias(s,l)},get(){let l=h=>n(h,l.stack);return Reflect.setPrototypeOf(l,t),l.stack=this.stack?this.stack.concat(s):[s],l}})};return i("reset",[0,0],"modifier"),i("bold",[1,22],"modifier"),i("dim",[2,22],"modifier"),i("italic",[3,23],"modifier"),i("underline",[4,24],"modifier"),i("inverse",[7,27],"modifier"),i("hidden",[8,28],"modifier"),i("strikethrough",[9,29],"modifier"),i("black",[30,39],"color"),i("red",[31,39],"color"),i("green",[32,39],"color"),i("yellow",[33,39],"color"),i("blue",[34,39],"color"),i("magenta",[35,39],"color"),i("cyan",[36,39],"color"),i("white",[37,39],"color"),i("gray",[90,39],"color"),i("grey",[90,39],"color"),i("bgBlack",[40,49],"bg"),i("bgRed",[41,49],"bg"),i("bgGreen",[42,49],"bg"),i("bgYellow",[43,49],"bg"),i("bgBlue",[44,49],"bg"),i("bgMagenta",[45,49],"bg"),i("bgCyan",[46,49],"bg"),i("bgWhite",[47,49],"bg"),i("blackBright",[90,39],"bright"),i("redBright",[91,39],"bright"),i("greenBright",[92,39],"bright"),i("yellowBright",[93,39],"bright"),i("blueBright",[94,39],"bright"),i("magentaBright",[95,39],"bright"),i("cyanBright",[96,39],"bright"),i("whiteBright",[97,39],"bright"),i("bgBlackBright",[100,49],"bgBright"),i("bgRedBright",[101,49],"bgBright"),i("bgGreenBright",[102,49],"bgBright"),i("bgYellowBright",[103,49],"bgBright"),i("bgBlueBright",[104,49],"bgBright"),i("bgMagentaBright",[105,49],"bgBright"),i("bgCyanBright",[106,49],"bgBright"),i("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=
|
|
3
|
-
`+l,width:f=80}=u;f-=((h+l).match(/[^\S\n]/g)||[]).length;let m=`.{1,${f}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,p=o.trim(),y=new RegExp(m,"g"),b=p.match(y)||[];return b=b.map(D=>D.replace(/\n$/,"")),u.padEnd&&(b=b.map(D=>D.padEnd(f," "))),u.padStart&&(b=b.map(D=>D.padStart(f," "))),l+b.join(h)},t.unmute=o=>{let u=o.stack.find(h=>r.keys.color.includes(h));return u?r[u]:o.stack.find(h=>h.slice(2)==="bg")?r[u.slice(2)]:h=>h},t.pascal=o=>o?o[0].toUpperCase()+o.slice(1):"",t.inverse=o=>{if(!o||!o.stack)return o;let u=o.stack.find(h=>r.keys.color.includes(h));if(u){let h=r["bg"+t.pascal(u)];return h?h.black:o}let l=o.stack.find(h=>h.slice(0,2)==="bg");return l?r[l.slice(2).toLowerCase()]||o:r.none},t.complement=o=>{if(!o||!o.stack)return o;let u=o.stack.find(h=>r.keys.color.includes(h)),l=o.stack.find(h=>h.slice(0,2)==="bg");if(u&&!l)return r[s[u]||u];if(l){let h=l.slice(2).toLowerCase(),f=s[h];return f&&r["bg"+t.pascal(f)]||o}return r.none},t.meridiem=o=>{let u=o.getHours(),l=o.getMinutes(),h=u>=12?"pm":"am";u=u%12;let f=u===0?12:u,c=l<10?"0"+l:l;return f+":"+c+" "+h},t.set=(o={},u="",l)=>u.split(".").reduce((h,f,c,m)=>{let p=m.length-1>c?h[f]||{}:l;return!t.isObject(p)&&c<m.length-1&&(p={}),h[f]=p},o),t.get=(o={},u="",l)=>{let h=o[u]==null?u.split(".").reduce((f,c)=>f&&f[c],o):o[u];return h??l},t.mixin=(o,u)=>{if(!a(o))return u;if(!a(u))return o;for(let l of Object.keys(u)){let h=Object.getOwnPropertyDescriptor(u,l);if(h.hasOwnProperty("value"))if(o.hasOwnProperty(l)&&a(h.value)){let f=Object.getOwnPropertyDescriptor(o,l);a(f.value)?o[l]=t.merge({},o[l],u[l]):Reflect.defineProperty(o,l,h)}else Reflect.defineProperty(o,l,h);else Reflect.defineProperty(o,l,h)}return o},t.merge=(...o)=>{let u={};for(let l of o)t.mixin(u,l);return u},t.mixinEmitter=(o,u)=>{let l=u.constructor.prototype;for(let h of Object.keys(l)){let f=l[h];typeof f=="function"?t.define(o,h,f.bind(u)):t.define(o,h,f)}},t.onExit=o=>{const u=(l,h)=>{n||(n=!0,i.forEach(f=>f()),l===!0&&process.exit(128+h))};i.length===0&&(process.once("SIGTERM",u.bind(null,!0,15)),process.once("SIGINT",u.bind(null,!0,2)),process.once("exit",u)),i.push(o)},t.define=(o,u,l)=>{Reflect.defineProperty(o,u,{value:l})},t.defineExport=(o,u,l)=>{let h;Reflect.defineProperty(o,u,{enumerable:!0,configurable:!0,set(f){h=f},get(){return h?h():l()}})}}(
|
|
4
|
-
`)n.name="enter";else if(t===" ")n.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")n.name="backspace",n.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")n.name="escape",n.meta=t.length===2;else if(t===" "||t==="\x1B ")n.name="space",n.meta=t.length===2;else if(t<="")n.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),n.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")n.name="number";else if(t.length===1&&t>="a"&&t<="z")n.name=t;else if(t.length===1&&t>="A"&&t<="Z")n.name=t.toLowerCase(),n.shift=!0;else if(r=
|
|
1
|
+
var mm=Object.defineProperty;var gm=(t,e,r)=>e in t?mm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ps=(t,e,r)=>(gm(t,typeof e!="symbol"?e+"":e,r),r),tl=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var Ht=(t,e,r)=>(tl(t,e,"read from private field"),r?r.call(t):e.get(t)),Nn=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$t=(t,e,r,n)=>(tl(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),ms=(t,e,r,n)=>({set _(i){$t(t,e,i,r)},get _(){return Ht(t,e,n)}});var xt,yr,vr;import{Flags as rl,Command as ym}from"@oclif/core";import nl from"assert";import Ut from"events";import vm from"readline";import Xr,{EOL as ft,constants as il}from"os";import Xe,{Readable as bm}from"stream";import*as gs from"tty";import sl from"tty";import{Buffer as Dm}from"node:buffer";import st from"node:path";import al from"node:child_process";import dt from"node:process";import wm from"child_process";import we,{sep as ys,extname as Em,resolve as ol,dirname as _m}from"path";import Je,{statSync as Sm,readFileSync as Cm,readFile as Am,stat as Rm}from"fs";import ul from"node:os";import Tm from"buffer";import Jt from"util";import{promises as ll}from"node:fs";import Mn from"http";import vs from"https";import Qr,{fileURLToPath as xm}from"url";import $m from"dns";import Om from"zlib";import bs from"http2";import cl from"tls";import hl from"net";var le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fm(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}),e}function Pm(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ne={},at={exports:{}},fl={exports:{}};(function(t){const e=process.env.TERM_PROGRAM==="Hyper",r=process.platform==="win32",n=process.platform==="linux",i={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},s=Object.assign({},i,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),a=Object.assign({},i,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",question:"?",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:n?"\u25B8":"\u276F",pointerSmall:n?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});t.exports=r&&!e?s:a,Reflect.defineProperty(t.exports,"common",{enumerable:!1,value:i}),Reflect.defineProperty(t.exports,"windows",{enumerable:!1,value:s}),Reflect.defineProperty(t.exports,"other",{enumerable:!1,value:a})})(fl);const km=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Im=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,dl=()=>{const t={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(t.enabled=process.env.FORCE_COLOR!=="0");const e=s=>{let a=s.open=`\x1B[${s.codes[0]}m`,o=s.close=`\x1B[${s.codes[1]}m`,u=s.regex=new RegExp(`\\u001b\\[${s.codes[1]}m`,"g");return s.wrap=(l,h)=>{l.includes(o)&&(l=l.replace(u,o+a));let f=a+l+o;return h?f.replace(/\r*\n/g,`${o}$&${a}`):f},s},r=(s,a,o)=>typeof s=="function"?s(a):s.wrap(a,o),n=(s,a)=>{if(s===""||s==null)return"";if(t.enabled===!1)return s;if(t.visible===!1)return"";let o=""+s,u=o.includes(`
|
|
2
|
+
`),l=a.length;for(l>0&&a.includes("unstyle")&&(a=[...new Set(["unstyle",...a])].reverse());l-- >0;)o=r(t.styles[a[l]],o,u);return o},i=(s,a,o)=>{t.styles[s]=e({name:s,codes:a}),(t.keys[o]||(t.keys[o]=[])).push(s),Reflect.defineProperty(t,s,{configurable:!0,enumerable:!0,set(l){t.alias(s,l)},get(){let l=h=>n(h,l.stack);return Reflect.setPrototypeOf(l,t),l.stack=this.stack?this.stack.concat(s):[s],l}})};return i("reset",[0,0],"modifier"),i("bold",[1,22],"modifier"),i("dim",[2,22],"modifier"),i("italic",[3,23],"modifier"),i("underline",[4,24],"modifier"),i("inverse",[7,27],"modifier"),i("hidden",[8,28],"modifier"),i("strikethrough",[9,29],"modifier"),i("black",[30,39],"color"),i("red",[31,39],"color"),i("green",[32,39],"color"),i("yellow",[33,39],"color"),i("blue",[34,39],"color"),i("magenta",[35,39],"color"),i("cyan",[36,39],"color"),i("white",[37,39],"color"),i("gray",[90,39],"color"),i("grey",[90,39],"color"),i("bgBlack",[40,49],"bg"),i("bgRed",[41,49],"bg"),i("bgGreen",[42,49],"bg"),i("bgYellow",[43,49],"bg"),i("bgBlue",[44,49],"bg"),i("bgMagenta",[45,49],"bg"),i("bgCyan",[46,49],"bg"),i("bgWhite",[47,49],"bg"),i("blackBright",[90,39],"bright"),i("redBright",[91,39],"bright"),i("greenBright",[92,39],"bright"),i("yellowBright",[93,39],"bright"),i("blueBright",[94,39],"bright"),i("magentaBright",[95,39],"bright"),i("cyanBright",[96,39],"bright"),i("whiteBright",[97,39],"bright"),i("bgBlackBright",[100,49],"bgBright"),i("bgRedBright",[101,49],"bgBright"),i("bgGreenBright",[102,49],"bgBright"),i("bgYellowBright",[103,49],"bgBright"),i("bgBlueBright",[104,49],"bgBright"),i("bgMagentaBright",[105,49],"bgBright"),i("bgCyanBright",[106,49],"bgBright"),i("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=Im,t.hasColor=t.hasAnsi=s=>(t.ansiRegex.lastIndex=0,typeof s=="string"&&s!==""&&t.ansiRegex.test(s)),t.alias=(s,a)=>{let o=typeof a=="string"?t[a]:a;if(typeof o!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");o.stack||(Reflect.defineProperty(o,"name",{value:s}),t.styles[s]=o,o.stack=[s]),Reflect.defineProperty(t,s,{configurable:!0,enumerable:!0,set(u){t.alias(s,u)},get(){let u=l=>n(l,u.stack);return Reflect.setPrototypeOf(u,t),u.stack=this.stack?this.stack.concat(o.stack):o.stack,u}})},t.theme=s=>{if(!km(s))throw new TypeError("Expected theme to be an object");for(let a of Object.keys(s))t.alias(a,s[a]);return t},t.alias("unstyle",s=>typeof s=="string"&&s!==""?(t.ansiRegex.lastIndex=0,s.replace(t.ansiRegex,"")):""),t.alias("noop",s=>s),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=fl.exports,t.define=i,t};at.exports=dl(),at.exports.create=dl,function(t){const e=Object.prototype.toString,r=at.exports;let n=!1,i=[];const s={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};t.longest=(o,u)=>o.reduce((l,h)=>Math.max(l,u?h[u].length:h.length),0),t.hasColor=o=>!!o&&r.hasColor(o);const a=t.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o);t.nativeType=o=>e.call(o).slice(8,-1).toLowerCase().replace(/\s/g,""),t.isAsyncFn=o=>t.nativeType(o)==="asyncfunction",t.isPrimitive=o=>o!=null&&typeof o!="object"&&typeof o!="function",t.resolve=(o,u,...l)=>typeof u=="function"?u.call(o,...l):u,t.scrollDown=(o=[])=>[...o.slice(1),o[0]],t.scrollUp=(o=[])=>[o.pop(),...o],t.reorder=(o=[])=>{let u=o.slice();return u.sort((l,h)=>l.index>h.index?1:l.index<h.index?-1:0),u},t.swap=(o,u,l)=>{let h=o.length,f=l===h?0:l<0?h-1:l,c=o[u];o[u]=o[f],o[f]=c},t.width=(o,u=80)=>{let l=o&&o.columns?o.columns:u;return o&&typeof o.getWindowSize=="function"&&(l=o.getWindowSize()[0]),process.platform==="win32"?l-1:l},t.height=(o,u=20)=>{let l=o&&o.rows?o.rows:u;return o&&typeof o.getWindowSize=="function"&&(l=o.getWindowSize()[1]),l},t.wordWrap=(o,u={})=>{if(!o)return o;typeof u=="number"&&(u={width:u});let{indent:l="",newline:h=`
|
|
3
|
+
`+l,width:f=80}=u;f-=((h+l).match(/[^\S\n]/g)||[]).length;let m=`.{1,${f}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,p=o.trim(),y=new RegExp(m,"g"),b=p.match(y)||[];return b=b.map(D=>D.replace(/\n$/,"")),u.padEnd&&(b=b.map(D=>D.padEnd(f," "))),u.padStart&&(b=b.map(D=>D.padStart(f," "))),l+b.join(h)},t.unmute=o=>{let u=o.stack.find(h=>r.keys.color.includes(h));return u?r[u]:o.stack.find(h=>h.slice(2)==="bg")?r[u.slice(2)]:h=>h},t.pascal=o=>o?o[0].toUpperCase()+o.slice(1):"",t.inverse=o=>{if(!o||!o.stack)return o;let u=o.stack.find(h=>r.keys.color.includes(h));if(u){let h=r["bg"+t.pascal(u)];return h?h.black:o}let l=o.stack.find(h=>h.slice(0,2)==="bg");return l?r[l.slice(2).toLowerCase()]||o:r.none},t.complement=o=>{if(!o||!o.stack)return o;let u=o.stack.find(h=>r.keys.color.includes(h)),l=o.stack.find(h=>h.slice(0,2)==="bg");if(u&&!l)return r[s[u]||u];if(l){let h=l.slice(2).toLowerCase(),f=s[h];return f&&r["bg"+t.pascal(f)]||o}return r.none},t.meridiem=o=>{let u=o.getHours(),l=o.getMinutes(),h=u>=12?"pm":"am";u=u%12;let f=u===0?12:u,c=l<10?"0"+l:l;return f+":"+c+" "+h},t.set=(o={},u="",l)=>u.split(".").reduce((h,f,c,m)=>{let p=m.length-1>c?h[f]||{}:l;return!t.isObject(p)&&c<m.length-1&&(p={}),h[f]=p},o),t.get=(o={},u="",l)=>{let h=o[u]==null?u.split(".").reduce((f,c)=>f&&f[c],o):o[u];return h??l},t.mixin=(o,u)=>{if(!a(o))return u;if(!a(u))return o;for(let l of Object.keys(u)){let h=Object.getOwnPropertyDescriptor(u,l);if(h.hasOwnProperty("value"))if(o.hasOwnProperty(l)&&a(h.value)){let f=Object.getOwnPropertyDescriptor(o,l);a(f.value)?o[l]=t.merge({},o[l],u[l]):Reflect.defineProperty(o,l,h)}else Reflect.defineProperty(o,l,h);else Reflect.defineProperty(o,l,h)}return o},t.merge=(...o)=>{let u={};for(let l of o)t.mixin(u,l);return u},t.mixinEmitter=(o,u)=>{let l=u.constructor.prototype;for(let h of Object.keys(l)){let f=l[h];typeof f=="function"?t.define(o,h,f.bind(u)):t.define(o,h,f)}},t.onExit=o=>{const u=(l,h)=>{n||(n=!0,i.forEach(f=>f()),l===!0&&process.exit(128+h))};i.length===0&&(process.once("SIGTERM",u.bind(null,!0,15)),process.once("SIGINT",u.bind(null,!0,2)),process.once("exit",u)),i.push(o)},t.define=(o,u,l)=>{Reflect.defineProperty(o,u,{value:l})},t.defineExport=(o,u,l)=>{let h;Reflect.defineProperty(o,u,{enumerable:!0,configurable:!0,set(f){h=f},get(){return h?h():l()}})}}(Ne);var wr={};wr.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"},wr.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"},wr.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"},wr.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"},wr.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"};const pl=vm,Lm=wr,Bm=/^(?:\x1b)([a-zA-Z0-9])$/,Nm=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,Mm={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function jm(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function Hm(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}const jn=(t="",e={})=>{let r,n={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t="\x1B"+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t=n.sequence||""),n.sequence=n.sequence||t||n.name,t==="\r")n.raw=void 0,n.name="return";else if(t===`
|
|
4
|
+
`)n.name="enter";else if(t===" ")n.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")n.name="backspace",n.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")n.name="escape",n.meta=t.length===2;else if(t===" "||t==="\x1B ")n.name="space",n.meta=t.length===2;else if(t<="")n.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),n.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")n.name="number";else if(t.length===1&&t>="a"&&t<="z")n.name=t;else if(t.length===1&&t>="A"&&t<="Z")n.name=t.toLowerCase(),n.shift=!0;else if(r=Bm.exec(t))n.meta=!0,n.shift=/^[A-Z]$/.test(r[1]);else if(r=Nm.exec(t)){let i=[...t];i[0]==="\x1B"&&i[1]==="\x1B"&&(n.option=!0);let s=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),a=(r[3]||r[5]||1)-1;n.ctrl=!!(a&4),n.meta=!!(a&10),n.shift=!!(a&1),n.code=s,n.name=Mm[s],n.shift=jm(s)||n.shift,n.ctrl=Hm(s)||n.ctrl}return n};jn.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let n=pl.createInterface({terminal:!0,input:r});pl.emitKeypressEvents(r,n);let i=(o,u)=>e(o,jn(o,u),n),s=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",i),n.resume(),()=>{r.isTTY&&r.setRawMode(s),r.removeListener("keypress",i),n.pause(),n.close()}},jn.action=(t,e,r)=>{let n={...Lm,...r};return e.ctrl?(e.action=n.ctrl[e.name],e):e.option&&n.option?(e.action=n.option[e.name],e):e.shift?(e.action=n.shift[e.name],e):(e.action=n.keys[e.name],e)};var Um=jn,qm=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let n=e[r];typeof n=="number"&&(n={interval:n}),Gm(t,r,n)}};function Gm(t,e,r={}){let n=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},i=r.interval||120;n.frames=r.frames||[],n.loading=!0;let s=setInterval(()=>{n.ms=Date.now()-n.start,n.tick++,t.render()},i);return n.stop=()=>{n.loading=!1,clearInterval(s)},Reflect.defineProperty(n,"interval",{value:s}),t.once("close",()=>n.stop()),n.stop}const{define:zm,width:Vm}=Ne;class Wm{constructor(e){let r=e.options;zm(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=Vm(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}}var Ym=Wm;const Ds=Ne,Oe=at.exports,ws={default:Oe.noop,noop:Oe.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||Ds.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||Ds.complement(this.primary)},primary:Oe.cyan,success:Oe.green,danger:Oe.magenta,strong:Oe.bold,warning:Oe.yellow,muted:Oe.dim,disabled:Oe.gray,dark:Oe.dim.gray,underline:Oe.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};ws.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(Oe.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(Oe.visible=t.styles.visible);let e=Ds.merge({},ws,t.styles);delete e.merge;for(let r of Object.keys(Oe))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>Oe[r]});for(let r of Object.keys(Oe.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>Oe[r]});return e};var Km=ws;const Es=process.platform==="win32",Ot=at.exports,Xm=Ne,_s={...Ot.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",ellipsisLarge:"\u22EF",ellipsisSmall:"\u2026",fullBlock:"\u2588",identicalTo:"\u2261",indicator:Ot.symbols.check,leftAngle:"\u2039",mark:"\u203B",minus:"\u2212",multiplication:"\xD7",obelus:"\xF7",percent:"%",pilcrow:"\xB6",pilcrow2:"\u2761",pencilUpRight:"\u2710",pencilDownRight:"\u270E",pencilRight:"\u270F",plus:"+",plusMinus:"\xB1",pointRight:"\u261E",rightAngle:"\u203A",section:"\xA7",hexagon:{off:"\u2B21",on:"\u2B22",disabled:"\u2B22"},ballot:{on:"\u2611",off:"\u2610",disabled:"\u2612"},stars:{on:"\u2605",off:"\u2606",disabled:"\u2606"},folder:{on:"\u25BC",off:"\u25B6",disabled:"\u25B6"},prefix:{pending:Ot.symbols.question,submitted:Ot.symbols.check,cancelled:Ot.symbols.cross},separator:{pending:Ot.symbols.pointerSmall,submitted:Ot.symbols.middot,cancelled:Ot.symbols.middot},radio:{off:Es?"( )":"\u25EF",on:Es?"(*)":"\u25C9",disabled:Es?"(|)":"\u24BE"},numbers:["\u24EA","\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246A","\u246B","\u246C","\u246D","\u246E","\u246F","\u2470","\u2471","\u2472","\u2473","\u3251","\u3252","\u3253","\u3254","\u3255","\u3256","\u3257","\u3258","\u3259","\u325A","\u325B","\u325C","\u325D","\u325E","\u325F","\u32B1","\u32B2","\u32B3","\u32B4","\u32B5","\u32B6","\u32B7","\u32B8","\u32B9","\u32BA","\u32BB","\u32BC","\u32BD","\u32BE","\u32BF"]};_s.merge=t=>{let e=Xm.merge({},Ot.symbols,_s,t.symbols);return delete e.merge,e};var Qm=_s;const Jm=Km,Zm=Qm,eg=Ne;var tg=t=>{t.options=eg.merge({},t.options.theme,t.options),t.symbols=Zm.merge(t.options),t.styles=Jm.merge(t.options)},Ss={exports:{}};(function(t,e){const r=process.env.TERM_PROGRAM==="Apple_Terminal",n=at.exports,i=Ne,s=t.exports=e,a="\x1B[",o="\x07";let u=!1;const l=s.code={bell:o,beep:o,beginning:`${a}G`,down:`${a}J`,esc:a,getPosition:`${a}6n`,hide:`${a}?25l`,line:`${a}2K`,lineEnd:`${a}K`,lineStart:`${a}1K`,restorePosition:a+(r?"8":"u"),savePosition:a+(r?"7":"s"),screen:`${a}2J`,show:`${a}?25h`,up:`${a}1J`},h=s.cursor={get hidden(){return u},hide(){return u=!0,l.hide},show(){return u=!1,l.show},forward:(c=1)=>`${a}${c}C`,backward:(c=1)=>`${a}${c}D`,nextLine:(c=1)=>`${a}E`.repeat(c),prevLine:(c=1)=>`${a}F`.repeat(c),up:(c=1)=>c?`${a}${c}A`:"",down:(c=1)=>c?`${a}${c}B`:"",right:(c=1)=>c?`${a}${c}C`:"",left:(c=1)=>c?`${a}${c}D`:"",to(c,m){return m?`${a}${m+1};${c+1}H`:`${a}${c+1}G`},move(c=0,m=0){let p="";return p+=c<0?h.left(-c):c>0?h.right(c):"",p+=m<0?h.up(-m):m>0?h.down(m):"",p},restore(c={}){let{after:m,cursor:p,initial:y,input:b,prompt:D,size:_,value:R}=c;if(y=i.isPrimitive(y)?String(y):"",b=i.isPrimitive(b)?String(b):"",R=i.isPrimitive(R)?String(R):"",_){let S=s.cursor.up(_)+s.cursor.to(D.length),v=b.length-p;return v>0&&(S+=s.cursor.left(v)),S}if(R||m){let S=!b&&!!y?-y.length:-b.length+p;return m&&(S-=m.length),b===""&&y&&!D.includes(y)&&(S+=y.length),s.cursor.move(S)}}},f=s.erase={screen:l.screen,up:l.up,down:l.down,line:l.line,lineEnd:l.lineEnd,lineStart:l.lineStart,lines(c){let m="";for(let p=0;p<c;p++)m+=s.erase.line+(p<c-1?s.cursor.up(1):"");return c&&(m+=s.code.beginning),m}};s.clear=(c="",m=process.stdout.columns)=>{if(!m)return f.line+h.to(0);let p=D=>[...n.unstyle(D)].length,y=c.split(/\r?\n/),b=0;for(let D of y)b+=1+Math.floor(Math.max(p(D)-1,0)/m);return(f.line+h.prevLine()).repeat(b-1)+f.line+h.to(0)}})(Ss,Ss.exports);const rg=Ut,ml=at.exports,Cs=Um,ng=qm,ig=Ym,sg=tg,Qe=Ne,Zt=Ss.exports;class Wu extends rg{constructor(e={}){super();this.name=e.name,this.type=e.type,this.options=e,sg(this),ng(this),this.state=new ig(this),this.initial=[e.initial,e.default].find(r=>r!=null),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=og(this.options.margin),this.setMaxListeners(0),ag(this)}async keypress(e,r={}){this.keypressed=!0;let n=Cs.action(e,Cs(e,r),this.options.actions);this.state.keypress=n,this.emit("keypress",e,n),this.emit("state",this.state.clone());let i=this.options[n.action]||this[n.action]||this.dispatch;if(typeof i=="function")return await i.call(this,e,n);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit("alert"):this.stdout.write(Zt.code.beep)}cursorHide(){this.stdout.write(Zt.cursor.hide()),Qe.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(Zt.cursor.show())}write(e){!e||(this.stdout&&this.state.show!==!1&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let r=this.state.buffer;this.state.buffer="",!(!r&&!e||this.options.show===!1)&&this.stdout.write(Zt.cursor.down(e)+Zt.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:r,rest:n}=this.sections(),{cursor:i,initial:s="",input:a="",value:o=""}=this,u=this.state.size=n.length,l={after:r,cursor:i,initial:s,input:a,prompt:e,size:u,value:o},h=Zt.cursor.restore(l);h&&this.stdout.write(h)}sections(){let{buffer:e,input:r,prompt:n}=this.state;n=ml.unstyle(n);let i=ml.unstyle(e),s=i.indexOf(n),a=i.slice(0,s),u=i.slice(s).split(`
|
|
5
5
|
`),l=u[0],h=u[u.length-1],c=(n+(r?" "+r:"")).length,m=c<l.length?l.slice(c+1):"";return{header:a,prompt:l,after:m,rest:u.slice(1),last:h}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`
|
|
6
6
|
`+this.symbols.pointer+" ";typeof e=="string"?r+=e.trim():r+="Invalid input",this.state.error=`
|
|
7
|
-
`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(
|
|
8
|
-
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=
|
|
9
|
-
`:" ",n=[];for(let i=0;i<4;i++){let s=r(i);e[i]?n.push(s.repeat(e[i])):n.push("")}return n}var Wr=Nu,sl={};const Ym=Be,al={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return al.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};var Xm=(t,e={})=>{let r=Ym.merge({},al,e.roles);return r[t]||r.default};const Qm=st.exports,Jm=Wr,Zm=Xm,Ln=Be,{reorder:Es,scrollUp:eg,scrollDown:tg,isObject:ol,swap:rg}=Ln;class ng extends Jm{constructor(e){super(e);this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:n,suggest:i}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(s=>s.enabled=!1),typeof i!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");ol(r)&&(r=Object.keys(r)),Array.isArray(r)?(n!=null&&(this.index=this.findIndex(n)),r.forEach(s=>this.enable(this.find(s))),await this.render()):(n!=null&&(r=n),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let n=[],i=0,s=async(a,o)=>{typeof a=="function"&&(a=await a.call(this)),a instanceof Promise&&(a=await a);for(let u=0;u<a.length;u++){let l=a[u]=await this.toChoice(a[u],i++,o);n.push(l),l.choices&&await s(l.choices,l)}return n};return s(e,r).then(a=>(this.state.loadingChoices=!1,a))}async toChoice(e,r,n){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let i=e.value;if(e=Zm(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,Ln.define(e,"parent",n),e.level=n?n.level+1:1,e.indent==null&&(e.indent=n?n.indent+" ":e.indent||""),e.path=n?n.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,Qm.unstyle(e.message).length));let a={...e};return e.reset=(o=a.input,u=a.value)=>{for(let l of Object.keys(a))e[l]=a[l];e.input=o,e.value=u},i==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,n){let i=await this.toChoice(e,r,n);return this.choices.push(i),this.index=this.choices.length-1,this.limit=this.choices.length,i}async newItem(e,r,n){let i={name:"New choice name?",editable:!0,newChoice:!0,...e},s=await this.addChoice(i,r,n);return s.updateChoice=()=>{delete s.newChoice,s.name=s.message=s.input,s.input="",s.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!="boolean"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!e.enabled),e.enabled=r,e.choices&&e.choices.forEach(i=>this.toggle(i,r));let n=e.parent;for(;n;){let i=n.choices.filter(s=>this.isDisabled(s));n.enabled=i.every(s=>s.enabled===!0),n=n.parent}return ul(this,this.choices),this.emit("toggle",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let r=n=>{let i=Number(n);if(i>this.choices.length-1)return this.alert();let s=this.focused,a=this.choices.find(o=>i===o.index);if(!a.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(a)===-1){let o=Es(this.choices),u=o.indexOf(a);if(s.index>u){let l=o.slice(u,u+this.limit),h=o.filter(f=>!l.includes(f));this.choices=l.concat(h)}else{let l=u-this.limit+1;this.choices=o.slice(l).concat(o.slice(0,l))}}return this.index=this.choices.indexOf(a),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(n=>{let i=this.choices.length,s=this.num,a=(o=!1,u)=>{clearTimeout(this.numberTimeout),o&&(u=r(s)),this.num="",n(u)};if(s==="0"||s.length===1&&Number(s+"0")>i)return a(!0);if(Number(s)>i)return a(!1,this.alert());this.numberTimeout=setTimeout(()=>a(!0),this.delay)})}home(){return this.choices=Es(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=Es(this.choices);return this.choices=r.slice(e).concat(r.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,r=this.visible.length,n=this.index;return this.options.scroll===!1&&n===0?this.alert():e>r&&n===0?this.scrollUp():(this.index=(n-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,n=this.index;return this.options.scroll===!1&&n===r-1?this.alert():e>r&&n===r-1?this.scrollDown():(this.index=(n+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=eg(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=tg(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){rg(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&["disabled","collapsed","hidden","completing","readonly"].some(n=>e[n]===!0)?!0:e&&e.role==="heading"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(r=>this.isEnabled(r));if(e.choices){let r=e.choices.filter(n=>!this.isDisabled(n));return e.enabled&&r.every(n=>this.isEnabled(n))}return e.enabled&&!this.isDisabled(e)}isChoice(e,r){return e.name===r||e.index===Number(r)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(e,r)):this.isChoice(e,this.initial)}map(e=[],r="value"){return[].concat(e||[]).reduce((n,i)=>(n[i]=this.find(i,r),n),{})}filter(e,r){let i=typeof e=="function"?e:(o,u)=>[o.name,u].includes(e),a=(this.options.multiple?this.state._choices:this.choices).filter(i);return r?a.map(o=>o[r]):a}find(e,r){if(ol(e))return r?e[r]:e;let i=typeof e=="function"?e:(a,o)=>[a.name,o].includes(e),s=this.choices.find(i);if(s)return r?s[r]:s}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(a=>a.newChoice))return this.alert();let{reorder:r,sort:n}=this.options,i=this.multiple===!0,s=this.selected;return s===void 0?this.alert():(Array.isArray(s)&&r!==!1&&n!==!0&&(s=Ln.reorder(s)),this.value=i?s.map(a=>a.name):s.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let r of e)this.state._choices.some(n=>n.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r=="string"||typeof r=="number"){let n=this.find(r);n&&(this.initial=n.index,this.focus(n,!0))}}}get choices(){return ul(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:r,choices:n}=this,i=e.limit||this._limit||r.limit||n.length;return Math.min(i,this.height)}set value(e){super.value=e}get value(){return typeof super.value!="string"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}}function ul(t,e){if(e instanceof Promise)return e;if(typeof e=="function"){if(Ln.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let n=r.choices.filter(i=>!t.isDisabled(i));r.enabled=n.every(i=>i.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}var Bn=ng;const ig=Bn,_s=Be;class sg extends ig{constructor(e){super(e);this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,r){return!this.multiple||this.options.pointer?super.pointer(e,r):""}indicator(e,r){return this.multiple?super.indicator(e,r):""}choiceMessage(e,r){let n=this.resolve(e.message,this.state,e,r);return e.role==="heading"&&!_s.hasColor(n)&&(n=this.styles.strong(n)),this.resolve(n,this.state,e,r)}choiceSeparator(){return":"}async renderChoice(e,r){await this.onChoice(e,r);let n=this.index===r,i=await this.pointer(e,r),s=await this.indicator(e,r)+(e.pad||""),a=await this.resolve(e.hint,this.state,e,r);a&&!_s.hasColor(a)&&(a=this.styles.muted(a));let o=this.indent(e),u=await this.choiceMessage(e,r),l=()=>[this.margin[3],o+i+s,u,this.margin[1],a].filter(Boolean).join(" ");return e.role==="heading"?l():e.disabled?(_s.hasColor(u)||(u=this.styles.disabled(u)),l()):(n&&(u=this.styles.em(u)),l())}async renderChoices(){if(this.state.loading==="choices")return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(s,a)=>await this.renderChoice(s,a)),r=await Promise.all(e);r.length||r.push(this.styles.danger("No matching choices"));let n=this.margin[0]+r.join(`
|
|
7
|
+
`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(Zt.cursor.down(e.rest.length)),this.write(`
|
|
8
|
+
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=Cs.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:n}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>n.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let i=r.onSubmit.bind(this),s=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await i(this.name,this.value,this),s())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,n){let{options:i,state:s,symbols:a,timers:o}=this,u=o&&o[e];s.timer=u;let l=i[e]||s[e]||a[e],h=r&&r[e]!=null?r[e]:await l;if(h==="")return h;let f=await this.resolve(h,s,r,n);return!f&&r&&r[e]?this.resolve(l,s,r,n):f}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,n=this.state;return n.timer=r,Qe.isObject(e)&&(e=e[n.status]||e.pending),Qe.hasColor(e)?e:(this.styles[n.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return Qe.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,n=this.state;n.timer=r;let i=e[n.status]||e.pending||n.separator,s=await this.resolve(i,n);return Qe.isObject(s)&&(s=s[n.status]||s.pending),Qe.hasColor(s)?s:this.styles.muted(s)}async pointer(e,r){let n=await this.element("pointer",e,r);if(typeof n=="string"&&Qe.hasColor(n))return n;if(n){let i=this.styles,s=this.index===r,a=s?i.primary:l=>l,o=await this.resolve(n[s?"on":"off"]||n,this.state),u=Qe.hasColor(o)?o:a(o);return s?u:" ".repeat(o.length)}}async indicator(e,r){let n=await this.element("indicator",e,r);if(typeof n=="string"&&Qe.hasColor(n))return n;if(n){let i=this.styles,s=e.enabled===!0,a=s?i.success:i.dark,o=n[s?"on":"off"]||n;return Qe.hasColor(o)?o:a(o)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return Qe.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return Qe.resolve(this,e,...r)}get base(){return Wu.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Qe.height(this.stdout,25)}get width(){return this.options.columns||Qe.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,n=[r,e].find(this.isValue.bind(this));return this.isValue(n)?n:this.initial}static get prompt(){return e=>new this(e).run()}}function ag(t){let e=i=>t[i]===void 0||typeof t[i]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],n=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let i of Object.keys(t.options)){if(r.includes(i)||/^on[A-Z]/.test(i))continue;let s=t.options[i];typeof s=="function"&&e(i)?n.includes(i)||(t[i]=s.bind(t)):typeof t[i]!="function"&&(t[i]=s)}}function og(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=i=>i%2===0?`
|
|
9
|
+
`:" ",n=[];for(let i=0;i<4;i++){let s=r(i);e[i]?n.push(s.repeat(e[i])):n.push("")}return n}var Jr=Wu,gl={};const ug=Ne,yl={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return yl.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};var lg=(t,e={})=>{let r=ug.merge({},yl,e.roles);return r[t]||r.default};const cg=at.exports,hg=Jr,fg=lg,Hn=Ne,{reorder:As,scrollUp:dg,scrollDown:pg,isObject:vl,swap:mg}=Hn;class gg extends hg{constructor(e){super(e);this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:n,suggest:i}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(s=>s.enabled=!1),typeof i!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");vl(r)&&(r=Object.keys(r)),Array.isArray(r)?(n!=null&&(this.index=this.findIndex(n)),r.forEach(s=>this.enable(this.find(s))),await this.render()):(n!=null&&(r=n),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let n=[],i=0,s=async(a,o)=>{typeof a=="function"&&(a=await a.call(this)),a instanceof Promise&&(a=await a);for(let u=0;u<a.length;u++){let l=a[u]=await this.toChoice(a[u],i++,o);n.push(l),l.choices&&await s(l.choices,l)}return n};return s(e,r).then(a=>(this.state.loadingChoices=!1,a))}async toChoice(e,r,n){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let i=e.value;if(e=fg(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,Hn.define(e,"parent",n),e.level=n?n.level+1:1,e.indent==null&&(e.indent=n?n.indent+" ":e.indent||""),e.path=n?n.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,cg.unstyle(e.message).length));let a={...e};return e.reset=(o=a.input,u=a.value)=>{for(let l of Object.keys(a))e[l]=a[l];e.input=o,e.value=u},i==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,n){let i=await this.toChoice(e,r,n);return this.choices.push(i),this.index=this.choices.length-1,this.limit=this.choices.length,i}async newItem(e,r,n){let i={name:"New choice name?",editable:!0,newChoice:!0,...e},s=await this.addChoice(i,r,n);return s.updateChoice=()=>{delete s.newChoice,s.name=s.message=s.input,s.input="",s.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!="boolean"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!e.enabled),e.enabled=r,e.choices&&e.choices.forEach(i=>this.toggle(i,r));let n=e.parent;for(;n;){let i=n.choices.filter(s=>this.isDisabled(s));n.enabled=i.every(s=>s.enabled===!0),n=n.parent}return bl(this,this.choices),this.emit("toggle",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let r=n=>{let i=Number(n);if(i>this.choices.length-1)return this.alert();let s=this.focused,a=this.choices.find(o=>i===o.index);if(!a.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(a)===-1){let o=As(this.choices),u=o.indexOf(a);if(s.index>u){let l=o.slice(u,u+this.limit),h=o.filter(f=>!l.includes(f));this.choices=l.concat(h)}else{let l=u-this.limit+1;this.choices=o.slice(l).concat(o.slice(0,l))}}return this.index=this.choices.indexOf(a),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(n=>{let i=this.choices.length,s=this.num,a=(o=!1,u)=>{clearTimeout(this.numberTimeout),o&&(u=r(s)),this.num="",n(u)};if(s==="0"||s.length===1&&Number(s+"0")>i)return a(!0);if(Number(s)>i)return a(!1,this.alert());this.numberTimeout=setTimeout(()=>a(!0),this.delay)})}home(){return this.choices=As(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=As(this.choices);return this.choices=r.slice(e).concat(r.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,r=this.visible.length,n=this.index;return this.options.scroll===!1&&n===0?this.alert():e>r&&n===0?this.scrollUp():(this.index=(n-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,n=this.index;return this.options.scroll===!1&&n===r-1?this.alert():e>r&&n===r-1?this.scrollDown():(this.index=(n+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=dg(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=pg(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){mg(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&["disabled","collapsed","hidden","completing","readonly"].some(n=>e[n]===!0)?!0:e&&e.role==="heading"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(r=>this.isEnabled(r));if(e.choices){let r=e.choices.filter(n=>!this.isDisabled(n));return e.enabled&&r.every(n=>this.isEnabled(n))}return e.enabled&&!this.isDisabled(e)}isChoice(e,r){return e.name===r||e.index===Number(r)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(e,r)):this.isChoice(e,this.initial)}map(e=[],r="value"){return[].concat(e||[]).reduce((n,i)=>(n[i]=this.find(i,r),n),{})}filter(e,r){let i=typeof e=="function"?e:(o,u)=>[o.name,u].includes(e),a=(this.options.multiple?this.state._choices:this.choices).filter(i);return r?a.map(o=>o[r]):a}find(e,r){if(vl(e))return r?e[r]:e;let i=typeof e=="function"?e:(a,o)=>[a.name,o].includes(e),s=this.choices.find(i);if(s)return r?s[r]:s}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(a=>a.newChoice))return this.alert();let{reorder:r,sort:n}=this.options,i=this.multiple===!0,s=this.selected;return s===void 0?this.alert():(Array.isArray(s)&&r!==!1&&n!==!0&&(s=Hn.reorder(s)),this.value=i?s.map(a=>a.name):s.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let r of e)this.state._choices.some(n=>n.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r=="string"||typeof r=="number"){let n=this.find(r);n&&(this.initial=n.index,this.focus(n,!0))}}}get choices(){return bl(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:r,choices:n}=this,i=e.limit||this._limit||r.limit||n.length;return Math.min(i,this.height)}set value(e){super.value=e}get value(){return typeof super.value!="string"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}}function bl(t,e){if(e instanceof Promise)return e;if(typeof e=="function"){if(Hn.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let n=r.choices.filter(i=>!t.isDisabled(i));r.enabled=n.every(i=>i.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}var Un=gg;const yg=Un,Rs=Ne;class vg extends yg{constructor(e){super(e);this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,r){return!this.multiple||this.options.pointer?super.pointer(e,r):""}indicator(e,r){return this.multiple?super.indicator(e,r):""}choiceMessage(e,r){let n=this.resolve(e.message,this.state,e,r);return e.role==="heading"&&!Rs.hasColor(n)&&(n=this.styles.strong(n)),this.resolve(n,this.state,e,r)}choiceSeparator(){return":"}async renderChoice(e,r){await this.onChoice(e,r);let n=this.index===r,i=await this.pointer(e,r),s=await this.indicator(e,r)+(e.pad||""),a=await this.resolve(e.hint,this.state,e,r);a&&!Rs.hasColor(a)&&(a=this.styles.muted(a));let o=this.indent(e),u=await this.choiceMessage(e,r),l=()=>[this.margin[3],o+i+s,u,this.margin[1],a].filter(Boolean).join(" ");return e.role==="heading"?l():e.disabled?(Rs.hasColor(u)||(u=this.styles.disabled(u)),l()):(n&&(u=this.styles.em(u)),l())}async renderChoices(){if(this.state.loading==="choices")return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(s,a)=>await this.renderChoice(s,a)),r=await Promise.all(e);r.length||r.push(this.styles.danger("No matching choices"));let n=this.margin[0]+r.join(`
|
|
10
10
|
`),i;return this.options.choicesHeader&&(i=await this.resolve(this.options.choicesHeader,this.state)),[i,n].filter(Boolean).join(`
|
|
11
11
|
`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,n="",i=await this.header(),s=await this.prefix(),a=await this.separator(),o=await this.message();this.options.promptLine!==!1&&(n=[s,o,a,""].join(" "),this.state.prompt=n);let u=await this.format(),l=await this.error()||await this.hint(),h=await this.renderChoices(),f=await this.footer();u&&(n+=u),l&&!n.includes(l)&&(n+=" "+l),e&&!u&&!h.trim()&&this.multiple&&this.emptyError!=null&&(n+=this.styles.danger(this.emptyError)),this.clear(r),this.write([i,n,h,f].filter(Boolean).join(`
|
|
12
|
-
`)),this.write(this.margin[2]),this.restore()}}var
|
|
13
|
-
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}}var
|
|
14
|
-
`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:n}=this.state;this.input=`${n}`.slice(0,r)+e+`${n}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),n=this.input.slice(e),i=r.split(" ");this.state.clipboard.push(i.pop()),this.input=i.join(" "),this.cursor=this.input.length,this.input+=n,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):
|
|
15
|
-
`)),this.restore()}}var
|
|
12
|
+
`)),this.write(this.margin[2]),this.restore()}}var er=vg;const bg=er,Dg=(t,e)=>{let r=t.toLowerCase();return n=>{let s=n.toLowerCase().indexOf(r),a=e(n.slice(s,s+r.length));return s>=0?n.slice(0,s)+a+n.slice(s+r.length):n}};class wg extends bg{constructor(e){super(e);this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:n}=this.state;return this.input=n.slice(0,r)+e+n.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let n=e.toLowerCase();return r.filter(i=>i.message.toLowerCase().includes(n))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=Dg(this.input,e),n=this.choices;this.choices=n.map(i=>({...i,message:r(i.message)})),await super.render(),this.choices=n}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}}var Eg=wg;const Ts=Ne;var Dl=(t,e={})=>{t.cursorHide();let{input:r="",initial:n="",pos:i,showCursor:s=!0,color:a}=e,o=a||t.styles.placeholder,u=Ts.inverse(t.styles.primary),l=y=>u(t.styles.black(y)),h=r,f=" ",c=l(f);if(t.blink&&t.blink.off===!0&&(l=y=>y,c=""),s&&i===0&&n===""&&r==="")return l(f);if(s&&i===0&&(r===n||r===""))return l(n[0])+o(n.slice(1));n=Ts.isPrimitive(n)?`${n}`:"",r=Ts.isPrimitive(r)?`${r}`:"";let m=n&&n.startsWith(r)&&n!==r,p=m?l(n[r.length]):c;if(i!==r.length&&s===!0&&(h=r.slice(0,i)+l(r[i])+r.slice(i+1),p=""),s===!1&&(p=""),m){let y=t.styles.unstyle(h+p);return h+p+o(n.slice(y.length))}return h+p};const _g=at.exports,Sg=er,Cg=Dl;class Ag extends Sg{constructor(e){super({...e,multiple:!0});this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:n,input:i}=r;return r.value=r.input=i.slice(0,n)+e+i.slice(n),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:n}=e;return e.value=e.input=n.slice(0,r-1)+n.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:n}=e;if(n[r]===void 0)return this.alert();let i=`${n}`.slice(0,r)+`${n}`.slice(r+1);return e.value=e.input=i,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:n}=e;return r&&r.startsWith(n)&&n!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"\u29BF":"\u2299"}async choiceSeparator(e,r){let n=await this.resolve(e.separator,this.state,e,r)||":";return n?" "+this.styles.disabled(n):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:n,styles:i}=this,{cursor:s,initial:a="",name:o,hint:u,input:l=""}=e,{muted:h,submitted:f,primary:c,danger:m}=i,p=u,y=this.index===r,b=e.validate||(()=>!0),D=await this.choiceSeparator(e,r),_=e.message;this.align==="right"&&(_=_.padStart(this.longest+1," ")),this.align==="left"&&(_=_.padEnd(this.longest+1," "));let R=this.values[o]=l||a,S=l?"success":"dark";await b.call(e,R,this.state)!==!0&&(S="danger");let d=i[S](await this.indicator(e,r))+(e.pad||""),w=this.indent(e),x=()=>[w,d,_+D,l,p].filter(Boolean).join(" ");if(n.submitted)return _=_g.unstyle(_),l=f(l),p="",x();if(e.format)l=await e.format.call(this,l,e,r);else{let $=this.styles.muted;l=Cg(this,{input:l,initial:a,pos:s,showCursor:y,color:$})}return this.isValue(l)||(l=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[o]=await e.result.call(this,R,e,r)),y&&(_=c(_)),e.error?l+=(l?" ":"")+m(e.error.trim()):e.hint&&(l+=(l?" ":"")+h(e.hint.trim())),x()}async submit(){return this.value=this.values,super.base.submit.call(this)}}var xs=Ag;const Rg=xs,Tg=()=>{throw new Error("expected prompt to have a custom authenticate method")},wl=(t=Tg)=>{class e extends Rg{constructor(n){super(n)}async submit(){this.value=await t.call(this,this.values,this.state),super.base.submit.call(this)}static create(n){return wl(n)}}return e};var El=wl();const xg=El;function $g(t,e){return t.username===this.options.username&&t.password===this.options.password}const _l=(t=$g)=>{const e=[{name:"username",message:"username"},{name:"password",message:"password",format(n){return this.options.showPassword?n:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(n.length))}}];class r extends xg.create(t){constructor(i){super({...i,choices:e})}static create(i){return _l(i)}}return r};var Og=_l();const Fg=Jr,{isPrimitive:Pg,hasColor:kg}=Ne;class Ig extends Fg{constructor(e){super(e);this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:r,state:n}=this;return n.submitted?r.success(e):r.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return Pg(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status==="pending"){let e=await this.element("hint");return kg(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:r}=this.state,n=await this.prefix(),i=await this.separator(),s=await this.message(),a=this.styles.muted(this.default),o=[n,s,a,i].filter(Boolean).join(" ");this.state.prompt=o;let u=await this.header(),l=this.value=this.cast(e),h=await this.format(l),f=await this.error()||await this.hint(),c=await this.footer();f&&!o.includes(f)&&(h+=" "+f),o+=" "+h,this.clear(r),this.write([u,o,c].filter(Boolean).join(`
|
|
13
|
+
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}}var $s=Ig;const Lg=$s;class Bg extends Lg{constructor(e){super(e);this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}}var Ng=Bg;const Mg=er,jg=xs,Er=jg.prototype;class Hg extends Mg{constructor(e){super({...e,multiple:!0});this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let n=this.focused,i=n.parent||{};return!n.editable&&!i.editable&&(e==="a"||e==="i")?super[e]():Er.dispatch.call(this,e,r)}append(e,r){return Er.append.call(this,e,r)}delete(e,r){return Er.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?Er.next.call(this):super.next()}prev(){return this.focused.editable?Er.prev.call(this):super.prev()}async indicator(e,r){let n=e.indicator||"",i=e.editable?n:super.indicator(e,r);return await this.resolve(i,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?Er.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let n=r.parent?this.value[r.parent.name]:this.value;if(r.editable?n=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(n=r.enabled===!0),e=await r.validate(n,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}}var Ug=Hg;const qg=Jr,Gg=Dl,{isPrimitive:zg}=Ne;class Vg extends qg{constructor(e){super(e);this.initial=zg(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let n=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!n||n.name!=="return")?this.append(`
|
|
14
|
+
`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:n}=this.state;this.input=`${n}`.slice(0,r)+e+`${n}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),n=this.input.slice(e),i=r.split(" ");this.state.clipboard.push(i.pop()),this.input=i.join(" "),this.cursor=this.input.length,this.input+=n,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):Gg(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),n=await this.separator(),i=await this.message(),s=[r,i,n].filter(Boolean).join(" ");this.state.prompt=s;let a=await this.header(),o=await this.format(),u=await this.error()||await this.hint(),l=await this.footer();u&&!o.includes(u)&&(o+=" "+u),s+=" "+o,this.clear(e),this.write([a,s,l].filter(Boolean).join(`
|
|
15
|
+
`)),this.restore()}}var _r=Vg;const Wg=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),qn=t=>Wg(t).filter(Boolean);var Yg=(t,e={},r="")=>{let{past:n=[],present:i=""}=e,s,a;switch(t){case"prev":case"undo":return s=n.slice(0,n.length-1),a=n[n.length-1]||"",{past:qn([r,...s]),present:a};case"next":case"redo":return s=n.slice(1),a=n[0]||"",{past:qn([...s,r]),present:a};case"save":return{past:qn([...n,r]),present:""};case"remove":return a=qn(n.filter(o=>o!==r)),i="",a.length&&(i=a.pop()),{past:a,present:i};default:throw new Error(`Invalid action: "${t}"`)}};const Kg=_r,Sl=Yg;class Xg extends Kg{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let n=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:n},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=Sl(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){!this.store||(this.data=Sl("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}}var Cl=Xg;const Qg=_r;class Jg extends Qg{format(){return""}}var Zg=Jg;const ey=_r;class ty extends ey{constructor(e={}){super(e);this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}}var ry=ty;const ny=er;class iy extends ny{constructor(e){super({...e,multiple:!0})}}var sy=iy;const ay=_r;class oy extends ay{constructor(e={}){super({style:"number",...e});this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,n=this.toNumber(this.input);return n>this.max+r?this.alert():(this.input=`${n+r}`,this.render())}down(e){let r=e||this.minor,n=this.toNumber(this.input);return n<this.min-r?this.alert():(this.input=`${n-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format=="function"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=""){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}}var Al=oy,uy=Al;const ly=_r;class cy extends ly{constructor(e){super(e);this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}}var hy=cy;const fy=at.exports,dy=Un,Rl=Ne;class py extends dy{constructor(e={}){super(e);this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||`
|
|
16
16
|
`;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((n,i)=>({name:i+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let n=0;n<this.scale.length;n++)r.scale.push({index:n})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,n){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){if(this.scaleKey===!1||this.state.submitted)return"";let e=this.scale.map(n=>` ${n.name} - ${n.message}`);return["",...e].map(n=>this.styles.muted(n)).join(`
|
|
17
|
-
`)}renderScaleHeading(e){let r=this.scale.map(u=>u.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let n=this.scaleLength-r.join("").length,i=Math.round(n/(r.length-1)),a=r.map(u=>this.styles.strong(u)).join(" ".repeat(i)),o=" ".repeat(this.widths[0]);return this.margin[3]+o+this.margin[1]+a}scaleIndicator(e,r,n){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,n);let i=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):i?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let n=e.scale.map(s=>this.scaleIndicator(e,s,r)),i=this.term==="Hyper"?"":" ";return n.join(i+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let n=this.index===r,i=await this.pointer(e,r),s=await e.hint;s&&!
|
|
17
|
+
`)}renderScaleHeading(e){let r=this.scale.map(u=>u.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let n=this.scaleLength-r.join("").length,i=Math.round(n/(r.length-1)),a=r.map(u=>this.styles.strong(u)).join(" ".repeat(i)),o=" ".repeat(this.widths[0]);return this.margin[3]+o+this.margin[1]+a}scaleIndicator(e,r,n){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,n);let i=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):i?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let n=e.scale.map(s=>this.scaleIndicator(e,s,r)),i=this.term==="Hyper"?"":" ";return n.join(i+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let n=this.index===r,i=await this.pointer(e,r),s=await e.hint;s&&!Rl.hasColor(s)&&(s=this.styles.muted(s));let a=p=>this.margin[3]+p.replace(/\s+$/,"").padEnd(this.widths[0]," "),o=this.newline,u=this.indent(e),l=await this.resolve(e.message,this.state,e,r),h=await this.renderScale(e,r),f=this.margin[1]+this.margin[3];this.scaleLength=fy.unstyle(h).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-f.length);let m=Rl.wordWrap(l,{width:this.widths[0],newline:o}).split(`
|
|
18
18
|
`).map(p=>a(p)+this.margin[1]);return n&&(h=this.styles.info(h),m=m.map(p=>this.styles.info(p))),m[0]+=h,this.linebreak&&m.push(""),[u+i,m.join(`
|
|
19
19
|
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(i,s)=>await this.renderChoice(i,s)),r=await Promise.all(e),n=await this.renderScaleHeading();return this.margin[0]+[n,...r.map(i=>i.join(" "))].join(`
|
|
20
20
|
`)}async render(){let{submitted:e,size:r}=this.state,n=await this.prefix(),i=await this.separator(),s=await this.message(),a="";this.options.promptLine!==!1&&(a=[n,s,i,""].join(" "),this.state.prompt=a);let o=await this.header(),u=await this.format(),l=await this.renderScaleKey(),h=await this.error()||await this.hint(),f=await this.renderChoices(),c=await this.footer(),m=this.emptyError;u&&(a+=u),h&&!a.includes(h)&&(a+=" "+h),e&&!u&&!f.trim()&&this.multiple&&m!=null&&(a+=this.styles.danger(m)),this.clear(r),this.write([o,a,l,f,c].filter(Boolean).join(`
|
|
21
|
-
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}}var
|
|
22
|
-
`){m({type:"newline",value:p}),l++;continue}if(p==="\\"){p+=f(),m({type:"text",value:p});continue}if((p==="$"||p==="#"||p==="{")&&c()==="{"){p+=f();let D={type:"template",open:p,inner:"",close:"",value:p},_;for(;_=f();){if(_==="}"){c()==="}"&&(_+=f()),D.value+=_,D.close=_;break}_===":"?(D.initial="",D.key=D.inner):D.initial!==void 0&&(D.initial+=_),D.value+=_,D.inner+=_}D.template=D.open+(D.initial||D.inner)+D.close,D.key=D.key||D.inner,e.hasOwnProperty(D.key)&&(D.initial=e[D.key]),D=r(D),m(D),u.push(D.key),n.add(D.key);let R=o.find(S=>S.name===D.key);D.field=i.find(S=>S.name===D.key),R||(R=new
|
|
21
|
+
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}}var my=py;const Tl=at.exports,gy=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"";class yy{constructor(e){this.name=e.key,this.field=e.field||{},this.value=gy(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}}const vy=async(t={},e={},r=n=>n)=>{let n=new Set,i=t.fields||[],s=t.template,a=[],o=[],u=[],l=1;typeof s=="function"&&(s=await s());let h=-1,f=()=>s[++h],c=()=>s[h+1],m=p=>{p.line=l,a.push(p)};for(m({type:"bos",value:""});h<s.length-1;){let p=f();if(/^[^\S\n ]$/.test(p)){m({type:"text",value:p});continue}if(p===`
|
|
22
|
+
`){m({type:"newline",value:p}),l++;continue}if(p==="\\"){p+=f(),m({type:"text",value:p});continue}if((p==="$"||p==="#"||p==="{")&&c()==="{"){p+=f();let D={type:"template",open:p,inner:"",close:"",value:p},_;for(;_=f();){if(_==="}"){c()==="}"&&(_+=f()),D.value+=_,D.close=_;break}_===":"?(D.initial="",D.key=D.inner):D.initial!==void 0&&(D.initial+=_),D.value+=_,D.inner+=_}D.template=D.open+(D.initial||D.inner)+D.close,D.key=D.key||D.inner,e.hasOwnProperty(D.key)&&(D.initial=e[D.key]),D=r(D),m(D),u.push(D.key),n.add(D.key);let R=o.find(S=>S.name===D.key);D.field=i.find(S=>S.name===D.key),R||(R=new yy(D),o.push(R)),R.lines.push(D.line-1);continue}let y=a[a.length-1];y.type==="text"&&y.line===l?y.value+=p:m({type:"text",value:p})}return m({type:"eos",value:""}),{input:s,tabstops:a,unique:n,keys:u,items:o}};var by=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),n={...e.values,...e.initial},{tabstops:i,items:s,keys:a}=await vy(e,n),o=Os("result",t),u=Os("format",t),l=Os("validate",t,e,!0),h=t.isValue.bind(t);return async(f={},c=!1)=>{let m=0;f.required=r,f.items=s,f.keys=a,f.output="";let p=async(_,R,S,v)=>{let d=await l(_,R,S,v);return d===!1?"Invalid field "+S.name:d};for(let _ of i){let R=_.value,S=_.key;if(_.type!=="template"){R&&(f.output+=R);continue}if(_.type==="template"){let v=s.find(j=>j.name===S);e.required===!0&&f.required.add(v.name);let d=[v.input,f.values[v.value],v.value,R].find(h),x=(v.field||{}).message||_.inner;if(c){let j=await p(f.values[S],f,v,m);if(j&&typeof j=="string"||j===!1){f.invalid.set(S,j);continue}f.invalid.delete(S);let A=await o(f.values[S],f,v,m);f.output+=Tl.unstyle(A);continue}v.placeholder=!1;let $=R;R=await u(R,f,v,m),d!==R?(f.values[S]=d,R=t.styles.typing(d),f.missing.delete(x)):(f.values[S]=void 0,d=`<${x}>`,R=t.styles.primary(d),v.placeholder=!0,f.required.has(S)&&f.missing.add(x)),f.missing.has(x)&&f.validating&&(R=t.styles.warning(d)),f.invalid.has(S)&&f.validating&&(R=t.styles.danger(d)),m===f.index&&($!==R?R=t.styles.underline(R):R=t.styles.heading(Tl.unstyle(R))),m++}R&&(f.output+=R)}let y=f.output.split(`
|
|
23
23
|
`).map(_=>" "+_),b=s.length,D=0;for(let _ of s)f.invalid.has(_.name)&&_.lines.forEach(R=>{y[R][0]===" "&&(y[R]=f.styles.danger(f.symbols.bullet)+y[R].slice(1))}),t.isValue(f.values[_.name])&&D++;return f.completed=(D/b*100).toFixed(0),f.output=y.join(`
|
|
24
|
-
`),f.output}};function
|
|
24
|
+
`),f.output}};function Os(t,e,r,n){return(i,s,a,o)=>typeof a.field[t]=="function"?a.field[t].call(e,i,s,a,o):[n,i].find(u=>e.isValue(u))}const Dy=at.exports,wy=by,Ey=Jr;class _y extends Ey{constructor(e){super(e);this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await wy(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let n=this.getItem(),i=n.input.slice(0,this.cursor),s=n.input.slice(this.cursor);this.input=n.input=`${i}${e}${s}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),n=e.input.slice(0,this.cursor-1);this.input=e.input=`${n}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:n,size:i}=this.state,s=[this.options.newline,`
|
|
25
25
|
`].find(_=>_!=null),a=await this.prefix(),o=await this.separator(),u=await this.message(),l=[a,u,o].filter(Boolean).join(" ");this.state.prompt=l;let h=await this.header(),f=await this.error()||"",c=await this.hint()||"",m=n?"":await this.interpolate(this.state),p=this.state.key=r[e]||"",y=await this.format(p),b=await this.footer();y&&(l+=" "+y),c&&!y&&this.state.completed===0&&(l+=" "+c),this.clear(i);let D=[h,l,m,b,f.trim()];this.write(D.filter(Boolean).join(s)),this.restore()}getItem(e){let{items:r,keys:n,index:i}=this.state,s=r.find(a=>a.name===n[i]);return s&&s.input!=null&&(this.input=s.input,this.cursor=s.cursor),s}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:n,values:i}=this.state;if(e.size){let o="";for(let[u,l]of e)o+=`Invalid ${u}: ${l}
|
|
26
|
-
`;return this.state.error=o,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let a=
|
|
26
|
+
`;return this.state.error=o,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let a=Dy.unstyle(n).split(`
|
|
27
27
|
`).map(o=>o.slice(1)).join(`
|
|
28
|
-
`);return this.value={values:i,result:a},super.submit()}}var
|
|
29
|
-
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let n of r)n.scale=
|
|
28
|
+
`);return this.value={values:i,result:a},super.submit()}}var Sy=_y;const Cy="(Use <shift>+<up/down> to sort)",Ay=er;class Ry extends Ay{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0});this.state.hint=[this.options.hint,Cy].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let n=await super.renderChoice(e,r),i=this.symbols.identicalTo+" ",s=this.index===r&&this.sorting?this.styles.muted(i):" ";return this.options.drag===!1&&(s=""),this.options.numbered===!0?s+`${r+1} - `+n:s+n}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}}var Ty=Ry;const xy=Un;class $y extends xy{constructor(e={}){super(e);if(this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(n=>this.styles.muted(n)),this.state.header=r.join(`
|
|
29
|
+
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let n of r)n.scale=Oy(5,this.options),n.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],n=r.selected;return e.scale.forEach(i=>i.selected=!1),r.selected=!n,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let n=this.index===r,i=this.term==="Hyper",s=i?9:8,a=i?"":" ",o=this.symbols.line.repeat(s),u=" ".repeat(s+(i?0:1)),l=R=>(R?this.styles.success("\u25C9"):"\u25EF")+a,h=r+1+".",f=n?this.styles.heading:this.styles.noop,c=await this.resolve(e.message,this.state,e,r),m=this.indent(e),p=m+e.scale.map((R,S)=>l(S===e.scaleIdx)).join(o),y=R=>R===e.scaleIdx?f(R):R,b=m+e.scale.map((R,S)=>y(S)).join(u),D=()=>[h,c].filter(Boolean).join(" "),_=()=>[D(),p,b," "].filter(Boolean).join(`
|
|
30
30
|
`);return n&&(p=this.styles.cyan(p),b=this.styles.cyan(b)),_()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(n,i)=>await this.renderChoice(n,i)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
|
|
31
31
|
`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,n=await this.prefix(),i=await this.separator(),s=await this.message(),a=[n,s,i].filter(Boolean).join(" ");this.state.prompt=a;let o=await this.header(),u=await this.format(),l=await this.error()||await this.hint(),h=await this.renderChoices(),f=await this.footer();(u||!l)&&(a+=" "+u),l&&!a.includes(l)&&(a+=" "+l),e&&!u&&!h&&this.multiple&&this.type!=="form"&&(a+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,h,f].filter(Boolean).join(`
|
|
32
|
-
`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}}function
|
|
33
|
-
`)),this.write(this.margin[2]),this.restore()}}var
|
|
34
|
-
`).filter(i=>{const s=i.match(
|
|
35
|
-
`)};const
|
|
32
|
+
`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}}function Oy(t,e={}){if(Array.isArray(e.scale))return e.scale.map(n=>({...n}));let r=[];for(let n=1;n<t+1;n++)r.push({i:n,selected:!1});return r}var Fy=$y,Py=Cl;const ky=$s;class Iy extends ky{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=n=>this.styles.primary.underline(n);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),n=await this.prefix(),i=await this.separator(),s=await this.message(),a=await this.format(),o=await this.error()||await this.hint(),u=await this.footer(),l=[n,s,i,a].join(" ");this.state.prompt=l,o&&!l.includes(o)&&(l+=" "+o),this.clear(e),this.write([r,l,u].filter(Boolean).join(`
|
|
33
|
+
`)),this.write(this.margin[2]),this.restore()}}var Ly=Iy;const By=er;class Ny extends By{constructor(e){super(e);if(typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let n=await super.toChoices(e,r);if(n.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>n.length)throw new Error("Please specify the index of the correct answer from the list of choices");return n}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}}var My=Ny;(function(t){const e=Ne,r=(n,i)=>{e.defineExport(t,n,i),e.defineExport(t,n.toLowerCase(),i)};r("AutoComplete",()=>Eg),r("BasicAuth",()=>Og),r("Confirm",()=>Ng),r("Editable",()=>Ug),r("Form",()=>xs),r("Input",()=>Cl),r("Invisible",()=>Zg),r("List",()=>ry),r("MultiSelect",()=>sy),r("Numeral",()=>uy),r("Password",()=>hy),r("Scale",()=>my),r("Select",()=>er),r("Snippet",()=>Sy),r("Sort",()=>Ty),r("Survey",()=>Fy),r("Text",()=>Py),r("Toggle",()=>Ly),r("Quiz",()=>My)})(gl);var jy={ArrayPrompt:Un,AuthPrompt:El,BooleanPrompt:$s,NumberPrompt:Al,StringPrompt:_r};const xl=nl,Fs=Ut,qt=Ne;class Ft extends Fs{constructor(e,r){super();this.options=qt.merge({},e),this.answers={...r}}register(e,r){if(qt.isObject(e)){for(let i of Object.keys(e))this.register(i,e[i]);return this}xl.equal(typeof r,"function","expected a function");let n=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[n]=r:this.prompts[n]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(qt.merge({},this.options,r))}catch(n){return Promise.reject(n)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=qt.merge({},this.options,e),{type:n,name:i}=e,{set:s,get:a}=qt;if(typeof n=="function"&&(n=await n.call(this,e,this.answers)),!n)return this.answers[i];xl(this.prompts[n],`Prompt "${n}" is not registered`);let o=new this.prompts[n](r),u=a(this.answers,i);o.state.answers=this.answers,o.enquirer=this,i&&o.on("submit",h=>{this.emit("answer",i,h,o),s(this.answers,i,h)});let l=o.emit.bind(o);return o.emit=(...h)=>(this.emit.call(this,...h),l(...h)),this.emit("prompt",o,this),r.autofill&&u!=null?(o.value=o.input=u,r.autofill==="show"&&await o.submit()):u=o.value=await o.run(),u}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||Jr}static get prompts(){return gl}static get types(){return jy}static get prompt(){const e=(r,...n)=>{let i=new this(...n),s=i.emit.bind(i);return i.emit=(...a)=>(e.emit(...a),s(...a)),i.prompt(r)};return qt.mixinEmitter(e,new Fs),e}}qt.mixinEmitter(Ft,new Fs);const Ps=Ft.prompts;for(let t of Object.keys(Ps)){let e=t.toLowerCase(),r=n=>new Ps[t](n).run();Ft.prompt[e]=r,Ft[e]=r,Ft[t]||Reflect.defineProperty(Ft,t,{get:()=>Ps[t]})}const Zr=t=>{qt.defineExport(Ft,t,()=>Ft.types[t])};Zr("ArrayPrompt"),Zr("AuthPrompt"),Zr("BooleanPrompt"),Zr("NumberPrompt"),Zr("StringPrompt");var Hy=Ft,Uy=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;const n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(n,r.indent.repeat(e))},qy=/[|\\{}()[\]^$+*?.]/g,Gy=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(qy,"\\$&")};const $l=Xr,zy=Gy,Ol=/\s+at.*[(\s](.*)\)?/,Vy=/^(?:(?:(?:node|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,Wy=typeof $l.homedir>"u"?"":$l.homedir();var Yy=(t,{pretty:e=!1,basePath:r}={})=>{const n=r&&new RegExp(`(at | \\()${zy(r)}`,"g");return t.replace(/\\/g,"/").split(`
|
|
34
|
+
`).filter(i=>{const s=i.match(Ol);if(s===null||!s[1])return!0;const a=s[1];return a.includes(".app/Contents/Resources/electron.asar")||a.includes(".app/Contents/Resources/default_app.asar")?!1:!Vy.test(a)}).filter(i=>i.trim()!=="").map(i=>(n&&(i=i.replace(n,"$1")),e&&(i=i.replace(Ol,(s,a)=>s.replace(a,a.replace(Wy,"~")))),i)).join(`
|
|
35
|
+
`)};const Ky=Uy,Xy=Yy,Qy=t=>t.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"");class Jy extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);e=[...e].map(n=>n instanceof Error?n:n!==null&&typeof n=="object"?Object.assign(new Error(n.message),n):new Error(n));let r=e.map(n=>typeof n.stack=="string"?Qy(Xy(n.stack)):String(n)).join(`
|
|
36
36
|
`);r=`
|
|
37
|
-
`+
|
|
37
|
+
`+Ky(r,4);super(r);this.name="AggregateError",Object.defineProperty(this,"_errors",{value:e})}*[Symbol.iterator](){for(const e of this._errors)yield e}}var Zy=Jy;const ev=Zy;var tv=async(t,e,{concurrency:r=1/0,stopOnError:n=!0}={})=>new Promise((i,s)=>{if(typeof e!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===1/0)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const a=[],o=[],u=t[Symbol.iterator]();let l=!1,h=!1,f=0,c=0;const m=()=>{if(l)return;const p=u.next(),y=c;if(c++,p.done){h=!0,f===0&&(!n&&o.length!==0?s(new ev(o)):i(a));return}f++,(async()=>{try{const b=await p.value;a[y]=await e(b,y),f--,m()}catch(b){n?(l=!0,s(b)):(o.push(b),f--,m())}})()};for(let p=0;p<r&&(m(),!h);p++);});/*! *****************************************************************************
|
|
38
38
|
Copyright (c) Microsoft Corporation.
|
|
39
39
|
|
|
40
40
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -47,25 +47,25 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
47
47
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
48
48
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
49
49
|
PERFORMANCE OF THIS SOFTWARE.
|
|
50
|
-
***************************************************************************** */var
|
|
50
|
+
***************************************************************************** */var ks=function(t,e){return ks=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ks(t,e)};function Gn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ks(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var zn=function(){return zn=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},zn.apply(this,arguments)};function Is(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Vn(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s}function Wn(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}function Pt(t){return typeof t=="function"}function Fl(t){var e=function(n){Error.call(n),n.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Ls=Fl(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
51
51
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
52
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function Ps(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var qn=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._teardowns=null}return t.prototype.unsubscribe=function(){var e,r,n,i,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Os(a),u=o.next();!u.done;u=o.next()){var l=u.value;l.remove(this)}}catch(y){e={error:y}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}else a.remove(this);var h=this.initialTeardown;if(Ot(h))try{h()}catch(y){s=y instanceof Fs?y.errors:[y]}var f=this._teardowns;if(f){this._teardowns=null;try{for(var c=Os(f),m=c.next();!m.done;m=c.next()){var p=m.value;try{Sl(p)}catch(y){s=s??[],y instanceof Fs?s=Un(Un([],Hn(s)),Hn(y.errors)):s.push(y)}}}catch(y){n={error:y}}finally{try{m&&!m.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}}if(s)throw new Fs(s)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Sl(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=(r=this._teardowns)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&Ps(r,e)},t.prototype.remove=function(e){var r=this._teardowns;r&&Ps(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),El=qn.EMPTY;function _l(t){return t instanceof qn||t&&"closed"in t&&Ot(t.remove)&&Ot(t.add)&&Ot(t.unsubscribe)}function Sl(t){Ot(t)?t():t.unsubscribe()}var ks={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Is={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Is.delegate;return((r==null?void 0:r.setTimeout)||setTimeout).apply(void 0,Un([],Hn(t)))},clearTimeout:function(t){var e=Is.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function qy(t){Is.setTimeout(function(){throw t})}function Gn(){}var zn=null;function Vn(t){if(ks.useDeprecatedSynchronousErrorHandling){var e=!zn;if(e&&(zn={errorThrown:!1,error:null}),t(),e){var r=zn,n=r.errorThrown,i=r.error;if(zn=null,n)throw i}}else t()}var Cl=function(t){Mn(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,_l(r)&&r.add(n)):n.destination=Gy,n}return e.create=function(r,n,i){return new Ls(r,n,i)},e.prototype.next=function(r){this.isStopped||this._next(r)},e.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(qn),Ls=function(t){Mn(e,t);function e(r,n,i){var s=t.call(this)||this,a;if(Ot(r))a=r;else if(r){a=r.next,n=r.error,i=r.complete;var o;s&&ks.useDeprecatedNextContext?(o=Object.create(r),o.unsubscribe=function(){return s.unsubscribe()}):o=r,a=a==null?void 0:a.bind(o),n=n==null?void 0:n.bind(o),i=i==null?void 0:i.bind(o)}return s.destination={next:a?Bs(a):Gn,error:Bs(n??Al),complete:i?Bs(i):Gn},s}return e}(Cl);function Bs(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{t.apply(void 0,Un([],Hn(r)))}catch(i){qy(i)}}}function Al(t){throw t}var Gy={closed:!0,next:Gn,error:Al,complete:Gn},zy=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Vy(t){return t}function Wy(t){return t.length===0?Vy:t.length===1?t[0]:function(r){return t.reduce(function(n,i){return i(n)},r)}}var Ns=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var i=this,s=Yy(e)?e:new Ls(e,r,n);return Vn(function(){var a=i,o=a.operator,u=a.source;s.add(o?o.call(s,u):u?i._subscribe(s):i._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=Rl(r),new r(function(i,s){var a=new Ls({next:function(o){try{e(o)}catch(u){s(u),a.unsubscribe()}},error:s,complete:i});n.subscribe(a)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[zy]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return Wy(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=Rl(e),new e(function(n,i){var s;r.subscribe(function(a){return s=a},function(a){return i(a)},function(){return n(s)})})},t.create=function(e){return new t(e)},t}();function Rl(t){var e;return(e=t??ks.Promise)!==null&&e!==void 0?e:Promise}function Ky(t){return t&&Ot(t.next)&&Ot(t.error)&&Ot(t.complete)}function Yy(t){return t&&t instanceof Cl||Ky(t)&&_l(t)}var Xy=wl(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ms=function(t){Mn(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return e.prototype.lift=function(r){var n=new xl(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new Xy},e.prototype.next=function(r){var n=this;Vn(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){var a=n.observers.slice();try{for(var o=Os(a),u=o.next();!u.done;u=o.next()){var l=u.value;l.next(r)}}catch(h){i={error:h}}finally{try{u&&!u.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}}})},e.prototype.error=function(r){var n=this;Vn(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},e.prototype.complete=function(){var r=this;Vn(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,i=n.hasError,s=n.isStopped,a=n.observers;return i||s?El:(a.push(r),new qn(function(){return Ps(a,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,s=n.thrownError,a=n.isStopped;i?r.error(s):a&&r.complete()},e.prototype.asObservable=function(){var r=new Ns;return r.source=this,r},e.create=function(r,n){return new xl(r,n)},e}(Ns),xl=function(t){Mn(e,t);function e(r,n){var i=t.call(this)||this;return i.destination=r,i.source=n,i}return e.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},e.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:El},e}(Ms),Qy=Jy;function wr(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Jy(t){if(t=t||{},t.circles)return Zy(t);return t.proto?n:r;function e(i,s){for(var a=Object.keys(i),o=new Array(a.length),u=0;u<a.length;u++){var l=a[u],h=i[l];typeof h!="object"||h===null?o[l]=h:h instanceof Date?o[l]=new Date(h):ArrayBuffer.isView(h)?o[l]=wr(h):o[l]=s(h)}return o}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return e(i,r);if(i instanceof Map)return new Map(e(Array.from(i),r));if(i instanceof Set)return new Set(e(Array.from(i),r));var s={};for(var a in i)if(Object.hasOwnProperty.call(i,a)!==!1){var o=i[a];typeof o!="object"||o===null?s[a]=o:o instanceof Date?s[a]=new Date(o):o instanceof Map?s[a]=new Map(e(Array.from(o),r)):o instanceof Set?s[a]=new Set(e(Array.from(o),r)):ArrayBuffer.isView(o)?s[a]=wr(o):s[a]=r(o)}return s}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return e(i,n);if(i instanceof Map)return new Map(e(Array.from(i),n));if(i instanceof Set)return new Set(e(Array.from(i),n));var s={};for(var a in i){var o=i[a];typeof o!="object"||o===null?s[a]=o:o instanceof Date?s[a]=new Date(o):o instanceof Map?s[a]=new Map(e(Array.from(o),n)):o instanceof Set?s[a]=new Set(e(Array.from(o),n)):ArrayBuffer.isView(o)?s[a]=wr(o):s[a]=n(o)}return s}}function Zy(t){var e=[],r=[];return t.proto?s:i;function n(a,o){for(var u=Object.keys(a),l=new Array(u.length),h=0;h<u.length;h++){var f=u[h],c=a[f];if(typeof c!="object"||c===null)l[f]=c;else if(c instanceof Date)l[f]=new Date(c);else if(ArrayBuffer.isView(c))l[f]=wr(c);else{var m=e.indexOf(c);m!==-1?l[f]=r[m]:l[f]=o(c)}}return l}function i(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return n(a,i);if(a instanceof Map)return new Map(n(Array.from(a),i));if(a instanceof Set)return new Set(n(Array.from(a),i));var o={};e.push(a),r.push(o);for(var u in a)if(Object.hasOwnProperty.call(a,u)!==!1){var l=a[u];if(typeof l!="object"||l===null)o[u]=l;else if(l instanceof Date)o[u]=new Date(l);else if(l instanceof Map)o[u]=new Map(n(Array.from(l),i));else if(l instanceof Set)o[u]=new Set(n(Array.from(l),i));else if(ArrayBuffer.isView(l))o[u]=wr(l);else{var h=e.indexOf(l);h!==-1?o[u]=r[h]:o[u]=i(l)}}return e.pop(),r.pop(),o}function s(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return n(a,s);if(a instanceof Map)return new Map(n(Array.from(a),s));if(a instanceof Set)return new Set(n(Array.from(a),s));var o={};e.push(a),r.push(o);for(var u in a){var l=a[u];if(typeof l!="object"||l===null)o[u]=l;else if(l instanceof Date)o[u]=new Date(l);else if(l instanceof Map)o[u]=new Map(n(Array.from(l),s));else if(l instanceof Set)o[u]=new Set(n(Array.from(l),s));else if(ArrayBuffer.isView(l))o[u]=wr(l);else{var h=e.indexOf(l);h!==-1?o[u]=r[h]:o[u]=s(l)}}return e.pop(),r.pop(),o}}var Wn={exports:{}};const Tl=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);Wn.exports=Tl,Wn.exports.default=Tl;const $l="[\uD800-\uDBFF][\uDC00-\uDFFF]",ev=t=>t&&t.exact?new RegExp(`^${$l}$`):new RegExp($l,"g");var tv=ev,js={exports:{}},rv={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const Yr=rv,Ol={};for(const t of Object.keys(Yr))Ol[Yr[t]]=t;const L={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Fl=L;for(const t of Object.keys(L)){if(!("channels"in L[t]))throw new Error("missing channels property: "+t);if(!("labels"in L[t]))throw new Error("missing channel labels property: "+t);if(L[t].labels.length!==L[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:r}=L[t];delete L[t].channels,delete L[t].labels,Object.defineProperty(L[t],"channels",{value:e}),Object.defineProperty(L[t],"labels",{value:r})}L.rgb.hsl=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),a=s-i;let o,u;s===i?o=0:e===s?o=(r-n)/a:r===s?o=2+(n-e)/a:n===s&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360);const l=(i+s)/2;return s===i?u=0:l<=.5?u=a/(s+i):u=a/(2-s-i),[o,u*100,l*100]},L.rgb.hsv=function(t){let e,r,n,i,s;const a=t[0]/255,o=t[1]/255,u=t[2]/255,l=Math.max(a,o,u),h=l-Math.min(a,o,u),f=function(c){return(l-c)/6/h+1/2};return h===0?(i=0,s=0):(s=h/l,e=f(a),r=f(o),n=f(u),a===l?i=n-r:o===l?i=1/3+e-n:u===l&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,l*100]},L.rgb.hwb=function(t){const e=t[0],r=t[1];let n=t[2];const i=L.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]},L.rgb.cmyk=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),s=(1-e-i)/(1-i)||0,a=(1-r-i)/(1-i)||0,o=(1-n-i)/(1-i)||0;return[s*100,a*100,o*100,i*100]};function nv(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}L.rgb.keyword=function(t){const e=Ol[t];if(e)return e;let r=1/0,n;for(const i of Object.keys(Yr)){const s=Yr[i],a=nv(t,s);a<r&&(r=a,n=i)}return n},L.keyword.rgb=function(t){return Yr[t]},L.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;const i=e*.4124+r*.3576+n*.1805,s=e*.2126+r*.7152+n*.0722,a=e*.0193+r*.1192+n*.9505;return[i*100,s*100,a*100]},L.rgb.lab=function(t){const e=L.rgb.xyz(t);let r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const s=116*n-16,a=500*(r-n),o=200*(n-i);return[s,a,o]},L.hsl.rgb=function(t){const e=t[0]/360,r=t[1]/100,n=t[2]/100;let i,s,a;if(r===0)return a=n*255,[a,a,a];n<.5?i=n*(1+r):i=n+r-n*r;const o=2*n-i,u=[0,0,0];for(let l=0;l<3;l++)s=e+1/3*-(l-1),s<0&&s++,s>1&&s--,6*s<1?a=o+(i-o)*6*s:2*s<1?a=i:3*s<2?a=o+(i-o)*(2/3-s)*6:a=o,u[l]=a*255;return u},L.hsl.hsv=function(t){const e=t[0];let r=t[1]/100,n=t[2]/100,i=r;const s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s;const a=(n+r)/2,o=n===0?2*i/(s+i):2*r/(n+r);return[e,o*100,a*100]},L.hsv.rgb=function(t){const e=t[0]/60,r=t[1]/100;let n=t[2]/100;const i=Math.floor(e)%6,s=e-Math.floor(e),a=255*n*(1-r),o=255*n*(1-r*s),u=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,u,a];case 1:return[o,n,a];case 2:return[a,n,u];case 3:return[a,o,n];case 4:return[u,a,n];case 5:return[n,a,o]}},L.hsv.hsl=function(t){const e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01);let s,a;a=(2-r)*n;const o=(2-r)*i;return s=r*i,s/=o<=1?o:2-o,s=s||0,a/=2,[e,s*100,a*100]},L.hwb.rgb=function(t){const e=t[0]/360;let r=t[1]/100,n=t[2]/100;const i=r+n;let s;i>1&&(r/=i,n/=i);const a=Math.floor(6*e),o=1-n;s=6*e-a,(a&1)!==0&&(s=1-s);const u=r+s*(o-r);let l,h,f;switch(a){default:case 6:case 0:l=o,h=u,f=r;break;case 1:l=u,h=o,f=r;break;case 2:l=r,h=o,f=u;break;case 3:l=r,h=u,f=o;break;case 4:l=u,h=r,f=o;break;case 5:l=o,h=r,f=u;break}return[l*255,h*255,f*255]},L.cmyk.rgb=function(t){const e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),a=1-Math.min(1,r*(1-i)+i),o=1-Math.min(1,n*(1-i)+i);return[s*255,a*255,o*255]},L.xyz.rgb=function(t){const e=t[0]/100,r=t[1]/100,n=t[2]/100;let i,s,a;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,a=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[i*255,s*255,a*255]},L.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;const i=116*r-16,s=500*(e-r),a=200*(r-n);return[i,s,a]},L.lab.xyz=function(t){const e=t[0],r=t[1],n=t[2];let i,s,a;s=(e+16)/116,i=r/500+s,a=s-n/200;const o=s**3,u=i**3,l=a**3;return s=o>.008856?o:(s-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,i*=95.047,s*=100,a*=108.883,[i,s,a]},L.lab.lch=function(t){const e=t[0],r=t[1],n=t[2];let i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);const a=Math.sqrt(r*r+n*n);return[e,a,i]},L.lch.lab=function(t){const e=t[0],r=t[1],i=t[2]/360*2*Math.PI,s=r*Math.cos(i),a=r*Math.sin(i);return[e,s,a]},L.rgb.ansi16=function(t,e=null){const[r,n,i]=t;let s=e===null?L.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let a=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(a+=60),a},L.hsv.ansi16=function(t){return L.rgb.ansi16(L.hsv.rgb(t),t[2])},L.rgb.ansi256=function(t){const e=t[0],r=t[1],n=t[2];return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},L.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[n,i,s]},L.ansi256.rgb=function(t){if(t>=232){const s=(t-232)*10+8;return[s,s,s]}t-=16;let e;const r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]},L.rgb.hex=function(t){const r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r},L.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(o=>o+o).join(""));const n=parseInt(r,16),i=n>>16&255,s=n>>8&255,a=n&255;return[i,s,a]},L.rgb.hcg=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),s=Math.min(Math.min(e,r),n),a=i-s;let o,u;return a<1?o=s/(1-a):o=0,a<=0?u=0:i===e?u=(r-n)/a%6:i===r?u=2+(n-e)/a:u=4+(e-r)/a,u/=6,u%=1,[u*360,a*100,o*100]},L.hsl.hcg=function(t){const e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]},L.hsv.hcg=function(t){const e=t[1]/100,r=t[2]/100,n=e*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]},L.hcg.rgb=function(t){const e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];const i=[0,0,0],s=e%1*6,a=s%1,o=1-a;let u=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=o,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=o,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=o}return u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]},L.hcg.hsv=function(t){const e=t[1]/100,r=t[2]/100,n=e+r*(1-e);let i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]},L.hcg.hsl=function(t){const e=t[1]/100,n=t[2]/100*(1-e)+.5*e;let i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]},L.hcg.hwb=function(t){const e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]},L.hwb.hcg=function(t){const e=t[1]/100,r=t[2]/100,n=1-r,i=n-e;let s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*100]},L.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},L.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},L.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},L.gray.hsl=function(t){return[0,0,t[0]]},L.gray.hsv=L.gray.hsl,L.gray.hwb=function(t){return[0,100,t[0]]},L.gray.cmyk=function(t){return[0,0,0,t[0]]},L.gray.lab=function(t){return[t[0],0,0]},L.gray.hex=function(t){const e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},L.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const Kn=Fl;function iv(){const t={},e=Object.keys(Kn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function sv(t){const e=iv(),r=[t];for(e[t].distance=0;r.length;){const n=r.pop(),i=Object.keys(Kn[n]);for(let s=i.length,a=0;a<s;a++){const o=i[a],u=e[o];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(o))}}return e}function av(t,e){return function(r){return e(t(r))}}function ov(t,e){const r=[e[t].parent,t];let n=Kn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=av(Kn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}var uv=function(t){const e=sv(t),r={},n=Object.keys(e);for(let i=n.length,s=0;s<i;s++){const a=n[s];e[a].parent!==null&&(r[a]=ov(a,e))}return r};const Hs=Fl,lv=uv,Er={},cv=Object.keys(Hs);function hv(t){const e=function(...r){const n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function fv(t){const e=function(...r){const n=r[0];if(n==null)return n;n.length>1&&(r=n);const i=t(r);if(typeof i=="object")for(let s=i.length,a=0;a<s;a++)i[a]=Math.round(i[a]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}cv.forEach(t=>{Er[t]={},Object.defineProperty(Er[t],"channels",{value:Hs[t].channels}),Object.defineProperty(Er[t],"labels",{value:Hs[t].labels});const e=lv(t);Object.keys(e).forEach(n=>{const i=e[n];Er[t][n]=fv(i),Er[t][n].raw=hv(i)})});var dv=Er;(function(t){const e=(h,f)=>(...c)=>`\x1B[${h(...c)+f}m`,r=(h,f)=>(...c)=>{const m=h(...c);return`\x1B[${38+f};5;${m}m`},n=(h,f)=>(...c)=>{const m=h(...c);return`\x1B[${38+f};2;${m[0]};${m[1]};${m[2]}m`},i=h=>h,s=(h,f,c)=>[h,f,c],a=(h,f,c)=>{Object.defineProperty(h,f,{get:()=>{const m=c();return Object.defineProperty(h,f,{value:m,enumerable:!0,configurable:!0}),m},enumerable:!0,configurable:!0})};let o;const u=(h,f,c,m)=>{o===void 0&&(o=dv);const p=m?10:0,y={};for(const[b,D]of Object.entries(o)){const _=b==="ansi16"?"ansi":b;b===f?y[_]=h(c,p):typeof D=="object"&&(y[_]=h(D[f],p))}return y};function l(){const h=new Map,f={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};f.color.gray=f.color.blackBright,f.bgColor.bgGray=f.bgColor.bgBlackBright,f.color.grey=f.color.blackBright,f.bgColor.bgGrey=f.bgColor.bgBlackBright;for(const[c,m]of Object.entries(f)){for(const[p,y]of Object.entries(m))f[p]={open:`\x1B[${y[0]}m`,close:`\x1B[${y[1]}m`},m[p]=f[p],h.set(y[0],y[1]);Object.defineProperty(f,c,{value:m,enumerable:!1})}return Object.defineProperty(f,"codes",{value:h,enumerable:!1}),f.color.close="\x1B[39m",f.bgColor.close="\x1B[49m",a(f.color,"ansi",()=>u(e,"ansi16",i,!1)),a(f.color,"ansi256",()=>u(r,"ansi256",i,!1)),a(f.color,"ansi16m",()=>u(n,"rgb",s,!1)),a(f.bgColor,"ansi",()=>u(e,"ansi16",i,!0)),a(f.bgColor,"ansi256",()=>u(r,"ansi256",i,!0)),a(f.bgColor,"ansi16m",()=>u(n,"rgb",s,!0)),f}Object.defineProperty(t,"exports",{enumerable:!0,get:l})})(js);const pv=Wn.exports,mv=tv,Pl=js.exports,kl=["\x1B","\x9B"],Yn=t=>`${kl[0]}[${t}m`,Il=(t,e,r)=>{let n=[];t=[...t];for(let i of t){const s=i;i.match(";")&&(i=i.split(";")[0][0]+"0");const a=Pl.codes.get(parseInt(i,10));if(a){const o=t.indexOf(a.toString());o>=0?t.splice(o,1):n.push(Yn(e?a:s))}else if(e){n.push(Yn(0));break}else n.push(Yn(s))}if(e&&(n=n.filter((i,s)=>n.indexOf(i)===s),r!==void 0)){const i=Yn(Pl.codes.get(parseInt(r,10)));n=n.reduce((s,a)=>a===i?[a,...s]:[...s,a],[])}return n.join("")};var Ll=(t,e,r)=>{const n=[...t.normalize()],i=[];r=typeof r=="number"?r:n.length;let s=!1,a,o=0,u="";for(const[l,h]of n.entries()){let f=!1;if(kl.includes(h)){const c=/\d[^m]*/.exec(t.slice(l,l+18));a=c&&c.length>0?c[0]:void 0,o<r&&(s=!0,a!==void 0&&i.push(a))}else s&&h==="m"&&(s=!1,f=!0);if(!s&&!f&&++o,!mv({exact:!0}).test(h)&&pv(h.codePointAt())&&++o,o>e&&o<=r)u+=h;else if(o===e&&!s&&a!==void 0)u=Il(i);else if(o>=r){u+=Il(i,!0,a);break}}return u},Xn={exports:{}},gv=({onlyFirst:t=!1}={})=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")};const yv=gv;var Bl=t=>typeof t=="string"?t.replace(yv(),""):t,vv=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};const bv=Bl,Dv=Wn.exports,wv=vv,Nl=t=>{if(typeof t!="string"||t.length===0||(t=bv(t),t.length===0))return 0;t=t.replace(wv()," ");let e=0;for(let r=0;r<t.length;r++){const n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=Dv(n)?2:1)}return e};Xn.exports=Nl,Xn.exports.default=Nl;const Ut=Ll,Ev=Xn.exports;function Qn(t,e,r){if(t.charAt(e)===" ")return e;for(let n=1;n<=3;n++)if(r){if(t.charAt(e+n)===" ")return e+n}else if(t.charAt(e-n)===" ")return e-n;return e}var _v=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};const{position:n,space:i,preferTruncationOnSpace:s}=r;let a="\u2026",o=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return a;const u=Ev(t);if(u<=e)return t;if(n==="start"){if(s){const l=Qn(t,u-e+1,!0);return a+Ut(t,l,u).trim()}return i===!0&&(a+=" ",o=2),a+Ut(t,u-e+o,u)}if(n==="middle"){i===!0&&(a=" "+a+" ",o=3);const l=Math.floor(e/2);if(s){const h=Qn(t,l),f=Qn(t,u-(e-l)+1,!0);return Ut(t,0,h)+a+Ut(t,f,u).trim()}return Ut(t,0,l)+a+Ut(t,u-(e-l)+o,u)}if(n==="end"){if(s){const l=Qn(t,e-1);return Ut(t,0,l)+a}return i===!0&&(a=" "+a,o=2),Ut(t,0,e-o)+a}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${n}`)},Jn={exports:{}},Ml={exports:{}};(function(t){const e=t.exports;t.exports.default=e;const r="\x1B[",n="\x1B]",i="\x07",s=";",a=process.env.TERM_PROGRAM==="Apple_Terminal";e.cursorTo=(o,u)=>{if(typeof o!="number")throw new TypeError("The `x` argument is required");return typeof u!="number"?r+(o+1)+"G":r+(u+1)+";"+(o+1)+"H"},e.cursorMove=(o,u)=>{if(typeof o!="number")throw new TypeError("The `x` argument is required");let l="";return o<0?l+=r+-o+"D":o>0&&(l+=r+o+"C"),u<0?l+=r+-u+"A":u>0&&(l+=r+u+"B"),l},e.cursorUp=(o=1)=>r+o+"A",e.cursorDown=(o=1)=>r+o+"B",e.cursorForward=(o=1)=>r+o+"C",e.cursorBackward=(o=1)=>r+o+"D",e.cursorLeft=r+"G",e.cursorSavePosition=a?"\x1B7":r+"s",e.cursorRestorePosition=a?"\x1B8":r+"u",e.cursorGetPosition=r+"6n",e.cursorNextLine=r+"E",e.cursorPrevLine=r+"F",e.cursorHide=r+"?25l",e.cursorShow=r+"?25h",e.eraseLines=o=>{let u="";for(let l=0;l<o;l++)u+=e.eraseLine+(l<o-1?e.cursorUp():"");return o&&(u+=e.cursorLeft),u},e.eraseEndLine=r+"K",e.eraseStartLine=r+"1K",e.eraseLine=r+"2K",e.eraseDown=r+"J",e.eraseUp=r+"1J",e.eraseScreen=r+"2J",e.scrollUp=r+"S",e.scrollDown=r+"T",e.clearScreen="\x1Bc",e.clearTerminal=process.platform==="win32"?`${e.eraseScreen}${r}0f`:`${e.eraseScreen}${r}3J${r}H`,e.beep=i,e.link=(o,u)=>[n,"8",s,s,u,i,o,n,"8",s,s,i].join(""),e.image=(o,u={})=>{let l=`${n}1337;File=inline=1`;return u.width&&(l+=`;width=${u.width}`),u.height&&(l+=`;height=${u.height}`),u.preserveAspectRatio===!1&&(l+=";preserveAspectRatio=0"),l+":"+o.toString("base64")+i},e.iTerm={setCwd:(o=process.cwd())=>`${n}50;CurrentDir=${o}${i}`,annotation:(o,u={})=>{let l=`${n}1337;`;const h=typeof u.x<"u",f=typeof u.y<"u";if((h||f)&&!(h&&f&&typeof u.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return o=o.replace(/\|/g,""),l+=u.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",u.length>0?l+=(h?[o,u.length,u.x,u.y]:[u.length,o]).join("|"):l+=o,l+i}}})(Ml);var jl={},Xr={exports:{}},Us={exports:{}};const Hl=(t,e)=>{for(const r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};Us.exports=Hl,Us.exports.default=Hl;const Sv=Us.exports,Zn=new WeakMap,Ul=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,n=0;const i=t.displayName||t.name||"<anonymous>",s=function(...a){if(Zn.set(s,++n),n===1)r=t.apply(this,a),t=null;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r};return Sv(s,t),Zn.set(s,n),s};Xr.exports=Ul,Xr.exports.default=Ul,Xr.exports.callCount=t=>{if(!Zn.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return Zn.get(t)};var Cv=Xr.exports,Jt={exports:{}},ql={exports:{}};(function(t){t.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&t.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&t.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")})(ql);var he=le.process;const Zt=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};if(!Zt(he))Jt.exports=function(){return function(){}};else{var Av=Wu,Qr=ql.exports,Rv=/^win/i.test(he.platform),ei=jt;typeof ei!="function"&&(ei=ei.EventEmitter);var Oe;he.__signal_exit_emitter__?Oe=he.__signal_exit_emitter__:(Oe=he.__signal_exit_emitter__=new ei,Oe.count=0,Oe.emitted={}),Oe.infinite||(Oe.setMaxListeners(1/0),Oe.infinite=!0),Jt.exports=function(t,e){if(!Zt(le.process))return function(){};Av.equal(typeof t,"function","a callback must be provided for exit handler"),Jr===!1&&Gl();var r="exit";e&&e.alwaysLast&&(r="afterexit");var n=function(){Oe.removeListener(r,t),Oe.listeners("exit").length===0&&Oe.listeners("afterexit").length===0&&qs()};return Oe.on(r,t),n};var qs=function(){!Jr||!Zt(le.process)||(Jr=!1,Qr.forEach(function(e){try{he.removeListener(e,Gs[e])}catch{}}),he.emit=zs,he.reallyExit=zl,Oe.count-=1)};Jt.exports.unload=qs;var _r=function(e,r,n){Oe.emitted[e]||(Oe.emitted[e]=!0,Oe.emit(e,r,n))},Gs={};Qr.forEach(function(t){Gs[t]=function(){if(!!Zt(le.process)){var r=he.listeners(t);r.length===Oe.count&&(qs(),_r("exit",null,t),_r("afterexit",null,t),Rv&&t==="SIGHUP"&&(t="SIGINT"),he.kill(he.pid,t))}}}),Jt.exports.signals=function(){return Qr};var Jr=!1,Gl=function(){Jr||!Zt(le.process)||(Jr=!0,Oe.count+=1,Qr=Qr.filter(function(e){try{return he.on(e,Gs[e]),!0}catch{return!1}}),he.emit=Tv,he.reallyExit=xv)};Jt.exports.load=Gl;var zl=he.reallyExit,xv=function(e){!Zt(le.process)||(he.exitCode=e||0,_r("exit",he.exitCode,null),_r("afterexit",he.exitCode,null),zl.call(he,he.exitCode))},zs=he.emit,Tv=function(e,r){if(e==="exit"&&Zt(le.process)){r!==void 0&&(he.exitCode=r);var n=zs.apply(this,arguments);return _r("exit",he.exitCode,null),_r("afterexit",he.exitCode,null),n}else return zs.apply(this,arguments)}}var $v=Jt.exports;const Ov=Xr.exports,Fv=Jt.exports;var Pv=Ov(()=>{Fv(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})});(function(t){const e=Pv;let r=!1;t.show=(n=process.stderr)=>{!n.isTTY||(r=!1,n.write("\x1B[?25h"))},t.hide=(n=process.stderr)=>{!n.isTTY||(e(),r=!0,n.write("\x1B[?25l"))},t.toggle=(n,i)=>{n!==void 0&&(r=n),r?t.show(i):t.hide(i)}})(jl);const Zr=Xn.exports,kv=Bl,Iv=js.exports,Vs=new Set(["\x1B","\x9B"]),Lv=39,Vl=t=>`${Vs.values().next().value}[${t}m`,Bv=t=>t.split(" ").map(e=>Zr(e)),Ws=(t,e,r)=>{const n=[...e];let i=!1,s=Zr(kv(t[t.length-1]));for(const[a,o]of n.entries()){const u=Zr(o);if(s+u<=r?t[t.length-1]+=o:(t.push(o),s=0),Vs.has(o))i=!0;else if(i&&o==="m"){i=!1;continue}i||(s+=u,s===r&&a<n.length-1&&(t.push(""),s=0))}!s&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Nv=t=>{const e=t.split(" ");let r=e.length;for(;r>0&&!(Zr(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},Mv=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i="",s;const a=Bv(t);let o=[""];for(const[u,l]of t.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimLeft());let h=Zr(o[o.length-1]);if(u!==0&&(h>=e&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),h=0),(h>0||r.trim===!1)&&(o[o.length-1]+=" ",h++)),r.hard&&a[u]>e){const f=e-h,c=1+Math.floor((a[u]-f-1)/e);Math.floor((a[u]-1)/e)<c&&o.push(""),Ws(o,l,e);continue}if(h+a[u]>e&&h>0&&a[u]>0){if(r.wordWrap===!1&&h<e){Ws(o,l,e);continue}o.push("")}if(h+a[u]>e&&r.wordWrap===!1){Ws(o,l,e);continue}o[o.length-1]+=l}r.trim!==!1&&(o=o.map(Nv)),n=o.join(`
|
|
53
|
-
`);for(const[u,l]of[...n].entries()){if(i+=l,
|
|
54
|
-
`?i+=
|
|
55
|
-
`&&(i+=
|
|
52
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function Bs(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Yn=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._teardowns=null}return t.prototype.unsubscribe=function(){var e,r,n,i,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Is(a),u=o.next();!u.done;u=o.next()){var l=u.value;l.remove(this)}}catch(y){e={error:y}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}else a.remove(this);var h=this.initialTeardown;if(Pt(h))try{h()}catch(y){s=y instanceof Ls?y.errors:[y]}var f=this._teardowns;if(f){this._teardowns=null;try{for(var c=Is(f),m=c.next();!m.done;m=c.next()){var p=m.value;try{Il(p)}catch(y){s=s??[],y instanceof Ls?s=Wn(Wn([],Vn(s)),Vn(y.errors)):s.push(y)}}}catch(y){n={error:y}}finally{try{m&&!m.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}}if(s)throw new Ls(s)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Il(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=(r=this._teardowns)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&Bs(r,e)},t.prototype.remove=function(e){var r=this._teardowns;r&&Bs(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Pl=Yn.EMPTY;function kl(t){return t instanceof Yn||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function Il(t){Pt(t)?t():t.unsubscribe()}var Ns={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ms={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Ms.delegate;return((r==null?void 0:r.setTimeout)||setTimeout).apply(void 0,Wn([],Vn(t)))},clearTimeout:function(t){var e=Ms.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function rv(t){Ms.setTimeout(function(){throw t})}function Kn(){}var Xn=null;function Qn(t){if(Ns.useDeprecatedSynchronousErrorHandling){var e=!Xn;if(e&&(Xn={errorThrown:!1,error:null}),t(),e){var r=Xn,n=r.errorThrown,i=r.error;if(Xn=null,n)throw i}}else t()}var Ll=function(t){Gn(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,kl(r)&&r.add(n)):n.destination=nv,n}return e.create=function(r,n,i){return new js(r,n,i)},e.prototype.next=function(r){this.isStopped||this._next(r)},e.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Yn),js=function(t){Gn(e,t);function e(r,n,i){var s=t.call(this)||this,a;if(Pt(r))a=r;else if(r){a=r.next,n=r.error,i=r.complete;var o;s&&Ns.useDeprecatedNextContext?(o=Object.create(r),o.unsubscribe=function(){return s.unsubscribe()}):o=r,a=a==null?void 0:a.bind(o),n=n==null?void 0:n.bind(o),i=i==null?void 0:i.bind(o)}return s.destination={next:a?Hs(a):Kn,error:Hs(n??Bl),complete:i?Hs(i):Kn},s}return e}(Ll);function Hs(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{t.apply(void 0,Wn([],Vn(r)))}catch(i){rv(i)}}}function Bl(t){throw t}var nv={closed:!0,next:Kn,error:Bl,complete:Kn},iv=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function sv(t){return t}function av(t){return t.length===0?sv:t.length===1?t[0]:function(r){return t.reduce(function(n,i){return i(n)},r)}}var Us=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var i=this,s=uv(e)?e:new js(e,r,n);return Qn(function(){var a=i,o=a.operator,u=a.source;s.add(o?o.call(s,u):u?i._subscribe(s):i._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=Nl(r),new r(function(i,s){var a=new js({next:function(o){try{e(o)}catch(u){s(u),a.unsubscribe()}},error:s,complete:i});n.subscribe(a)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[iv]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return av(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=Nl(e),new e(function(n,i){var s;r.subscribe(function(a){return s=a},function(a){return i(a)},function(){return n(s)})})},t.create=function(e){return new t(e)},t}();function Nl(t){var e;return(e=t??Ns.Promise)!==null&&e!==void 0?e:Promise}function ov(t){return t&&Pt(t.next)&&Pt(t.error)&&Pt(t.complete)}function uv(t){return t&&t instanceof Ll||ov(t)&&kl(t)}var lv=Fl(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),qs=function(t){Gn(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return e.prototype.lift=function(r){var n=new Ml(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new lv},e.prototype.next=function(r){var n=this;Qn(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){var a=n.observers.slice();try{for(var o=Is(a),u=o.next();!u.done;u=o.next()){var l=u.value;l.next(r)}}catch(h){i={error:h}}finally{try{u&&!u.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}}})},e.prototype.error=function(r){var n=this;Qn(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},e.prototype.complete=function(){var r=this;Qn(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,i=n.hasError,s=n.isStopped,a=n.observers;return i||s?Pl:(a.push(r),new Yn(function(){return Bs(a,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,s=n.thrownError,a=n.isStopped;i?r.error(s):a&&r.complete()},e.prototype.asObservable=function(){var r=new Us;return r.source=this,r},e.create=function(r,n){return new Ml(r,n)},e}(Us),Ml=function(t){Gn(e,t);function e(r,n){var i=t.call(this)||this;return i.destination=r,i.source=n,i}return e.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},e.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:Pl},e}(qs),cv=hv;function Sr(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function hv(t){if(t=t||{},t.circles)return fv(t);return t.proto?n:r;function e(i,s){for(var a=Object.keys(i),o=new Array(a.length),u=0;u<a.length;u++){var l=a[u],h=i[l];typeof h!="object"||h===null?o[l]=h:h instanceof Date?o[l]=new Date(h):ArrayBuffer.isView(h)?o[l]=Sr(h):o[l]=s(h)}return o}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return e(i,r);if(i instanceof Map)return new Map(e(Array.from(i),r));if(i instanceof Set)return new Set(e(Array.from(i),r));var s={};for(var a in i)if(Object.hasOwnProperty.call(i,a)!==!1){var o=i[a];typeof o!="object"||o===null?s[a]=o:o instanceof Date?s[a]=new Date(o):o instanceof Map?s[a]=new Map(e(Array.from(o),r)):o instanceof Set?s[a]=new Set(e(Array.from(o),r)):ArrayBuffer.isView(o)?s[a]=Sr(o):s[a]=r(o)}return s}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return e(i,n);if(i instanceof Map)return new Map(e(Array.from(i),n));if(i instanceof Set)return new Set(e(Array.from(i),n));var s={};for(var a in i){var o=i[a];typeof o!="object"||o===null?s[a]=o:o instanceof Date?s[a]=new Date(o):o instanceof Map?s[a]=new Map(e(Array.from(o),n)):o instanceof Set?s[a]=new Set(e(Array.from(o),n)):ArrayBuffer.isView(o)?s[a]=Sr(o):s[a]=n(o)}return s}}function fv(t){var e=[],r=[];return t.proto?s:i;function n(a,o){for(var u=Object.keys(a),l=new Array(u.length),h=0;h<u.length;h++){var f=u[h],c=a[f];if(typeof c!="object"||c===null)l[f]=c;else if(c instanceof Date)l[f]=new Date(c);else if(ArrayBuffer.isView(c))l[f]=Sr(c);else{var m=e.indexOf(c);m!==-1?l[f]=r[m]:l[f]=o(c)}}return l}function i(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return n(a,i);if(a instanceof Map)return new Map(n(Array.from(a),i));if(a instanceof Set)return new Set(n(Array.from(a),i));var o={};e.push(a),r.push(o);for(var u in a)if(Object.hasOwnProperty.call(a,u)!==!1){var l=a[u];if(typeof l!="object"||l===null)o[u]=l;else if(l instanceof Date)o[u]=new Date(l);else if(l instanceof Map)o[u]=new Map(n(Array.from(l),i));else if(l instanceof Set)o[u]=new Set(n(Array.from(l),i));else if(ArrayBuffer.isView(l))o[u]=Sr(l);else{var h=e.indexOf(l);h!==-1?o[u]=r[h]:o[u]=i(l)}}return e.pop(),r.pop(),o}function s(a){if(typeof a!="object"||a===null)return a;if(a instanceof Date)return new Date(a);if(Array.isArray(a))return n(a,s);if(a instanceof Map)return new Map(n(Array.from(a),s));if(a instanceof Set)return new Set(n(Array.from(a),s));var o={};e.push(a),r.push(o);for(var u in a){var l=a[u];if(typeof l!="object"||l===null)o[u]=l;else if(l instanceof Date)o[u]=new Date(l);else if(l instanceof Map)o[u]=new Map(n(Array.from(l),s));else if(l instanceof Set)o[u]=new Set(n(Array.from(l),s));else if(ArrayBuffer.isView(l))o[u]=Sr(l);else{var h=e.indexOf(l);h!==-1?o[u]=r[h]:o[u]=s(l)}}return e.pop(),r.pop(),o}}var Jn={exports:{}};const jl=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);Jn.exports=jl,Jn.exports.default=jl;const Hl="[\uD800-\uDBFF][\uDC00-\uDFFF]",dv=t=>t&&t.exact?new RegExp(`^${Hl}$`):new RegExp(Hl,"g");var pv=dv,Gs={exports:{}},mv={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const en=mv,Ul={};for(const t of Object.keys(en))Ul[en[t]]=t;const L={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var ql=L;for(const t of Object.keys(L)){if(!("channels"in L[t]))throw new Error("missing channels property: "+t);if(!("labels"in L[t]))throw new Error("missing channel labels property: "+t);if(L[t].labels.length!==L[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:r}=L[t];delete L[t].channels,delete L[t].labels,Object.defineProperty(L[t],"channels",{value:e}),Object.defineProperty(L[t],"labels",{value:r})}L.rgb.hsl=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),a=s-i;let o,u;s===i?o=0:e===s?o=(r-n)/a:r===s?o=2+(n-e)/a:n===s&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360);const l=(i+s)/2;return s===i?u=0:l<=.5?u=a/(s+i):u=a/(2-s-i),[o,u*100,l*100]},L.rgb.hsv=function(t){let e,r,n,i,s;const a=t[0]/255,o=t[1]/255,u=t[2]/255,l=Math.max(a,o,u),h=l-Math.min(a,o,u),f=function(c){return(l-c)/6/h+1/2};return h===0?(i=0,s=0):(s=h/l,e=f(a),r=f(o),n=f(u),a===l?i=n-r:o===l?i=1/3+e-n:u===l&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,l*100]},L.rgb.hwb=function(t){const e=t[0],r=t[1];let n=t[2];const i=L.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]},L.rgb.cmyk=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),s=(1-e-i)/(1-i)||0,a=(1-r-i)/(1-i)||0,o=(1-n-i)/(1-i)||0;return[s*100,a*100,o*100,i*100]};function gv(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}L.rgb.keyword=function(t){const e=Ul[t];if(e)return e;let r=1/0,n;for(const i of Object.keys(en)){const s=en[i],a=gv(t,s);a<r&&(r=a,n=i)}return n},L.keyword.rgb=function(t){return en[t]},L.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;const i=e*.4124+r*.3576+n*.1805,s=e*.2126+r*.7152+n*.0722,a=e*.0193+r*.1192+n*.9505;return[i*100,s*100,a*100]},L.rgb.lab=function(t){const e=L.rgb.xyz(t);let r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const s=116*n-16,a=500*(r-n),o=200*(n-i);return[s,a,o]},L.hsl.rgb=function(t){const e=t[0]/360,r=t[1]/100,n=t[2]/100;let i,s,a;if(r===0)return a=n*255,[a,a,a];n<.5?i=n*(1+r):i=n+r-n*r;const o=2*n-i,u=[0,0,0];for(let l=0;l<3;l++)s=e+1/3*-(l-1),s<0&&s++,s>1&&s--,6*s<1?a=o+(i-o)*6*s:2*s<1?a=i:3*s<2?a=o+(i-o)*(2/3-s)*6:a=o,u[l]=a*255;return u},L.hsl.hsv=function(t){const e=t[0];let r=t[1]/100,n=t[2]/100,i=r;const s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s;const a=(n+r)/2,o=n===0?2*i/(s+i):2*r/(n+r);return[e,o*100,a*100]},L.hsv.rgb=function(t){const e=t[0]/60,r=t[1]/100;let n=t[2]/100;const i=Math.floor(e)%6,s=e-Math.floor(e),a=255*n*(1-r),o=255*n*(1-r*s),u=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,u,a];case 1:return[o,n,a];case 2:return[a,n,u];case 3:return[a,o,n];case 4:return[u,a,n];case 5:return[n,a,o]}},L.hsv.hsl=function(t){const e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01);let s,a;a=(2-r)*n;const o=(2-r)*i;return s=r*i,s/=o<=1?o:2-o,s=s||0,a/=2,[e,s*100,a*100]},L.hwb.rgb=function(t){const e=t[0]/360;let r=t[1]/100,n=t[2]/100;const i=r+n;let s;i>1&&(r/=i,n/=i);const a=Math.floor(6*e),o=1-n;s=6*e-a,(a&1)!==0&&(s=1-s);const u=r+s*(o-r);let l,h,f;switch(a){default:case 6:case 0:l=o,h=u,f=r;break;case 1:l=u,h=o,f=r;break;case 2:l=r,h=o,f=u;break;case 3:l=r,h=u,f=o;break;case 4:l=u,h=r,f=o;break;case 5:l=o,h=r,f=u;break}return[l*255,h*255,f*255]},L.cmyk.rgb=function(t){const e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),a=1-Math.min(1,r*(1-i)+i),o=1-Math.min(1,n*(1-i)+i);return[s*255,a*255,o*255]},L.xyz.rgb=function(t){const e=t[0]/100,r=t[1]/100,n=t[2]/100;let i,s,a;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,a=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[i*255,s*255,a*255]},L.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;const i=116*r-16,s=500*(e-r),a=200*(r-n);return[i,s,a]},L.lab.xyz=function(t){const e=t[0],r=t[1],n=t[2];let i,s,a;s=(e+16)/116,i=r/500+s,a=s-n/200;const o=s**3,u=i**3,l=a**3;return s=o>.008856?o:(s-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,i*=95.047,s*=100,a*=108.883,[i,s,a]},L.lab.lch=function(t){const e=t[0],r=t[1],n=t[2];let i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);const a=Math.sqrt(r*r+n*n);return[e,a,i]},L.lch.lab=function(t){const e=t[0],r=t[1],i=t[2]/360*2*Math.PI,s=r*Math.cos(i),a=r*Math.sin(i);return[e,s,a]},L.rgb.ansi16=function(t,e=null){const[r,n,i]=t;let s=e===null?L.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let a=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(a+=60),a},L.hsv.ansi16=function(t){return L.rgb.ansi16(L.hsv.rgb(t),t[2])},L.rgb.ansi256=function(t){const e=t[0],r=t[1],n=t[2];return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},L.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[n,i,s]},L.ansi256.rgb=function(t){if(t>=232){const s=(t-232)*10+8;return[s,s,s]}t-=16;let e;const r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]},L.rgb.hex=function(t){const r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r},L.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(o=>o+o).join(""));const n=parseInt(r,16),i=n>>16&255,s=n>>8&255,a=n&255;return[i,s,a]},L.rgb.hcg=function(t){const e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),s=Math.min(Math.min(e,r),n),a=i-s;let o,u;return a<1?o=s/(1-a):o=0,a<=0?u=0:i===e?u=(r-n)/a%6:i===r?u=2+(n-e)/a:u=4+(e-r)/a,u/=6,u%=1,[u*360,a*100,o*100]},L.hsl.hcg=function(t){const e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]},L.hsv.hcg=function(t){const e=t[1]/100,r=t[2]/100,n=e*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]},L.hcg.rgb=function(t){const e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];const i=[0,0,0],s=e%1*6,a=s%1,o=1-a;let u=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=o,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=o,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=o}return u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]},L.hcg.hsv=function(t){const e=t[1]/100,r=t[2]/100,n=e+r*(1-e);let i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]},L.hcg.hsl=function(t){const e=t[1]/100,n=t[2]/100*(1-e)+.5*e;let i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]},L.hcg.hwb=function(t){const e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]},L.hwb.hcg=function(t){const e=t[1]/100,r=t[2]/100,n=1-r,i=n-e;let s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*100]},L.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},L.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},L.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},L.gray.hsl=function(t){return[0,0,t[0]]},L.gray.hsv=L.gray.hsl,L.gray.hwb=function(t){return[0,100,t[0]]},L.gray.cmyk=function(t){return[0,0,0,t[0]]},L.gray.lab=function(t){return[t[0],0,0]},L.gray.hex=function(t){const e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},L.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const Zn=ql;function yv(){const t={},e=Object.keys(Zn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function vv(t){const e=yv(),r=[t];for(e[t].distance=0;r.length;){const n=r.pop(),i=Object.keys(Zn[n]);for(let s=i.length,a=0;a<s;a++){const o=i[a],u=e[o];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(o))}}return e}function bv(t,e){return function(r){return e(t(r))}}function Dv(t,e){const r=[e[t].parent,t];let n=Zn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=bv(Zn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}var wv=function(t){const e=vv(t),r={},n=Object.keys(e);for(let i=n.length,s=0;s<i;s++){const a=n[s];e[a].parent!==null&&(r[a]=Dv(a,e))}return r};const zs=ql,Ev=wv,Cr={},_v=Object.keys(zs);function Sv(t){const e=function(...r){const n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Cv(t){const e=function(...r){const n=r[0];if(n==null)return n;n.length>1&&(r=n);const i=t(r);if(typeof i=="object")for(let s=i.length,a=0;a<s;a++)i[a]=Math.round(i[a]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}_v.forEach(t=>{Cr[t]={},Object.defineProperty(Cr[t],"channels",{value:zs[t].channels}),Object.defineProperty(Cr[t],"labels",{value:zs[t].labels});const e=Ev(t);Object.keys(e).forEach(n=>{const i=e[n];Cr[t][n]=Cv(i),Cr[t][n].raw=Sv(i)})});var Av=Cr;(function(t){const e=(h,f)=>(...c)=>`\x1B[${h(...c)+f}m`,r=(h,f)=>(...c)=>{const m=h(...c);return`\x1B[${38+f};5;${m}m`},n=(h,f)=>(...c)=>{const m=h(...c);return`\x1B[${38+f};2;${m[0]};${m[1]};${m[2]}m`},i=h=>h,s=(h,f,c)=>[h,f,c],a=(h,f,c)=>{Object.defineProperty(h,f,{get:()=>{const m=c();return Object.defineProperty(h,f,{value:m,enumerable:!0,configurable:!0}),m},enumerable:!0,configurable:!0})};let o;const u=(h,f,c,m)=>{o===void 0&&(o=Av);const p=m?10:0,y={};for(const[b,D]of Object.entries(o)){const _=b==="ansi16"?"ansi":b;b===f?y[_]=h(c,p):typeof D=="object"&&(y[_]=h(D[f],p))}return y};function l(){const h=new Map,f={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};f.color.gray=f.color.blackBright,f.bgColor.bgGray=f.bgColor.bgBlackBright,f.color.grey=f.color.blackBright,f.bgColor.bgGrey=f.bgColor.bgBlackBright;for(const[c,m]of Object.entries(f)){for(const[p,y]of Object.entries(m))f[p]={open:`\x1B[${y[0]}m`,close:`\x1B[${y[1]}m`},m[p]=f[p],h.set(y[0],y[1]);Object.defineProperty(f,c,{value:m,enumerable:!1})}return Object.defineProperty(f,"codes",{value:h,enumerable:!1}),f.color.close="\x1B[39m",f.bgColor.close="\x1B[49m",a(f.color,"ansi",()=>u(e,"ansi16",i,!1)),a(f.color,"ansi256",()=>u(r,"ansi256",i,!1)),a(f.color,"ansi16m",()=>u(n,"rgb",s,!1)),a(f.bgColor,"ansi",()=>u(e,"ansi16",i,!0)),a(f.bgColor,"ansi256",()=>u(r,"ansi256",i,!0)),a(f.bgColor,"ansi16m",()=>u(n,"rgb",s,!0)),f}Object.defineProperty(t,"exports",{enumerable:!0,get:l})})(Gs);const Rv=Jn.exports,Tv=pv,Gl=Gs.exports,zl=["\x1B","\x9B"],ei=t=>`${zl[0]}[${t}m`,Vl=(t,e,r)=>{let n=[];t=[...t];for(let i of t){const s=i;i.match(";")&&(i=i.split(";")[0][0]+"0");const a=Gl.codes.get(parseInt(i,10));if(a){const o=t.indexOf(a.toString());o>=0?t.splice(o,1):n.push(ei(e?a:s))}else if(e){n.push(ei(0));break}else n.push(ei(s))}if(e&&(n=n.filter((i,s)=>n.indexOf(i)===s),r!==void 0)){const i=ei(Gl.codes.get(parseInt(r,10)));n=n.reduce((s,a)=>a===i?[a,...s]:[...s,a],[])}return n.join("")};var Wl=(t,e,r)=>{const n=[...t.normalize()],i=[];r=typeof r=="number"?r:n.length;let s=!1,a,o=0,u="";for(const[l,h]of n.entries()){let f=!1;if(zl.includes(h)){const c=/\d[^m]*/.exec(t.slice(l,l+18));a=c&&c.length>0?c[0]:void 0,o<r&&(s=!0,a!==void 0&&i.push(a))}else s&&h==="m"&&(s=!1,f=!0);if(!s&&!f&&++o,!Tv({exact:!0}).test(h)&&Rv(h.codePointAt())&&++o,o>e&&o<=r)u+=h;else if(o===e&&!s&&a!==void 0)u=Vl(i);else if(o>=r){u+=Vl(i,!0,a);break}}return u},ti={exports:{}},xv=({onlyFirst:t=!1}={})=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")};const $v=xv;var Yl=t=>typeof t=="string"?t.replace($v(),""):t,Ov=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};const Fv=Yl,Pv=Jn.exports,kv=Ov,Kl=t=>{if(typeof t!="string"||t.length===0||(t=Fv(t),t.length===0))return 0;t=t.replace(kv()," ");let e=0;for(let r=0;r<t.length;r++){const n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=Pv(n)?2:1)}return e};ti.exports=Kl,ti.exports.default=Kl;const Gt=Wl,Iv=ti.exports;function ri(t,e,r){if(t.charAt(e)===" ")return e;for(let n=1;n<=3;n++)if(r){if(t.charAt(e+n)===" ")return e+n}else if(t.charAt(e-n)===" ")return e-n;return e}var Lv=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};const{position:n,space:i,preferTruncationOnSpace:s}=r;let a="\u2026",o=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return a;const u=Iv(t);if(u<=e)return t;if(n==="start"){if(s){const l=ri(t,u-e+1,!0);return a+Gt(t,l,u).trim()}return i===!0&&(a+=" ",o=2),a+Gt(t,u-e+o,u)}if(n==="middle"){i===!0&&(a=" "+a+" ",o=3);const l=Math.floor(e/2);if(s){const h=ri(t,l),f=ri(t,u-(e-l)+1,!0);return Gt(t,0,h)+a+Gt(t,f,u).trim()}return Gt(t,0,l)+a+Gt(t,u-(e-l)+o,u)}if(n==="end"){if(s){const l=ri(t,e-1);return Gt(t,0,l)+a}return i===!0&&(a=" "+a,o=2),Gt(t,0,e-o)+a}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${n}`)},ni={exports:{}},Vs={exports:{}};(function(t){const e=t.exports;t.exports.default=e;const r="\x1B[",n="\x1B]",i="\x07",s=";",a=process.env.TERM_PROGRAM==="Apple_Terminal";e.cursorTo=(o,u)=>{if(typeof o!="number")throw new TypeError("The `x` argument is required");return typeof u!="number"?r+(o+1)+"G":r+(u+1)+";"+(o+1)+"H"},e.cursorMove=(o,u)=>{if(typeof o!="number")throw new TypeError("The `x` argument is required");let l="";return o<0?l+=r+-o+"D":o>0&&(l+=r+o+"C"),u<0?l+=r+-u+"A":u>0&&(l+=r+u+"B"),l},e.cursorUp=(o=1)=>r+o+"A",e.cursorDown=(o=1)=>r+o+"B",e.cursorForward=(o=1)=>r+o+"C",e.cursorBackward=(o=1)=>r+o+"D",e.cursorLeft=r+"G",e.cursorSavePosition=a?"\x1B7":r+"s",e.cursorRestorePosition=a?"\x1B8":r+"u",e.cursorGetPosition=r+"6n",e.cursorNextLine=r+"E",e.cursorPrevLine=r+"F",e.cursorHide=r+"?25l",e.cursorShow=r+"?25h",e.eraseLines=o=>{let u="";for(let l=0;l<o;l++)u+=e.eraseLine+(l<o-1?e.cursorUp():"");return o&&(u+=e.cursorLeft),u},e.eraseEndLine=r+"K",e.eraseStartLine=r+"1K",e.eraseLine=r+"2K",e.eraseDown=r+"J",e.eraseUp=r+"1J",e.eraseScreen=r+"2J",e.scrollUp=r+"S",e.scrollDown=r+"T",e.clearScreen="\x1Bc",e.clearTerminal=process.platform==="win32"?`${e.eraseScreen}${r}0f`:`${e.eraseScreen}${r}3J${r}H`,e.beep=i,e.link=(o,u)=>[n,"8",s,s,u,i,o,n,"8",s,s,i].join(""),e.image=(o,u={})=>{let l=`${n}1337;File=inline=1`;return u.width&&(l+=`;width=${u.width}`),u.height&&(l+=`;height=${u.height}`),u.preserveAspectRatio===!1&&(l+=";preserveAspectRatio=0"),l+":"+o.toString("base64")+i},e.iTerm={setCwd:(o=process.cwd())=>`${n}50;CurrentDir=${o}${i}`,annotation:(o,u={})=>{let l=`${n}1337;`;const h=typeof u.x<"u",f=typeof u.y<"u";if((h||f)&&!(h&&f&&typeof u.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return o=o.replace(/\|/g,""),l+=u.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",u.length>0?l+=(h?[o,u.length,u.x,u.y]:[u.length,o]).join("|"):l+=o,l+i}}})(Vs);var Bv=Vs.exports,Xl={},tn={exports:{}},Ws={exports:{}};const Ql=(t,e)=>{for(const r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};Ws.exports=Ql,Ws.exports.default=Ql;const Nv=Ws.exports,ii=new WeakMap,Jl=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,n=0;const i=t.displayName||t.name||"<anonymous>",s=function(...a){if(ii.set(s,++n),n===1)r=t.apply(this,a),t=null;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r};return Nv(s,t),ii.set(s,n),s};tn.exports=Jl,tn.exports.default=Jl,tn.exports.callCount=t=>{if(!ii.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return ii.get(t)};var Mv=tn.exports,tr={exports:{}},Zl={exports:{}};(function(t){t.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&t.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&t.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")})(Zl);var he=le.process;const rr=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};if(!rr(he))tr.exports=function(){return function(){}};else{var jv=nl,rn=Zl.exports,Hv=/^win/i.test(he.platform),si=Ut;typeof si!="function"&&(si=si.EventEmitter);var Fe;he.__signal_exit_emitter__?Fe=he.__signal_exit_emitter__:(Fe=he.__signal_exit_emitter__=new si,Fe.count=0,Fe.emitted={}),Fe.infinite||(Fe.setMaxListeners(1/0),Fe.infinite=!0),tr.exports=function(t,e){if(!rr(le.process))return function(){};jv.equal(typeof t,"function","a callback must be provided for exit handler"),nn===!1&&ec();var r="exit";e&&e.alwaysLast&&(r="afterexit");var n=function(){Fe.removeListener(r,t),Fe.listeners("exit").length===0&&Fe.listeners("afterexit").length===0&&Ys()};return Fe.on(r,t),n};var Ys=function(){!nn||!rr(le.process)||(nn=!1,rn.forEach(function(e){try{he.removeListener(e,Ks[e])}catch{}}),he.emit=Xs,he.reallyExit=tc,Fe.count-=1)};tr.exports.unload=Ys;var Ar=function(e,r,n){Fe.emitted[e]||(Fe.emitted[e]=!0,Fe.emit(e,r,n))},Ks={};rn.forEach(function(t){Ks[t]=function(){if(!!rr(le.process)){var r=he.listeners(t);r.length===Fe.count&&(Ys(),Ar("exit",null,t),Ar("afterexit",null,t),Hv&&t==="SIGHUP"&&(t="SIGINT"),he.kill(he.pid,t))}}}),tr.exports.signals=function(){return rn};var nn=!1,ec=function(){nn||!rr(le.process)||(nn=!0,Fe.count+=1,rn=rn.filter(function(e){try{return he.on(e,Ks[e]),!0}catch{return!1}}),he.emit=qv,he.reallyExit=Uv)};tr.exports.load=ec;var tc=he.reallyExit,Uv=function(e){!rr(le.process)||(he.exitCode=e||0,Ar("exit",he.exitCode,null),Ar("afterexit",he.exitCode,null),tc.call(he,he.exitCode))},Xs=he.emit,qv=function(e,r){if(e==="exit"&&rr(le.process)){r!==void 0&&(he.exitCode=r);var n=Xs.apply(this,arguments);return Ar("exit",he.exitCode,null),Ar("afterexit",he.exitCode,null),n}else return Xs.apply(this,arguments)}}var Gv=tr.exports;const zv=tn.exports,Vv=tr.exports;var Wv=zv(()=>{Vv(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})});(function(t){const e=Wv;let r=!1;t.show=(n=process.stderr)=>{!n.isTTY||(r=!1,n.write("\x1B[?25h"))},t.hide=(n=process.stderr)=>{!n.isTTY||(e(),r=!0,n.write("\x1B[?25l"))},t.toggle=(n,i)=>{n!==void 0&&(r=n),r?t.show(i):t.hide(i)}})(Xl);const sn=ti.exports,Yv=Yl,Kv=Gs.exports,Qs=new Set(["\x1B","\x9B"]),Xv=39,rc=t=>`${Qs.values().next().value}[${t}m`,Qv=t=>t.split(" ").map(e=>sn(e)),Js=(t,e,r)=>{const n=[...e];let i=!1,s=sn(Yv(t[t.length-1]));for(const[a,o]of n.entries()){const u=sn(o);if(s+u<=r?t[t.length-1]+=o:(t.push(o),s=0),Qs.has(o))i=!0;else if(i&&o==="m"){i=!1;continue}i||(s+=u,s===r&&a<n.length-1&&(t.push(""),s=0))}!s&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Jv=t=>{const e=t.split(" ");let r=e.length;for(;r>0&&!(sn(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},Zv=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i="",s;const a=Qv(t);let o=[""];for(const[u,l]of t.split(" ").entries()){r.trim!==!1&&(o[o.length-1]=o[o.length-1].trimLeft());let h=sn(o[o.length-1]);if(u!==0&&(h>=e&&(r.wordWrap===!1||r.trim===!1)&&(o.push(""),h=0),(h>0||r.trim===!1)&&(o[o.length-1]+=" ",h++)),r.hard&&a[u]>e){const f=e-h,c=1+Math.floor((a[u]-f-1)/e);Math.floor((a[u]-1)/e)<c&&o.push(""),Js(o,l,e);continue}if(h+a[u]>e&&h>0&&a[u]>0){if(r.wordWrap===!1&&h<e){Js(o,l,e);continue}o.push("")}if(h+a[u]>e&&r.wordWrap===!1){Js(o,l,e);continue}o[o.length-1]+=l}r.trim!==!1&&(o=o.map(Jv)),n=o.join(`
|
|
53
|
+
`);for(const[u,l]of[...n].entries()){if(i+=l,Qs.has(l)){const f=parseFloat(/\d[^m]*/.exec(n.slice(u,u+4)));s=f===Xv?null:f}const h=Kv.codes.get(Number(s));s&&h&&(n[u+1]===`
|
|
54
|
+
`?i+=rc(h):l===`
|
|
55
|
+
`&&(i+=rc(s)))}return i};var nc=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
|
|
56
56
|
`).split(`
|
|
57
|
-
`).map(n=>
|
|
58
|
-
`);const
|
|
59
|
-
`),i=n.length-r;return i<=0?e:
|
|
60
|
-
`).length+1,e.length)},
|
|
61
|
-
`;o=
|
|
62
|
-
`).length)};return s.clear=()=>{t.write(Kl.eraseLines(r)),i="",n=ti(t),r=0},s.done=()=>{i="",n=ti(t),r=0,e||Yl.show()},s};Jn.exports=Ks(process.stdout);var Gv=Jn.exports.stderr=Ks(process.stderr);Jn.exports.create=Ks;var Ys=Jn.exports;const qt=process.env||{},Xl=process.argv||[],zv="NO_COLOR"in qt||Xl.includes("--no-color"),Vv="FORCE_COLOR"in qt||Xl.includes("--color"),Wv=process.platform==="win32",Kv=fs&&fs.isatty&&fs.isatty(1)&&qt.TERM&&qt.TERM!=="dumb",Yv="CI"in qt&&("GITHUB_ACTIONS"in qt||"GITLAB_CI"in qt||"CIRCLECI"in qt),Xv=!zv&&(Vv||Wv||Kv||Yv),Ql=(t,e,r,n,i=e.substring(0,t)+n,s=e.substring(t+r.length),a=s.indexOf(r))=>i+(a<0?s:Ql(a,s,r,n)),Qv=(t,e,r,n,i)=>t<0?r+e+n:r+Ql(t,e,n,i)+n,Jv=(t,e,r=t,n=t.length+1)=>i=>i||!(i===""||i===void 0)?Qv((""+i).indexOf(e,n),i,t,e,r):"",W=(t,e,r)=>Jv(`\x1B[${t}m`,`\x1B[${e}m`,r),Jl={reset:W(0,0),bold:W(1,22,"\x1B[22m\x1B[1m"),dim:W(2,22,"\x1B[22m\x1B[2m"),italic:W(3,23),underline:W(4,24),inverse:W(7,27),hidden:W(8,28),strikethrough:W(9,29),black:W(30,39),red:W(31,39),green:W(32,39),yellow:W(33,39),blue:W(34,39),magenta:W(35,39),cyan:W(36,39),white:W(37,39),gray:W(90,39),bgBlack:W(40,49),bgRed:W(41,49),bgGreen:W(42,49),bgYellow:W(43,49),bgBlue:W(44,49),bgMagenta:W(45,49),bgCyan:W(46,49),bgWhite:W(47,49),blackBright:W(90,39),redBright:W(91,39),greenBright:W(92,39),yellowBright:W(93,39),blueBright:W(94,39),magentaBright:W(95,39),cyanBright:W(96,39),whiteBright:W(97,39),bgBlackBright:W(100,49),bgRedBright:W(101,49),bgGreenBright:W(102,49),bgYellowBright:W(103,49),bgBlueBright:W(104,49),bgMagentaBright:W(105,49),bgCyanBright:W(106,49),bgWhiteBright:W(107,49)},Zv=t=>t,Zl=({useColor:t=Xv}={})=>t?Jl:Object.keys(Jl).reduce((e,r)=>({...e,[r]:Zv}),{});Zl();var ec={exports:{}};(function(t,e){var r=Ye;t.exports=n,n.through=n;function n(i,s,a){i=i||function(p){this.queue(p)},s=s||function(){this.queue(null)};var o=!1,u=!1,l=[],h=!1,f=new r;f.readable=f.writable=!0,f.paused=!1,f.autoDestroy=!(a&&a.autoDestroy===!1),f.write=function(p){return i.call(this,p),!f.paused};function c(){for(;l.length&&!f.paused;){var p=l.shift();if(p===null)return f.emit("end");f.emit("data",p)}}f.queue=f.push=function(p){return h||(p===null&&(h=!0),l.push(p),c()),f},f.on("end",function(){f.readable=!1,!f.writable&&f.autoDestroy&&process.nextTick(function(){f.destroy()})});function m(){f.writable=!1,s.call(f),!f.readable&&f.autoDestroy&&f.destroy()}return f.end=function(p){if(!o)return o=!0,arguments.length&&f.write(p),m(),f},f.destroy=function(){if(!u)return u=!0,o=!0,l.length=0,f.writable=f.readable=!1,f.emit("close"),f},f.pause=function(){if(!f.paused)return f.paused=!0,f},f.resume=function(){return f.paused&&(f.paused=!1,f.emit("resume")),c(),f.paused||f.emit("drain"),f},f}})(ec);var e0=ec.exports,t0=Object.create,ri=Object.defineProperty,r0=Object.defineProperties,n0=Object.getOwnPropertyDescriptor,i0=Object.getOwnPropertyDescriptors,s0=Object.getOwnPropertyNames,tc=Object.getOwnPropertySymbols,a0=Object.getPrototypeOf,rc=Object.prototype.hasOwnProperty,o0=Object.prototype.propertyIsEnumerable,nc=(t,e,r)=>e in t?ri(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ee=(t,e)=>{for(var r in e||(e={}))rc.call(e,r)&&nc(t,r,e[r]);if(tc)for(var r of tc(e))o0.call(e,r)&&nc(t,r,e[r]);return t},ic=(t,e)=>r0(t,i0(e)),u0=t=>ri(t,"__esModule",{value:!0}),l0=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')}),c0=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of s0(e))!rc.call(t,i)&&(r||i!=="default")&&ri(t,i,{get:()=>e[i],enumerable:!(n=n0(e,i))||n.enumerable});return t},h0=(t,e)=>c0(u0(ri(t!=null?t0(a0(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),f0=Qy({circles:!0});function sc(t){return f0(t)}var d0=class extends Error{constructor(t,e,r){super(t.message);this.error=t,this.type=e,this.task=r;var n;this.name="ListrError",this.path=[...(n=r.listr.path)!=null?n:[],r.title].join(" > "),(r==null?void 0:r.options.collectErrors)==="full"&&(this.task=sc(r),this.ctx=sc(r.listr.ctx)),this.stack=t==null?void 0:t.stack}},en=class extends Error{constructor(t){super(t);this.name="PromptError"}};function tn(t,...e){return typeof t=="function"?t(...e):t}var ac,ee=Zl({useColor:((ac=process.env)==null?void 0:ac.LISTR_DISABLE_COLOR)!=="1"});function oc(){return process.platform!=="win32"?!0:Boolean(process.env.CI)||Boolean(process.env.WT_SESSION)||process.env.TERM_PROGRAM==="vscode"||process.env.TERM==="xterm-256color"||process.env.TERM==="alacritty"}var uc={warning:"\u26A0",cross:"\u2716",arrowDown:"\u2193",tick:"\u2714",arrowRight:"\u2192",pointer:"\u276F",checkboxOn:"\u2612",arrowLeft:"\u2190",squareSmallFilled:"\u25FC",pointerSmall:"\u203A"},p0=ic(Ee({},uc),{warning:"\u203C",cross:"\xD7",tick:"\u221A",pointer:">",checkboxOn:"[\xD7]",squareSmallFilled:"\u25A0"}),ae=oc()?uc:p0;function lc(t,e){return t.replace(/^(?!\s*$)/gm," ".repeat(e))}function cc(t){const e=Math.floor(t/1e3),r=Math.floor(e/60);let n;return e===0&&r===0&&(n=`0.${Math.floor(t/100)}s`),e>0&&(n=`${e%60}s`),r>0&&(n=`${r}m${n}`),n}var Xs=class{constructor(t,e,r){this.tasks=t,this.options=e,this.renderHook$=r,this.bottomBar={},this.spinner=oc()?["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]:["-","\\","|","/"],this.spinnerPosition=0,this.options=Ee(Ee({},Xs.rendererOptions),this.options)}getTaskOptions(t){return Ee(Ee({},Xs.rendererTaskOptions),t.rendererTaskOptions)}isBottomBar(t){const e=this.getTaskOptions(t).bottomBar;return typeof e=="number"&&e!==0||typeof e=="boolean"&&e!==!1}hasPersistentOutput(t){return this.getTaskOptions(t).persistentOutput===!0}hasTimer(t){return this.getTaskOptions(t).showTimer===!0}getSelfOrParentOption(t,e){var r,n,i;return(i=(r=t==null?void 0:t.rendererOptions)==null?void 0:r[e])!=null?i:(n=this.options)==null?void 0:n[e]}getTaskTime(t){return ee.dim(`[${cc(t.message.duration)}]`)}createRender(t){t=Ee(Ee({},{tasks:!0,bottomBar:!0,prompt:!0}),t);const e=[],r=this.multiLineRenderer(this.tasks),n=this.renderBottomBar(),i=this.renderPrompt();return t.tasks&&(r==null?void 0:r.trim().length)>0&&e.push(r),t.bottomBar&&(n==null?void 0:n.trim().length)>0&&e.push((e.length>0?ct:"")+n),t.prompt&&(i==null?void 0:i.trim().length)>0&&e.push((e.length>0?ct:"")+i),e.length>0?e.join(ct):""}render(){var t;if(this.id)return;const e=()=>Ys(this.createRender());((t=this.options)==null?void 0:t.lazy)||(this.id=setInterval(()=>{this.spinnerPosition=++this.spinnerPosition%this.spinner.length,e()},100)),this.renderHook$.subscribe(()=>{e()})}end(){clearInterval(this.id),this.id&&(this.id=void 0),Ys.clear(),Ys.done(),this.options.clearOutput||process.stdout.write(this.createRender({prompt:!1})+ct)}multiLineRenderer(t,e=0){var r,n;let i=[];for(const s of t)if(s.isEnabled()){if(s.hasTitle()&&(t.some(a=>a.hasFailed())&&!s.hasFailed()&&s.options.exitOnError!==!1&&!(s.isCompleted()||s.isSkipped())?i=[...i,this.formatString(s.title,ee.red(ae.squareSmallFilled),e)]:s.hasFailed()&&this.getSelfOrParentOption(s,"collapseErrors")?i=[...i,this.formatString(!s.hasSubtasks()&&s.message.error&&this.getSelfOrParentOption(s,"showErrorMessage")?s.message.error:s.title,this.getSymbol(s),e)]:s.isSkipped()&&this.getSelfOrParentOption(s,"collapseSkips")?i=[...i,this.formatString(this.addSuffixToMessage(s.message.skip&&this.getSelfOrParentOption(s,"showSkipMessage")?s.message.skip:s.title,"SKIPPED",this.getSelfOrParentOption(s,"suffixSkips")),this.getSymbol(s),e)]:s.isRetrying()&&this.getSelfOrParentOption(s,"suffixRetries")?i=[...i,this.formatString(this.addSuffixToMessage(s.title,`RETRYING-${s.message.retry.count}`),this.getSymbol(s),e)]:s.isCompleted()&&s.hasTitle()&&(this.getSelfOrParentOption(s,"showTimer")||this.hasTimer(s))?i=[...i,this.formatString(`${s==null?void 0:s.title} ${this.getTaskTime(s)}`,this.getSymbol(s),e)]:i=[...i,this.formatString(s.title,this.getSymbol(s),e)]),(!s.hasSubtasks()||!this.getSelfOrParentOption(s,"showSubtasks"))&&(s.hasFailed()&&this.getSelfOrParentOption(s,"collapseErrors")===!1&&(this.getSelfOrParentOption(s,"showErrorMessage")||!this.getSelfOrParentOption(s,"showSubtasks"))?i=[...i,this.dumpData(s,e,"error")]:s.isSkipped()&&this.getSelfOrParentOption(s,"collapseSkips")===!1&&(this.getSelfOrParentOption(s,"showSkipMessage")||!this.getSelfOrParentOption(s,"showSubtasks"))&&(i=[...i,this.dumpData(s,e,"skip")])),s==null?void 0:s.output)if((s.isPending()||s.isRetrying()||s.isRollingBack())&&s.isPrompt())this.promptBar=s.output;else if(this.isBottomBar(s)||!s.hasTitle()){const a=[this.dumpData(s,-1)];if(!this.bottomBar[s.id]){this.bottomBar[s.id]={},this.bottomBar[s.id].data=[];const o=this.getTaskOptions(s).bottomBar;typeof o=="boolean"?this.bottomBar[s.id].items=1:this.bottomBar[s.id].items=o}!((n=(r=this.bottomBar[s.id])==null?void 0:r.data)==null?void 0:n.some(o=>a.includes(o)))&&!s.isSkipped()&&(this.bottomBar[s.id].data=[...this.bottomBar[s.id].data,...a])}else(s.isPending()||s.isRetrying()||s.isRollingBack()||this.hasPersistentOutput(s))&&(i=[...i,this.dumpData(s,e)]);if(this.getSelfOrParentOption(s,"showSubtasks")!==!1&&s.hasSubtasks()&&(s.isPending()||s.hasFailed()||s.isCompleted()&&!s.hasTitle()||s.isCompleted()&&this.getSelfOrParentOption(s,"collapse")===!1&&!s.subtasks.some(a=>a.rendererOptions.collapse===!0)||s.subtasks.some(a=>a.rendererOptions.collapse===!1)||s.subtasks.some(a=>a.hasFailed())||s.subtasks.some(a=>a.hasRolledBack()))){const a=s.hasTitle()?e+1:e,o=this.multiLineRenderer(s.subtasks,a);(o==null?void 0:o.trim())!==""&&!s.subtasks.every(u=>!u.hasTitle())&&(i=[...i,o])}(s.isCompleted()||s.hasFailed()||s.isSkipped()||s.hasRolledBack())&&(this.promptBar=null,this.hasPersistentOutput(s)||delete this.bottomBar[s.id])}if(i=i.filter(Boolean),i.length>0)return i.join(ct)}renderBottomBar(){if(Object.keys(this.bottomBar).length>0)return this.bottomBar=Object.keys(this.bottomBar).reduce((t,e)=>((t==null?void 0:t[e])||(t[e]={}),t[e]=this.bottomBar[e],this.bottomBar[e].data=this.bottomBar[e].data.slice(-this.bottomBar[e].items),t[e].data=this.bottomBar[e].data,t),{}),Object.values(this.bottomBar).reduce((t,e)=>t=[...t,...e.data],[]).filter(Boolean).join(ct)}renderPrompt(){if(this.promptBar)return this.promptBar}dumpData(t,e,r="output"){let n;switch(r){case"output":n=t.output;break;case"skip":n=t.message.skip;break;case"error":n=t.message.error;break}if(!(t.hasTitle()&&r==="error"&&n===t.title)&&typeof n=="string")return this.formatString(n,this.getSymbol(t,!0),e+1)}formatString(t,e,r){if(t.trim()==="")return;t=`${e} ${t}`;let n,i=process.stdout.columns?process.stdout.columns:80;switch(i=i-r*this.options.indentation-2,this.options.formatOutput){case"truncate":n=t.split(ct).map((s,a)=>_v(this.indentMultilineOutput(s,a),i));break;case"wrap":n=Wl(t,i,{hard:!0}).split(ct).map((s,a)=>this.indentMultilineOutput(s,a));break;default:throw new Error("Format option for the renderer is wrong.")}return this.options.removeEmptyLines&&(n=n.filter(Boolean)),lc(n.join(ct),r*this.options.indentation)}indentMultilineOutput(t,e){return e>0?lc(t.trim(),2):t.trim()}getSymbol(t,e=!1){var r,n,i;return t.isPending()&&!e?((r=this.options)==null?void 0:r.lazy)||this.getSelfOrParentOption(t,"showSubtasks")!==!1&&t.hasSubtasks()&&!t.subtasks.every(s=>!s.hasTitle())?ee.yellow(ae.pointer):ee.yellowBright(this.spinner[this.spinnerPosition]):t.isCompleted()&&!e?t.hasSubtasks()&&t.subtasks.some(s=>s.hasFailed())?ee.yellow(ae.warning):ee.green(ae.tick):t.isRetrying()&&!e?((n=this.options)==null?void 0:n.lazy)?ee.yellow(ae.warning):ee.yellow(this.spinner[this.spinnerPosition]):t.isRollingBack()&&!e?((i=this.options)==null?void 0:i.lazy)?ee.red(ae.warning):ee.red(this.spinner[this.spinnerPosition]):t.hasRolledBack()&&!e?ee.red(ae.arrowLeft):t.hasFailed()&&!e?t.hasSubtasks()?ee.red(ae.pointer):ee.red(ae.cross):t.isSkipped()&&!e&&this.getSelfOrParentOption(t,"collapseSkips")===!1?ee.yellow(ae.warning):t.isSkipped()&&(e||this.getSelfOrParentOption(t,"collapseSkips"))?ee.yellow(ae.arrowDown):e?ae.pointerSmall:ee.dim(ae.squareSmallFilled)}addSuffixToMessage(t,e,r){return r??!0?t+ee.dim(` [${e}]`):t}},Qs=Xs;Qs.nonTTY=!1,Qs.rendererOptions={indentation:2,clearOutput:!1,showSubtasks:!0,collapse:!0,collapseSkips:!0,showSkipMessage:!0,suffixSkips:!0,collapseErrors:!0,showErrorMessage:!0,suffixRetries:!0,lazy:!1,showTimer:!1,removeEmptyLines:!0,formatOutput:"truncate"};var hc=class{constructor(t,e){this.tasks=t,this.options=e}render(){}end(){}};hc.nonTTY=!0;var er=class{constructor(t,e){this.tasks=t,this.options=e,this.eventTypeRendererMap={SUBTASK:r=>{r.hasTitle()&&this.log(`${ee.blue(ae.pointer)} ${r.title}`),r.hasSubtasks()&&this.render(r.subtasks)},STATE:r=>{r.isCompleted()&&r.hasTitle()&&this.log(`${ee.green(ae.tick)} ${r.title}`)},DATA:(r,n)=>{r.isPrompt()&&!String(n.data).match(/^\n$/)?Gv(`${n.data}`):this.log(`${ae.pointerSmall} ${n.data}`)},MESSAGE:(r,n)=>{if(n.data.error){const i=er.formatTitle(r);this.log(`${ee.red(ae.cross)}${i}: ${n.data.error}`)}else if(n.data.skip){const i=er.formatTitle(r),s=r.title!==n.data.skip?`: ${n.data.skip}`:"";this.log(`${ee.yellow(ae.arrowDown)}${i} [${ee.yellow(`skipped${s}`)}]`)}else if(n.data.rollback){const i=er.formatTitle(r);this.log(`${ee.red(ae.arrowLeft)}${i}: ${n.data.rollback}`)}else if(n.data.retry){const i=er.formatTitle(r);this.log(`[${ee.yellow(`${n.data.retry.count}`)}]${i}`)}}},this.options=Ee(Ee({},er.rendererOptions),e)}static now(){return new Date}static formatTitle(t){return(t==null?void 0:t.title)?` ${t.title}`:""}log(t){const e=i=>{process[this.options.output].write(i.endsWith(ct)?i:`${i}${ct}`)};if(!this.options.prefixWithTimestamp){e(`${t}`);return}const r=er.now(),n=String(r.getHours()).padStart(2,"0")+":"+String(r.getMinutes()).padStart(2,"0")+":"+String(r.getSeconds()).padStart(2,"0");e(`${ee.dim(`[${n}]`)} ${t}`)}end(){}render(t){(t==null?void 0:t.length)?t.forEach(e=>{e.subscribe(r=>{var n,i;(i=(n=this.eventTypeRendererMap)[r.type])==null||i.call(n,e,r)},this.log)}):this.render(this.tasks)}},Js=er;Js.nonTTY=!0,Js.rendererOptions={prefixWithTimestamp:!1,output:"stdout"};var m0=class{constructor(t){this.options=t}fail(t){t=this.parseMessage("FAILED",t),console.error(t)}skip(t){t=this.parseMessage("SKIPPED",t),console.info(t)}success(t){t=this.parseMessage("SUCCESS",t),console.log(t)}data(t){t=this.parseMessage("DATA",t),console.info(t)}start(t){t=this.parseMessage("STARTED",t),console.log(t)}title(t){t=this.parseMessage("TITLE",t),console.info(t)}retry(t){t=this.parseMessage("RETRY",t),console.warn(t)}rollback(t){t=this.parseMessage("ROLLBACK",t),console.warn(t)}parseMessage(t,e){let r;try{r=e.split(`
|
|
57
|
+
`).map(n=>Zv(n,e,r)).join(`
|
|
58
|
+
`);const ic=Vs.exports,sc=Xl,e0=nc,t0=Wl,r0=24,ai=t=>{const{columns:e}=t;return e||80},n0=(t,e)=>{const r=t.rows||r0,n=e.split(`
|
|
59
|
+
`),i=n.length-r;return i<=0?e:t0(e,n.slice(0,i).join(`
|
|
60
|
+
`).length+1,e.length)},Zs=(t,{showCursor:e=!1}={})=>{let r=0,n=ai(t),i="";const s=(...a)=>{e||sc.hide();let o=a.join(" ")+`
|
|
61
|
+
`;o=n0(t,o);const u=ai(t);o===i&&n===u||(i=o,n=u,o=e0(o,u,{trim:!1,hard:!0,wordWrap:!1}),t.write(ic.eraseLines(r)+o),r=o.split(`
|
|
62
|
+
`).length)};return s.clear=()=>{t.write(ic.eraseLines(r)),i="",n=ai(t),r=0},s.done=()=>{i="",n=ai(t),r=0,e||sc.show()},s};ni.exports=Zs(process.stdout);var i0=ni.exports.stderr=Zs(process.stderr);ni.exports.create=Zs;var ea=ni.exports;const zt=process.env||{},ac=process.argv||[],s0="NO_COLOR"in zt||ac.includes("--no-color"),a0="FORCE_COLOR"in zt||ac.includes("--color"),o0=process.platform==="win32",u0=gs&&gs.isatty&&gs.isatty(1)&&zt.TERM&&zt.TERM!=="dumb",l0="CI"in zt&&("GITHUB_ACTIONS"in zt||"GITLAB_CI"in zt||"CIRCLECI"in zt),c0=!s0&&(a0||o0||u0||l0),oc=(t,e,r,n,i=e.substring(0,t)+n,s=e.substring(t+r.length),a=s.indexOf(r))=>i+(a<0?s:oc(a,s,r,n)),h0=(t,e,r,n,i)=>t<0?r+e+n:r+oc(t,e,n,i)+n,f0=(t,e,r=t,n=t.length+1)=>i=>i||!(i===""||i===void 0)?h0((""+i).indexOf(e,n),i,t,e,r):"",W=(t,e,r)=>f0(`\x1B[${t}m`,`\x1B[${e}m`,r),uc={reset:W(0,0),bold:W(1,22,"\x1B[22m\x1B[1m"),dim:W(2,22,"\x1B[22m\x1B[2m"),italic:W(3,23),underline:W(4,24),inverse:W(7,27),hidden:W(8,28),strikethrough:W(9,29),black:W(30,39),red:W(31,39),green:W(32,39),yellow:W(33,39),blue:W(34,39),magenta:W(35,39),cyan:W(36,39),white:W(37,39),gray:W(90,39),bgBlack:W(40,49),bgRed:W(41,49),bgGreen:W(42,49),bgYellow:W(43,49),bgBlue:W(44,49),bgMagenta:W(45,49),bgCyan:W(46,49),bgWhite:W(47,49),blackBright:W(90,39),redBright:W(91,39),greenBright:W(92,39),yellowBright:W(93,39),blueBright:W(94,39),magentaBright:W(95,39),cyanBright:W(96,39),whiteBright:W(97,39),bgBlackBright:W(100,49),bgRedBright:W(101,49),bgGreenBright:W(102,49),bgYellowBright:W(103,49),bgBlueBright:W(104,49),bgMagentaBright:W(105,49),bgCyanBright:W(106,49),bgWhiteBright:W(107,49)},d0=t=>t,lc=({useColor:t=c0}={})=>t?uc:Object.keys(uc).reduce((e,r)=>({...e,[r]:d0}),{});lc();var cc={exports:{}};(function(t,e){var r=Xe;t.exports=n,n.through=n;function n(i,s,a){i=i||function(p){this.queue(p)},s=s||function(){this.queue(null)};var o=!1,u=!1,l=[],h=!1,f=new r;f.readable=f.writable=!0,f.paused=!1,f.autoDestroy=!(a&&a.autoDestroy===!1),f.write=function(p){return i.call(this,p),!f.paused};function c(){for(;l.length&&!f.paused;){var p=l.shift();if(p===null)return f.emit("end");f.emit("data",p)}}f.queue=f.push=function(p){return h||(p===null&&(h=!0),l.push(p),c()),f},f.on("end",function(){f.readable=!1,!f.writable&&f.autoDestroy&&process.nextTick(function(){f.destroy()})});function m(){f.writable=!1,s.call(f),!f.readable&&f.autoDestroy&&f.destroy()}return f.end=function(p){if(!o)return o=!0,arguments.length&&f.write(p),m(),f},f.destroy=function(){if(!u)return u=!0,o=!0,l.length=0,f.writable=f.readable=!1,f.emit("close"),f},f.pause=function(){if(!f.paused)return f.paused=!0,f},f.resume=function(){return f.paused&&(f.paused=!1,f.emit("resume")),c(),f.paused||f.emit("drain"),f},f}})(cc);var p0=cc.exports,m0=Object.create,oi=Object.defineProperty,g0=Object.defineProperties,y0=Object.getOwnPropertyDescriptor,v0=Object.getOwnPropertyDescriptors,b0=Object.getOwnPropertyNames,hc=Object.getOwnPropertySymbols,D0=Object.getPrototypeOf,fc=Object.prototype.hasOwnProperty,w0=Object.prototype.propertyIsEnumerable,dc=(t,e,r)=>e in t?oi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ee=(t,e)=>{for(var r in e||(e={}))fc.call(e,r)&&dc(t,r,e[r]);if(hc)for(var r of hc(e))w0.call(e,r)&&dc(t,r,e[r]);return t},pc=(t,e)=>g0(t,v0(e)),E0=t=>oi(t,"__esModule",{value:!0}),_0=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')}),S0=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of b0(e))!fc.call(t,i)&&(r||i!=="default")&&oi(t,i,{get:()=>e[i],enumerable:!(n=y0(e,i))||n.enumerable});return t},C0=(t,e)=>S0(E0(oi(t!=null?m0(D0(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),A0=cv({circles:!0});function mc(t){return A0(t)}var R0=class extends Error{constructor(t,e,r){super(t.message);this.error=t,this.type=e,this.task=r;var n;this.name="ListrError",this.path=[...(n=r.listr.path)!=null?n:[],r.title].join(" > "),(r==null?void 0:r.options.collectErrors)==="full"&&(this.task=mc(r),this.ctx=mc(r.listr.ctx)),this.stack=t==null?void 0:t.stack}},an=class extends Error{constructor(t){super(t);this.name="PromptError"}};function on(t,...e){return typeof t=="function"?t(...e):t}var gc,ee=lc({useColor:((gc=process.env)==null?void 0:gc.LISTR_DISABLE_COLOR)!=="1"});function yc(){return process.platform!=="win32"?!0:Boolean(process.env.CI)||Boolean(process.env.WT_SESSION)||process.env.TERM_PROGRAM==="vscode"||process.env.TERM==="xterm-256color"||process.env.TERM==="alacritty"}var vc={warning:"\u26A0",cross:"\u2716",arrowDown:"\u2193",tick:"\u2714",arrowRight:"\u2192",pointer:"\u276F",checkboxOn:"\u2612",arrowLeft:"\u2190",squareSmallFilled:"\u25FC",pointerSmall:"\u203A"},T0=pc(Ee({},vc),{warning:"\u203C",cross:"\xD7",tick:"\u221A",pointer:">",checkboxOn:"[\xD7]",squareSmallFilled:"\u25A0"}),ae=yc()?vc:T0;function bc(t,e){return t.replace(/^(?!\s*$)/gm," ".repeat(e))}function Dc(t){const e=Math.floor(t/1e3),r=Math.floor(e/60);let n;return e===0&&r===0&&(n=`0.${Math.floor(t/100)}s`),e>0&&(n=`${e%60}s`),r>0&&(n=`${r}m${n}`),n}var ta=class{constructor(t,e,r){this.tasks=t,this.options=e,this.renderHook$=r,this.bottomBar={},this.spinner=yc()?["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]:["-","\\","|","/"],this.spinnerPosition=0,this.options=Ee(Ee({},ta.rendererOptions),this.options)}getTaskOptions(t){return Ee(Ee({},ta.rendererTaskOptions),t.rendererTaskOptions)}isBottomBar(t){const e=this.getTaskOptions(t).bottomBar;return typeof e=="number"&&e!==0||typeof e=="boolean"&&e!==!1}hasPersistentOutput(t){return this.getTaskOptions(t).persistentOutput===!0}hasTimer(t){return this.getTaskOptions(t).showTimer===!0}getSelfOrParentOption(t,e){var r,n,i;return(i=(r=t==null?void 0:t.rendererOptions)==null?void 0:r[e])!=null?i:(n=this.options)==null?void 0:n[e]}getTaskTime(t){return ee.dim(`[${Dc(t.message.duration)}]`)}createRender(t){t=Ee(Ee({},{tasks:!0,bottomBar:!0,prompt:!0}),t);const e=[],r=this.multiLineRenderer(this.tasks),n=this.renderBottomBar(),i=this.renderPrompt();return t.tasks&&(r==null?void 0:r.trim().length)>0&&e.push(r),t.bottomBar&&(n==null?void 0:n.trim().length)>0&&e.push((e.length>0?ft:"")+n),t.prompt&&(i==null?void 0:i.trim().length)>0&&e.push((e.length>0?ft:"")+i),e.length>0?e.join(ft):""}render(){var t;if(this.id)return;const e=()=>ea(this.createRender());((t=this.options)==null?void 0:t.lazy)||(this.id=setInterval(()=>{this.spinnerPosition=++this.spinnerPosition%this.spinner.length,e()},100)),this.renderHook$.subscribe(()=>{e()})}end(){clearInterval(this.id),this.id&&(this.id=void 0),ea.clear(),ea.done(),this.options.clearOutput||process.stdout.write(this.createRender({prompt:!1})+ft)}multiLineRenderer(t,e=0){var r,n;let i=[];for(const s of t)if(s.isEnabled()){if(s.hasTitle()&&(t.some(a=>a.hasFailed())&&!s.hasFailed()&&s.options.exitOnError!==!1&&!(s.isCompleted()||s.isSkipped())?i=[...i,this.formatString(s.title,ee.red(ae.squareSmallFilled),e)]:s.hasFailed()&&this.getSelfOrParentOption(s,"collapseErrors")?i=[...i,this.formatString(!s.hasSubtasks()&&s.message.error&&this.getSelfOrParentOption(s,"showErrorMessage")?s.message.error:s.title,this.getSymbol(s),e)]:s.isSkipped()&&this.getSelfOrParentOption(s,"collapseSkips")?i=[...i,this.formatString(this.addSuffixToMessage(s.message.skip&&this.getSelfOrParentOption(s,"showSkipMessage")?s.message.skip:s.title,"SKIPPED",this.getSelfOrParentOption(s,"suffixSkips")),this.getSymbol(s),e)]:s.isRetrying()&&this.getSelfOrParentOption(s,"suffixRetries")?i=[...i,this.formatString(this.addSuffixToMessage(s.title,`RETRYING-${s.message.retry.count}`),this.getSymbol(s),e)]:s.isCompleted()&&s.hasTitle()&&(this.getSelfOrParentOption(s,"showTimer")||this.hasTimer(s))?i=[...i,this.formatString(`${s==null?void 0:s.title} ${this.getTaskTime(s)}`,this.getSymbol(s),e)]:i=[...i,this.formatString(s.title,this.getSymbol(s),e)]),(!s.hasSubtasks()||!this.getSelfOrParentOption(s,"showSubtasks"))&&(s.hasFailed()&&this.getSelfOrParentOption(s,"collapseErrors")===!1&&(this.getSelfOrParentOption(s,"showErrorMessage")||!this.getSelfOrParentOption(s,"showSubtasks"))?i=[...i,this.dumpData(s,e,"error")]:s.isSkipped()&&this.getSelfOrParentOption(s,"collapseSkips")===!1&&(this.getSelfOrParentOption(s,"showSkipMessage")||!this.getSelfOrParentOption(s,"showSubtasks"))&&(i=[...i,this.dumpData(s,e,"skip")])),s==null?void 0:s.output)if((s.isPending()||s.isRetrying()||s.isRollingBack())&&s.isPrompt())this.promptBar=s.output;else if(this.isBottomBar(s)||!s.hasTitle()){const a=[this.dumpData(s,-1)];if(!this.bottomBar[s.id]){this.bottomBar[s.id]={},this.bottomBar[s.id].data=[];const o=this.getTaskOptions(s).bottomBar;typeof o=="boolean"?this.bottomBar[s.id].items=1:this.bottomBar[s.id].items=o}!((n=(r=this.bottomBar[s.id])==null?void 0:r.data)==null?void 0:n.some(o=>a.includes(o)))&&!s.isSkipped()&&(this.bottomBar[s.id].data=[...this.bottomBar[s.id].data,...a])}else(s.isPending()||s.isRetrying()||s.isRollingBack()||this.hasPersistentOutput(s))&&(i=[...i,this.dumpData(s,e)]);if(this.getSelfOrParentOption(s,"showSubtasks")!==!1&&s.hasSubtasks()&&(s.isPending()||s.hasFailed()||s.isCompleted()&&!s.hasTitle()||s.isCompleted()&&this.getSelfOrParentOption(s,"collapse")===!1&&!s.subtasks.some(a=>a.rendererOptions.collapse===!0)||s.subtasks.some(a=>a.rendererOptions.collapse===!1)||s.subtasks.some(a=>a.hasFailed())||s.subtasks.some(a=>a.hasRolledBack()))){const a=s.hasTitle()?e+1:e,o=this.multiLineRenderer(s.subtasks,a);(o==null?void 0:o.trim())!==""&&!s.subtasks.every(u=>!u.hasTitle())&&(i=[...i,o])}(s.isCompleted()||s.hasFailed()||s.isSkipped()||s.hasRolledBack())&&(this.promptBar=null,this.hasPersistentOutput(s)||delete this.bottomBar[s.id])}if(i=i.filter(Boolean),i.length>0)return i.join(ft)}renderBottomBar(){if(Object.keys(this.bottomBar).length>0)return this.bottomBar=Object.keys(this.bottomBar).reduce((t,e)=>((t==null?void 0:t[e])||(t[e]={}),t[e]=this.bottomBar[e],this.bottomBar[e].data=this.bottomBar[e].data.slice(-this.bottomBar[e].items),t[e].data=this.bottomBar[e].data,t),{}),Object.values(this.bottomBar).reduce((t,e)=>t=[...t,...e.data],[]).filter(Boolean).join(ft)}renderPrompt(){if(this.promptBar)return this.promptBar}dumpData(t,e,r="output"){let n;switch(r){case"output":n=t.output;break;case"skip":n=t.message.skip;break;case"error":n=t.message.error;break}if(!(t.hasTitle()&&r==="error"&&n===t.title)&&typeof n=="string")return this.formatString(n,this.getSymbol(t,!0),e+1)}formatString(t,e,r){if(t.trim()==="")return;t=`${e} ${t}`;let n,i=process.stdout.columns?process.stdout.columns:80;switch(i=i-r*this.options.indentation-2,this.options.formatOutput){case"truncate":n=t.split(ft).map((s,a)=>Lv(this.indentMultilineOutput(s,a),i));break;case"wrap":n=nc(t,i,{hard:!0}).split(ft).map((s,a)=>this.indentMultilineOutput(s,a));break;default:throw new Error("Format option for the renderer is wrong.")}return this.options.removeEmptyLines&&(n=n.filter(Boolean)),bc(n.join(ft),r*this.options.indentation)}indentMultilineOutput(t,e){return e>0?bc(t.trim(),2):t.trim()}getSymbol(t,e=!1){var r,n,i;return t.isPending()&&!e?((r=this.options)==null?void 0:r.lazy)||this.getSelfOrParentOption(t,"showSubtasks")!==!1&&t.hasSubtasks()&&!t.subtasks.every(s=>!s.hasTitle())?ee.yellow(ae.pointer):ee.yellowBright(this.spinner[this.spinnerPosition]):t.isCompleted()&&!e?t.hasSubtasks()&&t.subtasks.some(s=>s.hasFailed())?ee.yellow(ae.warning):ee.green(ae.tick):t.isRetrying()&&!e?((n=this.options)==null?void 0:n.lazy)?ee.yellow(ae.warning):ee.yellow(this.spinner[this.spinnerPosition]):t.isRollingBack()&&!e?((i=this.options)==null?void 0:i.lazy)?ee.red(ae.warning):ee.red(this.spinner[this.spinnerPosition]):t.hasRolledBack()&&!e?ee.red(ae.arrowLeft):t.hasFailed()&&!e?t.hasSubtasks()?ee.red(ae.pointer):ee.red(ae.cross):t.isSkipped()&&!e&&this.getSelfOrParentOption(t,"collapseSkips")===!1?ee.yellow(ae.warning):t.isSkipped()&&(e||this.getSelfOrParentOption(t,"collapseSkips"))?ee.yellow(ae.arrowDown):e?ae.pointerSmall:ee.dim(ae.squareSmallFilled)}addSuffixToMessage(t,e,r){return r??!0?t+ee.dim(` [${e}]`):t}},ra=ta;ra.nonTTY=!1,ra.rendererOptions={indentation:2,clearOutput:!1,showSubtasks:!0,collapse:!0,collapseSkips:!0,showSkipMessage:!0,suffixSkips:!0,collapseErrors:!0,showErrorMessage:!0,suffixRetries:!0,lazy:!1,showTimer:!1,removeEmptyLines:!0,formatOutput:"truncate"};var wc=class{constructor(t,e){this.tasks=t,this.options=e}render(){}end(){}};wc.nonTTY=!0;var nr=class{constructor(t,e){this.tasks=t,this.options=e,this.eventTypeRendererMap={SUBTASK:r=>{r.hasTitle()&&this.log(`${ee.blue(ae.pointer)} ${r.title}`),r.hasSubtasks()&&this.render(r.subtasks)},STATE:r=>{r.isCompleted()&&r.hasTitle()&&this.log(`${ee.green(ae.tick)} ${r.title}`)},DATA:(r,n)=>{r.isPrompt()&&!String(n.data).match(/^\n$/)?i0(`${n.data}`):this.log(`${ae.pointerSmall} ${n.data}`)},MESSAGE:(r,n)=>{if(n.data.error){const i=nr.formatTitle(r);this.log(`${ee.red(ae.cross)}${i}: ${n.data.error}`)}else if(n.data.skip){const i=nr.formatTitle(r),s=r.title!==n.data.skip?`: ${n.data.skip}`:"";this.log(`${ee.yellow(ae.arrowDown)}${i} [${ee.yellow(`skipped${s}`)}]`)}else if(n.data.rollback){const i=nr.formatTitle(r);this.log(`${ee.red(ae.arrowLeft)}${i}: ${n.data.rollback}`)}else if(n.data.retry){const i=nr.formatTitle(r);this.log(`[${ee.yellow(`${n.data.retry.count}`)}]${i}`)}}},this.options=Ee(Ee({},nr.rendererOptions),e)}static now(){return new Date}static formatTitle(t){return(t==null?void 0:t.title)?` ${t.title}`:""}log(t){const e=i=>{process[this.options.output].write(i.endsWith(ft)?i:`${i}${ft}`)};if(!this.options.prefixWithTimestamp){e(`${t}`);return}const r=nr.now(),n=String(r.getHours()).padStart(2,"0")+":"+String(r.getMinutes()).padStart(2,"0")+":"+String(r.getSeconds()).padStart(2,"0");e(`${ee.dim(`[${n}]`)} ${t}`)}end(){}render(t){(t==null?void 0:t.length)?t.forEach(e=>{e.subscribe(r=>{var n,i;(i=(n=this.eventTypeRendererMap)[r.type])==null||i.call(n,e,r)},this.log)}):this.render(this.tasks)}},na=nr;na.nonTTY=!0,na.rendererOptions={prefixWithTimestamp:!1,output:"stdout"};var x0=class{constructor(t){this.options=t}fail(t){t=this.parseMessage("FAILED",t),console.error(t)}skip(t){t=this.parseMessage("SKIPPED",t),console.info(t)}success(t){t=this.parseMessage("SUCCESS",t),console.log(t)}data(t){t=this.parseMessage("DATA",t),console.info(t)}start(t){t=this.parseMessage("STARTED",t),console.log(t)}title(t){t=this.parseMessage("TITLE",t),console.info(t)}retry(t){t=this.parseMessage("RETRY",t),console.warn(t)}rollback(t){t=this.parseMessage("ROLLBACK",t),console.warn(t)}parseMessage(t,e){let r;try{r=e.split(`
|
|
63
63
|
`)}catch{r=[e]}return r=r.map(n=>this.logColoring({level:t,message:n})),e=r.join(`
|
|
64
|
-
`),e}logColoring({level:t,message:e}){var r,n,i,s,a,o,u,l;let h,f=c=>c;switch(t){case"FAILED":((r=this.options)==null?void 0:r.useIcons)?(f=ee.red,h=ae.cross):h=this.wrapInBrackets(t);break;case"SKIPPED":((n=this.options)==null?void 0:n.useIcons)?(f=ee.yellow,h=ae.arrowDown):h=this.wrapInBrackets(t);break;case"SUCCESS":((i=this.options)==null?void 0:i.useIcons)?(f=ee.green,h=ae.tick):h=this.wrapInBrackets(t);break;case"DATA":((s=this.options)==null?void 0:s.useIcons)?h=ae.arrowRight:h=this.wrapInBrackets(t);break;case"STARTED":((a=this.options)==null?void 0:a.useIcons)?h=ae.pointer:h=this.wrapInBrackets(t);break;case"TITLE":((o=this.options)==null?void 0:o.useIcons)?h=ae.checkboxOn:h=this.wrapInBrackets(t);break;case"RETRY":((u=this.options)==null?void 0:u.useIcons)?(f=ee.yellow,h=ae.pointer):h=this.wrapInBrackets(t);break;case"ROLLBACK":((l=this.options)==null?void 0:l.useIcons)?(f=ee.red,h=ae.arrowLeft):h=this.wrapInBrackets(t);break}return f(`${h} ${e}`)}wrapInBrackets(t){return`[${t}]`}},fc=class{constructor(t,e){this.tasks=t,this.options=e;var r,n,i,s;((r=this.options)==null?void 0:r.logger)&&((n=this.options)==null?void 0:n.options)?this.logger=new this.options.logger(this.options.options):((i=this.options)==null?void 0:i.logger)?this.logger=new this.options.logger:this.logger=new m0({useIcons:(s=this.options)==null?void 0:s.useIcons}),this.options=Ee(Ee({},fc.rendererOptions),this.options)}render(){this.verboseRenderer(this.tasks)}end(){}verboseRenderer(t){return t==null?void 0:t.forEach(e=>{e.subscribe(r=>{var n,i,s,a,o,u,l,h;if(e.isEnabled()){const f=e.hasTitle()?e.title:"Task without title.";r.type==="SUBTASK"&&e.hasSubtasks()?this.verboseRenderer(e.subtasks):r.type==="STATE"?(((n=this.options)==null?void 0:n.logEmptyTitle)!==!1||e.hasTitle())&&(e.isPending()?this.logger.start(f):e.isCompleted()&&this.logger.success(f+(((i=this.options)==null?void 0:i.showTimer)&&((s=e.message)==null?void 0:s.duration)?` [${cc(e.message.duration)}]`:""))):r.type==="DATA"&&!!r.data?this.logger.data(String(r.data)):r.type==="TITLE"?((a=this.options)==null?void 0:a.logTitleChange)!==!1&&this.logger.title(String(r.data)):r.type==="MESSAGE"&&(((o=r.data)==null?void 0:o.error)?this.logger.fail(String(r.data.error)):((u=r.data)==null?void 0:u.skip)?this.logger.skip(String(r.data.skip)):((l=r.data)==null?void 0:l.rollback)?this.logger.rollback(String(r.data.rollback)):((h=r.data)==null?void 0:h.retry)&&this.logger.retry(`[${r.data.retry.count}] `+String(f)))}},r=>{this.logger.fail(r)})})}},Zs=fc;Zs.nonTTY=!0,Zs.rendererOptions={useIcons:!1,logEmptyTitle:!0,logTitleChange:!0};var ea={default:Qs,simple:Js,verbose:Zs,silent:hc};function g0(t){return process.stdout.isTTY===!0||t.nonTTY===!0}function ta(t){return typeof t=="string"?ea[t]||ea.default:typeof t=="function"?t:ea.default}function dc(t,e,r,n){let i,s=ta(t);i={renderer:s,nonTTY:!1};const a=tn(n),o=tn(r);return a?(s=ta("silent"),i={renderer:s,nonTTY:!0}):(!g0(s)||o)&&(s=ta(e),i={renderer:s,nonTTY:!0}),i}function y0(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16||0;return(t==="x"?e:e&&3||8).toString(16)})}var v0=class extends Ms{constructor(t,e,r,n){super();this.listr=t,this.tasks=e,this.options=r,this.rendererOptions=n,this.message={};var i,s,a,o,u,l;this.id=y0(),this.title=(i=this.tasks)==null?void 0:i.title,this.initialTitle=(s=this.tasks)==null?void 0:s.title,this.task=this.tasks.task,this.skip=(o=(a=this.tasks)==null?void 0:a.skip)!=null?o:!1,this.enabledFn=(l=(u=this.tasks)==null?void 0:u.enabled)!=null?l:!0,this.rendererTaskOptions=this.tasks.options,this.renderHook$=this.listr.renderHook$,this.subscribe(()=>{this.renderHook$.next()})}set state$(t){if(this.state=t,this.next({type:"STATE",data:t}),this.hasSubtasks()&&this.hasFailed())for(const e of this.subtasks)e.state==="PENDING"&&(e.state$="FAILED")}set output$(t){this.output=t,this.next({type:"DATA",data:t})}set message$(t){this.message=Ee(Ee({},this.message),t),this.next({type:"MESSAGE",data:t})}set title$(t){this.title=t,this.next({type:"TITLE",data:t})}async check(t){this.state===void 0&&(this.enabled=await tn(this.enabledFn,t),this.next({type:"ENABLED",data:this.enabled}))}hasSubtasks(){var t;return((t=this.subtasks)==null?void 0:t.length)>0}isPending(){return this.state==="PENDING"}isSkipped(){return this.state==="SKIPPED"}isCompleted(){return this.state==="COMPLETED"}hasFailed(){return this.state==="FAILED"}isRollingBack(){return this.state==="ROLLING_BACK"}hasRolledBack(){return this.state==="ROLLED_BACK"}isRetrying(){return this.state==="RETRY"}isEnabled(){return this.enabled}hasTitle(){return typeof(this==null?void 0:this.title)=="string"}isPrompt(){return!!this.prompt}async run(t,e){var r,n,i,s,a;const o=h=>(h instanceof ra?(h.options=Ee(Ee({},this.options),h.options),h.rendererClass=dc("silent").renderer,h.renderHook$.subscribe(()=>{this.renderHook$.next()}),this.subtasks=h.tasks,h.err=this.listr.err,this.next({type:"SUBTASK"}),h=h.run(t)):this.isPrompt()||(h instanceof Promise?h=h.then(o):h instanceof sm?h=new Promise((f,c)=>{h.on("data",m=>{this.output$=m.toString()}),h.on("error",m=>c(m)),h.on("end",()=>f(null))}):h instanceof Ns&&(h=new Promise((f,c)=>{h.subscribe({next:m=>{this.output$=m},error:c,complete:f})}))),h),u=Date.now();this.state$="PENDING";const l=await tn(this.skip,t);if(l){typeof l=="string"?this.message$={skip:l}:this.hasTitle()?this.message$={skip:this.title}:this.message$={skip:"Skipped task without a title."},this.state$="SKIPPED";return}try{const h=((r=this.tasks)==null?void 0:r.retry)&&((n=this.tasks)==null?void 0:n.retry)>0?this.tasks.retry+1:1;for(let f=1;f<=h;f++)try{await o(this.task(t,e));break}catch(c){if(f!==h)this.retry={count:f,withError:c},this.message$={retry:this.retry},this.title$=this.initialTitle,this.output=void 0,e.report(c,"WILL_RETRY"),this.state$="RETRY";else throw c}(this.isPending()||this.isRetrying())&&(this.message$={duration:Date.now()-u},this.state$="COMPLETED")}catch(h){if(this.prompt instanceof en&&(h=new Error(this.prompt.message)),(i=this.tasks)==null?void 0:i.rollback){e.report(h,"WILL_ROLLBACK");try{this.state$="ROLLING_BACK",await this.tasks.rollback(t,e),this.state$="ROLLED_BACK",this.message$={rollback:this.title}}catch(f){throw this.state$="FAILED",e.report(f,"HAS_FAILED_TO_ROLLBACK"),f}if(((s=this.listr.options)==null?void 0:s.exitAfterRollback)!==!1)throw new Error(this.title)}else{if(this.state$="FAILED",this.listr.options.exitOnError!==!1&&await tn((a=this.tasks)==null?void 0:a.exitOnError,t)!==!1)throw e.report(h,"HAS_FAILED"),h;this.hasSubtasks()||e.report(h,"HAS_FAILED_WITHOUT_ERROR")}}finally{this.complete()}}},b0="(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+",D0=/\u0007/;function w0(t){const e="Cancelled prompt.";if(this instanceof ni)this.task.prompt=new en(e);else{if((t==null?void 0:t.error)!==!1)throw new Error(e);return e}}async function E0(t,e){let r;(e==null?void 0:e.cancelCallback)?r=e.cancelCallback:r=w0,Array.isArray(t)?t.length===1&&(t=t.reduce((s,a)=>[...s,Object.assign(a,{name:"default"})],[])):t=[ic(Ee({},t),{name:"default"})],t=t.reduce((s,a)=>{var o;return[...s,Object.assign(a,{stdout:this instanceof ni?(o=e==null?void 0:e.stdout)!=null?o:this.stdout():process.stdout,onCancel:r.bind(this,e)})]},[]);let n;if(e==null?void 0:e.enquirer)n=e.enquirer;else try{n=new(await Promise.resolve().then(()=>h0(l0("enquirer"),1))).default}catch(s){throw this.task.prompt=new en("Enquirer is a peer dependency that must be installed separately."),new Error(s)}this instanceof ni&&(n.on("prompt",s=>this.task.prompt=s),n.on("submit",()=>this.task.prompt=void 0),this.task.subscribe(s=>{s.type==="STATE"&&s.data==="SKIPPED"&&this.task.prompt&&!(this.task.prompt instanceof en)&&this.task.prompt.submit()}));const i=await n.prompt(t);return t.length===1?i.default:i}function _0(t=!1){!this.task.prompt||this.task.prompt instanceof en||(t?this.task.prompt.cancel():this.task.prompt.submit())}var ni=class{constructor(t,e,r){this.task=t,this.errors=e,this.options=r}get title(){return this.task.title}set title(t){this.task.title$=t}get output(){return this.task.output}set output(t){this.task.output$=t}newListr(t,e){let r;return typeof t=="function"?r=t(this):r=t,new ra(r,e,this.task)}report(t,e){var r,n,i;this.task.options.collectErrors!==!1&&this.errors.push(new d0(t,e,this.task)),this.task.message$={error:(i=(n=t.message)!=null?n:(r=this.task)==null?void 0:r.title)!=null?i:"Task with no title."}}skip(t){var e,r;this.task.state$="SKIPPED",t&&(this.task.message$={skip:(r=t??((e=this.task)==null?void 0:e.title))!=null?r:"Task with no title."})}isRetrying(){return this.task.isRetrying()?this.task.retry:{count:0}}async prompt(t){var e;return E0.bind(this)(t,Ee({},(e=this.options)==null?void 0:e.injectWrapper))}cancelPrompt(t=!1){return _0.bind(this)(t)}stdout(){return e0(t=>{t=t.toString(),t=t.replace(new RegExp(b0,"gmi"),""),t=t.replace(new RegExp(D0,"gmi"),""),t!==""&&(this.output=t)})}run(t){return this.task.run(t,this)}},ra=class{constructor(t,e,r){this.task=t,this.options=e,this.parentTask=r,this.tasks=[],this.err=[],this.renderHook$=new Ms,this.path=[];var n,i,s;this.options=Ee(Ee({},{concurrent:!1,renderer:"default",nonTTYRenderer:"verbose",exitOnError:!0,exitAfterRollback:!0,collectErrors:"minimal",registerSignalListeners:!0}),e),this.options.concurrent===!0?this.concurrency=1/0:typeof this.options.concurrent=="number"?this.concurrency=this.options.concurrent:this.concurrency=1;const a=dc(this.options.renderer,this.options.nonTTYRenderer,(n=this.options)==null?void 0:n.rendererFallback,(i=this.options)==null?void 0:i.rendererSilent);this.rendererClass=a.renderer,a.nonTTY?this.rendererClassOptions=this.options.nonTTYRendererOptions:this.rendererClassOptions=this.options.rendererOptions,this.add(t??[]),r&&(this.path=[...r.listr.path,r.title]),this.options.registerSignalListeners&&process.once("SIGINT",()=>{this.tasks.forEach(async o=>{o.isPending()&&(o.state$="FAILED")}),this.renderer.end(new Error("Interrupted.")),process.exit(127)}).setMaxListeners(0),((s=this.options)==null?void 0:s.disableColor)&&(process.env.LISTR_DISABLE_COLOR="1")}add(t){(Array.isArray(t)?t:[t]).forEach(r=>{this.tasks.push(new v0(this,r,this.options,Ee(Ee({},this.rendererClassOptions),r.options)))})}async run(t){var e,r,n;this.renderer||(this.renderer=new this.rendererClass(this.tasks,this.rendererClassOptions,this.renderHook$)),this.renderer.render(),this.ctx=(n=(r=(e=this.options)==null?void 0:e.ctx)!=null?r:t)!=null?n:{},await this.checkAll(this.ctx);try{await Uy(this.tasks,async i=>(await i.check(this.ctx),this.runTask(i,this.ctx,this.err)),{concurrency:this.concurrency}),this.renderer.end()}catch(i){if(this.options.exitOnError!==!1)throw this.renderer.end(i),i}return this.ctx}checkAll(t){return Promise.all(this.tasks.map(e=>e.check(t)))}runTask(t,e,r){return t.isEnabled()?new ni(t,r,this.options).run(e):Promise.resolve()}};const S0=t=>xy.prompt(t),C0=t=>new ra(t).run();class A0 extends Error{constructor(e,r=null){super(e);this.tryMessage=r}}class pc extends A0{}var Sr={exports:{}},R0=yc;yc.sync=T0;var mc=Qe;function x0(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function gc(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:x0(e,r)}function yc(t,e,r){mc.stat(t,function(n,i){r(n,n?!1:gc(i,t,e))})}function T0(t,e){return gc(mc.statSync(t),t,e)}var $0=bc;bc.sync=O0;var vc=Qe;function bc(t,e,r){vc.stat(t,function(n,i){r(n,n?!1:Dc(i,e))})}function O0(t,e){return Dc(vc.statSync(t),e)}function Dc(t,e){return t.isFile()&&F0(t,e)}function F0(t,e){var r=t.mode,n=t.uid,i=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),a=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),o=parseInt("100",8),u=parseInt("010",8),l=parseInt("001",8),h=o|u,f=r&l||r&u&&i===a||r&o&&n===s||r&h&&s===0;return f}var ii;process.platform==="win32"||le.TESTING_WINDOWS?ii=R0:ii=$0;var P0=na;na.sync=k0;function na(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){na(t,e||{},function(s,a){s?i(s):n(a)})})}ii(t,e||{},function(n,i){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,i=!1),r(n,i)})}function k0(t,e){try{return ii.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}var I0=Cc;Cc.sync=B0;var ia=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",wc=we,L0=ia?";":":",Ec=P0;function _c(t){var e=new Error("not found: "+t);return e.code="ENOENT",e}function Sc(t,e){var r=e.colon||L0,n=e.path||process.env.PATH||"",i=[""];n=n.split(r);var s="";return ia&&(n.unshift(process.cwd()),s=e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM",i=s.split(r),t.indexOf(".")!==-1&&i[0]!==""&&i.unshift("")),(t.match(/\//)||ia&&t.match(/\\/))&&(n=[""]),{env:n,ext:i,extExe:s}}function Cc(t,e,r){typeof e=="function"&&(r=e,e={});var n=Sc(t,e),i=n.env,s=n.ext,a=n.extExe,o=[];(function u(l,h){if(l===h)return e.all&&o.length?r(null,o):r(_c(t));var f=i[l];f.charAt(0)==='"'&&f.slice(-1)==='"'&&(f=f.slice(1,-1));var c=wc.join(f,t);!f&&/^\.[\\\/]/.test(t)&&(c=t.slice(0,2)+c),function m(p,y){if(p===y)return u(l+1,h);var b=s[p];Ec(c+b,{pathExt:a},function(D,_){if(!D&&_)if(e.all)o.push(c+b);else return r(null,c+b);return m(p+1,y)})}(0,s.length)})(0,i.length)}function B0(t,e){e=e||{};for(var r=Sc(t,e),n=r.env,i=r.ext,s=r.extExe,a=[],o=0,u=n.length;o<u;o++){var l=n[o];l.charAt(0)==='"'&&l.slice(-1)==='"'&&(l=l.slice(1,-1));var h=wc.join(l,t);!l&&/^\.[\\\/]/.test(t)&&(h=t.slice(0,2)+h);for(var f=0,c=i.length;f<c;f++){var m=h+i[f],p;try{if(p=Ec.sync(m,{pathExt:s}),p)if(e.all)a.push(m);else return m}catch{}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw _c(t)}function sa(t={}){const{env:e=process.env,platform:r=process.platform}=t;return r!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}var N0=Object.freeze({__proto__:null,default:sa}),M0=bm(N0);const Ac=we,j0=I0,H0=M0;function Rc(t,e){const r=t.options.env||process.env,n=process.cwd(),i=t.options.cwd!=null,s=i&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let a;try{a=j0.sync(t.command,{path:r[H0({env:r})],pathExt:e?Ac.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return a&&(a=Ac.resolve(i?t.options.cwd:"",a)),a}function U0(t){return Rc(t)||Rc(t,!0)}var q0=U0,aa={};const oa=/([()\][%!^"`<>&|;, *?])/g;function G0(t){return t=t.replace(oa,"^$1"),t}function z0(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(oa,"^$1"),e&&(t=t.replace(oa,"^$1")),t}aa.command=G0,aa.argument=z0;var V0=/^#!.*/,W0=V0,K0=function(t){var e=t.match(W0);if(!e)return null;var r=e[0].replace(/#! ?/,"").split(" "),n=r[0].split("/").pop(),i=r[1];return n==="env"?i:n+(i?" "+i:"")};const ua=Qe,Y0=K0;function X0(t){const e=150,r=Buffer.alloc(e);let n;try{n=ua.openSync(t,"r"),ua.readSync(n,r,0,e,0),ua.closeSync(n)}catch{}return Y0(r.toString())}var Q0=X0;const J0=we,xc=q0,Tc=aa,Z0=Q0,eb=process.platform==="win32",tb=/\.(?:com|exe)$/i,rb=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function nb(t){t.file=xc(t);const e=t.file&&Z0(t.file);return e?(t.args.unshift(t.file),t.command=e,xc(t)):t.file}function ib(t){if(!eb)return t;const e=nb(t),r=!tb.test(e);if(t.options.forceShell||r){const n=rb.test(e);t.command=J0.normalize(t.command),t.command=Tc.command(t.command),t.args=t.args.map(s=>Tc.argument(s,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function sb(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);const n={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?n:ib(n)}var ab=sb;const la=process.platform==="win32";function ca(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function ob(t,e){if(!la)return;const r=t.emit;t.emit=function(n,i){if(n==="exit"){const s=$c(i,e);if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function $c(t,e){return la&&t===1&&!e.file?ca(e.original,"spawn"):null}function ub(t,e){return la&&t===1&&!e.file?ca(e.original,"spawnSync"):null}var lb={hookChildProcess:ob,verifyENOENT:$c,verifyENOENTSync:ub,notFoundError:ca};const Oc=um,ha=ab,fa=lb;function Fc(t,e,r){const n=ha(t,e,r),i=Oc.spawn(n.command,n.args,n.options);return fa.hookChildProcess(i,n),i}function cb(t,e,r){const n=ha(t,e,r),i=Oc.spawnSync(n.command,n.args,n.options);return i.error=i.error||fa.verifyENOENTSync(i.status,n),i}Sr.exports=Fc,Sr.exports.spawn=Fc,Sr.exports.sync=cb,Sr.exports._parse=ha,Sr.exports._enoent=fa;var hb=Sr.exports;function fb(t){const e=typeof t=="string"?`
|
|
64
|
+
`),e}logColoring({level:t,message:e}){var r,n,i,s,a,o,u,l;let h,f=c=>c;switch(t){case"FAILED":((r=this.options)==null?void 0:r.useIcons)?(f=ee.red,h=ae.cross):h=this.wrapInBrackets(t);break;case"SKIPPED":((n=this.options)==null?void 0:n.useIcons)?(f=ee.yellow,h=ae.arrowDown):h=this.wrapInBrackets(t);break;case"SUCCESS":((i=this.options)==null?void 0:i.useIcons)?(f=ee.green,h=ae.tick):h=this.wrapInBrackets(t);break;case"DATA":((s=this.options)==null?void 0:s.useIcons)?h=ae.arrowRight:h=this.wrapInBrackets(t);break;case"STARTED":((a=this.options)==null?void 0:a.useIcons)?h=ae.pointer:h=this.wrapInBrackets(t);break;case"TITLE":((o=this.options)==null?void 0:o.useIcons)?h=ae.checkboxOn:h=this.wrapInBrackets(t);break;case"RETRY":((u=this.options)==null?void 0:u.useIcons)?(f=ee.yellow,h=ae.pointer):h=this.wrapInBrackets(t);break;case"ROLLBACK":((l=this.options)==null?void 0:l.useIcons)?(f=ee.red,h=ae.arrowLeft):h=this.wrapInBrackets(t);break}return f(`${h} ${e}`)}wrapInBrackets(t){return`[${t}]`}},Ec=class{constructor(t,e){this.tasks=t,this.options=e;var r,n,i,s;((r=this.options)==null?void 0:r.logger)&&((n=this.options)==null?void 0:n.options)?this.logger=new this.options.logger(this.options.options):((i=this.options)==null?void 0:i.logger)?this.logger=new this.options.logger:this.logger=new x0({useIcons:(s=this.options)==null?void 0:s.useIcons}),this.options=Ee(Ee({},Ec.rendererOptions),this.options)}render(){this.verboseRenderer(this.tasks)}end(){}verboseRenderer(t){return t==null?void 0:t.forEach(e=>{e.subscribe(r=>{var n,i,s,a,o,u,l,h;if(e.isEnabled()){const f=e.hasTitle()?e.title:"Task without title.";r.type==="SUBTASK"&&e.hasSubtasks()?this.verboseRenderer(e.subtasks):r.type==="STATE"?(((n=this.options)==null?void 0:n.logEmptyTitle)!==!1||e.hasTitle())&&(e.isPending()?this.logger.start(f):e.isCompleted()&&this.logger.success(f+(((i=this.options)==null?void 0:i.showTimer)&&((s=e.message)==null?void 0:s.duration)?` [${Dc(e.message.duration)}]`:""))):r.type==="DATA"&&!!r.data?this.logger.data(String(r.data)):r.type==="TITLE"?((a=this.options)==null?void 0:a.logTitleChange)!==!1&&this.logger.title(String(r.data)):r.type==="MESSAGE"&&(((o=r.data)==null?void 0:o.error)?this.logger.fail(String(r.data.error)):((u=r.data)==null?void 0:u.skip)?this.logger.skip(String(r.data.skip)):((l=r.data)==null?void 0:l.rollback)?this.logger.rollback(String(r.data.rollback)):((h=r.data)==null?void 0:h.retry)&&this.logger.retry(`[${r.data.retry.count}] `+String(f)))}},r=>{this.logger.fail(r)})})}},ia=Ec;ia.nonTTY=!0,ia.rendererOptions={useIcons:!1,logEmptyTitle:!0,logTitleChange:!0};var sa={default:ra,simple:na,verbose:ia,silent:wc};function $0(t){return process.stdout.isTTY===!0||t.nonTTY===!0}function aa(t){return typeof t=="string"?sa[t]||sa.default:typeof t=="function"?t:sa.default}function _c(t,e,r,n){let i,s=aa(t);i={renderer:s,nonTTY:!1};const a=on(n),o=on(r);return a?(s=aa("silent"),i={renderer:s,nonTTY:!0}):(!$0(s)||o)&&(s=aa(e),i={renderer:s,nonTTY:!0}),i}function O0(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16||0;return(t==="x"?e:e&&3||8).toString(16)})}var F0=class extends qs{constructor(t,e,r,n){super();this.listr=t,this.tasks=e,this.options=r,this.rendererOptions=n,this.message={};var i,s,a,o,u,l;this.id=O0(),this.title=(i=this.tasks)==null?void 0:i.title,this.initialTitle=(s=this.tasks)==null?void 0:s.title,this.task=this.tasks.task,this.skip=(o=(a=this.tasks)==null?void 0:a.skip)!=null?o:!1,this.enabledFn=(l=(u=this.tasks)==null?void 0:u.enabled)!=null?l:!0,this.rendererTaskOptions=this.tasks.options,this.renderHook$=this.listr.renderHook$,this.subscribe(()=>{this.renderHook$.next()})}set state$(t){if(this.state=t,this.next({type:"STATE",data:t}),this.hasSubtasks()&&this.hasFailed())for(const e of this.subtasks)e.state==="PENDING"&&(e.state$="FAILED")}set output$(t){this.output=t,this.next({type:"DATA",data:t})}set message$(t){this.message=Ee(Ee({},this.message),t),this.next({type:"MESSAGE",data:t})}set title$(t){this.title=t,this.next({type:"TITLE",data:t})}async check(t){this.state===void 0&&(this.enabled=await on(this.enabledFn,t),this.next({type:"ENABLED",data:this.enabled}))}hasSubtasks(){var t;return((t=this.subtasks)==null?void 0:t.length)>0}isPending(){return this.state==="PENDING"}isSkipped(){return this.state==="SKIPPED"}isCompleted(){return this.state==="COMPLETED"}hasFailed(){return this.state==="FAILED"}isRollingBack(){return this.state==="ROLLING_BACK"}hasRolledBack(){return this.state==="ROLLED_BACK"}isRetrying(){return this.state==="RETRY"}isEnabled(){return this.enabled}hasTitle(){return typeof(this==null?void 0:this.title)=="string"}isPrompt(){return!!this.prompt}async run(t,e){var r,n,i,s,a;const o=h=>(h instanceof oa?(h.options=Ee(Ee({},this.options),h.options),h.rendererClass=_c("silent").renderer,h.renderHook$.subscribe(()=>{this.renderHook$.next()}),this.subtasks=h.tasks,h.err=this.listr.err,this.next({type:"SUBTASK"}),h=h.run(t)):this.isPrompt()||(h instanceof Promise?h=h.then(o):h instanceof bm?h=new Promise((f,c)=>{h.on("data",m=>{this.output$=m.toString()}),h.on("error",m=>c(m)),h.on("end",()=>f(null))}):h instanceof Us&&(h=new Promise((f,c)=>{h.subscribe({next:m=>{this.output$=m},error:c,complete:f})}))),h),u=Date.now();this.state$="PENDING";const l=await on(this.skip,t);if(l){typeof l=="string"?this.message$={skip:l}:this.hasTitle()?this.message$={skip:this.title}:this.message$={skip:"Skipped task without a title."},this.state$="SKIPPED";return}try{const h=((r=this.tasks)==null?void 0:r.retry)&&((n=this.tasks)==null?void 0:n.retry)>0?this.tasks.retry+1:1;for(let f=1;f<=h;f++)try{await o(this.task(t,e));break}catch(c){if(f!==h)this.retry={count:f,withError:c},this.message$={retry:this.retry},this.title$=this.initialTitle,this.output=void 0,e.report(c,"WILL_RETRY"),this.state$="RETRY";else throw c}(this.isPending()||this.isRetrying())&&(this.message$={duration:Date.now()-u},this.state$="COMPLETED")}catch(h){if(this.prompt instanceof an&&(h=new Error(this.prompt.message)),(i=this.tasks)==null?void 0:i.rollback){e.report(h,"WILL_ROLLBACK");try{this.state$="ROLLING_BACK",await this.tasks.rollback(t,e),this.state$="ROLLED_BACK",this.message$={rollback:this.title}}catch(f){throw this.state$="FAILED",e.report(f,"HAS_FAILED_TO_ROLLBACK"),f}if(((s=this.listr.options)==null?void 0:s.exitAfterRollback)!==!1)throw new Error(this.title)}else{if(this.state$="FAILED",this.listr.options.exitOnError!==!1&&await on((a=this.tasks)==null?void 0:a.exitOnError,t)!==!1)throw e.report(h,"HAS_FAILED"),h;this.hasSubtasks()||e.report(h,"HAS_FAILED_WITHOUT_ERROR")}}finally{this.complete()}}},P0="(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+",k0=/\u0007/;function I0(t){const e="Cancelled prompt.";if(this instanceof ui)this.task.prompt=new an(e);else{if((t==null?void 0:t.error)!==!1)throw new Error(e);return e}}async function L0(t,e){let r;(e==null?void 0:e.cancelCallback)?r=e.cancelCallback:r=I0,Array.isArray(t)?t.length===1&&(t=t.reduce((s,a)=>[...s,Object.assign(a,{name:"default"})],[])):t=[pc(Ee({},t),{name:"default"})],t=t.reduce((s,a)=>{var o;return[...s,Object.assign(a,{stdout:this instanceof ui?(o=e==null?void 0:e.stdout)!=null?o:this.stdout():process.stdout,onCancel:r.bind(this,e)})]},[]);let n;if(e==null?void 0:e.enquirer)n=e.enquirer;else try{n=new(await Promise.resolve().then(()=>C0(_0("enquirer"),1))).default}catch(s){throw this.task.prompt=new an("Enquirer is a peer dependency that must be installed separately."),new Error(s)}this instanceof ui&&(n.on("prompt",s=>this.task.prompt=s),n.on("submit",()=>this.task.prompt=void 0),this.task.subscribe(s=>{s.type==="STATE"&&s.data==="SKIPPED"&&this.task.prompt&&!(this.task.prompt instanceof an)&&this.task.prompt.submit()}));const i=await n.prompt(t);return t.length===1?i.default:i}function B0(t=!1){!this.task.prompt||this.task.prompt instanceof an||(t?this.task.prompt.cancel():this.task.prompt.submit())}var ui=class{constructor(t,e,r){this.task=t,this.errors=e,this.options=r}get title(){return this.task.title}set title(t){this.task.title$=t}get output(){return this.task.output}set output(t){this.task.output$=t}newListr(t,e){let r;return typeof t=="function"?r=t(this):r=t,new oa(r,e,this.task)}report(t,e){var r,n,i;this.task.options.collectErrors!==!1&&this.errors.push(new R0(t,e,this.task)),this.task.message$={error:(i=(n=t.message)!=null?n:(r=this.task)==null?void 0:r.title)!=null?i:"Task with no title."}}skip(t){var e,r;this.task.state$="SKIPPED",t&&(this.task.message$={skip:(r=t??((e=this.task)==null?void 0:e.title))!=null?r:"Task with no title."})}isRetrying(){return this.task.isRetrying()?this.task.retry:{count:0}}async prompt(t){var e;return L0.bind(this)(t,Ee({},(e=this.options)==null?void 0:e.injectWrapper))}cancelPrompt(t=!1){return B0.bind(this)(t)}stdout(){return p0(t=>{t=t.toString(),t=t.replace(new RegExp(P0,"gmi"),""),t=t.replace(new RegExp(k0,"gmi"),""),t!==""&&(this.output=t)})}run(t){return this.task.run(t,this)}},oa=class{constructor(t,e,r){this.task=t,this.options=e,this.parentTask=r,this.tasks=[],this.err=[],this.renderHook$=new qs,this.path=[];var n,i,s;this.options=Ee(Ee({},{concurrent:!1,renderer:"default",nonTTYRenderer:"verbose",exitOnError:!0,exitAfterRollback:!0,collectErrors:"minimal",registerSignalListeners:!0}),e),this.options.concurrent===!0?this.concurrency=1/0:typeof this.options.concurrent=="number"?this.concurrency=this.options.concurrent:this.concurrency=1;const a=_c(this.options.renderer,this.options.nonTTYRenderer,(n=this.options)==null?void 0:n.rendererFallback,(i=this.options)==null?void 0:i.rendererSilent);this.rendererClass=a.renderer,a.nonTTY?this.rendererClassOptions=this.options.nonTTYRendererOptions:this.rendererClassOptions=this.options.rendererOptions,this.add(t??[]),r&&(this.path=[...r.listr.path,r.title]),this.options.registerSignalListeners&&process.once("SIGINT",()=>{this.tasks.forEach(async o=>{o.isPending()&&(o.state$="FAILED")}),this.renderer.end(new Error("Interrupted.")),process.exit(127)}).setMaxListeners(0),((s=this.options)==null?void 0:s.disableColor)&&(process.env.LISTR_DISABLE_COLOR="1")}add(t){(Array.isArray(t)?t:[t]).forEach(r=>{this.tasks.push(new F0(this,r,this.options,Ee(Ee({},this.rendererClassOptions),r.options)))})}async run(t){var e,r,n;this.renderer||(this.renderer=new this.rendererClass(this.tasks,this.rendererClassOptions,this.renderHook$)),this.renderer.render(),this.ctx=(n=(r=(e=this.options)==null?void 0:e.ctx)!=null?r:t)!=null?n:{},await this.checkAll(this.ctx);try{await tv(this.tasks,async i=>(await i.check(this.ctx),this.runTask(i,this.ctx,this.err)),{concurrency:this.concurrency}),this.renderer.end()}catch(i){if(this.options.exitOnError!==!1)throw this.renderer.end(i),i}return this.ctx}checkAll(t){return Promise.all(this.tasks.map(e=>e.check(t)))}runTask(t,e,r){return t.isEnabled()?new ui(t,r,this.options).run(e):Promise.resolve()}};const N0=t=>Hy.prompt(t),M0=t=>new oa(t).run();class j0 extends Error{constructor(e,r=null){super(e);this.tryMessage=r}}class Sc extends j0{}var Rr={exports:{}},H0=Rc;Rc.sync=q0;var Cc=Je;function U0(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function Ac(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:U0(e,r)}function Rc(t,e,r){Cc.stat(t,function(n,i){r(n,n?!1:Ac(i,t,e))})}function q0(t,e){return Ac(Cc.statSync(t),t,e)}var G0=xc;xc.sync=z0;var Tc=Je;function xc(t,e,r){Tc.stat(t,function(n,i){r(n,n?!1:$c(i,e))})}function z0(t,e){return $c(Tc.statSync(t),e)}function $c(t,e){return t.isFile()&&V0(t,e)}function V0(t,e){var r=t.mode,n=t.uid,i=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),a=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),o=parseInt("100",8),u=parseInt("010",8),l=parseInt("001",8),h=o|u,f=r&l||r&u&&i===a||r&o&&n===s||r&h&&s===0;return f}var li;process.platform==="win32"||le.TESTING_WINDOWS?li=H0:li=G0;var W0=ua;ua.sync=Y0;function ua(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){ua(t,e||{},function(s,a){s?i(s):n(a)})})}li(t,e||{},function(n,i){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,i=!1),r(n,i)})}function Y0(t,e){try{return li.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}var K0=Ic;Ic.sync=Q0;var la=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Oc=we,X0=la?";":":",Fc=W0;function Pc(t){var e=new Error("not found: "+t);return e.code="ENOENT",e}function kc(t,e){var r=e.colon||X0,n=e.path||process.env.PATH||"",i=[""];n=n.split(r);var s="";return la&&(n.unshift(process.cwd()),s=e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM",i=s.split(r),t.indexOf(".")!==-1&&i[0]!==""&&i.unshift("")),(t.match(/\//)||la&&t.match(/\\/))&&(n=[""]),{env:n,ext:i,extExe:s}}function Ic(t,e,r){typeof e=="function"&&(r=e,e={});var n=kc(t,e),i=n.env,s=n.ext,a=n.extExe,o=[];(function u(l,h){if(l===h)return e.all&&o.length?r(null,o):r(Pc(t));var f=i[l];f.charAt(0)==='"'&&f.slice(-1)==='"'&&(f=f.slice(1,-1));var c=Oc.join(f,t);!f&&/^\.[\\\/]/.test(t)&&(c=t.slice(0,2)+c),function m(p,y){if(p===y)return u(l+1,h);var b=s[p];Fc(c+b,{pathExt:a},function(D,_){if(!D&&_)if(e.all)o.push(c+b);else return r(null,c+b);return m(p+1,y)})}(0,s.length)})(0,i.length)}function Q0(t,e){e=e||{};for(var r=kc(t,e),n=r.env,i=r.ext,s=r.extExe,a=[],o=0,u=n.length;o<u;o++){var l=n[o];l.charAt(0)==='"'&&l.slice(-1)==='"'&&(l=l.slice(1,-1));var h=Oc.join(l,t);!l&&/^\.[\\\/]/.test(t)&&(h=t.slice(0,2)+h);for(var f=0,c=i.length;f<c;f++){var m=h+i[f],p;try{if(p=Fc.sync(m,{pathExt:s}),p)if(e.all)a.push(m);else return m}catch{}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw Pc(t)}function ca(t={}){const{env:e=process.env,platform:r=process.platform}=t;return r!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}var J0=Object.freeze({__proto__:null,default:ca}),Z0=Fm(J0);const Lc=we,eb=K0,tb=Z0;function Bc(t,e){const r=t.options.env||process.env,n=process.cwd(),i=t.options.cwd!=null,s=i&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let a;try{a=eb.sync(t.command,{path:r[tb({env:r})],pathExt:e?Lc.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return a&&(a=Lc.resolve(i?t.options.cwd:"",a)),a}function rb(t){return Bc(t)||Bc(t,!0)}var nb=rb,ha={};const fa=/([()\][%!^"`<>&|;, *?])/g;function ib(t){return t=t.replace(fa,"^$1"),t}function sb(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(fa,"^$1"),e&&(t=t.replace(fa,"^$1")),t}ha.command=ib,ha.argument=sb;var ab=/^#!.*/,ob=ab,ub=function(t){var e=t.match(ob);if(!e)return null;var r=e[0].replace(/#! ?/,"").split(" "),n=r[0].split("/").pop(),i=r[1];return n==="env"?i:n+(i?" "+i:"")};const da=Je,lb=ub;function cb(t){const e=150,r=Buffer.alloc(e);let n;try{n=da.openSync(t,"r"),da.readSync(n,r,0,e,0),da.closeSync(n)}catch{}return lb(r.toString())}var hb=cb;const fb=we,Nc=nb,Mc=ha,db=hb,pb=process.platform==="win32",mb=/\.(?:com|exe)$/i,gb=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function yb(t){t.file=Nc(t);const e=t.file&&db(t.file);return e?(t.args.unshift(t.file),t.command=e,Nc(t)):t.file}function vb(t){if(!pb)return t;const e=yb(t),r=!mb.test(e);if(t.options.forceShell||r){const n=gb.test(e);t.command=fb.normalize(t.command),t.command=Mc.command(t.command),t.args=t.args.map(s=>Mc.argument(s,n));const i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function bb(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);const n={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?n:vb(n)}var Db=bb;const pa=process.platform==="win32";function ma(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function wb(t,e){if(!pa)return;const r=t.emit;t.emit=function(n,i){if(n==="exit"){const s=jc(i,e);if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function jc(t,e){return pa&&t===1&&!e.file?ma(e.original,"spawn"):null}function Eb(t,e){return pa&&t===1&&!e.file?ma(e.original,"spawnSync"):null}var _b={hookChildProcess:wb,verifyENOENT:jc,verifyENOENTSync:Eb,notFoundError:ma};const Hc=wm,ga=Db,ya=_b;function Uc(t,e,r){const n=ga(t,e,r),i=Hc.spawn(n.command,n.args,n.options);return ya.hookChildProcess(i,n),i}function Sb(t,e,r){const n=ga(t,e,r),i=Hc.spawnSync(n.command,n.args,n.options);return i.error=i.error||ya.verifyENOENTSync(i.status,n),i}Rr.exports=Uc,Rr.exports.spawn=Uc,Rr.exports.sync=Sb,Rr.exports._parse=ga,Rr.exports._enoent=ya;var Cb=Rr.exports;function Ab(t){const e=typeof t=="string"?`
|
|
65
65
|
`:`
|
|
66
|
-
`.charCodeAt(),r=typeof t=="string"?"\r":"\r".charCodeAt();return t[t.length-1]===e&&(t=t.slice(0,-1)),t[t.length-1]===r&&(t=t.slice(0,-1)),t}function
|
|
66
|
+
`.charCodeAt(),r=typeof t=="string"?"\r":"\r".charCodeAt();return t[t.length-1]===e&&(t=t.slice(0,-1)),t[t.length-1]===r&&(t=t.slice(0,-1)),t}function Rb(t={}){const{cwd:e=dt.cwd(),path:r=dt.env[ca()],execPath:n=dt.execPath}=t;let i,s=st.resolve(e);const a=[];for(;i!==s;)a.push(st.join(s,"node_modules/.bin")),i=s,s=st.resolve(s,"..");return a.push(st.resolve(e,n,"..")),[...a,r].join(st.delimiter)}function Tb({env:t=dt.env,...e}={}){t={...t};const r=ca({env:t});return e.path=t[r],t[r]=Rb(e),t}const xb=function(){const t=Gc-qc+1;return Array.from({length:t},$b)},$b=function(t,e){return{name:`SIGRT${e+1}`,number:qc+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},qc=34,Gc=64,Ob=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],zc=function(){const t=xb();return[...Ob,...t].map(Fb)},Fb=function({name:t,number:e,description:r,action:n,forced:i=!1,standard:s}){const{signals:{[t]:a}}=il,o=a!==void 0;return{name:t,number:o?a:e,description:r,supported:o,action:n,forced:i,standard:s}},Pb=function(){return zc().reduce(kb,{})},kb=function(t,{name:e,number:r,description:n,supported:i,action:s,forced:a,standard:o}){return{...t,[e]:{name:e,number:r,description:n,supported:i,action:s,forced:a,standard:o}}},Ib=Pb(),Lb=function(){const t=zc(),e=Gc+1,r=Array.from({length:e},(n,i)=>Bb(i,t));return Object.assign({},...r)},Bb=function(t,e){const r=Nb(t,e);if(r===void 0)return{};const{name:n,description:i,supported:s,action:a,forced:o,standard:u}=r;return{[t]:{name:n,number:t,description:i,supported:s,action:a,forced:o,standard:u}}},Nb=function(t,e){const r=e.find(({name:n})=>il.signals[n]===t);return r!==void 0?r:e.find(n=>n.number===t)};Lb();const Mb=({timedOut:t,timeout:e,errorCode:r,signal:n,signalDescription:i,exitCode:s,isCanceled:a})=>t?`timed out after ${e} milliseconds`:a?"was canceled":r!==void 0?`failed with ${r}`:n!==void 0?`was killed with ${n} (${i})`:s!==void 0?`failed with exit code ${s}`:"failed",Vc=({stdout:t,stderr:e,all:r,error:n,signal:i,exitCode:s,command:a,escapedCommand:o,timedOut:u,isCanceled:l,killed:h,parsed:{options:{timeout:f}}})=>{s=s===null?void 0:s,i=i===null?void 0:i;const c=i===void 0?void 0:Ib[i].description,m=n&&n.code,y=`Command ${Mb({timedOut:u,timeout:f,errorCode:m,signal:i,signalDescription:c,exitCode:s,isCanceled:l})}: ${a}`,b=Object.prototype.toString.call(n)==="[object Error]",D=b?`${y}
|
|
67
67
|
${n.message}`:y,_=[D,e,t].filter(Boolean).join(`
|
|
68
|
-
`);return b?(n.originalMessage=n.message,n.message=_):n=new Error(_),n.shortMessage=D,n.command=a,n.escapedCommand=o,n.exitCode=s,n.signal=i,n.signalDescription=c,n.stdout=t,n.stderr=e,r!==void 0&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=Boolean(u),n.isCanceled=l,n.killed=h&&!u,n},
|
|
68
|
+
`);return b?(n.originalMessage=n.message,n.message=_):n=new Error(_),n.shortMessage=D,n.command=a,n.escapedCommand=o,n.exitCode=s,n.signal=i,n.signalDescription=c,n.stdout=t,n.stderr=e,r!==void 0&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=Boolean(u),n.isCanceled=l,n.killed=h&&!u,n},ci=["stdin","stdout","stderr"],jb=t=>ci.some(e=>t[e]!==void 0),Hb=t=>{if(!t)return;const{stdio:e}=t;if(e===void 0)return ci.map(n=>t[n]);if(jb(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${ci.map(n=>`\`${n}\``).join(", ")}`);if(typeof e=="string")return e;if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,ci.length);return Array.from({length:r},(n,i)=>e[i])},Ub=1e3*5,qb=(t,e="SIGTERM",r={})=>{const n=t(e);return Gb(t,e,r,n),n},Gb=(t,e,r,n)=>{if(!zb(e,r,n))return;const i=Wb(r),s=setTimeout(()=>{t("SIGKILL")},i);s.unref&&s.unref()},zb=(t,{forceKillAfterTimeout:e},r)=>Vb(t)&&e!==!1&&r,Vb=t=>t===ul.constants.signals.SIGTERM||typeof t=="string"&&t.toUpperCase()==="SIGTERM",Wb=({forceKillAfterTimeout:t=!0})=>{if(t===!0)return Ub;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);return t},Yb=(t,e)=>{t.kill()&&(e.isCanceled=!0)},Kb=(t,e,r)=>{t.kill(e),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))},Xb=(t,{timeout:e,killSignal:r="SIGTERM"},n)=>{if(e===0||e===void 0)return n;let i;const s=new Promise((o,u)=>{i=setTimeout(()=>{Kb(t,r,u)},e)}),a=n.finally(()=>{clearTimeout(i)});return Promise.race([s,a])},Qb=({timeout:t})=>{if(t!==void 0&&(!Number.isFinite(t)||t<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)},Jb=async(t,{cleanup:e,detached:r},n)=>{if(!e||r)return n;const i=Gv(()=>{t.kill()});return n.finally(()=>{i()})};function Zb(t){return t!==null&&typeof t=="object"&&typeof t.pipe=="function"}var Tr={exports:{}};const{PassThrough:eD}=Xe;var tD=t=>{t={...t};const{array:e}=t;let{encoding:r}=t;const n=r==="buffer";let i=!1;e?i=!(r||n):r=r||"utf8",n&&(r=null);const s=new eD({objectMode:i});r&&s.setEncoding(r);let a=0;const o=[];return s.on("data",u=>{o.push(u),i?a=o.length:a+=u.length}),s.getBufferedValue=()=>e?o:n?Buffer.concat(o,a):o.join(""),s.getBufferedLength=()=>a,s};const{constants:rD}=Tm,nD=Xe,{promisify:iD}=Jt,sD=tD,aD=iD(nD.pipeline);class Wc extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function va(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};const{maxBuffer:r}=e,n=sD(e);return await new Promise((i,s)=>{const a=o=>{o&&n.getBufferedLength()<=rD.MAX_LENGTH&&(o.bufferedData=n.getBufferedValue()),s(o)};(async()=>{try{await aD(t,n),i()}catch(o){a(o)}})(),n.on("data",()=>{n.getBufferedLength()>r&&a(new Wc)})}),n.getBufferedValue()}Tr.exports=va,Tr.exports.buffer=(t,e)=>va(t,{...e,encoding:"buffer"}),Tr.exports.array=(t,e)=>va(t,{...e,array:!0}),Tr.exports.MaxBufferError=Wc;var Yc=Tr.exports;const{PassThrough:oD}=Xe;var uD=function(){var t=[],e=new oD({objectMode:!0});return e.setMaxListeners(0),e.add=r,e.isEmpty=n,e.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(r),e;function r(s){return Array.isArray(s)?(s.forEach(r),this):(t.push(s),s.once("end",i.bind(null,s)),s.once("error",e.emit.bind(e,"error")),s.pipe(e,{end:!1}),this)}function n(){return t.length==0}function i(s){t=t.filter(function(a){return a!==s}),!t.length&&e.readable&&e.end()}};const lD=(t,e)=>{e===void 0||t.stdin===void 0||(Zb(e)?e.pipe(t.stdin):t.stdin.end(e))},cD=(t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;const r=uD();return t.stdout&&r.add(t.stdout),t.stderr&&r.add(t.stderr),r},ba=async(t,e)=>{if(!!t){t.destroy();try{return await e}catch(r){return r.bufferedData}}},Da=(t,{encoding:e,buffer:r,maxBuffer:n})=>{if(!(!t||!r))return e?Yc(t,{encoding:e,maxBuffer:n}):Yc.buffer(t,{maxBuffer:n})},hD=async({stdout:t,stderr:e,all:r},{encoding:n,buffer:i,maxBuffer:s},a)=>{const o=Da(t,{encoding:n,buffer:i,maxBuffer:s}),u=Da(e,{encoding:n,buffer:i,maxBuffer:s}),l=Da(r,{encoding:n,buffer:i,maxBuffer:s*2});try{return await Promise.all([a,o,u,l])}catch(h){return Promise.all([{error:h,signal:h.signal,timedOut:h.timedOut},ba(t,o),ba(e,u),ba(r,l)])}},fD=(async()=>{})().constructor.prototype,dD=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(fD,t)]),Kc=(t,e)=>{for(const[r,n]of dD){const i=typeof e=="function"?(...s)=>Reflect.apply(n.value,e(),s):n.value.bind(e);Reflect.defineProperty(t,r,{...n,value:i})}return t},pD=t=>new Promise((e,r)=>{t.on("exit",(n,i)=>{e({exitCode:n,signal:i})}),t.on("error",n=>{r(n)}),t.stdin&&t.stdin.on("error",n=>{r(n)})}),Xc=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],mD=/^[\w.-]+$/,gD=/"/g,yD=t=>typeof t!="string"||mD.test(t)?t:`"${t.replace(gD,'\\"')}"`,vD=(t,e)=>Xc(t,e).join(" "),bD=(t,e)=>Xc(t,e).map(r=>yD(r)).join(" "),DD=1e3*1e3*100,wD=({env:t,extendEnv:e,preferLocal:r,localDir:n,execPath:i})=>{const s=e?{...dt.env,...t}:t;return r?Tb({env:s,cwd:n,execPath:i}):s},ED=(t,e,r={})=>{const n=Cb._parse(t,e,r);return t=n.command,e=n.args,r=n.options,r={maxBuffer:DD,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||dt.cwd(),execPath:dt.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...r},r.env=wD(r),r.stdio=Hb(r),dt.platform==="win32"&&st.basename(t,".exe")==="cmd"&&e.unshift("/q"),{file:t,args:e,options:r,parsed:n}},wa=(t,e,r)=>typeof e!="string"&&!Dm.isBuffer(e)?r===void 0?void 0:"":t.stripFinalNewline?Ab(e):e;function hi(t,e,r){const n=ED(t,e,r),i=vD(t,e),s=bD(t,e);Qb(n.options);let a;try{a=al.spawn(n.file,n.args,n.options)}catch(m){const p=new al.ChildProcess,y=Promise.reject(Vc({error:m,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Kc(p,y)}const o=pD(a),u=Xb(a,n.options,o),l=Jb(a,n.options,u),h={isCanceled:!1};a.kill=qb.bind(null,a.kill.bind(a)),a.cancel=Yb.bind(null,a,h);const c=Mv(async()=>{const[{error:m,exitCode:p,signal:y,timedOut:b},D,_,R]=await hD(a,n.options,l),S=wa(n.options,D),v=wa(n.options,_),d=wa(n.options,R);if(m||p!==0||y!==null){const w=Vc({error:m,exitCode:p,signal:y,stdout:S,stderr:v,all:d,command:i,escapedCommand:s,parsed:n,timedOut:b,isCanceled:h.isCanceled,killed:a.killed});if(!n.options.reject)return w;throw w}return{command:i,escapedCommand:s,exitCode:0,stdout:S,stderr:v,all:d,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return lD(a,n.options.input),a.all=cD(a,n.options),Kc(a,c)}/*! *****************************************************************************
|
|
69
69
|
Copyright (c) Microsoft Corporation.
|
|
70
70
|
|
|
71
71
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -78,54 +78,54 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
78
78
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
79
79
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
80
80
|
PERFORMANCE OF THIS SOFTWARE.
|
|
81
|
-
***************************************************************************** */var
|
|
81
|
+
***************************************************************************** */var Ea=function(t,e){return Ea=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ea(t,e)};function te(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ea(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ze=function(){return ze=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},ze.apply(this,arguments)};function ir(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(h){try{l(n.next(h))}catch(f){a(f)}}function u(h){try{l(n.throw(h))}catch(f){a(f)}}function l(h){h.done?s(h.value):i(h.value).then(o,u)}l((n=n.apply(t,e||[])).next())})}function X(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(h){return u([l,h])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}s[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(h){l=[6,h],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Pe(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _e(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s}function Ve(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}var xr=function(){function t(){}return t.prototype.valueOf=function(){},t.prototype.liquidMethodMissing=function(e){},t}(),_D=Object.prototype.toString,Qc=String.prototype.toLowerCase;function kt(t){return typeof t=="string"}function It(t){return typeof t=="function"}function SD(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function Jc(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new Promise(function(n,i){t.apply(void 0,Ve(Ve([],_e(e),!1),[function(s,a){s?i(s):n(a)}],!1))})}}function fe(t){return t=sr(t),kt(t)?t:$r(t)?"":String(t)}function sr(t){return t instanceof xr?t.valueOf():t}function _a(t){return typeof t=="number"}function Zc(t){return t&&It(t.toLiquid)?Zc(t.toLiquid()):t}function $r(t){return t==null}function pt(t){return _D.call(t)==="[object Array]"}function eh(t,e){t=t||{};for(var r in t)if(Object.hasOwnProperty.call(t,r)&&e(t[r],r,t)===!1)break;return t}function th(t){return t[t.length-1]}function rh(t){var e=typeof t;return t!==null&&(e==="object"||e==="function")}function nh(t,e,r){r===void 0&&(r=1);for(var n=[],i=t;i<e;i+=r)n.push(i);return n}function fi(t,e,r){return r===void 0&&(r=" "),ih(t,e,r,function(n,i){return i+n})}function CD(t,e,r){return r===void 0&&(r=" "),ih(t,e,r,function(n,i){return n+i})}function ih(t,e,r,n){t=String(t);for(var i=e-t.length;i-- >0;)t=n(t,r);return t}function AD(t){return t}function sh(t){return t.replace(/(\w?)([A-Z])/g,function(e,r,n){return(r?r+"_":"")+n.toLowerCase()})}function RD(t){var e=Ve([],_e(t),!1).some(function(r){return r>="a"&&r<="z"});return e?t.toUpperCase():t.toLowerCase()}function TD(t,e){return t.length>e?t.substr(0,e-3)+"...":t}function ah(t,e){return t==null&&e==null?0:t==null?1:e==null||(t=Qc.call(t),e=Qc.call(e),t<e)?-1:t>e?1:0}var Sa=function(){function t(e,r,n,i){this.key=e,this.value=r,this.next=n,this.prev=i}return t}(),oh=function(){function t(e,r){r===void 0&&(r=0),this.limit=e,this.size=r,this.cache={},this.head=new Sa("HEAD",null,null,null),this.tail=new Sa("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}return t.prototype.write=function(e,r){if(this.cache[e])this.cache[e].value=r;else{var n=new Sa(e,r,this.head.next,this.head);this.head.next.prev=n,this.head.next=n,this.cache[e]=n,this.size++,this.ensureLimit()}},t.prototype.read=function(e){if(!!this.cache[e]){var r=this.cache[e].value;return this.remove(e),this.write(e,r),r}},t.prototype.remove=function(e){var r=this.cache[e];r.prev.next=r.next,r.next.prev=r.prev,delete this.cache[e],this.size--},t.prototype.clear=function(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}},t.prototype.ensureLimit=function(){this.size>this.limit&&this.remove(this.tail.prev.key)},t}(),xD=Jc(Rm),$D=Jc(Am);function OD(t){return ir(this,void 0,void 0,function(){return X(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,xD(t)];case 1:return e.sent(),[2,!0];case 2:return e.sent(),[2,!1];case 3:return[2]}})})}function FD(t){return $D(t,"utf8")}function PD(t){try{return Sm(t),!0}catch{return!1}}function kD(t){return Cm(t,"utf8")}function ID(t,e,r){return Em(e)||(e+=r),ol(t,e)}function LD(t){try{return require.resolve(t)}catch{}}function BD(t){return _m(t)}function ND(t,e){return t=ol(t),t=t.endsWith(ys)?t:t+ys,e.startsWith(t)}var MD=Object.freeze({__proto__:null,exists:OD,readFile:FD,existsSync:PD,readFileSync:kD,resolve:ID,fallback:LD,dirname:BD,contains:ND,sep:ys});function Ze(t){return t&&It(t.equals)}function ar(t,e){return!Ca(t,e)}function Ca(t,e){return e.opts.jsTruthy?!t:t===!1||t===void 0||t===null}var uh={"==":function(t,e){return Ze(t)?t.equals(e):Ze(e)?e.equals(t):t===e},"!=":function(t,e){return Ze(t)?!t.equals(e):Ze(e)?!e.equals(t):t!==e},">":function(t,e){return Ze(t)?t.gt(e):Ze(e)?e.lt(t):t>e},"<":function(t,e){return Ze(t)?t.lt(e):Ze(e)?e.gt(t):t<e},">=":function(t,e){return Ze(t)?t.geq(e):Ze(e)?e.leq(t):t>=e},"<=":function(t,e){return Ze(t)?t.leq(e):Ze(e)?e.geq(t):t<=e},contains:function(t,e){return t&&It(t.indexOf)?t.indexOf(e)>-1:!1},and:function(t,e,r){return ar(t,r)&&ar(e,r)},or:function(t,e,r){return ar(t,r)||ar(e,r)}},oe=[0,0,0,0,0,0,0,0,0,20,4,4,4,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,8,0,0,0,0,8,0,0,0,64,0,65,0,0,33,33,33,33,33,33,33,33,33,33,0,0,2,2,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Aa=1,di=4,lh=8,ch=16,jD=32,HD=64;oe[160]=oe[5760]=oe[6158]=oe[8192]=oe[8193]=oe[8194]=oe[8195]=oe[8196]=oe[8197]=oe[8198]=oe[8199]=oe[8200]=oe[8201]=oe[8202]=oe[8232]=oe[8233]=oe[8239]=oe[8287]=oe[12288]=di;function hh(t){var e,r,n={};try{for(var i=Pe(Object.entries(t)),s=i.next();!s.done;s=i.next()){for(var a=_e(s.value,2),o=a[0],u=a[1],l=n,h=0;h<o.length;h++){var f=o[h];l[f]=l[f]||{},h===o.length-1&&oe[o.charCodeAt(h)]&Aa&&(l[f].needBoundary=!0),l=l[f]}l.handler=u,l.end=!0}}catch(c){e={error:c}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}var Or={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:MD,dynamicPartials:!0,jsTruthy:!1,trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!1,lenientIf:!1,globals:{},keepOutputType:!1,operators:uh,operatorsTrie:hh(uh)};function UD(t){if(t.hasOwnProperty("operators")&&(t.operatorsTrie=hh(t.operators)),t.hasOwnProperty("root")&&(t.hasOwnProperty("partials")||(t.partials=t.root),t.hasOwnProperty("layouts")||(t.layouts=t.root)),t.hasOwnProperty("cache")){var e=void 0;typeof t.cache=="number"?e=t.cache>0?new oh(t.cache):void 0:typeof t.cache=="object"?e=t.cache:e=t.cache?new oh(1024):void 0,t.cache=e}return t=ze(ze(ze({},Or),t.jekyllInclude?{dynamicPartials:!1}:{}),t),!t.fs.dirname&&t.relativeReference&&(console.warn("[LiquidJS] `fs.dirname` is required for relativeReference, set relativeReference to `false` to suppress this warning, or provide implementation for `fs.dirname`"),t.relativeReference=!1),t.root=pi(t.root),t.partials=pi(t.partials),t.layouts=pi(t.layouts),t}function pi(t){var e=[];return pt(t)&&(e=t),kt(t)&&(e=[t]),e}var mi=function(t){te(e,t);function e(r,n){var i=t.call(this,r.message)||this;return i.originalError=r,i.token=n,i.context="",i}return e.prototype.update=function(){var r=this.originalError;this.context=WD(this.token),this.message=YD(r.message,this.token),this.stack=this.message+`
|
|
82
82
|
`+this.context+`
|
|
83
83
|
`+this.stack+`
|
|
84
|
-
From `+r.stack},e}(Error),
|
|
85
|
-
`),i=Math.max(r-2,1),s=Math.min(r+3,n.length),a=
|
|
86
|
-
`);return a}function
|
|
87
|
-
`,r:"\r",t:" ",v:"\v"};function
|
|
88
|
-
`?(r++,n=1):n++;return[r,n]},t.prototype.size=function(){return this.end-this.begin},t}(),
|
|
89
|
-
`&&t.trimLeft++}}var
|
|
90
|
-
`)!==-1&&(a=this.p);var o=new _w(i,s,a,e,n);return o},t.prototype.mkError=function(e,r){return new Ea(e,new pi(this.input,r,this.N,this.file))},t.prototype.snapshot=function(e){return e===void 0&&(e=this.p),JSON.stringify(pD(this.input.slice(e),16))},t.prototype.readWord=function(){return console.warn("Tokenizer#readWord() will be removed, use #readIdentifier instead"),this.readIdentifier()},t.prototype.readIdentifier=function(){this.skipBlank();for(var e=this.p;this.peekType()&wa;)++this.p;return new pi(this.input,e,this.p,this.file)},t.prototype.readHashes=function(e){for(var r=[];;){var n=this.readHash(e);if(!n)return r;r.push(n)}},t.prototype.readHash=function(e){this.skipBlank(),this.peek()===","&&++this.p;var r=this.p,n=this.readIdentifier();if(!!n.size()){var i;this.skipBlank();var s=e?"=":":";return this.peek()===s&&(++this.p,i=this.readValue()),new vw(this.input,r,this.p,n,i,this.file)}},t.prototype.remaining=function(){return this.input.slice(this.p)},t.prototype.advance=function(e){e===void 0&&(e=1),this.p+=e},t.prototype.end=function(){return this.p>=this.N},t.prototype.readTo=function(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1},t.prototype.readValue=function(){var e=this.readQuoted()||this.readRange();if(e)return e;if(this.peek()==="["){this.p++;var r=this.readQuoted();return!r||this.peek()!=="]"?void 0:(this.p++,new ph(r,[],this.p))}var n=this.readIdentifier();if(!!n.size()){for(var i=n.isNumber(!0),s=[];;)if(this.peek()==="["){i=!1,this.p++;var r=this.readValue()||new pi(this.input,this.p,this.p,this.file);this.readTo("]"),s.push(r)}else if(this.peek()==="."&&this.peek(1)!=="."){this.p++;var r=this.readIdentifier();if(!r.size())break;r.isNumber()||(i=!1),s.push(r)}else break;return!s.length&&uh.hasOwnProperty(n.content)?new mw(this.input,n.begin,n.end,this.file):i?new pw(n,s[0]):new ph(n,s,this.p)}},t.prototype.readRange=function(){this.skipBlank();var e=this.p;if(this.peek()==="("){++this.p;var r=this.readValueOrThrow();this.p+=2;var n=this.readValueOrThrow();return++this.p,new Dw(this.input,e,this.p,r,n,this.file)}},t.prototype.readValueOrThrow=function(){var e=this,r=this.readValue();return Pe(r,function(){return"unexpected token ".concat(e.snapshot(),", value expected")}),r},t.prototype.readQuoted=function(){this.skipBlank();var e=this.p;if(!!(this.peekType()&Zc)){++this.p;for(var r=!1;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!r));)r?r=!1:this.input[this.p-1]==="\\"&&(r=!0);return new bw(this.input,e,this.p,this.file)}},t.prototype.readFileNameTemplate=function(e){var r,n,i;return X(this,function(s){switch(s.label){case 0:r=e.outputDelimiterLeft,n=[","," ",r],i=new Set(n),s.label=1;case 1:return this.p<this.N&&!i.has(this.peek())?[4,this.match(r)?this.readOutputToken(e):this.readHTMLToken(n)]:[3,3];case 2:return s.sent(),[3,1];case 3:return[2]}})},t.prototype.match=function(e){for(var r=0;r<e.length;r++)if(e[r]!==this.input[this.p+r])return!1;return!0},t.prototype.rmatch=function(e){for(var r=0;r<e.length;r++)if(e[e.length-1-r]!==this.input[this.p-1-r])return!1;return!0},t.prototype.peekType=function(e){return e===void 0&&(e=0),oe[this.input.charCodeAt(this.p+e)]},t.prototype.peek=function(e){return e===void 0&&(e=0),this.input[this.p+e]},t.prototype.skipBlank=function(){for(;this.peekType()&ui;)++this.p},t}(),gh=function(t){te(e,t);function e(r,n,i,s,a){var o=this,u=s.trimTagLeft,l=s.trimTagRight,h=s.tagDelimiterLeft,f=s.tagDelimiterRight,c=r.slice(n+h.length,i-f.length);o=t.call(this,ue.Tag,c,r,n,i,u,l,a)||this;var m=new ke(o.content,s.operatorsTrie);if(o.name=m.readIdentifier().getText(),!o.name)throw new Ea("illegal tag syntax",o);return m.skipBlank(),o.args=m.remaining(),o}return e}(xa),Tr=function(){function t(e,r){var n,i;this.hash={};var s=new ke(e,{});try{for(var a=Fe(s.readHashes(r)),o=a.next();!o.done;o=a.next()){var u=o.value;this.hash[u.name.content]=u.value}}catch(l){n={error:l}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}}return t.prototype.render=function(e){var r,n,i,s,a,o,u,l,h,f;return X(this,function(c){switch(c.label){case 0:r={},c.label=1;case 1:c.trys.push([1,8,9,10]),n=Fe(Object.keys(this.hash)),i=n.next(),c.label=2;case 2:return i.done?[3,7]:(s=i.value,a=r,o=s,this.hash[s]!==void 0?[3,3]:(u=!0,[3,5]));case 3:return[4,Ne(this.hash[s],e)];case 4:u=c.sent(),c.label=5;case 5:a[o]=u,c.label=6;case 6:return i=n.next(),[3,2];case 7:return[3,10];case 8:return l=c.sent(),h={error:l},[3,10];case 9:try{i&&!i.done&&(f=n.return)&&f.call(n)}finally{if(h)throw h.error}return[7];case 10:return[2,r]}})},t}();function Sw(t){return ft(t)}var yh=function(){function t(e,r,n,i){this.name=e,this.impl=r||fD,this.args=n,this.liquid=i}return t.prototype.render=function(e,r){var n,i,s=[];try{for(var a=Fe(this.args),o=a.next();!o.done;o=a.next()){var u=o.value;Sw(u)?s.push([u[0],Ne(u[1],r)]):s.push(Ne(u,r))}}catch(l){n={error:l}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return this.impl.apply({context:r,liquid:this.liquid},ze([e],_e(s),!1))},t}(),Gt=function(){function t(e,r){this.filters=[];var n=new ke(e,r.options.operatorsTrie);this.initial=n.readExpression(),this.filters=n.readFilters().map(function(i){var s=i.name,a=i.args;return new yh(s,r.filters.get(s),a,r)})}return t.prototype.value=function(e,r){var n,i,s,a,o,u,l;return X(this,function(h){switch(h.label){case 0:return r=r||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default",[4,this.initial.evaluate(e,r)];case 1:n=h.sent(),h.label=2;case 2:h.trys.push([2,7,8,9]),i=Fe(this.filters),s=i.next(),h.label=3;case 3:return s.done?[3,6]:(a=s.value,[4,a.render(n,e)]);case 4:n=h.sent(),h.label=5;case 5:return s=i.next(),[3,3];case 6:return[3,9];case 7:return o=h.sent(),u={error:o},[3,9];case 8:try{s&&!s.done&&(l=i.return)&&l.call(i)}finally{if(u)throw u.error}return[7];case 9:return[2,n]}})},t}(),Cw=function(t){te(e,t);function e(r,n,i){var s=t.call(this,r)||this;s.name=r.name;var a=i.tags.get(r.name);return s.impl=Object.create(a),s.impl.liquid=i,s.impl.parse&&s.impl.parse(r,n),s}return e.prototype.render=function(r,n){var i,s;return X(this,function(a){switch(a.label){case 0:return[4,new Tr(this.token.args).render(r)];case 1:return i=a.sent(),s=this.impl,Pt(s.render)?[4,s.render(r,n,i)]:[3,3];case 2:return[2,a.sent()];case 3:return[2]}})},e}(Aa),Aw=function(t){te(e,t);function e(r,n){var i=t.call(this,r)||this;return i.value=new Gt(r.content,n),i}return e.prototype.render=function(r,n){var i;return X(this,function(s){switch(s.label){case 0:return[4,this.value.value(r,!1)];case 1:return i=s.sent(),n.write(i),[2]}})},e}(Aa),Rw=function(t){te(e,t);function e(r){var n=t.call(this,r)||this;return n.str=r.getContent(),n}return e.prototype.render=function(r,n){return X(this,function(i){return n.write(this.str),[2]})},e}(Aa),xw=function(){function t(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new jD(this.liquid.options)}return t.prototype.parse=function(e,r){var n=new ke(e,this.liquid.options.operatorsTrie,r),i=n.readTopLevelTokens(this.liquid.options);return this.parseTokens(i)},t.prototype.parseTokens=function(e){for(var r,n=[];r=e.shift();)n.push(this.parseToken(r,e));return n},t.prototype.parseToken=function(e,r){try{return Ca(e)?new Cw(e,r,this.liquid):KD(e)?new Aw(e,this.liquid):new Rw(e)}catch(n){throw new TD(n,e)}},t.prototype.parseStream=function(e){var r=this;return new ew(e,function(n,i){return r.parseToken(n,i)})},t.prototype._parseFileCached=function(e,r,n,i){var s,a,o;return n===void 0&&(n=ir.Root),X(this,function(u){switch(u.label){case 0:return s=this.loader.shouldLoadRelative(e)?i+","+e:n+":"+e,[4,this.cache.read(s)];case 1:if(a=u.sent(),a)return[2,a];o=rn(this._parseFile(e,r,n,i)),this.cache.write(s,o),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,o];case 3:return[2,u.sent()];case 4:return u.sent(),this.cache.remove(s),[3,5];case 5:return[2,[]]}})},t.prototype._parseFile=function(e,r,n,i){var s,a,o,u;return n===void 0&&(n=ir.Root),X(this,function(l){switch(l.label){case 0:return[4,this.loader.lookup(e,n,r,i)];case 1:return s=l.sent(),o=(a=this.liquid).parse,r?(u=this.fs.readFileSync(s),[3,4]):[3,2];case 2:return[4,this.fs.readFile(s)];case 3:u=l.sent(),l.label=4;case 4:return[2,o.apply(a,[u,s])]}})},t}(),Tw={parse:function(t){var e=new ke(t.args,this.liquid.options.operatorsTrie);this.key=e.readIdentifier().content,e.skipBlank(),Pe(e.peek()==="=",function(){return"illegal token ".concat(t.getText())}),e.advance(),this.value=e.remaining()},render:function(t){var e,r;return X(this,function(n){switch(n.label){case 0:return e=t.bottom(),r=this.key,[4,this.liquid._evalValue(this.value,t)];case 1:return e[r]=n.sent(),[2]}})}};function Ta(t){return ft(t)?t:Ft(t)&&t.length>0?[t]:Vc(t)?Object.keys(t).map(function(e){return[e,t[e]]}):[]}function nn(t){return ft(t)?t:[t]}var $a=function(t){te(e,t);function e(r,n,i){var s=t.call(this)||this;return s.i=0,s.length=r,s.name="".concat(i,"-").concat(n),s}return e.prototype.next=function(){this.i++},e.prototype.index0=function(){return this.i},e.prototype.index=function(){return this.i+1},e.prototype.first=function(){return this.i===0},e.prototype.last=function(){return this.i===this.length-1},e.prototype.rindex=function(){return this.length-this.i},e.prototype.rindex0=function(){return this.length-this.i-1},e.prototype.valueOf=function(){return JSON.stringify(this)},e}(Ar),vh=["offset","limit","reversed"],$w={type:"block",parse:function(t,e){var r=this,n=new ke(t.args,this.liquid.options.operatorsTrie),i=n.readIdentifier(),s=n.readIdentifier(),a=n.readValue();Pe(i.size()&&s.content==="in"&&a,function(){return"illegal tag: ".concat(t.getText())}),this.variable=i.content,this.collection=a,this.hash=new Tr(n.remaining()),this.templates=[],this.elseTemplates=[];var o,u=this.liquid.parser.parseStream(e).on("start",function(){return o=r.templates}).on("tag:else",function(){return o=r.elseTemplates}).on("tag:endfor",function(){return u.stop()}).on("template",function(l){return o.push(l)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))});u.start()},render:function(t,e){var r,n,i,s,a,o,u,l,h,f,c,m,p;return X(this,function(y){switch(y.label){case 0:return r=this.liquid.renderer,i=Ta,[4,Ne(this.collection,t)];case 1:return n=i.apply(void 0,[y.sent()]),n.length?[3,3]:[4,r.renderTemplates(this.elseTemplates,t,e)];case 2:return y.sent(),[2];case 3:return s="continue-"+this.variable+"-"+this.collection.getText(),t.push({continue:t.getRegister(s)}),[4,this.hash.render(t)];case 4:a=y.sent(),t.pop(),o=this.liquid.options.orderedFilterParameters?Object.keys(a).filter(function(b){return vh.includes(b)}):vh.filter(function(b){return a[b]!==void 0}),n=o.reduce(function(b,D){return D==="offset"?Fw(b,a.offset):D==="limit"?Pw(b,a.limit):Ow(b)},n),t.setRegister(s,(a.offset||0)+n.length),u={forloop:new $a(n.length,this.collection.getText(),this.variable)},t.push(u),y.label=5;case 5:y.trys.push([5,10,11,12]),l=Fe(n),h=l.next(),y.label=6;case 6:return h.done?[3,9]:(f=h.value,u[this.variable]=f,[4,r.renderTemplates(this.templates,t,e)]);case 7:if(y.sent(),e.break)return e.break=!1,[3,9];e.continue=!1,u.forloop.next(),y.label=8;case 8:return h=l.next(),[3,6];case 9:return[3,12];case 10:return c=y.sent(),m={error:c},[3,12];case 11:try{h&&!h.done&&(p=l.return)&&p.call(l)}finally{if(m)throw m.error}return[7];case 12:return t.pop(),[2]}})}};function Ow(t){return ze([],_e(t),!1).reverse()}function Fw(t,e){return t.slice(e)}function Pw(t,e){return t.slice(0,e)}var kw={parse:function(t,e){var r=this,n=new ke(t.args,this.liquid.options.operatorsTrie);this.variable=Iw(n),Pe(this.variable,function(){return"".concat(t.args," not valid identifier")}),this.templates=[];var i=this.liquid.parser.parseStream(e);i.on("tag:endcapture",function(){return i.stop()}).on("template",function(s){return r.templates.push(s)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}),i.start()},render:function(t){var e,r;return X(this,function(n){switch(n.label){case 0:return e=this.liquid.renderer,[4,e.renderTemplates(this.templates,t)];case 1:return r=n.sent(),t.bottom()[this.variable]=r,[2]}})}};function Iw(t){var e=t.readIdentifier().content;if(e)return e;var r=t.readQuoted();if(r)return Ra(r)}var Lw={parse:function(t,e){var r=this;this.cond=new Gt(t.args,this.liquid),this.cases=[],this.elseTemplates=[];var n=[],i=this.liquid.parser.parseStream(e).on("tag:when",function(s){n=[];for(var a=new ke(s.args,r.liquid.options.operatorsTrie);!a.end();){var o=a.readValue();r.cases.push({val:o,templates:n}),a.readTo(",")}}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endcase",function(){return i.stop()}).on("template",function(s){return n.push(s)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))});i.start()},render:function(t,e){var r,n,i,s,a,o,u,l,h,f;return X(this,function(c){switch(c.label){case 0:return r=this.liquid.renderer,i=rr,[4,this.cond.value(t,t.opts.lenientIf)];case 1:n=i.apply(void 0,[c.sent()]),c.label=2;case 2:c.trys.push([2,7,8,9]),s=Fe(this.cases),a=s.next(),c.label=3;case 3:return a.done?[3,6]:(o=a.value,u=Ne(o.val,t,t.opts.lenientIf),u!==n?[3,5]:[4,r.renderTemplates(o.templates,t,e)]);case 4:return c.sent(),[2];case 5:return a=s.next(),[3,3];case 6:return[3,9];case 7:return l=c.sent(),h={error:l},[3,9];case 8:try{a&&!a.done&&(f=s.return)&&f.call(s)}finally{if(h)throw h.error}return[7];case 9:return[4,r.renderTemplates(this.elseTemplates,t,e)];case 10:return c.sent(),[2]}})}},Bw={parse:function(t,e){var r=this.liquid.parser.parseStream(e);r.on("token",function(n){n.name==="endcomment"&&r.stop()}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}),r.start()}},Oa;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(Oa||(Oa={}));var sn=Oa,Nw={parseFilePath:Fa,renderFilePath:Pa,parse:function(t){var e=t.args,r=new ke(e,this.liquid.options.operatorsTrie);for(this.file=this.parseFilePath(r,this.liquid),this.currentFile=t.file;!r.end();){r.skipBlank();var n=r.p,i=r.readIdentifier();if((i.content==="with"||i.content==="for")&&(r.skipBlank(),r.peek()!==":")){var s=r.readValue();if(s){var a=r.p,o=r.readIdentifier(),u=void 0;o.content==="as"?u=r.readIdentifier():r.p=a,this[i.content]={value:s,alias:u&&u.content},r.skipBlank(),r.peek()===","&&r.advance();continue}}r.p=n;break}this.hash=new Tr(r.remaining())},render:function(t,e){var r,n,i,s,a,o,u,l,h,c,m,f,c,m,p,y,b,D,R,_,R,S,v;return X(this,function(d){switch(d.label){case 0:return r=this,n=r.liquid,i=r.hash,[4,this.renderFilePath(this.file,t,n)];case 1:return s=d.sent(),Pe(s,function(){return'illegal filename "'.concat(s,'"')}),a=new _a({},t.opts,{sync:t.sync,globals:t.globals,strictVariables:t.strictVariables}),o=a.bottom(),u=Ge,l=[o],[4,i.render(t)];case 2:if(u.apply(void 0,l.concat([d.sent()])),this.with&&(h=this.with,c=h.value,m=h.alias,o[m||s]=Ne(c,t)),!this.for)return[3,12];f=this.for,c=f.value,m=f.alias,p=Ne(c,t),p=Ta(p),o.forloop=new $a(p.length,c.getText(),m),d.label=3;case 3:d.trys.push([3,9,10,11]),y=Fe(p),b=y.next(),d.label=4;case 4:return b.done?[3,8]:(D=b.value,o[m]=D,[4,n._parsePartialFile(s,a.sync,this.currentFile)]);case 5:return R=d.sent(),[4,n.renderer.renderTemplates(R,a,e)];case 6:d.sent(),o.forloop.next(),d.label=7;case 7:return b=y.next(),[3,4];case 8:return[3,11];case 9:return _=d.sent(),S={error:_},[3,11];case 10:try{b&&!b.done&&(v=y.return)&&v.call(y)}finally{if(S)throw S.error}return[7];case 11:return[3,15];case 12:return[4,n._parsePartialFile(s,a.sync,this.currentFile)];case 13:return R=d.sent(),[4,n.renderer.renderTemplates(R,a,e)];case 14:d.sent(),d.label=15;case 15:return[2]}})}};function Fa(t,e){if(e.options.dynamicPartials){var r=t.readValue();if(r===void 0)throw new TypeError('illegal argument "'.concat(t.input,'"'));if(r.getText()==="none")return null;if(sh(r)){var n=e.parse(Ra(r));return bh(n)}return r}var i=ze([],_e(t.readFileNameTemplate(e.options)),!1),s=bh(e.parser.parseTokens(i));return s==="none"?null:s}function bh(t){return t.length===1&&Sa(t[0].token)?t[0].token.getContent():t}function Pa(t,e,r){return typeof t=="string"?t:Array.isArray(t)?r.renderer.renderTemplates(t,e):Ne(t,e)}var Mw={parseFilePath:Fa,renderFilePath:Pa,parse:function(t){var e=t.args,r=new ke(e,this.liquid.options.operatorsTrie);this.file=this.parseFilePath(r,this.liquid),this.currentFile=t.file;var n=r.p,i=r.readIdentifier();i.content==="with"?(r.skipBlank(),r.peek()!==":"?this.withVar=r.readValue():r.p=n):r.p=n,this.hash=new Tr(r.remaining(),this.liquid.options.jekyllInclude)},render:function(t,e){var r,n,i,s,a,o,u,l,h;return X(this,function(f){switch(f.label){case 0:return r=this,n=r.liquid,i=r.hash,s=r.withVar,a=n.renderer,[4,this.renderFilePath(this.file,t,n)];case 1:return o=f.sent(),Pe(o,function(){return'illegal filename "'.concat(o,'"')}),u=t.saveRegister("blocks","blockMode"),t.setRegister("blocks",{}),t.setRegister("blockMode",sn.OUTPUT),[4,i.render(t)];case 2:return l=f.sent(),s&&(l[o]=Ne(s,t)),[4,n._parsePartialFile(o,t.sync,this.currentFile)];case 3:return h=f.sent(),t.push(t.opts.jekyllInclude?{include:l}:l),[4,a.renderTemplates(h,t,e)];case 4:return f.sent(),t.pop(),t.restoreRegister(u),[2]}})}},jw={parse:function(t){var e=new ke(t.args,this.liquid.options.operatorsTrie);this.variable=e.readIdentifier().content},render:function(t,e){var r=t.environments;va(r[this.variable])||(r[this.variable]=0),e.write(fe(--r[this.variable]))}},Hw={parse:function(t){var e=new ke(t.args,this.liquid.options.operatorsTrie),r=e.readValue();for(e.skipBlank(),this.candidates=[],r&&(e.peek()===":"?(this.group=r,e.advance()):this.candidates.push(r));!e.end();){var n=e.readValue();n&&this.candidates.push(n),e.readTo(",")}Pe(this.candidates.length,function(){return"empty candidates: ".concat(t.getText())})},render:function(t,e){var r=Ne(this.group,t),n="cycle:".concat(r,":")+this.candidates.join(","),i=t.getRegister("cycle"),s=i[n];s===void 0&&(s=i[n]=0);var a=this.candidates[s];s=(s+1)%this.candidates.length,i[n]=s;var o=Ne(a,t);e.write(o)}},Uw={parse:function(t,e){var r=this;this.branches=[],this.elseTemplates=[];var n;this.liquid.parser.parseStream(e).on("start",function(){return r.branches.push({predicate:new Gt(t.args,r.liquid),templates:n=[]})}).on("tag:elsif",function(i){return r.branches.push({predicate:new Gt(i.args,r.liquid),templates:n=[]})}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endif",function(){this.stop()}).on("template",function(i){return n.push(i)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}).start()},render:function(t,e){var r,n,i,s,a,o,u,l,h,f;return X(this,function(c){switch(c.label){case 0:r=this.liquid.renderer,c.label=1;case 1:c.trys.push([1,7,8,9]),n=Fe(this.branches),i=n.next(),c.label=2;case 2:return i.done?[3,6]:(s=i.value,a=s.predicate,o=s.templates,[4,a.value(t,t.opts.lenientIf)]);case 3:return u=c.sent(),nr(u,t)?[4,r.renderTemplates(o,t,e)]:[3,5];case 4:return c.sent(),[2];case 5:return i=n.next(),[3,2];case 6:return[3,9];case 7:return l=c.sent(),h={error:l},[3,9];case 8:try{i&&!i.done&&(f=n.return)&&f.call(n)}finally{if(h)throw h.error}return[7];case 9:return[4,r.renderTemplates(this.elseTemplates,t,e)];case 10:return c.sent(),[2]}})}},qw={parse:function(t){var e=new ke(t.args,this.liquid.options.operatorsTrie);this.variable=e.readIdentifier().content},render:function(t,e){var r=t.environments;va(r[this.variable])||(r[this.variable]=0);var n=r[this.variable];r[this.variable]++,e.write(fe(n))}},Gw={parseFilePath:Fa,renderFilePath:Pa,parse:function(t,e){var r=new ke(t.args,this.liquid.options.operatorsTrie);this.file=this.parseFilePath(r,this.liquid),this.currentFile=t.file,this.hash=new Tr(r.remaining()),this.tpls=this.liquid.parser.parseTokens(e)},render:function(t,e){var r,n,i,s,a,o,u,l,h,f,c;return X(this,function(m){switch(m.label){case 0:return r=this,n=r.liquid,i=r.hash,s=r.file,a=n.renderer,s!==null?[3,2]:(t.setRegister("blockMode",sn.OUTPUT),[4,a.renderTemplates(this.tpls,t,e)]);case 1:return m.sent(),[2];case 2:return[4,this.renderFilePath(this.file,t,n)];case 3:return o=m.sent(),Pe(o,function(){return'illegal filename "'.concat(o,'"')}),[4,n._parseLayoutFile(o,t.sync,this.currentFile)];case 4:return u=m.sent(),t.setRegister("blockMode",sn.STORE),[4,a.renderTemplates(this.tpls,t)];case 5:return l=m.sent(),h=t.getRegister("blocks"),h[""]===void 0&&(h[""]=function(p,y){return y.write(l)}),t.setRegister("blockMode",sn.OUTPUT),c=(f=t).push,[4,i.render(t)];case 6:return c.apply(f,[m.sent()]),[4,a.renderTemplates(u,t,e)];case 7:return m.sent(),t.pop(),[2]}})}},Dh=function(t){te(e,t);function e(r){r===void 0&&(r=function(){return""});var n=t.call(this)||this;return n.superBlockRender=r,n}return e.prototype.super=function(){return this.superBlockRender()},e}(Ar),zw={parse:function(t,e){var r=this,n=/\w+/.exec(t.args);this.block=n?n[0]:"",this.tpls=[],this.liquid.parser.parseStream(e).on("tag:endblock",function(){this.stop()}).on("template",function(i){return r.tpls.push(i)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}).start()},render:function(t,e){var r;return X(this,function(n){switch(n.label){case 0:return r=this.getBlockRender(t),t.getRegister("blockMode")!==sn.STORE?[3,1]:(t.getRegister("blocks")[this.block]=r,[3,3]);case 1:return[4,r(new Dh,e)];case 2:n.sent(),n.label=3;case 3:return[2]}})},getBlockRender:function(t){var e=this,r=e.liquid,n=e.tpls,i=t.getRegister("blocks")[this.block],s=function(a,o){return X(this,function(u){switch(u.label){case 0:return t.push({block:a}),[4,r.renderer.renderTemplates(n,t,o)];case 1:return u.sent(),t.pop(),[2]}})};return i?function(a,o){return i(new Dh(function(){return s(a,o)}),o)}:s}},Vw={parse:function(t,e){var r=this;this.tokens=[];var n=this.liquid.parser.parseStream(e);n.on("token",function(i){i.name==="endraw"?n.stop():r.tokens.push(i)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}),n.start()},render:function(){return this.tokens.map(function(t){return t.getText()}).join("")}},Ww=function(t){te(e,t);function e(r,n,i,s){var a=t.call(this,r,i,s)||this;return a.length=r,a.cols=n,a}return e.prototype.row=function(){return Math.floor(this.i/this.cols)+1},e.prototype.col0=function(){return this.i%this.cols},e.prototype.col=function(){return this.col0()+1},e.prototype.col_first=function(){return this.col0()===0},e.prototype.col_last=function(){return this.col()===this.cols},e}($a),Kw={parse:function(t,e){var r=this,n=new ke(t.args,this.liquid.options.operatorsTrie),i=n.readIdentifier();n.skipBlank();var s=n.readIdentifier();Pe(s&&s.content==="in",function(){return"illegal tag: ".concat(t.getText())}),this.variable=i.content,this.collection=n.readValue(),this.hash=new Tr(n.remaining()),this.templates=[];var a,o=this.liquid.parser.parseStream(e).on("start",function(){return a=r.templates}).on("tag:endtablerow",function(){return o.stop()}).on("template",function(u){return a.push(u)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))});o.start()},render:function(t,e){var r,n,i,s,a,o,u,l,h,f;return X(this,function(c){switch(c.label){case 0:return n=Ta,[4,Ne(this.collection,t)];case 1:return r=n.apply(void 0,[c.sent()]),[4,this.hash.render(t)];case 2:i=c.sent(),s=i.offset||0,a=i.limit===void 0?r.length:i.limit,r=r.slice(s,s+a),o=i.cols||r.length,u=this.liquid.renderer,l=new Ww(r.length,o,this.collection.getText(),this.variable),h={tablerowloop:l},t.push(h),f=0,c.label=3;case 3:return f<r.length?(h[this.variable]=r[f],l.col0()===0&&(l.row()!==1&&e.write("</tr>"),e.write('<tr class="row'.concat(l.row(),'">'))),e.write('<td class="col'.concat(l.col(),'">')),[4,u.renderTemplates(this.templates,t,e)]):[3,6];case 4:c.sent(),e.write("</td>"),c.label=5;case 5:return f++,l.next(),[3,3];case 6:return r.length&&e.write("</tr>"),t.pop(),[2]}})}},Yw={parse:function(t,e){var r=this;this.branches=[],this.elseTemplates=[];var n;this.liquid.parser.parseStream(e).on("start",function(){return r.branches.push({predicate:new Gt(t.args,r.liquid),test:Da,templates:n=[]})}).on("tag:elsif",function(i){return r.branches.push({predicate:new Gt(i.args,r.liquid),test:nr,templates:n=[]})}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",function(i){return n.push(i)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}).start()},render:function(t,e){var r,n,i,s,a,o,u,l,h,f,c;return X(this,function(m){switch(m.label){case 0:r=this.liquid.renderer,m.label=1;case 1:m.trys.push([1,7,8,9]),n=Fe(this.branches),i=n.next(),m.label=2;case 2:return i.done?[3,6]:(s=i.value,a=s.predicate,o=s.test,u=s.templates,[4,a.value(t,t.opts.lenientIf)]);case 3:return l=m.sent(),o(l,t)?[4,r.renderTemplates(u,t,e)]:[3,5];case 4:return m.sent(),[2];case 5:return i=n.next(),[3,2];case 6:return[3,9];case 7:return h=m.sent(),f={error:h},[3,9];case 8:try{i&&!i.done&&(c=n.return)&&c.call(n)}finally{if(f)throw f.error}return[7];case 9:return[4,r.renderTemplates(this.elseTemplates,t,e)];case 10:return m.sent(),[2]}})}},Xw={render:function(t,e){e.break=!0}},Qw={render:function(t,e){e.continue=!0}},Jw={parse:function(t){this.value=new Gt(t.args,this.liquid)},render:function(t,e){var r;return X(this,function(n){switch(n.label){case 0:return[4,this.value.value(t,!1)];case 1:return r=n.sent(),e.write(r),[2]}})}},Zw={parse:function(t){var e=new ke(t.args,this.liquid.options.operatorsTrie),r=e.readLiquidTagTokens(this.liquid.options);this.tpls=this.liquid.parser.parseTokens(r)},render:function(t,e){return X(this,function(r){switch(r.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.tpls,t,e)];case 1:return r.sent(),[2]}})}},eE={assign:Tw,for:$w,capture:kw,case:Lw,comment:Bw,include:Mw,render:Nw,decrement:jw,increment:qw,cycle:Hw,if:Uw,layout:Gw,block:zw,raw:Vw,tablerow:Kw,unless:Yw,break:Xw,continue:Qw,echo:Jw,liquid:Zw},tE={"&":"&","<":"<",">":">",'"':""","'":"'"},rE={"&":"&","<":"<",">":">",""":'"',"'":"'"};function wh(t){return fe(t).replace(/&|<|>|"|'/g,function(e){return tE[e]})}function nE(t){return String(t).replace(/&(amp|lt|gt|#34|#39);/g,function(e){return rE[e]})}function iE(t){return wh(nE(t))}function sE(t){return t.replace(/\n/g,`<br />
|
|
91
|
-
`)}function
|
|
92
|
-
`},"%":function(){return"%"}};ka.h=ka.b;function UE(t,e){for(var r="",n=e,i;i=PE.exec(n);)r+=n.slice(0,i.index),n=n.slice(i.index+i[0].length),r+=qE(t,i);return r+n}function qE(t,e){var r,n,i=_e(e,5),s=i[0],a=i[1],o=a===void 0?"":a,u=i[2],l=i[3],h=i[4],f=ka[h];if(!f)return s;var c={};try{for(var m=Fe(o),p=m.next();!p.done;p=m.next()){var y=p.value;c[y]=!0}}catch(R){r={error:R}}finally{try{p&&!p.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}var b=String(f(t,{flags:c,width:u,modifier:l})),D=HE[h]||"0",_=u||jE[h]||0;return c["^"]?b=b.toUpperCase():c["#"]&&(b=dD(b)),c._?D=" ":c["0"]&&(D="0"),c["-"]&&(_=0),oi(b,_,D)}var GE=6e4,zE=new Date().getTimezoneOffset(),VE=/([zZ]|([+-])(\d{2}):(\d{2}))$/,Ia=function(){function t(e,r){if(e instanceof t)this.date=e.date,r=e.timezoneOffset;else{var n=(zE-r)*GE,i=new Date(e).getTime()+n;this.date=new Date(i)}this.timezoneOffset=r}return t.prototype.getTime=function(){return this.date.getTime()},t.prototype.getMilliseconds=function(){return this.date.getMilliseconds()},t.prototype.getSeconds=function(){return this.date.getSeconds()},t.prototype.getMinutes=function(){return this.date.getMinutes()},t.prototype.getHours=function(){return this.date.getHours()},t.prototype.getDay=function(){return this.date.getDay()},t.prototype.getDate=function(){return this.date.getDate()},t.prototype.getMonth=function(){return this.date.getMonth()},t.prototype.getFullYear=function(){return this.date.getFullYear()},t.prototype.toLocaleTimeString=function(e){return this.date.toLocaleTimeString(e)},t.prototype.toLocaleDateString=function(e){return this.date.toLocaleDateString(e)},t.prototype.getTimezoneOffset=function(){return this.timezoneOffset},t.createDateFixedToTimezone=function(e){var r=e.match(VE);if(r&&r[1]==="Z")return new t(+new Date(e),0);if(r&&r[2]&&r[3]&&r[4]){var n=_e(r,5),i=n[2],s=n[3],a=n[4],o=(i==="+"?-1:1)*(parseInt(s,10)*60+parseInt(a,10));return new t(+new Date(e),o)}return new Date(e)},t}();function WE(t,e){var r=this.context.opts,n;return t==="now"||t==="today"?n=new Date:va(t)?n=new Date(t*1e3):Ft(t)?/^\d+$/.test(t)?n=new Date(+t*1e3):r.preserveTimezones?n=Ia.createDateFixedToTimezone(t):n=new Date(t):n=t,KE(n)?(r.hasOwnProperty("timezoneOffset")&&(n=new Ia(n,r.timezoneOffset)),UE(n,e)):t}function KE(t){return(t instanceof Date||t instanceof Ia)&&!isNaN(t.getTime())}function YE(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return ft(t)||Ft(t)?t.length?t:e:(t=rr(t),t===!1&&new Map(r).get("allow_false")?!1:Da(t,this.context)?e:t)}function XE(t){return JSON.stringify(t)}function QE(t,e){return Pe(arguments.length===2,"append expect 2 arguments"),fe(t)+fe(e)}function JE(t,e){return Pe(arguments.length===2,"prepend expect 2 arguments"),fe(e)+fe(t)}function ZE(t){return fe(t).replace(/^\s+/,"")}function e1(t){return fe(t).toLowerCase()}function t1(t){return fe(t).toUpperCase()}function r1(t,e){return fe(t).split(String(e)).join("")}function n1(t,e){return fe(t).replace(String(e),"")}function i1(t){return fe(t).replace(/\s+$/,"")}function s1(t,e){return fe(t).split(String(e))}function a1(t){return fe(t).trim()}function o1(t){return fe(t).replace(/\n/g,"")}function u1(t){return t=fe(t),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function l1(t,e,r){return fe(t).split(String(e)).join(r)}function c1(t,e,r){return fe(t).replace(String(e),r)}function h1(t,e,r){return e===void 0&&(e=50),r===void 0&&(r="..."),t=fe(t),t.length<=e?t:t.substr(0,e-r.length)+r}function f1(t,e,r){e===void 0&&(e=15),r===void 0&&(r="...");var n=t.split(/\s+/),i=n.slice(0,e).join(" ");return n.length>=e&&(i+=r),i}var d1=Object.freeze({__proto__:null,escape:wh,escapeOnce:iE,newlineToBr:sE,stripHtml:aE,abs:oE,atLeast:uE,atMost:lE,ceil:cE,dividedBy:hE,floor:fE,minus:dE,modulo:pE,times:mE,round:gE,plus:yE,sortNatural:vE,urlDecode:bE,urlEncode:DE,join:wE,last:EE,first:_E,reverse:SE,sort:CE,size:AE,map:RE,compact:xE,concat:TE,slice:$E,where:OE,uniq:FE,date:WE,Default:YE,json:XE,append:QE,prepend:JE,lstrip:ZE,downcase:e1,upcase:t1,remove:r1,removeFirst:n1,rstrip:i1,split:s1,strip:a1,stripNewlines:o1,capitalize:u1,replace:l1,replaceFirst:c1,truncate:h1,truncatewords:f1}),p1=function(){function t(){this.impls={}}return t.prototype.get=function(e){var r=this.impls[e];return Pe(r,function(){return'tag "'.concat(e,'" not found')}),r},t.prototype.set=function(e,r){this.impls[e]=r},t}(),m1=function(){function t(e,r){this.strictFilters=e,this.liquid=r,this.impls={}}return t.prototype.get=function(e){var r=this.impls[e];return Pe(r||!this.strictFilters,function(){return"undefined filter: ".concat(e)}),r},t.prototype.set=function(e,r){this.impls[e]=r},t.prototype.create=function(e,r){return new yh(e,this.get(e),r,this.liquid)},t}(),g1=function(){function t(e){var r=this;e===void 0&&(e={}),this.options=xD(e),this.parser=new xw(this),this.renderer=new VD,this.filters=new m1(this.options.strictFilters,this),this.tags=new p1,Gc(eE,function(n,i){return r.registerTag(Yc(i),n)}),Gc(d1,function(n,i){return r.registerFilter(Yc(i),n)})}return t.prototype.parse=function(e,r){return this.parser.parse(e,r)},t.prototype._render=function(e,r,n){var i=new _a(r,this.options,n);return this.renderer.renderTemplates(e,i)},t.prototype.render=function(e,r,n){return tr(this,void 0,void 0,function(){return X(this,function(i){return[2,fi(this._render(e,r,Ge(Ge({},n),{sync:!1})))]})})},t.prototype.renderSync=function(e,r,n){return di(this._render(e,r,Ge(Ge({},n),{sync:!0})))},t.prototype.renderToNodeStream=function(e,r,n){n===void 0&&(n={});var i=new _a(r,this.options,n);return this.renderer.renderTemplatesToNodeStream(e,i)},t.prototype._parseAndRender=function(e,r,n){var i=this.parse(e);return this._render(i,r,n)},t.prototype.parseAndRender=function(e,r,n){return tr(this,void 0,void 0,function(){return X(this,function(i){return[2,fi(this._parseAndRender(e,r,Ge(Ge({},n),{sync:!1})))]})})},t.prototype.parseAndRenderSync=function(e,r,n){return di(this._parseAndRender(e,r,Ge(Ge({},n),{sync:!0})))},t.prototype._parsePartialFile=function(e,r,n){return this.parser.parseFile(e,r,ir.Partials,n)},t.prototype._parseLayoutFile=function(e,r,n){return this.parser.parseFile(e,r,ir.Layouts,n)},t.prototype.parseFile=function(e){return tr(this,void 0,void 0,function(){return X(this,function(r){return[2,fi(this.parser.parseFile(e,!1))]})})},t.prototype.parseFileSync=function(e){return di(this.parser.parseFile(e,!0))},t.prototype.renderFile=function(e,r,n){return tr(this,void 0,void 0,function(){var i;return X(this,function(s){switch(s.label){case 0:return[4,this.parseFile(e)];case 1:return i=s.sent(),[2,this.render(i,r,n)]}})})},t.prototype.renderFileSync=function(e,r,n){var i=this.parseFileSync(e);return this.renderSync(i,r,n)},t.prototype.renderFileToNodeStream=function(e,r,n){return tr(this,void 0,void 0,function(){var i;return X(this,function(s){switch(s.label){case 0:return[4,this.parseFile(e)];case 1:return i=s.sent(),[2,this.renderToNodeStream(i,r,n)]}})})},t.prototype._evalValue=function(e,r){var n=new Gt(e,this);return n.value(r,!1)},t.prototype.evalValue=function(e,r){return tr(this,void 0,void 0,function(){return X(this,function(n){return[2,fi(this._evalValue(e,r))]})})},t.prototype.evalValueSync=function(e,r){return di(this._evalValue(e,r))},t.prototype.registerFilter=function(e,r){this.filters.set(e,r)},t.prototype.registerTag=function(e,r){this.tags.set(e,r)},t.prototype.plugin=function(e){return e.call(this,t)},t.prototype.express=function(){var e=this,r=!0;return function(n,i,s){var a,o,u;if(r){r=!1;var l=li(this.root);(a=e.options.root).unshift.apply(a,ze([],_e(l),!1)),(o=e.options.layouts).unshift.apply(o,ze([],_e(l),!1)),(u=e.options.partials).unshift.apply(u,ze([],_e(l),!1))}e.renderFile(n,i).then(function(h){return s(null,h)},s)}},t}();function xh(t){return e=>{const r=new g1;return r.render(r.parse(t),e)}}function y1(t){return t.toLowerCase()}var v1=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],b1=/[^A-Z0-9]+/gi;function D1(t,e){e===void 0&&(e={});for(var r=e.splitRegexp,n=r===void 0?v1:r,i=e.stripRegexp,s=i===void 0?b1:i,a=e.transform,o=a===void 0?y1:a,u=e.delimiter,l=u===void 0?" ":u,h=Th(Th(t,n,"$1\0$2"),s,"\0"),f=0,c=h.length;h.charAt(f)==="\0";)f++;for(;h.charAt(c-1)==="\0";)c--;return h.slice(f,c).split("\0").map(o).join(l)}function Th(t,e,r){return e instanceof RegExp?t.replace(e,r):e.reduce(function(n,i){return n.replace(i,r)},t)}function w1(t,e){return e===void 0&&(e={}),D1(t,jn({delimiter:"."},e))}function E1(t,e){return e===void 0&&(e={}),w1(t,jn({delimiter:"-"},e))}function wt(t=""){return t.includes("\\")?t.replace(/\\/g,"/"):t}const _1=/^[/][/]/,S1=/^[/][/]([.]{1,2}[/])?([a-zA-Z]):[/]/,C1=/^\/|^\\|^[a-zA-Z]:[/\\]/,A1="/",R1=":",$h=function(t){if(t.length===0)return".";t=wt(t);const e=t.match(_1),r=e&&t.match(S1),n=an(t),i=t[t.length-1]==="/";return t=La(t,!n),t.length===0?n?"/":i?"./":".":(i&&(t+="/"),e?r?`//./${t}`:`//${t}`:n&&!an(t)?`/${t}`:t)},mi=function(...t){if(t.length===0)return".";let e;for(let r=0;r<t.length;++r){const n=t[r];n.length>0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":$h(e)},Oh=function(...t){t=t.map(n=>wt(n));let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){const i=n>=0?t[n]:process.cwd();i.length!==0&&(e=`${i}/${e}`,r=an(i))}return e=La(e,!r),r&&!an(e)?`/${e}`:e.length>0?e:"."};function La(t,e){let r="",n=0,i=-1,s=0,a=null;for(let o=0;o<=t.length;++o){if(o<t.length)a=t[o];else{if(a==="/")break;a="/"}if(a==="/"){if(!(i===o-1||s===1))if(s===2){if(r.length<2||n!==2||r[r.length-1]!=="."||r[r.length-2]!=="."){if(r.length>2){const u=r.lastIndexOf("/");u===-1?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),i=o,s=0;continue}else if(r.length!==0){r="",n=0,i=o,s=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${t.slice(i+1,o)}`:r=t.slice(i+1,o),n=o-i-1;i=o,s=0}else a==="."&&s!==-1?++s:s=-1}return r}const an=function(t){return C1.test(t)},x1=function(t){return wt(t)},T1=function(t){return we.posix.extname(wt(t))},Fh=function(t,e){return we.posix.relative(wt(t),wt(e))},Ba=function(t){return we.posix.dirname(wt(t))},$1=function(t){return wt(we.posix.format(t))},O1=function(t,e){return we.posix.basename(wt(t),e)},F1=function(t){return we.posix.parse(wt(t))},P1=Object.freeze({__proto__:null,sep:A1,delimiter:R1,normalize:$h,join:mi,resolve:Oh,normalizeString:La,isAbsolute:an,toNamespacedPath:x1,extname:T1,relative:Fh,dirname:Ba,format:$1,basename:O1,parse:F1});({...P1});class k1{constructor(e){ls(this,"value");ls(this,"next");this.value=e}}class I1{constructor(){Fn(this,Rt,void 0);Fn(this,pr,void 0);Fn(this,mr,void 0);this.clear()}enqueue(e){const r=new k1(e);Mt(this,Rt)?(Mt(this,pr).next=r,xt(this,pr,r)):(xt(this,Rt,r),xt(this,pr,r)),cs(this,mr)._++}dequeue(){const e=Mt(this,Rt);if(!!e)return xt(this,Rt,Mt(this,Rt).next),cs(this,mr)._--,e.value}clear(){xt(this,Rt,void 0),xt(this,pr,void 0),xt(this,mr,0)}get size(){return Mt(this,mr)}*[Symbol.iterator](){let e=Mt(this,Rt);for(;e;)yield e.value,e=e.next}}Rt=new WeakMap,pr=new WeakMap,mr=new WeakMap;function Ph(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const e=new I1;let r=0;const n=()=>{r--,e.size>0&&e.dequeue()()},i=async(o,u,l)=>{r++;const h=(async()=>o(...l))();u(h);try{await h}catch{}n()},s=(o,u,l)=>{e.enqueue(i.bind(void 0,o,u,l)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},a=(o,...u)=>new Promise(l=>{s(o,l,u)});return Object.defineProperties(a,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),a}class kh extends Error{constructor(e){super();this.value=e}}const L1=async(t,e)=>e(await t),B1=async t=>{const e=await Promise.all(t);if(e[1]===!0)throw new kh(e[0]);return!1};async function N1(t,e,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){const i=Ph(r),s=[...t].map(o=>[o,i(L1,o,e)]),a=Ph(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(s.map(o=>a(B1,o)))}catch(o){if(o instanceof kh)return o.value;throw o}}const Ih={directory:"isDirectory",file:"isFile"};function M1(t){if(!(t in Ih))throw new Error(`Invalid type specified: ${t}`)}const j1=(t,e)=>t===void 0||e[Ih[t]]();async function Lh(t,{cwd:e=ht.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:i,preserveOrder:s}={}){M1(r);const a=n?Ju.stat:Ju.lstat;return N1(t,async o=>{try{const u=await a(it.resolve(e,o));return j1(r,u)}catch{return!1}},{concurrency:i,preserveOrder:s})}const H1=Symbol("findUpStop");async function U1(t,e={}){let r=it.resolve(e.cwd||"");const{root:n}=it.parse(r),i=it.resolve(r,e.stopAt||n),s=e.limit||Number.POSITIVE_INFINITY,a=[t].flat(),o=async l=>{if(typeof t!="function")return Lh(a,l);const h=await t(l.cwd);return typeof h=="string"?Lh([h],l):h},u=[];for(;;){const l=await o({...e,cwd:r});if(l===H1||(l&&u.push(it.resolve(r,l)),r===i||u.length>=s))break;r=it.dirname(r)}return u}async function q1(t,e={}){return(await U1(t,{...e,limit:1}))[0]}var Me={},ge={},$r={};Object.defineProperty($r,"__esModule",{value:!0}),$r.splitWhen=$r.flatten=void 0;function G1(t){return t.reduce((e,r)=>[].concat(e,r),[])}$r.flatten=G1;function z1(t,e){const r=[[]];let n=0;for(const i of t)e(i)?(n++,r[n]=[]):r[n].push(i);return r}$r.splitWhen=z1;var gi={};Object.defineProperty(gi,"__esModule",{value:!0}),gi.isEnoentCodeError=void 0;function V1(t){return t.code==="ENOENT"}gi.isEnoentCodeError=V1;var yi={};Object.defineProperty(yi,"__esModule",{value:!0}),yi.createDirentFromStats=void 0;class W1{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function K1(t,e){return new W1(t,e)}yi.createDirentFromStats=K1;var Et={};Object.defineProperty(Et,"__esModule",{value:!0}),Et.removeLeadingDotSegment=Et.escape=Et.makeAbsolute=Et.unixify=void 0;const Y1=we,X1=2,Q1=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function J1(t){return t.replace(/\\/g,"/")}Et.unixify=J1;function Z1(t,e){return Y1.resolve(t,e)}Et.makeAbsolute=Z1;function e_(t){return t.replace(Q1,"\\$2")}Et.escape=e_;function t_(t){if(t.charAt(0)==="."){const e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(X1)}return t}Et.removeLeadingDotSegment=t_;var V={};/*!
|
|
84
|
+
From `+r.stack},e}(Error),Ra=function(t){te(e,t);function e(r,n){var i=t.call(this,new Error(r),n)||this;return i.name="TokenizationError",t.prototype.update.call(i),i}return e}(mi),qD=function(t){te(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="ParseError",i.message=r.message,t.prototype.update.call(i),i}return e}(mi),fh=function(t){te(e,t);function e(r,n){var i=t.call(this,r,n.token)||this;return i.name="RenderError",i.message=r.message,t.prototype.update.call(i),i}return e.is=function(r){return r.name==="RenderError"},e}(mi),GD=function(t){te(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="UndefinedVariableError",i.message=r.message,t.prototype.update.call(i),i}return e}(mi),zD=function(t){te(e,t);function e(r){var n=t.call(this,"undefined variable: ".concat(r))||this;return n.name="InternalUndefinedVariableError",n.variableName=r,n}return e}(Error),VD=function(t){te(e,t);function e(r){var n=t.call(this,r)||this;return n.name="AssertionError",n.message=r+"",n}return e}(Error);function WD(t){var e=_e(t.getPosition(),1),r=e[0],n=t.input.split(`
|
|
85
|
+
`),i=Math.max(r-2,1),s=Math.min(r+3,n.length),a=nh(i,s+1).map(function(o){var u=o===r?">> ":" ",l=fi(String(o),String(s).length),h=n[o-1];return"".concat(u).concat(l,"| ").concat(h)}).join(`
|
|
86
|
+
`);return a}function YD(t,e){e.file&&(t+=", file:".concat(e.file));var r=_e(e.getPosition(),2),n=r[0],i=r[1];return t+=", line:".concat(n,", col:").concat(i),t}var Ta=function(){function t(e,r,n){e===void 0&&(e={}),r===void 0&&(r=Or),n===void 0&&(n={});var i,s;this.scopes=[{}],this.registers={},this.sync=!!n.sync,this.opts=r,this.globals=(i=n.globals)!==null&&i!==void 0?i:r.globals,this.environments=e,this.strictVariables=(s=n.strictVariables)!==null&&s!==void 0?s:this.opts.strictVariables}return t.prototype.getRegister=function(e){return this.registers[e]=this.registers[e]||{}},t.prototype.setRegister=function(e,r){return this.registers[e]=r},t.prototype.saveRegister=function(){for(var e=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.map(function(i){return[i,e.getRegister(i)]})},t.prototype.restoreRegister=function(e){var r=this;return e.forEach(function(n){var i=_e(n,2),s=i[0],a=i[1];return r.setRegister(s,a)})},t.prototype.getAll=function(){return Ve([this.globals,this.environments],_e(this.scopes),!1).reduce(function(e,r){return ze(e,r)},{})},t.prototype.get=function(e){var r=this.findScope(e[0]);return this.getFromScope(r,e)},t.prototype.getFromScope=function(e,r){var n=this;return kt(r)&&(r=r.split(".")),r.reduce(function(i,s,a){if(i=KD(i,s,n.opts.ownPropertyOnly),$r(i)&&n.strictVariables)throw new zD(r.slice(0,a+1).join("."));return i},e)},t.prototype.push=function(e){return this.scopes.push(e)},t.prototype.pop=function(){return this.scopes.pop()},t.prototype.bottom=function(){return this.scopes[0]},t.prototype.findScope=function(e){for(var r=this.scopes.length-1;r>=0;r--){var n=this.scopes[r];if(e in n)return n}return e in this.environments?this.environments:this.globals},t}();function KD(t,e,r){if($r(t))return t;t=Zc(t);var n=XD(t,e,r);return It(n)?n.call(t):t instanceof xr?t.hasOwnProperty(e)?t[e]:t.liquidMethodMissing(e):e==="size"?ZD(t):e==="first"?QD(t):e==="last"?JD(t):n}function XD(t,e,r){if(!(r&&!Object.hasOwnProperty.call(t,e)))return t[e]}function QD(t){return pt(t)?t[0]:t.first}function JD(t){return pt(t)?t[t.length-1]:t.last}function ZD(t){if(t.hasOwnProperty("size")||t.size!==void 0)return t.size;if(pt(t)||kt(t))return t.length;if(typeof t=="object")return Object.keys(t).length}function ke(t,e){if(!t){var r=typeof e=="function"?e():e||"expect ".concat(t," to be true");throw new VD(r)}}var or;(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(or||(or={}));var ew=function(){function t(e){if(this.options=e,e.relativeReference){var r=e.fs.sep;ke(r,"`fs.sep` is required for relative reference");var n=new RegExp(["."+r,".."+r,"./","../"].map(function(i){return SD(i)}).join("|"));this.shouldLoadRelative=function(i){return n.test(i)}}else this.shouldLoadRelative=function(i){return!1};this.contains=this.options.fs.contains||function(){return!0}}return t.prototype.lookup=function(e,r,n,i){var s,a,o,u,l,h,f,c,m;return X(this,function(p){switch(p.label){case 0:s=this.options.fs,a=this.options[r],p.label=1;case 1:p.trys.push([1,8,9,10]),o=Pe(this.candidates(e,a,i,r!==or.Root)),u=o.next(),p.label=2;case 2:return u.done?[3,7]:(l=u.value,n?(h=s.existsSync(l),[3,5]):[3,3]);case 3:return[4,s.exists(l)];case 4:h=p.sent(),p.label=5;case 5:if(h)return[2,l];p.label=6;case 6:return u=o.next(),[3,2];case 7:return[3,10];case 8:return f=p.sent(),c={error:f},[3,10];case 9:try{u&&!u.done&&(m=o.return)&&m.call(o)}finally{if(c)throw c.error}return[7];case 10:throw this.lookupError(e,a)}})},t.prototype.candidates=function(e,r,n,i){var s,a,o,p,u,l,m,h,f,c,m,p,y,b,D,_,R,S;return X(this,function(v){switch(v.label){case 0:if(s=this.options,a=s.fs,o=s.extname,!(this.shouldLoadRelative(e)&&n))return[3,8];p=a.resolve(this.dirname(n),e,o),v.label=1;case 1:v.trys.push([1,6,7,8]),u=Pe(r),l=u.next(),v.label=2;case 2:return l.done?[3,5]:(m=l.value,!i||this.contains(m,p)?[4,p]:[3,4]);case 3:return v.sent(),[3,5];case 4:return l=u.next(),[3,2];case 5:return[3,8];case 6:return h=v.sent(),D={error:h},[3,8];case 7:try{l&&!l.done&&(_=u.return)&&_.call(u)}finally{if(D)throw D.error}return[7];case 8:v.trys.push([8,13,14,15]),f=Pe(r),c=f.next(),v.label=9;case 9:return c.done?[3,12]:(m=c.value,p=a.resolve(m,e,o),!i||this.contains(m,p)?[4,p]:[3,11]);case 10:v.sent(),v.label=11;case 11:return c=f.next(),[3,9];case 12:return[3,15];case 13:return y=v.sent(),R={error:y},[3,15];case 14:try{c&&!c.done&&(S=f.return)&&S.call(f)}finally{if(R)throw R.error}return[7];case 15:return a.fallback===void 0?[3,17]:(b=a.fallback(e),b===void 0?[3,17]:[4,b]);case 16:v.sent(),v.label=17;case 17:return[2]}})},t.prototype.dirname=function(e){var r=this.options.fs;return ke(r.dirname,"`fs.dirname` is required for relative reference"),r.dirname(e)},t.prototype.lookupError=function(e,r){var n=new Error("ENOENT");return n.message='ENOENT: Failed to lookup "'.concat(e,'" in "').concat(r,'"'),n.code="ENOENT",n},t}(),tw=function(){function t(){this.buffer=""}return t.prototype.write=function(e){this.buffer+=fe(e)},t}(),rw=function(){function t(){this.buffer="",this.stream=new(require("stream")).PassThrough}return t.prototype.write=function(e){this.stream.write(fe(e))},t.prototype.error=function(e){this.stream.emit("error",e)},t.prototype.end=function(){this.stream.end()},t}();function gi(t){var e={then:function(r){return r(t)},catch:function(){return e}};return e}function dh(t){var e={then:function(r,n){return n?n(t):e},catch:function(r){return r(t)}};return e}function nw(t){return t&&It(t.then)}function iw(t){return t&&It(t.next)&&It(t.throw)&&It(t.return)}function un(t){if(nw(t))return t;if(iw(t))return e();return gi(t);function e(r){var n;try{n=t.next(r)}catch(i){return dh(i)}return n.done?gi(n.value):un(n.value).then(e,function(i){var s;try{s=t.throw(i)}catch(a){return dh(a)}return s.done?gi(s.value):e(s.value)})}}function yi(t){return Promise.resolve(un(t))}function vi(t){var e;return un(t).then(function(r){return e=r,gi(e)}).catch(function(r){throw r}),e}var sw=function(){function t(){this.buffer=""}return t.prototype.write=function(e){e=sr(e),typeof e!="string"&&this.buffer===""?this.buffer=e:this.buffer=fe(this.buffer)+fe(e)},t}(),aw=function(){function t(){}return t.prototype.renderTemplatesToNodeStream=function(e,r){var n=this,i=new rw;return Promise.resolve().then(function(){return un(n.renderTemplates(e,r,i))}).then(function(){return i.end()},function(s){return i.error(s)}),i.stream},t.prototype.renderTemplates=function(e,r,n){var i,s,a,o,u,l,h,f,c;return X(this,function(m){switch(m.label){case 0:n||(n=r.opts.keepOutputType?new sw:new tw),m.label=1;case 1:m.trys.push([1,8,9,10]),i=Pe(e),s=i.next(),m.label=2;case 2:if(s.done)return[3,7];a=s.value,m.label=3;case 3:return m.trys.push([3,5,,6]),[4,a.render(r,n)];case 4:return o=m.sent(),o&&n.write(o),n.break||n.continue?[3,7]:[3,6];case 5:throw u=m.sent(),l=fh.is(u)?u:new fh(u,a),l;case 6:return s=i.next(),[3,2];case 7:return[3,10];case 8:return h=m.sent(),f={error:h},[3,10];case 9:try{s&&!s.done&&(c=i.return)&&c.call(i)}finally{if(f)throw f.error}return[7];case 10:return[2,n.buffer]}})},t}(),ue;(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.Delimited=12]="Delimited"})(ue||(ue={}));function ow(t){return!!(mt(t)&ue.Delimited)}function ph(t){return mt(t)===ue.Operator}function xa(t){return mt(t)===ue.HTML}function uw(t){return mt(t)===ue.Output}function $a(t){return mt(t)===ue.Tag}function mh(t){return mt(t)===ue.Quoted}function lw(t){return mt(t)===ue.Literal}function cw(t){return mt(t)===ue.Number}function hw(t){return mt(t)===ue.PropertyAccess}function fw(t){return mt(t)===ue.Word}function dw(t){return mt(t)===ue.Range}function mt(t){return t?t.kind:-1}var pw=function(){function t(e,r){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=r}return t.prototype.on=function(e,r){return this.handlers[e]=r,this},t.prototype.trigger=function(e,r){var n=this.handlers[e];return n?(n.call(this,r),!0):!1},t.prototype.start=function(){this.trigger("start");for(var e;!this.stopRequested&&(e=this.tokens.shift());)if(!this.trigger("token",e)&&!($a(e)&&this.trigger("tag:".concat(e.name),e))){var r=this.parseToken(e,this.tokens);this.trigger("template",r)}return this.stopRequested||this.trigger("end"),this},t.prototype.stop=function(){return this.stopRequested=!0,this},t}(),Oa=function(){function t(e){this.token=e}return t}(),mw=function(t){te(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.equals=function(r){return $r(sr(r))},e.prototype.gt=function(){return!1},e.prototype.geq=function(){return!1},e.prototype.lt=function(){return!1},e.prototype.leq=function(){return!1},e.prototype.valueOf=function(){return null},e}(xr),gh=function(t){te(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.equals=function(r){return r instanceof e?!1:(r=sr(r),kt(r)||pt(r)?r.length===0:rh(r)?Object.keys(r).length===0:!1)},e.prototype.gt=function(){return!1},e.prototype.geq=function(){return!1},e.prototype.lt=function(){return!1},e.prototype.leq=function(){return!1},e.prototype.valueOf=function(){return""},e}(xr),gw=function(t){te(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.equals=function(r){return r===!1||$r(sr(r))?!0:kt(r)?/^\s*$/.test(r):t.prototype.equals.call(this,r)},e}(gh),yh=new mw,vh={true:!0,false:!1,nil:yh,null:yh,empty:new gh,blank:new gw},yw=/[\da-fA-F]/,bh=/[0-7]/,Dh={b:"\b",f:"\f",n:`
|
|
87
|
+
`,r:"\r",t:" ",v:"\v"};function wh(t){var e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function Eh(t){for(var e="",r=1;r<t.length-1;r++){if(t[r]!=="\\"){e+=t[r];continue}if(Dh[t[r+1]]!==void 0)e+=Dh[t[++r]];else if(t[r+1]==="u"){for(var n=0,i=r+2;i<=r+5&&yw.test(t[i]);)n=n*16+wh(t[i++]);r=i-1,e+=String.fromCharCode(n)}else if(!bh.test(t[r+1]))e+=t[++r];else{for(var i=r+1,n=0;i<=r+3&&bh.test(t[i]);)n=n*8+wh(t[i++]);r=i-1,e+=String.fromCharCode(n)}}return e}var vw=function(){function t(e){this.postfix=Ve([],_e(Sw(e)),!1)}return t.prototype.evaluate=function(e,r){var n,i,s,a,o,u,l,h,f,c,m,p;return X(this,function(y){switch(y.label){case 0:ke(e,"unable to evaluate: context not defined"),n=[],y.label=1;case 1:y.trys.push([1,9,10,11]),i=Pe(this.postfix),s=i.next(),y.label=2;case 2:return s.done?[3,8]:(a=s.value,ph(a)?[4,n.pop()]:[3,5]);case 3:return o=y.sent(),[4,n.pop()];case 4:return u=y.sent(),l=ww(e.opts.operators,a,u,o,e),n.push(l),[3,7];case 5:return f=(h=n).push,[4,Me(a,e,r&&this.postfix.length===1)];case 6:f.apply(h,[y.sent()]),y.label=7;case 7:return s=i.next(),[3,2];case 8:return[3,11];case 9:return c=y.sent(),m={error:c},[3,11];case 10:try{s&&!s.done&&(p=i.return)&&p.call(i)}finally{if(m)throw m.error}return[7];case 11:return[2,n[0]]}})},t}();function Me(t,e,r){if(r===void 0&&(r=!1),hw(t))return bw(t,e,r);if(dw(t))return _w(t,e);if(lw(t))return Ew(t);if(cw(t))return Dw(t);if(fw(t))return t.getText();if(mh(t))return Fa(t)}function bw(t,e,r){var n=t.props.map(function(i){return Me(i,e,!1)});try{return e.get(Ve([t.propertyName],_e(n),!1))}catch(i){if(r&&i.name==="InternalUndefinedVariableError")return null;throw new GD(i,t)}}function Dw(t){var e=t.whole.content+"."+(t.decimal?t.decimal.content:"");return Number(e)}function Fa(t){return Eh(t.getText())}function ww(t,e,r,n,i){var s=t[e.operator];return s(r,n,i)}function Ew(t){return vh[t.literal]}function _w(t,e){var r=Me(t.lhs,e),n=Me(t.rhs,e);return nh(+r,+n+1)}function Sw(t){var e,r,n,i,s,a,o;return X(this,function(u){switch(u.label){case 0:e=[],u.label=1;case 1:u.trys.push([1,10,11,12]),r=Pe(t),n=r.next(),u.label=2;case 2:if(n.done)return[3,9];if(i=n.value,!ph(i))return[3,6];u.label=3;case 3:return e.length&&e[e.length-1].getPrecedence()>i.getPrecedence()?[4,e.pop()]:[3,5];case 4:return u.sent(),[3,3];case 5:return e.push(i),[3,8];case 6:return[4,i];case 7:u.sent(),u.label=8;case 8:return n=r.next(),[3,2];case 9:return[3,12];case 10:return s=u.sent(),a={error:s},[3,12];case 11:try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(a)throw a.error}return[7];case 12:return e.length?[4,e.pop()]:[3,14];case 13:return u.sent(),[3,12];case 14:return[2]}})}var gt=function(){function t(e,r,n,i,s){this.kind=e,this.input=r,this.begin=n,this.end=i,this.file=s}return t.prototype.getText=function(){return this.input.slice(this.begin,this.end)},t.prototype.getPosition=function(){for(var e=_e([1,1],2),r=e[0],n=e[1],i=0;i<this.begin;i++)this.input[i]===`
|
|
88
|
+
`?(r++,n=1):n++;return[r,n]},t.prototype.size=function(){return this.end-this.begin},t}(),Pa=function(t){te(e,t);function e(r,n,i,s,a,o,u,l){var h=t.call(this,r,i,s,a,l)||this;h.trimLeft=!1,h.trimRight=!1,h.content=h.getText();var f=n[0]==="-",c=th(n)==="-";return h.content=n.slice(f?1:0,c?-1:n.length).trim(),h.trimLeft=f||o,h.trimRight=c||u,h}return e}(gt);function Cw(t,e){for(var r=!1,n=0;n<t.length;n++){var i=t[n];!ow(i)||(!r&&i.trimLeft&&Aw(t[n-1],e.greedy),$a(i)&&(i.name==="raw"?r=!0:i.name==="endraw"&&(r=!1)),!r&&i.trimRight&&Rw(t[n+1],e.greedy))}}function Aw(t,e){if(!(!t||!xa(t)))for(var r=e?di:ch;oe[t.input.charCodeAt(t.end-1-t.trimRight)]&r;)t.trimRight++}function Rw(t,e){if(!(!t||!xa(t))){for(var r=e?di:ch;oe[t.input.charCodeAt(t.begin+t.trimLeft)]&r;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
|
|
89
|
+
`&&t.trimLeft++}}var Tw=function(t){te(e,t);function e(r,n){var i=t.call(this,ue.Number,r.input,r.begin,n?n.end:r.end,r.file)||this;return i.whole=r,i.decimal=n,i}return e}(gt),bi=function(t){te(e,t);function e(r,n,i,s){var a=t.call(this,ue.Word,r,n,i,s)||this;return a.input=r,a.begin=n,a.end=i,a.file=s,a.content=a.getText(),a}return e.prototype.isNumber=function(r){r===void 0&&(r=!1);for(var n=r&&oe[this.input.charCodeAt(this.begin)]&HD?this.begin+1:this.begin,i=n;i<this.end;i++)if(!(oe[this.input.charCodeAt(i)]&jD))return!1;return!0},e}(gt),xw=function(t){te(e,t);function e(r,n,i,s){var a=t.call(this,ue.Literal,r,n,i,s)||this;return a.input=r,a.begin=n,a.end=i,a.file=s,a.literal=a.getText(),a}return e}(gt),_h={"==":1,"!=":1,">":1,"<":1,">=":1,"<=":1,contains:1,and:0,or:0},$w=function(t){te(e,t);function e(r,n,i,s){var a=t.call(this,ue.Operator,r,n,i,s)||this;return a.input=r,a.begin=n,a.end=i,a.file=s,a.operator=a.getText(),a}return e.prototype.getPrecedence=function(){var r=this.getText();return r in _h?_h[r]:1},e}(gt),Sh=function(t){te(e,t);function e(r,n,i){var s=t.call(this,ue.PropertyAccess,r.input,r.begin,i,r.file)||this;return s.variable=r,s.props=n,s.propertyName=s.variable instanceof bi?s.variable.getText():Eh(s.variable.getText()),s}return e}(gt),Ow=function(t){te(e,t);function e(r,n,i,s,a,o){var u=t.call(this,ue.Filter,i,s,a,o)||this;return u.name=r,u.args=n,u}return e}(gt),Fw=function(t){te(e,t);function e(r,n,i,s,a,o){var u=t.call(this,ue.Hash,r,n,i,o)||this;return u.input=r,u.begin=n,u.end=i,u.name=s,u.value=a,u.file=o,u}return e}(gt),Pw=function(t){te(e,t);function e(r,n,i,s){var a=t.call(this,ue.Quoted,r,n,i,s)||this;return a.input=r,a.begin=n,a.end=i,a.file=s,a}return e}(gt),Ch=function(t){te(e,t);function e(r,n,i,s){var a=t.call(this,ue.HTML,r,n,i,s)||this;return a.input=r,a.begin=n,a.end=i,a.file=s,a.trimLeft=0,a.trimRight=0,a}return e.prototype.getContent=function(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)},e}(gt),kw=function(t){te(e,t);function e(r,n,i,s,a,o){var u=t.call(this,ue.Range,r,n,i,o)||this;return u.input=r,u.begin=n,u.end=i,u.lhs=s,u.rhs=a,u.file=o,u}return e}(gt),Iw=function(t){te(e,t);function e(r,n,i,s,a){var o=this,u=s.trimOutputLeft,l=s.trimOutputRight,h=s.outputDelimiterLeft,f=s.outputDelimiterRight,c=r.slice(n+h.length,i-f.length);return o=t.call(this,ue.Output,c,r,n,i,u,l,a)||this,o}return e}(Pa);function Lw(t,e,r,n){n===void 0&&(n=t.length);for(var i=r,s=e,a;i[t[s]]&&s<n;)i=i[t[s++]],i.end&&(a=i);return!a||a.needBoundary&&oe[t.charCodeAt(s)]&Aa?-1:s}var Bw=function(t){te(e,t);function e(r,n,i,s,a){var o=this,u=r.slice(n,i);if(o=t.call(this,ue.Tag,u,r,n,i,!1,!1,a)||this,!/\S/.test(u))o.name="",o.args="";else{var l=new Ie(o.content,s.operatorsTrie);if(o.name=l.readIdentifier().getText(),!o.name)throw new Ra("illegal liquid tag syntax",o);l.skipBlank(),o.args=l.remaining()}return o}return e}(Pa),Ie=function(){function t(e,r,n){n===void 0&&(n=""),this.input=e,this.trie=r,this.file=n,this.p=0,this.rawBeginAt=-1,this.N=e.length}return t.prototype.readExpression=function(){return new vw(this.readExpressionTokens())},t.prototype.readExpressionTokens=function(){var e,r,n;return X(this,function(i){switch(i.label){case 0:return e=this.readValue(),e?[4,e]:[2];case 1:i.sent(),i.label=2;case 2:return this.p<this.N?(r=this.readOperator(),r?(n=this.readValue(),n?[4,r]:[2]):[2]):[3,5];case 3:return i.sent(),[4,n];case 4:return i.sent(),[3,2];case 5:return[2]}})},t.prototype.readOperator=function(){this.skipBlank();var e=Lw(this.input,this.p,this.trie);if(e!==-1)return new $w(this.input,this.p,this.p=e,this.file)},t.prototype.readFilters=function(){for(var e=[];;){var r=this.readFilter();if(!r)return e;e.push(r)}},t.prototype.readFilter=function(){var e=this;if(this.skipBlank(),this.end())return null;ke(this.peek()==="|",function(){return"unexpected token at ".concat(e.snapshot())}),this.p++;var r=this.p,n=this.readIdentifier();if(!n.size())return null;var i=[];if(this.skipBlank(),this.peek()===":")do{++this.p;var s=this.readFilterArg();for(s&&i.push(s);this.p<this.N&&this.peek()!==","&&this.peek()!=="|";)++this.p}while(this.peek()===",");return new Ow(n.getText(),i,this.input,r,this.p,this.file)},t.prototype.readFilterArg=function(){var e=this.readValue();if(!!e){if(this.skipBlank(),this.peek()!==":")return e;++this.p;var r=this.readValue();return[e.getText(),r]}},t.prototype.readTopLevelTokens=function(e){e===void 0&&(e=Or);for(var r=[];this.p<this.N;){var n=this.readTopLevelToken(e);r.push(n)}return Cw(r,e),r},t.prototype.readTopLevelToken=function(e){var r=e.tagDelimiterLeft,n=e.outputDelimiterLeft;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(r)?this.readTagToken(e):this.match(n)?this.readOutputToken(e):this.readHTMLToken([r,n])},t.prototype.readHTMLToken=function(e){for(var r=this,n=this.p;this.p<this.N&&!e.some(function(i){return r.match(i)});)++this.p;return new Ch(this.input,n,this.p,this.file)},t.prototype.readTagToken=function(e){e===void 0&&(e=Or);var r=this,n=r.file,i=r.input,s=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.mkError("tag ".concat(this.snapshot(s)," not closed"),s);var a=new Ah(i,s,this.p,e,n);return a.name==="raw"&&(this.rawBeginAt=s),a},t.prototype.readToDelimiter=function(e){for(;this.p<this.N;){if(this.peekType()&lh){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1},t.prototype.readOutputToken=function(e){e===void 0&&(e=Or);var r=this,n=r.file,i=r.input,s=e.outputDelimiterRight,a=this.p;if(this.readToDelimiter(s)===-1)throw this.mkError("output ".concat(this.snapshot(a)," not closed"),a);return new Iw(i,a,this.p,e,n)},t.prototype.readEndrawOrRawContent=function(e){for(var r=e.tagDelimiterLeft,n=e.tagDelimiterRight,i=this.p,s=this.readTo(r)-r.length;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){s=this.readTo(r)-r.length;continue}for(;this.p<=this.N;){if(this.rmatch(n)){var a=this.p;return i===s?(this.rawBeginAt=-1,new Ah(this.input,i,a,e,this.file)):(this.p=s,new Ch(this.input,i,s,this.file))}if(this.rmatch(r))break;this.p++}}throw this.mkError("raw ".concat(this.snapshot(this.rawBeginAt)," not closed"),i)},t.prototype.readLiquidTagTokens=function(e){e===void 0&&(e=Or);for(var r=[];this.p<this.N;){var n=this.readLiquidTagToken(e);n.name&&r.push(n)}return r},t.prototype.readLiquidTagToken=function(e){var r=this,n=r.file,i=r.input,s=this.p,a=this.N;this.readToDelimiter(`
|
|
90
|
+
`)!==-1&&(a=this.p);var o=new Bw(i,s,a,e,n);return o},t.prototype.mkError=function(e,r){return new Ra(e,new bi(this.input,r,this.N,this.file))},t.prototype.snapshot=function(e){return e===void 0&&(e=this.p),JSON.stringify(TD(this.input.slice(e),16))},t.prototype.readWord=function(){return console.warn("Tokenizer#readWord() will be removed, use #readIdentifier instead"),this.readIdentifier()},t.prototype.readIdentifier=function(){this.skipBlank();for(var e=this.p;this.peekType()&Aa;)++this.p;return new bi(this.input,e,this.p,this.file)},t.prototype.readHashes=function(e){for(var r=[];;){var n=this.readHash(e);if(!n)return r;r.push(n)}},t.prototype.readHash=function(e){this.skipBlank(),this.peek()===","&&++this.p;var r=this.p,n=this.readIdentifier();if(!!n.size()){var i;this.skipBlank();var s=e?"=":":";return this.peek()===s&&(++this.p,i=this.readValue()),new Fw(this.input,r,this.p,n,i,this.file)}},t.prototype.remaining=function(){return this.input.slice(this.p)},t.prototype.advance=function(e){e===void 0&&(e=1),this.p+=e},t.prototype.end=function(){return this.p>=this.N},t.prototype.readTo=function(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1},t.prototype.readValue=function(){var e=this.readQuoted()||this.readRange();if(e)return e;if(this.peek()==="["){this.p++;var r=this.readQuoted();return!r||this.peek()!=="]"?void 0:(this.p++,new Sh(r,[],this.p))}var n=this.readIdentifier();if(!!n.size()){for(var i=n.isNumber(!0),s=[];;)if(this.peek()==="["){i=!1,this.p++;var r=this.readValue()||new bi(this.input,this.p,this.p,this.file);this.readTo("]"),s.push(r)}else if(this.peek()==="."&&this.peek(1)!=="."){this.p++;var r=this.readIdentifier();if(!r.size())break;r.isNumber()||(i=!1),s.push(r)}else break;return!s.length&&vh.hasOwnProperty(n.content)?new xw(this.input,n.begin,n.end,this.file):i?new Tw(n,s[0]):new Sh(n,s,this.p)}},t.prototype.readRange=function(){this.skipBlank();var e=this.p;if(this.peek()==="("){++this.p;var r=this.readValueOrThrow();this.p+=2;var n=this.readValueOrThrow();return++this.p,new kw(this.input,e,this.p,r,n,this.file)}},t.prototype.readValueOrThrow=function(){var e=this,r=this.readValue();return ke(r,function(){return"unexpected token ".concat(e.snapshot(),", value expected")}),r},t.prototype.readQuoted=function(){this.skipBlank();var e=this.p;if(!!(this.peekType()&lh)){++this.p;for(var r=!1;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!r));)r?r=!1:this.input[this.p-1]==="\\"&&(r=!0);return new Pw(this.input,e,this.p,this.file)}},t.prototype.readFileNameTemplate=function(e){var r,n,i;return X(this,function(s){switch(s.label){case 0:r=e.outputDelimiterLeft,n=[","," ",r],i=new Set(n),s.label=1;case 1:return this.p<this.N&&!i.has(this.peek())?[4,this.match(r)?this.readOutputToken(e):this.readHTMLToken(n)]:[3,3];case 2:return s.sent(),[3,1];case 3:return[2]}})},t.prototype.match=function(e){for(var r=0;r<e.length;r++)if(e[r]!==this.input[this.p+r])return!1;return!0},t.prototype.rmatch=function(e){for(var r=0;r<e.length;r++)if(e[e.length-1-r]!==this.input[this.p-1-r])return!1;return!0},t.prototype.peekType=function(e){return e===void 0&&(e=0),oe[this.input.charCodeAt(this.p+e)]},t.prototype.peek=function(e){return e===void 0&&(e=0),this.input[this.p+e]},t.prototype.skipBlank=function(){for(;this.peekType()&di;)++this.p},t}(),Ah=function(t){te(e,t);function e(r,n,i,s,a){var o=this,u=s.trimTagLeft,l=s.trimTagRight,h=s.tagDelimiterLeft,f=s.tagDelimiterRight,c=r.slice(n+h.length,i-f.length);o=t.call(this,ue.Tag,c,r,n,i,u,l,a)||this;var m=new Ie(o.content,s.operatorsTrie);if(o.name=m.readIdentifier().getText(),!o.name)throw new Ra("illegal tag syntax",o);return m.skipBlank(),o.args=m.remaining(),o}return e}(Pa),Fr=function(){function t(e,r){var n,i;this.hash={};var s=new Ie(e,{});try{for(var a=Pe(s.readHashes(r)),o=a.next();!o.done;o=a.next()){var u=o.value;this.hash[u.name.content]=u.value}}catch(l){n={error:l}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}}return t.prototype.render=function(e){var r,n,i,s,a,o,u,l,h,f;return X(this,function(c){switch(c.label){case 0:r={},c.label=1;case 1:c.trys.push([1,8,9,10]),n=Pe(Object.keys(this.hash)),i=n.next(),c.label=2;case 2:return i.done?[3,7]:(s=i.value,a=r,o=s,this.hash[s]!==void 0?[3,3]:(u=!0,[3,5]));case 3:return[4,Me(this.hash[s],e)];case 4:u=c.sent(),c.label=5;case 5:a[o]=u,c.label=6;case 6:return i=n.next(),[3,2];case 7:return[3,10];case 8:return l=c.sent(),h={error:l},[3,10];case 9:try{i&&!i.done&&(f=n.return)&&f.call(n)}finally{if(h)throw h.error}return[7];case 10:return[2,r]}})},t}();function Nw(t){return pt(t)}var Rh=function(){function t(e,r,n,i){this.name=e,this.impl=r||AD,this.args=n,this.liquid=i}return t.prototype.render=function(e,r){var n,i,s=[];try{for(var a=Pe(this.args),o=a.next();!o.done;o=a.next()){var u=o.value;Nw(u)?s.push([u[0],Me(u[1],r)]):s.push(Me(u,r))}}catch(l){n={error:l}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return this.impl.apply({context:r,liquid:this.liquid},Ve([e],_e(s),!1))},t}(),Vt=function(){function t(e,r){this.filters=[];var n=new Ie(e,r.options.operatorsTrie);this.initial=n.readExpression(),this.filters=n.readFilters().map(function(i){var s=i.name,a=i.args;return new Rh(s,r.filters.get(s),a,r)})}return t.prototype.value=function(e,r){var n,i,s,a,o,u,l;return X(this,function(h){switch(h.label){case 0:return r=r||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default",[4,this.initial.evaluate(e,r)];case 1:n=h.sent(),h.label=2;case 2:h.trys.push([2,7,8,9]),i=Pe(this.filters),s=i.next(),h.label=3;case 3:return s.done?[3,6]:(a=s.value,[4,a.render(n,e)]);case 4:n=h.sent(),h.label=5;case 5:return s=i.next(),[3,3];case 6:return[3,9];case 7:return o=h.sent(),u={error:o},[3,9];case 8:try{s&&!s.done&&(l=i.return)&&l.call(i)}finally{if(u)throw u.error}return[7];case 9:return[2,n]}})},t}(),Mw=function(t){te(e,t);function e(r,n,i){var s=t.call(this,r)||this;s.name=r.name;var a=i.tags.get(r.name);return s.impl=Object.create(a),s.impl.liquid=i,s.impl.parse&&s.impl.parse(r,n),s}return e.prototype.render=function(r,n){var i,s;return X(this,function(a){switch(a.label){case 0:return[4,new Fr(this.token.args).render(r)];case 1:return i=a.sent(),s=this.impl,It(s.render)?[4,s.render(r,n,i)]:[3,3];case 2:return[2,a.sent()];case 3:return[2]}})},e}(Oa),jw=function(t){te(e,t);function e(r,n){var i=t.call(this,r)||this;return i.value=new Vt(r.content,n),i}return e.prototype.render=function(r,n){var i;return X(this,function(s){switch(s.label){case 0:return[4,this.value.value(r,!1)];case 1:return i=s.sent(),n.write(i),[2]}})},e}(Oa),Hw=function(t){te(e,t);function e(r){var n=t.call(this,r)||this;return n.str=r.getContent(),n}return e.prototype.render=function(r,n){return X(this,function(i){return n.write(this.str),[2]})},e}(Oa),Uw=function(){function t(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new ew(this.liquid.options)}return t.prototype.parse=function(e,r){var n=new Ie(e,this.liquid.options.operatorsTrie,r),i=n.readTopLevelTokens(this.liquid.options);return this.parseTokens(i)},t.prototype.parseTokens=function(e){for(var r,n=[];r=e.shift();)n.push(this.parseToken(r,e));return n},t.prototype.parseToken=function(e,r){try{return $a(e)?new Mw(e,r,this.liquid):uw(e)?new jw(e,this.liquid):new Hw(e)}catch(n){throw new qD(n,e)}},t.prototype.parseStream=function(e){var r=this;return new pw(e,function(n,i){return r.parseToken(n,i)})},t.prototype._parseFileCached=function(e,r,n,i){var s,a,o;return n===void 0&&(n=or.Root),X(this,function(u){switch(u.label){case 0:return s=this.loader.shouldLoadRelative(e)?i+","+e:n+":"+e,[4,this.cache.read(s)];case 1:if(a=u.sent(),a)return[2,a];o=un(this._parseFile(e,r,n,i)),this.cache.write(s,o),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,o];case 3:return[2,u.sent()];case 4:return u.sent(),this.cache.remove(s),[3,5];case 5:return[2,[]]}})},t.prototype._parseFile=function(e,r,n,i){var s,a,o,u;return n===void 0&&(n=or.Root),X(this,function(l){switch(l.label){case 0:return[4,this.loader.lookup(e,n,r,i)];case 1:return s=l.sent(),o=(a=this.liquid).parse,r?(u=this.fs.readFileSync(s),[3,4]):[3,2];case 2:return[4,this.fs.readFile(s)];case 3:u=l.sent(),l.label=4;case 4:return[2,o.apply(a,[u,s])]}})},t}(),qw={parse:function(t){var e=new Ie(t.args,this.liquid.options.operatorsTrie);this.key=e.readIdentifier().content,e.skipBlank(),ke(e.peek()==="=",function(){return"illegal token ".concat(t.getText())}),e.advance(),this.value=e.remaining()},render:function(t){var e,r;return X(this,function(n){switch(n.label){case 0:return e=t.bottom(),r=this.key,[4,this.liquid._evalValue(this.value,t)];case 1:return e[r]=n.sent(),[2]}})}};function ka(t){return pt(t)?t:kt(t)&&t.length>0?[t]:rh(t)?Object.keys(t).map(function(e){return[e,t[e]]}):[]}function ln(t){return pt(t)?t:[t]}var Ia=function(t){te(e,t);function e(r,n,i){var s=t.call(this)||this;return s.i=0,s.length=r,s.name="".concat(i,"-").concat(n),s}return e.prototype.next=function(){this.i++},e.prototype.index0=function(){return this.i},e.prototype.index=function(){return this.i+1},e.prototype.first=function(){return this.i===0},e.prototype.last=function(){return this.i===this.length-1},e.prototype.rindex=function(){return this.length-this.i},e.prototype.rindex0=function(){return this.length-this.i-1},e.prototype.valueOf=function(){return JSON.stringify(this)},e}(xr),Th=["offset","limit","reversed"],Gw={type:"block",parse:function(t,e){var r=this,n=new Ie(t.args,this.liquid.options.operatorsTrie),i=n.readIdentifier(),s=n.readIdentifier(),a=n.readValue();ke(i.size()&&s.content==="in"&&a,function(){return"illegal tag: ".concat(t.getText())}),this.variable=i.content,this.collection=a,this.hash=new Fr(n.remaining()),this.templates=[],this.elseTemplates=[];var o,u=this.liquid.parser.parseStream(e).on("start",function(){return o=r.templates}).on("tag:else",function(){return o=r.elseTemplates}).on("tag:endfor",function(){return u.stop()}).on("template",function(l){return o.push(l)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))});u.start()},render:function(t,e){var r,n,i,s,a,o,u,l,h,f,c,m,p;return X(this,function(y){switch(y.label){case 0:return r=this.liquid.renderer,i=ka,[4,Me(this.collection,t)];case 1:return n=i.apply(void 0,[y.sent()]),n.length?[3,3]:[4,r.renderTemplates(this.elseTemplates,t,e)];case 2:return y.sent(),[2];case 3:return s="continue-"+this.variable+"-"+this.collection.getText(),t.push({continue:t.getRegister(s)}),[4,this.hash.render(t)];case 4:a=y.sent(),t.pop(),o=this.liquid.options.orderedFilterParameters?Object.keys(a).filter(function(b){return Th.includes(b)}):Th.filter(function(b){return a[b]!==void 0}),n=o.reduce(function(b,D){return D==="offset"?Vw(b,a.offset):D==="limit"?Ww(b,a.limit):zw(b)},n),t.setRegister(s,(a.offset||0)+n.length),u={forloop:new Ia(n.length,this.collection.getText(),this.variable)},t.push(u),y.label=5;case 5:y.trys.push([5,10,11,12]),l=Pe(n),h=l.next(),y.label=6;case 6:return h.done?[3,9]:(f=h.value,u[this.variable]=f,[4,r.renderTemplates(this.templates,t,e)]);case 7:if(y.sent(),e.break)return e.break=!1,[3,9];e.continue=!1,u.forloop.next(),y.label=8;case 8:return h=l.next(),[3,6];case 9:return[3,12];case 10:return c=y.sent(),m={error:c},[3,12];case 11:try{h&&!h.done&&(p=l.return)&&p.call(l)}finally{if(m)throw m.error}return[7];case 12:return t.pop(),[2]}})}};function zw(t){return Ve([],_e(t),!1).reverse()}function Vw(t,e){return t.slice(e)}function Ww(t,e){return t.slice(0,e)}var Yw={parse:function(t,e){var r=this,n=new Ie(t.args,this.liquid.options.operatorsTrie);this.variable=Kw(n),ke(this.variable,function(){return"".concat(t.args," not valid identifier")}),this.templates=[];var i=this.liquid.parser.parseStream(e);i.on("tag:endcapture",function(){return i.stop()}).on("template",function(s){return r.templates.push(s)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}),i.start()},render:function(t){var e,r;return X(this,function(n){switch(n.label){case 0:return e=this.liquid.renderer,[4,e.renderTemplates(this.templates,t)];case 1:return r=n.sent(),t.bottom()[this.variable]=r,[2]}})}};function Kw(t){var e=t.readIdentifier().content;if(e)return e;var r=t.readQuoted();if(r)return Fa(r)}var Xw={parse:function(t,e){var r=this;this.cond=new Vt(t.args,this.liquid),this.cases=[],this.elseTemplates=[];var n=[],i=this.liquid.parser.parseStream(e).on("tag:when",function(s){n=[];for(var a=new Ie(s.args,r.liquid.options.operatorsTrie);!a.end();){var o=a.readValue();r.cases.push({val:o,templates:n}),a.readTo(",")}}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endcase",function(){return i.stop()}).on("template",function(s){return n.push(s)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))});i.start()},render:function(t,e){var r,n,i,s,a,o,u,l,h,f;return X(this,function(c){switch(c.label){case 0:return r=this.liquid.renderer,i=sr,[4,this.cond.value(t,t.opts.lenientIf)];case 1:n=i.apply(void 0,[c.sent()]),c.label=2;case 2:c.trys.push([2,7,8,9]),s=Pe(this.cases),a=s.next(),c.label=3;case 3:return a.done?[3,6]:(o=a.value,u=Me(o.val,t,t.opts.lenientIf),u!==n?[3,5]:[4,r.renderTemplates(o.templates,t,e)]);case 4:return c.sent(),[2];case 5:return a=s.next(),[3,3];case 6:return[3,9];case 7:return l=c.sent(),h={error:l},[3,9];case 8:try{a&&!a.done&&(f=s.return)&&f.call(s)}finally{if(h)throw h.error}return[7];case 9:return[4,r.renderTemplates(this.elseTemplates,t,e)];case 10:return c.sent(),[2]}})}},Qw={parse:function(t,e){var r=this.liquid.parser.parseStream(e);r.on("token",function(n){n.name==="endcomment"&&r.stop()}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}),r.start()}},La;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(La||(La={}));var cn=La,Jw={parseFilePath:Ba,renderFilePath:Na,parse:function(t){var e=t.args,r=new Ie(e,this.liquid.options.operatorsTrie);for(this.file=this.parseFilePath(r,this.liquid),this.currentFile=t.file;!r.end();){r.skipBlank();var n=r.p,i=r.readIdentifier();if((i.content==="with"||i.content==="for")&&(r.skipBlank(),r.peek()!==":")){var s=r.readValue();if(s){var a=r.p,o=r.readIdentifier(),u=void 0;o.content==="as"?u=r.readIdentifier():r.p=a,this[i.content]={value:s,alias:u&&u.content},r.skipBlank(),r.peek()===","&&r.advance();continue}}r.p=n;break}this.hash=new Fr(r.remaining())},render:function(t,e){var r,n,i,s,a,o,u,l,h,c,m,f,c,m,p,y,b,D,R,_,R,S,v;return X(this,function(d){switch(d.label){case 0:return r=this,n=r.liquid,i=r.hash,[4,this.renderFilePath(this.file,t,n)];case 1:return s=d.sent(),ke(s,function(){return'illegal filename "'.concat(s,'"')}),a=new Ta({},t.opts,{sync:t.sync,globals:t.globals,strictVariables:t.strictVariables}),o=a.bottom(),u=ze,l=[o],[4,i.render(t)];case 2:if(u.apply(void 0,l.concat([d.sent()])),this.with&&(h=this.with,c=h.value,m=h.alias,o[m||s]=Me(c,t)),!this.for)return[3,12];f=this.for,c=f.value,m=f.alias,p=Me(c,t),p=ka(p),o.forloop=new Ia(p.length,c.getText(),m),d.label=3;case 3:d.trys.push([3,9,10,11]),y=Pe(p),b=y.next(),d.label=4;case 4:return b.done?[3,8]:(D=b.value,o[m]=D,[4,n._parsePartialFile(s,a.sync,this.currentFile)]);case 5:return R=d.sent(),[4,n.renderer.renderTemplates(R,a,e)];case 6:d.sent(),o.forloop.next(),d.label=7;case 7:return b=y.next(),[3,4];case 8:return[3,11];case 9:return _=d.sent(),S={error:_},[3,11];case 10:try{b&&!b.done&&(v=y.return)&&v.call(y)}finally{if(S)throw S.error}return[7];case 11:return[3,15];case 12:return[4,n._parsePartialFile(s,a.sync,this.currentFile)];case 13:return R=d.sent(),[4,n.renderer.renderTemplates(R,a,e)];case 14:d.sent(),d.label=15;case 15:return[2]}})}};function Ba(t,e){if(e.options.dynamicPartials){var r=t.readValue();if(r===void 0)throw new TypeError('illegal argument "'.concat(t.input,'"'));if(r.getText()==="none")return null;if(mh(r)){var n=e.parse(Fa(r));return xh(n)}return r}var i=Ve([],_e(t.readFileNameTemplate(e.options)),!1),s=xh(e.parser.parseTokens(i));return s==="none"?null:s}function xh(t){return t.length===1&&xa(t[0].token)?t[0].token.getContent():t}function Na(t,e,r){return typeof t=="string"?t:Array.isArray(t)?r.renderer.renderTemplates(t,e):Me(t,e)}var Zw={parseFilePath:Ba,renderFilePath:Na,parse:function(t){var e=t.args,r=new Ie(e,this.liquid.options.operatorsTrie);this.file=this.parseFilePath(r,this.liquid),this.currentFile=t.file;var n=r.p,i=r.readIdentifier();i.content==="with"?(r.skipBlank(),r.peek()!==":"?this.withVar=r.readValue():r.p=n):r.p=n,this.hash=new Fr(r.remaining(),this.liquid.options.jekyllInclude)},render:function(t,e){var r,n,i,s,a,o,u,l,h;return X(this,function(f){switch(f.label){case 0:return r=this,n=r.liquid,i=r.hash,s=r.withVar,a=n.renderer,[4,this.renderFilePath(this.file,t,n)];case 1:return o=f.sent(),ke(o,function(){return'illegal filename "'.concat(o,'"')}),u=t.saveRegister("blocks","blockMode"),t.setRegister("blocks",{}),t.setRegister("blockMode",cn.OUTPUT),[4,i.render(t)];case 2:return l=f.sent(),s&&(l[o]=Me(s,t)),[4,n._parsePartialFile(o,t.sync,this.currentFile)];case 3:return h=f.sent(),t.push(t.opts.jekyllInclude?{include:l}:l),[4,a.renderTemplates(h,t,e)];case 4:return f.sent(),t.pop(),t.restoreRegister(u),[2]}})}},eE={parse:function(t){var e=new Ie(t.args,this.liquid.options.operatorsTrie);this.variable=e.readIdentifier().content},render:function(t,e){var r=t.environments;_a(r[this.variable])||(r[this.variable]=0),e.write(fe(--r[this.variable]))}},tE={parse:function(t){var e=new Ie(t.args,this.liquid.options.operatorsTrie),r=e.readValue();for(e.skipBlank(),this.candidates=[],r&&(e.peek()===":"?(this.group=r,e.advance()):this.candidates.push(r));!e.end();){var n=e.readValue();n&&this.candidates.push(n),e.readTo(",")}ke(this.candidates.length,function(){return"empty candidates: ".concat(t.getText())})},render:function(t,e){var r=Me(this.group,t),n="cycle:".concat(r,":")+this.candidates.join(","),i=t.getRegister("cycle"),s=i[n];s===void 0&&(s=i[n]=0);var a=this.candidates[s];s=(s+1)%this.candidates.length,i[n]=s;var o=Me(a,t);e.write(o)}},rE={parse:function(t,e){var r=this;this.branches=[],this.elseTemplates=[];var n;this.liquid.parser.parseStream(e).on("start",function(){return r.branches.push({predicate:new Vt(t.args,r.liquid),templates:n=[]})}).on("tag:elsif",function(i){return r.branches.push({predicate:new Vt(i.args,r.liquid),templates:n=[]})}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endif",function(){this.stop()}).on("template",function(i){return n.push(i)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}).start()},render:function(t,e){var r,n,i,s,a,o,u,l,h,f;return X(this,function(c){switch(c.label){case 0:r=this.liquid.renderer,c.label=1;case 1:c.trys.push([1,7,8,9]),n=Pe(this.branches),i=n.next(),c.label=2;case 2:return i.done?[3,6]:(s=i.value,a=s.predicate,o=s.templates,[4,a.value(t,t.opts.lenientIf)]);case 3:return u=c.sent(),ar(u,t)?[4,r.renderTemplates(o,t,e)]:[3,5];case 4:return c.sent(),[2];case 5:return i=n.next(),[3,2];case 6:return[3,9];case 7:return l=c.sent(),h={error:l},[3,9];case 8:try{i&&!i.done&&(f=n.return)&&f.call(n)}finally{if(h)throw h.error}return[7];case 9:return[4,r.renderTemplates(this.elseTemplates,t,e)];case 10:return c.sent(),[2]}})}},nE={parse:function(t){var e=new Ie(t.args,this.liquid.options.operatorsTrie);this.variable=e.readIdentifier().content},render:function(t,e){var r=t.environments;_a(r[this.variable])||(r[this.variable]=0);var n=r[this.variable];r[this.variable]++,e.write(fe(n))}},iE={parseFilePath:Ba,renderFilePath:Na,parse:function(t,e){var r=new Ie(t.args,this.liquid.options.operatorsTrie);this.file=this.parseFilePath(r,this.liquid),this.currentFile=t.file,this.hash=new Fr(r.remaining()),this.tpls=this.liquid.parser.parseTokens(e)},render:function(t,e){var r,n,i,s,a,o,u,l,h,f,c;return X(this,function(m){switch(m.label){case 0:return r=this,n=r.liquid,i=r.hash,s=r.file,a=n.renderer,s!==null?[3,2]:(t.setRegister("blockMode",cn.OUTPUT),[4,a.renderTemplates(this.tpls,t,e)]);case 1:return m.sent(),[2];case 2:return[4,this.renderFilePath(this.file,t,n)];case 3:return o=m.sent(),ke(o,function(){return'illegal filename "'.concat(o,'"')}),[4,n._parseLayoutFile(o,t.sync,this.currentFile)];case 4:return u=m.sent(),t.setRegister("blockMode",cn.STORE),[4,a.renderTemplates(this.tpls,t)];case 5:return l=m.sent(),h=t.getRegister("blocks"),h[""]===void 0&&(h[""]=function(p,y){return y.write(l)}),t.setRegister("blockMode",cn.OUTPUT),c=(f=t).push,[4,i.render(t)];case 6:return c.apply(f,[m.sent()]),[4,a.renderTemplates(u,t,e)];case 7:return m.sent(),t.pop(),[2]}})}},$h=function(t){te(e,t);function e(r){r===void 0&&(r=function(){return""});var n=t.call(this)||this;return n.superBlockRender=r,n}return e.prototype.super=function(){return this.superBlockRender()},e}(xr),sE={parse:function(t,e){var r=this,n=/\w+/.exec(t.args);this.block=n?n[0]:"",this.tpls=[],this.liquid.parser.parseStream(e).on("tag:endblock",function(){this.stop()}).on("template",function(i){return r.tpls.push(i)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}).start()},render:function(t,e){var r;return X(this,function(n){switch(n.label){case 0:return r=this.getBlockRender(t),t.getRegister("blockMode")!==cn.STORE?[3,1]:(t.getRegister("blocks")[this.block]=r,[3,3]);case 1:return[4,r(new $h,e)];case 2:n.sent(),n.label=3;case 3:return[2]}})},getBlockRender:function(t){var e=this,r=e.liquid,n=e.tpls,i=t.getRegister("blocks")[this.block],s=function(a,o){return X(this,function(u){switch(u.label){case 0:return t.push({block:a}),[4,r.renderer.renderTemplates(n,t,o)];case 1:return u.sent(),t.pop(),[2]}})};return i?function(a,o){return i(new $h(function(){return s(a,o)}),o)}:s}},aE={parse:function(t,e){var r=this;this.tokens=[];var n=this.liquid.parser.parseStream(e);n.on("token",function(i){i.name==="endraw"?n.stop():r.tokens.push(i)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}),n.start()},render:function(){return this.tokens.map(function(t){return t.getText()}).join("")}},oE=function(t){te(e,t);function e(r,n,i,s){var a=t.call(this,r,i,s)||this;return a.length=r,a.cols=n,a}return e.prototype.row=function(){return Math.floor(this.i/this.cols)+1},e.prototype.col0=function(){return this.i%this.cols},e.prototype.col=function(){return this.col0()+1},e.prototype.col_first=function(){return this.col0()===0},e.prototype.col_last=function(){return this.col()===this.cols},e}(Ia),uE={parse:function(t,e){var r=this,n=new Ie(t.args,this.liquid.options.operatorsTrie),i=n.readIdentifier();n.skipBlank();var s=n.readIdentifier();ke(s&&s.content==="in",function(){return"illegal tag: ".concat(t.getText())}),this.variable=i.content,this.collection=n.readValue(),this.hash=new Fr(n.remaining()),this.templates=[];var a,o=this.liquid.parser.parseStream(e).on("start",function(){return a=r.templates}).on("tag:endtablerow",function(){return o.stop()}).on("template",function(u){return a.push(u)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))});o.start()},render:function(t,e){var r,n,i,s,a,o,u,l,h,f;return X(this,function(c){switch(c.label){case 0:return n=ka,[4,Me(this.collection,t)];case 1:return r=n.apply(void 0,[c.sent()]),[4,this.hash.render(t)];case 2:i=c.sent(),s=i.offset||0,a=i.limit===void 0?r.length:i.limit,r=r.slice(s,s+a),o=i.cols||r.length,u=this.liquid.renderer,l=new oE(r.length,o,this.collection.getText(),this.variable),h={tablerowloop:l},t.push(h),f=0,c.label=3;case 3:return f<r.length?(h[this.variable]=r[f],l.col0()===0&&(l.row()!==1&&e.write("</tr>"),e.write('<tr class="row'.concat(l.row(),'">'))),e.write('<td class="col'.concat(l.col(),'">')),[4,u.renderTemplates(this.templates,t,e)]):[3,6];case 4:c.sent(),e.write("</td>"),c.label=5;case 5:return f++,l.next(),[3,3];case 6:return r.length&&e.write("</tr>"),t.pop(),[2]}})}},lE={parse:function(t,e){var r=this;this.branches=[],this.elseTemplates=[];var n;this.liquid.parser.parseStream(e).on("start",function(){return r.branches.push({predicate:new Vt(t.args,r.liquid),test:Ca,templates:n=[]})}).on("tag:elsif",function(i){return r.branches.push({predicate:new Vt(i.args,r.liquid),test:ar,templates:n=[]})}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",function(i){return n.push(i)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}).start()},render:function(t,e){var r,n,i,s,a,o,u,l,h,f,c;return X(this,function(m){switch(m.label){case 0:r=this.liquid.renderer,m.label=1;case 1:m.trys.push([1,7,8,9]),n=Pe(this.branches),i=n.next(),m.label=2;case 2:return i.done?[3,6]:(s=i.value,a=s.predicate,o=s.test,u=s.templates,[4,a.value(t,t.opts.lenientIf)]);case 3:return l=m.sent(),o(l,t)?[4,r.renderTemplates(u,t,e)]:[3,5];case 4:return m.sent(),[2];case 5:return i=n.next(),[3,2];case 6:return[3,9];case 7:return h=m.sent(),f={error:h},[3,9];case 8:try{i&&!i.done&&(c=n.return)&&c.call(n)}finally{if(f)throw f.error}return[7];case 9:return[4,r.renderTemplates(this.elseTemplates,t,e)];case 10:return m.sent(),[2]}})}},cE={render:function(t,e){e.break=!0}},hE={render:function(t,e){e.continue=!0}},fE={parse:function(t){this.value=new Vt(t.args,this.liquid)},render:function(t,e){var r;return X(this,function(n){switch(n.label){case 0:return[4,this.value.value(t,!1)];case 1:return r=n.sent(),e.write(r),[2]}})}},dE={parse:function(t){var e=new Ie(t.args,this.liquid.options.operatorsTrie),r=e.readLiquidTagTokens(this.liquid.options);this.tpls=this.liquid.parser.parseTokens(r)},render:function(t,e){return X(this,function(r){switch(r.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.tpls,t,e)];case 1:return r.sent(),[2]}})}},pE={assign:qw,for:Gw,capture:Yw,case:Xw,comment:Qw,include:Zw,render:Jw,decrement:eE,increment:nE,cycle:tE,if:rE,layout:iE,block:sE,raw:aE,tablerow:uE,unless:lE,break:cE,continue:hE,echo:fE,liquid:dE},mE={"&":"&","<":"<",">":">",'"':""","'":"'"},gE={"&":"&","<":"<",">":">",""":'"',"'":"'"};function Oh(t){return fe(t).replace(/&|<|>|"|'/g,function(e){return mE[e]})}function yE(t){return String(t).replace(/&(amp|lt|gt|#34|#39);/g,function(e){return gE[e]})}function vE(t){return Oh(yE(t))}function bE(t){return t.replace(/\n/g,`<br />
|
|
91
|
+
`)}function DE(t){return t.replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g,"")}var wE=Math.abs,EE=Math.max,_E=Math.min,SE=Math.ceil,CE=function(t,e){return t/e},AE=Math.floor,RE=function(t,e){return t-e},TE=function(t,e){return t%e},xE=function(t,e){return t*e};function $E(t,e){e===void 0&&(e=0);var r=Math.pow(10,e);return Math.round(t*r)/r}function OE(t,e){return Number(t)+Number(e)}function FE(t,e){return!t||!t.sort?[]:e!==void 0?Ve([],_e(t),!1).sort(function(r,n){return ah(r[e],n[e])}):Ve([],_e(t),!1).sort(ah)}var PE=function(t){return t.split("+").map(decodeURIComponent).join(" ")},kE=function(t){return t.split(" ").map(encodeURIComponent).join("+")},IE=function(t,e){return t.join(e===void 0?" ":e)},LE=function(t){return pt(t)?th(t):""},BE=function(t){return pt(t)?t[0]:""},NE=function(t){return Ve([],_e(t),!1).reverse()};function ME(t,e){var r=this,n=function(i){return e?r.context.getFromScope(i,e.split(".")):i};return ln(t).sort(function(i,s){return i=n(i),s=n(s),i<s?-1:i>s?1:0})}var jE=function(t){return t&&t.length||0};function HE(t,e){var r=this;return ln(t).map(function(n){return r.context.getFromScope(n,e.split("."))})}function UE(t){return ln(t).filter(function(e){return!$r(e)})}function qE(t,e){return ln(t).concat(e)}function GE(t,e,r){return r===void 0&&(r=1),e=e<0?t.length+e:e,t.slice(e,e+r)}function zE(t,e,r){var n=this;return ln(t).filter(function(i){var s=n.context.getFromScope(i,String(e).split("."));return r===void 0?ar(s,n.context):Ze(r)?r.equals(s):s===r})}function VE(t){var e={};return(t||[]).filter(function(r){return e.hasOwnProperty(String(r))?!1:(e[String(r)]=!0,!0)})}var WE=/%([-_0^#:]+)?(\d+)?([EO])?(.)/,Fh=["January","February","March","April","May","June","July","August","September","October","November","December"],Ph=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],YE=Fh.map(Ih),KE=Ph.map(Ih),kh={1:"st",2:"nd",3:"rd",default:"th"};function Ih(t){return t.slice(0,3)}function XE(t){var e=QE(t)?29:28;return[31,e,31,30,31,30,31,31,30,31,30,31]}function Lh(t){for(var e=0,r=0;r<t.getMonth();++r)e+=XE(t)[r];return e+t.getDate()}function Bh(t,e){var r=Lh(t)+(e-t.getDay()),n=new Date(t.getFullYear(),0,1),i=7-n.getDay()+e;return String(Math.floor((r-i)/7)+1)}function QE(t){var e=t.getFullYear();return!!((e&3)===0&&(e%100||e%400===0&&e))}function JE(t){var e=t.getDate().toString(),r=parseInt(e.slice(-1));return kh[r]||kh.default}function ZE(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}var e1={d:2,e:2,H:2,I:2,j:3,k:2,l:2,L:3,m:2,M:2,S:2,U:2,W:2},t1={a:" ",A:" ",b:" ",B:" ",c:" ",e:" ",k:" ",l:" ",p:" ",P:" "},Ma={a:function(t){return KE[t.getDay()]},A:function(t){return Ph[t.getDay()]},b:function(t){return YE[t.getMonth()]},B:function(t){return Fh[t.getMonth()]},c:function(t){return t.toLocaleString()},C:function(t){return ZE(t)},d:function(t){return t.getDate()},e:function(t){return t.getDate()},H:function(t){return t.getHours()},I:function(t){return String(t.getHours()%12||12)},j:function(t){return Lh(t)},k:function(t){return t.getHours()},l:function(t){return String(t.getHours()%12||12)},L:function(t){return t.getMilliseconds()},m:function(t){return t.getMonth()+1},M:function(t){return t.getMinutes()},N:function(t,e){var r=Number(e.width)||9,n=String(t.getMilliseconds()).substr(0,r);return CD(n,r,"0")},p:function(t){return t.getHours()<12?"AM":"PM"},P:function(t){return t.getHours()<12?"am":"pm"},q:function(t){return JE(t)},s:function(t){return Math.round(t.getTime()/1e3)},S:function(t){return t.getSeconds()},u:function(t){return t.getDay()||7},U:function(t){return Bh(t,0)},w:function(t){return t.getDay()},W:function(t){return Bh(t,1)},x:function(t){return t.toLocaleDateString()},X:function(t){return t.toLocaleTimeString()},y:function(t){return t.getFullYear().toString().substring(2,4)},Y:function(t){return t.getFullYear()},z:function(t,e){var r=Math.abs(t.getTimezoneOffset()),n=Math.floor(r/60),i=r%60;return(t.getTimezoneOffset()>0?"-":"+")+fi(n,2,"0")+(e.flags[":"]?":":"")+fi(i,2,"0")},t:function(){return" "},n:function(){return`
|
|
92
|
+
`},"%":function(){return"%"}};Ma.h=Ma.b;function r1(t,e){for(var r="",n=e,i;i=WE.exec(n);)r+=n.slice(0,i.index),n=n.slice(i.index+i[0].length),r+=n1(t,i);return r+n}function n1(t,e){var r,n,i=_e(e,5),s=i[0],a=i[1],o=a===void 0?"":a,u=i[2],l=i[3],h=i[4],f=Ma[h];if(!f)return s;var c={};try{for(var m=Pe(o),p=m.next();!p.done;p=m.next()){var y=p.value;c[y]=!0}}catch(R){r={error:R}}finally{try{p&&!p.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}var b=String(f(t,{flags:c,width:u,modifier:l})),D=t1[h]||"0",_=u||e1[h]||0;return c["^"]?b=b.toUpperCase():c["#"]&&(b=RD(b)),c._?D=" ":c["0"]&&(D="0"),c["-"]&&(_=0),fi(b,_,D)}var i1=6e4,s1=new Date().getTimezoneOffset(),a1=/([zZ]|([+-])(\d{2}):(\d{2}))$/,ja=function(){function t(e,r){if(e instanceof t)this.date=e.date,r=e.timezoneOffset;else{var n=(s1-r)*i1,i=new Date(e).getTime()+n;this.date=new Date(i)}this.timezoneOffset=r}return t.prototype.getTime=function(){return this.date.getTime()},t.prototype.getMilliseconds=function(){return this.date.getMilliseconds()},t.prototype.getSeconds=function(){return this.date.getSeconds()},t.prototype.getMinutes=function(){return this.date.getMinutes()},t.prototype.getHours=function(){return this.date.getHours()},t.prototype.getDay=function(){return this.date.getDay()},t.prototype.getDate=function(){return this.date.getDate()},t.prototype.getMonth=function(){return this.date.getMonth()},t.prototype.getFullYear=function(){return this.date.getFullYear()},t.prototype.toLocaleTimeString=function(e){return this.date.toLocaleTimeString(e)},t.prototype.toLocaleDateString=function(e){return this.date.toLocaleDateString(e)},t.prototype.getTimezoneOffset=function(){return this.timezoneOffset},t.createDateFixedToTimezone=function(e){var r=e.match(a1);if(r&&r[1]==="Z")return new t(+new Date(e),0);if(r&&r[2]&&r[3]&&r[4]){var n=_e(r,5),i=n[2],s=n[3],a=n[4],o=(i==="+"?-1:1)*(parseInt(s,10)*60+parseInt(a,10));return new t(+new Date(e),o)}return new Date(e)},t}();function o1(t,e){var r=this.context.opts,n;return t==="now"||t==="today"?n=new Date:_a(t)?n=new Date(t*1e3):kt(t)?/^\d+$/.test(t)?n=new Date(+t*1e3):r.preserveTimezones?n=ja.createDateFixedToTimezone(t):n=new Date(t):n=t,u1(n)?(r.hasOwnProperty("timezoneOffset")&&(n=new ja(n,r.timezoneOffset)),r1(n,e)):t}function u1(t){return(t instanceof Date||t instanceof ja)&&!isNaN(t.getTime())}function l1(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return pt(t)||kt(t)?t.length?t:e:(t=sr(t),t===!1&&new Map(r).get("allow_false")?!1:Ca(t,this.context)?e:t)}function c1(t){return JSON.stringify(t)}function h1(t,e){return ke(arguments.length===2,"append expect 2 arguments"),fe(t)+fe(e)}function f1(t,e){return ke(arguments.length===2,"prepend expect 2 arguments"),fe(e)+fe(t)}function d1(t){return fe(t).replace(/^\s+/,"")}function p1(t){return fe(t).toLowerCase()}function m1(t){return fe(t).toUpperCase()}function g1(t,e){return fe(t).split(String(e)).join("")}function y1(t,e){return fe(t).replace(String(e),"")}function v1(t){return fe(t).replace(/\s+$/,"")}function b1(t,e){return fe(t).split(String(e))}function D1(t){return fe(t).trim()}function w1(t){return fe(t).replace(/\n/g,"")}function E1(t){return t=fe(t),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function _1(t,e,r){return fe(t).split(String(e)).join(r)}function S1(t,e,r){return fe(t).replace(String(e),r)}function C1(t,e,r){return e===void 0&&(e=50),r===void 0&&(r="..."),t=fe(t),t.length<=e?t:t.substr(0,e-r.length)+r}function A1(t,e,r){e===void 0&&(e=15),r===void 0&&(r="...");var n=t.split(/\s+/),i=n.slice(0,e).join(" ");return n.length>=e&&(i+=r),i}var R1=Object.freeze({__proto__:null,escape:Oh,escapeOnce:vE,newlineToBr:bE,stripHtml:DE,abs:wE,atLeast:EE,atMost:_E,ceil:SE,dividedBy:CE,floor:AE,minus:RE,modulo:TE,times:xE,round:$E,plus:OE,sortNatural:FE,urlDecode:PE,urlEncode:kE,join:IE,last:LE,first:BE,reverse:NE,sort:ME,size:jE,map:HE,compact:UE,concat:qE,slice:GE,where:zE,uniq:VE,date:o1,Default:l1,json:c1,append:h1,prepend:f1,lstrip:d1,downcase:p1,upcase:m1,remove:g1,removeFirst:y1,rstrip:v1,split:b1,strip:D1,stripNewlines:w1,capitalize:E1,replace:_1,replaceFirst:S1,truncate:C1,truncatewords:A1}),T1=function(){function t(){this.impls={}}return t.prototype.get=function(e){var r=this.impls[e];return ke(r,function(){return'tag "'.concat(e,'" not found')}),r},t.prototype.set=function(e,r){this.impls[e]=r},t}(),x1=function(){function t(e,r){this.strictFilters=e,this.liquid=r,this.impls={}}return t.prototype.get=function(e){var r=this.impls[e];return ke(r||!this.strictFilters,function(){return"undefined filter: ".concat(e)}),r},t.prototype.set=function(e,r){this.impls[e]=r},t.prototype.create=function(e,r){return new Rh(e,this.get(e),r,this.liquid)},t}(),$1=function(){function t(e){var r=this;e===void 0&&(e={}),this.options=UD(e),this.parser=new Uw(this),this.renderer=new aw,this.filters=new x1(this.options.strictFilters,this),this.tags=new T1,eh(pE,function(n,i){return r.registerTag(sh(i),n)}),eh(R1,function(n,i){return r.registerFilter(sh(i),n)})}return t.prototype.parse=function(e,r){return this.parser.parse(e,r)},t.prototype._render=function(e,r,n){var i=new Ta(r,this.options,n);return this.renderer.renderTemplates(e,i)},t.prototype.render=function(e,r,n){return ir(this,void 0,void 0,function(){return X(this,function(i){return[2,yi(this._render(e,r,ze(ze({},n),{sync:!1})))]})})},t.prototype.renderSync=function(e,r,n){return vi(this._render(e,r,ze(ze({},n),{sync:!0})))},t.prototype.renderToNodeStream=function(e,r,n){n===void 0&&(n={});var i=new Ta(r,this.options,n);return this.renderer.renderTemplatesToNodeStream(e,i)},t.prototype._parseAndRender=function(e,r,n){var i=this.parse(e);return this._render(i,r,n)},t.prototype.parseAndRender=function(e,r,n){return ir(this,void 0,void 0,function(){return X(this,function(i){return[2,yi(this._parseAndRender(e,r,ze(ze({},n),{sync:!1})))]})})},t.prototype.parseAndRenderSync=function(e,r,n){return vi(this._parseAndRender(e,r,ze(ze({},n),{sync:!0})))},t.prototype._parsePartialFile=function(e,r,n){return this.parser.parseFile(e,r,or.Partials,n)},t.prototype._parseLayoutFile=function(e,r,n){return this.parser.parseFile(e,r,or.Layouts,n)},t.prototype.parseFile=function(e){return ir(this,void 0,void 0,function(){return X(this,function(r){return[2,yi(this.parser.parseFile(e,!1))]})})},t.prototype.parseFileSync=function(e){return vi(this.parser.parseFile(e,!0))},t.prototype.renderFile=function(e,r,n){return ir(this,void 0,void 0,function(){var i;return X(this,function(s){switch(s.label){case 0:return[4,this.parseFile(e)];case 1:return i=s.sent(),[2,this.render(i,r,n)]}})})},t.prototype.renderFileSync=function(e,r,n){var i=this.parseFileSync(e);return this.renderSync(i,r,n)},t.prototype.renderFileToNodeStream=function(e,r,n){return ir(this,void 0,void 0,function(){var i;return X(this,function(s){switch(s.label){case 0:return[4,this.parseFile(e)];case 1:return i=s.sent(),[2,this.renderToNodeStream(i,r,n)]}})})},t.prototype._evalValue=function(e,r){var n=new Vt(e,this);return n.value(r,!1)},t.prototype.evalValue=function(e,r){return ir(this,void 0,void 0,function(){return X(this,function(n){return[2,yi(this._evalValue(e,r))]})})},t.prototype.evalValueSync=function(e,r){return vi(this._evalValue(e,r))},t.prototype.registerFilter=function(e,r){this.filters.set(e,r)},t.prototype.registerTag=function(e,r){this.tags.set(e,r)},t.prototype.plugin=function(e){return e.call(this,t)},t.prototype.express=function(){var e=this,r=!0;return function(n,i,s){var a,o,u;if(r){r=!1;var l=pi(this.root);(a=e.options.root).unshift.apply(a,Ve([],_e(l),!1)),(o=e.options.layouts).unshift.apply(o,Ve([],_e(l),!1)),(u=e.options.partials).unshift.apply(u,Ve([],_e(l),!1))}e.renderFile(n,i).then(function(h){return s(null,h)},s)}},t}();function Nh(t){return e=>{const r=new $1;return r.render(r.parse(t),e)}}function O1(t){return t.toLowerCase()}var F1=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],P1=/[^A-Z0-9]+/gi;function k1(t,e){e===void 0&&(e={});for(var r=e.splitRegexp,n=r===void 0?F1:r,i=e.stripRegexp,s=i===void 0?P1:i,a=e.transform,o=a===void 0?O1:a,u=e.delimiter,l=u===void 0?" ":u,h=Mh(Mh(t,n,"$1\0$2"),s,"\0"),f=0,c=h.length;h.charAt(f)==="\0";)f++;for(;h.charAt(c-1)==="\0";)c--;return h.slice(f,c).split("\0").map(o).join(l)}function Mh(t,e,r){return e instanceof RegExp?t.replace(e,r):e.reduce(function(n,i){return n.replace(i,r)},t)}function I1(t,e){return e===void 0&&(e={}),k1(t,zn({delimiter:"."},e))}function L1(t,e){return e===void 0&&(e={}),I1(t,zn({delimiter:"-"},e))}function _t(t=""){return t.includes("\\")?t.replace(/\\/g,"/"):t}const B1=/^[/][/]/,N1=/^[/][/]([.]{1,2}[/])?([a-zA-Z]):[/]/,M1=/^\/|^\\|^[a-zA-Z]:[/\\]/,j1="/",H1=":",jh=function(t){if(t.length===0)return".";t=_t(t);const e=t.match(B1),r=e&&t.match(N1),n=hn(t),i=t[t.length-1]==="/";return t=Ha(t,!n),t.length===0?n?"/":i?"./":".":(i&&(t+="/"),e?r?`//./${t}`:`//${t}`:n&&!hn(t)?`/${t}`:t)},Di=function(...t){if(t.length===0)return".";let e;for(let r=0;r<t.length;++r){const n=t[r];n.length>0&&(e===void 0?e=n:e+=`/${n}`)}return e===void 0?".":jh(e)},Hh=function(...t){t=t.map(n=>_t(n));let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){const i=n>=0?t[n]:process.cwd();i.length!==0&&(e=`${i}/${e}`,r=hn(i))}return e=Ha(e,!r),r&&!hn(e)?`/${e}`:e.length>0?e:"."};function Ha(t,e){let r="",n=0,i=-1,s=0,a=null;for(let o=0;o<=t.length;++o){if(o<t.length)a=t[o];else{if(a==="/")break;a="/"}if(a==="/"){if(!(i===o-1||s===1))if(s===2){if(r.length<2||n!==2||r[r.length-1]!=="."||r[r.length-2]!=="."){if(r.length>2){const u=r.lastIndexOf("/");u===-1?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),i=o,s=0;continue}else if(r.length!==0){r="",n=0,i=o,s=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${t.slice(i+1,o)}`:r=t.slice(i+1,o),n=o-i-1;i=o,s=0}else a==="."&&s!==-1?++s:s=-1}return r}const hn=function(t){return M1.test(t)},U1=function(t){return _t(t)},q1=function(t){return we.posix.extname(_t(t))},Uh=function(t,e){return we.posix.relative(_t(t),_t(e))},Ua=function(t){return we.posix.dirname(_t(t))},G1=function(t){return _t(we.posix.format(t))},z1=function(t,e){return we.posix.basename(_t(t),e)},V1=function(t){return we.posix.parse(_t(t))},W1=Object.freeze({__proto__:null,sep:j1,delimiter:H1,normalize:jh,join:Di,resolve:Hh,normalizeString:Ha,isAbsolute:hn,toNamespacedPath:U1,extname:q1,relative:Uh,dirname:Ua,format:G1,basename:z1,parse:V1});({...W1});class Y1{constructor(e){ps(this,"value");ps(this,"next");this.value=e}}class K1{constructor(){Nn(this,xt,void 0);Nn(this,yr,void 0);Nn(this,vr,void 0);this.clear()}enqueue(e){const r=new Y1(e);Ht(this,xt)?(Ht(this,yr).next=r,$t(this,yr,r)):($t(this,xt,r),$t(this,yr,r)),ms(this,vr)._++}dequeue(){const e=Ht(this,xt);if(!!e)return $t(this,xt,Ht(this,xt).next),ms(this,vr)._--,e.value}clear(){$t(this,xt,void 0),$t(this,yr,void 0),$t(this,vr,0)}get size(){return Ht(this,vr)}*[Symbol.iterator](){let e=Ht(this,xt);for(;e;)yield e.value,e=e.next}}xt=new WeakMap,yr=new WeakMap,vr=new WeakMap;function qh(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const e=new K1;let r=0;const n=()=>{r--,e.size>0&&e.dequeue()()},i=async(o,u,l)=>{r++;const h=(async()=>o(...l))();u(h);try{await h}catch{}n()},s=(o,u,l)=>{e.enqueue(i.bind(void 0,o,u,l)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},a=(o,...u)=>new Promise(l=>{s(o,l,u)});return Object.defineProperties(a,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),a}class Gh extends Error{constructor(e){super();this.value=e}}const X1=async(t,e)=>e(await t),Q1=async t=>{const e=await Promise.all(t);if(e[1]===!0)throw new Gh(e[0]);return!1};async function J1(t,e,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){const i=qh(r),s=[...t].map(o=>[o,i(X1,o,e)]),a=qh(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(s.map(o=>a(Q1,o)))}catch(o){if(o instanceof Gh)return o.value;throw o}}const zh={directory:"isDirectory",file:"isFile"};function Z1(t){if(!(t in zh))throw new Error(`Invalid type specified: ${t}`)}const e_=(t,e)=>t===void 0||e[zh[t]]();async function Vh(t,{cwd:e=dt.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:i,preserveOrder:s}={}){Z1(r);const a=n?ll.stat:ll.lstat;return J1(t,async o=>{try{const u=await a(st.resolve(e,o));return e_(r,u)}catch{return!1}},{concurrency:i,preserveOrder:s})}const t_=Symbol("findUpStop");async function r_(t,e={}){let r=st.resolve(e.cwd||"");const{root:n}=st.parse(r),i=st.resolve(r,e.stopAt||n),s=e.limit||Number.POSITIVE_INFINITY,a=[t].flat(),o=async l=>{if(typeof t!="function")return Vh(a,l);const h=await t(l.cwd);return typeof h=="string"?Vh([h],l):h},u=[];for(;;){const l=await o({...e,cwd:r});if(l===t_||(l&&u.push(st.resolve(r,l)),r===i||u.length>=s))break;r=st.dirname(r)}return u}async function n_(t,e={}){return(await r_(t,{...e,limit:1}))[0]}var je={},ge={},Pr={};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.splitWhen=Pr.flatten=void 0;function i_(t){return t.reduce((e,r)=>[].concat(e,r),[])}Pr.flatten=i_;function s_(t,e){const r=[[]];let n=0;for(const i of t)e(i)?(n++,r[n]=[]):r[n].push(i);return r}Pr.splitWhen=s_;var wi={};Object.defineProperty(wi,"__esModule",{value:!0}),wi.isEnoentCodeError=void 0;function a_(t){return t.code==="ENOENT"}wi.isEnoentCodeError=a_;var Ei={};Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.createDirentFromStats=void 0;class o_{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function u_(t,e){return new o_(t,e)}Ei.createDirentFromStats=u_;var St={};Object.defineProperty(St,"__esModule",{value:!0}),St.removeLeadingDotSegment=St.escape=St.makeAbsolute=St.unixify=void 0;const l_=we,c_=2,h_=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function f_(t){return t.replace(/\\/g,"/")}St.unixify=f_;function d_(t,e){return l_.resolve(t,e)}St.makeAbsolute=d_;function p_(t){return t.replace(h_,"\\$2")}St.escape=p_;function m_(t){if(t.charAt(0)==="."){const e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(c_)}return t}St.removeLeadingDotSegment=m_;var V={};/*!
|
|
93
93
|
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
94
94
|
*
|
|
95
95
|
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
96
96
|
* Licensed under the MIT License.
|
|
97
|
-
*/var
|
|
97
|
+
*/var g_=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1};/*!
|
|
98
98
|
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
99
99
|
*
|
|
100
100
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
101
101
|
* Released under the MIT License.
|
|
102
|
-
*/var
|
|
102
|
+
*/var y_=g_,Wh={"{":"}","(":")","[":"]"},v_=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,n=-2,i=-2,s=-2,a=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||n!==-1&&t[e]==="["&&t[e+1]!=="]"&&(n<e&&(n=t.indexOf("]",e)),n>e&&(a===-1||a>n||(a=t.indexOf("\\",e),a===-1||a>n)))||i!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(i=t.indexOf("}",e),i>e&&(a=t.indexOf("\\",e),a===-1||a>i))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(a=t.indexOf("\\",e),a===-1||a>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(a=t.indexOf("\\",r),a===-1||a>s))))return!0;if(t[e]==="\\"){var o=t[e+1];e+=2;var u=Wh[o];if(u){var l=t.indexOf(u,e);l!==-1&&(e=l+1)}if(t[e]==="!")return!0}else e++}return!1},b_=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var n=Wh[r];if(n){var i=t.indexOf(n,e);i!==-1&&(e=i+1)}if(t[e]==="!")return!0}else e++}return!1},D_=function(e,r){if(typeof e!="string"||e==="")return!1;if(y_(e))return!0;var n=v_;return r&&r.strict===!1&&(n=b_),n(e)},w_=D_,E_=we.posix.dirname,__=Xr.platform()==="win32",qa="/",S_=/\\/g,C_=/[\{\[].*[\}\]]$/,A_=/(^|[^\\])([\{\[]|\([^\)]+$)/,R_=/\\([\!\*\?\|\[\]\(\)\{\}])/g,T_=function(e,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&__&&e.indexOf(qa)<0&&(e=e.replace(S_,qa)),C_.test(e)&&(e+=qa),e+="a";do e=E_(e);while(w_(e)||A_.test(e));return e.replace(R_,"$1")},_i={};(function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,r)=>e.nodes.find(n=>n.type===r),t.exceedsLimit=(e,r,n=1,i)=>i===!1||!t.isInteger(e)||!t.isInteger(r)?!1:(Number(r)-Number(e))/Number(n)>=i,t.escapeNode=(e,r=0,n)=>{let i=e.nodes[r];!i||(n&&i.type===n||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1,t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((r,n)=>(n.type==="text"&&r.push(n.value),n.type==="range"&&(n.type="text"),r),[]),t.flatten=(...e)=>{const r=[],n=i=>{for(let s=0;s<i.length;s++){let a=i[s];Array.isArray(a)?n(a):a!==void 0&&r.push(a)}return r};return n(e),r}})(_i);const Yh=_i;var Ga=(t,e={})=>{let r=(n,i={})=>{let s=e.escapeInvalid&&Yh.isInvalidBrace(i),a=n.invalid===!0&&e.escapeInvalid===!0,o="";if(n.value)return(s||a)&&Yh.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let u of n.nodes)o+=r(u);return o};return r(t)};/*!
|
|
103
103
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|
104
104
|
*
|
|
105
105
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
106
106
|
* Released under the MIT License.
|
|
107
|
-
*/var
|
|
107
|
+
*/var x_=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1};/*!
|
|
108
108
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
109
109
|
*
|
|
110
110
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
111
111
|
* Released under the MIT License.
|
|
112
|
-
*/const
|
|
112
|
+
*/const Kh=x_,ur=(t,e,r)=>{if(Kh(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(Kh(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),a=String(n.capture),o=String(n.wrap),u=t+":"+e+"="+i+s+a+o;if(ur.cache.hasOwnProperty(u))return ur.cache[u].result;let l=Math.min(t,e),h=Math.max(t,e);if(Math.abs(l-h)===1){let y=t+"|"+e;return n.capture?`(${y})`:n.wrap===!1?y:`(?:${y})`}let f=tf(t)||tf(e),c={min:t,max:e,a:l,b:h},m=[],p=[];if(f&&(c.isPadded=f,c.maxLen=String(c.max).length),l<0){let y=h<0?Math.abs(h):1;p=Xh(y,Math.abs(l),c,n),l=c.a=0}return h>=0&&(m=Xh(l,h,c,n)),c.negatives=p,c.positives=m,c.result=$_(p,m),n.capture===!0?c.result=`(${c.result})`:n.wrap!==!1&&m.length+p.length>1&&(c.result=`(?:${c.result})`),ur.cache[u]=c,c.result};function $_(t,e,r){let n=za(t,e,"-",!1)||[],i=za(e,t,"",!1)||[],s=za(t,e,"-?",!0)||[];return n.concat(s).concat(i).join("|")}function O_(t,e){let r=1,n=1,i=Jh(t,r),s=new Set([e]);for(;t<=i&&i<=e;)s.add(i),r+=1,i=Jh(t,r);for(i=Zh(e+1,n)-1;t<i&&i<=e;)s.add(i),n+=1,i=Zh(e+1,n)-1;return s=[...s],s.sort(k_),s}function F_(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let n=P_(t,e),i=n.length,s="",a=0;for(let o=0;o<i;o++){let[u,l]=n[o];u===l?s+=u:u!=="0"||l!=="9"?s+=I_(u,l):a++}return a&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[a],digits:i}}function Xh(t,e,r,n){let i=O_(t,e),s=[],a=t,o;for(let u=0;u<i.length;u++){let l=i[u],h=F_(String(a),String(l),n),f="";if(!r.isPadded&&o&&o.pattern===h.pattern){o.count.length>1&&o.count.pop(),o.count.push(h.count[0]),o.string=o.pattern+ef(o.count),a=l+1;continue}r.isPadded&&(f=L_(l,r,n)),h.string=f+h.pattern+ef(h.count),s.push(h),a=l+1,o=h}return s}function za(t,e,r,n,i){let s=[];for(let a of t){let{string:o}=a;!n&&!Qh(e,"string",o)&&s.push(r+o),n&&Qh(e,"string",o)&&s.push(r+o)}return s}function P_(t,e){let r=[];for(let n=0;n<t.length;n++)r.push([t[n],e[n]]);return r}function k_(t,e){return t>e?1:e>t?-1:0}function Qh(t,e,r){return t.some(n=>n[e]===r)}function Jh(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function Zh(t,e){return t-t%Math.pow(10,e)}function ef(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function I_(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function tf(t){return/^-?(0+)\d/.test(t)}function L_(t,e,r){if(!e.isPadded)return t;let n=Math.abs(e.maxLen-String(t).length),i=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}ur.cache={},ur.clearCache=()=>ur.cache={};var B_=ur;/*!
|
|
113
113
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
114
114
|
*
|
|
115
115
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
116
116
|
* Licensed under the MIT License.
|
|
117
|
-
*/const
|
|
118
|
-
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const M_=Ma,{MAX_LENGTH:rf,CHAR_BACKSLASH:qa,CHAR_BACKTICK:j_,CHAR_COMMA:H_,CHAR_DOT:U_,CHAR_LEFT_PARENTHESES:q_,CHAR_RIGHT_PARENTHESES:G_,CHAR_LEFT_CURLY_BRACE:z_,CHAR_RIGHT_CURLY_BRACE:V_,CHAR_LEFT_SQUARE_BRACKET:nf,CHAR_RIGHT_SQUARE_BRACKET:sf,CHAR_DOUBLE_QUOTE:W_,CHAR_SINGLE_QUOTE:K_,CHAR_NO_BREAK_SPACE:Y_,CHAR_ZERO_WIDTH_NOBREAK_SPACE:X_}=N_,Q_=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},n=typeof r.maxLength=="number"?Math.min(rf,r.maxLength):rf;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let i={type:"root",input:t,nodes:[]},s=[i],a=i,o=i,u=0,l=t.length,h=0,f=0,c;const m=()=>t[h++],p=y=>{if(y.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&y.type==="text"){o.value+=y.value;return}return a.nodes.push(y),y.parent=a,y.prev=o,o=y,y};for(p({type:"bos"});h<l;)if(a=s[s.length-1],c=m(),!(c===X_||c===Y_)){if(c===qa){p({type:"text",value:(e.keepEscaping?c:"")+m()});continue}if(c===sf){p({type:"text",value:"\\"+c});continue}if(c===nf){u++;let y;for(;h<l&&(y=m());){if(c+=y,y===nf){u++;continue}if(y===qa){c+=m();continue}if(y===sf&&(u--,u===0))break}p({type:"text",value:c});continue}if(c===q_){a=p({type:"paren",nodes:[]}),s.push(a),p({type:"text",value:c});continue}if(c===G_){if(a.type!=="paren"){p({type:"text",value:c});continue}a=s.pop(),p({type:"text",value:c}),a=s[s.length-1];continue}if(c===W_||c===K_||c===j_){let y=c,b;for(e.keepQuotes!==!0&&(c="");h<l&&(b=m());){if(b===qa){c+=b+m();continue}if(b===y){e.keepQuotes===!0&&(c+=b);break}c+=b}p({type:"text",value:c});continue}if(c===z_){f++;let y=o.value&&o.value.slice(-1)==="$"||a.dollar===!0;a=p({type:"brace",open:!0,close:!1,dollar:y,depth:f,commas:0,ranges:0,nodes:[]}),s.push(a),p({type:"open",value:c});continue}if(c===V_){if(a.type!=="brace"){p({type:"text",value:c});continue}let y="close";a=s.pop(),a.close=!0,p({type:y,value:c}),f--,a=s[s.length-1];continue}if(c===H_&&f>0){if(a.ranges>0){a.ranges=0;let y=a.nodes.shift();a.nodes=[y,{type:"text",value:M_(a)}]}p({type:"comma",value:c}),a.commas++;continue}if(c===U_&&f>0&&a.commas===0){let y=a.nodes;if(f===0||y.length===0){p({type:"text",value:c});continue}if(o.type==="dot"){if(a.range=[],o.value+=c,o.type="range",a.nodes.length!==3&&a.nodes.length!==5){a.invalid=!0,a.ranges=0,o.type="text";continue}a.ranges++,a.args=[];continue}if(o.type==="range"){y.pop();let b=y[y.length-1];b.value+=o.value+c,o=b,a.ranges--;continue}p({type:"dot",value:c});continue}p({type:"text",value:c})}do if(a=s.pop(),a.type!=="root"){a.nodes.forEach(D=>{D.nodes||(D.type==="open"&&(D.isOpen=!0),D.type==="close"&&(D.isClose=!0),D.nodes||(D.type="text"),D.invalid=!0)});let y=s[s.length-1],b=y.nodes.indexOf(a);y.nodes.splice(b,1,...a.nodes)}while(s.length>0);return p({type:"eos"}),i};var J_=Q_;const af=Ma,Z_=k_,eS=B_,tS=J_,Ze=(t,e={})=>{let r=[];if(Array.isArray(t))for(let n of t){let i=Ze.create(n,e);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(Ze.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};Ze.parse=(t,e={})=>tS(t,e),Ze.stringify=(t,e={})=>af(typeof t=="string"?Ze.parse(t,e):t,e),Ze.compile=(t,e={})=>(typeof t=="string"&&(t=Ze.parse(t,e)),Z_(t,e)),Ze.expand=(t,e={})=>{typeof t=="string"&&(t=Ze.parse(t,e));let r=eS(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r},Ze.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Ze.compile(t,e):Ze.expand(t,e);var rS=Ze,un={};const nS=we,_t="\\\\/",of=`[^${_t}]`,kt="\\.",iS="\\+",sS="\\?",Di="\\/",aS="(?=.)",uf="[^/]",Ga=`(?:${Di}|$)`,lf=`(?:^|${Di})`,za=`${kt}{1,2}${Ga}`,oS=`(?!${kt})`,uS=`(?!${lf}${za})`,lS=`(?!${kt}{0,1}${Ga})`,cS=`(?!${za})`,hS=`[^.${Di}]`,fS=`${uf}*?`,cf={DOT_LITERAL:kt,PLUS_LITERAL:iS,QMARK_LITERAL:sS,SLASH_LITERAL:Di,ONE_CHAR:aS,QMARK:uf,END_ANCHOR:Ga,DOTS_SLASH:za,NO_DOT:oS,NO_DOTS:uS,NO_DOT_SLASH:lS,NO_DOTS_SLASH:cS,QMARK_NO_DOT:hS,STAR:fS,START_ANCHOR:lf},dS={...cf,SLASH_LITERAL:`[${_t}]`,QMARK:of,STAR:`${of}*?`,DOTS_SLASH:`${kt}{1,2}(?:[${_t}]|$)`,NO_DOT:`(?!${kt})`,NO_DOTS:`(?!(?:^|[${_t}])${kt}{1,2}(?:[${_t}]|$))`,NO_DOT_SLASH:`(?!${kt}{0,1}(?:[${_t}]|$))`,NO_DOTS_SLASH:`(?!${kt}{1,2}(?:[${_t}]|$))`,QMARK_NO_DOT:`[^.${_t}]`,START_ANCHOR:`(?:^|[${_t}])`,END_ANCHOR:`(?:[${_t}]|$)`},pS={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var wi={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:pS,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:nS.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?dS:cf}};(function(t){const e=we,r=process.platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:a}=wi;t.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),t.hasRegexChars=o=>s.test(o),t.isRegexChar=o=>o.length===1&&t.hasRegexChars(o),t.escapeRegex=o=>o.replace(a,"\\$1"),t.toPosixSlashes=o=>o.replace(n,"/"),t.removeBackslashes=o=>o.replace(i,u=>u==="\\"?"":u),t.supportsLookbehinds=()=>{const o=process.version.slice(1).split(".").map(Number);return o.length===3&&o[0]>=9||o[0]===8&&o[1]>=10},t.isWindows=o=>o&&typeof o.windows=="boolean"?o.windows:r===!0||e.sep==="\\",t.escapeLast=(o,u,l)=>{const h=o.lastIndexOf(u,l);return h===-1?o:o[h-1]==="\\"?t.escapeLast(o,u,h-1):`${o.slice(0,h)}\\${o.slice(h)}`},t.removePrefix=(o,u={})=>{let l=o;return l.startsWith("./")&&(l=l.slice(2),u.prefix="./"),l},t.wrapOutput=(o,u={},l={})=>{const h=l.contains?"":"^",f=l.contains?"":"$";let c=`${h}(?:${o})${f}`;return u.negated===!0&&(c=`(?:^(?!${c}).*$)`),c}})(un);const hf=un,{CHAR_ASTERISK:Va,CHAR_AT:mS,CHAR_BACKWARD_SLASH:ln,CHAR_COMMA:gS,CHAR_DOT:Wa,CHAR_EXCLAMATION_MARK:Ka,CHAR_FORWARD_SLASH:ff,CHAR_LEFT_CURLY_BRACE:Ya,CHAR_LEFT_PARENTHESES:Xa,CHAR_LEFT_SQUARE_BRACKET:yS,CHAR_PLUS:vS,CHAR_QUESTION_MARK:df,CHAR_RIGHT_CURLY_BRACE:bS,CHAR_RIGHT_PARENTHESES:pf,CHAR_RIGHT_SQUARE_BRACKET:DS}=wi,mf=t=>t===ff||t===ln,gf=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},wS=(t,e)=>{const r=e||{},n=t.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],a=[],o=[];let u=t,l=-1,h=0,f=0,c=!1,m=!1,p=!1,y=!1,b=!1,D=!1,_=!1,R=!1,S=!1,v=!1,d=0,w,T,$={value:"",depth:0,isGlob:!1};const j=()=>l>=n,A=()=>u.charCodeAt(l+1),I=()=>(w=T,u.charCodeAt(++l));for(;l<n;){T=I();let re;if(T===ln){_=$.backslashes=!0,T=I(),T===Ya&&(D=!0);continue}if(D===!0||T===Ya){for(d++;j()!==!0&&(T=I());){if(T===ln){_=$.backslashes=!0,I();continue}if(T===Ya){d++;continue}if(D!==!0&&T===Wa&&(T=I())===Wa){if(c=$.isBrace=!0,p=$.isGlob=!0,v=!0,i===!0)continue;break}if(D!==!0&&T===gS){if(c=$.isBrace=!0,p=$.isGlob=!0,v=!0,i===!0)continue;break}if(T===bS&&(d--,d===0)){D=!1,c=$.isBrace=!0,v=!0;break}}if(i===!0)continue;break}if(T===ff){if(s.push(l),a.push($),$={value:"",depth:0,isGlob:!1},v===!0)continue;if(w===Wa&&l===h+1){h+=2;continue}f=l+1;continue}if(r.noext!==!0&&(T===vS||T===mS||T===Va||T===df||T===Ka)===!0&&A()===Xa){if(p=$.isGlob=!0,y=$.isExtglob=!0,v=!0,T===Ka&&l===h&&(S=!0),i===!0){for(;j()!==!0&&(T=I());){if(T===ln){_=$.backslashes=!0,T=I();continue}if(T===pf){p=$.isGlob=!0,v=!0;break}}continue}break}if(T===Va){if(w===Va&&(b=$.isGlobstar=!0),p=$.isGlob=!0,v=!0,i===!0)continue;break}if(T===df){if(p=$.isGlob=!0,v=!0,i===!0)continue;break}if(T===yS){for(;j()!==!0&&(re=I());){if(re===ln){_=$.backslashes=!0,I();continue}if(re===DS){m=$.isBracket=!0,p=$.isGlob=!0,v=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&T===Ka&&l===h){R=$.negated=!0,h++;continue}if(r.noparen!==!0&&T===Xa){if(p=$.isGlob=!0,i===!0){for(;j()!==!0&&(T=I());){if(T===Xa){_=$.backslashes=!0,T=I();continue}if(T===pf){v=!0;break}}continue}break}if(p===!0){if(v=!0,i===!0)continue;break}}r.noext===!0&&(y=!1,p=!1);let B=u,J="",C="";h>0&&(J=u.slice(0,h),u=u.slice(h),f-=h),B&&p===!0&&f>0?(B=u.slice(0,f),C=u.slice(f)):p===!0?(B="",C=u):B=u,B&&B!==""&&B!=="/"&&B!==u&&mf(B.charCodeAt(B.length-1))&&(B=B.slice(0,-1)),r.unescape===!0&&(C&&(C=hf.removeBackslashes(C)),B&&_===!0&&(B=hf.removeBackslashes(B)));const x={prefix:J,input:t,start:h,base:B,glob:C,isBrace:c,isBracket:m,isGlob:p,isExtglob:y,isGlobstar:b,negated:R,negatedExtglob:S};if(r.tokens===!0&&(x.maxDepth=0,mf(T)||a.push($),x.tokens=a),r.parts===!0||r.tokens===!0){let re;for(let q=0;q<s.length;q++){const xe=re?re+1:h,Ue=s[q],ye=t.slice(xe,Ue);r.tokens&&(q===0&&h!==0?(a[q].isPrefix=!0,a[q].value=J):a[q].value=ye,gf(a[q]),x.maxDepth+=a[q].depth),(q!==0||ye!=="")&&o.push(ye),re=Ue}if(re&&re+1<t.length){const q=t.slice(re+1);o.push(q),r.tokens&&(a[a.length-1].value=q,gf(a[a.length-1]),x.maxDepth+=a[a.length-1].depth)}x.slashes=s,x.parts=o}return x};var ES=wS;const Ei=wi,et=un,{MAX_LENGTH:_i,POSIX_REGEX_SOURCE:_S,REGEX_NON_SPECIAL_CHARS:SS,REGEX_SPECIAL_CHARS_BACKREF:CS,REPLACEMENTS:yf}=Ei,AS=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>et.escapeRegex(i)).join("..")}return r},Fr=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Qa=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=yf[t]||t;const r={...e},n=typeof r.maxLength=="number"?Math.min(_i,r.maxLength):_i;let i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);const s={type:"bos",value:"",output:r.prepend||""},a=[s],o=r.capture?"":"?:",u=et.isWindows(e),l=Ei.globChars(u),h=Ei.extglobChars(l),{DOT_LITERAL:f,PLUS_LITERAL:c,SLASH_LITERAL:m,ONE_CHAR:p,DOTS_SLASH:y,NO_DOT:b,NO_DOT_SLASH:D,NO_DOTS_SLASH:_,QMARK:R,QMARK_NO_DOT:S,STAR:v,START_ANCHOR:d}=l,w=k=>`(${o}(?:(?!${d}${k.dot?y:f}).)*?)`,T=r.dot?"":b,$=r.dot?R:S;let j=r.bash===!0?w(r):v;r.capture&&(j=`(${j})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);const A={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:a};t=et.removePrefix(t,A),i=t.length;const I=[],B=[],J=[];let C=s,x;const re=()=>A.index===i-1,q=A.peek=(k=1)=>t[A.index+k],xe=A.advance=()=>t[++A.index]||"",Ue=()=>t.slice(A.index+1),ye=(k="",ie=0)=>{A.consumed+=k,A.index+=ie},rt=k=>{A.output+=k.output!=null?k.output:k.value,ye(k.value)},gr=()=>{let k=1;for(;q()==="!"&&(q(2)!=="("||q(3)==="?");)xe(),A.start++,k++;return k%2===0?!1:(A.negated=!0,A.start++,!0)},lt=k=>{A[k]++,J.push(k)},nt=k=>{A[k]--,J.pop()},G=k=>{if(C.type==="globstar"){const ie=A.braces>0&&(k.type==="comma"||k.type==="brace"),P=k.extglob===!0||I.length&&(k.type==="pipe"||k.type==="paren");k.type!=="slash"&&k.type!=="paren"&&!ie&&!P&&(A.output=A.output.slice(0,-C.output.length),C.type="star",C.value="*",C.output=j,A.output+=C.output)}if(I.length&&k.type!=="paren"&&(I[I.length-1].inner+=k.value),(k.value||k.output)&&rt(k),C&&C.type==="text"&&k.type==="text"){C.value+=k.value,C.output=(C.output||"")+k.value;return}k.prev=C,a.push(k),C=k},Dt=(k,ie)=>{const P={...h[ie],conditions:1,inner:""};P.prev=C,P.parens=A.parens,P.output=A.output;const K=(r.capture?"(":"")+P.open;lt("parens"),G({type:k,value:ie,output:A.output?"":p}),G({type:"paren",extglob:!0,value:xe(),output:K}),I.push(P)},$n=k=>{let ie=k.close+(r.capture?")":""),P;if(k.type==="negate"){let K=j;if(k.inner&&k.inner.length>1&&k.inner.includes("/")&&(K=w(r)),(K!==j||re()||/^\)+$/.test(Ue()))&&(ie=k.close=`)$))${K}`),k.inner.includes("*")&&(P=Ue())&&/^\.[^\\/.]+$/.test(P)){const se=Qa(P,{...e,fastpaths:!1}).output;ie=k.close=`)${se})${K})`}k.prev.type==="bos"&&(A.negatedExtglob=!0)}G({type:"paren",extglob:!0,value:x,output:ie}),nt("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let k=!1,ie=t.replace(CS,(P,K,se,Te,be,zr)=>Te==="\\"?(k=!0,P):Te==="?"?K?K+Te+(be?R.repeat(be.length):""):zr===0?$+(be?R.repeat(be.length):""):R.repeat(se.length):Te==="."?f.repeat(se.length):Te==="*"?K?K+Te+(be?j:""):j:K?P:`\\${P}`);return k===!0&&(r.unescape===!0?ie=ie.replace(/\\/g,""):ie=ie.replace(/\\+/g,P=>P.length%2===0?"\\\\":P?"\\":"")),ie===t&&r.contains===!0?(A.output=t,A):(A.output=et.wrapOutput(ie,A,e),A)}for(;!re();){if(x=xe(),x==="\0")continue;if(x==="\\"){const P=q();if(P==="/"&&r.bash!==!0||P==="."||P===";")continue;if(!P){x+="\\",G({type:"text",value:x});continue}const K=/^\\+/.exec(Ue());let se=0;if(K&&K[0].length>2&&(se=K[0].length,A.index+=se,se%2!==0&&(x+="\\")),r.unescape===!0?x=xe():x+=xe(),A.brackets===0){G({type:"text",value:x});continue}}if(A.brackets>0&&(x!=="]"||C.value==="["||C.value==="[^")){if(r.posix!==!1&&x===":"){const P=C.value.slice(1);if(P.includes("[")&&(C.posix=!0,P.includes(":"))){const K=C.value.lastIndexOf("["),se=C.value.slice(0,K),Te=C.value.slice(K+2),be=_S[Te];if(be){C.value=se+be,A.backtrack=!0,xe(),!s.output&&a.indexOf(C)===1&&(s.output=p);continue}}}(x==="["&&q()!==":"||x==="-"&&q()==="]")&&(x=`\\${x}`),x==="]"&&(C.value==="["||C.value==="[^")&&(x=`\\${x}`),r.posix===!0&&x==="!"&&C.value==="["&&(x="^"),C.value+=x,rt({value:x});continue}if(A.quotes===1&&x!=='"'){x=et.escapeRegex(x),C.value+=x,rt({value:x});continue}if(x==='"'){A.quotes=A.quotes===1?0:1,r.keepQuotes===!0&&G({type:"text",value:x});continue}if(x==="("){lt("parens"),G({type:"paren",value:x});continue}if(x===")"){if(A.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Fr("opening","("));const P=I[I.length-1];if(P&&A.parens===P.parens+1){$n(I.pop());continue}G({type:"paren",value:x,output:A.parens?")":"\\)"}),nt("parens");continue}if(x==="["){if(r.nobracket===!0||!Ue().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Fr("closing","]"));x=`\\${x}`}else lt("brackets");G({type:"bracket",value:x});continue}if(x==="]"){if(r.nobracket===!0||C&&C.type==="bracket"&&C.value.length===1){G({type:"text",value:x,output:`\\${x}`});continue}if(A.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Fr("opening","["));G({type:"text",value:x,output:`\\${x}`});continue}nt("brackets");const P=C.value.slice(1);if(C.posix!==!0&&P[0]==="^"&&!P.includes("/")&&(x=`/${x}`),C.value+=x,rt({value:x}),r.literalBrackets===!1||et.hasRegexChars(P))continue;const K=et.escapeRegex(C.value);if(A.output=A.output.slice(0,-C.value.length),r.literalBrackets===!0){A.output+=K,C.value=K;continue}C.value=`(${o}${K}|${C.value})`,A.output+=C.value;continue}if(x==="{"&&r.nobrace!==!0){lt("braces");const P={type:"brace",value:x,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};B.push(P),G(P);continue}if(x==="}"){const P=B[B.length-1];if(r.nobrace===!0||!P){G({type:"text",value:x,output:x});continue}let K=")";if(P.dots===!0){const se=a.slice(),Te=[];for(let be=se.length-1;be>=0&&(a.pop(),se[be].type!=="brace");be--)se[be].type!=="dots"&&Te.unshift(se[be].value);K=AS(Te,r),A.backtrack=!0}if(P.comma!==!0&&P.dots!==!0){const se=A.output.slice(0,P.outputIndex),Te=A.tokens.slice(P.tokensIndex);P.value=P.output="\\{",x=K="\\}",A.output=se;for(const be of Te)A.output+=be.output||be.value}G({type:"brace",value:x,output:K}),nt("braces"),B.pop();continue}if(x==="|"){I.length>0&&I[I.length-1].conditions++,G({type:"text",value:x});continue}if(x===","){let P=x;const K=B[B.length-1];K&&J[J.length-1]==="braces"&&(K.comma=!0,P="|"),G({type:"comma",value:x,output:P});continue}if(x==="/"){if(C.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",a.pop(),C=s;continue}G({type:"slash",value:x,output:m});continue}if(x==="."){if(A.braces>0&&C.type==="dot"){C.value==="."&&(C.output=f);const P=B[B.length-1];C.type="dots",C.output+=x,C.value+=x,P.dots=!0;continue}if(A.braces+A.parens===0&&C.type!=="bos"&&C.type!=="slash"){G({type:"text",value:x,output:f});continue}G({type:"dot",value:x,output:f});continue}if(x==="?"){if(!(C&&C.value==="(")&&r.noextglob!==!0&&q()==="("&&q(2)!=="?"){Dt("qmark",x);continue}if(C&&C.type==="paren"){const K=q();let se=x;if(K==="<"&&!et.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(C.value==="("&&!/[!=<:]/.test(K)||K==="<"&&!/<([!=]|\w+>)/.test(Ue()))&&(se=`\\${x}`),G({type:"text",value:x,output:se});continue}if(r.dot!==!0&&(C.type==="slash"||C.type==="bos")){G({type:"qmark",value:x,output:S});continue}G({type:"qmark",value:x,output:R});continue}if(x==="!"){if(r.noextglob!==!0&&q()==="("&&(q(2)!=="?"||!/[!=<:]/.test(q(3)))){Dt("negate",x);continue}if(r.nonegate!==!0&&A.index===0){gr();continue}}if(x==="+"){if(r.noextglob!==!0&&q()==="("&&q(2)!=="?"){Dt("plus",x);continue}if(C&&C.value==="("||r.regex===!1){G({type:"plus",value:x,output:c});continue}if(C&&(C.type==="bracket"||C.type==="paren"||C.type==="brace")||A.parens>0){G({type:"plus",value:x});continue}G({type:"plus",value:c});continue}if(x==="@"){if(r.noextglob!==!0&&q()==="("&&q(2)!=="?"){G({type:"at",extglob:!0,value:x,output:""});continue}G({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);const P=SS.exec(Ue());P&&(x+=P[0],A.index+=P[0].length),G({type:"text",value:x});continue}if(C&&(C.type==="globstar"||C.star===!0)){C.type="star",C.star=!0,C.value+=x,C.output=j,A.backtrack=!0,A.globstar=!0,ye(x);continue}let k=Ue();if(r.noextglob!==!0&&/^\([^?]/.test(k)){Dt("star",x);continue}if(C.type==="star"){if(r.noglobstar===!0){ye(x);continue}const P=C.prev,K=P.prev,se=P.type==="slash"||P.type==="bos",Te=K&&(K.type==="star"||K.type==="globstar");if(r.bash===!0&&(!se||k[0]&&k[0]!=="/")){G({type:"star",value:x,output:""});continue}const be=A.braces>0&&(P.type==="comma"||P.type==="brace"),zr=I.length&&(P.type==="pipe"||P.type==="paren");if(!se&&P.type!=="paren"&&!be&&!zr){G({type:"star",value:x,output:""});continue}for(;k.slice(0,3)==="/**";){const me=t[A.index+4];if(me&&me!=="/")break;k=k.slice(3),ye("/**",3)}if(P.type==="bos"&&re()){C.type="globstar",C.value+=x,C.output=w(r),A.output=C.output,A.globstar=!0,ye(x);continue}if(P.type==="slash"&&P.prev.type!=="bos"&&!Te&&re()){A.output=A.output.slice(0,-(P.output+C.output).length),P.output=`(?:${P.output}`,C.type="globstar",C.output=w(r)+(r.strictSlashes?")":"|$)"),C.value+=x,A.globstar=!0,A.output+=P.output+C.output,ye(x);continue}if(P.type==="slash"&&P.prev.type!=="bos"&&k[0]==="/"){const me=k[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(P.output+C.output).length),P.output=`(?:${P.output}`,C.type="globstar",C.output=`${w(r)}${m}|${m}${me})`,C.value+=x,A.output+=P.output+C.output,A.globstar=!0,ye(x+xe()),G({type:"slash",value:"/",output:""});continue}if(P.type==="bos"&&k[0]==="/"){C.type="globstar",C.value+=x,C.output=`(?:^|${m}|${w(r)}${m})`,A.output=C.output,A.globstar=!0,ye(x+xe()),G({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-C.output.length),C.type="globstar",C.output=w(r),C.value+=x,A.output+=C.output,A.globstar=!0,ye(x);continue}const ie={type:"star",value:x,output:j};if(r.bash===!0){ie.output=".*?",(C.type==="bos"||C.type==="slash")&&(ie.output=T+ie.output),G(ie);continue}if(C&&(C.type==="bracket"||C.type==="paren")&&r.regex===!0){ie.output=x,G(ie);continue}(A.index===A.start||C.type==="slash"||C.type==="dot")&&(C.type==="dot"?(A.output+=D,C.output+=D):r.dot===!0?(A.output+=_,C.output+=_):(A.output+=T,C.output+=T),q()!=="*"&&(A.output+=p,C.output+=p)),G(ie)}for(;A.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Fr("closing","]"));A.output=et.escapeLast(A.output,"["),nt("brackets")}for(;A.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Fr("closing",")"));A.output=et.escapeLast(A.output,"("),nt("parens")}for(;A.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Fr("closing","}"));A.output=et.escapeLast(A.output,"{"),nt("braces")}if(r.strictSlashes!==!0&&(C.type==="star"||C.type==="bracket")&&G({type:"maybe_slash",value:"",output:`${m}?`}),A.backtrack===!0){A.output="";for(const k of A.tokens)A.output+=k.output!=null?k.output:k.value,k.suffix&&(A.output+=k.suffix)}return A};Qa.fastpaths=(t,e)=>{const r={...e},n=typeof r.maxLength=="number"?Math.min(_i,r.maxLength):_i,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);t=yf[t]||t;const s=et.isWindows(e),{DOT_LITERAL:a,SLASH_LITERAL:o,ONE_CHAR:u,DOTS_SLASH:l,NO_DOT:h,NO_DOTS:f,NO_DOTS_SLASH:c,STAR:m,START_ANCHOR:p}=Ei.globChars(s),y=r.dot?f:h,b=r.dot?c:h,D=r.capture?"":"?:",_={negated:!1,prefix:""};let R=r.bash===!0?".*?":m;r.capture&&(R=`(${R})`);const S=T=>T.noglobstar===!0?R:`(${D}(?:(?!${p}${T.dot?l:a}).)*?)`,v=T=>{switch(T){case"*":return`${y}${u}${R}`;case".*":return`${a}${u}${R}`;case"*.*":return`${y}${R}${a}${u}${R}`;case"*/*":return`${y}${R}${o}${u}${b}${R}`;case"**":return y+S(r);case"**/*":return`(?:${y}${S(r)}${o})?${b}${u}${R}`;case"**/*.*":return`(?:${y}${S(r)}${o})?${b}${R}${a}${u}${R}`;case"**/.*":return`(?:${y}${S(r)}${o})?${a}${u}${R}`;default:{const $=/^(.*?)\.(\w+)$/.exec(T);if(!$)return;const j=v($[1]);return j?j+a+$[2]:void 0}}},d=et.removePrefix(t,_);let w=v(d);return w&&r.strictSlashes!==!0&&(w+=`${o}?`),w};var RS=Qa;const xS=we,TS=ES,Ja=RS,Za=un,$S=wi,OS=t=>t&&typeof t=="object"&&!Array.isArray(t),Se=(t,e,r=!1)=>{if(Array.isArray(t)){const h=t.map(c=>Se(c,e,r));return c=>{for(const m of h){const p=m(c);if(p)return p}return!1}}const n=OS(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");const i=e||{},s=Za.isWindows(e),a=n?Se.compileRe(t,e):Se.makeRe(t,e,!1,!0),o=a.state;delete a.state;let u=()=>!1;if(i.ignore){const h={...e,ignore:null,onMatch:null,onResult:null};u=Se(i.ignore,h,r)}const l=(h,f=!1)=>{const{isMatch:c,match:m,output:p}=Se.test(h,a,e,{glob:t,posix:s}),y={glob:t,state:o,regex:a,posix:s,input:h,output:p,match:m,isMatch:c};return typeof i.onResult=="function"&&i.onResult(y),c===!1?(y.isMatch=!1,f?y:!1):u(h)?(typeof i.onIgnore=="function"&&i.onIgnore(y),y.isMatch=!1,f?y:!1):(typeof i.onMatch=="function"&&i.onMatch(y),f?y:!0)};return r&&(l.state=o),l};Se.test=(t,e,r,{glob:n,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};const s=r||{},a=s.format||(i?Za.toPosixSlashes:null);let o=t===n,u=o&&a?a(t):t;return o===!1&&(u=a?a(t):t,o=u===n),(o===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?o=Se.matchBase(t,e,r,i):o=e.exec(u)),{isMatch:Boolean(o),match:o,output:u}},Se.matchBase=(t,e,r,n=Za.isWindows(r))=>(e instanceof RegExp?e:Se.makeRe(e,r)).test(xS.basename(t)),Se.isMatch=(t,e,r)=>Se(e,r)(t),Se.parse=(t,e)=>Array.isArray(t)?t.map(r=>Se.parse(r,e)):Ja(t,{...e,fastpaths:!1}),Se.scan=(t,e)=>TS(t,e),Se.compileRe=(t,e,r=!1,n=!1)=>{if(r===!0)return t.output;const i=e||{},s=i.contains?"":"^",a=i.contains?"":"$";let o=`${s}(?:${t.output})${a}`;t&&t.negated===!0&&(o=`^(?!${o}).*$`);const u=Se.toRegex(o,e);return n===!0&&(u.state=t),u},Se.makeRe=(t,e={},r=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=Ja.fastpaths(t,e)),i.output||(i=Ja(t,e)),Se.compileRe(i,e,r,n)},Se.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}},Se.constants=$S;var FS=Se,PS=FS;const vf=Yt,bf=rS,St=PS,eo=un,Df=t=>t===""||t==="./",de=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,i=new Set,s=new Set,a=0,o=h=>{s.add(h.output),r&&r.onResult&&r.onResult(h)};for(let h=0;h<e.length;h++){let f=St(String(e[h]),{...r,onResult:o},!0),c=f.state.negated||f.state.negatedExtglob;c&&a++;for(let m of t){let p=f(m,!0);!(c?!p.isMatch:p.isMatch)||(c?n.add(p.output):(n.delete(p.output),i.add(p.output)))}}let l=(a===e.length?[...s]:[...i]).filter(h=>!n.has(h));if(r&&l.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(h=>h.replace(/\\/g,"")):e}return l};de.match=de,de.matcher=(t,e)=>St(t,e),de.isMatch=(t,e,r)=>St(e,r)(t),de.any=de.isMatch,de.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,i=[],a=de(t,e,{...r,onResult:o=>{r.onResult&&r.onResult(o),i.push(o.output)}});for(let o of i)a.includes(o)||n.add(o);return[...n]},de.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${vf.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>de.contains(t,n,r));if(typeof e=="string"){if(Df(t)||Df(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return de.isMatch(t,e,{...r,contains:!0})},de.matchKeys=(t,e,r)=>{if(!eo.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=de(Object.keys(t),e,r),i={};for(let s of n)i[s]=t[s];return i},de.some=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=St(String(i),r);if(n.some(a=>s(a)))return!0}return!1},de.every=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=St(String(i),r);if(!n.every(a=>s(a)))return!1}return!0},de.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${vf.inspect(t)}"`);return[].concat(e).every(n=>St(n,r)(t))},de.capture=(t,e,r)=>{let n=eo.isWindows(r),s=St.makeRe(String(t),{...r,capture:!0}).exec(n?eo.toPosixSlashes(e):e);if(s)return s.slice(1).map(a=>a===void 0?"":a)},de.makeRe=(...t)=>St.makeRe(...t),de.scan=(...t)=>St.scan(...t),de.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let i of bf(String(n),e))r.push(St.parse(i,e));return r},de.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:bf(t,e)},de.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return de.braces(t,{...e,expand:!0})};var kS=de;Object.defineProperty(V,"__esModule",{value:!0}),V.matchAny=V.convertPatternsToRe=V.makeRe=V.getPatternParts=V.expandBraceExpansion=V.expandPatternsWithBraceExpansion=V.isAffectDepthOfReadingPattern=V.endsWithSlashGlobStar=V.hasGlobStar=V.getBaseDirectory=V.isPatternRelatedToParentDirectory=V.getPatternsOutsideCurrentDirectory=V.getPatternsInsideCurrentDirectory=V.getPositivePatterns=V.getNegativePatterns=V.isPositivePattern=V.isNegativePattern=V.convertToNegativePattern=V.convertToPositivePattern=V.isDynamicPattern=V.isStaticPattern=void 0;const IS=we,LS=p_,to=kS,wf="**",BS="\\",NS=/[*?]|^!/,MS=/\[[^[]*]/,jS=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,HS=/[!*+?@]\([^(]*\)/,US=/,|\.\./;function Ef(t,e={}){return!_f(t,e)}V.isStaticPattern=Ef;function _f(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(BS)||NS.test(t)||MS.test(t)||jS.test(t)||e.extglob!==!1&&HS.test(t)||e.braceExpansion!==!1&&qS(t))}V.isDynamicPattern=_f;function qS(t){const e=t.indexOf("{");if(e===-1)return!1;const r=t.indexOf("}",e+1);if(r===-1)return!1;const n=t.slice(e,r);return US.test(n)}function GS(t){return Si(t)?t.slice(1):t}V.convertToPositivePattern=GS;function zS(t){return"!"+t}V.convertToNegativePattern=zS;function Si(t){return t.startsWith("!")&&t[1]!=="("}V.isNegativePattern=Si;function Sf(t){return!Si(t)}V.isPositivePattern=Sf;function VS(t){return t.filter(Si)}V.getNegativePatterns=VS;function WS(t){return t.filter(Sf)}V.getPositivePatterns=WS;function KS(t){return t.filter(e=>!ro(e))}V.getPatternsInsideCurrentDirectory=KS;function YS(t){return t.filter(ro)}V.getPatternsOutsideCurrentDirectory=YS;function ro(t){return t.startsWith("..")||t.startsWith("./..")}V.isPatternRelatedToParentDirectory=ro;function XS(t){return LS(t,{flipBackslashes:!1})}V.getBaseDirectory=XS;function QS(t){return t.includes(wf)}V.hasGlobStar=QS;function Cf(t){return t.endsWith("/"+wf)}V.endsWithSlashGlobStar=Cf;function JS(t){const e=IS.basename(t);return Cf(t)||Ef(e)}V.isAffectDepthOfReadingPattern=JS;function ZS(t){return t.reduce((e,r)=>e.concat(Af(r)),[])}V.expandPatternsWithBraceExpansion=ZS;function Af(t){return to.braces(t,{expand:!0,nodupes:!0})}V.expandBraceExpansion=Af;function eC(t,e){let{parts:r}=to.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}V.getPatternParts=eC;function Rf(t,e){return to.makeRe(t,e)}V.makeRe=Rf;function tC(t,e){return t.map(r=>Rf(r,e))}V.convertPatternsToRe=tC;function rC(t,e){return e.some(r=>r.test(t))}V.matchAny=rC;var Ci={};const nC=Ye,xf=nC.PassThrough,iC=Array.prototype.slice;var sC=aC;function aC(){const t=[],e=iC.call(arguments);let r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};const i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);const a=xf(n);function o(){for(let h=0,f=arguments.length;h<f;h++)t.push(Tf(arguments[h],n));return u(),this}function u(){if(r)return;r=!0;let h=t.shift();if(!h){process.nextTick(l);return}Array.isArray(h)||(h=[h]);let f=h.length+1;function c(){--f>0||(r=!1,u())}function m(p){function y(){p.removeListener("merge2UnpipeEnd",y),p.removeListener("end",y),s&&p.removeListener("error",b),c()}function b(D){a.emit("error",D)}if(p._readableState.endEmitted)return c();p.on("merge2UnpipeEnd",y),p.on("end",y),s&&p.on("error",b),p.pipe(a,{end:!1}),p.resume()}for(let p=0;p<h.length;p++)m(h[p]);c()}function l(){r=!1,a.emit("queueDrain"),i&&a.end()}return a.setMaxListeners(0),a.add=o,a.on("unpipe",function(h){h.emit("merge2UnpipeEnd")}),e.length&&o.apply(null,e),a}function Tf(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=Tf(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(xf(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.merge=void 0;const oC=sC;function uC(t){const e=oC(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>$f(t)),e.once("end",()=>$f(t)),e}Ci.merge=uC;function $f(t){t.forEach(e=>e.emit("close"))}var Pr={};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.isEmpty=Pr.isString=void 0;function lC(t){return typeof t=="string"}Pr.isString=lC;function cC(t){return t===""}Pr.isEmpty=cC,Object.defineProperty(ge,"__esModule",{value:!0}),ge.string=ge.stream=ge.pattern=ge.path=ge.fs=ge.errno=ge.array=void 0;const hC=$r;ge.array=hC;const fC=gi;ge.errno=fC;const dC=yi;ge.fs=dC;const pC=Et;ge.path=pC;const mC=V;ge.pattern=mC;const gC=Ci;ge.stream=gC;const yC=Pr;ge.string=yC,Object.defineProperty(Me,"__esModule",{value:!0}),Me.convertPatternGroupToTask=Me.convertPatternGroupsToTasks=Me.groupPatternsByBaseDirectory=Me.getNegativePatternsAsPositive=Me.getPositivePatterns=Me.convertPatternsToTasks=Me.generate=void 0;const It=ge;function vC(t,e){const r=Of(t),n=Ff(t,e.ignore),i=r.filter(u=>It.pattern.isStaticPattern(u,e)),s=r.filter(u=>It.pattern.isDynamicPattern(u,e)),a=no(i,n,!1),o=no(s,n,!0);return a.concat(o)}Me.generate=vC;function no(t,e,r){const n=[],i=It.pattern.getPatternsOutsideCurrentDirectory(t),s=It.pattern.getPatternsInsideCurrentDirectory(t),a=io(i),o=io(s);return n.push(...so(a,e,r)),"."in o?n.push(ao(".",s,e,r)):n.push(...so(o,e,r)),n}Me.convertPatternsToTasks=no;function Of(t){return It.pattern.getPositivePatterns(t)}Me.getPositivePatterns=Of;function Ff(t,e){return It.pattern.getNegativePatterns(t).concat(e).map(It.pattern.convertToPositivePattern)}Me.getNegativePatternsAsPositive=Ff;function io(t){const e={};return t.reduce((r,n)=>{const i=It.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},e)}Me.groupPatternsByBaseDirectory=io;function so(t,e,r){return Object.keys(t).map(n=>ao(n,t[n],e,r))}Me.convertPatternGroupsToTasks=so;function ao(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(It.pattern.convertToNegativePattern))}}Me.convertPatternGroupToTask=ao;var kr={};Object.defineProperty(kr,"__esModule",{value:!0}),kr.removeDuplicateSlashes=kr.transform=void 0;const bC=/(?!^)\/{2,}/g;function DC(t){return t.map(e=>Pf(e))}kr.transform=DC;function Pf(t){return t.replace(bC,"/")}kr.removeDuplicateSlashes=Pf;var oo={},Ai={},tt={},Ri={};Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.read=void 0;function wC(t,e,r){e.fs.lstat(t,(n,i)=>{if(n!==null){kf(r,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){uo(r,i);return}e.fs.stat(t,(s,a)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){kf(r,s);return}uo(r,i);return}e.markSymbolicLink&&(a.isSymbolicLink=()=>!0),uo(r,a)})})}Ri.read=wC;function kf(t,e){t(e)}function uo(t,e){t(null,e)}var xi={};Object.defineProperty(xi,"__esModule",{value:!0}),xi.read=void 0;function EC(t,e){const r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{const n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}xi.read=EC;var lo={},If={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=Qe;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync};function r(n){return n===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),n)}t.createFileSystemAdapter=r})(If),Object.defineProperty(lo,"__esModule",{value:!0});const _C=If;class SC{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=_C.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}}lo.default=SC,Object.defineProperty(tt,"__esModule",{value:!0}),tt.statSync=tt.stat=tt.Settings=void 0;const Lf=Ri,CC=xi,co=lo;tt.Settings=co.default;function AC(t,e,r){if(typeof e=="function"){Lf.read(t,ho(),e);return}Lf.read(t,ho(e),r)}tt.stat=AC;function RC(t,e){const r=ho(e);return CC.read(t,r)}tt.statSync=RC;function ho(t={}){return t instanceof co.default?t:new co.default(t)}var mt={},fo={},Ti={},Ct={},zt={};/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */let Bf;var xC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:le):t=>(Bf||(Bf=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0));/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var TC=OC;const $C=xC;function OC(t,e){let r,n,i,s=!0;Array.isArray(t)?(r=[],n=t.length):(i=Object.keys(t),r={},n=i.length);function a(u){function l(){e&&e(u,r),e=null}s?$C(l):l()}function o(u,l,h){r[u]=h,(--n===0||l)&&a(l)}n?i?i.forEach(function(u){t[u](function(l,h){o(u,l,h)})}):t.forEach(function(u,l){u(function(h,f){o(l,h,f)})}):a(null),s=!1}var cn={};Object.defineProperty(cn,"__esModule",{value:!0}),cn.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const $i=process.versions.node.split(".");if($i[0]===void 0||$i[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const Nf=Number.parseInt($i[0],10),FC=Number.parseInt($i[1],10),Mf=10,PC=10,kC=Nf>Mf,IC=Nf===Mf&&FC>=PC;cn.IS_SUPPORT_READDIR_WITH_FILE_TYPES=kC||IC;var hn={},Oi={};Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.createDirentFromStats=void 0;class LC{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function BC(t,e){return new LC(t,e)}Oi.createDirentFromStats=BC,Object.defineProperty(hn,"__esModule",{value:!0}),hn.fs=void 0;const NC=Oi;hn.fs=NC;var fn={};Object.defineProperty(fn,"__esModule",{value:!0}),fn.joinPathSegments=void 0;function MC(t,e,r){return t.endsWith(r)?t+e:t+r+e}fn.joinPathSegments=MC,Object.defineProperty(zt,"__esModule",{value:!0}),zt.readdir=zt.readdirWithFileTypes=zt.read=void 0;const jC=tt,jf=TC,HC=cn,Hf=hn,Uf=fn;function UC(t,e,r){if(!e.stats&&HC.IS_SUPPORT_READDIR_WITH_FILE_TYPES){qf(t,e,r);return}Gf(t,e,r)}zt.read=UC;function qf(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,i)=>{if(n!==null){Fi(r,n);return}const s=i.map(o=>({dirent:o,name:o.name,path:Uf.joinPathSegments(t,o.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){po(r,s);return}const a=s.map(o=>qC(o,e));jf(a,(o,u)=>{if(o!==null){Fi(r,o);return}po(r,u)})})}zt.readdirWithFileTypes=qf;function qC(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,i)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=Hf.fs.createDirentFromStats(t.name,i),r(null,t)})}}function Gf(t,e,r){e.fs.readdir(t,(n,i)=>{if(n!==null){Fi(r,n);return}const s=i.map(a=>{const o=Uf.joinPathSegments(t,a,e.pathSegmentSeparator);return u=>{jC.stat(o,e.fsStatSettings,(l,h)=>{if(l!==null){u(l);return}const f={name:a,path:o,dirent:Hf.fs.createDirentFromStats(a,h)};e.stats&&(f.stats=h),u(null,f)})}});jf(s,(a,o)=>{if(a!==null){Fi(r,a);return}po(r,o)})})}zt.readdir=Gf;function Fi(t,e){t(e)}function po(t,e){t(null,e)}var Vt={};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.readdir=Vt.readdirWithFileTypes=Vt.read=void 0;const GC=tt,zC=cn,zf=hn,Vf=fn;function VC(t,e){return!e.stats&&zC.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Wf(t,e):Kf(t,e)}Vt.read=VC;function Wf(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{const i={dirent:n,name:n.name,path:Vf.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{const s=e.fs.statSync(i.path);i.dirent=zf.fs.createDirentFromStats(i.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return i})}Vt.readdirWithFileTypes=Wf;function Kf(t,e){return e.fs.readdirSync(t).map(n=>{const i=Vf.joinPathSegments(t,n,e.pathSegmentSeparator),s=GC.statSync(i,e.fsStatSettings),a={name:n,path:i,dirent:zf.fs.createDirentFromStats(n,s)};return e.stats&&(a.stats=s),a})}Vt.readdir=Kf;var mo={},Yf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=Qe;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};function r(n){return n===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),n)}t.createFileSystemAdapter=r})(Yf),Object.defineProperty(mo,"__esModule",{value:!0});const WC=we,KC=tt,YC=Yf;class XC{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=YC.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,WC.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new KC.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}}mo.default=XC,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.Settings=Ct.scandirSync=Ct.scandir=void 0;const Xf=zt,QC=Vt,go=mo;Ct.Settings=go.default;function JC(t,e,r){if(typeof e=="function"){Xf.read(t,yo(),e);return}Xf.read(t,yo(e),r)}Ct.scandir=JC;function ZC(t,e){const r=yo(e);return QC.read(t,r)}Ct.scandirSync=ZC;function yo(t={}){return t instanceof go.default?t:new go.default(t)}var vo={exports:{}};function e2(t){var e=new t,r=e;function n(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}var t2=e2,r2=t2;function Qf(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var n=r2(n2),i=null,s=null,a=0,o=null,u={push:y,drain:at,saturated:at,pause:h,paused:!1,concurrency:r,running:l,resume:m,idle:p,length:f,getQueue:c,unshift:b,empty:at,kill:_,killAndDrain:R,error:S};return u;function l(){return a}function h(){u.paused=!0}function f(){for(var v=i,d=0;v;)v=v.next,d++;return d}function c(){for(var v=i,d=[];v;)d.push(v.value),v=v.next;return d}function m(){if(!!u.paused){u.paused=!1;for(var v=0;v<u.concurrency;v++)a++,D()}}function p(){return a===0&&u.length()===0}function y(v,d){var w=n.get();w.context=t,w.release=D,w.value=v,w.callback=d||at,w.errorHandler=o,a===u.concurrency||u.paused?s?(s.next=w,s=w):(i=w,s=w,u.saturated()):(a++,e.call(t,w.value,w.worked))}function b(v,d){var w=n.get();w.context=t,w.release=D,w.value=v,w.callback=d||at,a===u.concurrency||u.paused?i?(w.next=i,i=w):(i=w,s=w,u.saturated()):(a++,e.call(t,w.value,w.worked))}function D(v){v&&n.release(v);var d=i;d?u.paused?a--:(s===i&&(s=null),i=d.next,d.next=null,e.call(t,d.value,d.worked),s===null&&u.empty()):--a===0&&u.drain()}function _(){i=null,s=null,u.drain=at}function R(){i=null,s=null,u.drain(),u.drain=at}function S(v){o=v}}function at(){}function n2(){this.value=null,this.callback=at,this.next=null,this.release=at,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var i=t.callback,s=t.errorHandler,a=t.value;t.value=null,t.callback=at,t.errorHandler&&s(r,a),i.call(t.context,r,n),t.release(t)}}function i2(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(h,f){e.call(this,h).then(function(c){f(null,c)},f)}var i=Qf(t,n,r),s=i.push,a=i.unshift;return i.push=o,i.unshift=u,i.drained=l,i;function o(h){var f=new Promise(function(c,m){s(h,function(p,y){if(p){m(p);return}c(y)})});return f.catch(at),f}function u(h){var f=new Promise(function(c,m){a(h,function(p,y){if(p){m(p);return}c(y)})});return f.catch(at),f}function l(){var h=i.drain,f=new Promise(function(c){i.drain=function(){h(),c()}});return f}}vo.exports=Qf,vo.exports.promise=i2;var ot={};Object.defineProperty(ot,"__esModule",{value:!0}),ot.joinPathSegments=ot.replacePathSegmentSeparator=ot.isAppliedFilter=ot.isFatalError=void 0;function s2(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}ot.isFatalError=s2;function a2(t,e){return t===null||t(e)}ot.isAppliedFilter=a2;function o2(t,e){return t.split(/[/\\]/).join(e)}ot.replacePathSegmentSeparator=o2;function u2(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}ot.joinPathSegments=u2;var Pi={};Object.defineProperty(Pi,"__esModule",{value:!0});const l2=ot;class c2{constructor(e,r){this._root=e,this._settings=r,this._root=l2.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}}Pi.default=c2,Object.defineProperty(Ti,"__esModule",{value:!0});const h2=jt,f2=Ct,d2=vo.exports,ki=ot,p2=Pi;class m2 extends p2.default{constructor(e,r){super(e,r);this._settings=r,this._scandir=f2.scandir,this._emitter=new h2.EventEmitter,this._queue=d2(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){const n={directory:e,base:r};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){r(n,void 0);return}for(const s of i)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!ki.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;const n=e.path;r!==void 0&&(e.path=ki.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),ki.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&ki.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}Ti.default=m2,Object.defineProperty(fo,"__esModule",{value:!0});const g2=Ti;class y2{constructor(e,r){this._root=e,this._settings=r,this._reader=new g2.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{v2(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{b2(e,this._storage)}),this._reader.read()}}fo.default=y2;function v2(t,e){t(e)}function b2(t,e){t(null,e)}var bo={};Object.defineProperty(bo,"__esModule",{value:!0});const D2=Ye,w2=Ti;class E2{constructor(e,r){this._root=e,this._settings=r,this._reader=new w2.default(this._root,this._settings),this._stream=new D2.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}bo.default=E2;var Do={},wo={};Object.defineProperty(wo,"__esModule",{value:!0});const _2=Ct,Ii=ot,S2=Pi;class C2 extends S2.default{constructor(){super(...arguments);this._scandir=_2.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{const n=this._scandir(e,this._settings.fsScandirSettings);for(const i of n)this._handleEntry(i,r)}catch(n){this._handleError(n)}}_handleError(e){if(!!Ii.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;r!==void 0&&(e.path=Ii.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Ii.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&Ii.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}wo.default=C2,Object.defineProperty(Do,"__esModule",{value:!0});const A2=wo;class R2{constructor(e,r){this._root=e,this._settings=r,this._reader=new A2.default(this._root,this._settings)}read(){return this._reader.read()}}Do.default=R2;var Eo={};Object.defineProperty(Eo,"__esModule",{value:!0});const x2=we,T2=Ct;class $2{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,x2.sep),this.fsScandirSettings=new T2.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}}Eo.default=$2,Object.defineProperty(mt,"__esModule",{value:!0}),mt.Settings=mt.walkStream=mt.walkSync=mt.walk=void 0;const Jf=fo,O2=bo,F2=Do,_o=Eo;mt.Settings=_o.default;function P2(t,e,r){if(typeof e=="function"){new Jf.default(t,Li()).read(e);return}new Jf.default(t,Li(e)).read(r)}mt.walk=P2;function k2(t,e){const r=Li(e);return new F2.default(t,r).read()}mt.walkSync=k2;function I2(t,e){const r=Li(e);return new O2.default(t,r).read()}mt.walkStream=I2;function Li(t={}){return t instanceof _o.default?t:new _o.default(t)}var Bi={};Object.defineProperty(Bi,"__esModule",{value:!0});const L2=we,B2=tt,Zf=ge;class N2{constructor(e){this._settings=e,this._fsStatSettings=new B2.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return L2.resolve(this._settings.cwd,e)}_makeEntry(e,r){const n={name:r,path:r,dirent:Zf.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!Zf.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}}Bi.default=N2,Object.defineProperty(Ai,"__esModule",{value:!0});const M2=Ye,j2=tt,H2=mt,U2=Bi;class q2 extends U2.default{constructor(){super(...arguments);this._walkStream=H2.walkStream,this._stat=j2.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){const n=e.map(this._getFullEntryPath,this),i=new M2.PassThrough({objectMode:!0});i._write=(s,a,o)=>this._getEntry(n[s],e[s],r).then(u=>{u!==null&&r.entryFilter(u)&&i.push(u),s===n.length-1&&i.end(),o()}).catch(o);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(e,r,n){return this._getStat(e).then(i=>this._makeEntry(i,r)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(i,s)=>i===null?r(s):n(i))})}}Ai.default=q2;var dn={},So={},Co={},Ao={};Object.defineProperty(Ao,"__esModule",{value:!0});const Ir=ge;class G2{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){const e=Ir.pattern.expandPatternsWithBraceExpansion(this._patterns);for(const r of e){const n=this._getPatternSegments(r),i=this._splitSegmentsIntoSections(n);this._storage.push({complete:i.length<=1,pattern:r,segments:n,sections:i})}}_getPatternSegments(e){return Ir.pattern.getPatternParts(e,this._micromatchOptions).map(n=>Ir.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:Ir.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return Ir.array.splitWhen(e,r=>r.dynamic&&Ir.pattern.hasGlobStar(r.pattern))}}Ao.default=G2,Object.defineProperty(Co,"__esModule",{value:!0});const z2=Ao;class V2 extends z2.default{match(e){const r=e.split("/"),n=r.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(const s of i){const a=s.sections[0];if(!s.complete&&n>a.length||r.every((u,l)=>{const h=s.segments[l];return!!(h.dynamic&&h.patternRe.test(u)||!h.dynamic&&h.pattern===u)}))return!0}return!1}}Co.default=V2,Object.defineProperty(So,"__esModule",{value:!0});const Ni=ge,W2=Co;class K2{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){const i=this._getMatcher(r),s=this._getNegativePatternsRe(n);return a=>this._filter(e,a,i,s)}_getMatcher(e){return new W2.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const r=e.filter(Ni.pattern.isAffectDepthOfReadingPattern);return Ni.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,i){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;const s=Ni.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){const n=r.split("/").length;if(e==="")return n;const i=e.split("/").length;return n-i}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!Ni.pattern.matchAny(e,r)}}So.default=K2;var Ro={};Object.defineProperty(Ro,"__esModule",{value:!0});const or=ge;class Y2{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){const n=or.pattern.convertPatternsToRe(e,this._micromatchOptions),i=or.pattern.convertPatternsToRe(r,this._micromatchOptions);return s=>this._filter(s,n,i)}_filter(e,r,n){if(this._settings.unique&&this._isDuplicateEntry(e)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e.path,n))return!1;const i=this._settings.baseNameMatch?e.name:e.path,s=this._isMatchToPatterns(i,r)&&!this._isMatchToPatterns(e.path,n);return this._settings.unique&&s&&this._createIndexRecord(e),s}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;const n=or.path.makeAbsolute(this._settings.cwd,e);return or.pattern.matchAny(n,r)}_isMatchToPatterns(e,r){const n=or.path.removeLeadingDotSegment(e);return or.pattern.matchAny(n,r)||or.pattern.matchAny(n+"/",r)}}Ro.default=Y2;var xo={};Object.defineProperty(xo,"__esModule",{value:!0});const X2=ge;class Q2{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return X2.errno.isEnoentCodeError(e)||this._settings.suppressErrors}}xo.default=Q2;var To={};Object.defineProperty(To,"__esModule",{value:!0});const ed=ge;class J2{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=ed.path.makeAbsolute(this._settings.cwd,r),r=ed.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}}To.default=J2,Object.defineProperty(dn,"__esModule",{value:!0});const Z2=we,eA=So,tA=Ro,rA=xo,nA=To;class iA{constructor(e){this._settings=e,this.errorFilter=new rA.default(this._settings),this.entryFilter=new tA.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new eA.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new nA.default(this._settings)}_getRootDirectory(e){return Z2.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){const r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}}dn.default=iA,Object.defineProperty(oo,"__esModule",{value:!0});const sA=Ai,aA=dn;class oA extends aA.default{constructor(){super(...arguments);this._reader=new sA.default(this._settings)}read(e){const r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=[];return new Promise((s,a)=>{const o=this.api(r,e,n);o.once("error",a),o.on("data",u=>i.push(n.transform(u))),o.once("end",()=>s(i))})}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}}oo.default=oA;var $o={};Object.defineProperty($o,"__esModule",{value:!0});const uA=Ye,lA=Ai,cA=dn;class hA extends cA.default{constructor(){super(...arguments);this._reader=new lA.default(this._settings)}read(e){const r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(r,e,n),s=new uA.Readable({objectMode:!0,read:()=>{}});return i.once("error",a=>s.emit("error",a)).on("data",a=>s.emit("data",n.transform(a))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}}$o.default=hA;var Oo={},Fo={};Object.defineProperty(Fo,"__esModule",{value:!0});const fA=tt,dA=mt,pA=Bi;class mA extends pA.default{constructor(){super(...arguments);this._walkSync=dA.walkSync,this._statSync=fA.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){const n=[];for(const i of e){const s=this._getFullEntryPath(i),a=this._getEntry(s,i,r);a===null||!r.entryFilter(a)||n.push(a)}return n}_getEntry(e,r,n){try{const i=this._getStat(e);return this._makeEntry(i,r)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}Fo.default=mA,Object.defineProperty(Oo,"__esModule",{value:!0});const gA=Fo,yA=dn;class vA extends yA.default{constructor(){super(...arguments);this._reader=new gA.default(this._settings)}read(e){const r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}}Oo.default=vA;var td={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const e=Qe,n=Math.max(Pn.cpus().length,1);t.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:e.lstat,lstatSync:e.lstatSync,stat:e.stat,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};class i{constructor(a={}){this._options=a,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,n),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(a,o){return a===void 0?o:a}_getFileSystemMethods(a={}){return Object.assign(Object.assign({},t.DEFAULT_FILE_SYSTEM_ADAPTER),a)}}t.default=i})(td);const rd=Me,nd=kr,bA=oo,DA=$o,wA=Oo,Po=td,ur=ge;async function ko(t,e){Lr(t);const r=Io(t,bA.default,e),n=await Promise.all(r);return ur.array.flatten(n)}(function(t){function e(a,o){Lr(a);const u=Io(a,wA.default,o);return ur.array.flatten(u)}t.sync=e;function r(a,o){Lr(a);const u=Io(a,DA.default,o);return ur.stream.merge(u)}t.stream=r;function n(a,o){Lr(a);const u=nd.transform([].concat(a)),l=new Po.default(o);return rd.generate(u,l)}t.generateTasks=n;function i(a,o){Lr(a);const u=new Po.default(o);return ur.pattern.isDynamicPattern(a,u)}t.isDynamicPattern=i;function s(a){return Lr(a),ur.path.escape(a)}t.escapePath=s})(ko||(ko={}));function Io(t,e,r){const n=nd.transform([].concat(t)),i=new Po.default(r),s=rd.generate(n,i),a=new e(i);return s.map(a.read,a)}function Lr(t){if(![].concat(t).every(n=>ur.string.isString(n)&&!ur.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}var EA=ko;const _A=async t=>Qe.promises.readFile(t,{encoding:"utf-8"}),SA=async(t,e)=>Qe.promises.writeFile(t,e);async function id(t){return Qe.promises.mkdir(t,{recursive:!0})}const CA=t=>Qe.lstatSync(t).isDirectory();var Lo={exports:{}};let AA=am,RA=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||AA.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),pe=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+sd(i,e,r,s)+e:t+i+e},sd=(t,e,r,n)=>{let i=t.substring(0,n)+r,s=t.substring(n+e.length),a=s.indexOf(e);return~a?i+sd(s,e,r,a):i+s},ad=(t=RA)=>({isColorSupported:t,reset:t?e=>`\x1B[0m${e}\x1B[0m`:String,bold:t?pe("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:t?pe("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:t?pe("\x1B[3m","\x1B[23m"):String,underline:t?pe("\x1B[4m","\x1B[24m"):String,inverse:t?pe("\x1B[7m","\x1B[27m"):String,hidden:t?pe("\x1B[8m","\x1B[28m"):String,strikethrough:t?pe("\x1B[9m","\x1B[29m"):String,black:t?pe("\x1B[30m","\x1B[39m"):String,red:t?pe("\x1B[31m","\x1B[39m"):String,green:t?pe("\x1B[32m","\x1B[39m"):String,yellow:t?pe("\x1B[33m","\x1B[39m"):String,blue:t?pe("\x1B[34m","\x1B[39m"):String,magenta:t?pe("\x1B[35m","\x1B[39m"):String,cyan:t?pe("\x1B[36m","\x1B[39m"):String,white:t?pe("\x1B[37m","\x1B[39m"):String,gray:t?pe("\x1B[90m","\x1B[39m"):String,bgBlack:t?pe("\x1B[40m","\x1B[49m"):String,bgRed:t?pe("\x1B[41m","\x1B[49m"):String,bgGreen:t?pe("\x1B[42m","\x1B[49m"):String,bgYellow:t?pe("\x1B[43m","\x1B[49m"):String,bgBlue:t?pe("\x1B[44m","\x1B[49m"):String,bgMagenta:t?pe("\x1B[45m","\x1B[49m"):String,bgCyan:t?pe("\x1B[46m","\x1B[49m"):String,bgWhite:t?pe("\x1B[47m","\x1B[49m"):String});Lo.exports=ad(),Lo.exports.createColors=ad;var Bo=Lo.exports;class od{constructor(e,r){this.type=r,this.value=e}}const xA={command:t=>new od(t,0),path:t=>new od(t,1)};class TA{constructor(e){this.value=e}}function $A(t,...e){let r="";return t.forEach((n,i)=>{if(r+=n,i>=e.length)return;const s=e[i];switch(s.type){case 0:r+=Bo.bold(s.value);break;case 1:r+=Bo.italic(s.value);break}}),new TA(r)}const OA=t=>{console.log(Bo.green(`\u{1F389} ${t.value}`))};function FA(t=process.env){if(t.npm_lifecycle_event==="npx")return"npm";if(t.npm_config_user_agent?.includes("yarn"))return"yarn";if(t.PNPM_HOME)return"pnpm";throw new pc("Couldn't determine the dependency used to run the create workflow")}async function PA(t,e){await ai(e,["install"],{cwd:t})}var Mi={exports:{}},No={exports:{}},Mo={},At={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function n(d){return r.includes(d)}const i=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...r];function s(d){return i.includes(d)}const a=["null","undefined","string","number","bigint","boolean","symbol"];function o(d){return a.includes(d)}function u(d){return w=>typeof w===d}const{toString:l}=Object.prototype,h=d=>{const w=l.call(d).slice(8,-1);if(/HTML\w+Element/.test(w)&&c.domElement(d))return"HTMLElement";if(s(w))return w},f=d=>w=>h(w)===d;function c(d){if(d===null)return"null";switch(typeof d){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(c.observable(d))return"Observable";if(c.array(d))return"Array";if(c.buffer(d))return"Buffer";const w=h(d);if(w)return w;if(d instanceof String||d instanceof Boolean||d instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}c.undefined=u("undefined"),c.string=u("string");const m=u("number");c.number=d=>m(d)&&!c.nan(d),c.bigint=u("bigint"),c.function_=u("function"),c.null_=d=>d===null,c.class_=d=>c.function_(d)&&d.toString().startsWith("class "),c.boolean=d=>d===!0||d===!1,c.symbol=u("symbol"),c.numericString=d=>c.string(d)&&!c.emptyStringOrWhitespace(d)&&!Number.isNaN(Number(d)),c.array=(d,w)=>Array.isArray(d)?c.function_(w)?d.every(w):!0:!1,c.buffer=d=>{var w,T,$,j;return(j=($=(T=(w=d)===null||w===void 0?void 0:w.constructor)===null||T===void 0?void 0:T.isBuffer)===null||$===void 0?void 0:$.call(T,d))!==null&&j!==void 0?j:!1},c.nullOrUndefined=d=>c.null_(d)||c.undefined(d),c.object=d=>!c.null_(d)&&(typeof d=="object"||c.function_(d)),c.iterable=d=>{var w;return c.function_((w=d)===null||w===void 0?void 0:w[Symbol.iterator])},c.asyncIterable=d=>{var w;return c.function_((w=d)===null||w===void 0?void 0:w[Symbol.asyncIterator])},c.generator=d=>{var w,T;return c.iterable(d)&&c.function_((w=d)===null||w===void 0?void 0:w.next)&&c.function_((T=d)===null||T===void 0?void 0:T.throw)},c.asyncGenerator=d=>c.asyncIterable(d)&&c.function_(d.next)&&c.function_(d.throw),c.nativePromise=d=>f("Promise")(d);const p=d=>{var w,T;return c.function_((w=d)===null||w===void 0?void 0:w.then)&&c.function_((T=d)===null||T===void 0?void 0:T.catch)};c.promise=d=>c.nativePromise(d)||p(d),c.generatorFunction=f("GeneratorFunction"),c.asyncGeneratorFunction=d=>h(d)==="AsyncGeneratorFunction",c.asyncFunction=d=>h(d)==="AsyncFunction",c.boundFunction=d=>c.function_(d)&&!d.hasOwnProperty("prototype"),c.regExp=f("RegExp"),c.date=f("Date"),c.error=f("Error"),c.map=d=>f("Map")(d),c.set=d=>f("Set")(d),c.weakMap=d=>f("WeakMap")(d),c.weakSet=d=>f("WeakSet")(d),c.int8Array=f("Int8Array"),c.uint8Array=f("Uint8Array"),c.uint8ClampedArray=f("Uint8ClampedArray"),c.int16Array=f("Int16Array"),c.uint16Array=f("Uint16Array"),c.int32Array=f("Int32Array"),c.uint32Array=f("Uint32Array"),c.float32Array=f("Float32Array"),c.float64Array=f("Float64Array"),c.bigInt64Array=f("BigInt64Array"),c.bigUint64Array=f("BigUint64Array"),c.arrayBuffer=f("ArrayBuffer"),c.sharedArrayBuffer=f("SharedArrayBuffer"),c.dataView=f("DataView"),c.enumCase=(d,w)=>Object.values(w).includes(d),c.directInstanceOf=(d,w)=>Object.getPrototypeOf(d)===w.prototype,c.urlInstance=d=>f("URL")(d),c.urlString=d=>{if(!c.string(d))return!1;try{return new URL(d),!0}catch{return!1}},c.truthy=d=>Boolean(d),c.falsy=d=>!d,c.nan=d=>Number.isNaN(d),c.primitive=d=>c.null_(d)||o(typeof d),c.integer=d=>Number.isInteger(d),c.safeInteger=d=>Number.isSafeInteger(d),c.plainObject=d=>{if(l.call(d)!=="[object Object]")return!1;const w=Object.getPrototypeOf(d);return w===null||w===Object.getPrototypeOf({})},c.typedArray=d=>n(h(d));const y=d=>c.safeInteger(d)&&d>=0;c.arrayLike=d=>!c.nullOrUndefined(d)&&!c.function_(d)&&y(d.length),c.inRange=(d,w)=>{if(c.number(w))return d>=Math.min(0,w)&&d<=Math.max(w,0);if(c.array(w)&&w.length===2)return d>=Math.min(...w)&&d<=Math.max(...w);throw new TypeError(`Invalid range: ${JSON.stringify(w)}`)};const b=1,D=["innerHTML","ownerDocument","style","attributes","nodeValue"];c.domElement=d=>c.object(d)&&d.nodeType===b&&c.string(d.nodeName)&&!c.plainObject(d)&&D.every(w=>w in d),c.observable=d=>{var w,T,$,j;return d?d===((T=(w=d)[Symbol.observable])===null||T===void 0?void 0:T.call(w))||d===((j=($=d)["@@observable"])===null||j===void 0?void 0:j.call($)):!1},c.nodeStream=d=>c.object(d)&&c.function_(d.pipe)&&!c.observable(d),c.infinite=d=>d===1/0||d===-1/0;const _=d=>w=>c.integer(w)&&Math.abs(w%2)===d;c.evenInteger=_(0),c.oddInteger=_(1),c.emptyArray=d=>c.array(d)&&d.length===0,c.nonEmptyArray=d=>c.array(d)&&d.length>0,c.emptyString=d=>c.string(d)&&d.length===0,c.nonEmptyString=d=>c.string(d)&&d.length>0;const R=d=>c.string(d)&&!/\S/.test(d);c.emptyStringOrWhitespace=d=>c.emptyString(d)||R(d),c.emptyObject=d=>c.object(d)&&!c.map(d)&&!c.set(d)&&Object.keys(d).length===0,c.nonEmptyObject=d=>c.object(d)&&!c.map(d)&&!c.set(d)&&Object.keys(d).length>0,c.emptySet=d=>c.set(d)&&d.size===0,c.nonEmptySet=d=>c.set(d)&&d.size>0,c.emptyMap=d=>c.map(d)&&d.size===0,c.nonEmptyMap=d=>c.map(d)&&d.size>0,c.propertyKey=d=>c.any([c.string,c.number,c.symbol],d),c.formData=d=>f("FormData")(d),c.urlSearchParams=d=>f("URLSearchParams")(d);const S=(d,w,T)=>{if(!c.function_(w))throw new TypeError(`Invalid predicate: ${JSON.stringify(w)}`);if(T.length===0)throw new TypeError("Invalid number of values");return d.call(T,w)};c.any=(d,...w)=>(c.array(d)?d:[d]).some($=>S(Array.prototype.some,$,w)),c.all=(d,...w)=>S(Array.prototype.every,d,w);const v=(d,w,T,$={})=>{if(!d){const{multipleValues:j}=$,A=j?`received values of types ${[...new Set(T.map(I=>`\`${c(I)}\``))].join(", ")}`:`received value of type \`${c(T)}\``;throw new TypeError(`Expected value which is \`${w}\`, ${A}.`)}};e.assert={undefined:d=>v(c.undefined(d),"undefined",d),string:d=>v(c.string(d),"string",d),number:d=>v(c.number(d),"number",d),bigint:d=>v(c.bigint(d),"bigint",d),function_:d=>v(c.function_(d),"Function",d),null_:d=>v(c.null_(d),"null",d),class_:d=>v(c.class_(d),"Class",d),boolean:d=>v(c.boolean(d),"boolean",d),symbol:d=>v(c.symbol(d),"symbol",d),numericString:d=>v(c.numericString(d),"string with a number",d),array:(d,w)=>{v(c.array(d),"Array",d),w&&d.forEach(w)},buffer:d=>v(c.buffer(d),"Buffer",d),nullOrUndefined:d=>v(c.nullOrUndefined(d),"null or undefined",d),object:d=>v(c.object(d),"Object",d),iterable:d=>v(c.iterable(d),"Iterable",d),asyncIterable:d=>v(c.asyncIterable(d),"AsyncIterable",d),generator:d=>v(c.generator(d),"Generator",d),asyncGenerator:d=>v(c.asyncGenerator(d),"AsyncGenerator",d),nativePromise:d=>v(c.nativePromise(d),"native Promise",d),promise:d=>v(c.promise(d),"Promise",d),generatorFunction:d=>v(c.generatorFunction(d),"GeneratorFunction",d),asyncGeneratorFunction:d=>v(c.asyncGeneratorFunction(d),"AsyncGeneratorFunction",d),asyncFunction:d=>v(c.asyncFunction(d),"AsyncFunction",d),boundFunction:d=>v(c.boundFunction(d),"Function",d),regExp:d=>v(c.regExp(d),"RegExp",d),date:d=>v(c.date(d),"Date",d),error:d=>v(c.error(d),"Error",d),map:d=>v(c.map(d),"Map",d),set:d=>v(c.set(d),"Set",d),weakMap:d=>v(c.weakMap(d),"WeakMap",d),weakSet:d=>v(c.weakSet(d),"WeakSet",d),int8Array:d=>v(c.int8Array(d),"Int8Array",d),uint8Array:d=>v(c.uint8Array(d),"Uint8Array",d),uint8ClampedArray:d=>v(c.uint8ClampedArray(d),"Uint8ClampedArray",d),int16Array:d=>v(c.int16Array(d),"Int16Array",d),uint16Array:d=>v(c.uint16Array(d),"Uint16Array",d),int32Array:d=>v(c.int32Array(d),"Int32Array",d),uint32Array:d=>v(c.uint32Array(d),"Uint32Array",d),float32Array:d=>v(c.float32Array(d),"Float32Array",d),float64Array:d=>v(c.float64Array(d),"Float64Array",d),bigInt64Array:d=>v(c.bigInt64Array(d),"BigInt64Array",d),bigUint64Array:d=>v(c.bigUint64Array(d),"BigUint64Array",d),arrayBuffer:d=>v(c.arrayBuffer(d),"ArrayBuffer",d),sharedArrayBuffer:d=>v(c.sharedArrayBuffer(d),"SharedArrayBuffer",d),dataView:d=>v(c.dataView(d),"DataView",d),enumCase:(d,w)=>v(c.enumCase(d,w),"EnumCase",d),urlInstance:d=>v(c.urlInstance(d),"URL",d),urlString:d=>v(c.urlString(d),"string with a URL",d),truthy:d=>v(c.truthy(d),"truthy",d),falsy:d=>v(c.falsy(d),"falsy",d),nan:d=>v(c.nan(d),"NaN",d),primitive:d=>v(c.primitive(d),"primitive",d),integer:d=>v(c.integer(d),"integer",d),safeInteger:d=>v(c.safeInteger(d),"integer",d),plainObject:d=>v(c.plainObject(d),"plain object",d),typedArray:d=>v(c.typedArray(d),"TypedArray",d),arrayLike:d=>v(c.arrayLike(d),"array-like",d),domElement:d=>v(c.domElement(d),"HTMLElement",d),observable:d=>v(c.observable(d),"Observable",d),nodeStream:d=>v(c.nodeStream(d),"Node.js Stream",d),infinite:d=>v(c.infinite(d),"infinite number",d),emptyArray:d=>v(c.emptyArray(d),"empty array",d),nonEmptyArray:d=>v(c.nonEmptyArray(d),"non-empty array",d),emptyString:d=>v(c.emptyString(d),"empty string",d),nonEmptyString:d=>v(c.nonEmptyString(d),"non-empty string",d),emptyStringOrWhitespace:d=>v(c.emptyStringOrWhitespace(d),"empty string or whitespace",d),emptyObject:d=>v(c.emptyObject(d),"empty object",d),nonEmptyObject:d=>v(c.nonEmptyObject(d),"non-empty object",d),emptySet:d=>v(c.emptySet(d),"empty set",d),nonEmptySet:d=>v(c.nonEmptySet(d),"non-empty set",d),emptyMap:d=>v(c.emptyMap(d),"empty map",d),nonEmptyMap:d=>v(c.nonEmptyMap(d),"non-empty map",d),propertyKey:d=>v(c.propertyKey(d),"PropertyKey",d),formData:d=>v(c.formData(d),"FormData",d),urlSearchParams:d=>v(c.urlSearchParams(d),"URLSearchParams",d),evenInteger:d=>v(c.evenInteger(d),"even integer",d),oddInteger:d=>v(c.oddInteger(d),"odd integer",d),directInstanceOf:(d,w)=>v(c.directInstanceOf(d,w),"T",d),inRange:(d,w)=>v(c.inRange(d,w),"in range",d),any:(d,...w)=>v(c.any(d,...w),"predicate returns truthy for any value",w,{multipleValues:!0}),all:(d,...w)=>v(c.all(d,...w),"predicate returns truthy for all values",w,{multipleValues:!0})},Object.defineProperties(c,{class:{value:c.class_},function:{value:c.function_},null:{value:c.null_}}),Object.defineProperties(e.assert,{class:{value:e.assert.class_},function:{value:e.assert.function_},null:{value:e.assert.null_}}),e.default=c,t.exports=c,t.exports.default=c,t.exports.assert=e.assert})(At,At.exports);var jo={},Ho={exports:{}};class ud extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return!0}}class as{static fn(e){return(...r)=>new as((n,i,s)=>{r.push(s),e(...r).then(n,i)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,n)=>{this._reject=n;const i=o=>{(!this._isCanceled||!a.shouldReject)&&(this._isPending=!1,r(o))},s=o=>{this._isPending=!1,n(o)},a=o=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(o)};return Object.defineProperties(a,{shouldReject:{get:()=>this._rejectOnCancel,set:o=>{this._rejectOnCancel=o}}}),e(i,s,a)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(const r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new ud(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(as.prototype,Promise.prototype),Ho.exports=as,Ho.exports.CancelError=ud;var pn={},mn={},Uo={exports:{}},qo={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});function r(i){return i.encrypted}const n=(i,s)=>{let a;typeof s=="function"?a={connect:s}:a=s;const o=typeof a.connect=="function",u=typeof a.secureConnect=="function",l=typeof a.close=="function",h=()=>{o&&a.connect(),r(i)&&u&&(i.authorized?a.secureConnect():i.authorizationError||i.once("secureConnect",a.secureConnect)),l&&i.once("close",a.close)};i.writable&&!i.connecting?h():i.connecting?i.once("connect",h):i.destroyed&&l&&a.close(i._hadError)};e.default=n,t.exports=n,t.exports.default=n})(qo,qo.exports),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=qo.exports,n=Yt,i=Number(process.versions.node.split(".")[0]),s=a=>{if(a.timings)return a.timings;const o={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};a.timings=o;const u=m=>{const p=m.emit.bind(m);m.emit=(y,...b)=>(y==="error"&&(o.error=Date.now(),o.phases.total=o.error-o.start,m.emit=p),p(y,...b))};u(a);const l=()=>{o.abort=Date.now(),(!o.response||i>=13)&&(o.phases.total=Date.now()-o.start)};a.prependOnceListener("abort",l);const h=m=>{if(o.socket=Date.now(),o.phases.wait=o.socket-o.start,n.types.isProxy(m))return;const p=()=>{o.lookup=Date.now(),o.phases.dns=o.lookup-o.socket};m.prependOnceListener("lookup",p),r.default(m,{connect:()=>{o.connect=Date.now(),o.lookup===void 0&&(m.removeListener("lookup",p),o.lookup=o.connect,o.phases.dns=o.lookup-o.socket),o.phases.tcp=o.connect-o.lookup},secureConnect:()=>{o.secureConnect=Date.now(),o.phases.tls=o.secureConnect-o.connect}})};a.socket?h(a.socket):a.prependOnceListener("socket",h);const f=()=>{var m;o.upload=Date.now(),o.phases.request=o.upload-((m=o.secureConnect)!==null&&m!==void 0?m:o.connect)};return(()=>typeof a.writableFinished=="boolean"?a.writableFinished:a.finished&&a.outputSize===0&&(!a.socket||a.socket.writableLength===0))()?f():a.prependOnceListener("finish",f),a.prependOnceListener("response",m=>{o.response=Date.now(),o.phases.firstByte=o.response-o.upload,m.timings=o,u(m),m.prependOnceListener("end",()=>{o.end=Date.now(),o.phases.download=o.end-o.response,o.phases.total=o.end-o.start}),m.prependOnceListener("aborted",l)}),o};e.default=s,t.exports=s,t.exports.default=s}(Uo,Uo.exports);var Go={exports:{}};const{V4MAPPED:kA,ADDRCONFIG:IA,ALL:ld,promises:{Resolver:cd},lookup:LA}=ym,{promisify:zo}=Yt,BA=Pn,Br=Symbol("cacheableLookupCreateConnection"),Vo=Symbol("cacheableLookupInstance"),hd=Symbol("expires"),NA=typeof ld=="number",fd=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},MA=t=>{for(const e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},dd=()=>{let t=!1,e=!1;for(const r of Object.values(BA.networkInterfaces()))for(const n of r)if(!n.internal&&(n.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},jA=t=>Symbol.iterator in t,pd={ttl:!0},HA={all:!0};class md{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:n=3600,errorTtl:i=.15,resolver:s=new cd,lookup:a=LA}={}){if(this.maxTtl=r,this.errorTtl=i,this._cache=e,this._resolver=s,this._dnsLookup=zo(a),this._resolver instanceof cd?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=zo(this._resolver.resolve4.bind(this._resolver)),this._resolve6=zo(this._resolver.resolve6.bind(this._resolver))),this._iface=dd(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,n<1)this._fallback=!1;else{this._fallback=!0;const o=setInterval(()=>{this._hostnamesToFallback.clear()},n*1e3);o.unref&&o.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,n){if(typeof r=="function"?(n=r,r={}):typeof r=="number"&&(r={family:r}),!n)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(i=>{r.all?n(null,i):n(null,i.address,i.family,i.expires,i.ttl)},n)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let n=await this.query(e);if(r.family===6){const i=n.filter(s=>s.family===6);r.hints&kA&&(NA&&r.hints&ld||i.length===0)?MA(n):n=i}else r.family===4&&(n=n.filter(i=>i.family===4));if(r.hints&IA){const{_iface:i}=this;n=n.filter(s=>s.family===6?i.has6:i.has4)}if(n.length===0){const i=new Error(`cacheableLookup ENOTFOUND ${e}`);throw i.code="ENOTFOUND",i.hostname=e,i}return r.all?n:n[0]}async query(e){let r=await this._cache.get(e);if(!r){const n=this._pending[e];if(n)r=await n;else{const i=this.queryAndCache(e);this._pending[e]=i;try{r=await i}finally{delete this._pending[e]}}}return r=r.map(n=>({...n})),r}async _resolve(e){const r=async l=>{try{return await l}catch(h){if(h.code==="ENODATA"||h.code==="ENOTFOUND")return[];throw h}},[n,i]=await Promise.all([this._resolve4(e,pd),this._resolve6(e,pd)].map(l=>r(l)));let s=0,a=0,o=0;const u=Date.now();for(const l of n)l.family=4,l.expires=u+l.ttl*1e3,s=Math.max(s,l.ttl);for(const l of i)l.family=6,l.expires=u+l.ttl*1e3,a=Math.max(a,l.ttl);return n.length>0?i.length>0?o=Math.min(s,a):o=s:o=a,{entries:[...n,...i],cacheTtl:o}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,n){if(this.maxTtl>0&&n>0){n=Math.min(n,this.maxTtl)*1e3,r[hd]=Date.now()+n;try{await this._cache.set(e,r,n)}catch(i){this.lookupAsync=async()=>{const s=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw s.cause=i,s}}jA(this._cache)&&this._tick(n)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,HA);let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));const n=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,n),r.entries}_tick(e){const r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let n=1/0;const i=Date.now();for(const[s,a]of this._cache){const o=a[hd];i>=o?this._cache.delete(s):o<n&&(n=o)}n!==1/0&&this._tick(n-i)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(fd(e),Br in e)throw new Error("CacheableLookup has been already installed");e[Br]=e.createConnection,e[Vo]=this,e.createConnection=(r,n)=>("lookup"in r||(r.lookup=this.lookup),e[Br](r,n))}uninstall(e){if(fd(e),e[Br]){if(e[Vo]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[Br],delete e[Br],delete e[Vo]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=dd(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}}Go.exports=md,Go.exports.default=md;const UA="text/plain",qA="us-ascii",gd=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),GA=(t,{stripHash:e})=>{const r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:n,data:i,hash:s}=r.groups;const a=n.split(";");s=e?"":s;let o=!1;a[a.length-1]==="base64"&&(a.pop(),o=!0);const u=(a.shift()||"").toLowerCase(),h=[...a.map(f=>{let[c,m=""]=f.split("=").map(p=>p.trim());return c==="charset"&&(m=m.toLowerCase(),m===qA)?"":`${c}${m?`=${m}`:""}`}).filter(Boolean)];return o&&h.push("base64"),(h.length!==0||u&&u!==UA)&&h.unshift(u),`data:${h.join(";")},${o?i.trim():i}${s?`#${s}`:""}`},zA=(t,e)=>{if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return GA(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");const r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));const i=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&i.protocol==="https:"&&(i.protocol="http:"),e.forceHttps&&i.protocol==="http:"&&(i.protocol="https:"),e.stripAuthentication&&(i.username="",i.password=""),e.stripHash?i.hash="":e.stripTextFragment&&(i.hash=i.hash.replace(/#?:~:text.*?$/i,"")),i.pathname&&(i.pathname=i.pathname.replace(/(?<!\b(?:[a-z][a-z\d+\-.]{1,50}:))\/{2,}/g,"/")),i.pathname)try{i.pathname=decodeURI(i.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let a=i.pathname.split("/");const o=a[a.length-1];gd(o,e.removeDirectoryIndex)&&(a=a.slice(0,a.length-1),i.pathname=a.slice(1).join("/")+"/")}if(i.hostname&&(i.hostname=i.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(i.hostname)&&(i.hostname=i.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(const a of[...i.searchParams.keys()])gd(a,e.removeQueryParameters)&&i.searchParams.delete(a);e.removeQueryParameters===!0&&(i.search=""),e.sortQueryParameters&&i.searchParams.sort(),e.removeTrailingSlash&&(i.pathname=i.pathname.replace(/\/$/,""));const s=t;return t=i.toString(),!e.removeSingleSlash&&i.pathname==="/"&&!s.endsWith("/")&&i.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||i.pathname==="/")&&i.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t};var VA=zA;const WA=new Set([200,203,204,206,300,301,404,405,410,414,501]),KA=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),YA=new Set([500,502,503,504]),XA={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},QA={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function lr(t){const e=parseInt(t,10);return isFinite(e)?e:0}function JA(t){return t?YA.has(t.status):!0}function Wo(t){const e={};if(!t)return e;const r=t.trim().split(/\s*,\s*/);for(const n of r){const[i,s]=n.split(/\s*=\s*/,2);e[i]=s===void 0?!0:s.replace(/^"|"$/g,"")}return e}function ZA(t){let e=[];for(const r in t){const n=t[r];e.push(n===!0?r:r+"="+n)}if(!!e.length)return e.join(", ")}var eR=class{constructor(e,r,{shared:n,cacheHeuristic:i,immutableMinTimeToLive:s,ignoreCargoCult:a,_fromObject:o}={}){if(o){this._fromObject(o);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=n!==!1,this._cacheHeuristic=i!==void 0?i:.1,this._immutableMinTtl=s!==void 0?s:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=Wo(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=Wo(e.headers["cache-control"]),a&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":ZA(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&KA.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||WA.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const r=Wo(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;const r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const n of r)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){const r={};for(const n in e)XA[n]||(r[n]=e[n]);if(e.connection){const n=e.connection.trim().split(/\s*,\s*/);for(const i of n)delete r[i]}if(r.warning){const n=r.warning.split(/,/).filter(i=>!/^\s*1[0-9][0-9]/.test(i));n.length?r.warning=n.join(",").trim():delete r.warning}return r}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){const e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue();const r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return lr(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return lr(this._rescc["s-maxage"])}if(this._rescc["max-age"])return lr(this._rescc["max-age"]);const e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){const n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<r?0:Math.max(e,(n-r)/1e3)}if(this._resHeaders["last-modified"]){const n=Date.parse(this._resHeaders["last-modified"]);if(isFinite(n)&&r>n)return Math.max(e,(r-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){const e=this.maxAge()-this.age(),r=e+lr(this._rescc["stale-if-error"]),n=e+lr(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,n)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+lr(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+lr(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){const i=r["if-none-match"].split(/,/).filter(s=>!/^\s*W\//.test(s));i.length?r["if-none-match"]=i.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&JA(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let n=!1;if(r.status!==void 0&&r.status!=304?n=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?n=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?n=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?n=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(n=!0),!n)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};const i={};for(const a in this._resHeaders)i[a]=a in r.headers&&!QA[a]?r.headers[a]:this._resHeaders[a];const s=Object.assign({},r,{status:this._status,method:this._method,headers:i});return{policy:new this.constructor(e,s,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}},Ko=t=>{const e={};for(const[r,n]of Object.entries(t))e[r.toLowerCase()]=n;return e};const tR=Ye.Readable,rR=Ko;class nR extends tR{constructor(e,r,n,i){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof i!="string")throw new TypeError("Argument `url` should be a string");super();this.statusCode=e,this.headers=rR(r),this.body=n,this.url=i}_read(){this.push(this.body),this.push(null)}}var iR=nR;const sR=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];var yd=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const r=new Set(Object.keys(t).concat(sR)),n={};for(const i of r)i in e||(n[i]={get(){const s=t[i];return typeof s=="function"?s.bind(t):s},set(s){t[i]=s},enumerable:!0,configurable:!1});return Object.defineProperties(e,n),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e};const aR=Ye.PassThrough,oR=yd,uR=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");const e=new aR;return oR(t,e),t.pipe(e)};var lR=uR,Yo={};Yo.stringify=function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",n=Array.isArray(e);r=n?"[":"{";var i=!0;for(var s in e){var a=typeof e[s]=="function"||!n&&typeof e[s]>"u";Object.hasOwnProperty.call(e,s)&&!a&&(i||(r+=","),i=!1,n?e[s]==null?r+="null":r+=t(e[s]):e[s]!==void 0&&(r+=t(s)+":"+t(e[s])))}return r+=n?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)},Yo.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})};const cR=jt,vd=Yo;BigInt.prototype.toJSON=function(){return this.toString()};const hR=t=>{const e={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd"};if(t.adapter||t.uri){const r=t.adapter||/^[^:]*/.exec(t.uri)[0];return new(Dm(e[r]))(t)}return new Map};class fR extends cR{constructor(e,r){super();if(this.opts=Object.assign({namespace:"keyv",serialize:vd.stringify,deserialize:vd.parse},typeof e=="string"?{uri:e}:e,r),!this.opts.store){const n=Object.assign({},this.opts);this.opts.store=hR(n)}typeof this.opts.store.on=="function"&&this.opts.store.on("error",n=>this.emit("error",n)),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,r){const n=this._getKeyPrefix(e),{store:i}=this.opts;return Promise.resolve().then(()=>i.get(n)).then(s=>typeof s=="string"?this.opts.deserialize(s):s).then(s=>{if(s!=null){if(typeof s.expires=="number"&&Date.now()>s.expires){this.delete(e);return}return r&&r.raw?s:s.value}})}set(e,r,n){const i=this._getKeyPrefix(e);typeof n>"u"&&(n=this.opts.ttl),n===0&&(n=void 0);const{store:s}=this.opts;return Promise.resolve().then(()=>{const a=typeof n=="number"?Date.now()+n:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:a},this.opts.serialize(r)}).then(a=>s.set(i,a,n)).then(()=>!0)}delete(e){const r=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then(()=>n.delete(r))}clear(){const{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}}var dR=fR;const pR=jt,ji=Vr,mR=VA,gR=Cr.exports,Xo=eR,bd=iR,yR=Ko,vR=lR,bR=dR;class Nt{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new bR({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,n)=>{let i;if(typeof r=="string")i=Qo(ji.parse(r)),r={};else if(r instanceof ji.URL)i=Qo(ji.parse(r.toString())),r={};else{const[f,...c]=(r.path||"").split("?"),m=c.length>0?`?${c.join("?")}`:"";i=Qo({...r,pathname:f,search:m})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...DR(i)},r.headers=yR(r.headers);const s=new pR,a=mR(ji.format(i),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),o=`${r.method}:${a}`;let u=!1,l=!1;const h=f=>{l=!0;let c=!1,m;const p=new Promise(b=>{m=()=>{c||(c=!0,b())}}),y=b=>{if(u&&!f.forceRefresh){b.status=b.statusCode;const _=Xo.fromObject(u.cachePolicy).revalidatedPolicy(f,b);if(!_.modified){const R=_.policy.responseHeaders();b=new bd(u.statusCode,R,u.body,u.url),b.cachePolicy=_.policy,b.fromCache=!0}}b.fromCache||(b.cachePolicy=new Xo(f,b,f),b.fromCache=!1);let D;f.cache&&b.cachePolicy.storable()?(D=vR(b),(async()=>{try{const _=gR.buffer(b);if(await Promise.race([p,new Promise(d=>b.once("end",d))]),c)return;const R=await _,S={cachePolicy:b.cachePolicy.toObject(),url:b.url,statusCode:b.fromCache?u.statusCode:b.statusCode,body:R};let v=f.strictTtl?b.cachePolicy.timeToLive():void 0;f.maxTtl&&(v=v?Math.min(v,f.maxTtl):f.maxTtl),await this.cache.set(o,S,v)}catch(_){s.emit("error",new Nt.CacheError(_))}})()):f.cache&&u&&(async()=>{try{await this.cache.delete(o)}catch(_){s.emit("error",new Nt.CacheError(_))}})(),s.emit("response",D||b),typeof n=="function"&&n(D||b)};try{const b=e(f,y);b.once("error",m),b.once("abort",m),s.emit("request",b)}catch(b){s.emit("error",new Nt.RequestError(b))}};return(async()=>{const f=async m=>{await Promise.resolve();const p=m.cache?await this.cache.get(o):void 0;if(typeof p>"u")return h(m);const y=Xo.fromObject(p.cachePolicy);if(y.satisfiesWithoutRevalidation(m)&&!m.forceRefresh){const b=y.responseHeaders(),D=new bd(p.statusCode,b,p.body,p.url);D.cachePolicy=y,D.fromCache=!0,s.emit("response",D),typeof n=="function"&&n(D)}else u=p,m.headers=y.revalidationHeaders(m),h(m)},c=m=>s.emit("error",new Nt.CacheError(m));this.cache.once("error",c),s.on("response",()=>this.cache.removeListener("error",c));try{await f(r)}catch(m){r.automaticFailover&&!l&&h(r),s.emit("error",new Nt.CacheError(m))}})(),s}}}function DR(t){const e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function Qo(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}Nt.RequestError=class extends Error{constructor(t){super(t.message);this.name="RequestError",Object.assign(this,t)}},Nt.CacheError=class extends Error{constructor(t){super(t.message);this.name="CacheError",Object.assign(this,t)}};var wR=Nt;const{Transform:ER,PassThrough:_R}=Ye,Jo=vm,SR=yd;var CR=t=>{const e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;const r=e==="br";if(r&&typeof Jo.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let n=!0;const i=new ER({transform(o,u,l){n=!1,l(null,o)},flush(o){o()}}),s=new _R({autoDestroy:!1,destroy(o,u){t.destroy(),u(o)}}),a=r?Jo.createBrotliDecompress():Jo.createUnzip();return a.once("error",o=>{if(n&&!t.readable){s.end();return}s.destroy(o)}),SR(t,s),t.pipe(i).pipe(a).pipe(s),s};class AR{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){this.cache.set(e,r),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){const r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(const r of this.oldCache.keys())this.cache.has(r)||e++;return this._size+e}}var Dd=AR;const RR=jt,xR=Zu,TR=ms,$R=Dd,Ve=Symbol("currentStreamsCount"),wd=Symbol("request"),ut=Symbol("cachedOriginSet"),Nr=Symbol("gracefullyClosing"),OR=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],FR=(t,e,r)=>{let n=0,i=t.length;for(;n<i;){const s=n+i>>>1;r(t[s],e)?n=s+1:i=s}return n},PR=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,Zo=(t,e)=>{for(const r of t)r[ut].length<e[ut].length&&r[ut].every(n=>e[ut].includes(n))&&r[Ve]+e[Ve]<=e.remoteSettings.maxConcurrentStreams&&_d(r)},kR=(t,e)=>{for(const r of t)e[ut].length<r[ut].length&&e[ut].every(n=>r[ut].includes(n))&&e[Ve]+r[Ve]<=r.remoteSettings.maxConcurrentStreams&&_d(e)},Ed=({agent:t,isFree:e})=>{const r={};for(const n in t.sessions){const s=t.sessions[n].filter(a=>{const o=a[Kt.kCurrentStreamsCount]<a.remoteSettings.maxConcurrentStreams;return e?o:!o});s.length!==0&&(r[n]=s)}return r},_d=t=>{t[Nr]=!0,t[Ve]===0&&t.close()};class Kt extends RR{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:n=10,maxCachedTlsSessions:i=100}={}){super();this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=n,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new $R({maxSize:i})}static normalizeOrigin(e,r){return typeof e=="string"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r="";if(e)for(const n of OR)e[n]&&(r+=`:${e[n]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;const n=this.queue[e][r];this._sessionsCount<this.maxSessions&&!n.completed&&(n.completed=!0,n())}getSession(e,r,n){return new Promise((i,s)=>{Array.isArray(n)?(n=[...n],i()):n=[{resolve:i,reject:s}];const a=this.normalizeOptions(r),o=Kt.normalizeOrigin(e,r&&r.servername);if(o===void 0){for(const{reject:h}of n)h(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(a in this.sessions){const h=this.sessions[a];let f=-1,c=-1,m;for(const p of h){const y=p.remoteSettings.maxConcurrentStreams;if(y<f)break;if(p[ut].includes(o)){const b=p[Ve];if(b>=y||p[Nr]||p.destroyed)continue;m||(f=y),b>c&&(m=p,c=b)}}if(m){if(n.length!==1){for(const{reject:p}of n){const y=new Error(`Expected the length of listeners to be 1, got ${n.length}.
|
|
119
|
-
Please report this to https://github.com/szmarczak/http2-wrapper/`);p(y)}return}n[0].resolve(m);return}}if(a in this.queue){if(o in this.queue[a]){this.queue[a][o].listeners.push(...n),this._tryToCreateNewSession(a,o);return}}else this.queue[a]={};const u=()=>{a in this.queue&&this.queue[a][o]===l&&(delete this.queue[a][o],Object.keys(this.queue[a]).length===0&&delete this.queue[a])},l=()=>{const h=`${o}:${a}`;let f=!1;try{const c=TR.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(h),...r});c[Ve]=0,c[Nr]=!1;const m=()=>c[Ve]<c.remoteSettings.maxConcurrentStreams;let p=!0;c.socket.once("session",b=>{this.tlsSessionCache.set(h,b)}),c.once("error",b=>{for(const{reject:D}of n)D(b);this.tlsSessionCache.delete(h)}),c.setTimeout(this.timeout,()=>{c.destroy()}),c.once("close",()=>{if(f){p&&this._freeSessionsCount--,this._sessionsCount--;const b=this.sessions[a];b.splice(b.indexOf(c),1),b.length===0&&delete this.sessions[a]}else{const b=new Error("Session closed without receiving a SETTINGS frame");b.code="HTTP2WRAPPER_NOSETTINGS";for(const{reject:D}of n)D(b);u()}this._tryToCreateNewSession(a,o)});const y=()=>{if(!(!(a in this.queue)||!m())){for(const b of c[ut])if(b in this.queue[a]){const{listeners:D}=this.queue[a][b];for(;D.length!==0&&m();)D.shift().resolve(c);const _=this.queue[a];if(_[b].listeners.length===0&&(delete _[b],Object.keys(_).length===0)){delete this.queue[a];break}if(!m())break}}};c.on("origin",()=>{c[ut]=c.originSet,!!m()&&(y(),Zo(this.sessions[a],c))}),c.once("remoteSettings",()=>{if(c.ref(),c.unref(),this._sessionsCount++,l.destroyed){const b=new Error("Agent has been destroyed");for(const D of n)D.reject(b);c.destroy();return}c[ut]=c.originSet;{const b=this.sessions;if(a in b){const D=b[a];D.splice(FR(D,c,PR),0,c)}else b[a]=[c]}this._freeSessionsCount+=1,f=!0,this.emit("session",c),y(),u(),c[Ve]===0&&this._freeSessionsCount>this.maxFreeSessions&&c.close(),n.length!==0&&(this.getSession(o,r,n),n.length=0),c.on("remoteSettings",()=>{y(),Zo(this.sessions[a],c)})}),c[wd]=c.request,c.request=(b,D)=>{if(c[Nr])throw new Error("The session is gracefully closing. No new streams are allowed.");const _=c[wd](b,D);return c.ref(),++c[Ve],c[Ve]===c.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,_.once("close",()=>{if(p=m(),--c[Ve],!c.destroyed&&!c.closed&&(kR(this.sessions[a],c),m()&&!c.closed)){p||(this._freeSessionsCount++,p=!0);const R=c[Ve]===0;R&&c.unref(),R&&(this._freeSessionsCount>this.maxFreeSessions||c[Nr])?c.close():(Zo(this.sessions[a],c),y())}}),_}}catch(c){for(const m of n)m.reject(c);u()}};l.listeners=n,l.completed=!1,l.destroyed=!1,this.queue[a][o]=l,this._tryToCreateNewSession(a,o)})}request(e,r,n,i){return new Promise((s,a)=>{this.getSession(e,r,[{reject:a,resolve:o=>{try{s(o.request(n,i))}catch(u){a(u)}}}])})}createConnection(e,r){return Kt.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];const n=e.port||443,i=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=i),xR.connect(n,i,r)}closeFreeSessions(){for(const e of Object.values(this.sessions))for(const r of e)r[Ve]===0&&r.close()}destroy(e){for(const r of Object.values(this.sessions))for(const n of r)n.destroy(e);for(const r of Object.values(this.queue))for(const n of Object.values(r))n.destroyed=!0;this.queue={}}get freeSessions(){return Ed({agent:this,isFree:!0})}get busySessions(){return Ed({agent:this,isFree:!1})}}Kt.kCurrentStreamsCount=Ve,Kt.kGracefullyClosing=Nr;var Sd={Agent:Kt,globalAgent:new Kt};const{Readable:IR}=Ye;class LR extends IR{constructor(e,r){super({highWaterMark:r,autoDestroy:!1});this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}}var Cd=LR,Ad=t=>{const e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e},BR=(t,e,r)=>{for(const n of r)t.on(n,(...i)=>e.emit(n,...i))},NR=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}},Rd={exports:{}};(function(t){const e=(r,n,i)=>{t.exports[n]=class extends r{constructor(...a){super(typeof i=="string"?i:i(a));this.name=`${super.name} [${n}]`,this.code=n}}};e(TypeError,"ERR_INVALID_ARG_TYPE",r=>{const n=r[0].includes(".")?"property":"argument";let i=r[1];const s=Array.isArray(i);return s&&(i=`${i.slice(0,-1).join(", ")} or ${i.slice(-1)}`),`The "${r[0]}" ${n} must be ${s?"one of":"of"} type ${i}. Received ${typeof r[2]}`}),e(TypeError,"ERR_INVALID_PROTOCOL",r=>`Protocol "${r[0]}" not supported. Expected "${r[1]}"`),e(Error,"ERR_HTTP_HEADERS_SENT",r=>`Cannot ${r[0]} headers after they are sent to the client`),e(TypeError,"ERR_INVALID_HTTP_TOKEN",r=>`${r[0]} must be a valid HTTP token [${r[1]}]`),e(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",r=>`Invalid value "${r[0]} for header "${r[1]}"`),e(TypeError,"ERR_INVALID_CHAR",r=>`Invalid character in ${r[0]} [${r[1]}]`)})(Rd);const MR=ms,{Writable:jR}=Ye,{Agent:xd,globalAgent:HR}=Sd,UR=Cd,qR=Ad,GR=BR,zR=NR,{ERR_INVALID_ARG_TYPE:eu,ERR_INVALID_PROTOCOL:VR,ERR_HTTP_HEADERS_SENT:Td,ERR_INVALID_HTTP_TOKEN:WR,ERR_HTTP_INVALID_HEADER_VALUE:KR,ERR_INVALID_CHAR:YR}=Rd.exports,{HTTP2_HEADER_STATUS:$d,HTTP2_HEADER_METHOD:Od,HTTP2_HEADER_PATH:Fd,HTTP2_METHOD_CONNECT:XR}=MR.constants,je=Symbol("headers"),tu=Symbol("origin"),ru=Symbol("session"),Pd=Symbol("options"),Hi=Symbol("flushedHeaders"),gn=Symbol("jobs"),QR=/^[\^`\-\w!#$%&*+.|~]+$/,JR=/[^\t\u0020-\u007E\u0080-\u00FF]/;class ZR extends jR{constructor(e,r,n){super({autoDestroy:!1});const i=typeof e=="string"||e instanceof URL;if(i&&(e=qR(e instanceof URL?e:new URL(e))),typeof r=="function"||r===void 0?(n=r,r=i?e:{...e}):r={...e,...r},r.h2session)this[ru]=r.h2session;else if(r.agent===!1)this.agent=new xd({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new xd({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=HR;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new eu("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new VR(r.protocol,"https:");const s=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,a=r.hostname||r.host||"localhost";delete r.hostname,delete r.host,delete r.port;const{timeout:o}=r;if(r.timeout=void 0,this[je]=Object.create(null),this[gn]=[],this.socket=null,this.connection=null,this.method=r.method||"GET",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(const[u,l]of Object.entries(r.headers))this.setHeader(u,l);r.auth&&!("authorization"in this[je])&&(this[je].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[Pd]=r,s===443?(this[tu]=`https://${a}`,":authority"in this[je]||(this[je][":authority"]=a)):(this[tu]=`https://${a}:${s}`,":authority"in this[je]||(this[je][":authority"]=`${a}:${s}`)),o&&this.setTimeout(o),n&&this.once("response",n),this[Hi]=!1}get method(){return this[je][Od]}set method(e){e&&(this[je][Od]=e.toUpperCase())}get path(){return this[je][Fd]}set path(e){e&&(this[je][Fd]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,n){if(this._mustNotHaveABody){n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();const i=()=>this._request.write(e,r,n);this._request?i():this[gn].push(i)}_final(e){if(this.destroyed)return;this.flushHeaders();const r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[gn].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[Hi]||this.destroyed)return;this[Hi]=!0;const e=this.method===XR,r=n=>{if(this._request=n,this.destroyed){n.destroy();return}e||GR(n,this,["timeout","continue","close","error"]);const i=a=>(...o)=>{!this.writable&&!this.destroyed?a(...o):this.once("finish",()=>{a(...o)})};n.once("response",i((a,o,u)=>{const l=new UR(this.socket,n.readableHighWaterMark);this.res=l,l.req=this,l.statusCode=a[$d],l.headers=a,l.rawHeaders=u,l.once("end",()=>{this.aborted?(l.aborted=!0,l.emit("aborted")):(l.complete=!0,l.socket=null,l.connection=null)}),e?(l.upgrade=!0,this.emit("connect",l,n,Buffer.alloc(0))?this.emit("close"):n.destroy()):(n.on("data",h=>{!l._dumped&&!l.push(h)&&n.pause()}),n.once("end",()=>{l.push(null)}),this.emit("response",l)||l._dump())})),n.once("headers",i(a=>this.emit("information",{statusCode:a[$d]}))),n.once("trailers",i((a,o,u)=>{const{res:l}=this;l.trailers=a,l.rawTrailers=u}));const{socket:s}=n.session;this.socket=s,this.connection=s;for(const a of this[gn])a();this.emit("socket",this.socket)};if(this[ru])try{r(this[ru].request(this[je]))}catch(n){this.emit("error",n)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[tu],this[Pd],this[je]))}catch(n){this.emit("error",n)}}}getHeader(e){if(typeof e!="string")throw new eu("name","string",e);return this[je][e.toLowerCase()]}get headersSent(){return this[Hi]}removeHeader(e){if(typeof e!="string")throw new eu("name","string",e);if(this.headersSent)throw new Td("remove");delete this[je][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new Td("set");if(typeof e!="string"||!QR.test(e)&&!zR(e))throw new WR("Header name",e);if(typeof r>"u")throw new KR(r,e);if(JR.test(r))throw new YR("header content",e);this[je][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){const n=()=>this._request.setTimeout(e,r);return this._request?n():this[gn].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}}var kd=ZR,nu={exports:{}};const ex=Zu;var tx=(t={},e=ex.connect)=>new Promise((r,n)=>{let i=!1,s;const a=async()=>{await u,s.off("timeout",o),s.off("error",n),t.resolveSocket?(r({alpnProtocol:s.alpnProtocol,socket:s,timeout:i}),i&&(await Promise.resolve(),s.emit("timeout"))):(s.destroy(),r({alpnProtocol:s.alpnProtocol,timeout:i}))},o=async()=>{i=!0,a()},u=(async()=>{try{s=await e(t,a),s.on("error",n),s.once("timeout",o)}catch(l){n(l)}})()});const rx=el;var nx=t=>{let e=t.host;const r=t.headers&&t.headers.host;return r&&(r.startsWith("[")?r.indexOf("]")===-1?e=r:e=r.slice(1,-1):e=r.split(":",1)[0]),rx.isIP(e)?"":e};const Id=kn,iu=ps,ix=tx,sx=Dd,ax=kd,ox=nx,ux=Ad,Ui=new sx({maxSize:100}),yn=new Map,Ld=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};const n=()=>{t.emit("free",e,r)};e.on("free",n);const i=()=>{t.removeSocket(e,r)};e.on("close",i);const s=()=>{t.removeSocket(e,r),e.off("close",i),e.off("free",n),e.off("agentRemove",s)};e.on("agentRemove",s),t.emit("free",e,r)},lx=async t=>{const e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!Ui.has(e)){if(yn.has(e))return(await yn.get(e)).alpnProtocol;const{path:r,agent:n}=t;t.path=t.socketPath;const i=ix(t);yn.set(e,i);try{const{socket:s,alpnProtocol:a}=await i;if(Ui.set(e,a),t.path=r,a==="h2")s.destroy();else{const{globalAgent:o}=iu,u=iu.Agent.prototype.createConnection;n?n.createConnection===u?Ld(n,s,t):s.destroy():o.createConnection===u?Ld(o,s,t):s.destroy()}return yn.delete(e),a}catch(s){throw yn.delete(e),s}}return Ui.get(e)};nu.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=ux(new URL(t))),typeof e=="function"&&(r=e,e=void 0),e={ALPNProtocols:["h2","http/1.1"],...t,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";const n=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||ox(e),e.port=e.port||(n?443:80),e._defaultAgent=n?iu.globalAgent:Id.globalAgent;const i=e.agent;if(i){if(i.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=i[n?"https":"http"]}return n&&await lx(e)==="h2"?(i&&(e.agent=i.http2),new ax(e,r)):Id.request(e,r)},nu.exports.protocolCache=Ui;const cx=ms,hx=Sd,su=kd,fx=Cd,dx=nu.exports,px=(t,e,r)=>new su(t,e,r),mx=(t,e,r)=>{const n=new su(t,e,r);return n.end(),n};var gx={...cx,ClientRequest:su,IncomingMessage:fx,...hx,request:px,get:mx,auto:dx},au={},qi={};Object.defineProperty(qi,"__esModule",{value:!0});const Bd=At.exports;qi.default=t=>Bd.default.nodeStream(t)&&Bd.default.function_(t.getBoundary),Object.defineProperty(au,"__esModule",{value:!0});const Nd=Qe,Md=Yt,jd=At.exports,yx=qi,vx=Md.promisify(Nd.stat);au.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(jd.default.string(t))return Buffer.byteLength(t);if(jd.default.buffer(t))return t.length;if(yx.default(t))return Md.promisify(t.getLength.bind(t))();if(t instanceof Nd.ReadStream){const{size:r}=await vx(t.path);return r===0?void 0:r}};var Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});function bx(t,e,r){const n={};for(const i of r)n[i]=(...s)=>{e.emit(i,...s)},t.on(i,n[i]);return()=>{for(const i of r)t.off(i,n[i])}}Gi.default=bx;var vn={},ou={};Object.defineProperty(ou,"__esModule",{value:!0}),ou.default=()=>{const t=[];return{once(e,r,n){e.once(r,n),t.push({origin:e,event:r,fn:n})},unhandleAll(){for(const e of t){const{origin:r,event:n,fn:i}=e;r.removeListener(n,i)}t.length=0}}},Object.defineProperty(vn,"__esModule",{value:!0}),vn.TimeoutError=void 0;const Dx=el,wx=ou,Hd=Symbol("reentry"),Ex=()=>{};class Ud extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`);this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}}vn.TimeoutError=Ud,vn.default=(t,e,r)=>{if(Hd in t)return Ex;t[Hd]=!0;const n=[],{once:i,unhandleAll:s}=wx.default(),a=(f,c,m)=>{var p;const y=setTimeout(c,f,f,m);(p=y.unref)===null||p===void 0||p.call(y);const b=()=>{clearTimeout(y)};return n.push(b),b},{host:o,hostname:u}=r,l=(f,c)=>{t.destroy(new Ud(f,c))},h=()=>{for(const f of n)f();s()};if(t.once("error",f=>{if(h(),t.listenerCount("error")===0)throw f}),t.once("close",h),i(t,"response",f=>{i(f,"end",h)}),typeof e.request<"u"&&a(e.request,l,"request"),typeof e.socket<"u"){const f=()=>{l(e.socket,"socket")};t.setTimeout(e.socket,f),n.push(()=>{t.removeListener("timeout",f)})}return i(t,"socket",f=>{var c;const{socketPath:m}=t;if(f.connecting){const p=Boolean(m??Dx.isIP((c=u??o)!==null&&c!==void 0?c:"")!==0);if(typeof e.lookup<"u"&&!p&&typeof f.address().address>"u"){const y=a(e.lookup,l,"lookup");i(f,"lookup",y)}if(typeof e.connect<"u"){const y=()=>a(e.connect,l,"connect");p?i(f,"connect",y()):i(f,"lookup",b=>{b===null&&i(f,"connect",y())})}typeof e.secureConnect<"u"&&r.protocol==="https:"&&i(f,"connect",()=>{const y=a(e.secureConnect,l,"secureConnect");i(f,"secureConnect",y)})}if(typeof e.send<"u"){const p=()=>a(e.send,l,"send");f.connecting?i(f,"connect",()=>{i(t,"upload-complete",p())}):i(t,"upload-complete",p())}}),typeof e.response<"u"&&i(t,"upload-complete",()=>{const f=a(e.response,l,"response");i(t,"response",f)}),h};var uu={};Object.defineProperty(uu,"__esModule",{value:!0});const qd=At.exports;uu.default=t=>{t=t;const e={protocol:t.protocol,hostname:qd.default.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return qd.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e};var lu={};Object.defineProperty(lu,"__esModule",{value:!0});const _x=Vr,Sx=["protocol","host","hostname","port","pathname","search"];lu.default=(t,e)=>{var r,n;if(e.path){if(e.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(e.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(e.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(e.search&&e.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!t){if(!e.protocol)throw new TypeError("No URL protocol specified");t=`${e.protocol}//${(n=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&n!==void 0?n:""}`}const i=new _x.URL(t);if(e.path){const s=e.path.indexOf("?");s===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,s),e.search=e.path.slice(s+1)),delete e.path}for(const s of Sx)e[s]&&(i[s]=e[s].toString());return i};var cu={};Object.defineProperty(cu,"__esModule",{value:!0});class Cx{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}}cu.default=Cx;var zi={};Object.defineProperty(zi,"__esModule",{value:!0});const Ax=async t=>{const e=[];let r=0;for await(const n of t)e.push(n),r+=Buffer.byteLength(n);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(""))};zi.default=Ax;var Gd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.dnsLookupIpVersionToFamily=t.isDnsLookupIpVersion=void 0;const e={auto:0,ipv4:4,ipv6:6};t.isDnsLookupIpVersion=r=>r in e,t.dnsLookupIpVersionToFamily=r=>{if(t.isDnsLookupIpVersion(r))return e[r];throw new Error("Invalid DNS lookup IP version")}})(Gd);var bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.isResponseOk=void 0,bn.isResponseOk=t=>{const{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304};var hu={};Object.defineProperty(hu,"__esModule",{value:!0});const zd=new Set;hu.default=t=>{zd.has(t)||(zd.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))};var fu={};Object.defineProperty(fu,"__esModule",{value:!0});const ce=At.exports,Rx=(t,e)=>{if(ce.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");ce.assert.any([ce.default.string,ce.default.undefined],t.encoding),ce.assert.any([ce.default.boolean,ce.default.undefined],t.resolveBodyOnly),ce.assert.any([ce.default.boolean,ce.default.undefined],t.methodRewriting),ce.assert.any([ce.default.boolean,ce.default.undefined],t.isStream),ce.assert.any([ce.default.string,ce.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType="text");const{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:n=>n.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},ce.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(n=>n.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):ce.default.number(r)&&(t.retry.limit=r),ce.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(ce.default.number))),ce.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});const{pagination:n}=t;if(!ce.default.function_(n.transform))throw new Error("`options.pagination.transform` must be implemented");if(!ce.default.function_(n.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!ce.default.function_(n.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!ce.default.function_(n.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return t.responseType==="json"&&t.headers.accept===void 0&&(t.headers.accept="application/json"),t};fu.default=Rx;var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.retryAfterStatusCodes=void 0,Dn.retryAfterStatusCodes=new Set([413,429,503]);const xx=({attemptCount:t,retryOptions:e,error:r,retryAfter:n})=>{if(t>e.limit)return 0;const i=e.methods.includes(r.options.method),s=e.errorCodes.includes(r.code),a=r.response&&e.statusCodes.includes(r.response.statusCode);if(!i||!s&&!a)return 0;if(r.response){if(n)return e.maxRetryAfter===void 0||n>e.maxRetryAfter?0:n;if(r.response.statusCode===413)return 0}const o=Math.random()*100;return 2**(t-1)*1e3+o};Dn.default=xx,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedProtocolError=t.ReadError=t.TimeoutError=t.UploadError=t.CacheError=t.HTTPError=t.MaxRedirectsError=t.RequestError=t.setNonEnumerableProperties=t.knownHookEvents=t.withoutBody=t.kIsNormalizedAlready=void 0;const e=Yt,r=Ye,n=Qe,i=Vr,s=kn,a=kn,o=ps,u=Uo.exports,l=Go.exports,h=wR,f=CR,c=gx,m=Ko,p=At.exports,y=au,b=qi,D=Gi,_=vn,R=uu,S=lu,v=cu,d=zi,w=Gd,T=bn,$=hu,j=fu,A=Dn;let I;const B=Symbol("request"),J=Symbol("response"),C=Symbol("responseSize"),x=Symbol("downloadedSize"),re=Symbol("bodySize"),q=Symbol("uploadedSize"),xe=Symbol("serverResponsesPiped"),Ue=Symbol("unproxyEvents"),ye=Symbol("isFromCache"),rt=Symbol("cancelTimeouts"),gr=Symbol("startedReading"),lt=Symbol("stopReading"),nt=Symbol("triggerRead"),G=Symbol("body"),Dt=Symbol("jobs"),$n=Symbol("originalResponse"),k=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const ie=p.default.string(process.versions.brotli);t.withoutBody=new Set(["GET","HEAD"]),t.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function P(De){for(const E in De){const g=De[E];if(!p.default.string(g)&&!p.default.number(g)&&!p.default.boolean(g)&&!p.default.null_(g)&&!p.default.undefined(g))throw new TypeError(`The \`searchParams\` value '${String(g)}' must be a string, number, boolean or null`)}}function K(De){return p.default.object(De)&&!("statusCode"in De)}const se=new v.default,Te=async De=>new Promise((E,g)=>{const O=H=>{g(H)};De.pending||E(),De.once("error",O),De.once("ready",()=>{De.off("error",O),E()})}),be=new Set([300,301,302,303,304,307,308]),zr=["context","body","json","form"];t.setNonEnumerableProperties=(De,E)=>{const g={};for(const O of De)if(!!O)for(const H of zr)H in O&&(g[H]={writable:!0,configurable:!0,enumerable:!1,value:O[H]});Object.defineProperties(E,g)};class me extends Error{constructor(E,g,O){var H,N;super(E);if(Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=(H=g.code)!==null&&H!==void 0?H:"ERR_GOT_REQUEST_ERROR",O instanceof zu?(Object.defineProperty(this,"request",{enumerable:!1,value:O}),Object.defineProperty(this,"response",{enumerable:!1,value:O[J]}),Object.defineProperty(this,"options",{enumerable:!1,value:O.options})):Object.defineProperty(this,"options",{enumerable:!1,value:O}),this.timings=(N=this.request)===null||N===void 0?void 0:N.timings,p.default.string(g.stack)&&p.default.string(this.stack)){const F=this.stack.indexOf(this.message)+this.message.length,M=this.stack.slice(F).split(`
|
|
117
|
+
*/const N_=Jt,rf=B_,nf=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),M_=t=>e=>t===!0?Number(e):String(e),Va=t=>typeof t=="number"||typeof t=="string"&&t!=="",fn=t=>Number.isInteger(+t),Wa=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},j_=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,H_=(t,e,r)=>{if(e>0){let n=t[0]==="-"?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return r===!1?String(t):t},sf=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},U_=(t,e)=>{t.negatives.sort((a,o)=>a<o?-1:a>o?1:0),t.positives.sort((a,o)=>a<o?-1:a>o?1:0);let r=e.capture?"":"?:",n="",i="",s;return t.positives.length&&(n=t.positives.join("|")),t.negatives.length&&(i=`-(${r}${t.negatives.join("|")})`),n&&i?s=`${n}|${i}`:s=n||i,e.wrap?`(${r}${s})`:s},af=(t,e,r,n)=>{if(r)return rf(t,e,{wrap:!1,...n});let i=String.fromCharCode(t);if(t===e)return i;let s=String.fromCharCode(e);return`[${i}-${s}]`},of=(t,e,r)=>{if(Array.isArray(t)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${t.join("|")})`:t.join("|")}return rf(t,e,r)},uf=(...t)=>new RangeError("Invalid range arguments: "+N_.inspect(...t)),lf=(t,e,r)=>{if(r.strictRanges===!0)throw uf([t,e]);return[]},q_=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},G_=(t,e,r=1,n={})=>{let i=Number(t),s=Number(e);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw uf([t,e]);return[]}i===0&&(i=0),s===0&&(s=0);let a=i>s,o=String(t),u=String(e),l=String(r);r=Math.max(Math.abs(r),1);let h=Wa(o)||Wa(u)||Wa(l),f=h?Math.max(o.length,u.length,l.length):0,c=h===!1&&j_(t,e,n)===!1,m=n.transform||M_(c);if(n.toRegex&&r===1)return af(sf(t,f),sf(e,f),!0,n);let p={negatives:[],positives:[]},y=_=>p[_<0?"negatives":"positives"].push(Math.abs(_)),b=[],D=0;for(;a?i>=s:i<=s;)n.toRegex===!0&&r>1?y(i):b.push(H_(m(i,D),f,c)),i=a?i-r:i+r,D++;return n.toRegex===!0?r>1?U_(p,n):of(b,null,{wrap:!1,...n}):b},z_=(t,e,r=1,n={})=>{if(!fn(t)&&t.length>1||!fn(e)&&e.length>1)return lf(t,e,n);let i=n.transform||(c=>String.fromCharCode(c)),s=`${t}`.charCodeAt(0),a=`${e}`.charCodeAt(0),o=s>a,u=Math.min(s,a),l=Math.max(s,a);if(n.toRegex&&r===1)return af(u,l,!1,n);let h=[],f=0;for(;o?s>=a:s<=a;)h.push(i(s,f)),s=o?s-r:s+r,f++;return n.toRegex===!0?of(h,null,{wrap:!1,options:n}):h},Si=(t,e,r,n={})=>{if(e==null&&Va(t))return[t];if(!Va(t)||!Va(e))return lf(t,e,n);if(typeof r=="function")return Si(t,e,1,{transform:r});if(nf(r))return Si(t,e,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,fn(r)?fn(t)&&fn(e)?G_(t,e,r,i):z_(t,e,Math.max(Math.abs(r),1),i):r!=null&&!nf(r)?q_(r,i):Si(t,e,1,r)};var cf=Si;const V_=cf,hf=_i,W_=(t,e={})=>{let r=(n,i={})=>{let s=hf.isInvalidBrace(i),a=n.invalid===!0&&e.escapeInvalid===!0,o=s===!0||a===!0,u=e.escapeInvalid===!0?"\\":"",l="";if(n.isOpen===!0||n.isClose===!0)return u+n.value;if(n.type==="open")return o?u+n.value:"(";if(n.type==="close")return o?u+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":o?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let h=hf.reduce(n.nodes),f=V_(...h,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return h.length>1&&f.length>1?`(${f})`:f}if(n.nodes)for(let h of n.nodes)l+=r(h,n);return l};return r(t)};var Y_=W_;const K_=cf,ff=Ga,kr=_i,lr=(t="",e="",r=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?kr.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let s of i)n.push(lr(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?lr(i,s,r):i+s);return kr.flatten(n)},X_=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(i,s={})=>{i.queue=[];let a=s,o=s.queue;for(;a.type!=="brace"&&a.type!=="root"&&a.parent;)a=a.parent,o=a.queue;if(i.invalid||i.dollar){o.push(lr(o.pop(),ff(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){o.push(lr(o.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let f=kr.reduce(i.nodes);if(kr.exceedsLimit(...f,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=K_(...f,e);c.length===0&&(c=ff(i,e)),o.push(lr(o.pop(),c)),i.nodes=[];return}let u=kr.encloseBrace(i),l=i.queue,h=i;for(;h.type!=="brace"&&h.type!=="root"&&h.parent;)h=h.parent,l=h.queue;for(let f=0;f<i.nodes.length;f++){let c=i.nodes[f];if(c.type==="comma"&&i.type==="brace"){f===1&&l.push(""),l.push("");continue}if(c.type==="close"){o.push(lr(o.pop(),l,u));continue}if(c.value&&c.type!=="open"){l.push(lr(l.pop(),c.value));continue}c.nodes&&n(c,i)}return l};return kr.flatten(n(t))};var Q_=X_,J_={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
118
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const Z_=Ga,{MAX_LENGTH:df,CHAR_BACKSLASH:Ya,CHAR_BACKTICK:eS,CHAR_COMMA:tS,CHAR_DOT:rS,CHAR_LEFT_PARENTHESES:nS,CHAR_RIGHT_PARENTHESES:iS,CHAR_LEFT_CURLY_BRACE:sS,CHAR_RIGHT_CURLY_BRACE:aS,CHAR_LEFT_SQUARE_BRACKET:pf,CHAR_RIGHT_SQUARE_BRACKET:mf,CHAR_DOUBLE_QUOTE:oS,CHAR_SINGLE_QUOTE:uS,CHAR_NO_BREAK_SPACE:lS,CHAR_ZERO_WIDTH_NOBREAK_SPACE:cS}=J_,hS=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},n=typeof r.maxLength=="number"?Math.min(df,r.maxLength):df;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let i={type:"root",input:t,nodes:[]},s=[i],a=i,o=i,u=0,l=t.length,h=0,f=0,c;const m=()=>t[h++],p=y=>{if(y.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&y.type==="text"){o.value+=y.value;return}return a.nodes.push(y),y.parent=a,y.prev=o,o=y,y};for(p({type:"bos"});h<l;)if(a=s[s.length-1],c=m(),!(c===cS||c===lS)){if(c===Ya){p({type:"text",value:(e.keepEscaping?c:"")+m()});continue}if(c===mf){p({type:"text",value:"\\"+c});continue}if(c===pf){u++;let y;for(;h<l&&(y=m());){if(c+=y,y===pf){u++;continue}if(y===Ya){c+=m();continue}if(y===mf&&(u--,u===0))break}p({type:"text",value:c});continue}if(c===nS){a=p({type:"paren",nodes:[]}),s.push(a),p({type:"text",value:c});continue}if(c===iS){if(a.type!=="paren"){p({type:"text",value:c});continue}a=s.pop(),p({type:"text",value:c}),a=s[s.length-1];continue}if(c===oS||c===uS||c===eS){let y=c,b;for(e.keepQuotes!==!0&&(c="");h<l&&(b=m());){if(b===Ya){c+=b+m();continue}if(b===y){e.keepQuotes===!0&&(c+=b);break}c+=b}p({type:"text",value:c});continue}if(c===sS){f++;let y=o.value&&o.value.slice(-1)==="$"||a.dollar===!0;a=p({type:"brace",open:!0,close:!1,dollar:y,depth:f,commas:0,ranges:0,nodes:[]}),s.push(a),p({type:"open",value:c});continue}if(c===aS){if(a.type!=="brace"){p({type:"text",value:c});continue}let y="close";a=s.pop(),a.close=!0,p({type:y,value:c}),f--,a=s[s.length-1];continue}if(c===tS&&f>0){if(a.ranges>0){a.ranges=0;let y=a.nodes.shift();a.nodes=[y,{type:"text",value:Z_(a)}]}p({type:"comma",value:c}),a.commas++;continue}if(c===rS&&f>0&&a.commas===0){let y=a.nodes;if(f===0||y.length===0){p({type:"text",value:c});continue}if(o.type==="dot"){if(a.range=[],o.value+=c,o.type="range",a.nodes.length!==3&&a.nodes.length!==5){a.invalid=!0,a.ranges=0,o.type="text";continue}a.ranges++,a.args=[];continue}if(o.type==="range"){y.pop();let b=y[y.length-1];b.value+=o.value+c,o=b,a.ranges--;continue}p({type:"dot",value:c});continue}p({type:"text",value:c})}do if(a=s.pop(),a.type!=="root"){a.nodes.forEach(D=>{D.nodes||(D.type==="open"&&(D.isOpen=!0),D.type==="close"&&(D.isClose=!0),D.nodes||(D.type="text"),D.invalid=!0)});let y=s[s.length-1],b=y.nodes.indexOf(a);y.nodes.splice(b,1,...a.nodes)}while(s.length>0);return p({type:"eos"}),i};var fS=hS;const gf=Ga,dS=Y_,pS=Q_,mS=fS,et=(t,e={})=>{let r=[];if(Array.isArray(t))for(let n of t){let i=et.create(n,e);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(et.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};et.parse=(t,e={})=>mS(t,e),et.stringify=(t,e={})=>gf(typeof t=="string"?et.parse(t,e):t,e),et.compile=(t,e={})=>(typeof t=="string"&&(t=et.parse(t,e)),dS(t,e)),et.expand=(t,e={})=>{typeof t=="string"&&(t=et.parse(t,e));let r=pS(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r},et.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?et.compile(t,e):et.expand(t,e);var gS=et,dn={};const yS=we,Ct="\\\\/",yf=`[^${Ct}]`,Lt="\\.",vS="\\+",bS="\\?",Ci="\\/",DS="(?=.)",vf="[^/]",Ka=`(?:${Ci}|$)`,bf=`(?:^|${Ci})`,Xa=`${Lt}{1,2}${Ka}`,wS=`(?!${Lt})`,ES=`(?!${bf}${Xa})`,_S=`(?!${Lt}{0,1}${Ka})`,SS=`(?!${Xa})`,CS=`[^.${Ci}]`,AS=`${vf}*?`,Df={DOT_LITERAL:Lt,PLUS_LITERAL:vS,QMARK_LITERAL:bS,SLASH_LITERAL:Ci,ONE_CHAR:DS,QMARK:vf,END_ANCHOR:Ka,DOTS_SLASH:Xa,NO_DOT:wS,NO_DOTS:ES,NO_DOT_SLASH:_S,NO_DOTS_SLASH:SS,QMARK_NO_DOT:CS,STAR:AS,START_ANCHOR:bf},RS={...Df,SLASH_LITERAL:`[${Ct}]`,QMARK:yf,STAR:`${yf}*?`,DOTS_SLASH:`${Lt}{1,2}(?:[${Ct}]|$)`,NO_DOT:`(?!${Lt})`,NO_DOTS:`(?!(?:^|[${Ct}])${Lt}{1,2}(?:[${Ct}]|$))`,NO_DOT_SLASH:`(?!${Lt}{0,1}(?:[${Ct}]|$))`,NO_DOTS_SLASH:`(?!${Lt}{1,2}(?:[${Ct}]|$))`,QMARK_NO_DOT:`[^.${Ct}]`,START_ANCHOR:`(?:^|[${Ct}])`,END_ANCHOR:`(?:[${Ct}]|$)`},TS={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var Ai={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:TS,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:yS.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?RS:Df}};(function(t){const e=we,r=process.platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:a}=Ai;t.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),t.hasRegexChars=o=>s.test(o),t.isRegexChar=o=>o.length===1&&t.hasRegexChars(o),t.escapeRegex=o=>o.replace(a,"\\$1"),t.toPosixSlashes=o=>o.replace(n,"/"),t.removeBackslashes=o=>o.replace(i,u=>u==="\\"?"":u),t.supportsLookbehinds=()=>{const o=process.version.slice(1).split(".").map(Number);return o.length===3&&o[0]>=9||o[0]===8&&o[1]>=10},t.isWindows=o=>o&&typeof o.windows=="boolean"?o.windows:r===!0||e.sep==="\\",t.escapeLast=(o,u,l)=>{const h=o.lastIndexOf(u,l);return h===-1?o:o[h-1]==="\\"?t.escapeLast(o,u,h-1):`${o.slice(0,h)}\\${o.slice(h)}`},t.removePrefix=(o,u={})=>{let l=o;return l.startsWith("./")&&(l=l.slice(2),u.prefix="./"),l},t.wrapOutput=(o,u={},l={})=>{const h=l.contains?"":"^",f=l.contains?"":"$";let c=`${h}(?:${o})${f}`;return u.negated===!0&&(c=`(?:^(?!${c}).*$)`),c}})(dn);const wf=dn,{CHAR_ASTERISK:Qa,CHAR_AT:xS,CHAR_BACKWARD_SLASH:pn,CHAR_COMMA:$S,CHAR_DOT:Ja,CHAR_EXCLAMATION_MARK:Za,CHAR_FORWARD_SLASH:Ef,CHAR_LEFT_CURLY_BRACE:eo,CHAR_LEFT_PARENTHESES:to,CHAR_LEFT_SQUARE_BRACKET:OS,CHAR_PLUS:FS,CHAR_QUESTION_MARK:_f,CHAR_RIGHT_CURLY_BRACE:PS,CHAR_RIGHT_PARENTHESES:Sf,CHAR_RIGHT_SQUARE_BRACKET:kS}=Ai,Cf=t=>t===Ef||t===pn,Af=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},IS=(t,e)=>{const r=e||{},n=t.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],a=[],o=[];let u=t,l=-1,h=0,f=0,c=!1,m=!1,p=!1,y=!1,b=!1,D=!1,_=!1,R=!1,S=!1,v=!1,d=0,w,x,$={value:"",depth:0,isGlob:!1};const j=()=>l>=n,A=()=>u.charCodeAt(l+1),I=()=>(w=x,u.charCodeAt(++l));for(;l<n;){x=I();let re;if(x===pn){_=$.backslashes=!0,x=I(),x===eo&&(D=!0);continue}if(D===!0||x===eo){for(d++;j()!==!0&&(x=I());){if(x===pn){_=$.backslashes=!0,I();continue}if(x===eo){d++;continue}if(D!==!0&&x===Ja&&(x=I())===Ja){if(c=$.isBrace=!0,p=$.isGlob=!0,v=!0,i===!0)continue;break}if(D!==!0&&x===$S){if(c=$.isBrace=!0,p=$.isGlob=!0,v=!0,i===!0)continue;break}if(x===PS&&(d--,d===0)){D=!1,c=$.isBrace=!0,v=!0;break}}if(i===!0)continue;break}if(x===Ef){if(s.push(l),a.push($),$={value:"",depth:0,isGlob:!1},v===!0)continue;if(w===Ja&&l===h+1){h+=2;continue}f=l+1;continue}if(r.noext!==!0&&(x===FS||x===xS||x===Qa||x===_f||x===Za)===!0&&A()===to){if(p=$.isGlob=!0,y=$.isExtglob=!0,v=!0,x===Za&&l===h&&(S=!0),i===!0){for(;j()!==!0&&(x=I());){if(x===pn){_=$.backslashes=!0,x=I();continue}if(x===Sf){p=$.isGlob=!0,v=!0;break}}continue}break}if(x===Qa){if(w===Qa&&(b=$.isGlobstar=!0),p=$.isGlob=!0,v=!0,i===!0)continue;break}if(x===_f){if(p=$.isGlob=!0,v=!0,i===!0)continue;break}if(x===OS){for(;j()!==!0&&(re=I());){if(re===pn){_=$.backslashes=!0,I();continue}if(re===kS){m=$.isBracket=!0,p=$.isGlob=!0,v=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&x===Za&&l===h){R=$.negated=!0,h++;continue}if(r.noparen!==!0&&x===to){if(p=$.isGlob=!0,i===!0){for(;j()!==!0&&(x=I());){if(x===to){_=$.backslashes=!0,x=I();continue}if(x===Sf){v=!0;break}}continue}break}if(p===!0){if(v=!0,i===!0)continue;break}}r.noext===!0&&(y=!1,p=!1);let B=u,J="",C="";h>0&&(J=u.slice(0,h),u=u.slice(h),f-=h),B&&p===!0&&f>0?(B=u.slice(0,f),C=u.slice(f)):p===!0?(B="",C=u):B=u,B&&B!==""&&B!=="/"&&B!==u&&Cf(B.charCodeAt(B.length-1))&&(B=B.slice(0,-1)),r.unescape===!0&&(C&&(C=wf.removeBackslashes(C)),B&&_===!0&&(B=wf.removeBackslashes(B)));const T={prefix:J,input:t,start:h,base:B,glob:C,isBrace:c,isBracket:m,isGlob:p,isExtglob:y,isGlobstar:b,negated:R,negatedExtglob:S};if(r.tokens===!0&&(T.maxDepth=0,Cf(x)||a.push($),T.tokens=a),r.parts===!0||r.tokens===!0){let re;for(let q=0;q<s.length;q++){const xe=re?re+1:h,qe=s[q],ye=t.slice(xe,qe);r.tokens&&(q===0&&h!==0?(a[q].isPrefix=!0,a[q].value=J):a[q].value=ye,Af(a[q]),T.maxDepth+=a[q].depth),(q!==0||ye!=="")&&o.push(ye),re=qe}if(re&&re+1<t.length){const q=t.slice(re+1);o.push(q),r.tokens&&(a[a.length-1].value=q,Af(a[a.length-1]),T.maxDepth+=a[a.length-1].depth)}T.slashes=s,T.parts=o}return T};var LS=IS;const Ri=Ai,tt=dn,{MAX_LENGTH:Ti,POSIX_REGEX_SOURCE:BS,REGEX_NON_SPECIAL_CHARS:NS,REGEX_SPECIAL_CHARS_BACKREF:MS,REPLACEMENTS:Rf}=Ri,jS=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>tt.escapeRegex(i)).join("..")}return r},Ir=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,ro=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Rf[t]||t;const r={...e},n=typeof r.maxLength=="number"?Math.min(Ti,r.maxLength):Ti;let i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);const s={type:"bos",value:"",output:r.prepend||""},a=[s],o=r.capture?"":"?:",u=tt.isWindows(e),l=Ri.globChars(u),h=Ri.extglobChars(l),{DOT_LITERAL:f,PLUS_LITERAL:c,SLASH_LITERAL:m,ONE_CHAR:p,DOTS_SLASH:y,NO_DOT:b,NO_DOT_SLASH:D,NO_DOTS_SLASH:_,QMARK:R,QMARK_NO_DOT:S,STAR:v,START_ANCHOR:d}=l,w=k=>`(${o}(?:(?!${d}${k.dot?y:f}).)*?)`,x=r.dot?"":b,$=r.dot?R:S;let j=r.bash===!0?w(r):v;r.capture&&(j=`(${j})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);const A={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:a};t=tt.removePrefix(t,A),i=t.length;const I=[],B=[],J=[];let C=s,T;const re=()=>A.index===i-1,q=A.peek=(k=1)=>t[A.index+k],xe=A.advance=()=>t[++A.index]||"",qe=()=>t.slice(A.index+1),ye=(k="",ie=0)=>{A.consumed+=k,A.index+=ie},nt=k=>{A.output+=k.output!=null?k.output:k.value,ye(k.value)},br=()=>{let k=1;for(;q()==="!"&&(q(2)!=="("||q(3)==="?");)xe(),A.start++,k++;return k%2===0?!1:(A.negated=!0,A.start++,!0)},ht=k=>{A[k]++,J.push(k)},it=k=>{A[k]--,J.pop()},G=k=>{if(C.type==="globstar"){const ie=A.braces>0&&(k.type==="comma"||k.type==="brace"),P=k.extglob===!0||I.length&&(k.type==="pipe"||k.type==="paren");k.type!=="slash"&&k.type!=="paren"&&!ie&&!P&&(A.output=A.output.slice(0,-C.output.length),C.type="star",C.value="*",C.output=j,A.output+=C.output)}if(I.length&&k.type!=="paren"&&(I[I.length-1].inner+=k.value),(k.value||k.output)&&nt(k),C&&C.type==="text"&&k.type==="text"){C.value+=k.value,C.output=(C.output||"")+k.value;return}k.prev=C,a.push(k),C=k},Et=(k,ie)=>{const P={...h[ie],conditions:1,inner:""};P.prev=C,P.parens=A.parens,P.output=A.output;const Y=(r.capture?"(":"")+P.open;ht("parens"),G({type:k,value:ie,output:A.output?"":p}),G({type:"paren",extglob:!0,value:xe(),output:Y}),I.push(P)},Ln=k=>{let ie=k.close+(r.capture?")":""),P;if(k.type==="negate"){let Y=j;if(k.inner&&k.inner.length>1&&k.inner.includes("/")&&(Y=w(r)),(Y!==j||re()||/^\)+$/.test(qe()))&&(ie=k.close=`)$))${Y}`),k.inner.includes("*")&&(P=qe())&&/^\.[^\\/.]+$/.test(P)){const se=ro(P,{...e,fastpaths:!1}).output;ie=k.close=`)${se})${Y})`}k.prev.type==="bos"&&(A.negatedExtglob=!0)}G({type:"paren",extglob:!0,value:T,output:ie}),it("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let k=!1,ie=t.replace(MS,(P,Y,se,$e,be,Kr)=>$e==="\\"?(k=!0,P):$e==="?"?Y?Y+$e+(be?R.repeat(be.length):""):Kr===0?$+(be?R.repeat(be.length):""):R.repeat(se.length):$e==="."?f.repeat(se.length):$e==="*"?Y?Y+$e+(be?j:""):j:Y?P:`\\${P}`);return k===!0&&(r.unescape===!0?ie=ie.replace(/\\/g,""):ie=ie.replace(/\\+/g,P=>P.length%2===0?"\\\\":P?"\\":"")),ie===t&&r.contains===!0?(A.output=t,A):(A.output=tt.wrapOutput(ie,A,e),A)}for(;!re();){if(T=xe(),T==="\0")continue;if(T==="\\"){const P=q();if(P==="/"&&r.bash!==!0||P==="."||P===";")continue;if(!P){T+="\\",G({type:"text",value:T});continue}const Y=/^\\+/.exec(qe());let se=0;if(Y&&Y[0].length>2&&(se=Y[0].length,A.index+=se,se%2!==0&&(T+="\\")),r.unescape===!0?T=xe():T+=xe(),A.brackets===0){G({type:"text",value:T});continue}}if(A.brackets>0&&(T!=="]"||C.value==="["||C.value==="[^")){if(r.posix!==!1&&T===":"){const P=C.value.slice(1);if(P.includes("[")&&(C.posix=!0,P.includes(":"))){const Y=C.value.lastIndexOf("["),se=C.value.slice(0,Y),$e=C.value.slice(Y+2),be=BS[$e];if(be){C.value=se+be,A.backtrack=!0,xe(),!s.output&&a.indexOf(C)===1&&(s.output=p);continue}}}(T==="["&&q()!==":"||T==="-"&&q()==="]")&&(T=`\\${T}`),T==="]"&&(C.value==="["||C.value==="[^")&&(T=`\\${T}`),r.posix===!0&&T==="!"&&C.value==="["&&(T="^"),C.value+=T,nt({value:T});continue}if(A.quotes===1&&T!=='"'){T=tt.escapeRegex(T),C.value+=T,nt({value:T});continue}if(T==='"'){A.quotes=A.quotes===1?0:1,r.keepQuotes===!0&&G({type:"text",value:T});continue}if(T==="("){ht("parens"),G({type:"paren",value:T});continue}if(T===")"){if(A.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Ir("opening","("));const P=I[I.length-1];if(P&&A.parens===P.parens+1){Ln(I.pop());continue}G({type:"paren",value:T,output:A.parens?")":"\\)"}),it("parens");continue}if(T==="["){if(r.nobracket===!0||!qe().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Ir("closing","]"));T=`\\${T}`}else ht("brackets");G({type:"bracket",value:T});continue}if(T==="]"){if(r.nobracket===!0||C&&C.type==="bracket"&&C.value.length===1){G({type:"text",value:T,output:`\\${T}`});continue}if(A.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Ir("opening","["));G({type:"text",value:T,output:`\\${T}`});continue}it("brackets");const P=C.value.slice(1);if(C.posix!==!0&&P[0]==="^"&&!P.includes("/")&&(T=`/${T}`),C.value+=T,nt({value:T}),r.literalBrackets===!1||tt.hasRegexChars(P))continue;const Y=tt.escapeRegex(C.value);if(A.output=A.output.slice(0,-C.value.length),r.literalBrackets===!0){A.output+=Y,C.value=Y;continue}C.value=`(${o}${Y}|${C.value})`,A.output+=C.value;continue}if(T==="{"&&r.nobrace!==!0){ht("braces");const P={type:"brace",value:T,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};B.push(P),G(P);continue}if(T==="}"){const P=B[B.length-1];if(r.nobrace===!0||!P){G({type:"text",value:T,output:T});continue}let Y=")";if(P.dots===!0){const se=a.slice(),$e=[];for(let be=se.length-1;be>=0&&(a.pop(),se[be].type!=="brace");be--)se[be].type!=="dots"&&$e.unshift(se[be].value);Y=jS($e,r),A.backtrack=!0}if(P.comma!==!0&&P.dots!==!0){const se=A.output.slice(0,P.outputIndex),$e=A.tokens.slice(P.tokensIndex);P.value=P.output="\\{",T=Y="\\}",A.output=se;for(const be of $e)A.output+=be.output||be.value}G({type:"brace",value:T,output:Y}),it("braces"),B.pop();continue}if(T==="|"){I.length>0&&I[I.length-1].conditions++,G({type:"text",value:T});continue}if(T===","){let P=T;const Y=B[B.length-1];Y&&J[J.length-1]==="braces"&&(Y.comma=!0,P="|"),G({type:"comma",value:T,output:P});continue}if(T==="/"){if(C.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",a.pop(),C=s;continue}G({type:"slash",value:T,output:m});continue}if(T==="."){if(A.braces>0&&C.type==="dot"){C.value==="."&&(C.output=f);const P=B[B.length-1];C.type="dots",C.output+=T,C.value+=T,P.dots=!0;continue}if(A.braces+A.parens===0&&C.type!=="bos"&&C.type!=="slash"){G({type:"text",value:T,output:f});continue}G({type:"dot",value:T,output:f});continue}if(T==="?"){if(!(C&&C.value==="(")&&r.noextglob!==!0&&q()==="("&&q(2)!=="?"){Et("qmark",T);continue}if(C&&C.type==="paren"){const Y=q();let se=T;if(Y==="<"&&!tt.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(C.value==="("&&!/[!=<:]/.test(Y)||Y==="<"&&!/<([!=]|\w+>)/.test(qe()))&&(se=`\\${T}`),G({type:"text",value:T,output:se});continue}if(r.dot!==!0&&(C.type==="slash"||C.type==="bos")){G({type:"qmark",value:T,output:S});continue}G({type:"qmark",value:T,output:R});continue}if(T==="!"){if(r.noextglob!==!0&&q()==="("&&(q(2)!=="?"||!/[!=<:]/.test(q(3)))){Et("negate",T);continue}if(r.nonegate!==!0&&A.index===0){br();continue}}if(T==="+"){if(r.noextglob!==!0&&q()==="("&&q(2)!=="?"){Et("plus",T);continue}if(C&&C.value==="("||r.regex===!1){G({type:"plus",value:T,output:c});continue}if(C&&(C.type==="bracket"||C.type==="paren"||C.type==="brace")||A.parens>0){G({type:"plus",value:T});continue}G({type:"plus",value:c});continue}if(T==="@"){if(r.noextglob!==!0&&q()==="("&&q(2)!=="?"){G({type:"at",extglob:!0,value:T,output:""});continue}G({type:"text",value:T});continue}if(T!=="*"){(T==="$"||T==="^")&&(T=`\\${T}`);const P=NS.exec(qe());P&&(T+=P[0],A.index+=P[0].length),G({type:"text",value:T});continue}if(C&&(C.type==="globstar"||C.star===!0)){C.type="star",C.star=!0,C.value+=T,C.output=j,A.backtrack=!0,A.globstar=!0,ye(T);continue}let k=qe();if(r.noextglob!==!0&&/^\([^?]/.test(k)){Et("star",T);continue}if(C.type==="star"){if(r.noglobstar===!0){ye(T);continue}const P=C.prev,Y=P.prev,se=P.type==="slash"||P.type==="bos",$e=Y&&(Y.type==="star"||Y.type==="globstar");if(r.bash===!0&&(!se||k[0]&&k[0]!=="/")){G({type:"star",value:T,output:""});continue}const be=A.braces>0&&(P.type==="comma"||P.type==="brace"),Kr=I.length&&(P.type==="pipe"||P.type==="paren");if(!se&&P.type!=="paren"&&!be&&!Kr){G({type:"star",value:T,output:""});continue}for(;k.slice(0,3)==="/**";){const me=t[A.index+4];if(me&&me!=="/")break;k=k.slice(3),ye("/**",3)}if(P.type==="bos"&&re()){C.type="globstar",C.value+=T,C.output=w(r),A.output=C.output,A.globstar=!0,ye(T);continue}if(P.type==="slash"&&P.prev.type!=="bos"&&!$e&&re()){A.output=A.output.slice(0,-(P.output+C.output).length),P.output=`(?:${P.output}`,C.type="globstar",C.output=w(r)+(r.strictSlashes?")":"|$)"),C.value+=T,A.globstar=!0,A.output+=P.output+C.output,ye(T);continue}if(P.type==="slash"&&P.prev.type!=="bos"&&k[0]==="/"){const me=k[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(P.output+C.output).length),P.output=`(?:${P.output}`,C.type="globstar",C.output=`${w(r)}${m}|${m}${me})`,C.value+=T,A.output+=P.output+C.output,A.globstar=!0,ye(T+xe()),G({type:"slash",value:"/",output:""});continue}if(P.type==="bos"&&k[0]==="/"){C.type="globstar",C.value+=T,C.output=`(?:^|${m}|${w(r)}${m})`,A.output=C.output,A.globstar=!0,ye(T+xe()),G({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-C.output.length),C.type="globstar",C.output=w(r),C.value+=T,A.output+=C.output,A.globstar=!0,ye(T);continue}const ie={type:"star",value:T,output:j};if(r.bash===!0){ie.output=".*?",(C.type==="bos"||C.type==="slash")&&(ie.output=x+ie.output),G(ie);continue}if(C&&(C.type==="bracket"||C.type==="paren")&&r.regex===!0){ie.output=T,G(ie);continue}(A.index===A.start||C.type==="slash"||C.type==="dot")&&(C.type==="dot"?(A.output+=D,C.output+=D):r.dot===!0?(A.output+=_,C.output+=_):(A.output+=x,C.output+=x),q()!=="*"&&(A.output+=p,C.output+=p)),G(ie)}for(;A.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ir("closing","]"));A.output=tt.escapeLast(A.output,"["),it("brackets")}for(;A.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ir("closing",")"));A.output=tt.escapeLast(A.output,"("),it("parens")}for(;A.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ir("closing","}"));A.output=tt.escapeLast(A.output,"{"),it("braces")}if(r.strictSlashes!==!0&&(C.type==="star"||C.type==="bracket")&&G({type:"maybe_slash",value:"",output:`${m}?`}),A.backtrack===!0){A.output="";for(const k of A.tokens)A.output+=k.output!=null?k.output:k.value,k.suffix&&(A.output+=k.suffix)}return A};ro.fastpaths=(t,e)=>{const r={...e},n=typeof r.maxLength=="number"?Math.min(Ti,r.maxLength):Ti,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);t=Rf[t]||t;const s=tt.isWindows(e),{DOT_LITERAL:a,SLASH_LITERAL:o,ONE_CHAR:u,DOTS_SLASH:l,NO_DOT:h,NO_DOTS:f,NO_DOTS_SLASH:c,STAR:m,START_ANCHOR:p}=Ri.globChars(s),y=r.dot?f:h,b=r.dot?c:h,D=r.capture?"":"?:",_={negated:!1,prefix:""};let R=r.bash===!0?".*?":m;r.capture&&(R=`(${R})`);const S=x=>x.noglobstar===!0?R:`(${D}(?:(?!${p}${x.dot?l:a}).)*?)`,v=x=>{switch(x){case"*":return`${y}${u}${R}`;case".*":return`${a}${u}${R}`;case"*.*":return`${y}${R}${a}${u}${R}`;case"*/*":return`${y}${R}${o}${u}${b}${R}`;case"**":return y+S(r);case"**/*":return`(?:${y}${S(r)}${o})?${b}${u}${R}`;case"**/*.*":return`(?:${y}${S(r)}${o})?${b}${R}${a}${u}${R}`;case"**/.*":return`(?:${y}${S(r)}${o})?${a}${u}${R}`;default:{const $=/^(.*?)\.(\w+)$/.exec(x);if(!$)return;const j=v($[1]);return j?j+a+$[2]:void 0}}},d=tt.removePrefix(t,_);let w=v(d);return w&&r.strictSlashes!==!0&&(w+=`${o}?`),w};var HS=ro;const US=we,qS=LS,no=HS,io=dn,GS=Ai,zS=t=>t&&typeof t=="object"&&!Array.isArray(t),Se=(t,e,r=!1)=>{if(Array.isArray(t)){const h=t.map(c=>Se(c,e,r));return c=>{for(const m of h){const p=m(c);if(p)return p}return!1}}const n=zS(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");const i=e||{},s=io.isWindows(e),a=n?Se.compileRe(t,e):Se.makeRe(t,e,!1,!0),o=a.state;delete a.state;let u=()=>!1;if(i.ignore){const h={...e,ignore:null,onMatch:null,onResult:null};u=Se(i.ignore,h,r)}const l=(h,f=!1)=>{const{isMatch:c,match:m,output:p}=Se.test(h,a,e,{glob:t,posix:s}),y={glob:t,state:o,regex:a,posix:s,input:h,output:p,match:m,isMatch:c};return typeof i.onResult=="function"&&i.onResult(y),c===!1?(y.isMatch=!1,f?y:!1):u(h)?(typeof i.onIgnore=="function"&&i.onIgnore(y),y.isMatch=!1,f?y:!1):(typeof i.onMatch=="function"&&i.onMatch(y),f?y:!0)};return r&&(l.state=o),l};Se.test=(t,e,r,{glob:n,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};const s=r||{},a=s.format||(i?io.toPosixSlashes:null);let o=t===n,u=o&&a?a(t):t;return o===!1&&(u=a?a(t):t,o=u===n),(o===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?o=Se.matchBase(t,e,r,i):o=e.exec(u)),{isMatch:Boolean(o),match:o,output:u}},Se.matchBase=(t,e,r,n=io.isWindows(r))=>(e instanceof RegExp?e:Se.makeRe(e,r)).test(US.basename(t)),Se.isMatch=(t,e,r)=>Se(e,r)(t),Se.parse=(t,e)=>Array.isArray(t)?t.map(r=>Se.parse(r,e)):no(t,{...e,fastpaths:!1}),Se.scan=(t,e)=>qS(t,e),Se.compileRe=(t,e,r=!1,n=!1)=>{if(r===!0)return t.output;const i=e||{},s=i.contains?"":"^",a=i.contains?"":"$";let o=`${s}(?:${t.output})${a}`;t&&t.negated===!0&&(o=`^(?!${o}).*$`);const u=Se.toRegex(o,e);return n===!0&&(u.state=t),u},Se.makeRe=(t,e={},r=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=no.fastpaths(t,e)),i.output||(i=no(t,e)),Se.compileRe(i,e,r,n)},Se.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}},Se.constants=GS;var VS=Se,WS=VS;const Tf=Jt,xf=gS,At=WS,so=dn,$f=t=>t===""||t==="./",de=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,i=new Set,s=new Set,a=0,o=h=>{s.add(h.output),r&&r.onResult&&r.onResult(h)};for(let h=0;h<e.length;h++){let f=At(String(e[h]),{...r,onResult:o},!0),c=f.state.negated||f.state.negatedExtglob;c&&a++;for(let m of t){let p=f(m,!0);!(c?!p.isMatch:p.isMatch)||(c?n.add(p.output):(n.delete(p.output),i.add(p.output)))}}let l=(a===e.length?[...s]:[...i]).filter(h=>!n.has(h));if(r&&l.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(h=>h.replace(/\\/g,"")):e}return l};de.match=de,de.matcher=(t,e)=>At(t,e),de.isMatch=(t,e,r)=>At(e,r)(t),de.any=de.isMatch,de.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,i=[],a=de(t,e,{...r,onResult:o=>{r.onResult&&r.onResult(o),i.push(o.output)}});for(let o of i)a.includes(o)||n.add(o);return[...n]},de.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Tf.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>de.contains(t,n,r));if(typeof e=="string"){if($f(t)||$f(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return de.isMatch(t,e,{...r,contains:!0})},de.matchKeys=(t,e,r)=>{if(!so.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=de(Object.keys(t),e,r),i={};for(let s of n)i[s]=t[s];return i},de.some=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=At(String(i),r);if(n.some(a=>s(a)))return!0}return!1},de.every=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=At(String(i),r);if(!n.every(a=>s(a)))return!1}return!0},de.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Tf.inspect(t)}"`);return[].concat(e).every(n=>At(n,r)(t))},de.capture=(t,e,r)=>{let n=so.isWindows(r),s=At.makeRe(String(t),{...r,capture:!0}).exec(n?so.toPosixSlashes(e):e);if(s)return s.slice(1).map(a=>a===void 0?"":a)},de.makeRe=(...t)=>At.makeRe(...t),de.scan=(...t)=>At.scan(...t),de.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let i of xf(String(n),e))r.push(At.parse(i,e));return r},de.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:xf(t,e)},de.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return de.braces(t,{...e,expand:!0})};var YS=de;Object.defineProperty(V,"__esModule",{value:!0}),V.matchAny=V.convertPatternsToRe=V.makeRe=V.getPatternParts=V.expandBraceExpansion=V.expandPatternsWithBraceExpansion=V.isAffectDepthOfReadingPattern=V.endsWithSlashGlobStar=V.hasGlobStar=V.getBaseDirectory=V.isPatternRelatedToParentDirectory=V.getPatternsOutsideCurrentDirectory=V.getPatternsInsideCurrentDirectory=V.getPositivePatterns=V.getNegativePatterns=V.isPositivePattern=V.isNegativePattern=V.convertToNegativePattern=V.convertToPositivePattern=V.isDynamicPattern=V.isStaticPattern=void 0;const KS=we,XS=T_,ao=YS,Of="**",QS="\\",JS=/[*?]|^!/,ZS=/\[[^[]*]/,eC=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,tC=/[!*+?@]\([^(]*\)/,rC=/,|\.\./;function Ff(t,e={}){return!Pf(t,e)}V.isStaticPattern=Ff;function Pf(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(QS)||JS.test(t)||ZS.test(t)||eC.test(t)||e.extglob!==!1&&tC.test(t)||e.braceExpansion!==!1&&nC(t))}V.isDynamicPattern=Pf;function nC(t){const e=t.indexOf("{");if(e===-1)return!1;const r=t.indexOf("}",e+1);if(r===-1)return!1;const n=t.slice(e,r);return rC.test(n)}function iC(t){return xi(t)?t.slice(1):t}V.convertToPositivePattern=iC;function sC(t){return"!"+t}V.convertToNegativePattern=sC;function xi(t){return t.startsWith("!")&&t[1]!=="("}V.isNegativePattern=xi;function kf(t){return!xi(t)}V.isPositivePattern=kf;function aC(t){return t.filter(xi)}V.getNegativePatterns=aC;function oC(t){return t.filter(kf)}V.getPositivePatterns=oC;function uC(t){return t.filter(e=>!oo(e))}V.getPatternsInsideCurrentDirectory=uC;function lC(t){return t.filter(oo)}V.getPatternsOutsideCurrentDirectory=lC;function oo(t){return t.startsWith("..")||t.startsWith("./..")}V.isPatternRelatedToParentDirectory=oo;function cC(t){return XS(t,{flipBackslashes:!1})}V.getBaseDirectory=cC;function hC(t){return t.includes(Of)}V.hasGlobStar=hC;function If(t){return t.endsWith("/"+Of)}V.endsWithSlashGlobStar=If;function fC(t){const e=KS.basename(t);return If(t)||Ff(e)}V.isAffectDepthOfReadingPattern=fC;function dC(t){return t.reduce((e,r)=>e.concat(Lf(r)),[])}V.expandPatternsWithBraceExpansion=dC;function Lf(t){return ao.braces(t,{expand:!0,nodupes:!0})}V.expandBraceExpansion=Lf;function pC(t,e){let{parts:r}=ao.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}V.getPatternParts=pC;function Bf(t,e){return ao.makeRe(t,e)}V.makeRe=Bf;function mC(t,e){return t.map(r=>Bf(r,e))}V.convertPatternsToRe=mC;function gC(t,e){return e.some(r=>r.test(t))}V.matchAny=gC;var $i={};const yC=Xe,Nf=yC.PassThrough,vC=Array.prototype.slice;var bC=DC;function DC(){const t=[],e=vC.call(arguments);let r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};const i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);const a=Nf(n);function o(){for(let h=0,f=arguments.length;h<f;h++)t.push(Mf(arguments[h],n));return u(),this}function u(){if(r)return;r=!0;let h=t.shift();if(!h){process.nextTick(l);return}Array.isArray(h)||(h=[h]);let f=h.length+1;function c(){--f>0||(r=!1,u())}function m(p){function y(){p.removeListener("merge2UnpipeEnd",y),p.removeListener("end",y),s&&p.removeListener("error",b),c()}function b(D){a.emit("error",D)}if(p._readableState.endEmitted)return c();p.on("merge2UnpipeEnd",y),p.on("end",y),s&&p.on("error",b),p.pipe(a,{end:!1}),p.resume()}for(let p=0;p<h.length;p++)m(h[p]);c()}function l(){r=!1,a.emit("queueDrain"),i&&a.end()}return a.setMaxListeners(0),a.add=o,a.on("unpipe",function(h){h.emit("merge2UnpipeEnd")}),e.length&&o.apply(null,e),a}function Mf(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=Mf(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(Nf(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}Object.defineProperty($i,"__esModule",{value:!0}),$i.merge=void 0;const wC=bC;function EC(t){const e=wC(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>jf(t)),e.once("end",()=>jf(t)),e}$i.merge=EC;function jf(t){t.forEach(e=>e.emit("close"))}var Lr={};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.isEmpty=Lr.isString=void 0;function _C(t){return typeof t=="string"}Lr.isString=_C;function SC(t){return t===""}Lr.isEmpty=SC,Object.defineProperty(ge,"__esModule",{value:!0}),ge.string=ge.stream=ge.pattern=ge.path=ge.fs=ge.errno=ge.array=void 0;const CC=Pr;ge.array=CC;const AC=wi;ge.errno=AC;const RC=Ei;ge.fs=RC;const TC=St;ge.path=TC;const xC=V;ge.pattern=xC;const $C=$i;ge.stream=$C;const OC=Lr;ge.string=OC,Object.defineProperty(je,"__esModule",{value:!0}),je.convertPatternGroupToTask=je.convertPatternGroupsToTasks=je.groupPatternsByBaseDirectory=je.getNegativePatternsAsPositive=je.getPositivePatterns=je.convertPatternsToTasks=je.generate=void 0;const Bt=ge;function FC(t,e){const r=Hf(t),n=Uf(t,e.ignore),i=r.filter(u=>Bt.pattern.isStaticPattern(u,e)),s=r.filter(u=>Bt.pattern.isDynamicPattern(u,e)),a=uo(i,n,!1),o=uo(s,n,!0);return a.concat(o)}je.generate=FC;function uo(t,e,r){const n=[],i=Bt.pattern.getPatternsOutsideCurrentDirectory(t),s=Bt.pattern.getPatternsInsideCurrentDirectory(t),a=lo(i),o=lo(s);return n.push(...co(a,e,r)),"."in o?n.push(ho(".",s,e,r)):n.push(...co(o,e,r)),n}je.convertPatternsToTasks=uo;function Hf(t){return Bt.pattern.getPositivePatterns(t)}je.getPositivePatterns=Hf;function Uf(t,e){return Bt.pattern.getNegativePatterns(t).concat(e).map(Bt.pattern.convertToPositivePattern)}je.getNegativePatternsAsPositive=Uf;function lo(t){const e={};return t.reduce((r,n)=>{const i=Bt.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},e)}je.groupPatternsByBaseDirectory=lo;function co(t,e,r){return Object.keys(t).map(n=>ho(n,t[n],e,r))}je.convertPatternGroupsToTasks=co;function ho(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(Bt.pattern.convertToNegativePattern))}}je.convertPatternGroupToTask=ho;var Br={};Object.defineProperty(Br,"__esModule",{value:!0}),Br.removeDuplicateSlashes=Br.transform=void 0;const PC=/(?!^)\/{2,}/g;function kC(t){return t.map(e=>qf(e))}Br.transform=kC;function qf(t){return t.replace(PC,"/")}Br.removeDuplicateSlashes=qf;var fo={},Oi={},rt={},Fi={};Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.read=void 0;function IC(t,e,r){e.fs.lstat(t,(n,i)=>{if(n!==null){Gf(r,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){po(r,i);return}e.fs.stat(t,(s,a)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){Gf(r,s);return}po(r,i);return}e.markSymbolicLink&&(a.isSymbolicLink=()=>!0),po(r,a)})})}Fi.read=IC;function Gf(t,e){t(e)}function po(t,e){t(null,e)}var Pi={};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.read=void 0;function LC(t,e){const r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{const n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}Pi.read=LC;var mo={},zf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=Je;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync};function r(n){return n===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),n)}t.createFileSystemAdapter=r})(zf),Object.defineProperty(mo,"__esModule",{value:!0});const BC=zf;class NC{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=BC.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}}mo.default=NC,Object.defineProperty(rt,"__esModule",{value:!0}),rt.statSync=rt.stat=rt.Settings=void 0;const Vf=Fi,MC=Pi,go=mo;rt.Settings=go.default;function jC(t,e,r){if(typeof e=="function"){Vf.read(t,yo(),e);return}Vf.read(t,yo(e),r)}rt.stat=jC;function HC(t,e){const r=yo(e);return MC.read(t,r)}rt.statSync=HC;function yo(t={}){return t instanceof go.default?t:new go.default(t)}var yt={},vo={},ki={},Rt={},Wt={};/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */let Wf;var UC=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:le):t=>(Wf||(Wf=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0));/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var qC=zC;const GC=UC;function zC(t,e){let r,n,i,s=!0;Array.isArray(t)?(r=[],n=t.length):(i=Object.keys(t),r={},n=i.length);function a(u){function l(){e&&e(u,r),e=null}s?GC(l):l()}function o(u,l,h){r[u]=h,(--n===0||l)&&a(l)}n?i?i.forEach(function(u){t[u](function(l,h){o(u,l,h)})}):t.forEach(function(u,l){u(function(h,f){o(l,h,f)})}):a(null),s=!1}var mn={};Object.defineProperty(mn,"__esModule",{value:!0}),mn.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const Ii=process.versions.node.split(".");if(Ii[0]===void 0||Ii[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const Yf=Number.parseInt(Ii[0],10),VC=Number.parseInt(Ii[1],10),Kf=10,WC=10,YC=Yf>Kf,KC=Yf===Kf&&VC>=WC;mn.IS_SUPPORT_READDIR_WITH_FILE_TYPES=YC||KC;var gn={},Li={};Object.defineProperty(Li,"__esModule",{value:!0}),Li.createDirentFromStats=void 0;class XC{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function QC(t,e){return new XC(t,e)}Li.createDirentFromStats=QC,Object.defineProperty(gn,"__esModule",{value:!0}),gn.fs=void 0;const JC=Li;gn.fs=JC;var yn={};Object.defineProperty(yn,"__esModule",{value:!0}),yn.joinPathSegments=void 0;function ZC(t,e,r){return t.endsWith(r)?t+e:t+r+e}yn.joinPathSegments=ZC,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.readdir=Wt.readdirWithFileTypes=Wt.read=void 0;const e2=rt,Xf=qC,t2=mn,Qf=gn,Jf=yn;function r2(t,e,r){if(!e.stats&&t2.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Zf(t,e,r);return}ed(t,e,r)}Wt.read=r2;function Zf(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,i)=>{if(n!==null){Bi(r,n);return}const s=i.map(o=>({dirent:o,name:o.name,path:Jf.joinPathSegments(t,o.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){bo(r,s);return}const a=s.map(o=>n2(o,e));Xf(a,(o,u)=>{if(o!==null){Bi(r,o);return}bo(r,u)})})}Wt.readdirWithFileTypes=Zf;function n2(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,i)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=Qf.fs.createDirentFromStats(t.name,i),r(null,t)})}}function ed(t,e,r){e.fs.readdir(t,(n,i)=>{if(n!==null){Bi(r,n);return}const s=i.map(a=>{const o=Jf.joinPathSegments(t,a,e.pathSegmentSeparator);return u=>{e2.stat(o,e.fsStatSettings,(l,h)=>{if(l!==null){u(l);return}const f={name:a,path:o,dirent:Qf.fs.createDirentFromStats(a,h)};e.stats&&(f.stats=h),u(null,f)})}});Xf(s,(a,o)=>{if(a!==null){Bi(r,a);return}bo(r,o)})})}Wt.readdir=ed;function Bi(t,e){t(e)}function bo(t,e){t(null,e)}var Yt={};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.readdir=Yt.readdirWithFileTypes=Yt.read=void 0;const i2=rt,s2=mn,td=gn,rd=yn;function a2(t,e){return!e.stats&&s2.IS_SUPPORT_READDIR_WITH_FILE_TYPES?nd(t,e):id(t,e)}Yt.read=a2;function nd(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{const i={dirent:n,name:n.name,path:rd.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{const s=e.fs.statSync(i.path);i.dirent=td.fs.createDirentFromStats(i.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return i})}Yt.readdirWithFileTypes=nd;function id(t,e){return e.fs.readdirSync(t).map(n=>{const i=rd.joinPathSegments(t,n,e.pathSegmentSeparator),s=i2.statSync(i,e.fsStatSettings),a={name:n,path:i,dirent:td.fs.createDirentFromStats(n,s)};return e.stats&&(a.stats=s),a})}Yt.readdir=id;var Do={},sd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=Je;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};function r(n){return n===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),n)}t.createFileSystemAdapter=r})(sd),Object.defineProperty(Do,"__esModule",{value:!0});const o2=we,u2=rt,l2=sd;class c2{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=l2.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,o2.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new u2.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}}Do.default=c2,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.Settings=Rt.scandirSync=Rt.scandir=void 0;const ad=Wt,h2=Yt,wo=Do;Rt.Settings=wo.default;function f2(t,e,r){if(typeof e=="function"){ad.read(t,Eo(),e);return}ad.read(t,Eo(e),r)}Rt.scandir=f2;function d2(t,e){const r=Eo(e);return h2.read(t,r)}Rt.scandirSync=d2;function Eo(t={}){return t instanceof wo.default?t:new wo.default(t)}var _o={exports:{}};function p2(t){var e=new t,r=e;function n(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}var m2=p2,g2=m2;function od(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var n=g2(y2),i=null,s=null,a=0,o=null,u={push:y,drain:ot,saturated:ot,pause:h,paused:!1,concurrency:r,running:l,resume:m,idle:p,length:f,getQueue:c,unshift:b,empty:ot,kill:_,killAndDrain:R,error:S};return u;function l(){return a}function h(){u.paused=!0}function f(){for(var v=i,d=0;v;)v=v.next,d++;return d}function c(){for(var v=i,d=[];v;)d.push(v.value),v=v.next;return d}function m(){if(!!u.paused){u.paused=!1;for(var v=0;v<u.concurrency;v++)a++,D()}}function p(){return a===0&&u.length()===0}function y(v,d){var w=n.get();w.context=t,w.release=D,w.value=v,w.callback=d||ot,w.errorHandler=o,a===u.concurrency||u.paused?s?(s.next=w,s=w):(i=w,s=w,u.saturated()):(a++,e.call(t,w.value,w.worked))}function b(v,d){var w=n.get();w.context=t,w.release=D,w.value=v,w.callback=d||ot,a===u.concurrency||u.paused?i?(w.next=i,i=w):(i=w,s=w,u.saturated()):(a++,e.call(t,w.value,w.worked))}function D(v){v&&n.release(v);var d=i;d?u.paused?a--:(s===i&&(s=null),i=d.next,d.next=null,e.call(t,d.value,d.worked),s===null&&u.empty()):--a===0&&u.drain()}function _(){i=null,s=null,u.drain=ot}function R(){i=null,s=null,u.drain(),u.drain=ot}function S(v){o=v}}function ot(){}function y2(){this.value=null,this.callback=ot,this.next=null,this.release=ot,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var i=t.callback,s=t.errorHandler,a=t.value;t.value=null,t.callback=ot,t.errorHandler&&s(r,a),i.call(t.context,r,n),t.release(t)}}function v2(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(h,f){e.call(this,h).then(function(c){f(null,c)},f)}var i=od(t,n,r),s=i.push,a=i.unshift;return i.push=o,i.unshift=u,i.drained=l,i;function o(h){var f=new Promise(function(c,m){s(h,function(p,y){if(p){m(p);return}c(y)})});return f.catch(ot),f}function u(h){var f=new Promise(function(c,m){a(h,function(p,y){if(p){m(p);return}c(y)})});return f.catch(ot),f}function l(){var h=i.drain,f=new Promise(function(c){i.drain=function(){h(),c()}});return f}}_o.exports=od,_o.exports.promise=v2;var ut={};Object.defineProperty(ut,"__esModule",{value:!0}),ut.joinPathSegments=ut.replacePathSegmentSeparator=ut.isAppliedFilter=ut.isFatalError=void 0;function b2(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}ut.isFatalError=b2;function D2(t,e){return t===null||t(e)}ut.isAppliedFilter=D2;function w2(t,e){return t.split(/[/\\]/).join(e)}ut.replacePathSegmentSeparator=w2;function E2(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}ut.joinPathSegments=E2;var Ni={};Object.defineProperty(Ni,"__esModule",{value:!0});const _2=ut;class S2{constructor(e,r){this._root=e,this._settings=r,this._root=_2.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}}Ni.default=S2,Object.defineProperty(ki,"__esModule",{value:!0});const C2=Ut,A2=Rt,R2=_o.exports,Mi=ut,T2=Ni;class x2 extends T2.default{constructor(e,r){super(e,r);this._settings=r,this._scandir=A2.scandir,this._emitter=new C2.EventEmitter,this._queue=R2(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){const n={directory:e,base:r};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){r(n,void 0);return}for(const s of i)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!Mi.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;const n=e.path;r!==void 0&&(e.path=Mi.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Mi.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Mi.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}ki.default=x2,Object.defineProperty(vo,"__esModule",{value:!0});const $2=ki;class O2{constructor(e,r){this._root=e,this._settings=r,this._reader=new $2.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{F2(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{P2(e,this._storage)}),this._reader.read()}}vo.default=O2;function F2(t,e){t(e)}function P2(t,e){t(null,e)}var So={};Object.defineProperty(So,"__esModule",{value:!0});const k2=Xe,I2=ki;class L2{constructor(e,r){this._root=e,this._settings=r,this._reader=new I2.default(this._root,this._settings),this._stream=new k2.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}So.default=L2;var Co={},Ao={};Object.defineProperty(Ao,"__esModule",{value:!0});const B2=Rt,ji=ut,N2=Ni;class M2 extends N2.default{constructor(){super(...arguments);this._scandir=B2.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{const n=this._scandir(e,this._settings.fsScandirSettings);for(const i of n)this._handleEntry(i,r)}catch(n){this._handleError(n)}}_handleError(e){if(!!ji.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;r!==void 0&&(e.path=ji.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),ji.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&ji.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}Ao.default=M2,Object.defineProperty(Co,"__esModule",{value:!0});const j2=Ao;class H2{constructor(e,r){this._root=e,this._settings=r,this._reader=new j2.default(this._root,this._settings)}read(){return this._reader.read()}}Co.default=H2;var Ro={};Object.defineProperty(Ro,"__esModule",{value:!0});const U2=we,q2=Rt;class G2{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,U2.sep),this.fsScandirSettings=new q2.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}}Ro.default=G2,Object.defineProperty(yt,"__esModule",{value:!0}),yt.Settings=yt.walkStream=yt.walkSync=yt.walk=void 0;const ud=vo,z2=So,V2=Co,To=Ro;yt.Settings=To.default;function W2(t,e,r){if(typeof e=="function"){new ud.default(t,Hi()).read(e);return}new ud.default(t,Hi(e)).read(r)}yt.walk=W2;function Y2(t,e){const r=Hi(e);return new V2.default(t,r).read()}yt.walkSync=Y2;function K2(t,e){const r=Hi(e);return new z2.default(t,r).read()}yt.walkStream=K2;function Hi(t={}){return t instanceof To.default?t:new To.default(t)}var Ui={};Object.defineProperty(Ui,"__esModule",{value:!0});const X2=we,Q2=rt,ld=ge;class J2{constructor(e){this._settings=e,this._fsStatSettings=new Q2.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return X2.resolve(this._settings.cwd,e)}_makeEntry(e,r){const n={name:r,path:r,dirent:ld.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!ld.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}}Ui.default=J2,Object.defineProperty(Oi,"__esModule",{value:!0});const Z2=Xe,eA=rt,tA=yt,rA=Ui;class nA extends rA.default{constructor(){super(...arguments);this._walkStream=tA.walkStream,this._stat=eA.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){const n=e.map(this._getFullEntryPath,this),i=new Z2.PassThrough({objectMode:!0});i._write=(s,a,o)=>this._getEntry(n[s],e[s],r).then(u=>{u!==null&&r.entryFilter(u)&&i.push(u),s===n.length-1&&i.end(),o()}).catch(o);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(e,r,n){return this._getStat(e).then(i=>this._makeEntry(i,r)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(i,s)=>i===null?r(s):n(i))})}}Oi.default=nA;var vn={},xo={},$o={},Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});const Nr=ge;class iA{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){const e=Nr.pattern.expandPatternsWithBraceExpansion(this._patterns);for(const r of e){const n=this._getPatternSegments(r),i=this._splitSegmentsIntoSections(n);this._storage.push({complete:i.length<=1,pattern:r,segments:n,sections:i})}}_getPatternSegments(e){return Nr.pattern.getPatternParts(e,this._micromatchOptions).map(n=>Nr.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:Nr.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return Nr.array.splitWhen(e,r=>r.dynamic&&Nr.pattern.hasGlobStar(r.pattern))}}Oo.default=iA,Object.defineProperty($o,"__esModule",{value:!0});const sA=Oo;class aA extends sA.default{match(e){const r=e.split("/"),n=r.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(const s of i){const a=s.sections[0];if(!s.complete&&n>a.length||r.every((u,l)=>{const h=s.segments[l];return!!(h.dynamic&&h.patternRe.test(u)||!h.dynamic&&h.pattern===u)}))return!0}return!1}}$o.default=aA,Object.defineProperty(xo,"__esModule",{value:!0});const qi=ge,oA=$o;class uA{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){const i=this._getMatcher(r),s=this._getNegativePatternsRe(n);return a=>this._filter(e,a,i,s)}_getMatcher(e){return new oA.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const r=e.filter(qi.pattern.isAffectDepthOfReadingPattern);return qi.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,i){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;const s=qi.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){const n=r.split("/").length;if(e==="")return n;const i=e.split("/").length;return n-i}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!qi.pattern.matchAny(e,r)}}xo.default=uA;var Fo={};Object.defineProperty(Fo,"__esModule",{value:!0});const cr=ge;class lA{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){const n=cr.pattern.convertPatternsToRe(e,this._micromatchOptions),i=cr.pattern.convertPatternsToRe(r,this._micromatchOptions);return s=>this._filter(s,n,i)}_filter(e,r,n){if(this._settings.unique&&this._isDuplicateEntry(e)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e.path,n))return!1;const i=this._settings.baseNameMatch?e.name:e.path,s=this._isMatchToPatterns(i,r)&&!this._isMatchToPatterns(e.path,n);return this._settings.unique&&s&&this._createIndexRecord(e),s}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;const n=cr.path.makeAbsolute(this._settings.cwd,e);return cr.pattern.matchAny(n,r)}_isMatchToPatterns(e,r){const n=cr.path.removeLeadingDotSegment(e);return cr.pattern.matchAny(n,r)||cr.pattern.matchAny(n+"/",r)}}Fo.default=lA;var Po={};Object.defineProperty(Po,"__esModule",{value:!0});const cA=ge;class hA{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return cA.errno.isEnoentCodeError(e)||this._settings.suppressErrors}}Po.default=hA;var ko={};Object.defineProperty(ko,"__esModule",{value:!0});const cd=ge;class fA{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=cd.path.makeAbsolute(this._settings.cwd,r),r=cd.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}}ko.default=fA,Object.defineProperty(vn,"__esModule",{value:!0});const dA=we,pA=xo,mA=Fo,gA=Po,yA=ko;class vA{constructor(e){this._settings=e,this.errorFilter=new gA.default(this._settings),this.entryFilter=new mA.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new pA.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new yA.default(this._settings)}_getRootDirectory(e){return dA.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){const r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}}vn.default=vA,Object.defineProperty(fo,"__esModule",{value:!0});const bA=Oi,DA=vn;class wA extends DA.default{constructor(){super(...arguments);this._reader=new bA.default(this._settings)}read(e){const r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=[];return new Promise((s,a)=>{const o=this.api(r,e,n);o.once("error",a),o.on("data",u=>i.push(n.transform(u))),o.once("end",()=>s(i))})}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}}fo.default=wA;var Io={};Object.defineProperty(Io,"__esModule",{value:!0});const EA=Xe,_A=Oi,SA=vn;class CA extends SA.default{constructor(){super(...arguments);this._reader=new _A.default(this._settings)}read(e){const r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(r,e,n),s=new EA.Readable({objectMode:!0,read:()=>{}});return i.once("error",a=>s.emit("error",a)).on("data",a=>s.emit("data",n.transform(a))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}}Io.default=CA;var Lo={},Bo={};Object.defineProperty(Bo,"__esModule",{value:!0});const AA=rt,RA=yt,TA=Ui;class xA extends TA.default{constructor(){super(...arguments);this._walkSync=RA.walkSync,this._statSync=AA.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){const n=[];for(const i of e){const s=this._getFullEntryPath(i),a=this._getEntry(s,i,r);a===null||!r.entryFilter(a)||n.push(a)}return n}_getEntry(e,r,n){try{const i=this._getStat(e);return this._makeEntry(i,r)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}Bo.default=xA,Object.defineProperty(Lo,"__esModule",{value:!0});const $A=Bo,OA=vn;class FA extends OA.default{constructor(){super(...arguments);this._reader=new $A.default(this._settings)}read(e){const r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}}Lo.default=FA;var hd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const e=Je,n=Math.max(Xr.cpus().length,1);t.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:e.lstat,lstatSync:e.lstatSync,stat:e.stat,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};class i{constructor(a={}){this._options=a,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,n),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(a,o){return a===void 0?o:a}_getFileSystemMethods(a={}){return Object.assign(Object.assign({},t.DEFAULT_FILE_SYSTEM_ADAPTER),a)}}t.default=i})(hd);const fd=je,dd=Br,PA=fo,kA=Io,IA=Lo,No=hd,hr=ge;async function Mo(t,e){Mr(t);const r=jo(t,PA.default,e),n=await Promise.all(r);return hr.array.flatten(n)}(function(t){function e(a,o){Mr(a);const u=jo(a,IA.default,o);return hr.array.flatten(u)}t.sync=e;function r(a,o){Mr(a);const u=jo(a,kA.default,o);return hr.stream.merge(u)}t.stream=r;function n(a,o){Mr(a);const u=dd.transform([].concat(a)),l=new No.default(o);return fd.generate(u,l)}t.generateTasks=n;function i(a,o){Mr(a);const u=new No.default(o);return hr.pattern.isDynamicPattern(a,u)}t.isDynamicPattern=i;function s(a){return Mr(a),hr.path.escape(a)}t.escapePath=s})(Mo||(Mo={}));function jo(t,e,r){const n=dd.transform([].concat(t)),i=new No.default(r),s=fd.generate(n,i),a=new e(i);return s.map(a.read,a)}function Mr(t){if(![].concat(t).every(n=>hr.string.isString(n)&&!hr.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}var LA=Mo;const BA=async t=>Je.promises.readFile(t,{encoding:"utf-8"}),NA=async(t,e)=>Je.promises.writeFile(t,e);async function pd(t){return Je.promises.mkdir(t,{recursive:!0})}const MA=t=>Je.lstatSync(t).isDirectory();var Ho={exports:{}};let jA=sl,HA=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||jA.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),pe=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+md(i,e,r,s)+e:t+i+e},md=(t,e,r,n)=>{let i=t.substring(0,n)+r,s=t.substring(n+e.length),a=s.indexOf(e);return~a?i+md(s,e,r,a):i+s},gd=(t=HA)=>({isColorSupported:t,reset:t?e=>`\x1B[0m${e}\x1B[0m`:String,bold:t?pe("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:t?pe("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:t?pe("\x1B[3m","\x1B[23m"):String,underline:t?pe("\x1B[4m","\x1B[24m"):String,inverse:t?pe("\x1B[7m","\x1B[27m"):String,hidden:t?pe("\x1B[8m","\x1B[28m"):String,strikethrough:t?pe("\x1B[9m","\x1B[29m"):String,black:t?pe("\x1B[30m","\x1B[39m"):String,red:t?pe("\x1B[31m","\x1B[39m"):String,green:t?pe("\x1B[32m","\x1B[39m"):String,yellow:t?pe("\x1B[33m","\x1B[39m"):String,blue:t?pe("\x1B[34m","\x1B[39m"):String,magenta:t?pe("\x1B[35m","\x1B[39m"):String,cyan:t?pe("\x1B[36m","\x1B[39m"):String,white:t?pe("\x1B[37m","\x1B[39m"):String,gray:t?pe("\x1B[90m","\x1B[39m"):String,bgBlack:t?pe("\x1B[40m","\x1B[49m"):String,bgRed:t?pe("\x1B[41m","\x1B[49m"):String,bgGreen:t?pe("\x1B[42m","\x1B[49m"):String,bgYellow:t?pe("\x1B[43m","\x1B[49m"):String,bgBlue:t?pe("\x1B[44m","\x1B[49m"):String,bgMagenta:t?pe("\x1B[45m","\x1B[49m"):String,bgCyan:t?pe("\x1B[46m","\x1B[49m"):String,bgWhite:t?pe("\x1B[47m","\x1B[49m"):String});Ho.exports=gd(),Ho.exports.createColors=gd;var Uo=Ho.exports,yd=(t,e=process.argv)=>{const r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)};const UA=Xr,vd=sl,lt=yd,{env:Re}=process;let Kt;lt("no-color")||lt("no-colors")||lt("color=false")||lt("color=never")?Kt=0:(lt("color")||lt("colors")||lt("color=true")||lt("color=always"))&&(Kt=1),"FORCE_COLOR"in Re&&(Re.FORCE_COLOR==="true"?Kt=1:Re.FORCE_COLOR==="false"?Kt=0:Kt=Re.FORCE_COLOR.length===0?1:Math.min(parseInt(Re.FORCE_COLOR,10),3));function qo(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Go(t,e){if(Kt===0)return 0;if(lt("color=16m")||lt("color=full")||lt("color=truecolor"))return 3;if(lt("color=256"))return 2;if(t&&!e&&Kt===void 0)return 0;const r=Kt||0;if(Re.TERM==="dumb")return r;if(process.platform==="win32"){const n=UA.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Re)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Re)||Re.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Re)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Re.TEAMCITY_VERSION)?1:0;if(Re.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Re){const n=parseInt((Re.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Re.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Re.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Re.TERM)||"COLORTERM"in Re?1:r}function qA(t){const e=Go(t,t&&t.isTTY);return qo(e)}var GA={supportsColor:qA,stdout:qo(Go(!0,vd.isatty(1))),stderr:qo(Go(!0,vd.isatty(2)))};const zA=GA,jr=yd;function bd(t){if(/^\d{3,4}$/.test(t)){const r=/(\d{1,2})(\d{2})/.exec(t);return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}const e=(t||"").split(".").map(r=>parseInt(r,10));return{major:e[0],minor:e[1],patch:e[2]}}function zo(t){const{env:e}=process;if("FORCE_HYPERLINK"in e)return!(e.FORCE_HYPERLINK.length>0&&parseInt(e.FORCE_HYPERLINK,10)===0);if(jr("no-hyperlink")||jr("no-hyperlinks")||jr("hyperlink=false")||jr("hyperlink=never"))return!1;if(jr("hyperlink=true")||jr("hyperlink=always"))return!0;if(!zA.supportsColor(t)||t&&!t.isTTY||process.platform==="win32")return!1;if("NETLIFY"in e)return!0;if("CI"in e||"TEAMCITY_VERSION"in e)return!1;if("TERM_PROGRAM"in e){const r=bd(e.TERM_PROGRAM_VERSION);switch(e.TERM_PROGRAM){case"iTerm.app":return r.major===3?r.minor>=1:r.major>3}}if("VTE_VERSION"in e){if(e.VTE_VERSION==="0.50.0")return!1;const r=bd(e.VTE_VERSION);return r.major>0||r.minor>=50}return!1}var Vo={supportsHyperlink:zo,stdout:zo(process.stdout),stderr:zo(process.stderr)};function bn(t,e,{target:r="stdout",...n}={}){return Vo[r]?Bv.link(t,e):n.fallback===!1?t:typeof n.fallback=="function"?n.fallback(t,e):`${t} (\u200B${e}\u200B)`}bn.isSupported=Vo.stdout,bn.stderr=(t,e,r={})=>bn(t,e,{target:"stderr",...r}),bn.stderr.isSupported=Vo.stderr;class Wo{constructor(e,r={},n){this.type=n,this.value=e,this.metadata=r}}const Dd={command:t=>new Wo(t,{},0),path:t=>new Wo(t,{},1),link:(t,e)=>new Wo(t,{link:e},2)};class VA{constructor(e){this.value=e}}function WA(t,...e){let r="";return t.forEach((n,i)=>{if(r+=n,i>=e.length)return;const s=e[i];if(typeof s=="string")r+=s;else{const a=s;switch(a.type){case 0:r+=Uo.bold(Uo.yellow(a.value));break;case 1:r+=Uo.italic(a.value);break;case 2:r+=bn(a.value,a.metadata.link??"");break}}}),new VA(r)}const YA=t=>{console.log(t.value)};function KA(t=process.env){if(t.npm_lifecycle_event==="npx")return"npm";if(t.npm_config_user_agent?.includes("yarn"))return"yarn";if(t.PNPM_HOME)return"pnpm";throw new Sc("Couldn't determine the dependency used to run the create workflow")}async function XA(t,e){await hi(e,["install"],{cwd:t})}var Gi={exports:{}},Yo={exports:{}},Ko={},Tt={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function n(d){return r.includes(d)}const i=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...r];function s(d){return i.includes(d)}const a=["null","undefined","string","number","bigint","boolean","symbol"];function o(d){return a.includes(d)}function u(d){return w=>typeof w===d}const{toString:l}=Object.prototype,h=d=>{const w=l.call(d).slice(8,-1);if(/HTML\w+Element/.test(w)&&c.domElement(d))return"HTMLElement";if(s(w))return w},f=d=>w=>h(w)===d;function c(d){if(d===null)return"null";switch(typeof d){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(c.observable(d))return"Observable";if(c.array(d))return"Array";if(c.buffer(d))return"Buffer";const w=h(d);if(w)return w;if(d instanceof String||d instanceof Boolean||d instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}c.undefined=u("undefined"),c.string=u("string");const m=u("number");c.number=d=>m(d)&&!c.nan(d),c.bigint=u("bigint"),c.function_=u("function"),c.null_=d=>d===null,c.class_=d=>c.function_(d)&&d.toString().startsWith("class "),c.boolean=d=>d===!0||d===!1,c.symbol=u("symbol"),c.numericString=d=>c.string(d)&&!c.emptyStringOrWhitespace(d)&&!Number.isNaN(Number(d)),c.array=(d,w)=>Array.isArray(d)?c.function_(w)?d.every(w):!0:!1,c.buffer=d=>{var w,x,$,j;return(j=($=(x=(w=d)===null||w===void 0?void 0:w.constructor)===null||x===void 0?void 0:x.isBuffer)===null||$===void 0?void 0:$.call(x,d))!==null&&j!==void 0?j:!1},c.nullOrUndefined=d=>c.null_(d)||c.undefined(d),c.object=d=>!c.null_(d)&&(typeof d=="object"||c.function_(d)),c.iterable=d=>{var w;return c.function_((w=d)===null||w===void 0?void 0:w[Symbol.iterator])},c.asyncIterable=d=>{var w;return c.function_((w=d)===null||w===void 0?void 0:w[Symbol.asyncIterator])},c.generator=d=>{var w,x;return c.iterable(d)&&c.function_((w=d)===null||w===void 0?void 0:w.next)&&c.function_((x=d)===null||x===void 0?void 0:x.throw)},c.asyncGenerator=d=>c.asyncIterable(d)&&c.function_(d.next)&&c.function_(d.throw),c.nativePromise=d=>f("Promise")(d);const p=d=>{var w,x;return c.function_((w=d)===null||w===void 0?void 0:w.then)&&c.function_((x=d)===null||x===void 0?void 0:x.catch)};c.promise=d=>c.nativePromise(d)||p(d),c.generatorFunction=f("GeneratorFunction"),c.asyncGeneratorFunction=d=>h(d)==="AsyncGeneratorFunction",c.asyncFunction=d=>h(d)==="AsyncFunction",c.boundFunction=d=>c.function_(d)&&!d.hasOwnProperty("prototype"),c.regExp=f("RegExp"),c.date=f("Date"),c.error=f("Error"),c.map=d=>f("Map")(d),c.set=d=>f("Set")(d),c.weakMap=d=>f("WeakMap")(d),c.weakSet=d=>f("WeakSet")(d),c.int8Array=f("Int8Array"),c.uint8Array=f("Uint8Array"),c.uint8ClampedArray=f("Uint8ClampedArray"),c.int16Array=f("Int16Array"),c.uint16Array=f("Uint16Array"),c.int32Array=f("Int32Array"),c.uint32Array=f("Uint32Array"),c.float32Array=f("Float32Array"),c.float64Array=f("Float64Array"),c.bigInt64Array=f("BigInt64Array"),c.bigUint64Array=f("BigUint64Array"),c.arrayBuffer=f("ArrayBuffer"),c.sharedArrayBuffer=f("SharedArrayBuffer"),c.dataView=f("DataView"),c.enumCase=(d,w)=>Object.values(w).includes(d),c.directInstanceOf=(d,w)=>Object.getPrototypeOf(d)===w.prototype,c.urlInstance=d=>f("URL")(d),c.urlString=d=>{if(!c.string(d))return!1;try{return new URL(d),!0}catch{return!1}},c.truthy=d=>Boolean(d),c.falsy=d=>!d,c.nan=d=>Number.isNaN(d),c.primitive=d=>c.null_(d)||o(typeof d),c.integer=d=>Number.isInteger(d),c.safeInteger=d=>Number.isSafeInteger(d),c.plainObject=d=>{if(l.call(d)!=="[object Object]")return!1;const w=Object.getPrototypeOf(d);return w===null||w===Object.getPrototypeOf({})},c.typedArray=d=>n(h(d));const y=d=>c.safeInteger(d)&&d>=0;c.arrayLike=d=>!c.nullOrUndefined(d)&&!c.function_(d)&&y(d.length),c.inRange=(d,w)=>{if(c.number(w))return d>=Math.min(0,w)&&d<=Math.max(w,0);if(c.array(w)&&w.length===2)return d>=Math.min(...w)&&d<=Math.max(...w);throw new TypeError(`Invalid range: ${JSON.stringify(w)}`)};const b=1,D=["innerHTML","ownerDocument","style","attributes","nodeValue"];c.domElement=d=>c.object(d)&&d.nodeType===b&&c.string(d.nodeName)&&!c.plainObject(d)&&D.every(w=>w in d),c.observable=d=>{var w,x,$,j;return d?d===((x=(w=d)[Symbol.observable])===null||x===void 0?void 0:x.call(w))||d===((j=($=d)["@@observable"])===null||j===void 0?void 0:j.call($)):!1},c.nodeStream=d=>c.object(d)&&c.function_(d.pipe)&&!c.observable(d),c.infinite=d=>d===1/0||d===-1/0;const _=d=>w=>c.integer(w)&&Math.abs(w%2)===d;c.evenInteger=_(0),c.oddInteger=_(1),c.emptyArray=d=>c.array(d)&&d.length===0,c.nonEmptyArray=d=>c.array(d)&&d.length>0,c.emptyString=d=>c.string(d)&&d.length===0,c.nonEmptyString=d=>c.string(d)&&d.length>0;const R=d=>c.string(d)&&!/\S/.test(d);c.emptyStringOrWhitespace=d=>c.emptyString(d)||R(d),c.emptyObject=d=>c.object(d)&&!c.map(d)&&!c.set(d)&&Object.keys(d).length===0,c.nonEmptyObject=d=>c.object(d)&&!c.map(d)&&!c.set(d)&&Object.keys(d).length>0,c.emptySet=d=>c.set(d)&&d.size===0,c.nonEmptySet=d=>c.set(d)&&d.size>0,c.emptyMap=d=>c.map(d)&&d.size===0,c.nonEmptyMap=d=>c.map(d)&&d.size>0,c.propertyKey=d=>c.any([c.string,c.number,c.symbol],d),c.formData=d=>f("FormData")(d),c.urlSearchParams=d=>f("URLSearchParams")(d);const S=(d,w,x)=>{if(!c.function_(w))throw new TypeError(`Invalid predicate: ${JSON.stringify(w)}`);if(x.length===0)throw new TypeError("Invalid number of values");return d.call(x,w)};c.any=(d,...w)=>(c.array(d)?d:[d]).some($=>S(Array.prototype.some,$,w)),c.all=(d,...w)=>S(Array.prototype.every,d,w);const v=(d,w,x,$={})=>{if(!d){const{multipleValues:j}=$,A=j?`received values of types ${[...new Set(x.map(I=>`\`${c(I)}\``))].join(", ")}`:`received value of type \`${c(x)}\``;throw new TypeError(`Expected value which is \`${w}\`, ${A}.`)}};e.assert={undefined:d=>v(c.undefined(d),"undefined",d),string:d=>v(c.string(d),"string",d),number:d=>v(c.number(d),"number",d),bigint:d=>v(c.bigint(d),"bigint",d),function_:d=>v(c.function_(d),"Function",d),null_:d=>v(c.null_(d),"null",d),class_:d=>v(c.class_(d),"Class",d),boolean:d=>v(c.boolean(d),"boolean",d),symbol:d=>v(c.symbol(d),"symbol",d),numericString:d=>v(c.numericString(d),"string with a number",d),array:(d,w)=>{v(c.array(d),"Array",d),w&&d.forEach(w)},buffer:d=>v(c.buffer(d),"Buffer",d),nullOrUndefined:d=>v(c.nullOrUndefined(d),"null or undefined",d),object:d=>v(c.object(d),"Object",d),iterable:d=>v(c.iterable(d),"Iterable",d),asyncIterable:d=>v(c.asyncIterable(d),"AsyncIterable",d),generator:d=>v(c.generator(d),"Generator",d),asyncGenerator:d=>v(c.asyncGenerator(d),"AsyncGenerator",d),nativePromise:d=>v(c.nativePromise(d),"native Promise",d),promise:d=>v(c.promise(d),"Promise",d),generatorFunction:d=>v(c.generatorFunction(d),"GeneratorFunction",d),asyncGeneratorFunction:d=>v(c.asyncGeneratorFunction(d),"AsyncGeneratorFunction",d),asyncFunction:d=>v(c.asyncFunction(d),"AsyncFunction",d),boundFunction:d=>v(c.boundFunction(d),"Function",d),regExp:d=>v(c.regExp(d),"RegExp",d),date:d=>v(c.date(d),"Date",d),error:d=>v(c.error(d),"Error",d),map:d=>v(c.map(d),"Map",d),set:d=>v(c.set(d),"Set",d),weakMap:d=>v(c.weakMap(d),"WeakMap",d),weakSet:d=>v(c.weakSet(d),"WeakSet",d),int8Array:d=>v(c.int8Array(d),"Int8Array",d),uint8Array:d=>v(c.uint8Array(d),"Uint8Array",d),uint8ClampedArray:d=>v(c.uint8ClampedArray(d),"Uint8ClampedArray",d),int16Array:d=>v(c.int16Array(d),"Int16Array",d),uint16Array:d=>v(c.uint16Array(d),"Uint16Array",d),int32Array:d=>v(c.int32Array(d),"Int32Array",d),uint32Array:d=>v(c.uint32Array(d),"Uint32Array",d),float32Array:d=>v(c.float32Array(d),"Float32Array",d),float64Array:d=>v(c.float64Array(d),"Float64Array",d),bigInt64Array:d=>v(c.bigInt64Array(d),"BigInt64Array",d),bigUint64Array:d=>v(c.bigUint64Array(d),"BigUint64Array",d),arrayBuffer:d=>v(c.arrayBuffer(d),"ArrayBuffer",d),sharedArrayBuffer:d=>v(c.sharedArrayBuffer(d),"SharedArrayBuffer",d),dataView:d=>v(c.dataView(d),"DataView",d),enumCase:(d,w)=>v(c.enumCase(d,w),"EnumCase",d),urlInstance:d=>v(c.urlInstance(d),"URL",d),urlString:d=>v(c.urlString(d),"string with a URL",d),truthy:d=>v(c.truthy(d),"truthy",d),falsy:d=>v(c.falsy(d),"falsy",d),nan:d=>v(c.nan(d),"NaN",d),primitive:d=>v(c.primitive(d),"primitive",d),integer:d=>v(c.integer(d),"integer",d),safeInteger:d=>v(c.safeInteger(d),"integer",d),plainObject:d=>v(c.plainObject(d),"plain object",d),typedArray:d=>v(c.typedArray(d),"TypedArray",d),arrayLike:d=>v(c.arrayLike(d),"array-like",d),domElement:d=>v(c.domElement(d),"HTMLElement",d),observable:d=>v(c.observable(d),"Observable",d),nodeStream:d=>v(c.nodeStream(d),"Node.js Stream",d),infinite:d=>v(c.infinite(d),"infinite number",d),emptyArray:d=>v(c.emptyArray(d),"empty array",d),nonEmptyArray:d=>v(c.nonEmptyArray(d),"non-empty array",d),emptyString:d=>v(c.emptyString(d),"empty string",d),nonEmptyString:d=>v(c.nonEmptyString(d),"non-empty string",d),emptyStringOrWhitespace:d=>v(c.emptyStringOrWhitespace(d),"empty string or whitespace",d),emptyObject:d=>v(c.emptyObject(d),"empty object",d),nonEmptyObject:d=>v(c.nonEmptyObject(d),"non-empty object",d),emptySet:d=>v(c.emptySet(d),"empty set",d),nonEmptySet:d=>v(c.nonEmptySet(d),"non-empty set",d),emptyMap:d=>v(c.emptyMap(d),"empty map",d),nonEmptyMap:d=>v(c.nonEmptyMap(d),"non-empty map",d),propertyKey:d=>v(c.propertyKey(d),"PropertyKey",d),formData:d=>v(c.formData(d),"FormData",d),urlSearchParams:d=>v(c.urlSearchParams(d),"URLSearchParams",d),evenInteger:d=>v(c.evenInteger(d),"even integer",d),oddInteger:d=>v(c.oddInteger(d),"odd integer",d),directInstanceOf:(d,w)=>v(c.directInstanceOf(d,w),"T",d),inRange:(d,w)=>v(c.inRange(d,w),"in range",d),any:(d,...w)=>v(c.any(d,...w),"predicate returns truthy for any value",w,{multipleValues:!0}),all:(d,...w)=>v(c.all(d,...w),"predicate returns truthy for all values",w,{multipleValues:!0})},Object.defineProperties(c,{class:{value:c.class_},function:{value:c.function_},null:{value:c.null_}}),Object.defineProperties(e.assert,{class:{value:e.assert.class_},function:{value:e.assert.function_},null:{value:e.assert.null_}}),e.default=c,t.exports=c,t.exports.default=c,t.exports.assert=e.assert})(Tt,Tt.exports);var Xo={},Qo={exports:{}};class wd extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return!0}}class hs{static fn(e){return(...r)=>new hs((n,i,s)=>{r.push(s),e(...r).then(n,i)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,n)=>{this._reject=n;const i=o=>{(!this._isCanceled||!a.shouldReject)&&(this._isPending=!1,r(o))},s=o=>{this._isPending=!1,n(o)},a=o=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(o)};return Object.defineProperties(a,{shouldReject:{get:()=>this._rejectOnCancel,set:o=>{this._rejectOnCancel=o}}}),e(i,s,a)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(const r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new wd(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(hs.prototype,Promise.prototype),Qo.exports=hs,Qo.exports.CancelError=wd;var Dn={},wn={},Jo={exports:{}},Zo={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});function r(i){return i.encrypted}const n=(i,s)=>{let a;typeof s=="function"?a={connect:s}:a=s;const o=typeof a.connect=="function",u=typeof a.secureConnect=="function",l=typeof a.close=="function",h=()=>{o&&a.connect(),r(i)&&u&&(i.authorized?a.secureConnect():i.authorizationError||i.once("secureConnect",a.secureConnect)),l&&i.once("close",a.close)};i.writable&&!i.connecting?h():i.connecting?i.once("connect",h):i.destroyed&&l&&a.close(i._hadError)};e.default=n,t.exports=n,t.exports.default=n})(Zo,Zo.exports),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=Zo.exports,n=Jt,i=Number(process.versions.node.split(".")[0]),s=a=>{if(a.timings)return a.timings;const o={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};a.timings=o;const u=m=>{const p=m.emit.bind(m);m.emit=(y,...b)=>(y==="error"&&(o.error=Date.now(),o.phases.total=o.error-o.start,m.emit=p),p(y,...b))};u(a);const l=()=>{o.abort=Date.now(),(!o.response||i>=13)&&(o.phases.total=Date.now()-o.start)};a.prependOnceListener("abort",l);const h=m=>{if(o.socket=Date.now(),o.phases.wait=o.socket-o.start,n.types.isProxy(m))return;const p=()=>{o.lookup=Date.now(),o.phases.dns=o.lookup-o.socket};m.prependOnceListener("lookup",p),r.default(m,{connect:()=>{o.connect=Date.now(),o.lookup===void 0&&(m.removeListener("lookup",p),o.lookup=o.connect,o.phases.dns=o.lookup-o.socket),o.phases.tcp=o.connect-o.lookup},secureConnect:()=>{o.secureConnect=Date.now(),o.phases.tls=o.secureConnect-o.connect}})};a.socket?h(a.socket):a.prependOnceListener("socket",h);const f=()=>{var m;o.upload=Date.now(),o.phases.request=o.upload-((m=o.secureConnect)!==null&&m!==void 0?m:o.connect)};return(()=>typeof a.writableFinished=="boolean"?a.writableFinished:a.finished&&a.outputSize===0&&(!a.socket||a.socket.writableLength===0))()?f():a.prependOnceListener("finish",f),a.prependOnceListener("response",m=>{o.response=Date.now(),o.phases.firstByte=o.response-o.upload,m.timings=o,u(m),m.prependOnceListener("end",()=>{o.end=Date.now(),o.phases.download=o.end-o.response,o.phases.total=o.end-o.start}),m.prependOnceListener("aborted",l)}),o};e.default=s,t.exports=s,t.exports.default=s}(Jo,Jo.exports);var eu={exports:{}};const{V4MAPPED:QA,ADDRCONFIG:JA,ALL:Ed,promises:{Resolver:_d},lookup:ZA}=$m,{promisify:tu}=Jt,eR=Xr,Hr=Symbol("cacheableLookupCreateConnection"),ru=Symbol("cacheableLookupInstance"),Sd=Symbol("expires"),tR=typeof Ed=="number",Cd=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},rR=t=>{for(const e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},Ad=()=>{let t=!1,e=!1;for(const r of Object.values(eR.networkInterfaces()))for(const n of r)if(!n.internal&&(n.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},nR=t=>Symbol.iterator in t,Rd={ttl:!0},iR={all:!0};class Td{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:n=3600,errorTtl:i=.15,resolver:s=new _d,lookup:a=ZA}={}){if(this.maxTtl=r,this.errorTtl=i,this._cache=e,this._resolver=s,this._dnsLookup=tu(a),this._resolver instanceof _d?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=tu(this._resolver.resolve4.bind(this._resolver)),this._resolve6=tu(this._resolver.resolve6.bind(this._resolver))),this._iface=Ad(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,n<1)this._fallback=!1;else{this._fallback=!0;const o=setInterval(()=>{this._hostnamesToFallback.clear()},n*1e3);o.unref&&o.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,n){if(typeof r=="function"?(n=r,r={}):typeof r=="number"&&(r={family:r}),!n)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(i=>{r.all?n(null,i):n(null,i.address,i.family,i.expires,i.ttl)},n)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let n=await this.query(e);if(r.family===6){const i=n.filter(s=>s.family===6);r.hints&QA&&(tR&&r.hints&Ed||i.length===0)?rR(n):n=i}else r.family===4&&(n=n.filter(i=>i.family===4));if(r.hints&JA){const{_iface:i}=this;n=n.filter(s=>s.family===6?i.has6:i.has4)}if(n.length===0){const i=new Error(`cacheableLookup ENOTFOUND ${e}`);throw i.code="ENOTFOUND",i.hostname=e,i}return r.all?n:n[0]}async query(e){let r=await this._cache.get(e);if(!r){const n=this._pending[e];if(n)r=await n;else{const i=this.queryAndCache(e);this._pending[e]=i;try{r=await i}finally{delete this._pending[e]}}}return r=r.map(n=>({...n})),r}async _resolve(e){const r=async l=>{try{return await l}catch(h){if(h.code==="ENODATA"||h.code==="ENOTFOUND")return[];throw h}},[n,i]=await Promise.all([this._resolve4(e,Rd),this._resolve6(e,Rd)].map(l=>r(l)));let s=0,a=0,o=0;const u=Date.now();for(const l of n)l.family=4,l.expires=u+l.ttl*1e3,s=Math.max(s,l.ttl);for(const l of i)l.family=6,l.expires=u+l.ttl*1e3,a=Math.max(a,l.ttl);return n.length>0?i.length>0?o=Math.min(s,a):o=s:o=a,{entries:[...n,...i],cacheTtl:o}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,n){if(this.maxTtl>0&&n>0){n=Math.min(n,this.maxTtl)*1e3,r[Sd]=Date.now()+n;try{await this._cache.set(e,r,n)}catch(i){this.lookupAsync=async()=>{const s=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw s.cause=i,s}}nR(this._cache)&&this._tick(n)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,iR);let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));const n=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,n),r.entries}_tick(e){const r=this._nextRemovalTime;(!r||e<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let n=1/0;const i=Date.now();for(const[s,a]of this._cache){const o=a[Sd];i>=o?this._cache.delete(s):o<n&&(n=o)}n!==1/0&&this._tick(n-i)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Cd(e),Hr in e)throw new Error("CacheableLookup has been already installed");e[Hr]=e.createConnection,e[ru]=this,e.createConnection=(r,n)=>("lookup"in r||(r.lookup=this.lookup),e[Hr](r,n))}uninstall(e){if(Cd(e),e[Hr]){if(e[ru]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[Hr],delete e[Hr],delete e[ru]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=Ad(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}}eu.exports=Td,eu.exports.default=Td;const sR="text/plain",aR="us-ascii",xd=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),oR=(t,{stripHash:e})=>{const r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:n,data:i,hash:s}=r.groups;const a=n.split(";");s=e?"":s;let o=!1;a[a.length-1]==="base64"&&(a.pop(),o=!0);const u=(a.shift()||"").toLowerCase(),h=[...a.map(f=>{let[c,m=""]=f.split("=").map(p=>p.trim());return c==="charset"&&(m=m.toLowerCase(),m===aR)?"":`${c}${m?`=${m}`:""}`}).filter(Boolean)];return o&&h.push("base64"),(h.length!==0||u&&u!==sR)&&h.unshift(u),`data:${h.join(";")},${o?i.trim():i}${s?`#${s}`:""}`},uR=(t,e)=>{if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return oR(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");const r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));const i=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&i.protocol==="https:"&&(i.protocol="http:"),e.forceHttps&&i.protocol==="http:"&&(i.protocol="https:"),e.stripAuthentication&&(i.username="",i.password=""),e.stripHash?i.hash="":e.stripTextFragment&&(i.hash=i.hash.replace(/#?:~:text.*?$/i,"")),i.pathname&&(i.pathname=i.pathname.replace(/(?<!\b(?:[a-z][a-z\d+\-.]{1,50}:))\/{2,}/g,"/")),i.pathname)try{i.pathname=decodeURI(i.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let a=i.pathname.split("/");const o=a[a.length-1];xd(o,e.removeDirectoryIndex)&&(a=a.slice(0,a.length-1),i.pathname=a.slice(1).join("/")+"/")}if(i.hostname&&(i.hostname=i.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(i.hostname)&&(i.hostname=i.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(const a of[...i.searchParams.keys()])xd(a,e.removeQueryParameters)&&i.searchParams.delete(a);e.removeQueryParameters===!0&&(i.search=""),e.sortQueryParameters&&i.searchParams.sort(),e.removeTrailingSlash&&(i.pathname=i.pathname.replace(/\/$/,""));const s=t;return t=i.toString(),!e.removeSingleSlash&&i.pathname==="/"&&!s.endsWith("/")&&i.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||i.pathname==="/")&&i.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t};var lR=uR;const cR=new Set([200,203,204,206,300,301,404,405,410,414,501]),hR=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),fR=new Set([500,502,503,504]),dR={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},pR={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function fr(t){const e=parseInt(t,10);return isFinite(e)?e:0}function mR(t){return t?fR.has(t.status):!0}function nu(t){const e={};if(!t)return e;const r=t.trim().split(/\s*,\s*/);for(const n of r){const[i,s]=n.split(/\s*=\s*/,2);e[i]=s===void 0?!0:s.replace(/^"|"$/g,"")}return e}function gR(t){let e=[];for(const r in t){const n=t[r];e.push(n===!0?r:r+"="+n)}if(!!e.length)return e.join(", ")}var yR=class{constructor(e,r,{shared:n,cacheHeuristic:i,immutableMinTimeToLive:s,ignoreCargoCult:a,_fromObject:o}={}){if(o){this._fromObject(o);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=n!==!1,this._cacheHeuristic=i!==void 0?i:.1,this._immutableMinTtl=s!==void 0?s:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=nu(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=nu(e.headers["cache-control"]),a&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":gR(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&hR.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||cR.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const r=nu(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;const r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const n of r)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){const r={};for(const n in e)dR[n]||(r[n]=e[n]);if(e.connection){const n=e.connection.trim().split(/\s*,\s*/);for(const i of n)delete r[i]}if(r.warning){const n=r.warning.split(/,/).filter(i=>!/^\s*1[0-9][0-9]/.test(i));n.length?r.warning=n.join(",").trim():delete r.warning}return r}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){const e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue();const r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return fr(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return fr(this._rescc["s-maxage"])}if(this._rescc["max-age"])return fr(this._rescc["max-age"]);const e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){const n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<r?0:Math.max(e,(n-r)/1e3)}if(this._resHeaders["last-modified"]){const n=Date.parse(this._resHeaders["last-modified"]);if(isFinite(n)&&r>n)return Math.max(e,(r-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){const e=this.maxAge()-this.age(),r=e+fr(this._rescc["stale-if-error"]),n=e+fr(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,n)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+fr(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+fr(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){const i=r["if-none-match"].split(/,/).filter(s=>!/^\s*W\//.test(s));i.length?r["if-none-match"]=i.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&mR(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let n=!1;if(r.status!==void 0&&r.status!=304?n=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?n=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?n=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?n=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(n=!0),!n)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};const i={};for(const a in this._resHeaders)i[a]=a in r.headers&&!pR[a]?r.headers[a]:this._resHeaders[a];const s=Object.assign({},r,{status:this._status,method:this._method,headers:i});return{policy:new this.constructor(e,s,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}},iu=t=>{const e={};for(const[r,n]of Object.entries(t))e[r.toLowerCase()]=n;return e};const vR=Xe.Readable,bR=iu;class DR extends vR{constructor(e,r,n,i){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof i!="string")throw new TypeError("Argument `url` should be a string");super();this.statusCode=e,this.headers=bR(r),this.body=n,this.url=i}_read(){this.push(this.body),this.push(null)}}var wR=DR;const ER=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];var $d=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const r=new Set(Object.keys(t).concat(ER)),n={};for(const i of r)i in e||(n[i]={get(){const s=t[i];return typeof s=="function"?s.bind(t):s},set(s){t[i]=s},enumerable:!0,configurable:!1});return Object.defineProperties(e,n),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e};const _R=Xe.PassThrough,SR=$d,CR=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");const e=new _R;return SR(t,e),t.pipe(e)};var AR=CR,su={};su.stringify=function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",n=Array.isArray(e);r=n?"[":"{";var i=!0;for(var s in e){var a=typeof e[s]=="function"||!n&&typeof e[s]>"u";Object.hasOwnProperty.call(e,s)&&!a&&(i||(r+=","),i=!1,n?e[s]==null?r+="null":r+=t(e[s]):e[s]!==void 0&&(r+=t(s)+":"+t(e[s])))}return r+=n?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)},su.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})};const RR=Ut,Od=su;BigInt.prototype.toJSON=function(){return this.toString()};const TR=t=>{const e={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd"};if(t.adapter||t.uri){const r=t.adapter||/^[^:]*/.exec(t.uri)[0];return new(Pm(e[r]))(t)}return new Map};class xR extends RR{constructor(e,r){super();if(this.opts=Object.assign({namespace:"keyv",serialize:Od.stringify,deserialize:Od.parse},typeof e=="string"?{uri:e}:e,r),!this.opts.store){const n=Object.assign({},this.opts);this.opts.store=TR(n)}typeof this.opts.store.on=="function"&&this.opts.store.on("error",n=>this.emit("error",n)),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,r){const n=this._getKeyPrefix(e),{store:i}=this.opts;return Promise.resolve().then(()=>i.get(n)).then(s=>typeof s=="string"?this.opts.deserialize(s):s).then(s=>{if(s!=null){if(typeof s.expires=="number"&&Date.now()>s.expires){this.delete(e);return}return r&&r.raw?s:s.value}})}set(e,r,n){const i=this._getKeyPrefix(e);typeof n>"u"&&(n=this.opts.ttl),n===0&&(n=void 0);const{store:s}=this.opts;return Promise.resolve().then(()=>{const a=typeof n=="number"?Date.now()+n:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:a},this.opts.serialize(r)}).then(a=>s.set(i,a,n)).then(()=>!0)}delete(e){const r=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then(()=>n.delete(r))}clear(){const{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}}var $R=xR;const OR=Ut,zi=Qr,FR=lR,PR=Tr.exports,au=yR,Fd=wR,kR=iu,IR=AR,LR=$R;class jt{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new LR({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,n)=>{let i;if(typeof r=="string")i=ou(zi.parse(r)),r={};else if(r instanceof zi.URL)i=ou(zi.parse(r.toString())),r={};else{const[f,...c]=(r.path||"").split("?"),m=c.length>0?`?${c.join("?")}`:"";i=ou({...r,pathname:f,search:m})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...BR(i)},r.headers=kR(r.headers);const s=new OR,a=FR(zi.format(i),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),o=`${r.method}:${a}`;let u=!1,l=!1;const h=f=>{l=!0;let c=!1,m;const p=new Promise(b=>{m=()=>{c||(c=!0,b())}}),y=b=>{if(u&&!f.forceRefresh){b.status=b.statusCode;const _=au.fromObject(u.cachePolicy).revalidatedPolicy(f,b);if(!_.modified){const R=_.policy.responseHeaders();b=new Fd(u.statusCode,R,u.body,u.url),b.cachePolicy=_.policy,b.fromCache=!0}}b.fromCache||(b.cachePolicy=new au(f,b,f),b.fromCache=!1);let D;f.cache&&b.cachePolicy.storable()?(D=IR(b),(async()=>{try{const _=PR.buffer(b);if(await Promise.race([p,new Promise(d=>b.once("end",d))]),c)return;const R=await _,S={cachePolicy:b.cachePolicy.toObject(),url:b.url,statusCode:b.fromCache?u.statusCode:b.statusCode,body:R};let v=f.strictTtl?b.cachePolicy.timeToLive():void 0;f.maxTtl&&(v=v?Math.min(v,f.maxTtl):f.maxTtl),await this.cache.set(o,S,v)}catch(_){s.emit("error",new jt.CacheError(_))}})()):f.cache&&u&&(async()=>{try{await this.cache.delete(o)}catch(_){s.emit("error",new jt.CacheError(_))}})(),s.emit("response",D||b),typeof n=="function"&&n(D||b)};try{const b=e(f,y);b.once("error",m),b.once("abort",m),s.emit("request",b)}catch(b){s.emit("error",new jt.RequestError(b))}};return(async()=>{const f=async m=>{await Promise.resolve();const p=m.cache?await this.cache.get(o):void 0;if(typeof p>"u")return h(m);const y=au.fromObject(p.cachePolicy);if(y.satisfiesWithoutRevalidation(m)&&!m.forceRefresh){const b=y.responseHeaders(),D=new Fd(p.statusCode,b,p.body,p.url);D.cachePolicy=y,D.fromCache=!0,s.emit("response",D),typeof n=="function"&&n(D)}else u=p,m.headers=y.revalidationHeaders(m),h(m)},c=m=>s.emit("error",new jt.CacheError(m));this.cache.once("error",c),s.on("response",()=>this.cache.removeListener("error",c));try{await f(r)}catch(m){r.automaticFailover&&!l&&h(r),s.emit("error",new jt.CacheError(m))}})(),s}}}function BR(t){const e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function ou(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}jt.RequestError=class extends Error{constructor(t){super(t.message);this.name="RequestError",Object.assign(this,t)}},jt.CacheError=class extends Error{constructor(t){super(t.message);this.name="CacheError",Object.assign(this,t)}};var NR=jt;const{Transform:MR,PassThrough:jR}=Xe,uu=Om,HR=$d;var UR=t=>{const e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;const r=e==="br";if(r&&typeof uu.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let n=!0;const i=new MR({transform(o,u,l){n=!1,l(null,o)},flush(o){o()}}),s=new jR({autoDestroy:!1,destroy(o,u){t.destroy(),u(o)}}),a=r?uu.createBrotliDecompress():uu.createUnzip();return a.once("error",o=>{if(n&&!t.readable){s.end();return}s.destroy(o)}),HR(t,s),t.pipe(i).pipe(a).pipe(s),s};class qR{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){this.cache.set(e,r),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){const r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(const r of this.oldCache.keys())this.cache.has(r)||e++;return this._size+e}}var Pd=qR;const GR=Ut,zR=cl,VR=bs,WR=Pd,We=Symbol("currentStreamsCount"),kd=Symbol("request"),ct=Symbol("cachedOriginSet"),Ur=Symbol("gracefullyClosing"),YR=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],KR=(t,e,r)=>{let n=0,i=t.length;for(;n<i;){const s=n+i>>>1;r(t[s],e)?n=s+1:i=s}return n},XR=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,lu=(t,e)=>{for(const r of t)r[ct].length<e[ct].length&&r[ct].every(n=>e[ct].includes(n))&&r[We]+e[We]<=e.remoteSettings.maxConcurrentStreams&&Ld(r)},QR=(t,e)=>{for(const r of t)e[ct].length<r[ct].length&&e[ct].every(n=>r[ct].includes(n))&&e[We]+r[We]<=r.remoteSettings.maxConcurrentStreams&&Ld(e)},Id=({agent:t,isFree:e})=>{const r={};for(const n in t.sessions){const s=t.sessions[n].filter(a=>{const o=a[Qt.kCurrentStreamsCount]<a.remoteSettings.maxConcurrentStreams;return e?o:!o});s.length!==0&&(r[n]=s)}return r},Ld=t=>{t[Ur]=!0,t[We]===0&&t.close()};class Qt extends GR{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:n=10,maxCachedTlsSessions:i=100}={}){super();this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=n,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new WR({maxSize:i})}static normalizeOrigin(e,r){return typeof e=="string"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r="";if(e)for(const n of YR)e[n]&&(r+=`:${e[n]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;const n=this.queue[e][r];this._sessionsCount<this.maxSessions&&!n.completed&&(n.completed=!0,n())}getSession(e,r,n){return new Promise((i,s)=>{Array.isArray(n)?(n=[...n],i()):n=[{resolve:i,reject:s}];const a=this.normalizeOptions(r),o=Qt.normalizeOrigin(e,r&&r.servername);if(o===void 0){for(const{reject:h}of n)h(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(a in this.sessions){const h=this.sessions[a];let f=-1,c=-1,m;for(const p of h){const y=p.remoteSettings.maxConcurrentStreams;if(y<f)break;if(p[ct].includes(o)){const b=p[We];if(b>=y||p[Ur]||p.destroyed)continue;m||(f=y),b>c&&(m=p,c=b)}}if(m){if(n.length!==1){for(const{reject:p}of n){const y=new Error(`Expected the length of listeners to be 1, got ${n.length}.
|
|
119
|
+
Please report this to https://github.com/szmarczak/http2-wrapper/`);p(y)}return}n[0].resolve(m);return}}if(a in this.queue){if(o in this.queue[a]){this.queue[a][o].listeners.push(...n),this._tryToCreateNewSession(a,o);return}}else this.queue[a]={};const u=()=>{a in this.queue&&this.queue[a][o]===l&&(delete this.queue[a][o],Object.keys(this.queue[a]).length===0&&delete this.queue[a])},l=()=>{const h=`${o}:${a}`;let f=!1;try{const c=VR.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(h),...r});c[We]=0,c[Ur]=!1;const m=()=>c[We]<c.remoteSettings.maxConcurrentStreams;let p=!0;c.socket.once("session",b=>{this.tlsSessionCache.set(h,b)}),c.once("error",b=>{for(const{reject:D}of n)D(b);this.tlsSessionCache.delete(h)}),c.setTimeout(this.timeout,()=>{c.destroy()}),c.once("close",()=>{if(f){p&&this._freeSessionsCount--,this._sessionsCount--;const b=this.sessions[a];b.splice(b.indexOf(c),1),b.length===0&&delete this.sessions[a]}else{const b=new Error("Session closed without receiving a SETTINGS frame");b.code="HTTP2WRAPPER_NOSETTINGS";for(const{reject:D}of n)D(b);u()}this._tryToCreateNewSession(a,o)});const y=()=>{if(!(!(a in this.queue)||!m())){for(const b of c[ct])if(b in this.queue[a]){const{listeners:D}=this.queue[a][b];for(;D.length!==0&&m();)D.shift().resolve(c);const _=this.queue[a];if(_[b].listeners.length===0&&(delete _[b],Object.keys(_).length===0)){delete this.queue[a];break}if(!m())break}}};c.on("origin",()=>{c[ct]=c.originSet,!!m()&&(y(),lu(this.sessions[a],c))}),c.once("remoteSettings",()=>{if(c.ref(),c.unref(),this._sessionsCount++,l.destroyed){const b=new Error("Agent has been destroyed");for(const D of n)D.reject(b);c.destroy();return}c[ct]=c.originSet;{const b=this.sessions;if(a in b){const D=b[a];D.splice(KR(D,c,XR),0,c)}else b[a]=[c]}this._freeSessionsCount+=1,f=!0,this.emit("session",c),y(),u(),c[We]===0&&this._freeSessionsCount>this.maxFreeSessions&&c.close(),n.length!==0&&(this.getSession(o,r,n),n.length=0),c.on("remoteSettings",()=>{y(),lu(this.sessions[a],c)})}),c[kd]=c.request,c.request=(b,D)=>{if(c[Ur])throw new Error("The session is gracefully closing. No new streams are allowed.");const _=c[kd](b,D);return c.ref(),++c[We],c[We]===c.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,_.once("close",()=>{if(p=m(),--c[We],!c.destroyed&&!c.closed&&(QR(this.sessions[a],c),m()&&!c.closed)){p||(this._freeSessionsCount++,p=!0);const R=c[We]===0;R&&c.unref(),R&&(this._freeSessionsCount>this.maxFreeSessions||c[Ur])?c.close():(lu(this.sessions[a],c),y())}}),_}}catch(c){for(const m of n)m.reject(c);u()}};l.listeners=n,l.completed=!1,l.destroyed=!1,this.queue[a][o]=l,this._tryToCreateNewSession(a,o)})}request(e,r,n,i){return new Promise((s,a)=>{this.getSession(e,r,[{reject:a,resolve:o=>{try{s(o.request(n,i))}catch(u){a(u)}}}])})}createConnection(e,r){return Qt.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];const n=e.port||443,i=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=i),zR.connect(n,i,r)}closeFreeSessions(){for(const e of Object.values(this.sessions))for(const r of e)r[We]===0&&r.close()}destroy(e){for(const r of Object.values(this.sessions))for(const n of r)n.destroy(e);for(const r of Object.values(this.queue))for(const n of Object.values(r))n.destroyed=!0;this.queue={}}get freeSessions(){return Id({agent:this,isFree:!0})}get busySessions(){return Id({agent:this,isFree:!1})}}Qt.kCurrentStreamsCount=We,Qt.kGracefullyClosing=Ur;var Bd={Agent:Qt,globalAgent:new Qt};const{Readable:JR}=Xe;class ZR extends JR{constructor(e,r){super({highWaterMark:r,autoDestroy:!1});this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}}var Nd=ZR,Md=t=>{const e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e},eT=(t,e,r)=>{for(const n of r)t.on(n,(...i)=>e.emit(n,...i))},tT=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}},jd={exports:{}};(function(t){const e=(r,n,i)=>{t.exports[n]=class extends r{constructor(...a){super(typeof i=="string"?i:i(a));this.name=`${super.name} [${n}]`,this.code=n}}};e(TypeError,"ERR_INVALID_ARG_TYPE",r=>{const n=r[0].includes(".")?"property":"argument";let i=r[1];const s=Array.isArray(i);return s&&(i=`${i.slice(0,-1).join(", ")} or ${i.slice(-1)}`),`The "${r[0]}" ${n} must be ${s?"one of":"of"} type ${i}. Received ${typeof r[2]}`}),e(TypeError,"ERR_INVALID_PROTOCOL",r=>`Protocol "${r[0]}" not supported. Expected "${r[1]}"`),e(Error,"ERR_HTTP_HEADERS_SENT",r=>`Cannot ${r[0]} headers after they are sent to the client`),e(TypeError,"ERR_INVALID_HTTP_TOKEN",r=>`${r[0]} must be a valid HTTP token [${r[1]}]`),e(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",r=>`Invalid value "${r[0]} for header "${r[1]}"`),e(TypeError,"ERR_INVALID_CHAR",r=>`Invalid character in ${r[0]} [${r[1]}]`)})(jd);const rT=bs,{Writable:nT}=Xe,{Agent:Hd,globalAgent:iT}=Bd,sT=Nd,aT=Md,oT=eT,uT=tT,{ERR_INVALID_ARG_TYPE:cu,ERR_INVALID_PROTOCOL:lT,ERR_HTTP_HEADERS_SENT:Ud,ERR_INVALID_HTTP_TOKEN:cT,ERR_HTTP_INVALID_HEADER_VALUE:hT,ERR_INVALID_CHAR:fT}=jd.exports,{HTTP2_HEADER_STATUS:qd,HTTP2_HEADER_METHOD:Gd,HTTP2_HEADER_PATH:zd,HTTP2_METHOD_CONNECT:dT}=rT.constants,He=Symbol("headers"),hu=Symbol("origin"),fu=Symbol("session"),Vd=Symbol("options"),Vi=Symbol("flushedHeaders"),En=Symbol("jobs"),pT=/^[\^`\-\w!#$%&*+.|~]+$/,mT=/[^\t\u0020-\u007E\u0080-\u00FF]/;class gT extends nT{constructor(e,r,n){super({autoDestroy:!1});const i=typeof e=="string"||e instanceof URL;if(i&&(e=aT(e instanceof URL?e:new URL(e))),typeof r=="function"||r===void 0?(n=r,r=i?e:{...e}):r={...e,...r},r.h2session)this[fu]=r.h2session;else if(r.agent===!1)this.agent=new Hd({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new Hd({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=iT;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new cu("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new lT(r.protocol,"https:");const s=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,a=r.hostname||r.host||"localhost";delete r.hostname,delete r.host,delete r.port;const{timeout:o}=r;if(r.timeout=void 0,this[He]=Object.create(null),this[En]=[],this.socket=null,this.connection=null,this.method=r.method||"GET",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(const[u,l]of Object.entries(r.headers))this.setHeader(u,l);r.auth&&!("authorization"in this[He])&&(this[He].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[Vd]=r,s===443?(this[hu]=`https://${a}`,":authority"in this[He]||(this[He][":authority"]=a)):(this[hu]=`https://${a}:${s}`,":authority"in this[He]||(this[He][":authority"]=`${a}:${s}`)),o&&this.setTimeout(o),n&&this.once("response",n),this[Vi]=!1}get method(){return this[He][Gd]}set method(e){e&&(this[He][Gd]=e.toUpperCase())}get path(){return this[He][zd]}set path(e){e&&(this[He][zd]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,n){if(this._mustNotHaveABody){n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();const i=()=>this._request.write(e,r,n);this._request?i():this[En].push(i)}_final(e){if(this.destroyed)return;this.flushHeaders();const r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[En].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[Vi]||this.destroyed)return;this[Vi]=!0;const e=this.method===dT,r=n=>{if(this._request=n,this.destroyed){n.destroy();return}e||oT(n,this,["timeout","continue","close","error"]);const i=a=>(...o)=>{!this.writable&&!this.destroyed?a(...o):this.once("finish",()=>{a(...o)})};n.once("response",i((a,o,u)=>{const l=new sT(this.socket,n.readableHighWaterMark);this.res=l,l.req=this,l.statusCode=a[qd],l.headers=a,l.rawHeaders=u,l.once("end",()=>{this.aborted?(l.aborted=!0,l.emit("aborted")):(l.complete=!0,l.socket=null,l.connection=null)}),e?(l.upgrade=!0,this.emit("connect",l,n,Buffer.alloc(0))?this.emit("close"):n.destroy()):(n.on("data",h=>{!l._dumped&&!l.push(h)&&n.pause()}),n.once("end",()=>{l.push(null)}),this.emit("response",l)||l._dump())})),n.once("headers",i(a=>this.emit("information",{statusCode:a[qd]}))),n.once("trailers",i((a,o,u)=>{const{res:l}=this;l.trailers=a,l.rawTrailers=u}));const{socket:s}=n.session;this.socket=s,this.connection=s;for(const a of this[En])a();this.emit("socket",this.socket)};if(this[fu])try{r(this[fu].request(this[He]))}catch(n){this.emit("error",n)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[hu],this[Vd],this[He]))}catch(n){this.emit("error",n)}}}getHeader(e){if(typeof e!="string")throw new cu("name","string",e);return this[He][e.toLowerCase()]}get headersSent(){return this[Vi]}removeHeader(e){if(typeof e!="string")throw new cu("name","string",e);if(this.headersSent)throw new Ud("remove");delete this[He][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new Ud("set");if(typeof e!="string"||!pT.test(e)&&!uT(e))throw new cT("Header name",e);if(typeof r>"u")throw new hT(r,e);if(mT.test(r))throw new fT("header content",e);this[He][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){const n=()=>this._request.setTimeout(e,r);return this._request?n():this[En].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}}var Wd=gT,du={exports:{}};const yT=cl;var vT=(t={},e=yT.connect)=>new Promise((r,n)=>{let i=!1,s;const a=async()=>{await u,s.off("timeout",o),s.off("error",n),t.resolveSocket?(r({alpnProtocol:s.alpnProtocol,socket:s,timeout:i}),i&&(await Promise.resolve(),s.emit("timeout"))):(s.destroy(),r({alpnProtocol:s.alpnProtocol,timeout:i}))},o=async()=>{i=!0,a()},u=(async()=>{try{s=await e(t,a),s.on("error",n),s.once("timeout",o)}catch(l){n(l)}})()});const bT=hl;var DT=t=>{let e=t.host;const r=t.headers&&t.headers.host;return r&&(r.startsWith("[")?r.indexOf("]")===-1?e=r:e=r.slice(1,-1):e=r.split(":",1)[0]),bT.isIP(e)?"":e};const Yd=Mn,pu=vs,wT=vT,ET=Pd,_T=Wd,ST=DT,CT=Md,Wi=new ET({maxSize:100}),_n=new Map,Kd=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};const n=()=>{t.emit("free",e,r)};e.on("free",n);const i=()=>{t.removeSocket(e,r)};e.on("close",i);const s=()=>{t.removeSocket(e,r),e.off("close",i),e.off("free",n),e.off("agentRemove",s)};e.on("agentRemove",s),t.emit("free",e,r)},AT=async t=>{const e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!Wi.has(e)){if(_n.has(e))return(await _n.get(e)).alpnProtocol;const{path:r,agent:n}=t;t.path=t.socketPath;const i=wT(t);_n.set(e,i);try{const{socket:s,alpnProtocol:a}=await i;if(Wi.set(e,a),t.path=r,a==="h2")s.destroy();else{const{globalAgent:o}=pu,u=pu.Agent.prototype.createConnection;n?n.createConnection===u?Kd(n,s,t):s.destroy():o.createConnection===u?Kd(o,s,t):s.destroy()}return _n.delete(e),a}catch(s){throw _n.delete(e),s}}return Wi.get(e)};du.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=CT(new URL(t))),typeof e=="function"&&(r=e,e=void 0),e={ALPNProtocols:["h2","http/1.1"],...t,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";const n=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||ST(e),e.port=e.port||(n?443:80),e._defaultAgent=n?pu.globalAgent:Yd.globalAgent;const i=e.agent;if(i){if(i.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=i[n?"https":"http"]}return n&&await AT(e)==="h2"?(i&&(e.agent=i.http2),new _T(e,r)):Yd.request(e,r)},du.exports.protocolCache=Wi;const RT=bs,TT=Bd,mu=Wd,xT=Nd,$T=du.exports,OT=(t,e,r)=>new mu(t,e,r),FT=(t,e,r)=>{const n=new mu(t,e,r);return n.end(),n};var PT={...RT,ClientRequest:mu,IncomingMessage:xT,...TT,request:OT,get:FT,auto:$T},gu={},Yi={};Object.defineProperty(Yi,"__esModule",{value:!0});const Xd=Tt.exports;Yi.default=t=>Xd.default.nodeStream(t)&&Xd.default.function_(t.getBoundary),Object.defineProperty(gu,"__esModule",{value:!0});const Qd=Je,Jd=Jt,Zd=Tt.exports,kT=Yi,IT=Jd.promisify(Qd.stat);gu.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(Zd.default.string(t))return Buffer.byteLength(t);if(Zd.default.buffer(t))return t.length;if(kT.default(t))return Jd.promisify(t.getLength.bind(t))();if(t instanceof Qd.ReadStream){const{size:r}=await IT(t.path);return r===0?void 0:r}};var Ki={};Object.defineProperty(Ki,"__esModule",{value:!0});function LT(t,e,r){const n={};for(const i of r)n[i]=(...s)=>{e.emit(i,...s)},t.on(i,n[i]);return()=>{for(const i of r)t.off(i,n[i])}}Ki.default=LT;var Sn={},yu={};Object.defineProperty(yu,"__esModule",{value:!0}),yu.default=()=>{const t=[];return{once(e,r,n){e.once(r,n),t.push({origin:e,event:r,fn:n})},unhandleAll(){for(const e of t){const{origin:r,event:n,fn:i}=e;r.removeListener(n,i)}t.length=0}}},Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.TimeoutError=void 0;const BT=hl,NT=yu,ep=Symbol("reentry"),MT=()=>{};class tp extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`);this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}}Sn.TimeoutError=tp,Sn.default=(t,e,r)=>{if(ep in t)return MT;t[ep]=!0;const n=[],{once:i,unhandleAll:s}=NT.default(),a=(f,c,m)=>{var p;const y=setTimeout(c,f,f,m);(p=y.unref)===null||p===void 0||p.call(y);const b=()=>{clearTimeout(y)};return n.push(b),b},{host:o,hostname:u}=r,l=(f,c)=>{t.destroy(new tp(f,c))},h=()=>{for(const f of n)f();s()};if(t.once("error",f=>{if(h(),t.listenerCount("error")===0)throw f}),t.once("close",h),i(t,"response",f=>{i(f,"end",h)}),typeof e.request<"u"&&a(e.request,l,"request"),typeof e.socket<"u"){const f=()=>{l(e.socket,"socket")};t.setTimeout(e.socket,f),n.push(()=>{t.removeListener("timeout",f)})}return i(t,"socket",f=>{var c;const{socketPath:m}=t;if(f.connecting){const p=Boolean(m??BT.isIP((c=u??o)!==null&&c!==void 0?c:"")!==0);if(typeof e.lookup<"u"&&!p&&typeof f.address().address>"u"){const y=a(e.lookup,l,"lookup");i(f,"lookup",y)}if(typeof e.connect<"u"){const y=()=>a(e.connect,l,"connect");p?i(f,"connect",y()):i(f,"lookup",b=>{b===null&&i(f,"connect",y())})}typeof e.secureConnect<"u"&&r.protocol==="https:"&&i(f,"connect",()=>{const y=a(e.secureConnect,l,"secureConnect");i(f,"secureConnect",y)})}if(typeof e.send<"u"){const p=()=>a(e.send,l,"send");f.connecting?i(f,"connect",()=>{i(t,"upload-complete",p())}):i(t,"upload-complete",p())}}),typeof e.response<"u"&&i(t,"upload-complete",()=>{const f=a(e.response,l,"response");i(t,"response",f)}),h};var vu={};Object.defineProperty(vu,"__esModule",{value:!0});const rp=Tt.exports;vu.default=t=>{t=t;const e={protocol:t.protocol,hostname:rp.default.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return rp.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e};var bu={};Object.defineProperty(bu,"__esModule",{value:!0});const jT=Qr,HT=["protocol","host","hostname","port","pathname","search"];bu.default=(t,e)=>{var r,n;if(e.path){if(e.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(e.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(e.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(e.search&&e.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!t){if(!e.protocol)throw new TypeError("No URL protocol specified");t=`${e.protocol}//${(n=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&n!==void 0?n:""}`}const i=new jT.URL(t);if(e.path){const s=e.path.indexOf("?");s===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,s),e.search=e.path.slice(s+1)),delete e.path}for(const s of HT)e[s]&&(i[s]=e[s].toString());return i};var Du={};Object.defineProperty(Du,"__esModule",{value:!0});class UT{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}}Du.default=UT;var Xi={};Object.defineProperty(Xi,"__esModule",{value:!0});const qT=async t=>{const e=[];let r=0;for await(const n of t)e.push(n),r+=Buffer.byteLength(n);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(""))};Xi.default=qT;var np={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.dnsLookupIpVersionToFamily=t.isDnsLookupIpVersion=void 0;const e={auto:0,ipv4:4,ipv6:6};t.isDnsLookupIpVersion=r=>r in e,t.dnsLookupIpVersionToFamily=r=>{if(t.isDnsLookupIpVersion(r))return e[r];throw new Error("Invalid DNS lookup IP version")}})(np);var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.isResponseOk=void 0,Cn.isResponseOk=t=>{const{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304};var wu={};Object.defineProperty(wu,"__esModule",{value:!0});const ip=new Set;wu.default=t=>{ip.has(t)||(ip.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))};var Eu={};Object.defineProperty(Eu,"__esModule",{value:!0});const ce=Tt.exports,GT=(t,e)=>{if(ce.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");ce.assert.any([ce.default.string,ce.default.undefined],t.encoding),ce.assert.any([ce.default.boolean,ce.default.undefined],t.resolveBodyOnly),ce.assert.any([ce.default.boolean,ce.default.undefined],t.methodRewriting),ce.assert.any([ce.default.boolean,ce.default.undefined],t.isStream),ce.assert.any([ce.default.string,ce.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType="text");const{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:n=>n.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},ce.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(n=>n.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):ce.default.number(r)&&(t.retry.limit=r),ce.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(ce.default.number))),ce.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});const{pagination:n}=t;if(!ce.default.function_(n.transform))throw new Error("`options.pagination.transform` must be implemented");if(!ce.default.function_(n.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!ce.default.function_(n.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!ce.default.function_(n.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return t.responseType==="json"&&t.headers.accept===void 0&&(t.headers.accept="application/json"),t};Eu.default=GT;var An={};Object.defineProperty(An,"__esModule",{value:!0}),An.retryAfterStatusCodes=void 0,An.retryAfterStatusCodes=new Set([413,429,503]);const zT=({attemptCount:t,retryOptions:e,error:r,retryAfter:n})=>{if(t>e.limit)return 0;const i=e.methods.includes(r.options.method),s=e.errorCodes.includes(r.code),a=r.response&&e.statusCodes.includes(r.response.statusCode);if(!i||!s&&!a)return 0;if(r.response){if(n)return e.maxRetryAfter===void 0||n>e.maxRetryAfter?0:n;if(r.response.statusCode===413)return 0}const o=Math.random()*100;return 2**(t-1)*1e3+o};An.default=zT,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedProtocolError=t.ReadError=t.TimeoutError=t.UploadError=t.CacheError=t.HTTPError=t.MaxRedirectsError=t.RequestError=t.setNonEnumerableProperties=t.knownHookEvents=t.withoutBody=t.kIsNormalizedAlready=void 0;const e=Jt,r=Xe,n=Je,i=Qr,s=Mn,a=Mn,o=vs,u=Jo.exports,l=eu.exports,h=NR,f=UR,c=PT,m=iu,p=Tt.exports,y=gu,b=Yi,D=Ki,_=Sn,R=vu,S=bu,v=Du,d=Xi,w=np,x=Cn,$=wu,j=Eu,A=An;let I;const B=Symbol("request"),J=Symbol("response"),C=Symbol("responseSize"),T=Symbol("downloadedSize"),re=Symbol("bodySize"),q=Symbol("uploadedSize"),xe=Symbol("serverResponsesPiped"),qe=Symbol("unproxyEvents"),ye=Symbol("isFromCache"),nt=Symbol("cancelTimeouts"),br=Symbol("startedReading"),ht=Symbol("stopReading"),it=Symbol("triggerRead"),G=Symbol("body"),Et=Symbol("jobs"),Ln=Symbol("originalResponse"),k=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const ie=p.default.string(process.versions.brotli);t.withoutBody=new Set(["GET","HEAD"]),t.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function P(De){for(const E in De){const g=De[E];if(!p.default.string(g)&&!p.default.number(g)&&!p.default.boolean(g)&&!p.default.null_(g)&&!p.default.undefined(g))throw new TypeError(`The \`searchParams\` value '${String(g)}' must be a string, number, boolean or null`)}}function Y(De){return p.default.object(De)&&!("statusCode"in De)}const se=new v.default,$e=async De=>new Promise((E,g)=>{const O=H=>{g(H)};De.pending||E(),De.once("error",O),De.once("ready",()=>{De.off("error",O),E()})}),be=new Set([300,301,302,303,304,307,308]),Kr=["context","body","json","form"];t.setNonEnumerableProperties=(De,E)=>{const g={};for(const O of De)if(!!O)for(const H of Kr)H in O&&(g[H]={writable:!0,configurable:!0,enumerable:!1,value:O[H]});Object.defineProperties(E,g)};class me extends Error{constructor(E,g,O){var H,N;super(E);if(Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=(H=g.code)!==null&&H!==void 0?H:"ERR_GOT_REQUEST_ERROR",O instanceof el?(Object.defineProperty(this,"request",{enumerable:!1,value:O}),Object.defineProperty(this,"response",{enumerable:!1,value:O[J]}),Object.defineProperty(this,"options",{enumerable:!1,value:O.options})):Object.defineProperty(this,"options",{enumerable:!1,value:O}),this.timings=(N=this.request)===null||N===void 0?void 0:N.timings,p.default.string(g.stack)&&p.default.string(this.stack)){const F=this.stack.indexOf(this.message)+this.message.length,M=this.stack.slice(F).split(`
|
|
120
120
|
`).reverse(),U=g.stack.slice(g.stack.indexOf(g.message)+g.message.length).split(`
|
|
121
121
|
`).reverse();for(;U.length!==0&&U[0]===M[0];)M.shift();this.stack=`${this.stack.slice(0,F)}${M.reverse().join(`
|
|
122
122
|
`)}${U.reverse().join(`
|
|
123
|
-
`)}`}}}t.RequestError=me;class Mu extends me{constructor(E){super(`Redirected ${E.options.maxRedirects} times. Aborting.`,{},E);this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}}t.MaxRedirectsError=Mu;class ju extends me{constructor(E){super(`Response code ${E.statusCode} (${E.statusMessage})`,{},E.request);this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}}t.HTTPError=ju;class Hu extends me{constructor(E,g){super(E.message,E,g);this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}}t.CacheError=Hu;class Uu extends me{constructor(E,g){super(E.message,E,g);this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}}t.UploadError=Uu;class qu extends me{constructor(E,g,O){super(E.message,E,O);this.name="TimeoutError",this.event=E.event,this.timings=g}}t.TimeoutError=qu;class us extends me{constructor(E,g){super(E.message,E,g);this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}}t.ReadError=us;class Gu extends me{constructor(E){super(`Unsupported protocol "${E.url.protocol}"`,{},E);this.name="UnsupportedProtocolError",this.code="ERR_UNSUPPORTED_PROTOCOL"}}t.UnsupportedProtocolError=Gu;const Zp=["socket","connect","continue","information","upgrade","timeout"];class zu extends r.Duplex{constructor(E,g={},O){super({autoDestroy:!1,highWaterMark:0});this[x]=0,this[q]=0,this.requestInitialized=!1,this[xe]=new Set,this.redirects=[],this[lt]=!1,this[nt]=!1,this[Dt]=[],this.retryCount=0,this._progressCallbacks=[];const H=()=>this._unlockWrite(),N=()=>this._lockWrite();this.on("pipe",Y=>{Y.prependListener("data",H),Y.on("data",N),Y.prependListener("end",H),Y.on("end",N)}),this.on("unpipe",Y=>{Y.off("data",H),Y.off("data",N),Y.off("end",H),Y.off("end",N)}),this.on("pipe",Y=>{Y instanceof a.IncomingMessage&&(this.options.headers={...Y.headers,...this.options.headers})});const{json:F,body:M,form:U}=g;if((F||M||U)&&this._lockWrite(),t.kIsNormalizedAlready in g)this.options=g;else try{this.options=this.constructor.normalizeArguments(E,g,O)}catch(Y){p.default.nodeStream(g.body)&&g.body.destroy(),this.destroy(Y);return}(async()=>{var Y;try{this.options.body instanceof n.ReadStream&&await Te(this.options.body);const{url:Le}=this.options;if(!Le)throw new TypeError("Missing `url` property");if(this.requestUrl=Le.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(Y=this[B])===null||Y===void 0||Y.destroy();return}for(const qe of this[Dt])qe();this[Dt].length=0,this.requestInitialized=!0}catch(Le){if(Le instanceof me){this._beforeError(Le);return}this.destroyed||this.destroy(Le)}})()}static normalizeArguments(E,g,O){var H,N,F,M,U;const Y=g;if(p.default.object(E)&&!p.default.urlInstance(E))g={...O,...E,...g};else{if(E&&g&&g.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");g={...O,...g},E!==void 0&&(g.url=E),p.default.urlInstance(g.url)&&(g.url=new i.URL(g.url.toString()))}if(g.cache===!1&&(g.cache=void 0),g.dnsCache===!1&&(g.dnsCache=void 0),p.assert.any([p.default.string,p.default.undefined],g.method),p.assert.any([p.default.object,p.default.undefined],g.headers),p.assert.any([p.default.string,p.default.urlInstance,p.default.undefined],g.prefixUrl),p.assert.any([p.default.object,p.default.undefined],g.cookieJar),p.assert.any([p.default.object,p.default.string,p.default.undefined],g.searchParams),p.assert.any([p.default.object,p.default.string,p.default.undefined],g.cache),p.assert.any([p.default.object,p.default.number,p.default.undefined],g.timeout),p.assert.any([p.default.object,p.default.undefined],g.context),p.assert.any([p.default.object,p.default.undefined],g.hooks),p.assert.any([p.default.boolean,p.default.undefined],g.decompress),p.assert.any([p.default.boolean,p.default.undefined],g.ignoreInvalidCookies),p.assert.any([p.default.boolean,p.default.undefined],g.followRedirect),p.assert.any([p.default.number,p.default.undefined],g.maxRedirects),p.assert.any([p.default.boolean,p.default.undefined],g.throwHttpErrors),p.assert.any([p.default.boolean,p.default.undefined],g.http2),p.assert.any([p.default.boolean,p.default.undefined],g.allowGetBody),p.assert.any([p.default.string,p.default.undefined],g.localAddress),p.assert.any([w.isDnsLookupIpVersion,p.default.undefined],g.dnsLookupIpVersion),p.assert.any([p.default.object,p.default.undefined],g.https),p.assert.any([p.default.boolean,p.default.undefined],g.rejectUnauthorized),g.https&&(p.assert.any([p.default.boolean,p.default.undefined],g.https.rejectUnauthorized),p.assert.any([p.default.function_,p.default.undefined],g.https.checkServerIdentity),p.assert.any([p.default.string,p.default.object,p.default.array,p.default.undefined],g.https.certificateAuthority),p.assert.any([p.default.string,p.default.object,p.default.array,p.default.undefined],g.https.key),p.assert.any([p.default.string,p.default.object,p.default.array,p.default.undefined],g.https.certificate),p.assert.any([p.default.string,p.default.undefined],g.https.passphrase),p.assert.any([p.default.string,p.default.buffer,p.default.array,p.default.undefined],g.https.pfx)),p.assert.any([p.default.object,p.default.undefined],g.cacheOptions),p.default.string(g.method)?g.method=g.method.toUpperCase():g.method="GET",g.headers===(O==null?void 0:O.headers)?g.headers={...g.headers}:g.headers=m({...O==null?void 0:O.headers,...g.headers}),"slashes"in g)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in g)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in g&&g.searchParams&&g.searchParams!==(O==null?void 0:O.searchParams)){let z;if(p.default.string(g.searchParams)||g.searchParams instanceof i.URLSearchParams)z=new i.URLSearchParams(g.searchParams);else{P(g.searchParams),z=new i.URLSearchParams;for(const ve in g.searchParams){const Ae=g.searchParams[ve];Ae===null?z.append(ve,""):Ae!==void 0&&z.append(ve,Ae)}}(H=O==null?void 0:O.searchParams)===null||H===void 0||H.forEach((ve,Ae)=>{z.has(Ae)||z.append(Ae,ve)}),g.searchParams=z}if(g.username=(N=g.username)!==null&&N!==void 0?N:"",g.password=(F=g.password)!==null&&F!==void 0?F:"",p.default.undefined(g.prefixUrl)?g.prefixUrl=(M=O==null?void 0:O.prefixUrl)!==null&&M!==void 0?M:"":(g.prefixUrl=g.prefixUrl.toString(),g.prefixUrl!==""&&!g.prefixUrl.endsWith("/")&&(g.prefixUrl+="/")),p.default.string(g.url)){if(g.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");g.url=S.default(g.prefixUrl+g.url,g)}else(p.default.undefined(g.url)&&g.prefixUrl!==""||g.protocol)&&(g.url=S.default(g.prefixUrl,g));if(g.url){"port"in g&&delete g.port;let{prefixUrl:z}=g;Object.defineProperty(g,"prefixUrl",{set:Ae=>{const ne=g.url;if(!ne.href.startsWith(Ae))throw new Error(`Cannot change \`prefixUrl\` from ${z} to ${Ae}: ${ne.href}`);g.url=new i.URL(Ae+ne.href.slice(z.length)),z=Ae},get:()=>z});let{protocol:ve}=g.url;if(ve==="unix:"&&(ve="http:",g.url=new i.URL(`http://unix${g.url.pathname}${g.url.search}`)),g.searchParams&&(g.url.search=g.searchParams.toString()),ve!=="http:"&&ve!=="https:")throw new Gu(g);g.username===""?g.username=g.url.username:g.url.username=g.username,g.password===""?g.password=g.url.password:g.url.password=g.password}const{cookieJar:Le}=g;if(Le){let{setCookie:z,getCookieString:ve}=Le;p.assert.function_(z),p.assert.function_(ve),z.length===4&&ve.length===0&&(z=e.promisify(z.bind(g.cookieJar)),ve=e.promisify(ve.bind(g.cookieJar)),g.cookieJar={setCookie:z,getCookieString:ve})}const{cache:qe}=g;if(qe&&(se.has(qe)||se.set(qe,new h((z,ve)=>{const Ae=z[B](z,ve);return p.default.promise(Ae)&&(Ae.once=(ne,Z)=>{if(ne==="error")Ae.catch(Z);else if(ne==="abort")(async()=>{try{(await Ae).once("abort",Z)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${ne}`);return Ae}),Ae},qe))),g.cacheOptions={...g.cacheOptions},g.dnsCache===!0)I||(I=new l.default),g.dnsCache=I;else if(!p.default.undefined(g.dnsCache)&&!g.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${p.default(g.dnsCache)}`);p.default.number(g.timeout)?g.timeout={request:g.timeout}:O&&g.timeout!==O.timeout?g.timeout={...O.timeout,...g.timeout}:g.timeout={...g.timeout},g.context||(g.context={});const On=g.hooks===(O==null?void 0:O.hooks);g.hooks={...g.hooks};for(const z of t.knownHookEvents)if(z in g.hooks)if(p.default.array(g.hooks[z]))g.hooks[z]=[...g.hooks[z]];else throw new TypeError(`Parameter \`${z}\` must be an Array, got ${p.default(g.hooks[z])}`);else g.hooks[z]=[];if(O&&!On)for(const z of t.knownHookEvents)O.hooks[z].length>0&&(g.hooks[z]=[...O.hooks[z],...g.hooks[z]]);if("family"in g&&$.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),(O==null?void 0:O.https)&&(g.https={...O.https,...g.https}),"rejectUnauthorized"in g&&$.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in g&&$.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in g&&$.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in g&&$.default('"options.key" was never documented, please use "options.https.key"'),"cert"in g&&$.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in g&&$.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in g&&$.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in g)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(g.agent){for(const z in g.agent)if(z!=="http"&&z!=="https"&&z!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${z}\``)}return g.maxRedirects=(U=g.maxRedirects)!==null&&U!==void 0?U:0,t.setNonEnumerableProperties([O,Y],g),j.default(g,O)}_lockWrite(){const E=()=>{throw new TypeError("The payload has been already provided")};this.write=E,this.end=E}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){const{options:E}=this,{headers:g}=E,O=!p.default.undefined(E.form),H=!p.default.undefined(E.json),N=!p.default.undefined(E.body),F=O||H||N,M=t.withoutBody.has(E.method)&&!(E.method==="GET"&&E.allowGetBody);if(this._cannotHaveBody=M,F){if(M)throw new TypeError(`The \`${E.method}\` method cannot be used with a body`);if([N,O,H].filter(U=>U).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(N&&!(E.body instanceof r.Readable)&&!p.default.string(E.body)&&!p.default.buffer(E.body)&&!b.default(E.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(O&&!p.default.object(E.form))throw new TypeError("The `form` option must be an Object");{const U=!p.default.string(g["content-type"]);N?(b.default(E.body)&&U&&(g["content-type"]=`multipart/form-data; boundary=${E.body.getBoundary()}`),this[G]=E.body):O?(U&&(g["content-type"]="application/x-www-form-urlencoded"),this[G]=new i.URLSearchParams(E.form).toString()):(U&&(g["content-type"]="application/json"),this[G]=E.stringifyJson(E.json));const Y=await y.default(this[G],E.headers);p.default.undefined(g["content-length"])&&p.default.undefined(g["transfer-encoding"])&&!M&&!p.default.undefined(Y)&&(g["content-length"]=String(Y))}}else M?this._lockWrite():this._unlockWrite();this[re]=Number(g["content-length"])||void 0}async _onResponseBase(E){const{options:g}=this,{url:O}=g;this[$n]=E,g.decompress&&(E=f(E));const H=E.statusCode,N=E;N.statusMessage=N.statusMessage?N.statusMessage:s.STATUS_CODES[H],N.url=g.url.toString(),N.requestUrl=this.requestUrl,N.redirectUrls=this.redirects,N.request=this,N.isFromCache=E.fromCache||!1,N.ip=this.ip,N.retryCount=this.retryCount,this[ye]=N.isFromCache,this[C]=Number(E.headers["content-length"])||void 0,this[J]=E,E.once("end",()=>{this[C]=this[x],this.emit("downloadProgress",this.downloadProgress)}),E.once("error",M=>{E.destroy(),this._beforeError(new us(M,this))}),E.once("aborted",()=>{this._beforeError(new us({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);const F=E.headers["set-cookie"];if(p.default.object(g.cookieJar)&&F){let M=F.map(async U=>g.cookieJar.setCookie(U,O.toString()));g.ignoreInvalidCookies&&(M=M.map(async U=>U.catch(()=>{})));try{await Promise.all(M)}catch(U){this._beforeError(U);return}}if(g.followRedirect&&E.headers.location&&be.has(H)){if(E.resume(),this[B]&&(this[rt](),delete this[B],this[Ue]()),(H===303&&g.method!=="GET"&&g.method!=="HEAD"||!g.methodRewriting)&&(g.method="GET","body"in g&&delete g.body,"json"in g&&delete g.json,"form"in g&&delete g.form,this[G]=void 0,delete g.headers["content-length"]),this.redirects.length>=g.maxRedirects){this._beforeError(new Mu(this));return}try{const U=Buffer.from(E.headers.location,"binary").toString(),Y=new i.URL(U,O),Le=Y.toString();decodeURI(Le),Y.hostname!==O.hostname||Y.port!==O.port?("host"in g.headers&&delete g.headers.host,"cookie"in g.headers&&delete g.headers.cookie,"authorization"in g.headers&&delete g.headers.authorization,(g.username||g.password)&&(g.username="",g.password="")):(Y.username=g.username,Y.password=g.password),this.redirects.push(Le),g.url=Y;for(const qe of g.hooks.beforeRedirect)await qe(g,N);this.emit("redirect",N,g),await this._makeRequest()}catch(U){this._beforeError(U);return}return}if(g.isStream&&g.throwHttpErrors&&!T.isResponseOk(N)){this._beforeError(new ju(N));return}E.on("readable",()=>{this[nt]&&this._read()}),this.on("resume",()=>{E.resume()}),this.on("pause",()=>{E.pause()}),E.once("end",()=>{this.push(null)}),this.emit("response",E);for(const M of this[xe])if(!M.headersSent){for(const U in E.headers){const Y=g.decompress?U!=="content-encoding":!0,Le=E.headers[U];Y&&M.setHeader(U,Le)}M.statusCode=H}}async _onResponse(E){try{await this._onResponseBase(E)}catch(g){this._beforeError(g)}}_onRequest(E){const{options:g}=this,{timeout:O,url:H}=g;u.default(E),this[rt]=_.default(E,O,H);const N=g.cache?"cacheableResponse":"response";E.once(N,U=>{this._onResponse(U)}),E.once("error",U=>{var Y;E.destroy(),(Y=E.res)===null||Y===void 0||Y.removeAllListeners("end"),U=U instanceof _.TimeoutError?new qu(U,this.timings,this):new me(U.message,U,this),this._beforeError(U)}),this[Ue]=D.default(E,this,Zp),this[B]=E,this.emit("uploadProgress",this.uploadProgress);const F=this[G],M=this.redirects.length===0?this:E;p.default.nodeStream(F)?(F.pipe(M),F.once("error",U=>{this._beforeError(new Uu(U,this))})):(this._unlockWrite(),p.default.undefined(F)?(this._cannotHaveBody||this._noPipe)&&(M.end(),this._lockWrite()):(this._writeRequest(F,void 0,()=>{}),M.end(),this._lockWrite())),this.emit("request",E)}async _createCacheableRequest(E,g){return new Promise((O,H)=>{Object.assign(g,R.default(E)),delete g.url;let N;const F=se.get(g.cache)(g,async M=>{M._readableState.autoDestroy=!1,N&&(await N).emit("cacheableResponse",M),O(M)});g.url=E,F.once("error",H),F.once("request",async M=>{N=M,O(N)})})}async _makeRequest(){var E,g,O,H,N;const{options:F}=this,{headers:M}=F;for(const Z in M)if(p.default.undefined(M[Z]))delete M[Z];else if(p.default.null_(M[Z]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${Z}\` header`);if(F.decompress&&p.default.undefined(M["accept-encoding"])&&(M["accept-encoding"]=ie?"gzip, deflate, br":"gzip, deflate"),F.cookieJar){const Z=await F.cookieJar.getCookieString(F.url.toString());p.default.nonEmptyString(Z)&&(F.headers.cookie=Z)}for(const Z of F.hooks.beforeRequest){const yr=await Z(F);if(!p.default.undefined(yr)){F.request=()=>yr;break}}F.body&&this[G]!==F.body&&(this[G]=F.body);const{agent:U,request:Y,timeout:Le,url:qe}=F;if(F.dnsCache&&!("lookup"in F)&&(F.lookup=F.dnsCache.lookup),qe.hostname==="unix"){const Z=/(?<socketPath>.+?):(?<path>.+)/.exec(`${qe.pathname}${qe.search}`);if(Z==null?void 0:Z.groups){const{socketPath:yr,path:em}=Z.groups;Object.assign(F,{socketPath:yr,path:em,host:""})}}const On=qe.protocol==="https:";let z;F.http2?z=c.auto:z=On?o.request:s.request;const ve=(E=F.request)!==null&&E!==void 0?E:z,Ae=F.cache?this._createCacheableRequest:ve;U&&!F.http2&&(F.agent=U[On?"https":"http"]),F[B]=ve,delete F.request,delete F.timeout;const ne=F;if(ne.shared=(g=F.cacheOptions)===null||g===void 0?void 0:g.shared,ne.cacheHeuristic=(O=F.cacheOptions)===null||O===void 0?void 0:O.cacheHeuristic,ne.immutableMinTimeToLive=(H=F.cacheOptions)===null||H===void 0?void 0:H.immutableMinTimeToLive,ne.ignoreCargoCult=(N=F.cacheOptions)===null||N===void 0?void 0:N.ignoreCargoCult,F.dnsLookupIpVersion!==void 0)try{ne.family=w.dnsLookupIpVersionToFamily(F.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}F.https&&("rejectUnauthorized"in F.https&&(ne.rejectUnauthorized=F.https.rejectUnauthorized),F.https.checkServerIdentity&&(ne.checkServerIdentity=F.https.checkServerIdentity),F.https.certificateAuthority&&(ne.ca=F.https.certificateAuthority),F.https.certificate&&(ne.cert=F.https.certificate),F.https.key&&(ne.key=F.https.key),F.https.passphrase&&(ne.passphrase=F.https.passphrase),F.https.pfx&&(ne.pfx=F.https.pfx));try{let Z=await Ae(qe,ne);p.default.undefined(Z)&&(Z=z(qe,ne)),F.request=Y,F.timeout=Le,F.agent=U,F.https&&("rejectUnauthorized"in F.https&&delete ne.rejectUnauthorized,F.https.checkServerIdentity&&delete ne.checkServerIdentity,F.https.certificateAuthority&&delete ne.ca,F.https.certificate&&delete ne.cert,F.https.key&&delete ne.key,F.https.passphrase&&delete ne.passphrase,F.https.pfx&&delete ne.pfx),K(Z)?this._onRequest(Z):this.writable?(this.once("finish",()=>{this._onResponse(Z)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(Z)}catch(Z){throw Z instanceof h.CacheError?new Hu(Z,this):new me(Z.message,Z,this)}}async _error(E){try{for(const g of this.options.hooks.beforeError)E=await g(E)}catch(g){E=new me(g.message,g,this)}this.destroy(E)}_beforeError(E){if(this[lt])return;const{options:g}=this,O=this.retryCount+1;this[lt]=!0,E instanceof me||(E=new me(E.message,E,this));const H=E,{response:N}=H;(async()=>{if(N&&!N.body){N.setEncoding(this._readableState.encoding);try{N.rawBody=await d.default(N),N.body=N.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let F;try{let M;N&&"retry-after"in N.headers&&(M=Number(N.headers["retry-after"]),Number.isNaN(M)?(M=Date.parse(N.headers["retry-after"])-Date.now(),M<=0&&(M=1)):M*=1e3),F=await g.retry.calculateDelay({attemptCount:O,retryOptions:g.retry,error:H,retryAfter:M,computedValue:A.default({attemptCount:O,retryOptions:g.retry,error:H,retryAfter:M,computedValue:0})})}catch(M){this._error(new me(M.message,M,this));return}if(F){const M=async()=>{try{for(const U of this.options.hooks.beforeRetry)await U(this.options,H,O)}catch(U){this._error(new me(U.message,E,this));return}this.destroyed||(this.destroy(),this.emit("retry",O,E))};this[k]=setTimeout(M,F);return}}this._error(H)})()}_read(){this[nt]=!0;const E=this[J];if(E&&!this[lt]){E.readableLength&&(this[nt]=!1);let g;for(;(g=E.read())!==null;){this[x]+=g.length,this[gr]=!0;const O=this.downloadProgress;O.percent<1&&this.emit("downloadProgress",O),this.push(g)}}}_write(E,g,O){const H=()=>{this._writeRequest(E,g,O)};this.requestInitialized?H():this[Dt].push(H)}_writeRequest(E,g,O){this[B].destroyed||(this._progressCallbacks.push(()=>{this[q]+=Buffer.byteLength(E,g);const H=this.uploadProgress;H.percent<1&&this.emit("uploadProgress",H)}),this[B].write(E,g,H=>{!H&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),O(H)}))}_final(E){const g=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(B in this)){E();return}if(this[B].destroyed){E();return}this[B].end(O=>{O||(this[re]=this[q],this.emit("uploadProgress",this.uploadProgress),this[B].emit("upload-complete")),E(O)})};this.requestInitialized?g():this[Dt].push(g)}_destroy(E,g){var O;this[lt]=!0,clearTimeout(this[k]),B in this&&(this[rt](),((O=this[J])===null||O===void 0?void 0:O.complete)||this[B].destroy()),E!==null&&!p.default.undefined(E)&&!(E instanceof me)&&(E=new me(E.message,E,this)),g(E)}get _isAboutToError(){return this[lt]}get ip(){var E;return(E=this.socket)===null||E===void 0?void 0:E.remoteAddress}get aborted(){var E,g,O;return((g=(E=this[B])===null||E===void 0?void 0:E.destroyed)!==null&&g!==void 0?g:this.destroyed)&&!((O=this[$n])===null||O===void 0?void 0:O.complete)}get socket(){var E,g;return(g=(E=this[B])===null||E===void 0?void 0:E.socket)!==null&&g!==void 0?g:void 0}get downloadProgress(){let E;return this[C]?E=this[x]/this[C]:this[C]===this[x]?E=1:E=0,{percent:E,transferred:this[x],total:this[C]}}get uploadProgress(){let E;return this[re]?E=this[q]/this[re]:this[re]===this[q]?E=1:E=0,{percent:E,transferred:this[q],total:this[re]}}get timings(){var E;return(E=this[B])===null||E===void 0?void 0:E.timings}get isFromCache(){return this[ye]}pipe(E,g){if(this[gr])throw new Error("Failed to pipe. The response has been emitted already.");return E instanceof a.ServerResponse&&this[xe].add(E),super.pipe(E,g)}unpipe(E){return E instanceof a.ServerResponse&&this[xe].delete(E),super.unpipe(E),this}}t.default=zu}(mn),function(t){var e=le&&le.__createBinding||(Object.create?function(a,o,u,l){l===void 0&&(l=u),Object.defineProperty(a,l,{enumerable:!0,get:function(){return o[u]}})}:function(a,o,u,l){l===void 0&&(l=u),a[l]=o[u]}),r=le&&le.__exportStar||function(a,o){for(var u in a)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&e(o,a,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.CancelError=t.ParseError=void 0;const n=mn;class i extends n.RequestError{constructor(o,u){const{options:l}=u.request;super(`${o.message} in "${l.url.toString()}"`,o,u.request);this.name="ParseError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_BODY_PARSE_FAILURE":this.code}}t.ParseError=i;class s extends n.RequestError{constructor(o){super("Promise was canceled",{},o);this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}}t.CancelError=s,r(mn,t)}(pn);var du={};Object.defineProperty(du,"__esModule",{value:!0});const Vd=pn,Tx=(t,e,r,n)=>{const{rawBody:i}=t;try{if(e==="text")return i.toString(n);if(e==="json")return i.length===0?"":r(i.toString());if(e==="buffer")return i;throw new Vd.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(s){throw new Vd.ParseError(s,t)}};du.default=Tx,function(t){var e=le&&le.__createBinding||(Object.create?function(p,y,b,D){D===void 0&&(D=b),Object.defineProperty(p,D,{enumerable:!0,get:function(){return y[b]}})}:function(p,y,b,D){D===void 0&&(D=b),p[D]=y[b]}),r=le&&le.__exportStar||function(p,y){for(var b in p)b!=="default"&&!Object.prototype.hasOwnProperty.call(y,b)&&e(y,p,b)};Object.defineProperty(t,"__esModule",{value:!0});const n=jt,i=At.exports,s=Ho.exports,a=pn,o=du,u=mn,l=Gi,h=zi,f=bn,c=["request","response","redirect","uploadProgress","downloadProgress"];function m(p){let y,b;const D=new n.EventEmitter,_=new s((S,v,d)=>{const w=T=>{const $=new u.default(void 0,p);$.retryCount=T,$._noPipe=!0,d(()=>$.destroy()),d.shouldReject=!1,d(()=>v(new a.CancelError($))),y=$,$.once("response",async I=>{var B;if(I.retryCount=T,I.request.aborted)return;let J;try{J=await h.default($),I.rawBody=J}catch{return}if($._isAboutToError)return;const C=((B=I.headers["content-encoding"])!==null&&B!==void 0?B:"").toLowerCase(),x=["gzip","deflate","br"].includes(C),{options:re}=$;if(x&&!re.decompress)I.body=J;else try{I.body=o.default(I,re.responseType,re.parseJson,re.encoding)}catch(q){if(I.body=J.toString(),f.isResponseOk(I)){$._beforeError(q);return}}try{for(const[q,xe]of re.hooks.afterResponse.entries())I=await xe(I,async Ue=>{const ye=u.default.normalizeArguments(void 0,{...Ue,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},re);ye.hooks.afterResponse=ye.hooks.afterResponse.slice(0,q);for(const gr of ye.hooks.beforeRetry)await gr(ye);const rt=m(ye);return d(()=>{rt.catch(()=>{}),rt.cancel()}),rt})}catch(q){$._beforeError(new a.RequestError(q.message,q,$));return}if(!f.isResponseOk(I)){$._beforeError(new a.HTTPError(I));return}b=I,S($.options.resolveBodyOnly?I.body:I)});const j=I=>{if(_.isCanceled)return;const{options:B}=$;if(I instanceof a.HTTPError&&!B.throwHttpErrors){const{response:J}=I;S($.options.resolveBodyOnly?J.body:J);return}v(I)};$.once("error",j);const A=$.options.body;$.once("retry",(I,B)=>{var J,C;if(A===((J=B.request)===null||J===void 0?void 0:J.options.body)&&i.default.nodeStream((C=B.request)===null||C===void 0?void 0:C.options.body)){j(B);return}w(I)}),l.default($,D,c)};w(0)});_.on=(S,v)=>(D.on(S,v),_);const R=S=>{const v=(async()=>{await _;const{options:d}=b.request;return o.default(b,S,d.parseJson,d.encoding)})();return Object.defineProperties(v,Object.getOwnPropertyDescriptors(_)),v};return _.json=()=>{const{headers:S}=y.options;return!y.writableFinished&&S.accept===void 0&&(S.accept="application/json"),R("json")},_.buffer=()=>R("buffer"),_.text=()=>R("text"),_}t.default=m,r(pn,t)}(jo);var pu={};Object.defineProperty(pu,"__esModule",{value:!0});const $x=pn;function Ox(t,...e){const r=(async()=>{if(t instanceof $x.RequestError)try{for(const i of e)if(i)for(const s of i)t=await s(t)}catch(i){t=i}throw t})(),n=()=>r;return r.json=n,r.text=n,r.buffer=n,r.on=n,r}pu.default=Ox;var mu={};Object.defineProperty(mu,"__esModule",{value:!0});const Wd=At.exports;function Kd(t){for(const e of Object.values(t))(Wd.default.plainObject(e)||Wd.default.array(e))&&Kd(e);return Object.freeze(t)}mu.default=Kd;var Yd={};Object.defineProperty(Yd,"__esModule",{value:!0}),function(t){var e=le&&le.__createBinding||(Object.create?function(D,_,R,S){S===void 0&&(S=R),Object.defineProperty(D,S,{enumerable:!0,get:function(){return _[R]}})}:function(D,_,R,S){S===void 0&&(S=R),D[S]=_[R]}),r=le&&le.__exportStar||function(D,_){for(var R in D)R!=="default"&&!Object.prototype.hasOwnProperty.call(_,R)&&e(_,D,R)};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultHandler=void 0;const n=At.exports,i=jo,s=pu,a=mn,o=mu,u={RequestError:i.RequestError,CacheError:i.CacheError,ReadError:i.ReadError,HTTPError:i.HTTPError,MaxRedirectsError:i.MaxRedirectsError,TimeoutError:i.TimeoutError,ParseError:i.ParseError,CancelError:i.CancelError,UnsupportedProtocolError:i.UnsupportedProtocolError,UploadError:i.UploadError},l=async D=>new Promise(_=>{setTimeout(_,D)}),{normalizeArguments:h}=a.default,f=(...D)=>{let _;for(const R of D)_=h(void 0,R,_);return _},c=D=>D.isStream?new a.default(void 0,D):i.default(D),m=D=>"defaults"in D&&"options"in D.defaults,p=["get","post","put","patch","head","delete"];t.defaultHandler=(D,_)=>_(D);const y=(D,_)=>{if(D)for(const R of D)R(_)},b=D=>{D._rawHandlers=D.handlers,D.handlers=D.handlers.map(S=>(v,d)=>{let w;const T=S(v,$=>(w=d($),w));if(T!==w&&!v.isStream&&w){const $=T,{then:j,catch:A,finally:I}=$;Object.setPrototypeOf($,Object.getPrototypeOf(w)),Object.defineProperties($,Object.getOwnPropertyDescriptors(w)),$.then=j,$.catch=A,$.finally=I}return T});const _=(S,v={},d)=>{var w,T;let $=0;const j=A=>D.handlers[$++](A,$===D.handlers.length?c:j);if(n.default.plainObject(S)){const A={...S,...v};a.setNonEnumerableProperties([S,v],A),v=A,S=void 0}try{let A;try{y(D.options.hooks.init,v),y((w=v.hooks)===null||w===void 0?void 0:w.init,v)}catch(B){A=B}const I=h(S,v,d??D.options);if(I[a.kIsNormalizedAlready]=!0,A)throw new i.RequestError(A.message,A,I);return j(I)}catch(A){if(v.isStream)throw A;return s.default(A,D.options.hooks.beforeError,(T=v.hooks)===null||T===void 0?void 0:T.beforeError)}};_.extend=(...S)=>{const v=[D.options];let d=[...D._rawHandlers],w;for(const T of S)m(T)?(v.push(T.defaults.options),d.push(...T.defaults._rawHandlers),w=T.defaults.mutableDefaults):(v.push(T),"handlers"in T&&d.push(...T.handlers),w=T.mutableDefaults);return d=d.filter(T=>T!==t.defaultHandler),d.length===0&&d.push(t.defaultHandler),b({options:f(...v),handlers:d,mutableDefaults:Boolean(w)})};const R=async function*(S,v){let d=h(S,v,D.options);d.resolveBodyOnly=!1;const w=d.pagination;if(!n.default.object(w))throw new TypeError("`options.pagination` must be implemented");const T=[];let{countLimit:$}=w,j=0;for(;j<w.requestLimit;){j!==0&&await l(w.backoff);const A=await _(void 0,void 0,d),I=await w.transform(A),B=[];for(const C of I)if(w.filter(C,T,B)&&(!w.shouldContinue(C,T,B)||(yield C,w.stackAllItems&&T.push(C),B.push(C),--$<=0)))return;const J=w.paginate(A,T,B);if(J===!1)return;J===A.request.options?d=A.request.options:J!==void 0&&(d=h(void 0,J,d)),j++}};_.paginate=R,_.paginate.all=async(S,v)=>{const d=[];for await(const w of R(S,v))d.push(w);return d},_.paginate.each=R,_.stream=(S,v)=>_(S,{...v,isStream:!0});for(const S of p)_[S]=(v,d)=>_(v,{...d,method:S}),_.stream[S]=(v,d)=>_(v,{...d,method:S,isStream:!0});return Object.assign(_,u),Object.defineProperty(_,"defaults",{value:D.mutableDefaults?D:o.default(D),writable:D.mutableDefaults,configurable:D.mutableDefaults,enumerable:!0}),_.mergeOptions=f,_};t.default=b,r(Yd,t)}(Mo),function(t,e){var r=le&&le.__createBinding||(Object.create?function(u,l,h,f){f===void 0&&(f=h),Object.defineProperty(u,f,{enumerable:!0,get:function(){return l[h]}})}:function(u,l,h,f){f===void 0&&(f=h),u[f]=l[h]}),n=le&&le.__exportStar||function(u,l){for(var h in u)h!=="default"&&!Object.prototype.hasOwnProperty.call(l,h)&&r(l,u,h)};Object.defineProperty(e,"__esModule",{value:!0});const i=Vr,s=Mo,a={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:u})=>u},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:u=>u.request.options.responseType==="json"?u.body:JSON.parse(u.body),paginate:u=>{if(!Reflect.has(u.headers,"link"))return!1;const l=u.headers.link.split(",");let h;for(const f of l){const c=f.split(";");if(c[1].includes("next")){h=c[0].trimStart().trim(),h=h.slice(1,-1);break}}return h?{url:new i.URL(h)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:u=>JSON.parse(u),stringifyJson:u=>JSON.stringify(u),cacheOptions:{}},handlers:[s.defaultHandler],mutableDefaults:!1},o=s.default(a);e.default=o,t.exports=o,t.exports.default=o,t.exports.__esModule=!0,n(Mo,e),n(jo,e)}(No,No.exports);var gu={exports:{}},Mr={},cr={};cr.parse=cr.decode=Fx,cr.stringify=cr.encode=Xd,cr.safe=jr,cr.unsafe=Vi;var yu=typeof process<"u"&&process.platform==="win32"?`\r
|
|
123
|
+
`)}`}}}t.RequestError=me;class Yu extends me{constructor(E){super(`Redirected ${E.options.maxRedirects} times. Aborting.`,{},E);this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}}t.MaxRedirectsError=Yu;class Ku extends me{constructor(E){super(`Response code ${E.statusCode} (${E.statusMessage})`,{},E.request);this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}}t.HTTPError=Ku;class Xu extends me{constructor(E,g){super(E.message,E,g);this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}}t.CacheError=Xu;class Qu extends me{constructor(E,g){super(E.message,E,g);this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}}t.UploadError=Qu;class Ju extends me{constructor(E,g,O){super(E.message,E,O);this.name="TimeoutError",this.event=E.event,this.timings=g}}t.TimeoutError=Ju;class ds extends me{constructor(E,g){super(E.message,E,g);this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}}t.ReadError=ds;class Zu extends me{constructor(E){super(`Unsupported protocol "${E.url.protocol}"`,{},E);this.name="UnsupportedProtocolError",this.code="ERR_UNSUPPORTED_PROTOCOL"}}t.UnsupportedProtocolError=Zu;const dm=["socket","connect","continue","information","upgrade","timeout"];class el extends r.Duplex{constructor(E,g={},O){super({autoDestroy:!1,highWaterMark:0});this[T]=0,this[q]=0,this.requestInitialized=!1,this[xe]=new Set,this.redirects=[],this[ht]=!1,this[it]=!1,this[Et]=[],this.retryCount=0,this._progressCallbacks=[];const H=()=>this._unlockWrite(),N=()=>this._lockWrite();this.on("pipe",K=>{K.prependListener("data",H),K.on("data",N),K.prependListener("end",H),K.on("end",N)}),this.on("unpipe",K=>{K.off("data",H),K.off("data",N),K.off("end",H),K.off("end",N)}),this.on("pipe",K=>{K instanceof a.IncomingMessage&&(this.options.headers={...K.headers,...this.options.headers})});const{json:F,body:M,form:U}=g;if((F||M||U)&&this._lockWrite(),t.kIsNormalizedAlready in g)this.options=g;else try{this.options=this.constructor.normalizeArguments(E,g,O)}catch(K){p.default.nodeStream(g.body)&&g.body.destroy(),this.destroy(K);return}(async()=>{var K;try{this.options.body instanceof n.ReadStream&&await $e(this.options.body);const{url:Be}=this.options;if(!Be)throw new TypeError("Missing `url` property");if(this.requestUrl=Be.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(K=this[B])===null||K===void 0||K.destroy();return}for(const Ge of this[Et])Ge();this[Et].length=0,this.requestInitialized=!0}catch(Be){if(Be instanceof me){this._beforeError(Be);return}this.destroyed||this.destroy(Be)}})()}static normalizeArguments(E,g,O){var H,N,F,M,U;const K=g;if(p.default.object(E)&&!p.default.urlInstance(E))g={...O,...E,...g};else{if(E&&g&&g.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");g={...O,...g},E!==void 0&&(g.url=E),p.default.urlInstance(g.url)&&(g.url=new i.URL(g.url.toString()))}if(g.cache===!1&&(g.cache=void 0),g.dnsCache===!1&&(g.dnsCache=void 0),p.assert.any([p.default.string,p.default.undefined],g.method),p.assert.any([p.default.object,p.default.undefined],g.headers),p.assert.any([p.default.string,p.default.urlInstance,p.default.undefined],g.prefixUrl),p.assert.any([p.default.object,p.default.undefined],g.cookieJar),p.assert.any([p.default.object,p.default.string,p.default.undefined],g.searchParams),p.assert.any([p.default.object,p.default.string,p.default.undefined],g.cache),p.assert.any([p.default.object,p.default.number,p.default.undefined],g.timeout),p.assert.any([p.default.object,p.default.undefined],g.context),p.assert.any([p.default.object,p.default.undefined],g.hooks),p.assert.any([p.default.boolean,p.default.undefined],g.decompress),p.assert.any([p.default.boolean,p.default.undefined],g.ignoreInvalidCookies),p.assert.any([p.default.boolean,p.default.undefined],g.followRedirect),p.assert.any([p.default.number,p.default.undefined],g.maxRedirects),p.assert.any([p.default.boolean,p.default.undefined],g.throwHttpErrors),p.assert.any([p.default.boolean,p.default.undefined],g.http2),p.assert.any([p.default.boolean,p.default.undefined],g.allowGetBody),p.assert.any([p.default.string,p.default.undefined],g.localAddress),p.assert.any([w.isDnsLookupIpVersion,p.default.undefined],g.dnsLookupIpVersion),p.assert.any([p.default.object,p.default.undefined],g.https),p.assert.any([p.default.boolean,p.default.undefined],g.rejectUnauthorized),g.https&&(p.assert.any([p.default.boolean,p.default.undefined],g.https.rejectUnauthorized),p.assert.any([p.default.function_,p.default.undefined],g.https.checkServerIdentity),p.assert.any([p.default.string,p.default.object,p.default.array,p.default.undefined],g.https.certificateAuthority),p.assert.any([p.default.string,p.default.object,p.default.array,p.default.undefined],g.https.key),p.assert.any([p.default.string,p.default.object,p.default.array,p.default.undefined],g.https.certificate),p.assert.any([p.default.string,p.default.undefined],g.https.passphrase),p.assert.any([p.default.string,p.default.buffer,p.default.array,p.default.undefined],g.https.pfx)),p.assert.any([p.default.object,p.default.undefined],g.cacheOptions),p.default.string(g.method)?g.method=g.method.toUpperCase():g.method="GET",g.headers===(O==null?void 0:O.headers)?g.headers={...g.headers}:g.headers=m({...O==null?void 0:O.headers,...g.headers}),"slashes"in g)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in g)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in g&&g.searchParams&&g.searchParams!==(O==null?void 0:O.searchParams)){let z;if(p.default.string(g.searchParams)||g.searchParams instanceof i.URLSearchParams)z=new i.URLSearchParams(g.searchParams);else{P(g.searchParams),z=new i.URLSearchParams;for(const ve in g.searchParams){const Ae=g.searchParams[ve];Ae===null?z.append(ve,""):Ae!==void 0&&z.append(ve,Ae)}}(H=O==null?void 0:O.searchParams)===null||H===void 0||H.forEach((ve,Ae)=>{z.has(Ae)||z.append(Ae,ve)}),g.searchParams=z}if(g.username=(N=g.username)!==null&&N!==void 0?N:"",g.password=(F=g.password)!==null&&F!==void 0?F:"",p.default.undefined(g.prefixUrl)?g.prefixUrl=(M=O==null?void 0:O.prefixUrl)!==null&&M!==void 0?M:"":(g.prefixUrl=g.prefixUrl.toString(),g.prefixUrl!==""&&!g.prefixUrl.endsWith("/")&&(g.prefixUrl+="/")),p.default.string(g.url)){if(g.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");g.url=S.default(g.prefixUrl+g.url,g)}else(p.default.undefined(g.url)&&g.prefixUrl!==""||g.protocol)&&(g.url=S.default(g.prefixUrl,g));if(g.url){"port"in g&&delete g.port;let{prefixUrl:z}=g;Object.defineProperty(g,"prefixUrl",{set:Ae=>{const ne=g.url;if(!ne.href.startsWith(Ae))throw new Error(`Cannot change \`prefixUrl\` from ${z} to ${Ae}: ${ne.href}`);g.url=new i.URL(Ae+ne.href.slice(z.length)),z=Ae},get:()=>z});let{protocol:ve}=g.url;if(ve==="unix:"&&(ve="http:",g.url=new i.URL(`http://unix${g.url.pathname}${g.url.search}`)),g.searchParams&&(g.url.search=g.searchParams.toString()),ve!=="http:"&&ve!=="https:")throw new Zu(g);g.username===""?g.username=g.url.username:g.url.username=g.username,g.password===""?g.password=g.url.password:g.url.password=g.password}const{cookieJar:Be}=g;if(Be){let{setCookie:z,getCookieString:ve}=Be;p.assert.function_(z),p.assert.function_(ve),z.length===4&&ve.length===0&&(z=e.promisify(z.bind(g.cookieJar)),ve=e.promisify(ve.bind(g.cookieJar)),g.cookieJar={setCookie:z,getCookieString:ve})}const{cache:Ge}=g;if(Ge&&(se.has(Ge)||se.set(Ge,new h((z,ve)=>{const Ae=z[B](z,ve);return p.default.promise(Ae)&&(Ae.once=(ne,Z)=>{if(ne==="error")Ae.catch(Z);else if(ne==="abort")(async()=>{try{(await Ae).once("abort",Z)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${ne}`);return Ae}),Ae},Ge))),g.cacheOptions={...g.cacheOptions},g.dnsCache===!0)I||(I=new l.default),g.dnsCache=I;else if(!p.default.undefined(g.dnsCache)&&!g.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${p.default(g.dnsCache)}`);p.default.number(g.timeout)?g.timeout={request:g.timeout}:O&&g.timeout!==O.timeout?g.timeout={...O.timeout,...g.timeout}:g.timeout={...g.timeout},g.context||(g.context={});const Bn=g.hooks===(O==null?void 0:O.hooks);g.hooks={...g.hooks};for(const z of t.knownHookEvents)if(z in g.hooks)if(p.default.array(g.hooks[z]))g.hooks[z]=[...g.hooks[z]];else throw new TypeError(`Parameter \`${z}\` must be an Array, got ${p.default(g.hooks[z])}`);else g.hooks[z]=[];if(O&&!Bn)for(const z of t.knownHookEvents)O.hooks[z].length>0&&(g.hooks[z]=[...O.hooks[z],...g.hooks[z]]);if("family"in g&&$.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),(O==null?void 0:O.https)&&(g.https={...O.https,...g.https}),"rejectUnauthorized"in g&&$.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in g&&$.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in g&&$.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in g&&$.default('"options.key" was never documented, please use "options.https.key"'),"cert"in g&&$.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in g&&$.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in g&&$.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in g)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(g.agent){for(const z in g.agent)if(z!=="http"&&z!=="https"&&z!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${z}\``)}return g.maxRedirects=(U=g.maxRedirects)!==null&&U!==void 0?U:0,t.setNonEnumerableProperties([O,K],g),j.default(g,O)}_lockWrite(){const E=()=>{throw new TypeError("The payload has been already provided")};this.write=E,this.end=E}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){const{options:E}=this,{headers:g}=E,O=!p.default.undefined(E.form),H=!p.default.undefined(E.json),N=!p.default.undefined(E.body),F=O||H||N,M=t.withoutBody.has(E.method)&&!(E.method==="GET"&&E.allowGetBody);if(this._cannotHaveBody=M,F){if(M)throw new TypeError(`The \`${E.method}\` method cannot be used with a body`);if([N,O,H].filter(U=>U).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(N&&!(E.body instanceof r.Readable)&&!p.default.string(E.body)&&!p.default.buffer(E.body)&&!b.default(E.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(O&&!p.default.object(E.form))throw new TypeError("The `form` option must be an Object");{const U=!p.default.string(g["content-type"]);N?(b.default(E.body)&&U&&(g["content-type"]=`multipart/form-data; boundary=${E.body.getBoundary()}`),this[G]=E.body):O?(U&&(g["content-type"]="application/x-www-form-urlencoded"),this[G]=new i.URLSearchParams(E.form).toString()):(U&&(g["content-type"]="application/json"),this[G]=E.stringifyJson(E.json));const K=await y.default(this[G],E.headers);p.default.undefined(g["content-length"])&&p.default.undefined(g["transfer-encoding"])&&!M&&!p.default.undefined(K)&&(g["content-length"]=String(K))}}else M?this._lockWrite():this._unlockWrite();this[re]=Number(g["content-length"])||void 0}async _onResponseBase(E){const{options:g}=this,{url:O}=g;this[Ln]=E,g.decompress&&(E=f(E));const H=E.statusCode,N=E;N.statusMessage=N.statusMessage?N.statusMessage:s.STATUS_CODES[H],N.url=g.url.toString(),N.requestUrl=this.requestUrl,N.redirectUrls=this.redirects,N.request=this,N.isFromCache=E.fromCache||!1,N.ip=this.ip,N.retryCount=this.retryCount,this[ye]=N.isFromCache,this[C]=Number(E.headers["content-length"])||void 0,this[J]=E,E.once("end",()=>{this[C]=this[T],this.emit("downloadProgress",this.downloadProgress)}),E.once("error",M=>{E.destroy(),this._beforeError(new ds(M,this))}),E.once("aborted",()=>{this._beforeError(new ds({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);const F=E.headers["set-cookie"];if(p.default.object(g.cookieJar)&&F){let M=F.map(async U=>g.cookieJar.setCookie(U,O.toString()));g.ignoreInvalidCookies&&(M=M.map(async U=>U.catch(()=>{})));try{await Promise.all(M)}catch(U){this._beforeError(U);return}}if(g.followRedirect&&E.headers.location&&be.has(H)){if(E.resume(),this[B]&&(this[nt](),delete this[B],this[qe]()),(H===303&&g.method!=="GET"&&g.method!=="HEAD"||!g.methodRewriting)&&(g.method="GET","body"in g&&delete g.body,"json"in g&&delete g.json,"form"in g&&delete g.form,this[G]=void 0,delete g.headers["content-length"]),this.redirects.length>=g.maxRedirects){this._beforeError(new Yu(this));return}try{const U=Buffer.from(E.headers.location,"binary").toString(),K=new i.URL(U,O),Be=K.toString();decodeURI(Be),K.hostname!==O.hostname||K.port!==O.port?("host"in g.headers&&delete g.headers.host,"cookie"in g.headers&&delete g.headers.cookie,"authorization"in g.headers&&delete g.headers.authorization,(g.username||g.password)&&(g.username="",g.password="")):(K.username=g.username,K.password=g.password),this.redirects.push(Be),g.url=K;for(const Ge of g.hooks.beforeRedirect)await Ge(g,N);this.emit("redirect",N,g),await this._makeRequest()}catch(U){this._beforeError(U);return}return}if(g.isStream&&g.throwHttpErrors&&!x.isResponseOk(N)){this._beforeError(new Ku(N));return}E.on("readable",()=>{this[it]&&this._read()}),this.on("resume",()=>{E.resume()}),this.on("pause",()=>{E.pause()}),E.once("end",()=>{this.push(null)}),this.emit("response",E);for(const M of this[xe])if(!M.headersSent){for(const U in E.headers){const K=g.decompress?U!=="content-encoding":!0,Be=E.headers[U];K&&M.setHeader(U,Be)}M.statusCode=H}}async _onResponse(E){try{await this._onResponseBase(E)}catch(g){this._beforeError(g)}}_onRequest(E){const{options:g}=this,{timeout:O,url:H}=g;u.default(E),this[nt]=_.default(E,O,H);const N=g.cache?"cacheableResponse":"response";E.once(N,U=>{this._onResponse(U)}),E.once("error",U=>{var K;E.destroy(),(K=E.res)===null||K===void 0||K.removeAllListeners("end"),U=U instanceof _.TimeoutError?new Ju(U,this.timings,this):new me(U.message,U,this),this._beforeError(U)}),this[qe]=D.default(E,this,dm),this[B]=E,this.emit("uploadProgress",this.uploadProgress);const F=this[G],M=this.redirects.length===0?this:E;p.default.nodeStream(F)?(F.pipe(M),F.once("error",U=>{this._beforeError(new Qu(U,this))})):(this._unlockWrite(),p.default.undefined(F)?(this._cannotHaveBody||this._noPipe)&&(M.end(),this._lockWrite()):(this._writeRequest(F,void 0,()=>{}),M.end(),this._lockWrite())),this.emit("request",E)}async _createCacheableRequest(E,g){return new Promise((O,H)=>{Object.assign(g,R.default(E)),delete g.url;let N;const F=se.get(g.cache)(g,async M=>{M._readableState.autoDestroy=!1,N&&(await N).emit("cacheableResponse",M),O(M)});g.url=E,F.once("error",H),F.once("request",async M=>{N=M,O(N)})})}async _makeRequest(){var E,g,O,H,N;const{options:F}=this,{headers:M}=F;for(const Z in M)if(p.default.undefined(M[Z]))delete M[Z];else if(p.default.null_(M[Z]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${Z}\` header`);if(F.decompress&&p.default.undefined(M["accept-encoding"])&&(M["accept-encoding"]=ie?"gzip, deflate, br":"gzip, deflate"),F.cookieJar){const Z=await F.cookieJar.getCookieString(F.url.toString());p.default.nonEmptyString(Z)&&(F.headers.cookie=Z)}for(const Z of F.hooks.beforeRequest){const Dr=await Z(F);if(!p.default.undefined(Dr)){F.request=()=>Dr;break}}F.body&&this[G]!==F.body&&(this[G]=F.body);const{agent:U,request:K,timeout:Be,url:Ge}=F;if(F.dnsCache&&!("lookup"in F)&&(F.lookup=F.dnsCache.lookup),Ge.hostname==="unix"){const Z=/(?<socketPath>.+?):(?<path>.+)/.exec(`${Ge.pathname}${Ge.search}`);if(Z==null?void 0:Z.groups){const{socketPath:Dr,path:pm}=Z.groups;Object.assign(F,{socketPath:Dr,path:pm,host:""})}}const Bn=Ge.protocol==="https:";let z;F.http2?z=c.auto:z=Bn?o.request:s.request;const ve=(E=F.request)!==null&&E!==void 0?E:z,Ae=F.cache?this._createCacheableRequest:ve;U&&!F.http2&&(F.agent=U[Bn?"https":"http"]),F[B]=ve,delete F.request,delete F.timeout;const ne=F;if(ne.shared=(g=F.cacheOptions)===null||g===void 0?void 0:g.shared,ne.cacheHeuristic=(O=F.cacheOptions)===null||O===void 0?void 0:O.cacheHeuristic,ne.immutableMinTimeToLive=(H=F.cacheOptions)===null||H===void 0?void 0:H.immutableMinTimeToLive,ne.ignoreCargoCult=(N=F.cacheOptions)===null||N===void 0?void 0:N.ignoreCargoCult,F.dnsLookupIpVersion!==void 0)try{ne.family=w.dnsLookupIpVersionToFamily(F.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}F.https&&("rejectUnauthorized"in F.https&&(ne.rejectUnauthorized=F.https.rejectUnauthorized),F.https.checkServerIdentity&&(ne.checkServerIdentity=F.https.checkServerIdentity),F.https.certificateAuthority&&(ne.ca=F.https.certificateAuthority),F.https.certificate&&(ne.cert=F.https.certificate),F.https.key&&(ne.key=F.https.key),F.https.passphrase&&(ne.passphrase=F.https.passphrase),F.https.pfx&&(ne.pfx=F.https.pfx));try{let Z=await Ae(Ge,ne);p.default.undefined(Z)&&(Z=z(Ge,ne)),F.request=K,F.timeout=Be,F.agent=U,F.https&&("rejectUnauthorized"in F.https&&delete ne.rejectUnauthorized,F.https.checkServerIdentity&&delete ne.checkServerIdentity,F.https.certificateAuthority&&delete ne.ca,F.https.certificate&&delete ne.cert,F.https.key&&delete ne.key,F.https.passphrase&&delete ne.passphrase,F.https.pfx&&delete ne.pfx),Y(Z)?this._onRequest(Z):this.writable?(this.once("finish",()=>{this._onResponse(Z)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(Z)}catch(Z){throw Z instanceof h.CacheError?new Xu(Z,this):new me(Z.message,Z,this)}}async _error(E){try{for(const g of this.options.hooks.beforeError)E=await g(E)}catch(g){E=new me(g.message,g,this)}this.destroy(E)}_beforeError(E){if(this[ht])return;const{options:g}=this,O=this.retryCount+1;this[ht]=!0,E instanceof me||(E=new me(E.message,E,this));const H=E,{response:N}=H;(async()=>{if(N&&!N.body){N.setEncoding(this._readableState.encoding);try{N.rawBody=await d.default(N),N.body=N.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let F;try{let M;N&&"retry-after"in N.headers&&(M=Number(N.headers["retry-after"]),Number.isNaN(M)?(M=Date.parse(N.headers["retry-after"])-Date.now(),M<=0&&(M=1)):M*=1e3),F=await g.retry.calculateDelay({attemptCount:O,retryOptions:g.retry,error:H,retryAfter:M,computedValue:A.default({attemptCount:O,retryOptions:g.retry,error:H,retryAfter:M,computedValue:0})})}catch(M){this._error(new me(M.message,M,this));return}if(F){const M=async()=>{try{for(const U of this.options.hooks.beforeRetry)await U(this.options,H,O)}catch(U){this._error(new me(U.message,E,this));return}this.destroyed||(this.destroy(),this.emit("retry",O,E))};this[k]=setTimeout(M,F);return}}this._error(H)})()}_read(){this[it]=!0;const E=this[J];if(E&&!this[ht]){E.readableLength&&(this[it]=!1);let g;for(;(g=E.read())!==null;){this[T]+=g.length,this[br]=!0;const O=this.downloadProgress;O.percent<1&&this.emit("downloadProgress",O),this.push(g)}}}_write(E,g,O){const H=()=>{this._writeRequest(E,g,O)};this.requestInitialized?H():this[Et].push(H)}_writeRequest(E,g,O){this[B].destroyed||(this._progressCallbacks.push(()=>{this[q]+=Buffer.byteLength(E,g);const H=this.uploadProgress;H.percent<1&&this.emit("uploadProgress",H)}),this[B].write(E,g,H=>{!H&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),O(H)}))}_final(E){const g=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(B in this)){E();return}if(this[B].destroyed){E();return}this[B].end(O=>{O||(this[re]=this[q],this.emit("uploadProgress",this.uploadProgress),this[B].emit("upload-complete")),E(O)})};this.requestInitialized?g():this[Et].push(g)}_destroy(E,g){var O;this[ht]=!0,clearTimeout(this[k]),B in this&&(this[nt](),((O=this[J])===null||O===void 0?void 0:O.complete)||this[B].destroy()),E!==null&&!p.default.undefined(E)&&!(E instanceof me)&&(E=new me(E.message,E,this)),g(E)}get _isAboutToError(){return this[ht]}get ip(){var E;return(E=this.socket)===null||E===void 0?void 0:E.remoteAddress}get aborted(){var E,g,O;return((g=(E=this[B])===null||E===void 0?void 0:E.destroyed)!==null&&g!==void 0?g:this.destroyed)&&!((O=this[Ln])===null||O===void 0?void 0:O.complete)}get socket(){var E,g;return(g=(E=this[B])===null||E===void 0?void 0:E.socket)!==null&&g!==void 0?g:void 0}get downloadProgress(){let E;return this[C]?E=this[T]/this[C]:this[C]===this[T]?E=1:E=0,{percent:E,transferred:this[T],total:this[C]}}get uploadProgress(){let E;return this[re]?E=this[q]/this[re]:this[re]===this[q]?E=1:E=0,{percent:E,transferred:this[q],total:this[re]}}get timings(){var E;return(E=this[B])===null||E===void 0?void 0:E.timings}get isFromCache(){return this[ye]}pipe(E,g){if(this[br])throw new Error("Failed to pipe. The response has been emitted already.");return E instanceof a.ServerResponse&&this[xe].add(E),super.pipe(E,g)}unpipe(E){return E instanceof a.ServerResponse&&this[xe].delete(E),super.unpipe(E),this}}t.default=el}(wn),function(t){var e=le&&le.__createBinding||(Object.create?function(a,o,u,l){l===void 0&&(l=u),Object.defineProperty(a,l,{enumerable:!0,get:function(){return o[u]}})}:function(a,o,u,l){l===void 0&&(l=u),a[l]=o[u]}),r=le&&le.__exportStar||function(a,o){for(var u in a)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&e(o,a,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.CancelError=t.ParseError=void 0;const n=wn;class i extends n.RequestError{constructor(o,u){const{options:l}=u.request;super(`${o.message} in "${l.url.toString()}"`,o,u.request);this.name="ParseError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_BODY_PARSE_FAILURE":this.code}}t.ParseError=i;class s extends n.RequestError{constructor(o){super("Promise was canceled",{},o);this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}}t.CancelError=s,r(wn,t)}(Dn);var _u={};Object.defineProperty(_u,"__esModule",{value:!0});const sp=Dn,VT=(t,e,r,n)=>{const{rawBody:i}=t;try{if(e==="text")return i.toString(n);if(e==="json")return i.length===0?"":r(i.toString());if(e==="buffer")return i;throw new sp.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(s){throw new sp.ParseError(s,t)}};_u.default=VT,function(t){var e=le&&le.__createBinding||(Object.create?function(p,y,b,D){D===void 0&&(D=b),Object.defineProperty(p,D,{enumerable:!0,get:function(){return y[b]}})}:function(p,y,b,D){D===void 0&&(D=b),p[D]=y[b]}),r=le&&le.__exportStar||function(p,y){for(var b in p)b!=="default"&&!Object.prototype.hasOwnProperty.call(y,b)&&e(y,p,b)};Object.defineProperty(t,"__esModule",{value:!0});const n=Ut,i=Tt.exports,s=Qo.exports,a=Dn,o=_u,u=wn,l=Ki,h=Xi,f=Cn,c=["request","response","redirect","uploadProgress","downloadProgress"];function m(p){let y,b;const D=new n.EventEmitter,_=new s((S,v,d)=>{const w=x=>{const $=new u.default(void 0,p);$.retryCount=x,$._noPipe=!0,d(()=>$.destroy()),d.shouldReject=!1,d(()=>v(new a.CancelError($))),y=$,$.once("response",async I=>{var B;if(I.retryCount=x,I.request.aborted)return;let J;try{J=await h.default($),I.rawBody=J}catch{return}if($._isAboutToError)return;const C=((B=I.headers["content-encoding"])!==null&&B!==void 0?B:"").toLowerCase(),T=["gzip","deflate","br"].includes(C),{options:re}=$;if(T&&!re.decompress)I.body=J;else try{I.body=o.default(I,re.responseType,re.parseJson,re.encoding)}catch(q){if(I.body=J.toString(),f.isResponseOk(I)){$._beforeError(q);return}}try{for(const[q,xe]of re.hooks.afterResponse.entries())I=await xe(I,async qe=>{const ye=u.default.normalizeArguments(void 0,{...qe,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},re);ye.hooks.afterResponse=ye.hooks.afterResponse.slice(0,q);for(const br of ye.hooks.beforeRetry)await br(ye);const nt=m(ye);return d(()=>{nt.catch(()=>{}),nt.cancel()}),nt})}catch(q){$._beforeError(new a.RequestError(q.message,q,$));return}if(!f.isResponseOk(I)){$._beforeError(new a.HTTPError(I));return}b=I,S($.options.resolveBodyOnly?I.body:I)});const j=I=>{if(_.isCanceled)return;const{options:B}=$;if(I instanceof a.HTTPError&&!B.throwHttpErrors){const{response:J}=I;S($.options.resolveBodyOnly?J.body:J);return}v(I)};$.once("error",j);const A=$.options.body;$.once("retry",(I,B)=>{var J,C;if(A===((J=B.request)===null||J===void 0?void 0:J.options.body)&&i.default.nodeStream((C=B.request)===null||C===void 0?void 0:C.options.body)){j(B);return}w(I)}),l.default($,D,c)};w(0)});_.on=(S,v)=>(D.on(S,v),_);const R=S=>{const v=(async()=>{await _;const{options:d}=b.request;return o.default(b,S,d.parseJson,d.encoding)})();return Object.defineProperties(v,Object.getOwnPropertyDescriptors(_)),v};return _.json=()=>{const{headers:S}=y.options;return!y.writableFinished&&S.accept===void 0&&(S.accept="application/json"),R("json")},_.buffer=()=>R("buffer"),_.text=()=>R("text"),_}t.default=m,r(Dn,t)}(Xo);var Su={};Object.defineProperty(Su,"__esModule",{value:!0});const WT=Dn;function YT(t,...e){const r=(async()=>{if(t instanceof WT.RequestError)try{for(const i of e)if(i)for(const s of i)t=await s(t)}catch(i){t=i}throw t})(),n=()=>r;return r.json=n,r.text=n,r.buffer=n,r.on=n,r}Su.default=YT;var Cu={};Object.defineProperty(Cu,"__esModule",{value:!0});const ap=Tt.exports;function op(t){for(const e of Object.values(t))(ap.default.plainObject(e)||ap.default.array(e))&&op(e);return Object.freeze(t)}Cu.default=op;var up={};Object.defineProperty(up,"__esModule",{value:!0}),function(t){var e=le&&le.__createBinding||(Object.create?function(D,_,R,S){S===void 0&&(S=R),Object.defineProperty(D,S,{enumerable:!0,get:function(){return _[R]}})}:function(D,_,R,S){S===void 0&&(S=R),D[S]=_[R]}),r=le&&le.__exportStar||function(D,_){for(var R in D)R!=="default"&&!Object.prototype.hasOwnProperty.call(_,R)&&e(_,D,R)};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultHandler=void 0;const n=Tt.exports,i=Xo,s=Su,a=wn,o=Cu,u={RequestError:i.RequestError,CacheError:i.CacheError,ReadError:i.ReadError,HTTPError:i.HTTPError,MaxRedirectsError:i.MaxRedirectsError,TimeoutError:i.TimeoutError,ParseError:i.ParseError,CancelError:i.CancelError,UnsupportedProtocolError:i.UnsupportedProtocolError,UploadError:i.UploadError},l=async D=>new Promise(_=>{setTimeout(_,D)}),{normalizeArguments:h}=a.default,f=(...D)=>{let _;for(const R of D)_=h(void 0,R,_);return _},c=D=>D.isStream?new a.default(void 0,D):i.default(D),m=D=>"defaults"in D&&"options"in D.defaults,p=["get","post","put","patch","head","delete"];t.defaultHandler=(D,_)=>_(D);const y=(D,_)=>{if(D)for(const R of D)R(_)},b=D=>{D._rawHandlers=D.handlers,D.handlers=D.handlers.map(S=>(v,d)=>{let w;const x=S(v,$=>(w=d($),w));if(x!==w&&!v.isStream&&w){const $=x,{then:j,catch:A,finally:I}=$;Object.setPrototypeOf($,Object.getPrototypeOf(w)),Object.defineProperties($,Object.getOwnPropertyDescriptors(w)),$.then=j,$.catch=A,$.finally=I}return x});const _=(S,v={},d)=>{var w,x;let $=0;const j=A=>D.handlers[$++](A,$===D.handlers.length?c:j);if(n.default.plainObject(S)){const A={...S,...v};a.setNonEnumerableProperties([S,v],A),v=A,S=void 0}try{let A;try{y(D.options.hooks.init,v),y((w=v.hooks)===null||w===void 0?void 0:w.init,v)}catch(B){A=B}const I=h(S,v,d??D.options);if(I[a.kIsNormalizedAlready]=!0,A)throw new i.RequestError(A.message,A,I);return j(I)}catch(A){if(v.isStream)throw A;return s.default(A,D.options.hooks.beforeError,(x=v.hooks)===null||x===void 0?void 0:x.beforeError)}};_.extend=(...S)=>{const v=[D.options];let d=[...D._rawHandlers],w;for(const x of S)m(x)?(v.push(x.defaults.options),d.push(...x.defaults._rawHandlers),w=x.defaults.mutableDefaults):(v.push(x),"handlers"in x&&d.push(...x.handlers),w=x.mutableDefaults);return d=d.filter(x=>x!==t.defaultHandler),d.length===0&&d.push(t.defaultHandler),b({options:f(...v),handlers:d,mutableDefaults:Boolean(w)})};const R=async function*(S,v){let d=h(S,v,D.options);d.resolveBodyOnly=!1;const w=d.pagination;if(!n.default.object(w))throw new TypeError("`options.pagination` must be implemented");const x=[];let{countLimit:$}=w,j=0;for(;j<w.requestLimit;){j!==0&&await l(w.backoff);const A=await _(void 0,void 0,d),I=await w.transform(A),B=[];for(const C of I)if(w.filter(C,x,B)&&(!w.shouldContinue(C,x,B)||(yield C,w.stackAllItems&&x.push(C),B.push(C),--$<=0)))return;const J=w.paginate(A,x,B);if(J===!1)return;J===A.request.options?d=A.request.options:J!==void 0&&(d=h(void 0,J,d)),j++}};_.paginate=R,_.paginate.all=async(S,v)=>{const d=[];for await(const w of R(S,v))d.push(w);return d},_.paginate.each=R,_.stream=(S,v)=>_(S,{...v,isStream:!0});for(const S of p)_[S]=(v,d)=>_(v,{...d,method:S}),_.stream[S]=(v,d)=>_(v,{...d,method:S,isStream:!0});return Object.assign(_,u),Object.defineProperty(_,"defaults",{value:D.mutableDefaults?D:o.default(D),writable:D.mutableDefaults,configurable:D.mutableDefaults,enumerable:!0}),_.mergeOptions=f,_};t.default=b,r(up,t)}(Ko),function(t,e){var r=le&&le.__createBinding||(Object.create?function(u,l,h,f){f===void 0&&(f=h),Object.defineProperty(u,f,{enumerable:!0,get:function(){return l[h]}})}:function(u,l,h,f){f===void 0&&(f=h),u[f]=l[h]}),n=le&&le.__exportStar||function(u,l){for(var h in u)h!=="default"&&!Object.prototype.hasOwnProperty.call(l,h)&&r(l,u,h)};Object.defineProperty(e,"__esModule",{value:!0});const i=Qr,s=Ko,a={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:u})=>u},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:u=>u.request.options.responseType==="json"?u.body:JSON.parse(u.body),paginate:u=>{if(!Reflect.has(u.headers,"link"))return!1;const l=u.headers.link.split(",");let h;for(const f of l){const c=f.split(";");if(c[1].includes("next")){h=c[0].trimStart().trim(),h=h.slice(1,-1);break}}return h?{url:new i.URL(h)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:u=>JSON.parse(u),stringifyJson:u=>JSON.stringify(u),cacheOptions:{}},handlers:[s.defaultHandler],mutableDefaults:!1},o=s.default(a);e.default=o,t.exports=o,t.exports.default=o,t.exports.__esModule=!0,n(Ko,e),n(Xo,e)}(Yo,Yo.exports);var Au={exports:{}},qr={},dr={};dr.parse=dr.decode=KT,dr.stringify=dr.encode=lp,dr.safe=Gr,dr.unsafe=Qi;var Ru=typeof process<"u"&&process.platform==="win32"?`\r
|
|
124
124
|
`:`
|
|
125
|
-
`;function
|
|
126
|
-
`}):u&&typeof u=="object"?r.push(s):n+=
|
|
127
|
-
`){o++,i=!1,a+=r(t,s,o),s=o;continue}else if(i===
|
|
128
|
-
`)i=!1,a+=r(t,s,o),s=o;else if(!i&&u+l==="/*"){a+=t.slice(s,o),s=o,i=
|
|
125
|
+
`;function lp(t,e){var r=[],n="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(s,a,o){var u=t[s];u&&Array.isArray(u)?u.forEach(function(l){n+=Gr(s+"[]")+i+Gr(l)+`
|
|
126
|
+
`}):u&&typeof u=="object"?r.push(s):n+=Gr(s)+i+Gr(u)+Ru}),e.section&&n.length&&(n="["+Gr(e.section)+"]"+Ru+n),r.forEach(function(s,a,o){var u=cp(s).join("\\."),l=(e.section?e.section+".":"")+u,h=lp(t[s],{section:l,whitespace:e.whitespace});n.length&&h.length&&(n+=Ru),n+=h}),n}function cp(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function KT(t){var e={},r=e,n=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,s=t.split(/[\r\n]+/g);return s.forEach(function(a,o,u){if(!(!a||a.match(/^\s*[;#]/))){var l=a.match(i);if(!!l){if(l[1]!==void 0){if(n=Qi(l[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var h=Qi(l[2]);if(h!=="__proto__"){var f=l[3]?Qi(l[4]):!0;switch(f){case"true":case"false":case"null":f=JSON.parse(f)}if(h.length>2&&h.slice(-2)==="[]"){if(h=h.substring(0,h.length-2),h==="__proto__")return;r[h]?Array.isArray(r[h])||(r[h]=[r[h]]):r[h]=[]}Array.isArray(r[h])?r[h].push(f):r[h]=f}}}}),Object.keys(e).filter(function(a,o,u){if(!e[a]||typeof e[a]!="object"||Array.isArray(e[a]))return!1;var l=cp(a),h=e,f=l.pop(),c=f.replace(/\\\./g,".");return l.forEach(function(m,p,y){m!=="__proto__"&&((!h[m]||typeof h[m]!="object")&&(h[m]={}),h=h[m])}),h===e&&c===f?!1:(h[c]=e[a],!0)}).forEach(function(a,o,u){delete e[a]}),e}function hp(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function Gr(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&hp(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Qi(t,e){if(t=(t||"").trim(),hp(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",i=0,s=t.length;i<s;i++){var a=t.charAt(i);if(r)"\\;#".indexOf(a)!==-1?n+=a:n+="\\"+a,r=!1;else{if(";#".indexOf(a)!==-1)break;a==="\\"?r=!0:n+=a}}return r&&(n+="\\"),n.trim()}return t}const Tu=Symbol("singleComment"),fp=Symbol("multiComment"),XT=()=>"",QT=(t,e,r)=>t.slice(e,r).replace(/\S/g," "),JT=(t,e)=>{let r=e-1,n=0;for(;t[r]==="\\";)r-=1,n+=1;return Boolean(n%2)};var ZT=(t,e={})=>{if(typeof t!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof t}\``);const r=e.whitespace===!1?XT:QT;let n=!1,i=!1,s=0,a="";for(let o=0;o<t.length;o++){const u=t[o],l=t[o+1];if(!i&&u==='"'&&(JT(t,o)||(n=!n)),!n){if(!i&&u+l==="//")a+=t.slice(s,o),s=o,i=Tu,o++;else if(i===Tu&&u+l===`\r
|
|
127
|
+
`){o++,i=!1,a+=r(t,s,o),s=o;continue}else if(i===Tu&&u===`
|
|
128
|
+
`)i=!1,a+=r(t,s,o),s=o;else if(!i&&u+l==="/*"){a+=t.slice(s,o),s=o,i=fp,o++;continue}else if(i===fp&&u+l==="*/"){o++,i=!1,a+=r(t,s,o+1),s=o+1;continue}}}return a+(i?r(t.slice(s)):t.slice(s))},dp=Je,ex=dr,Rn=we,tx=ZT,rx=qr.parse=function(t){return/^\s*{/.test(t)?JSON.parse(tx(t)):ex.parse(t)},nx=qr.file=function(){var t=[].slice.call(arguments).filter(function(n){return n!=null});for(var e in t)if(typeof t[e]!="string")return;var r=Rn.join.apply(null,t);try{return dp.readFileSync(r,"utf-8")}catch{return}};qr.json=function(){var t=nx.apply(null,arguments);return t?rx(t):null},qr.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var i in e)if(i.toLowerCase().indexOf(t.toLowerCase())===0){for(var s=i.substring(n).split("__"),a;(a=s.indexOf(""))>-1;)s.splice(a,1);var o=r;s.forEach(function(l,h){!l||typeof o!="object"||(h===s.length-1&&(o[l]=e[i]),o[l]===void 0&&(o[l]={}),o=o[l])})}return r},qr.find=function(){var t=Rn.join.apply(null,[].slice.call(arguments));function e(r,n){var i=Rn.join(r,n);try{return dp.statSync(i),i}catch{if(Rn.dirname(r)!==r)return e(Rn.dirname(r),n)}}return e(process.cwd(),t)};var pp={exports:{}};/*!
|
|
129
129
|
* @description Recursive object extending
|
|
130
130
|
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
|
131
131
|
* @license MIT
|
|
@@ -150,4 +150,8 @@ Please report this to https://github.com/szmarczak/http2-wrapper/`);p(y)}return}
|
|
|
150
150
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
151
151
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
152
152
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
153
|
-
*/function rp(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function np(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function ip(t){var e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=ip(r):rp(r)?e[n]=np(r):e[n]=bu({},r):e[n]=r}),e}function sp(t,e){return e==="__proto__"?void 0:t[e]}var bu=tp.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,n;return e.forEach(function(i){typeof i!="object"||i===null||Array.isArray(i)||Object.keys(i).forEach(function(s){if(n=sp(t,s),r=sp(i,s),r!==t)if(typeof r!="object"||r===null){t[s]=r;return}else if(Array.isArray(r)){t[s]=ip(r);return}else if(rp(r)){t[s]=np(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[s]=bu({},r);return}else{t[s]=bu(n,r);return}})}),t},Hx=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(S){r.bools[S]=!0});var n={};Object.keys(e.alias||{}).forEach(function(S){n[S]=[].concat(e.alias[S]),n[S].forEach(function(v){n[v]=[S].concat(n[S].filter(function(d){return v!==d}))})}),[].concat(e.string).filter(Boolean).forEach(function(S){r.strings[S]=!0,n[S]&&(r.strings[n[S]]=!0)});var i=e.default||{},s={_:[]};Object.keys(r.bools).forEach(function(S){u(S,i[S]===void 0?!1:i[S])});var a=[];t.indexOf("--")!==-1&&(a=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));function o(S,v){return r.allBools&&/^--[^=]+$/.test(v)||r.strings[S]||r.bools[S]||n[S]}function u(S,v,d){if(!(d&&r.unknownFn&&!o(S,d)&&r.unknownFn(d)===!1)){var w=!r.strings[S]&&ap(v)?Number(v):v;l(s,S.split("."),w),(n[S]||[]).forEach(function(T){l(s,T.split("."),w)})}}function l(S,v,d){for(var w=S,T=0;T<v.length-1;T++){var $=v[T];if($==="__proto__")return;w[$]===void 0&&(w[$]={}),(w[$]===Object.prototype||w[$]===Number.prototype||w[$]===String.prototype)&&(w[$]={}),w[$]===Array.prototype&&(w[$]=[]),w=w[$]}var $=v[v.length-1];$!=="__proto__"&&((w===Object.prototype||w===Number.prototype||w===String.prototype)&&(w={}),w===Array.prototype&&(w=[]),w[$]===void 0||r.bools[$]||typeof w[$]=="boolean"?w[$]=d:Array.isArray(w[$])?w[$].push(d):w[$]=[w[$],d])}function h(S){return n[S].some(function(v){return r.bools[v]})}for(var f=0;f<t.length;f++){var c=t[f];if(/^--.+=/.test(c)){var m=c.match(/^--([^=]+)=([\s\S]*)$/),p=m[1],y=m[2];r.bools[p]&&(y=y!=="false"),u(p,y,c)}else if(/^--no-.+/.test(c)){var p=c.match(/^--no-(.+)/)[1];u(p,!1,c)}else if(/^--.+/.test(c)){var p=c.match(/^--(.+)/)[1],b=t[f+1];b!==void 0&&!/^-/.test(b)&&!r.bools[p]&&!r.allBools&&(n[p]?!h(p):!0)?(u(p,b,c),f++):/^(true|false)$/.test(b)?(u(p,b==="true",c),f++):u(p,r.strings[p]?"":!0,c)}else if(/^-[^-]+/.test(c)){for(var D=c.slice(1,-1).split(""),_=!1,R=0;R<D.length;R++){var b=c.slice(R+2);if(b==="-"){u(D[R],b,c);continue}if(/[A-Za-z]/.test(D[R])&&/=/.test(b)){u(D[R],b.split("=")[1],c),_=!0;break}if(/[A-Za-z]/.test(D[R])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(b)){u(D[R],b,c),_=!0;break}if(D[R+1]&&D[R+1].match(/\W/)){u(D[R],c.slice(R+2),c),_=!0;break}else u(D[R],r.strings[D[R]]?"":!0,c)}var p=c.slice(-1)[0];!_&&p!=="-"&&(t[f+1]&&!/^(-|--)[^-]/.test(t[f+1])&&!r.bools[p]&&(n[p]?!h(p):!0)?(u(p,t[f+1],c),f++):t[f+1]&&/^(true|false)$/.test(t[f+1])?(u(p,t[f+1]==="true",c),f++):u(p,r.strings[p]?"":!0,c))}else if((!r.unknownFn||r.unknownFn(c)!==!1)&&s._.push(r.strings._||!ap(c)?c:Number(c)),e.stopEarly){s._.push.apply(s._,t.slice(f+1));break}}return Object.keys(i).forEach(function(S){Ux(s,S.split("."))||(l(s,S.split("."),i[S]),(n[S]||[]).forEach(function(v){l(s,v.split("."),i[S])}))}),e["--"]?(s["--"]=new Array,a.forEach(function(S){s["--"].push(S)})):a.forEach(function(S){s._.push(S)}),s};function Ux(t,e){var r=t;e.slice(0,-1).forEach(function(i){r=r[i]||{}});var n=e[e.length-1];return n in r}function ap(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}var En=Mr,Hr=we.join,qx=tp.exports,op="/etc",up=process.platform==="win32",_n=up?process.env.USERPROFILE:process.env.HOME,lp=function(t,e,r,n){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=Hx(process.argv.slice(2))),e=(typeof e=="string"?En.json(e):e)||{},n=n||En.parse;var i=En.env(t+"_"),s=[e],a=[];function o(u){if(!(a.indexOf(u)>=0)){var l=En.file(u);l&&(s.push(n(l)),a.push(u))}}return up||[Hr(op,t,"config"),Hr(op,t+"rc")].forEach(o),_n&&[Hr(_n,".config",t,"config"),Hr(_n,".config",t),Hr(_n,"."+t,"config"),Hr(_n,"."+t+"rc")].forEach(o),o(En.find("."+t+"rc")),i.config&&o(i.config),r.config&&o(r.config),qx.apply(null,s.concat([i,r,a.length?{configs:a,config:a[a.length-1]}:void 0]))};const Gx=lp,cp=t=>{const e=Gx("npm",{registry:"https://registry.npmjs.org/"}),r=e[`${t}:registry`]||e.config_registry||e.registry;return r.slice(-1)==="/"?r:`${r}/`};gu.exports=cp,gu.exports.default=cp;function zx(t){return Buffer.from(t,"base64").toString("utf8")}function Vx(t){return Buffer.from(t,"utf8").toString("base64")}var Wx={decodeBase64:zx,encodeBase64:Vx},Du=Vr,hp=Wx,Kx=hp.decodeBase64,Yx=hp.encodeBase64,fp=":_authToken",dp=":_auth",pp=":username",mp=":_password",Xx=function(){var t,e;return arguments.length>=2?(t=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?t=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||lp("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,gp(t,e)||Qx(e.npmrc)};function gp(t,e){for(var r=Du.parse(t,!1,!0),n;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";var i="//"+r.host+n.replace(/\/$/,""),s=Zx(i,e.npmrc);if(s)return s;if(!e.recursive)return/\/$/.test(t)?void 0:gp(Du.resolve(t,"."),e);r.pathname=Du.resolve(Jx(n),"..")||"/"}}function Qx(t){if(!!t._auth){var e=Wi(t._auth);return{token:e,type:"Basic"}}}function Jx(t){return t[t.length-1]==="/"?t:t+"/"}function Zx(t,e){var r=eT(e[t+fp]||e[t+"/"+fp]);if(r)return r;var n=e[t+pp]||e[t+"/"+pp],i=e[t+mp]||e[t+"/"+mp],s=tT(n,i);if(s)return s;var a=rT(e[t+dp]||e[t+"/"+dp]);if(a)return a}function Wi(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function eT(t){if(!!t){var e=Wi(t);return{token:e,type:"Bearer"}}}function tT(t,e){if(!(!t||!e)){var r=Kx(Wi(e)),n=Yx(t+":"+r);return{token:n,type:"Basic",password:r,username:t}}}function rT(t){if(!!t){var e=Wi(t);return{token:e,type:"Basic"}}}var Wt={exports:{}};const nT="2.0.0",iT=256,sT=Number.MAX_SAFE_INTEGER||9007199254740991,aT=16;var Ki={SEMVER_SPEC_VERSION:nT,MAX_LENGTH:iT,MAX_SAFE_INTEGER:sT,MAX_SAFE_COMPONENT_LENGTH:aT};const oT=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var Yi=oT;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r}=Ki,n=Yi;e=t.exports={};const i=e.re=[],s=e.src=[],a=e.t={};let o=0;const u=(l,h,f)=>{const c=o++;n(c,h),a[l]=c,s[c]=h,i[c]=new RegExp(h,f?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),u("FULL",`^${s[a.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),u("LOOSE",`^${s[a.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),u("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),u("COERCERTL",s[a.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",u("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",u("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0.0.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")})(Wt,Wt.exports);const uT=["includePrerelease","loose","rtl"],lT=t=>t?typeof t!="object"?{loose:!0}:uT.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};var Xi=lT;const yp=/^[0-9]+$/,vp=(t,e)=>{const r=yp.test(t),n=yp.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},cT=(t,e)=>vp(e,t);var wu={compareIdentifiers:vp,rcompareIdentifiers:cT};const Qi=Yi,{MAX_LENGTH:bp,MAX_SAFE_INTEGER:Ji}=Ki,{re:Dp,t:wp}=Wt.exports,hT=Xi,{compareIdentifiers:Sn}=wu;class bt{constructor(e,r){if(r=hT(r),e instanceof bt){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>bp)throw new TypeError(`version is longer than ${bp} characters`);Qi("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?Dp[wp.LOOSE]:Dp[wp.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Ji||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ji||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ji||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s<Ji)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Qi("SemVer.compare",this.version,this.options,e),!(e instanceof bt)){if(typeof e=="string"&&e===this.version)return 0;e=new bt(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof bt||(e=new bt(e,this.options)),Sn(this.major,e.major)||Sn(this.minor,e.minor)||Sn(this.patch,e.patch)}comparePre(e){if(e instanceof bt||(e=new bt(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],i=e.prerelease[r];if(Qi("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Sn(n,i)}while(++r)}compareBuild(e){e instanceof bt||(e=new bt(e,this.options));let r=0;do{const n=this.build[r],i=e.build[r];if(Qi("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Sn(n,i)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}r&&(this.prerelease[0]===r?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}var We=bt;const{MAX_LENGTH:fT}=Ki,{re:Ep,t:_p}=Wt.exports,Sp=We,dT=Xi,pT=(t,e)=>{if(e=dT(e),t instanceof Sp)return t;if(typeof t!="string"||t.length>fT||!(e.loose?Ep[_p.LOOSE]:Ep[_p.FULL]).test(t))return null;try{return new Sp(t,e)}catch{return null}};var Ur=pT;const mT=Ur,gT=(t,e)=>{const r=mT(t,e);return r?r.version:null};var yT=gT;const vT=Ur,bT=(t,e)=>{const r=vT(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var DT=bT;const wT=We,ET=(t,e,r,n)=>{typeof r=="string"&&(n=r,r=void 0);try{return new wT(t,r).inc(e,n).version}catch{return null}};var _T=ET;const Cp=We,ST=(t,e,r)=>new Cp(t,r).compare(new Cp(e,r));var gt=ST;const CT=gt,AT=(t,e,r)=>CT(t,e,r)===0;var Eu=AT;const Ap=Ur,RT=Eu,xT=(t,e)=>{if(RT(t,e))return null;{const r=Ap(t),n=Ap(e),i=r.prerelease.length||n.prerelease.length,s=i?"pre":"",a=i?"prerelease":"";for(const o in r)if((o==="major"||o==="minor"||o==="patch")&&r[o]!==n[o])return s+o;return a}};var TT=xT;const $T=We,OT=(t,e)=>new $T(t,e).major;var FT=OT;const PT=We,kT=(t,e)=>new PT(t,e).minor;var IT=kT;const LT=We,BT=(t,e)=>new LT(t,e).patch;var NT=BT;const MT=Ur,jT=(t,e)=>{const r=MT(t,e);return r&&r.prerelease.length?r.prerelease:null};var HT=jT;const UT=gt,qT=(t,e,r)=>UT(e,t,r);var GT=qT;const zT=gt,VT=(t,e)=>zT(t,e,!0);var WT=VT;const Rp=We,KT=(t,e,r)=>{const n=new Rp(t,r),i=new Rp(e,r);return n.compare(i)||n.compareBuild(i)};var _u=KT;const YT=_u,XT=(t,e)=>t.sort((r,n)=>YT(r,n,e));var QT=XT;const JT=_u,ZT=(t,e)=>t.sort((r,n)=>JT(n,r,e));var e$=ZT;const t$=gt,r$=(t,e,r)=>t$(t,e,r)>0;var Zi=r$;const n$=gt,i$=(t,e,r)=>n$(t,e,r)<0;var Su=i$;const s$=gt,a$=(t,e,r)=>s$(t,e,r)!==0;var xp=a$;const o$=gt,u$=(t,e,r)=>o$(t,e,r)>=0;var Cu=u$;const l$=gt,c$=(t,e,r)=>l$(t,e,r)<=0;var Au=c$;const h$=Eu,f$=xp,d$=Zi,p$=Cu,m$=Su,g$=Au,y$=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return h$(t,r,n);case"!=":return f$(t,r,n);case">":return d$(t,r,n);case">=":return p$(t,r,n);case"<":return m$(t,r,n);case"<=":return g$(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var Tp=y$;const v$=We,b$=Ur,{re:es,t:ts}=Wt.exports,D$=(t,e)=>{if(t instanceof v$)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(es[ts.COERCE]);else{let n;for(;(n=es[ts.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),es[ts.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;es[ts.COERCERTL].lastIndex=-1}return r===null?null:b$(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};var w$=D$,E$=Q;Q.Node=hr,Q.create=Q;function Q(t){var e=this;if(e instanceof Q||(e=new Q),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)e.push(arguments[r]);return e}Q.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e},Q.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},Q.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}},Q.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)S$(this,arguments[t]);return this.length},Q.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)C$(this,arguments[t]);return this.length},Q.prototype.pop=function(){if(!!this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},Q.prototype.shift=function(){if(!!this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},Q.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,n=0;r!==null;n++)t.call(e,r.value,n,this),r=r.next},Q.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,n=this.length-1;r!==null;n--)t.call(e,r.value,n,this),r=r.prev},Q.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value},Q.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value},Q.prototype.map=function(t,e){e=e||this;for(var r=new Q,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r},Q.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Q,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r},Q.prototype.reduce=function(t,e){var r,n=this.head;if(arguments.length>1)r=e;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=t(r,n.value,i),n=n.next;return r},Q.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=t(r,n.value,i),n=n.prev;return r},Q.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t},Q.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t},Q.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Q;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)r.push(i.value);return r},Q.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Q;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>t;n--,i=i.prev)r.push(i.value);return r},Q.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(var s=[],n=0;i&&n<e;n++)s.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=_$(this,i,r[n]);return s},Q.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=e,this.tail=t,this};function _$(t,e,r){var n=e===t.head?new hr(r,null,e,t):new hr(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function S$(t,e){t.tail=new hr(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function C$(t,e){t.head=new hr(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function hr(t,e,r,n){if(!(this instanceof hr))return new hr(t,e,r,n);this.list=n,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{require("./iterator.js")(Q)}catch{}const A$=E$,fr=Symbol("max"),Lt=Symbol("length"),qr=Symbol("lengthCalculator"),Cn=Symbol("allowStale"),dr=Symbol("maxAge"),Bt=Symbol("dispose"),$p=Symbol("noDisposeOnSet"),Re=Symbol("lruList"),yt=Symbol("cache"),Op=Symbol("updateAgeOnGet"),Ru=()=>1;class R${constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[fr]=e.max||1/0;const r=e.length||Ru;if(this[qr]=typeof r!="function"?Ru:r,this[Cn]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[dr]=e.maxAge||0,this[Bt]=e.dispose,this[$p]=e.noDisposeOnSet||!1,this[Op]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[fr]=e||1/0,An(this)}get max(){return this[fr]}set allowStale(e){this[Cn]=!!e}get allowStale(){return this[Cn]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[dr]=e,An(this)}get maxAge(){return this[dr]}set lengthCalculator(e){typeof e!="function"&&(e=Ru),e!==this[qr]&&(this[qr]=e,this[Lt]=0,this[Re].forEach(r=>{r.length=this[qr](r.value,r.key),this[Lt]+=r.length})),An(this)}get lengthCalculator(){return this[qr]}get length(){return this[Lt]}get itemCount(){return this[Re].length}rforEach(e,r){r=r||this;for(let n=this[Re].tail;n!==null;){const i=n.prev;Fp(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[Re].head;n!==null;){const i=n.next;Fp(this,e,n,r),n=i}}keys(){return this[Re].toArray().map(e=>e.key)}values(){return this[Re].toArray().map(e=>e.value)}reset(){this[Bt]&&this[Re]&&this[Re].length&&this[Re].forEach(e=>this[Bt](e.key,e.value)),this[yt]=new Map,this[Re]=new A$,this[Lt]=0}dump(){return this[Re].map(e=>rs(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Re]}set(e,r,n){if(n=n||this[dr],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const i=n?Date.now():0,s=this[qr](r,e);if(this[yt].has(e)){if(s>this[fr])return Gr(this,this[yt].get(e)),!1;const u=this[yt].get(e).value;return this[Bt]&&(this[$p]||this[Bt](e,u.value)),u.now=i,u.maxAge=n,u.value=r,this[Lt]+=s-u.length,u.length=s,this.get(e),An(this),!0}const a=new x$(e,r,s,i,n);return a.length>this[fr]?(this[Bt]&&this[Bt](e,r),!1):(this[Lt]+=a.length,this[Re].unshift(a),this[yt].set(e,this[Re].head),An(this),!0)}has(e){if(!this[yt].has(e))return!1;const r=this[yt].get(e).value;return!rs(this,r)}get(e){return xu(this,e,!0)}peek(e){return xu(this,e,!1)}pop(){const e=this[Re].tail;return e?(Gr(this,e),e.value):null}del(e){Gr(this,this[yt].get(e))}load(e){this.reset();const r=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{const a=s-r;a>0&&this.set(i.k,i.v,a)}}}prune(){this[yt].forEach((e,r)=>xu(this,r,!1))}}const xu=(t,e,r)=>{const n=t[yt].get(e);if(n){const i=n.value;if(rs(t,i)){if(Gr(t,n),!t[Cn])return}else r&&(t[Op]&&(n.value.now=Date.now()),t[Re].unshiftNode(n));return i.value}},rs=(t,e)=>{if(!e||!e.maxAge&&!t[dr])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[dr]&&r>t[dr]},An=t=>{if(t[Lt]>t[fr])for(let e=t[Re].tail;t[Lt]>t[fr]&&e!==null;){const r=e.prev;Gr(t,e),e=r}},Gr=(t,e)=>{if(e){const r=e.value;t[Bt]&&t[Bt](r.key,r.value),t[Lt]-=r.length,t[yt].delete(r.key),t[Re].removeNode(e)}};class x${constructor(e,r,n,i,s){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const Fp=(t,e,r,n)=>{let i=r.value;rs(t,i)&&(Gr(t,r),t[Cn]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};var T$=R$;class Tn{constructor(e,r){if(r=O$(r),e instanceof Tn)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new Tn(e.raw,r);if(e instanceof Tu)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const n=this.set[0];if(this.set=this.set.filter(i=>!kp(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(const i of this.set)if(i.length===1&&L$(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=Pp.get(n);if(i)return i;const s=this.options.loose,a=s?He[Ie.HYPHENRANGELOOSE]:He[Ie.HYPHENRANGE];e=e.replace(a,V$(this.options.includePrerelease)),Ce("hyphen replace",e),e=e.replace(He[Ie.COMPARATORTRIM],P$),Ce("comparator trim",e,He[Ie.COMPARATORTRIM]),e=e.replace(He[Ie.TILDETRIM],k$),e=e.replace(He[Ie.CARETTRIM],I$),e=e.split(/\s+/).join(" ");const o=s?He[Ie.COMPARATORLOOSE]:He[Ie.COMPARATOR],u=e.split(" ").map(f=>B$(f,this.options)).join(" ").split(/\s+/).map(f=>z$(f,this.options)).filter(this.options.loose?f=>!!f.match(o):()=>!0).map(f=>new Tu(f,this.options));u.length;const l=new Map;for(const f of u){if(kp(f))return[f];l.set(f.value,f)}l.size>1&&l.has("")&&l.delete("");const h=[...l.values()];return Pp.set(n,h),h}intersects(e,r){if(!(e instanceof Tn))throw new TypeError("a Range is required");return this.set.some(n=>Ip(n,r)&&e.set.some(i=>Ip(i,r)&&n.every(s=>i.every(a=>s.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new F$(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(W$(this.set[r],e,this.options))return!0;return!1}}var vt=Tn;const $$=T$,Pp=new $$({max:1e3}),O$=Xi,Tu=ns,Ce=Yi,F$=We,{re:He,t:Ie,comparatorTrimReplace:P$,tildeTrimReplace:k$,caretTrimReplace:I$}=Wt.exports,kp=t=>t.value==="<0.0.0-0",L$=t=>t.value==="",Ip=(t,e)=>{let r=!0;const n=t.slice();let i=n.pop();for(;r&&n.length;)r=n.every(s=>i.intersects(s,e)),i=n.pop();return r},B$=(t,e)=>(Ce("comp",t,e),t=j$(t,e),Ce("caret",t),t=N$(t,e),Ce("tildes",t),t=U$(t,e),Ce("xrange",t),t=G$(t,e),Ce("stars",t),t),Ke=t=>!t||t.toLowerCase()==="x"||t==="*",N$=(t,e)=>t.trim().split(/\s+/).map(r=>M$(r,e)).join(" "),M$=(t,e)=>{const r=e.loose?He[Ie.TILDELOOSE]:He[Ie.TILDE];return t.replace(r,(n,i,s,a,o)=>{Ce("tilde",t,n,i,s,a,o);let u;return Ke(i)?u="":Ke(s)?u=`>=${i}.0.0 <${+i+1}.0.0-0`:Ke(a)?u=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:o?(Ce("replaceTilde pr",o),u=`>=${i}.${s}.${a}-${o} <${i}.${+s+1}.0-0`):u=`>=${i}.${s}.${a} <${i}.${+s+1}.0-0`,Ce("tilde return",u),u})},j$=(t,e)=>t.trim().split(/\s+/).map(r=>H$(r,e)).join(" "),H$=(t,e)=>{Ce("caret",t,e);const r=e.loose?He[Ie.CARETLOOSE]:He[Ie.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,s,a,o,u)=>{Ce("caret",t,i,s,a,o,u);let l;return Ke(s)?l="":Ke(a)?l=`>=${s}.0.0${n} <${+s+1}.0.0-0`:Ke(o)?s==="0"?l=`>=${s}.${a}.0${n} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.0${n} <${+s+1}.0.0-0`:u?(Ce("replaceCaret pr",u),s==="0"?a==="0"?l=`>=${s}.${a}.${o}-${u} <${s}.${a}.${+o+1}-0`:l=`>=${s}.${a}.${o}-${u} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.${o}-${u} <${+s+1}.0.0-0`):(Ce("no pr"),s==="0"?a==="0"?l=`>=${s}.${a}.${o}${n} <${s}.${a}.${+o+1}-0`:l=`>=${s}.${a}.${o}${n} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.${o} <${+s+1}.0.0-0`),Ce("caret return",l),l})},U$=(t,e)=>(Ce("replaceXRanges",t,e),t.split(/\s+/).map(r=>q$(r,e)).join(" ")),q$=(t,e)=>{t=t.trim();const r=e.loose?He[Ie.XRANGELOOSE]:He[Ie.XRANGE];return t.replace(r,(n,i,s,a,o,u)=>{Ce("xRange",t,n,i,s,a,o,u);const l=Ke(s),h=l||Ke(a),f=h||Ke(o),c=f;return i==="="&&c&&(i=""),u=e.includePrerelease?"-0":"",l?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&c?(h&&(a=0),o=0,i===">"?(i=">=",h?(s=+s+1,a=0,o=0):(a=+a+1,o=0)):i==="<="&&(i="<",h?s=+s+1:a=+a+1),i==="<"&&(u="-0"),n=`${i+s}.${a}.${o}${u}`):h?n=`>=${s}.0.0${u} <${+s+1}.0.0-0`:f&&(n=`>=${s}.${a}.0${u} <${s}.${+a+1}.0-0`),Ce("xRange return",n),n})},G$=(t,e)=>(Ce("replaceStars",t,e),t.trim().replace(He[Ie.STAR],"")),z$=(t,e)=>(Ce("replaceGTE0",t,e),t.trim().replace(He[e.includePrerelease?Ie.GTE0PRE:Ie.GTE0],"")),V$=t=>(e,r,n,i,s,a,o,u,l,h,f,c,m)=>(Ke(n)?r="":Ke(i)?r=`>=${n}.0.0${t?"-0":""}`:Ke(s)?r=`>=${n}.${i}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,Ke(l)?u="":Ke(h)?u=`<${+l+1}.0.0-0`:Ke(f)?u=`<${l}.${+h+1}.0-0`:c?u=`<=${l}.${h}.${f}-${c}`:t?u=`<${l}.${h}.${+f+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),W$=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(Ce(t[n].semver),t[n].semver!==Tu.ANY&&t[n].semver.prerelease.length>0){const i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0},Rn=Symbol("SemVer ANY");class os{static get ANY(){return Rn}constructor(e,r){if(r=K$(r),e instanceof os){if(e.loose===!!r.loose)return e;e=e.value}Ou("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Rn?this.value="":this.value=this.operator+this.semver.version,Ou("comp",this)}parse(e){const r=this.options.loose?Lp[Bp.COMPARATORLOOSE]:Lp[Bp.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Np(n[2],this.options.loose):this.semver=Rn}toString(){return this.value}test(e){if(Ou("Comparator.test",e,this.options.loose),this.semver===Rn||e===Rn)return!0;if(typeof e=="string")try{e=new Np(e,this.options)}catch{return!1}return $u(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof os))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Mp(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new Mp(this.value,r).test(e.semver);const n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),o=$u(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=$u(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||s&&a||o||u}}var ns=os;const K$=Xi,{re:Lp,t:Bp}=Wt.exports,$u=Tp,Ou=Yi,Np=We,Mp=vt,Y$=vt,X$=(t,e,r)=>{try{e=new Y$(e,r)}catch{return!1}return e.test(t)};var is=X$;const Q$=vt,J$=(t,e)=>new Q$(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Z$=J$;const eO=We,tO=vt,rO=(t,e,r)=>{let n=null,i=null,s=null;try{s=new tO(e,r)}catch{return null}return t.forEach(a=>{s.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new eO(n,r))}),n};var nO=rO;const iO=We,sO=vt,aO=(t,e,r)=>{let n=null,i=null,s=null;try{s=new sO(e,r)}catch{return null}return t.forEach(a=>{s.test(a)&&(!n||i.compare(a)===1)&&(n=a,i=new iO(n,r))}),n};var oO=aO;const Fu=We,uO=vt,jp=Zi,lO=(t,e)=>{t=new uO(t,e);let r=new Fu("0.0.0");if(t.test(r)||(r=new Fu("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){const i=t.set[n];let s=null;i.forEach(a=>{const o=new Fu(a.semver.version);switch(a.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!s||jp(o,s))&&(s=o);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!r||jp(r,s))&&(r=s)}return r&&t.test(r)?r:null};var cO=lO;const hO=vt,fO=(t,e)=>{try{return new hO(t,e).range||"*"}catch{return null}};var dO=fO;const pO=We,Hp=ns,{ANY:mO}=Hp,gO=vt,yO=is,Up=Zi,qp=Su,vO=Au,bO=Cu,DO=(t,e,r,n)=>{t=new pO(t,n),e=new gO(e,n);let i,s,a,o,u;switch(r){case">":i=Up,s=vO,a=qp,o=">",u=">=";break;case"<":i=qp,s=bO,a=Up,o="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(yO(t,e,n))return!1;for(let l=0;l<e.set.length;++l){const h=e.set[l];let f=null,c=null;if(h.forEach(m=>{m.semver===mO&&(m=new Hp(">=0.0.0")),f=f||m,c=c||m,i(m.semver,f.semver,n)?f=m:a(m.semver,c.semver,n)&&(c=m)}),f.operator===o||f.operator===u||(!c.operator||c.operator===o)&&s(t,c.semver))return!1;if(c.operator===u&&a(t,c.semver))return!1}return!0};var Pu=DO;const wO=Pu,EO=(t,e,r)=>wO(t,e,">",r);var _O=EO;const SO=Pu,CO=(t,e,r)=>SO(t,e,"<",r);var AO=CO;const Gp=vt,RO=(t,e,r)=>(t=new Gp(t,r),e=new Gp(e,r),t.intersects(e));var xO=RO;const TO=is,$O=gt;var OO=(t,e,r)=>{const n=[];let i=null,s=null;const a=t.sort((h,f)=>$O(h,f,r));for(const h of a)TO(h,e,r)?(s=h,i||(i=h)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const o=[];for(const[h,f]of n)h===f?o.push(h):!f&&h===a[0]?o.push("*"):f?h===a[0]?o.push(`<=${f}`):o.push(`${h} - ${f}`):o.push(`>=${h}`);const u=o.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e};const zp=vt,ss=ns,{ANY:ku}=ss,xn=is,Iu=gt,FO=(t,e,r={})=>{if(t===e)return!0;t=new zp(t,r),e=new zp(e,r);let n=!1;e:for(const i of t.set){for(const s of e.set){const a=PO(i,s,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},PO=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===ku){if(e.length===1&&e[0].semver===ku)return!0;r.includePrerelease?t=[new ss(">=0.0.0-0")]:t=[new ss(">=0.0.0")]}if(e.length===1&&e[0].semver===ku){if(r.includePrerelease)return!0;e=[new ss(">=0.0.0")]}const n=new Set;let i,s;for(const m of t)m.operator===">"||m.operator===">="?i=Vp(i,m,r):m.operator==="<"||m.operator==="<="?s=Wp(s,m,r):n.add(m.semver);if(n.size>1)return null;let a;if(i&&s){if(a=Iu(i.semver,s.semver,r),a>0)return null;if(a===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const m of n){if(i&&!xn(m,String(i),r)||s&&!xn(m,String(s),r))return null;for(const p of e)if(!xn(m,String(p),r))return!1;return!0}let o,u,l,h,f=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,c=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&s.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(const m of e){if(h=h||m.operator===">"||m.operator===">=",l=l||m.operator==="<"||m.operator==="<=",i){if(c&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===c.major&&m.semver.minor===c.minor&&m.semver.patch===c.patch&&(c=!1),m.operator===">"||m.operator===">="){if(o=Vp(i,m,r),o===m&&o!==i)return!1}else if(i.operator===">="&&!xn(i.semver,String(m),r))return!1}if(s){if(f&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===f.major&&m.semver.minor===f.minor&&m.semver.patch===f.patch&&(f=!1),m.operator==="<"||m.operator==="<="){if(u=Wp(s,m,r),u===m&&u!==s)return!1}else if(s.operator==="<="&&!xn(s.semver,String(m),r))return!1}if(!m.operator&&(s||i)&&a!==0)return!1}return!(i&&l&&!s&&a!==0||s&&h&&!i&&a!==0||c||f)},Vp=(t,e,r)=>{if(!t)return e;const n=Iu(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},Wp=(t,e,r)=>{if(!t)return e;const n=Iu(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var kO=FO;const Lu=Wt.exports;var IO={re:Lu.re,src:Lu.src,tokens:Lu.t,SEMVER_SPEC_VERSION:Ki.SEMVER_SPEC_VERSION,SemVer:We,compareIdentifiers:wu.compareIdentifiers,rcompareIdentifiers:wu.rcompareIdentifiers,parse:Ur,valid:yT,clean:DT,inc:_T,diff:TT,major:FT,minor:IT,patch:NT,prerelease:HT,compare:gt,rcompare:GT,compareLoose:WT,compareBuild:_u,sort:QT,rsort:e$,gt:Zi,lt:Su,eq:Eu,neq:xp,gte:Cu,lte:Au,cmp:Tp,coerce:w$,Comparator:ns,Range:vt,satisfies:is,toComparators:Z$,maxSatisfying:nO,minSatisfying:oO,minVersion:cO,validRange:dO,outside:Pu,gtr:_O,ltr:AO,intersects:xO,simplifyRange:OO,subset:kO};const{Agent:LO}=kn,{Agent:BO}=ps,NO=No.exports,MO=gu.exports,jO=Xx,HO=IO,Kp={keepAlive:!0,maxSockets:50},UO=new LO(Kp),qO=new BO(Kp);class Yp extends Error{constructor(e){super(`Package \`${e}\` could not be found`);this.name="PackageNotFoundError"}}class Xp extends Error{constructor(e,r){super(`Version \`${r}\` for package \`${e}\` could not be found`);this.name="VersionNotFoundError"}}const Qp=async(t,e)=>{e={version:"latest",...e};const r=t.split("/")[0],n=e.registryUrl||MO(r),i=new URL(encodeURIComponent(t).replace(/^%40/,"@"),n),s=jO(n.toString(),{recursive:!0}),a={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};e.fullMetadata&&delete a.accept,s&&(a.authorization=`${s.type} ${s.token}`);const o={headers:a,agent:{http:UO,https:qO}};e.agent&&(o.agent=e.agent);let u;try{u=await NO(i,o).json()}catch(f){throw f.response.statusCode===404?new Yp(t):f}if(e.allVersions)return u;let{version:l}=e;const h=new Xp(t,l);if(u["dist-tags"][l])u=u.versions[u["dist-tags"][l]];else if(l){if(!u.versions[l]){const f=Object.keys(u.versions);if(l=HO.maxSatisfying(f,l),!l)throw h}if(u=u.versions[l],!u)throw h}return u};Mi.exports=Qp,Mi.exports.default=Qp,Mi.exports.PackageNotFoundError=Yp,Mi.exports.VersionNotFoundError=Xp;const GO=()=>{const{env:t}=ht;return t.SUDO_USER||t.C9_USER||t.LOGNAME||t.USER||t.LNAME||t.USERNAME},zO=()=>{try{return Qu.userInfo().username}catch{return null}},VO=t=>t.replace(/^.*\\/,""),WO=t=>`no-username-${t}`,KO=async()=>{const t=GO();if(t)return t;const e=zO();if(e)return e;try{if(ht.platform==="win32"){const{stdout:n}=await ai("whoami");return VO(n)}const{stdout:r}=await ai("id",["-u"]);try{const{stdout:n}=await ai("id",["-un",r]);return n}catch{}return WO(r)}catch{return null}},YO=async(t,e=S0)=>{const r=[];t.name||r.push({type:"input",name:"name",message:"How would you like to name the app?"}),t.description||r.push({type:"input",name:"description",message:"What's the application for?"});const n=await e(r);return{...t,...n}};var XO="@shopify/cli",QO="0.12.0",JO="A CLI tool to build for the Shopify platform",ZO="module",eF="src/index.js",tF="src/index.js",rF={".":"./src/index.js"},nF=["shopify","shopify-cli","shopify-partners"],iF="MIT",sF={shopify:"./bin/shopify-run.js"},aF=["/bin","/dist","/npm-shrinkwrap.json","/oclif.manifest.json"],oF={access:"public","@shopify:registry":"https://registry.npmjs.org"},uF={clean:"shx rm -rf dist",build:"shx rm -rf dist && rollup -c",prepack:"cross-env NODE_ENV=production yarn run build",lint:"prettier -c src/** && eslint src/**","lint:fix":"prettier src/** && eslint src/** --fix",test:"shx rm -rf dist && vitest run","test:watch":"vitest watch",tsc:"tsc -b"},lF={extends:["../../package.json"]},cF={"@bugsnag/js":"^7.14.1","@oclif/core":"0.5.10","@shopify/cli-kit":"0.12.0"},hF={node:"^12.20.0 || ^14.13.1 || >=16.0.0"},fF=["darwin","linux","win32"],dF={bin:"shopify",commands:"dist/commands",plugins:[]},pF={name:XO,version:QO,private:!1,description:JO,type:ZO,main:eF,module:tF,exports:rF,keywords:nF,license:iF,bin:sF,files:aF,publishConfig:oF,scripts:uF,eslintConfig:lF,dependencies:cF,"engine-strict":!0,engines:hF,os:fF,oclif:dF};async function mF(t){const e=await q1(`templates/${t}`,{cwd:Ba(gm(import.meta.url)),type:"directory"});if(e)return e;throw new pc(`Couldn't find the template ${t} in @shopify/create-app.`)}async function gF(t){const e=await KO()??"",r=await mF("app"),n=pF.version,i=mi(t.directory,E1(t.name));await C0([{title:"Creating the app",task:async()=>vF({...t,outputDirectory:i,templatePath:r,cliVersion:n,user:e})},{title:"Installing dependencies",task:async()=>yF(i)}]),OA($A`App successfully created at ${xA.path(i)}`)}async function yF(t){await PA(t,FA())}async function vF(t){const r=(await EA(mi(t.templatePath,"**/*"))).map(i=>i.split("/")).sort((i,s)=>i.length<s.length?1:-1).map(i=>i.join("/")),n={name:t.name,description:t.description,shopify_cli_version:t.cliVersion,author:t.user};r.forEach(async i=>{const s=await xh(mi(t.outputDirectory,Fh(t.templatePath,i)))(n);if(CA(i))await id(s);else{await id(Ba(s));const a=await _A(i),o=await xh(a)(n);await SA(s,o)}})}const Jp=class extends nm{async run(){const{flags:t}=await this.parse(Jp),e=t.path?Oh(t.path):process.cwd(),r=await YO({name:t.name,description:t.description});await gF({name:r.name,description:r.description,directory:e})}};let Bu=Jp;Bu.description="Create a new Shopify app",Bu.flags={name:hs.string({char:"n",description:"The name of the app to be initialized.",hidden:!1}),path:hs.string({char:"p",description:"The path to the directory where the app will be created.",hidden:!1}),description:hs.string({char:"d",description:"The description of the app that will be created",hidden:!1})};export{Bu as default};
|
|
153
|
+
*/function mp(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function gp(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function yp(t){var e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=yp(r):mp(r)?e[n]=gp(r):e[n]=xu({},r):e[n]=r}),e}function vp(t,e){return e==="__proto__"?void 0:t[e]}var xu=pp.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,n;return e.forEach(function(i){typeof i!="object"||i===null||Array.isArray(i)||Object.keys(i).forEach(function(s){if(n=vp(t,s),r=vp(i,s),r!==t)if(typeof r!="object"||r===null){t[s]=r;return}else if(Array.isArray(r)){t[s]=yp(r);return}else if(mp(r)){t[s]=gp(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[s]=xu({},r);return}else{t[s]=xu(n,r);return}})}),t},ix=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(S){r.bools[S]=!0});var n={};Object.keys(e.alias||{}).forEach(function(S){n[S]=[].concat(e.alias[S]),n[S].forEach(function(v){n[v]=[S].concat(n[S].filter(function(d){return v!==d}))})}),[].concat(e.string).filter(Boolean).forEach(function(S){r.strings[S]=!0,n[S]&&(r.strings[n[S]]=!0)});var i=e.default||{},s={_:[]};Object.keys(r.bools).forEach(function(S){u(S,i[S]===void 0?!1:i[S])});var a=[];t.indexOf("--")!==-1&&(a=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));function o(S,v){return r.allBools&&/^--[^=]+$/.test(v)||r.strings[S]||r.bools[S]||n[S]}function u(S,v,d){if(!(d&&r.unknownFn&&!o(S,d)&&r.unknownFn(d)===!1)){var w=!r.strings[S]&&bp(v)?Number(v):v;l(s,S.split("."),w),(n[S]||[]).forEach(function(x){l(s,x.split("."),w)})}}function l(S,v,d){for(var w=S,x=0;x<v.length-1;x++){var $=v[x];if($==="__proto__")return;w[$]===void 0&&(w[$]={}),(w[$]===Object.prototype||w[$]===Number.prototype||w[$]===String.prototype)&&(w[$]={}),w[$]===Array.prototype&&(w[$]=[]),w=w[$]}var $=v[v.length-1];$!=="__proto__"&&((w===Object.prototype||w===Number.prototype||w===String.prototype)&&(w={}),w===Array.prototype&&(w=[]),w[$]===void 0||r.bools[$]||typeof w[$]=="boolean"?w[$]=d:Array.isArray(w[$])?w[$].push(d):w[$]=[w[$],d])}function h(S){return n[S].some(function(v){return r.bools[v]})}for(var f=0;f<t.length;f++){var c=t[f];if(/^--.+=/.test(c)){var m=c.match(/^--([^=]+)=([\s\S]*)$/),p=m[1],y=m[2];r.bools[p]&&(y=y!=="false"),u(p,y,c)}else if(/^--no-.+/.test(c)){var p=c.match(/^--no-(.+)/)[1];u(p,!1,c)}else if(/^--.+/.test(c)){var p=c.match(/^--(.+)/)[1],b=t[f+1];b!==void 0&&!/^-/.test(b)&&!r.bools[p]&&!r.allBools&&(n[p]?!h(p):!0)?(u(p,b,c),f++):/^(true|false)$/.test(b)?(u(p,b==="true",c),f++):u(p,r.strings[p]?"":!0,c)}else if(/^-[^-]+/.test(c)){for(var D=c.slice(1,-1).split(""),_=!1,R=0;R<D.length;R++){var b=c.slice(R+2);if(b==="-"){u(D[R],b,c);continue}if(/[A-Za-z]/.test(D[R])&&/=/.test(b)){u(D[R],b.split("=")[1],c),_=!0;break}if(/[A-Za-z]/.test(D[R])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(b)){u(D[R],b,c),_=!0;break}if(D[R+1]&&D[R+1].match(/\W/)){u(D[R],c.slice(R+2),c),_=!0;break}else u(D[R],r.strings[D[R]]?"":!0,c)}var p=c.slice(-1)[0];!_&&p!=="-"&&(t[f+1]&&!/^(-|--)[^-]/.test(t[f+1])&&!r.bools[p]&&(n[p]?!h(p):!0)?(u(p,t[f+1],c),f++):t[f+1]&&/^(true|false)$/.test(t[f+1])?(u(p,t[f+1]==="true",c),f++):u(p,r.strings[p]?"":!0,c))}else if((!r.unknownFn||r.unknownFn(c)!==!1)&&s._.push(r.strings._||!bp(c)?c:Number(c)),e.stopEarly){s._.push.apply(s._,t.slice(f+1));break}}return Object.keys(i).forEach(function(S){sx(s,S.split("."))||(l(s,S.split("."),i[S]),(n[S]||[]).forEach(function(v){l(s,v.split("."),i[S])}))}),e["--"]?(s["--"]=new Array,a.forEach(function(S){s["--"].push(S)})):a.forEach(function(S){s._.push(S)}),s};function sx(t,e){var r=t;e.slice(0,-1).forEach(function(i){r=r[i]||{}});var n=e[e.length-1];return n in r}function bp(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}var Tn=qr,zr=we.join,ax=pp.exports,Dp="/etc",wp=process.platform==="win32",xn=wp?process.env.USERPROFILE:process.env.HOME,Ep=function(t,e,r,n){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=ix(process.argv.slice(2))),e=(typeof e=="string"?Tn.json(e):e)||{},n=n||Tn.parse;var i=Tn.env(t+"_"),s=[e],a=[];function o(u){if(!(a.indexOf(u)>=0)){var l=Tn.file(u);l&&(s.push(n(l)),a.push(u))}}return wp||[zr(Dp,t,"config"),zr(Dp,t+"rc")].forEach(o),xn&&[zr(xn,".config",t,"config"),zr(xn,".config",t),zr(xn,"."+t,"config"),zr(xn,"."+t+"rc")].forEach(o),o(Tn.find("."+t+"rc")),i.config&&o(i.config),r.config&&o(r.config),ax.apply(null,s.concat([i,r,a.length?{configs:a,config:a[a.length-1]}:void 0]))};const ox=Ep,_p=t=>{const e=ox("npm",{registry:"https://registry.npmjs.org/"}),r=e[`${t}:registry`]||e.config_registry||e.registry;return r.slice(-1)==="/"?r:`${r}/`};Au.exports=_p,Au.exports.default=_p;function ux(t){return Buffer.from(t,"base64").toString("utf8")}function lx(t){return Buffer.from(t,"utf8").toString("base64")}var cx={decodeBase64:ux,encodeBase64:lx},$u=Qr,Sp=cx,hx=Sp.decodeBase64,fx=Sp.encodeBase64,Cp=":_authToken",Ap=":_auth",Rp=":username",Tp=":_password",dx=function(){var t,e;return arguments.length>=2?(t=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?t=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||Ep("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,xp(t,e)||px(e.npmrc)};function xp(t,e){for(var r=$u.parse(t,!1,!0),n;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";var i="//"+r.host+n.replace(/\/$/,""),s=gx(i,e.npmrc);if(s)return s;if(!e.recursive)return/\/$/.test(t)?void 0:xp($u.resolve(t,"."),e);r.pathname=$u.resolve(mx(n),"..")||"/"}}function px(t){if(!!t._auth){var e=Ji(t._auth);return{token:e,type:"Basic"}}}function mx(t){return t[t.length-1]==="/"?t:t+"/"}function gx(t,e){var r=yx(e[t+Cp]||e[t+"/"+Cp]);if(r)return r;var n=e[t+Rp]||e[t+"/"+Rp],i=e[t+Tp]||e[t+"/"+Tp],s=vx(n,i);if(s)return s;var a=bx(e[t+Ap]||e[t+"/"+Ap]);if(a)return a}function Ji(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function yx(t){if(!!t){var e=Ji(t);return{token:e,type:"Bearer"}}}function vx(t,e){if(!(!t||!e)){var r=hx(Ji(e)),n=fx(t+":"+r);return{token:n,type:"Basic",password:r,username:t}}}function bx(t){if(!!t){var e=Ji(t);return{token:e,type:"Basic"}}}var Xt={exports:{}};const Dx="2.0.0",wx=256,Ex=Number.MAX_SAFE_INTEGER||9007199254740991,_x=16;var Zi={SEMVER_SPEC_VERSION:Dx,MAX_LENGTH:wx,MAX_SAFE_INTEGER:Ex,MAX_SAFE_COMPONENT_LENGTH:_x};const Sx=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var es=Sx;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r}=Zi,n=es;e=t.exports={};const i=e.re=[],s=e.src=[],a=e.t={};let o=0;const u=(l,h,f)=>{const c=o++;n(c,h),a[l]=c,s[c]=h,i[c]=new RegExp(h,f?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","[0-9]+"),u("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),u("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER","[0-9A-Za-z-]+"),u("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),u("FULL",`^${s[a.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),u("LOOSE",`^${s[a.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),u("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),u("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),u("COERCERTL",s[a.COERCE],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",u("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",u("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0.0.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")})(Xt,Xt.exports);const Cx=["includePrerelease","loose","rtl"],Ax=t=>t?typeof t!="object"?{loose:!0}:Cx.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};var ts=Ax;const $p=/^[0-9]+$/,Op=(t,e)=>{const r=$p.test(t),n=$p.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},Rx=(t,e)=>Op(e,t);var Ou={compareIdentifiers:Op,rcompareIdentifiers:Rx};const rs=es,{MAX_LENGTH:Fp,MAX_SAFE_INTEGER:ns}=Zi,{re:Pp,t:kp}=Xt.exports,Tx=ts,{compareIdentifiers:$n}=Ou;class wt{constructor(e,r){if(r=Tx(r),e instanceof wt){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Fp)throw new TypeError(`version is longer than ${Fp} characters`);rs("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?Pp[kp.LOOSE]:Pp[kp.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>ns||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ns||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ns||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s<ns)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(rs("SemVer.compare",this.version,this.options,e),!(e instanceof wt)){if(typeof e=="string"&&e===this.version)return 0;e=new wt(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof wt||(e=new wt(e,this.options)),$n(this.major,e.major)||$n(this.minor,e.minor)||$n(this.patch,e.patch)}comparePre(e){if(e instanceof wt||(e=new wt(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],i=e.prerelease[r];if(rs("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return $n(n,i)}while(++r)}compareBuild(e){e instanceof wt||(e=new wt(e,this.options));let r=0;do{const n=this.build[r],i=e.build[r];if(rs("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return $n(n,i)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);n===-1&&this.prerelease.push(0)}r&&(this.prerelease[0]===r?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}var Ye=wt;const{MAX_LENGTH:xx}=Zi,{re:Ip,t:Lp}=Xt.exports,Bp=Ye,$x=ts,Ox=(t,e)=>{if(e=$x(e),t instanceof Bp)return t;if(typeof t!="string"||t.length>xx||!(e.loose?Ip[Lp.LOOSE]:Ip[Lp.FULL]).test(t))return null;try{return new Bp(t,e)}catch{return null}};var Vr=Ox;const Fx=Vr,Px=(t,e)=>{const r=Fx(t,e);return r?r.version:null};var kx=Px;const Ix=Vr,Lx=(t,e)=>{const r=Ix(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var Bx=Lx;const Nx=Ye,Mx=(t,e,r,n)=>{typeof r=="string"&&(n=r,r=void 0);try{return new Nx(t,r).inc(e,n).version}catch{return null}};var jx=Mx;const Np=Ye,Hx=(t,e,r)=>new Np(t,r).compare(new Np(e,r));var vt=Hx;const Ux=vt,qx=(t,e,r)=>Ux(t,e,r)===0;var Fu=qx;const Mp=Vr,Gx=Fu,zx=(t,e)=>{if(Gx(t,e))return null;{const r=Mp(t),n=Mp(e),i=r.prerelease.length||n.prerelease.length,s=i?"pre":"",a=i?"prerelease":"";for(const o in r)if((o==="major"||o==="minor"||o==="patch")&&r[o]!==n[o])return s+o;return a}};var Vx=zx;const Wx=Ye,Yx=(t,e)=>new Wx(t,e).major;var Kx=Yx;const Xx=Ye,Qx=(t,e)=>new Xx(t,e).minor;var Jx=Qx;const Zx=Ye,e$=(t,e)=>new Zx(t,e).patch;var t$=e$;const r$=Vr,n$=(t,e)=>{const r=r$(t,e);return r&&r.prerelease.length?r.prerelease:null};var i$=n$;const s$=vt,a$=(t,e,r)=>s$(e,t,r);var o$=a$;const u$=vt,l$=(t,e)=>u$(t,e,!0);var c$=l$;const jp=Ye,h$=(t,e,r)=>{const n=new jp(t,r),i=new jp(e,r);return n.compare(i)||n.compareBuild(i)};var Pu=h$;const f$=Pu,d$=(t,e)=>t.sort((r,n)=>f$(r,n,e));var p$=d$;const m$=Pu,g$=(t,e)=>t.sort((r,n)=>m$(n,r,e));var y$=g$;const v$=vt,b$=(t,e,r)=>v$(t,e,r)>0;var is=b$;const D$=vt,w$=(t,e,r)=>D$(t,e,r)<0;var ku=w$;const E$=vt,_$=(t,e,r)=>E$(t,e,r)!==0;var Hp=_$;const S$=vt,C$=(t,e,r)=>S$(t,e,r)>=0;var Iu=C$;const A$=vt,R$=(t,e,r)=>A$(t,e,r)<=0;var Lu=R$;const T$=Fu,x$=Hp,$$=is,O$=Iu,F$=ku,P$=Lu,k$=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return T$(t,r,n);case"!=":return x$(t,r,n);case">":return $$(t,r,n);case">=":return O$(t,r,n);case"<":return F$(t,r,n);case"<=":return P$(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var Up=k$;const I$=Ye,L$=Vr,{re:ss,t:as}=Xt.exports,B$=(t,e)=>{if(t instanceof I$)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(ss[as.COERCE]);else{let n;for(;(n=ss[as.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),ss[as.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;ss[as.COERCERTL].lastIndex=-1}return r===null?null:L$(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};var N$=B$,M$=Q;Q.Node=pr,Q.create=Q;function Q(t){var e=this;if(e instanceof Q||(e=new Q),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)e.push(arguments[r]);return e}Q.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e},Q.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},Q.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}},Q.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)H$(this,arguments[t]);return this.length},Q.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)U$(this,arguments[t]);return this.length},Q.prototype.pop=function(){if(!!this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},Q.prototype.shift=function(){if(!!this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},Q.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,n=0;r!==null;n++)t.call(e,r.value,n,this),r=r.next},Q.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,n=this.length-1;r!==null;n--)t.call(e,r.value,n,this),r=r.prev},Q.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value},Q.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value},Q.prototype.map=function(t,e){e=e||this;for(var r=new Q,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r},Q.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Q,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r},Q.prototype.reduce=function(t,e){var r,n=this.head;if(arguments.length>1)r=e;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=t(r,n.value,i),n=n.next;return r},Q.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=t(r,n.value,i),n=n.prev;return r},Q.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t},Q.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t},Q.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Q;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)r.push(i.value);return r},Q.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Q;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>t;n--,i=i.prev)r.push(i.value);return r},Q.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(var s=[],n=0;i&&n<e;n++)s.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=j$(this,i,r[n]);return s},Q.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=e,this.tail=t,this};function j$(t,e,r){var n=e===t.head?new pr(r,null,e,t):new pr(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function H$(t,e){t.tail=new pr(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function U$(t,e){t.head=new pr(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function pr(t,e,r,n){if(!(this instanceof pr))return new pr(t,e,r,n);this.list=n,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{require("./iterator.js")(Q)}catch{}const q$=M$,mr=Symbol("max"),Nt=Symbol("length"),Wr=Symbol("lengthCalculator"),On=Symbol("allowStale"),gr=Symbol("maxAge"),Mt=Symbol("dispose"),qp=Symbol("noDisposeOnSet"),Te=Symbol("lruList"),bt=Symbol("cache"),Gp=Symbol("updateAgeOnGet"),Bu=()=>1;class G${constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[mr]=e.max||1/0;const r=e.length||Bu;if(this[Wr]=typeof r!="function"?Bu:r,this[On]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[gr]=e.maxAge||0,this[Mt]=e.dispose,this[qp]=e.noDisposeOnSet||!1,this[Gp]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[mr]=e||1/0,Fn(this)}get max(){return this[mr]}set allowStale(e){this[On]=!!e}get allowStale(){return this[On]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[gr]=e,Fn(this)}get maxAge(){return this[gr]}set lengthCalculator(e){typeof e!="function"&&(e=Bu),e!==this[Wr]&&(this[Wr]=e,this[Nt]=0,this[Te].forEach(r=>{r.length=this[Wr](r.value,r.key),this[Nt]+=r.length})),Fn(this)}get lengthCalculator(){return this[Wr]}get length(){return this[Nt]}get itemCount(){return this[Te].length}rforEach(e,r){r=r||this;for(let n=this[Te].tail;n!==null;){const i=n.prev;zp(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[Te].head;n!==null;){const i=n.next;zp(this,e,n,r),n=i}}keys(){return this[Te].toArray().map(e=>e.key)}values(){return this[Te].toArray().map(e=>e.value)}reset(){this[Mt]&&this[Te]&&this[Te].length&&this[Te].forEach(e=>this[Mt](e.key,e.value)),this[bt]=new Map,this[Te]=new q$,this[Nt]=0}dump(){return this[Te].map(e=>os(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Te]}set(e,r,n){if(n=n||this[gr],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const i=n?Date.now():0,s=this[Wr](r,e);if(this[bt].has(e)){if(s>this[mr])return Yr(this,this[bt].get(e)),!1;const u=this[bt].get(e).value;return this[Mt]&&(this[qp]||this[Mt](e,u.value)),u.now=i,u.maxAge=n,u.value=r,this[Nt]+=s-u.length,u.length=s,this.get(e),Fn(this),!0}const a=new z$(e,r,s,i,n);return a.length>this[mr]?(this[Mt]&&this[Mt](e,r),!1):(this[Nt]+=a.length,this[Te].unshift(a),this[bt].set(e,this[Te].head),Fn(this),!0)}has(e){if(!this[bt].has(e))return!1;const r=this[bt].get(e).value;return!os(this,r)}get(e){return Nu(this,e,!0)}peek(e){return Nu(this,e,!1)}pop(){const e=this[Te].tail;return e?(Yr(this,e),e.value):null}del(e){Yr(this,this[bt].get(e))}load(e){this.reset();const r=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],s=i.e||0;if(s===0)this.set(i.k,i.v);else{const a=s-r;a>0&&this.set(i.k,i.v,a)}}}prune(){this[bt].forEach((e,r)=>Nu(this,r,!1))}}const Nu=(t,e,r)=>{const n=t[bt].get(e);if(n){const i=n.value;if(os(t,i)){if(Yr(t,n),!t[On])return}else r&&(t[Gp]&&(n.value.now=Date.now()),t[Te].unshiftNode(n));return i.value}},os=(t,e)=>{if(!e||!e.maxAge&&!t[gr])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[gr]&&r>t[gr]},Fn=t=>{if(t[Nt]>t[mr])for(let e=t[Te].tail;t[Nt]>t[mr]&&e!==null;){const r=e.prev;Yr(t,e),e=r}},Yr=(t,e)=>{if(e){const r=e.value;t[Mt]&&t[Mt](r.key,r.value),t[Nt]-=r.length,t[bt].delete(r.key),t[Te].removeNode(e)}};class z${constructor(e,r,n,i,s){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const zp=(t,e,r,n)=>{let i=r.value;os(t,i)&&(Yr(t,r),t[On]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};var V$=G$;class In{constructor(e,r){if(r=Y$(r),e instanceof In)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new In(e.raw,r);if(e instanceof Mu)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const n=this.set[0];if(this.set=this.set.filter(i=>!Wp(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(const i of this.set)if(i.length===1&&Z$(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=Vp.get(n);if(i)return i;const s=this.options.loose,a=s?Ue[Le.HYPHENRANGELOOSE]:Ue[Le.HYPHENRANGE];e=e.replace(a,lO(this.options.includePrerelease)),Ce("hyphen replace",e),e=e.replace(Ue[Le.COMPARATORTRIM],X$),Ce("comparator trim",e,Ue[Le.COMPARATORTRIM]),e=e.replace(Ue[Le.TILDETRIM],Q$),e=e.replace(Ue[Le.CARETTRIM],J$),e=e.split(/\s+/).join(" ");const o=s?Ue[Le.COMPARATORLOOSE]:Ue[Le.COMPARATOR],u=e.split(" ").map(f=>eO(f,this.options)).join(" ").split(/\s+/).map(f=>uO(f,this.options)).filter(this.options.loose?f=>!!f.match(o):()=>!0).map(f=>new Mu(f,this.options));u.length;const l=new Map;for(const f of u){if(Wp(f))return[f];l.set(f.value,f)}l.size>1&&l.has("")&&l.delete("");const h=[...l.values()];return Vp.set(n,h),h}intersects(e,r){if(!(e instanceof In))throw new TypeError("a Range is required");return this.set.some(n=>Yp(n,r)&&e.set.some(i=>Yp(i,r)&&n.every(s=>i.every(a=>s.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new K$(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(cO(this.set[r],e,this.options))return!0;return!1}}var Dt=In;const W$=V$,Vp=new W$({max:1e3}),Y$=ts,Mu=us,Ce=es,K$=Ye,{re:Ue,t:Le,comparatorTrimReplace:X$,tildeTrimReplace:Q$,caretTrimReplace:J$}=Xt.exports,Wp=t=>t.value==="<0.0.0-0",Z$=t=>t.value==="",Yp=(t,e)=>{let r=!0;const n=t.slice();let i=n.pop();for(;r&&n.length;)r=n.every(s=>i.intersects(s,e)),i=n.pop();return r},eO=(t,e)=>(Ce("comp",t,e),t=nO(t,e),Ce("caret",t),t=tO(t,e),Ce("tildes",t),t=sO(t,e),Ce("xrange",t),t=oO(t,e),Ce("stars",t),t),Ke=t=>!t||t.toLowerCase()==="x"||t==="*",tO=(t,e)=>t.trim().split(/\s+/).map(r=>rO(r,e)).join(" "),rO=(t,e)=>{const r=e.loose?Ue[Le.TILDELOOSE]:Ue[Le.TILDE];return t.replace(r,(n,i,s,a,o)=>{Ce("tilde",t,n,i,s,a,o);let u;return Ke(i)?u="":Ke(s)?u=`>=${i}.0.0 <${+i+1}.0.0-0`:Ke(a)?u=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:o?(Ce("replaceTilde pr",o),u=`>=${i}.${s}.${a}-${o} <${i}.${+s+1}.0-0`):u=`>=${i}.${s}.${a} <${i}.${+s+1}.0-0`,Ce("tilde return",u),u})},nO=(t,e)=>t.trim().split(/\s+/).map(r=>iO(r,e)).join(" "),iO=(t,e)=>{Ce("caret",t,e);const r=e.loose?Ue[Le.CARETLOOSE]:Ue[Le.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,s,a,o,u)=>{Ce("caret",t,i,s,a,o,u);let l;return Ke(s)?l="":Ke(a)?l=`>=${s}.0.0${n} <${+s+1}.0.0-0`:Ke(o)?s==="0"?l=`>=${s}.${a}.0${n} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.0${n} <${+s+1}.0.0-0`:u?(Ce("replaceCaret pr",u),s==="0"?a==="0"?l=`>=${s}.${a}.${o}-${u} <${s}.${a}.${+o+1}-0`:l=`>=${s}.${a}.${o}-${u} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.${o}-${u} <${+s+1}.0.0-0`):(Ce("no pr"),s==="0"?a==="0"?l=`>=${s}.${a}.${o}${n} <${s}.${a}.${+o+1}-0`:l=`>=${s}.${a}.${o}${n} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.${o} <${+s+1}.0.0-0`),Ce("caret return",l),l})},sO=(t,e)=>(Ce("replaceXRanges",t,e),t.split(/\s+/).map(r=>aO(r,e)).join(" ")),aO=(t,e)=>{t=t.trim();const r=e.loose?Ue[Le.XRANGELOOSE]:Ue[Le.XRANGE];return t.replace(r,(n,i,s,a,o,u)=>{Ce("xRange",t,n,i,s,a,o,u);const l=Ke(s),h=l||Ke(a),f=h||Ke(o),c=f;return i==="="&&c&&(i=""),u=e.includePrerelease?"-0":"",l?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&c?(h&&(a=0),o=0,i===">"?(i=">=",h?(s=+s+1,a=0,o=0):(a=+a+1,o=0)):i==="<="&&(i="<",h?s=+s+1:a=+a+1),i==="<"&&(u="-0"),n=`${i+s}.${a}.${o}${u}`):h?n=`>=${s}.0.0${u} <${+s+1}.0.0-0`:f&&(n=`>=${s}.${a}.0${u} <${s}.${+a+1}.0-0`),Ce("xRange return",n),n})},oO=(t,e)=>(Ce("replaceStars",t,e),t.trim().replace(Ue[Le.STAR],"")),uO=(t,e)=>(Ce("replaceGTE0",t,e),t.trim().replace(Ue[e.includePrerelease?Le.GTE0PRE:Le.GTE0],"")),lO=t=>(e,r,n,i,s,a,o,u,l,h,f,c,m)=>(Ke(n)?r="":Ke(i)?r=`>=${n}.0.0${t?"-0":""}`:Ke(s)?r=`>=${n}.${i}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,Ke(l)?u="":Ke(h)?u=`<${+l+1}.0.0-0`:Ke(f)?u=`<${l}.${+h+1}.0-0`:c?u=`<=${l}.${h}.${f}-${c}`:t?u=`<${l}.${h}.${+f+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),cO=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(Ce(t[n].semver),t[n].semver!==Mu.ANY&&t[n].semver.prerelease.length>0){const i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0},Pn=Symbol("SemVer ANY");class fs{static get ANY(){return Pn}constructor(e,r){if(r=hO(r),e instanceof fs){if(e.loose===!!r.loose)return e;e=e.value}Hu("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Pn?this.value="":this.value=this.operator+this.semver.version,Hu("comp",this)}parse(e){const r=this.options.loose?Kp[Xp.COMPARATORLOOSE]:Kp[Xp.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Qp(n[2],this.options.loose):this.semver=Pn}toString(){return this.value}test(e){if(Hu("Comparator.test",e,this.options.loose),this.semver===Pn||e===Pn)return!0;if(typeof e=="string")try{e=new Qp(e,this.options)}catch{return!1}return ju(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof fs))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Jp(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new Jp(this.value,r).test(e.semver);const n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),o=ju(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=ju(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||s&&a||o||u}}var us=fs;const hO=ts,{re:Kp,t:Xp}=Xt.exports,ju=Up,Hu=es,Qp=Ye,Jp=Dt,fO=Dt,dO=(t,e,r)=>{try{e=new fO(e,r)}catch{return!1}return e.test(t)};var ls=dO;const pO=Dt,mO=(t,e)=>new pO(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var gO=mO;const yO=Ye,vO=Dt,bO=(t,e,r)=>{let n=null,i=null,s=null;try{s=new vO(e,r)}catch{return null}return t.forEach(a=>{s.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new yO(n,r))}),n};var DO=bO;const wO=Ye,EO=Dt,_O=(t,e,r)=>{let n=null,i=null,s=null;try{s=new EO(e,r)}catch{return null}return t.forEach(a=>{s.test(a)&&(!n||i.compare(a)===1)&&(n=a,i=new wO(n,r))}),n};var SO=_O;const Uu=Ye,CO=Dt,Zp=is,AO=(t,e)=>{t=new CO(t,e);let r=new Uu("0.0.0");if(t.test(r)||(r=new Uu("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){const i=t.set[n];let s=null;i.forEach(a=>{const o=new Uu(a.semver.version);switch(a.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!s||Zp(o,s))&&(s=o);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!r||Zp(r,s))&&(r=s)}return r&&t.test(r)?r:null};var RO=AO;const TO=Dt,xO=(t,e)=>{try{return new TO(t,e).range||"*"}catch{return null}};var $O=xO;const OO=Ye,em=us,{ANY:FO}=em,PO=Dt,kO=ls,tm=is,rm=ku,IO=Lu,LO=Iu,BO=(t,e,r,n)=>{t=new OO(t,n),e=new PO(e,n);let i,s,a,o,u;switch(r){case">":i=tm,s=IO,a=rm,o=">",u=">=";break;case"<":i=rm,s=LO,a=tm,o="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(kO(t,e,n))return!1;for(let l=0;l<e.set.length;++l){const h=e.set[l];let f=null,c=null;if(h.forEach(m=>{m.semver===FO&&(m=new em(">=0.0.0")),f=f||m,c=c||m,i(m.semver,f.semver,n)?f=m:a(m.semver,c.semver,n)&&(c=m)}),f.operator===o||f.operator===u||(!c.operator||c.operator===o)&&s(t,c.semver))return!1;if(c.operator===u&&a(t,c.semver))return!1}return!0};var qu=BO;const NO=qu,MO=(t,e,r)=>NO(t,e,">",r);var jO=MO;const HO=qu,UO=(t,e,r)=>HO(t,e,"<",r);var qO=UO;const nm=Dt,GO=(t,e,r)=>(t=new nm(t,r),e=new nm(e,r),t.intersects(e));var zO=GO;const VO=ls,WO=vt;var YO=(t,e,r)=>{const n=[];let i=null,s=null;const a=t.sort((h,f)=>WO(h,f,r));for(const h of a)VO(h,e,r)?(s=h,i||(i=h)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const o=[];for(const[h,f]of n)h===f?o.push(h):!f&&h===a[0]?o.push("*"):f?h===a[0]?o.push(`<=${f}`):o.push(`${h} - ${f}`):o.push(`>=${h}`);const u=o.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e};const im=Dt,cs=us,{ANY:Gu}=cs,kn=ls,zu=vt,KO=(t,e,r={})=>{if(t===e)return!0;t=new im(t,r),e=new im(e,r);let n=!1;e:for(const i of t.set){for(const s of e.set){const a=XO(i,s,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},XO=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Gu){if(e.length===1&&e[0].semver===Gu)return!0;r.includePrerelease?t=[new cs(">=0.0.0-0")]:t=[new cs(">=0.0.0")]}if(e.length===1&&e[0].semver===Gu){if(r.includePrerelease)return!0;e=[new cs(">=0.0.0")]}const n=new Set;let i,s;for(const m of t)m.operator===">"||m.operator===">="?i=sm(i,m,r):m.operator==="<"||m.operator==="<="?s=am(s,m,r):n.add(m.semver);if(n.size>1)return null;let a;if(i&&s){if(a=zu(i.semver,s.semver,r),a>0)return null;if(a===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const m of n){if(i&&!kn(m,String(i),r)||s&&!kn(m,String(s),r))return null;for(const p of e)if(!kn(m,String(p),r))return!1;return!0}let o,u,l,h,f=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,c=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&s.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(const m of e){if(h=h||m.operator===">"||m.operator===">=",l=l||m.operator==="<"||m.operator==="<=",i){if(c&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===c.major&&m.semver.minor===c.minor&&m.semver.patch===c.patch&&(c=!1),m.operator===">"||m.operator===">="){if(o=sm(i,m,r),o===m&&o!==i)return!1}else if(i.operator===">="&&!kn(i.semver,String(m),r))return!1}if(s){if(f&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===f.major&&m.semver.minor===f.minor&&m.semver.patch===f.patch&&(f=!1),m.operator==="<"||m.operator==="<="){if(u=am(s,m,r),u===m&&u!==s)return!1}else if(s.operator==="<="&&!kn(s.semver,String(m),r))return!1}if(!m.operator&&(s||i)&&a!==0)return!1}return!(i&&l&&!s&&a!==0||s&&h&&!i&&a!==0||c||f)},sm=(t,e,r)=>{if(!t)return e;const n=zu(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},am=(t,e,r)=>{if(!t)return e;const n=zu(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var QO=KO;const Vu=Xt.exports;var JO={re:Vu.re,src:Vu.src,tokens:Vu.t,SEMVER_SPEC_VERSION:Zi.SEMVER_SPEC_VERSION,SemVer:Ye,compareIdentifiers:Ou.compareIdentifiers,rcompareIdentifiers:Ou.rcompareIdentifiers,parse:Vr,valid:kx,clean:Bx,inc:jx,diff:Vx,major:Kx,minor:Jx,patch:t$,prerelease:i$,compare:vt,rcompare:o$,compareLoose:c$,compareBuild:Pu,sort:p$,rsort:y$,gt:is,lt:ku,eq:Fu,neq:Hp,gte:Iu,lte:Lu,cmp:Up,coerce:N$,Comparator:us,Range:Dt,satisfies:ls,toComparators:gO,maxSatisfying:DO,minSatisfying:SO,minVersion:RO,validRange:$O,outside:qu,gtr:jO,ltr:qO,intersects:zO,simplifyRange:YO,subset:QO};const{Agent:ZO}=Mn,{Agent:eF}=vs,tF=Yo.exports,rF=Au.exports,nF=dx,iF=JO,om={keepAlive:!0,maxSockets:50},sF=new ZO(om),aF=new eF(om);class um extends Error{constructor(e){super(`Package \`${e}\` could not be found`);this.name="PackageNotFoundError"}}class lm extends Error{constructor(e,r){super(`Version \`${r}\` for package \`${e}\` could not be found`);this.name="VersionNotFoundError"}}const cm=async(t,e)=>{e={version:"latest",...e};const r=t.split("/")[0],n=e.registryUrl||rF(r),i=new URL(encodeURIComponent(t).replace(/^%40/,"@"),n),s=nF(n.toString(),{recursive:!0}),a={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"};e.fullMetadata&&delete a.accept,s&&(a.authorization=`${s.type} ${s.token}`);const o={headers:a,agent:{http:sF,https:aF}};e.agent&&(o.agent=e.agent);let u;try{u=await tF(i,o).json()}catch(f){throw f.response.statusCode===404?new um(t):f}if(e.allVersions)return u;let{version:l}=e;const h=new lm(t,l);if(u["dist-tags"][l])u=u.versions[u["dist-tags"][l]];else if(l){if(!u.versions[l]){const f=Object.keys(u.versions);if(l=iF.maxSatisfying(f,l),!l)throw h}if(u=u.versions[l],!u)throw h}return u};Gi.exports=cm,Gi.exports.default=cm,Gi.exports.PackageNotFoundError=um,Gi.exports.VersionNotFoundError=lm;const oF=()=>{const{env:t}=dt;return t.SUDO_USER||t.C9_USER||t.LOGNAME||t.USER||t.LNAME||t.USERNAME},uF=()=>{try{return ul.userInfo().username}catch{return null}},lF=t=>t.replace(/^.*\\/,""),cF=t=>`no-username-${t}`,hF=async()=>{const t=oF();if(t)return t;const e=uF();if(e)return e;try{if(dt.platform==="win32"){const{stdout:n}=await hi("whoami");return lF(n)}const{stdout:r}=await hi("id",["-u"]);try{const{stdout:n}=await hi("id",["-un",r]);return n}catch{}return cF(r)}catch{return null}},fF=async(t,e=N0)=>{const r=[];t.name||r.push({type:"input",name:"name",message:"Your app's working name?",default:"app"});const n=await e(r);return{...t,...n}};var dF="@shopify/cli",pF="0.12.0",mF="A CLI tool to build for the Shopify platform",gF="module",yF="src/index.js",vF="src/index.js",bF={".":"./src/index.js"},DF=["shopify","shopify-cli","shopify-partners"],wF="MIT",EF={shopify:"./bin/shopify-run.js"},_F=["/bin","/dist","/npm-shrinkwrap.json","/oclif.manifest.json"],SF={access:"public","@shopify:registry":"https://registry.npmjs.org"},CF={clean:"shx rm -rf dist",build:"shx rm -rf dist && rollup -c",prepack:"cross-env NODE_ENV=production yarn run build",lint:"prettier -c src/** && eslint src/**","lint:fix":"prettier src/** && eslint src/** --fix",test:"shx rm -rf dist && vitest run","test:watch":"vitest watch",tsc:"tsc -b"},AF={extends:["../../package.json"]},RF={"@bugsnag/js":"^7.14.1","@oclif/core":"0.5.10","@shopify/cli-kit":"0.12.0"},TF={node:"^12.20.0 || ^14.13.1 || >=16.0.0"},xF=["darwin","linux","win32"],$F={bin:"shopify",commands:"dist/commands",plugins:[]},OF={name:dF,version:pF,private:!1,description:mF,type:gF,main:yF,module:vF,exports:bF,keywords:DF,license:wF,bin:EF,files:_F,publishConfig:SF,scripts:CF,eslintConfig:AF,dependencies:RF,"engine-strict":!0,engines:TF,os:xF,oclif:$F};async function FF(t){const e=await n_(`templates/${t}`,{cwd:Ua(xm(import.meta.url)),type:"directory"});if(e)return e;throw new Sc(`Couldn't find the template ${t} in @shopify/create-app.`)}async function PF(t){const e=await hF()??"",r=await FF("app"),n=OF.version,i=KA(),s=L1(t.name),a=Di(t.directory,s);await M0([{title:`Initializing your app ${s}`,task:async(o,u)=>{await IF({...t,outputDirectory:a,templatePath:r,cliVersion:n,user:e,dependencyManager:i}),u.title="Initialized"}},{title:"Installing dependencies",task:async()=>kF(a,i)}]),YA(WA`
|
|
154
|
+
${s} is ready to build! ✨
|
|
155
|
+
Docs: ${Dd.link("Quick start guide","https://shopify.dev/apps/getting-started")}
|
|
156
|
+
Inspiration ${Dd.command(`${i} shopify help`)}
|
|
157
|
+
`)}async function kF(t,e){await XA(t,e)}async function IF(t){const r=(await LA(Di(t.templatePath,"**/*"))).map(i=>i.split("/")).sort((i,s)=>i.length<s.length?1:-1).map(i=>i.join("/")),n={name:t.name,shopify_cli_version:t.cliVersion,author:t.user,dependencyManager:t.dependencyManager};r.forEach(async i=>{const s=await Nh(Di(t.outputDirectory,Uh(t.templatePath,i)))(n);if(MA(i))await pd(s);else{await pd(Ua(s));const a=await BA(i),o=await Nh(a)(n);await NA(s,o)}})}const hm=class extends ym{async run(){const{flags:t}=await this.parse(hm),e=t.path?Hh(t.path):process.cwd(),r=await fF({name:t.name});await PF({name:r.name,directory:e})}};let fm=hm;fm.flags={name:rl.string({char:"n",hidden:!1}),path:rl.string({char:"p",hidden:!1})};export{fm as default};
|