@shopify/cli-kit 0.12.0 → 0.30.2
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 +18 -0
- package/dist/index-17ec6a4a.js +60148 -0
- package/dist/index-17ec6a4a.js.map +1 -0
- package/dist/index.d.ts +3864 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -153
- package/dist/index.js.map +1 -0
- package/dist/multipart-parser-a3698ba7.js +468 -0
- package/dist/multipart-parser-a3698ba7.js.map +1 -0
- package/package.json +25 -16
package/dist/index.js
CHANGED
|
@@ -1,153 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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 Kr=Mu,al={};const rg=Be,ol={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 ol.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 ng=(t,e={})=>{let r=rg.merge({},ol,e.roles);return r[t]||r.default};const ig=st.exports,sg=Kr,ag=ng,jn=Be,{reorder:Ss,scrollUp:og,scrollDown:ug,isObject:ul,swap:lg}=jn;class cg extends sg{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");ul(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=ag(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,jn.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,ig.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 ll(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=Ss(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=Ss(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=Ss(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=og(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=ug(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){lg(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(ul(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=jn.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 ll(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 ll(t,e){if(e instanceof Promise)return e;if(typeof e=="function"){if(jn.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 Hn=cg;const hg=Hn,Cs=Be;class fg extends hg{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"&&!Cs.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&&!Cs.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?(Cs.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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`+qy(r,4);super(r);this.name="AggregateError",Object.defineProperty(this,"_errors",{value:e})}*[Symbol.iterator](){for(const e of this._errors)yield e}}var Wy=Vy;const Yy=Wy;var Ky=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 Yy(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
|
-
Copyright (c) Microsoft Corporation.
|
|
39
|
-
|
|
40
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
41
|
-
purpose with or without fee is hereby granted.
|
|
42
|
-
|
|
43
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
44
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
45
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
46
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
47
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
48
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
49
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
50
|
-
***************************************************************************** */var Fs=function(t,e){return Fs=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])},Fs(t,e)};function qn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Fs(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Er=function(){return Er=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},Er.apply(this,arguments)};function Ps(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 Gn(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 zn(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 Ot(t){return typeof t=="function"}function wl(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 ks=wl(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
51
|
-
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
52
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function Is(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Vn=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=Ps(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 ks?y.errors:[y]}var f=this._teardowns;if(f){this._teardowns=null;try{for(var c=Ps(f),m=c.next();!m.done;m=c.next()){var p=m.value;try{Cl(p)}catch(y){s=s??[],y instanceof ks?s=zn(zn([],Gn(s)),Gn(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 ks(s)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Cl(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)&&Is(r,e)},t.prototype.remove=function(e){var r=this._teardowns;r&&Is(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),_l=Vn.EMPTY;function Sl(t){return t instanceof Vn||t&&"closed"in t&&Ot(t.remove)&&Ot(t.add)&&Ot(t.unsubscribe)}function Cl(t){Ot(t)?t():t.unsubscribe()}var Ls={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Bs={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Bs.delegate;return((r==null?void 0:r.setTimeout)||setTimeout).apply(void 0,zn([],Gn(t)))},clearTimeout:function(t){var e=Bs.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Xy(t){Bs.setTimeout(function(){throw t})}function Wn(){}var Yn=null;function Kn(t){if(Ls.useDeprecatedSynchronousErrorHandling){var e=!Yn;if(e&&(Yn={errorThrown:!1,error:null}),t(),e){var r=Yn,n=r.errorThrown,i=r.error;if(Yn=null,n)throw i}}else t()}var Al=function(t){qn(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Sl(r)&&r.add(n)):n.destination=Qy,n}return e.create=function(r,n,i){return new Ns(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}(Vn),Ns=function(t){qn(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&&Ls.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?Ms(a):Wn,error:Ms(n??Rl),complete:i?Ms(i):Wn},s}return e}(Al);function Ms(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{t.apply(void 0,zn([],Gn(r)))}catch(i){Xy(i)}}}function Rl(t){throw t}var Qy={closed:!0,next:Wn,error:Rl,complete:Wn},Jy=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Zy(t){return t}function ev(t){return t.length===0?Zy:t.length===1?t[0]:function(r){return t.reduce(function(n,i){return i(n)},r)}}var js=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=rv(e)?e:new Ns(e,r,n);return Kn(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=Tl(r),new r(function(i,s){var a=new Ns({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[Jy]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return ev(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=Tl(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 Tl(t){var e;return(e=t??Ls.Promise)!==null&&e!==void 0?e:Promise}function tv(t){return t&&Ot(t.next)&&Ot(t.error)&&Ot(t.complete)}function rv(t){return t&&t instanceof Al||tv(t)&&Sl(t)}var nv=wl(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Hs=function(t){qn(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 nv},e.prototype.next=function(r){var n=this;Kn(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){var a=n.observers.slice();try{for(var o=Ps(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;Kn(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;Kn(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?_l:(a.push(r),new Vn(function(){return Is(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 js;return r.source=this,r},e.create=function(r,n){return new xl(r,n)},e}(js),xl=function(t){qn(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:_l},e}(Hs),iv=sv;function wr(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function sv(t){if(t=t||{},t.circles)return av(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 av(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 Xn={exports:{}};const $l=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);Xn.exports=$l,Xn.exports.default=$l;const Ol="[\uD800-\uDBFF][\uDC00-\uDFFF]",ov=t=>t&&t.exact?new RegExp(`^${Ol}$`):new RegExp(Ol,"g");var uv=ov,Us={exports:{}},lv={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 Qr=lv,Fl={};for(const t of Object.keys(Qr))Fl[Qr[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 Pl=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 cv(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=Fl[t];if(e)return e;let r=1/0,n;for(const i of Object.keys(Qr)){const s=Qr[i],a=cv(t,s);a<r&&(r=a,n=i)}return n},L.keyword.rgb=function(t){return Qr[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 Qn=Pl;function hv(){const t={},e=Object.keys(Qn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function fv(t){const e=hv(),r=[t];for(e[t].distance=0;r.length;){const n=r.pop(),i=Object.keys(Qn[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 dv(t,e){return function(r){return e(t(r))}}function pv(t,e){const r=[e[t].parent,t];let n=Qn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=dv(Qn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}var mv=function(t){const e=fv(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]=pv(a,e))}return r};const qs=Pl,gv=mv,_r={},yv=Object.keys(qs);function vv(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 bv(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}yv.forEach(t=>{_r[t]={},Object.defineProperty(_r[t],"channels",{value:qs[t].channels}),Object.defineProperty(_r[t],"labels",{value:qs[t].labels});const e=gv(t);Object.keys(e).forEach(n=>{const i=e[n];_r[t][n]=bv(i),_r[t][n].raw=vv(i)})});var Dv=_r;(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})})(Us);const Ev=Xn.exports,wv=uv,kl=Us.exports,Il=["\x1B","\x9B"],Jn=t=>`${Il[0]}[${t}m`,Ll=(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=kl.codes.get(parseInt(i,10));if(a){const o=t.indexOf(a.toString());o>=0?t.splice(o,1):n.push(Jn(e?a:s))}else if(e){n.push(Jn(0));break}else n.push(Jn(s))}if(e&&(n=n.filter((i,s)=>n.indexOf(i)===s),r!==void 0)){const i=Jn(kl.codes.get(parseInt(r,10)));n=n.reduce((s,a)=>a===i?[a,...s]:[...s,a],[])}return n.join("")};var Bl=(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(Il.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,!wv({exact:!0}).test(h)&&Ev(h.codePointAt())&&++o,o>e&&o<=r)u+=h;else if(o===e&&!s&&a!==void 0)u=Ll(i);else if(o>=r){u+=Ll(i,!0,a);break}}return u},Zn={exports:{}},_v=({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 Sv=_v;var Nl=t=>typeof t=="string"?t.replace(Sv(),""):t,Cv=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 Av=Nl,Rv=Xn.exports,Tv=Cv,Ml=t=>{if(typeof t!="string"||t.length===0||(t=Av(t),t.length===0))return 0;t=t.replace(Tv()," ");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+=Rv(n)?2:1)}return e};Zn.exports=Ml,Zn.exports.default=Ml;const Ut=Bl,xv=Zn.exports;function ei(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=xv(t);if(u<=e)return t;if(n==="start"){if(s){const l=ei(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=ei(t,l),f=ei(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=ei(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}`)},ti={exports:{}},jl={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}}})(jl);var Hl={},Jr={exports:{}},Gs={exports:{}};const Ul=(t,e)=>{for(const r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};Gs.exports=Ul,Gs.exports.default=Ul;const Ov=Gs.exports,ri=new WeakMap,ql=(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(ri.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 Ov(s,t),ri.set(s,n),s};Jr.exports=ql,Jr.exports.default=ql,Jr.exports.callCount=t=>{if(!ri.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return ri.get(t)};var Fv=Jr.exports,Jt={exports:{}},Gl={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")})(Gl);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 Pv=Yu,Zr=Gl.exports,kv=/^win/i.test(he.platform),ni=jt;typeof ni!="function"&&(ni=ni.EventEmitter);var Oe;he.__signal_exit_emitter__?Oe=he.__signal_exit_emitter__:(Oe=he.__signal_exit_emitter__=new ni,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(){};Pv.equal(typeof t,"function","a callback must be provided for exit handler"),en===!1&&zl();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&&zs()};return Oe.on(r,t),n};var zs=function(){!en||!Zt(le.process)||(en=!1,Zr.forEach(function(e){try{he.removeListener(e,Vs[e])}catch{}}),he.emit=Ws,he.reallyExit=Vl,Oe.count-=1)};Jt.exports.unload=zs;var Sr=function(e,r,n){Oe.emitted[e]||(Oe.emitted[e]=!0,Oe.emit(e,r,n))},Vs={};Zr.forEach(function(t){Vs[t]=function(){if(!!Zt(le.process)){var r=he.listeners(t);r.length===Oe.count&&(zs(),Sr("exit",null,t),Sr("afterexit",null,t),kv&&t==="SIGHUP"&&(t="SIGINT"),he.kill(he.pid,t))}}}),Jt.exports.signals=function(){return Zr};var en=!1,zl=function(){en||!Zt(le.process)||(en=!0,Oe.count+=1,Zr=Zr.filter(function(e){try{return he.on(e,Vs[e]),!0}catch{return!1}}),he.emit=Lv,he.reallyExit=Iv)};Jt.exports.load=zl;var Vl=he.reallyExit,Iv=function(e){!Zt(le.process)||(he.exitCode=e||0,Sr("exit",he.exitCode,null),Sr("afterexit",he.exitCode,null),Vl.call(he,he.exitCode))},Ws=he.emit,Lv=function(e,r){if(e==="exit"&&Zt(le.process)){r!==void 0&&(he.exitCode=r);var n=Ws.apply(this,arguments);return Sr("exit",he.exitCode,null),Sr("afterexit",he.exitCode,null),n}else return Ws.apply(this,arguments)}}var Bv=Jt.exports;const Nv=Jr.exports,Mv=Jt.exports;var jv=Nv(()=>{Mv(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})});(function(t){const e=jv;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)}})(Hl);const tn=Zn.exports,Hv=Nl,Uv=Us.exports,Ys=new Set(["\x1B","\x9B"]),qv=39,Wl=t=>`${Ys.values().next().value}[${t}m`,Gv=t=>t.split(" ").map(e=>tn(e)),Ks=(t,e,r)=>{const n=[...e];let i=!1,s=tn(Hv(t[t.length-1]));for(const[a,o]of n.entries()){const u=tn(o);if(s+u<=r?t[t.length-1]+=o:(t.push(o),s=0),Ys.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())},zv=t=>{const e=t.split(" ");let r=e.length;for(;r>0&&!(tn(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},Vv=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i="",s;const a=Gv(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=tn(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(""),Ks(o,l,e);continue}if(h+a[u]>e&&h>0&&a[u]>0){if(r.wordWrap===!1&&h<e){Ks(o,l,e);continue}o.push("")}if(h+a[u]>e&&r.wordWrap===!1){Ks(o,l,e);continue}o[o.length-1]+=l}r.trim!==!1&&(o=o.map(zv)),n=o.join(`
|
|
53
|
-
`);for(const[u,l]of[...n].entries()){if(i+=l,Ys.has(l)){const f=parseFloat(/\d[^m]*/.exec(n.slice(u,u+4)));s=f===qv?null:f}const h=Uv.codes.get(Number(s));s&&h&&(n[u+1]===`
|
|
54
|
-
`?i+=Wl(h):l===`
|
|
55
|
-
`&&(i+=Wl(s)))}return i};var Yl=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
|
|
56
|
-
`).split(`
|
|
57
|
-
`).map(n=>Vv(n,e,r)).join(`
|
|
58
|
-
`);const Kl=jl.exports,Xl=Hl,Wv=Yl,Yv=Bl,Kv=24,ii=t=>{const{columns:e}=t;return e||80},Xv=(t,e)=>{const r=t.rows||Kv,n=e.split(`
|
|
59
|
-
`),i=n.length-r;return i<=0?e:Yv(e,n.slice(0,i).join(`
|
|
60
|
-
`).length+1,e.length)},Xs=(t,{showCursor:e=!1}={})=>{let r=0,n=ii(t),i="";const s=(...a)=>{e||Xl.hide();let o=a.join(" ")+`
|
|
61
|
-
`;o=Xv(t,o);const u=ii(t);o===i&&n===u||(i=o,n=u,o=Wv(o,u,{trim:!1,hard:!0,wordWrap:!1}),t.write(Kl.eraseLines(r)+o),r=o.split(`
|
|
62
|
-
`).length)};return s.clear=()=>{t.write(Kl.eraseLines(r)),i="",n=ii(t),r=0},s.done=()=>{i="",n=ii(t),r=0,e||Xl.show()},s};ti.exports=Xs(process.stdout);var Qv=ti.exports.stderr=Xs(process.stderr);ti.exports.create=Xs;var Qs=ti.exports;const qt=process.env||{},Ql=process.argv||[],Jv="NO_COLOR"in qt||Ql.includes("--no-color"),Zv="FORCE_COLOR"in qt||Ql.includes("--color"),e0=process.platform==="win32",t0=ps&&ps.isatty&&ps.isatty(1)&&qt.TERM&&qt.TERM!=="dumb",r0="CI"in qt&&("GITHUB_ACTIONS"in qt||"GITLAB_CI"in qt||"CIRCLECI"in qt),n0=!Jv&&(Zv||e0||t0||r0),Jl=(t,e,r,n,i=e.substring(0,t)+n,s=e.substring(t+r.length),a=s.indexOf(r))=>i+(a<0?s:Jl(a,s,r,n)),i0=(t,e,r,n,i)=>t<0?r+e+n:r+Jl(t,e,n,i)+n,s0=(t,e,r=t,n=t.length+1)=>i=>i||!(i===""||i===void 0)?i0((""+i).indexOf(e,n),i,t,e,r):"",W=(t,e,r)=>s0(`\x1B[${t}m`,`\x1B[${e}m`,r),Zl={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)},a0=t=>t,ec=({useColor:t=n0}={})=>t?Zl:Object.keys(Zl).reduce((e,r)=>({...e,[r]:a0}),{});ec();var tc={exports:{}};(function(t,e){var r=Ke;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}})(tc);var o0=tc.exports,u0=Object.create,si=Object.defineProperty,l0=Object.defineProperties,c0=Object.getOwnPropertyDescriptor,h0=Object.getOwnPropertyDescriptors,f0=Object.getOwnPropertyNames,rc=Object.getOwnPropertySymbols,d0=Object.getPrototypeOf,nc=Object.prototype.hasOwnProperty,p0=Object.prototype.propertyIsEnumerable,ic=(t,e,r)=>e in t?si(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,we=(t,e)=>{for(var r in e||(e={}))nc.call(e,r)&&ic(t,r,e[r]);if(rc)for(var r of rc(e))p0.call(e,r)&&ic(t,r,e[r]);return t},sc=(t,e)=>l0(t,h0(e)),m0=t=>si(t,"__esModule",{value:!0}),g0=(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')}),y0=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of f0(e))!nc.call(t,i)&&(r||i!=="default")&&si(t,i,{get:()=>e[i],enumerable:!(n=c0(e,i))||n.enumerable});return t},v0=(t,e)=>y0(m0(si(t!=null?u0(d0(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),b0=iv({circles:!0});function ac(t){return b0(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=ac(r),this.ctx=ac(r.listr.ctx)),this.stack=t==null?void 0:t.stack}},rn=class extends Error{constructor(t){super(t);this.name="PromptError"}};function nn(t,...e){return typeof t=="function"?t(...e):t}var oc,ee=ec({useColor:((oc=process.env)==null?void 0:oc.LISTR_DISABLE_COLOR)!=="1"});function uc(){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 lc={warning:"\u26A0",cross:"\u2716",arrowDown:"\u2193",tick:"\u2714",arrowRight:"\u2192",pointer:"\u276F",checkboxOn:"\u2612",arrowLeft:"\u2190",squareSmallFilled:"\u25FC",pointerSmall:"\u203A"},E0=sc(we({},lc),{warning:"\u203C",cross:"\xD7",tick:"\u221A",pointer:">",checkboxOn:"[\xD7]",squareSmallFilled:"\u25A0"}),ae=uc()?lc:E0;function cc(t,e){return t.replace(/^(?!\s*$)/gm," ".repeat(e))}function hc(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 Js=class{constructor(t,e,r){this.tasks=t,this.options=e,this.renderHook$=r,this.bottomBar={},this.spinner=uc()?["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]:["-","\\","|","/"],this.spinnerPosition=0,this.options=we(we({},Js.rendererOptions),this.options)}getTaskOptions(t){return we(we({},Js.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(`[${hc(t.message.duration)}]`)}createRender(t){t=we(we({},{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=()=>Qs(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),Qs.clear(),Qs.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=Yl(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)),cc(n.join(ct),r*this.options.indentation)}indentMultilineOutput(t,e){return e>0?cc(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}},Zs=Js;Zs.nonTTY=!1,Zs.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 fc=class{constructor(t,e){this.tasks=t,this.options=e}render(){}end(){}};fc.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$/)?Qv(`${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=we(we({},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)}},ea=er;ea.nonTTY=!0,ea.rendererOptions={prefixWithTimestamp:!1,output:"stdout"};var w0=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
|
-
`)}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}]`}},dc=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 w0({useIcons:(s=this.options)==null?void 0:s.useIcons}),this.options=we(we({},dc.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)?` [${hc(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)})})}},ta=dc;ta.nonTTY=!0,ta.rendererOptions={useIcons:!1,logEmptyTitle:!0,logTitleChange:!0};var ra={default:Zs,simple:ea,verbose:ta,silent:fc};function _0(t){return process.stdout.isTTY===!0||t.nonTTY===!0}function na(t){return typeof t=="string"?ra[t]||ra.default:typeof t=="function"?t:ra.default}function pc(t,e,r,n){let i,s=na(t);i={renderer:s,nonTTY:!1};const a=nn(n),o=nn(r);return a?(s=na("silent"),i={renderer:s,nonTTY:!0}):(!_0(s)||o)&&(s=na(e),i={renderer:s,nonTTY:!0}),i}function S0(){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 C0=class extends Hs{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=S0(),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=we(we({},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 nn(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 ia?(h.options=we(we({},this.options),h.options),h.rendererClass=pc("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 dm?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 js&&(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 nn(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 rn&&(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 nn((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()}}},A0="(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+",R0=/\u0007/;function T0(t){const e="Cancelled prompt.";if(this instanceof ai)this.task.prompt=new rn(e);else{if((t==null?void 0:t.error)!==!1)throw new Error(e);return e}}async function x0(t,e){let r;(e==null?void 0:e.cancelCallback)?r=e.cancelCallback:r=T0,Array.isArray(t)?t.length===1&&(t=t.reduce((s,a)=>[...s,Object.assign(a,{name:"default"})],[])):t=[sc(we({},t),{name:"default"})],t=t.reduce((s,a)=>{var o;return[...s,Object.assign(a,{stdout:this instanceof ai?(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(()=>v0(g0("enquirer"),1))).default}catch(s){throw this.task.prompt=new rn("Enquirer is a peer dependency that must be installed separately."),new Error(s)}this instanceof ai&&(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 rn)&&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 rn||(t?this.task.prompt.cancel():this.task.prompt.submit())}var ai=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 ia(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 x0.bind(this)(t,we({},(e=this.options)==null?void 0:e.injectWrapper))}cancelPrompt(t=!1){return $0.bind(this)(t)}stdout(){return o0(t=>{t=t.toString(),t=t.replace(new RegExp(A0,"gmi"),""),t=t.replace(new RegExp(R0,"gmi"),""),t!==""&&(this.output=t)})}run(t){return this.task.run(t,this)}},ia=class{constructor(t,e,r){this.task=t,this.options=e,this.parentTask=r,this.tasks=[],this.err=[],this.renderHook$=new Hs,this.path=[];var n,i,s;this.options=we(we({},{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=pc(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 C0(this,r,this.options,we(we({},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 Ky(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 ai(t,r,this.options).run(e):Promise.resolve()}};const O0=t=>Iy.prompt(t),F0=t=>new ia(t).run();var P0=Object.freeze({__proto__:null,prompt:O0,list:F0});class sa extends Error{constructor(e,r=null){super(e);this.tryMessage=r}}class k0 extends sa{}class mc extends sa{}function I0(t){return Promise.resolve(t)}var L0=Object.freeze({__proto__:null,Fatal:sa,Abort:k0,Bug:mc,handler:I0}),Cr={exports:{}},B0=vc;vc.sync=M0;var gc=Qe;function N0(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 yc(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:N0(e,r)}function vc(t,e,r){gc.stat(t,function(n,i){r(n,n?!1:yc(i,t,e))})}function M0(t,e){return yc(gc.statSync(t),t,e)}var j0=Dc;Dc.sync=H0;var bc=Qe;function Dc(t,e,r){bc.stat(t,function(n,i){r(n,n?!1:Ec(i,e))})}function H0(t,e){return Ec(bc.statSync(t),e)}function Ec(t,e){return t.isFile()&&U0(t,e)}function U0(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 oi;process.platform==="win32"||le.TESTING_WINDOWS?oi=B0:oi=j0;var q0=aa;aa.sync=G0;function aa(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){aa(t,e||{},function(s,a){s?i(s):n(a)})})}oi(t,e||{},function(n,i){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,i=!1),r(n,i)})}function G0(t,e){try{return oi.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}var z0=Ac;Ac.sync=W0;var oa=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",wc=Ee,V0=oa?";":":",_c=q0;function Sc(t){var e=new Error("not found: "+t);return e.code="ENOENT",e}function Cc(t,e){var r=e.colon||V0,n=e.path||process.env.PATH||"",i=[""];n=n.split(r);var s="";return oa&&(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(/\//)||oa&&t.match(/\\/))&&(n=[""]),{env:n,ext:i,extExe:s}}function Ac(t,e,r){typeof e=="function"&&(r=e,e={});var n=Cc(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(Sc(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];_c(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 W0(t,e){e=e||{};for(var r=Cc(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=_c.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 Sc(t)}function ua(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 Y0=Object.freeze({__proto__:null,default:ua}),K0=Am(Y0);const Rc=Ee,X0=z0,Q0=K0;function Tc(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=X0.sync(t.command,{path:r[Q0({env:r})],pathExt:e?Rc.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return a&&(a=Rc.resolve(i?t.options.cwd:"",a)),a}function J0(t){return Tc(t)||Tc(t,!0)}var Z0=J0,la={};const ca=/([()\][%!^"`<>&|;, *?])/g;function eb(t){return t=t.replace(ca,"^$1"),t}function tb(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(ca,"^$1"),e&&(t=t.replace(ca,"^$1")),t}la.command=eb,la.argument=tb;var rb=/^#!.*/,nb=rb,ib=function(t){var e=t.match(nb);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 ha=Qe,sb=ib;function ab(t){const e=150,r=Buffer.alloc(e);let n;try{n=ha.openSync(t,"r"),ha.readSync(n,r,0,e,0),ha.closeSync(n)}catch{}return sb(r.toString())}var ob=ab;const ub=Ee,xc=Z0,$c=la,lb=ob,cb=process.platform==="win32",hb=/\.(?:com|exe)$/i,fb=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function db(t){t.file=xc(t);const e=t.file&&lb(t.file);return e?(t.args.unshift(t.file),t.command=e,xc(t)):t.file}function pb(t){if(!cb)return t;const e=db(t),r=!hb.test(e);if(t.options.forceShell||r){const n=fb.test(e);t.command=ub.normalize(t.command),t.command=$c.command(t.command),t.args=t.args.map(s=>$c.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 mb(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:pb(n)}var gb=mb;const fa=process.platform==="win32";function da(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 yb(t,e){if(!fa)return;const r=t.emit;t.emit=function(n,i){if(n==="exit"){const s=Oc(i,e);if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function Oc(t,e){return fa&&t===1&&!e.file?da(e.original,"spawn"):null}function vb(t,e){return fa&&t===1&&!e.file?da(e.original,"spawnSync"):null}var bb={hookChildProcess:yb,verifyENOENT:Oc,verifyENOENTSync:vb,notFoundError:da};const Fc=gm,pa=gb,ma=bb;function Pc(t,e,r){const n=pa(t,e,r),i=Fc.spawn(n.command,n.args,n.options);return ma.hookChildProcess(i,n),i}function Db(t,e,r){const n=pa(t,e,r),i=Fc.spawnSync(n.command,n.args,n.options);return i.error=i.error||ma.verifyENOENTSync(i.status,n),i}Cr.exports=Pc,Cr.exports.spawn=Pc,Cr.exports.sync=Db,Cr.exports._parse=pa,Cr.exports._enoent=ma;var Eb=Cr.exports;function wb(t){const e=typeof t=="string"?`
|
|
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 _b(t={}){const{cwd:e=ht.cwd(),path:r=ht.env[ua()],execPath:n=ht.execPath}=t;let i,s=it.resolve(e);const a=[];for(;i!==s;)a.push(it.join(s,"node_modules/.bin")),i=s,s=it.resolve(s,"..");return a.push(it.resolve(e,n,"..")),[...a,r].join(it.delimiter)}function Sb({env:t=ht.env,...e}={}){t={...t};const r=ua({env:t});return e.path=t[r],t[r]=_b(e),t}const Cb=function(){const t=Ic-kc+1;return Array.from({length:t},Ab)},Ab=function(t,e){return{name:`SIGRT${e+1}`,number:kc+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},kc=34,Ic=64,Rb=[{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"}],Lc=function(){const t=Cb();return[...Rb,...t].map(Tb)},Tb=function({name:t,number:e,description:r,action:n,forced:i=!1,standard:s}){const{signals:{[t]:a}}=Ku,o=a!==void 0;return{name:t,number:o?a:e,description:r,supported:o,action:n,forced:i,standard:s}},xb=function(){return Lc().reduce($b,{})},$b=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}}},Ob=xb(),Fb=function(){const t=Lc(),e=Ic+1,r=Array.from({length:e},(n,i)=>Pb(i,t));return Object.assign({},...r)},Pb=function(t,e){const r=kb(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}}},kb=function(t,e){const r=e.find(({name:n})=>Ku.signals[n]===t);return r!==void 0?r:e.find(n=>n.number===t)};Fb();const Ib=({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",Bc=({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:Ob[i].description,m=n&&n.code,y=`Command ${Ib({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
|
-
${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},ui=["stdin","stdout","stderr"],Lb=t=>ui.some(e=>t[e]!==void 0),Bb=t=>{if(!t)return;const{stdio:e}=t;if(e===void 0)return ui.map(n=>t[n]);if(Lb(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${ui.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,ui.length);return Array.from({length:r},(n,i)=>e[i])},Nb=1e3*5,Mb=(t,e="SIGTERM",r={})=>{const n=t(e);return jb(t,e,r,n),n},jb=(t,e,r,n)=>{if(!Hb(e,r,n))return;const i=qb(r),s=setTimeout(()=>{t("SIGKILL")},i);s.unref&&s.unref()},Hb=(t,{forceKillAfterTimeout:e},r)=>Ub(t)&&e!==!1&&r,Ub=t=>t===Ju.constants.signals.SIGTERM||typeof t=="string"&&t.toUpperCase()==="SIGTERM",qb=({forceKillAfterTimeout:t=!0})=>{if(t===!0)return Nb;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},Gb=(t,e)=>{t.kill()&&(e.isCanceled=!0)},zb=(t,e,r)=>{t.kill(e),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))},Vb=(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(()=>{zb(t,r,u)},e)}),a=n.finally(()=>{clearTimeout(i)});return Promise.race([s,a])},Wb=({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})`)},Yb=async(t,{cleanup:e,detached:r},n)=>{if(!e||r)return n;const i=Bv(()=>{t.kill()});return n.finally(()=>{i()})};function Kb(t){return t!==null&&typeof t=="object"&&typeof t.pipe=="function"}var Ar={exports:{}};const{PassThrough:Xb}=Ke;var Qb=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 Xb({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:Jb}=_m,Zb=Ke,{promisify:eD}=Kt,tD=Qb,rD=eD(Zb.pipeline);class Nc extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function ga(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};const{maxBuffer:r}=e,n=tD(e);return await new Promise((i,s)=>{const a=o=>{o&&n.getBufferedLength()<=Jb.MAX_LENGTH&&(o.bufferedData=n.getBufferedValue()),s(o)};(async()=>{try{await rD(t,n),i()}catch(o){a(o)}})(),n.on("data",()=>{n.getBufferedLength()>r&&a(new Nc)})}),n.getBufferedValue()}Ar.exports=ga,Ar.exports.buffer=(t,e)=>ga(t,{...e,encoding:"buffer"}),Ar.exports.array=(t,e)=>ga(t,{...e,array:!0}),Ar.exports.MaxBufferError=Nc;var Mc=Ar.exports;const{PassThrough:nD}=Ke;var iD=function(){var t=[],e=new nD({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 sD=(t,e)=>{e===void 0||t.stdin===void 0||(Kb(e)?e.pipe(t.stdin):t.stdin.end(e))},aD=(t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;const r=iD();return t.stdout&&r.add(t.stdout),t.stderr&&r.add(t.stderr),r},ya=async(t,e)=>{if(!!t){t.destroy();try{return await e}catch(r){return r.bufferedData}}},va=(t,{encoding:e,buffer:r,maxBuffer:n})=>{if(!(!t||!r))return e?Mc(t,{encoding:e,maxBuffer:n}):Mc.buffer(t,{maxBuffer:n})},oD=async({stdout:t,stderr:e,all:r},{encoding:n,buffer:i,maxBuffer:s},a)=>{const o=va(t,{encoding:n,buffer:i,maxBuffer:s}),u=va(e,{encoding:n,buffer:i,maxBuffer:s}),l=va(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},ya(t,o),ya(e,u),ya(r,l)])}},uD=(async()=>{})().constructor.prototype,lD=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(uD,t)]),jc=(t,e)=>{for(const[r,n]of lD){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},cD=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)})}),Hc=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],hD=/^[\w.-]+$/,fD=/"/g,dD=t=>typeof t!="string"||hD.test(t)?t:`"${t.replace(fD,'\\"')}"`,pD=(t,e)=>Hc(t,e).join(" "),mD=(t,e)=>Hc(t,e).map(r=>dD(r)).join(" "),gD=1e3*1e3*100,yD=({env:t,extendEnv:e,preferLocal:r,localDir:n,execPath:i})=>{const s=e?{...ht.env,...t}:t;return r?Sb({env:s,cwd:n,execPath:i}):s},vD=(t,e,r={})=>{const n=Eb._parse(t,e,r);return t=n.command,e=n.args,r=n.options,r={maxBuffer:gD,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||ht.cwd(),execPath:ht.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...r},r.env=yD(r),r.stdio=Bb(r),ht.platform==="win32"&&it.basename(t,".exe")==="cmd"&&e.unshift("/q"),{file:t,args:e,options:r,parsed:n}},ba=(t,e,r)=>typeof e!="string"&&!mm.isBuffer(e)?r===void 0?void 0:"":t.stripFinalNewline?wb(e):e;function sn(t,e,r){const n=vD(t,e,r),i=pD(t,e),s=mD(t,e);Wb(n.options);let a;try{a=Xu.spawn(n.file,n.args,n.options)}catch(m){const p=new Xu.ChildProcess,y=Promise.reject(Bc({error:m,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return jc(p,y)}const o=cD(a),u=Vb(a,n.options,o),l=Yb(a,n.options,u),h={isCanceled:!1};a.kill=Mb.bind(null,a.kill.bind(a)),a.cancel=Gb.bind(null,a,h);const c=Fv(async()=>{const[{error:m,exitCode:p,signal:y,timedOut:b},D,_,R]=await oD(a,n.options,l),S=ba(n.options,D),v=ba(n.options,_),d=ba(n.options,R);if(m||p!==0||y!==null){const E=Bc({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 E;throw E}return{command:i,escapedCommand:s,exitCode:0,stdout:S,stderr:v,all:d,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return sD(a,n.options.input),a.all=aD(a,n.options),jc(a,c)}var bD=Object.freeze({__proto__:null,exec:sn});/*! *****************************************************************************
|
|
69
|
-
Copyright (c) Microsoft Corporation.
|
|
70
|
-
|
|
71
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
72
|
-
purpose with or without fee is hereby granted.
|
|
73
|
-
|
|
74
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
75
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
76
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
77
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
78
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
79
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
80
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
81
|
-
***************************************************************************** */var Da=function(t,e){return Da=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])},Da(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");Da(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Ge=function(){return Ge=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},Ge.apply(this,arguments)};function tr(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 Fe(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 ze(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 Rr=function(){function t(){}return t.prototype.valueOf=function(){},t.prototype.liquidMethodMissing=function(e){},t}(),DD=Object.prototype.toString,Uc=String.prototype.toLowerCase;function Ft(t){return typeof t=="string"}function Pt(t){return typeof t=="function"}function ED(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function qc(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,ze(ze([],_e(e),!1),[function(s,a){s?i(s):n(a)}],!1))})}}function fe(t){return t=rr(t),Ft(t)?t:Tr(t)?"":String(t)}function rr(t){return t instanceof Rr?t.valueOf():t}function Ea(t){return typeof t=="number"}function Gc(t){return t&&Pt(t.toLiquid)?Gc(t.toLiquid()):t}function Tr(t){return t==null}function ft(t){return DD.call(t)==="[object Array]"}function zc(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 Vc(t){return t[t.length-1]}function Wc(t){var e=typeof t;return t!==null&&(e==="object"||e==="function")}function Yc(t,e,r){r===void 0&&(r=1);for(var n=[],i=t;i<e;i+=r)n.push(i);return n}function li(t,e,r){return r===void 0&&(r=" "),Kc(t,e,r,function(n,i){return i+n})}function wD(t,e,r){return r===void 0&&(r=" "),Kc(t,e,r,function(n,i){return n+i})}function Kc(t,e,r,n){t=String(t);for(var i=e-t.length;i-- >0;)t=n(t,r);return t}function _D(t){return t}function Xc(t){return t.replace(/(\w?)([A-Z])/g,function(e,r,n){return(r?r+"_":"")+n.toLowerCase()})}function SD(t){var e=ze([],_e(t),!1).some(function(r){return r>="a"&&r<="z"});return e?t.toUpperCase():t.toLowerCase()}function CD(t,e){return t.length>e?t.substr(0,e-3)+"...":t}function Qc(t,e){return t==null&&e==null?0:t==null?1:e==null||(t=Uc.call(t),e=Uc.call(e),t<e)?-1:t>e?1:0}var wa=function(){function t(e,r,n,i){this.key=e,this.value=r,this.next=n,this.prev=i}return t}(),Jc=function(){function t(e,r){r===void 0&&(r=0),this.limit=e,this.size=r,this.cache={},this.head=new wa("HEAD",null,null,null),this.tail=new wa("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 wa(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}(),AD=qc(wm),RD=qc(Em);function TD(t){return tr(this,void 0,void 0,function(){return X(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,AD(t)];case 1:return e.sent(),[2,!0];case 2:return e.sent(),[2,!1];case 3:return[2]}})})}function xD(t){return RD(t,"utf8")}function $D(t){try{return bm(t),!0}catch{return!1}}function OD(t){return Dm(t,"utf8")}function FD(t,e,r){return ym(e)||(e+=r),Qu(t,e)}function PD(t){try{return require.resolve(t)}catch{}}function kD(t){return vm(t)}function ID(t,e){return t=Qu(t),t=t.endsWith(ms)?t:t+ms,e.startsWith(t)}var LD=Object.freeze({__proto__:null,exists:TD,readFile:xD,existsSync:$D,readFileSync:OD,resolve:FD,fallback:PD,dirname:kD,contains:ID,sep:ms});function Je(t){return t&&Pt(t.equals)}function nr(t,e){return!_a(t,e)}function _a(t,e){return e.opts.jsTruthy?!t:t===!1||t===void 0||t===null}var Zc={"==":function(t,e){return Je(t)?t.equals(e):Je(e)?e.equals(t):t===e},"!=":function(t,e){return Je(t)?!t.equals(e):Je(e)?!e.equals(t):t!==e},">":function(t,e){return Je(t)?t.gt(e):Je(e)?e.lt(t):t>e},"<":function(t,e){return Je(t)?t.lt(e):Je(e)?e.gt(t):t<e},">=":function(t,e){return Je(t)?t.geq(e):Je(e)?e.leq(t):t>=e},"<=":function(t,e){return Je(t)?t.leq(e):Je(e)?e.geq(t):t<=e},contains:function(t,e){return t&&Pt(t.indexOf)?t.indexOf(e)>-1:!1},and:function(t,e,r){return nr(t,r)&&nr(e,r)},or:function(t,e,r){return nr(t,r)||nr(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],Sa=1,ci=4,eh=8,th=16,BD=32,ND=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]=ci;function rh(t){var e,r,n={};try{for(var i=Fe(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)]&Sa&&(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 xr={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:LD,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:Zc,operatorsTrie:rh(Zc)};function MD(t){if(t.hasOwnProperty("operators")&&(t.operatorsTrie=rh(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 Jc(t.cache):void 0:typeof t.cache=="object"?e=t.cache:e=t.cache?new Jc(1024):void 0,t.cache=e}return t=Ge(Ge(Ge({},xr),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=hi(t.root),t.partials=hi(t.partials),t.layouts=hi(t.layouts),t}function hi(t){var e=[];return ft(t)&&(e=t),Ft(t)&&(e=[t]),e}var fi=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=GD(this.token),this.message=zD(r.message,this.token),this.stack=this.message+`
|
|
82
|
-
`+this.context+`
|
|
83
|
-
`+this.stack+`
|
|
84
|
-
From `+r.stack},e}(Error),Ca=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}(fi),jD=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}(fi),nh=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}(fi),HD=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}(fi),UD=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),qD=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 GD(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=Yc(i,s+1).map(function(o){var u=o===r?">> ":" ",l=li(String(o),String(s).length),h=n[o-1];return"".concat(u).concat(l,"| ").concat(h)}).join(`
|
|
86
|
-
`);return a}function zD(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 Aa=function(){function t(e,r,n){e===void 0&&(e={}),r===void 0&&(r=xr),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 ze([this.globals,this.environments],_e(this.scopes),!1).reduce(function(e,r){return Ge(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 Ft(r)&&(r=r.split(".")),r.reduce(function(i,s,a){if(i=VD(i,s,n.opts.ownPropertyOnly),Tr(i)&&n.strictVariables)throw new UD(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 VD(t,e,r){if(Tr(t))return t;t=Gc(t);var n=WD(t,e,r);return Pt(n)?n.call(t):t instanceof Rr?t.hasOwnProperty(e)?t[e]:t.liquidMethodMissing(e):e==="size"?XD(t):e==="first"?YD(t):e==="last"?KD(t):n}function WD(t,e,r){if(!(r&&!Object.hasOwnProperty.call(t,e)))return t[e]}function YD(t){return ft(t)?t[0]:t.first}function KD(t){return ft(t)?t[t.length-1]:t.last}function XD(t){if(t.hasOwnProperty("size")||t.size!==void 0)return t.size;if(ft(t)||Ft(t))return t.length;if(typeof t=="object")return Object.keys(t).length}function Pe(t,e){if(!t){var r=typeof e=="function"?e():e||"expect ".concat(t," to be true");throw new qD(r)}}var ir;(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(ir||(ir={}));var QD=function(){function t(e){if(this.options=e,e.relativeReference){var r=e.fs.sep;Pe(r,"`fs.sep` is required for relative reference");var n=new RegExp(["."+r,".."+r,"./","../"].map(function(i){return ED(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=Fe(this.candidates(e,a,i,r!==ir.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=Fe(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=Fe(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 Pe(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}(),JD=function(){function t(){this.buffer=""}return t.prototype.write=function(e){this.buffer+=fe(e)},t}(),ZD=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 di(t){var e={then:function(r){return r(t)},catch:function(){return e}};return e}function ih(t){var e={then:function(r,n){return n?n(t):e},catch:function(r){return r(t)}};return e}function eE(t){return t&&Pt(t.then)}function tE(t){return t&&Pt(t.next)&&Pt(t.throw)&&Pt(t.return)}function an(t){if(eE(t))return t;if(tE(t))return e();return di(t);function e(r){var n;try{n=t.next(r)}catch(i){return ih(i)}return n.done?di(n.value):an(n.value).then(e,function(i){var s;try{s=t.throw(i)}catch(a){return ih(a)}return s.done?di(s.value):e(s.value)})}}function pi(t){return Promise.resolve(an(t))}function mi(t){var e;return an(t).then(function(r){return e=r,di(e)}).catch(function(r){throw r}),e}var rE=function(){function t(){this.buffer=""}return t.prototype.write=function(e){e=rr(e),typeof e!="string"&&this.buffer===""?this.buffer=e:this.buffer=fe(this.buffer)+fe(e)},t}(),nE=function(){function t(){}return t.prototype.renderTemplatesToNodeStream=function(e,r){var n=this,i=new ZD;return Promise.resolve().then(function(){return an(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 rE:new JD),m.label=1;case 1:m.trys.push([1,8,9,10]),i=Fe(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=nh.is(u)?u:new nh(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 iE(t){return!!(dt(t)&ue.Delimited)}function sh(t){return dt(t)===ue.Operator}function Ra(t){return dt(t)===ue.HTML}function sE(t){return dt(t)===ue.Output}function Ta(t){return dt(t)===ue.Tag}function ah(t){return dt(t)===ue.Quoted}function aE(t){return dt(t)===ue.Literal}function oE(t){return dt(t)===ue.Number}function uE(t){return dt(t)===ue.PropertyAccess}function lE(t){return dt(t)===ue.Word}function cE(t){return dt(t)===ue.Range}function dt(t){return t?t.kind:-1}var hE=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)&&!(Ta(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}(),xa=function(){function t(e){this.token=e}return t}(),fE=function(t){te(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.equals=function(r){return Tr(rr(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}(Rr),oh=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=rr(r),Ft(r)||ft(r)?r.length===0:Wc(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}(Rr),dE=function(t){te(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.equals=function(r){return r===!1||Tr(rr(r))?!0:Ft(r)?/^\s*$/.test(r):t.prototype.equals.call(this,r)},e}(oh),uh=new fE,lh={true:!0,false:!1,nil:uh,null:uh,empty:new oh,blank:new dE},pE=/[\da-fA-F]/,ch=/[0-7]/,hh={b:"\b",f:"\f",n:`
|
|
87
|
-
`,r:"\r",t:" ",v:"\v"};function fh(t){var e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function dh(t){for(var e="",r=1;r<t.length-1;r++){if(t[r]!=="\\"){e+=t[r];continue}if(hh[t[r+1]]!==void 0)e+=hh[t[++r]];else if(t[r+1]==="u"){for(var n=0,i=r+2;i<=r+5&&pE.test(t[i]);)n=n*16+fh(t[i++]);r=i-1,e+=String.fromCharCode(n)}else if(!ch.test(t[r+1]))e+=t[++r];else{for(var i=r+1,n=0;i<=r+3&&ch.test(t[i]);)n=n*8+fh(t[i++]);r=i-1,e+=String.fromCharCode(n)}}return e}var mE=function(){function t(e){this.postfix=ze([],_e(EE(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:Pe(e,"unable to evaluate: context not defined"),n=[],y.label=1;case 1:y.trys.push([1,9,10,11]),i=Fe(this.postfix),s=i.next(),y.label=2;case 2:return s.done?[3,8]:(a=s.value,sh(a)?[4,n.pop()]:[3,5]);case 3:return o=y.sent(),[4,n.pop()];case 4:return u=y.sent(),l=vE(e.opts.operators,a,u,o,e),n.push(l),[3,7];case 5:return f=(h=n).push,[4,Ne(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 Ne(t,e,r){if(r===void 0&&(r=!1),uE(t))return gE(t,e,r);if(cE(t))return DE(t,e);if(aE(t))return bE(t);if(oE(t))return yE(t);if(lE(t))return t.getText();if(ah(t))return $a(t)}function gE(t,e,r){var n=t.props.map(function(i){return Ne(i,e,!1)});try{return e.get(ze([t.propertyName],_e(n),!1))}catch(i){if(r&&i.name==="InternalUndefinedVariableError")return null;throw new HD(i,t)}}function yE(t){var e=t.whole.content+"."+(t.decimal?t.decimal.content:"");return Number(e)}function $a(t){return dh(t.getText())}function vE(t,e,r,n,i){var s=t[e.operator];return s(r,n,i)}function bE(t){return lh[t.literal]}function DE(t,e){var r=Ne(t.lhs,e),n=Ne(t.rhs,e);return Yc(+r,+n+1)}function EE(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=Fe(t),n=r.next(),u.label=2;case 2:if(n.done)return[3,9];if(i=n.value,!sh(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 pt=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}(),Oa=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=Vc(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}(pt);function wE(t,e){for(var r=!1,n=0;n<t.length;n++){var i=t[n];!iE(i)||(!r&&i.trimLeft&&_E(t[n-1],e.greedy),Ta(i)&&(i.name==="raw"?r=!0:i.name==="endraw"&&(r=!1)),!r&&i.trimRight&&SE(t[n+1],e.greedy))}}function _E(t,e){if(!(!t||!Ra(t)))for(var r=e?ci:th;oe[t.input.charCodeAt(t.end-1-t.trimRight)]&r;)t.trimRight++}function SE(t,e){if(!(!t||!Ra(t))){for(var r=e?ci:th;oe[t.input.charCodeAt(t.begin+t.trimLeft)]&r;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
|
|
89
|
-
`&&t.trimLeft++}}var CE=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}(pt),gi=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)]&ND?this.begin+1:this.begin,i=n;i<this.end;i++)if(!(oe[this.input.charCodeAt(i)]&BD))return!1;return!0},e}(pt),AE=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}(pt),ph={"==":1,"!=":1,">":1,"<":1,">=":1,"<=":1,contains:1,and:0,or:0},RE=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 ph?ph[r]:1},e}(pt),mh=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 gi?s.variable.getText():dh(s.variable.getText()),s}return e}(pt),TE=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}(pt),xE=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}(pt),$E=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}(pt),gh=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}(pt),OE=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}(pt),FE=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}(Oa);function PE(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)]&Sa?-1:s}var kE=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 ke(o.content,s.operatorsTrie);if(o.name=l.readIdentifier().getText(),!o.name)throw new Ca("illegal liquid tag syntax",o);l.skipBlank(),o.args=l.remaining()}return o}return e}(Oa),ke=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 mE(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=PE(this.input,this.p,this.trie);if(e!==-1)return new RE(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;Pe(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 TE(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=xr);for(var r=[];this.p<this.N;){var n=this.readTopLevelToken(e);r.push(n)}return wE(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 gh(this.input,n,this.p,this.file)},t.prototype.readTagToken=function(e){e===void 0&&(e=xr);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 yh(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()&eh){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1},t.prototype.readOutputToken=function(e){e===void 0&&(e=xr);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 FE(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 yh(this.input,i,a,e,this.file)):(this.p=s,new gh(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=xr);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 kE(i,s,a,e,n);return o},t.prototype.mkError=function(e,r){return new Ca(e,new gi(this.input,r,this.N,this.file))},t.prototype.snapshot=function(e){return e===void 0&&(e=this.p),JSON.stringify(CD(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()&Sa;)++this.p;return new gi(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 xE(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 mh(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 gi(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&&lh.hasOwnProperty(n.content)?new AE(this.input,n.begin,n.end,this.file):i?new CE(n,s[0]):new mh(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 OE(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()&eh)){++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 $E(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()&ci;)++this.p},t}(),yh=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 Ca("illegal tag syntax",o);return m.skipBlank(),o.args=m.remaining(),o}return e}(Oa),$r=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 IE(t){return ft(t)}var vh=function(){function t(e,r,n,i){this.name=e,this.impl=r||_D,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;IE(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 vh(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}(),LE=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 $r(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}(xa),BE=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}(xa),NE=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}(xa),ME=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 QD(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 Ta(e)?new LE(e,r,this.liquid):sE(e)?new BE(e,this.liquid):new NE(e)}catch(n){throw new jD(n,e)}},t.prototype.parseStream=function(e){var r=this;return new hE(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=an(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}(),jE={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 Fa(t){return ft(t)?t:Ft(t)&&t.length>0?[t]:Wc(t)?Object.keys(t).map(function(e){return[e,t[e]]}):[]}function on(t){return ft(t)?t:[t]}var Pa=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}(Rr),bh=["offset","limit","reversed"],HE={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 $r(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=Fa,[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 bh.includes(b)}):bh.filter(function(b){return a[b]!==void 0}),n=o.reduce(function(b,D){return D==="offset"?qE(b,a.offset):D==="limit"?GE(b,a.limit):UE(b)},n),t.setRegister(s,(a.offset||0)+n.length),u={forloop:new Pa(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 UE(t){return ze([],_e(t),!1).reverse()}function qE(t,e){return t.slice(e)}function GE(t,e){return t.slice(0,e)}var zE={parse:function(t,e){var r=this,n=new ke(t.args,this.liquid.options.operatorsTrie);this.variable=VE(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 VE(t){var e=t.readIdentifier().content;if(e)return e;var r=t.readQuoted();if(r)return $a(r)}var WE={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]}})}},YE={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()}},ka;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(ka||(ka={}));var un=ka,KE={parseFilePath:Ia,renderFilePath:La,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 $r(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 Aa({},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=Fa(p),o.forloop=new Pa(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 Ia(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(ah(r)){var n=e.parse($a(r));return Dh(n)}return r}var i=ze([],_e(t.readFileNameTemplate(e.options)),!1),s=Dh(e.parser.parseTokens(i));return s==="none"?null:s}function Dh(t){return t.length===1&&Ra(t[0].token)?t[0].token.getContent():t}function La(t,e,r){return typeof t=="string"?t:Array.isArray(t)?r.renderer.renderTemplates(t,e):Ne(t,e)}var XE={parseFilePath:Ia,renderFilePath:La,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 $r(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",un.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]}})}},QE={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;Ea(r[this.variable])||(r[this.variable]=0),e.write(fe(--r[this.variable]))}},JE={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)}},ZE={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]}})}},ew={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;Ea(r[this.variable])||(r[this.variable]=0);var n=r[this.variable];r[this.variable]++,e.write(fe(n))}},tw={parseFilePath:Ia,renderFilePath:La,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 $r(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",un.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",un.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",un.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]}})}},Eh=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}(Rr),rw={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")!==un.STORE?[3,1]:(t.getRegister("blocks")[this.block]=r,[3,3]);case 1:return[4,r(new Eh,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 Eh(function(){return s(a,o)}),o)}:s}},nw={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("")}},iw=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}(Pa),sw={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 $r(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=Fa,[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 iw(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]}})}},aw={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:_a,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]}})}},ow={render:function(t,e){e.break=!0}},uw={render:function(t,e){e.continue=!0}},lw={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]}})}},cw={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]}})}},hw={assign:jE,for:HE,capture:zE,case:WE,comment:YE,include:XE,render:KE,decrement:QE,increment:ew,cycle:JE,if:ZE,layout:tw,block:rw,raw:nw,tablerow:sw,unless:aw,break:ow,continue:uw,echo:lw,liquid:cw},fw={"&":"&","<":"<",">":">",'"':""","'":"'"},dw={"&":"&","<":"<",">":">",""":'"',"'":"'"};function wh(t){return fe(t).replace(/&|<|>|"|'/g,function(e){return fw[e]})}function pw(t){return String(t).replace(/&(amp|lt|gt|#34|#39);/g,function(e){return dw[e]})}function mw(t){return wh(pw(t))}function gw(t){return t.replace(/\n/g,`<br />
|
|
91
|
-
`)}function yw(t){return t.replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g,"")}var vw=Math.abs,bw=Math.max,Dw=Math.min,Ew=Math.ceil,ww=function(t,e){return t/e},_w=Math.floor,Sw=function(t,e){return t-e},Cw=function(t,e){return t%e},Aw=function(t,e){return t*e};function Rw(t,e){e===void 0&&(e=0);var r=Math.pow(10,e);return Math.round(t*r)/r}function Tw(t,e){return Number(t)+Number(e)}function xw(t,e){return!t||!t.sort?[]:e!==void 0?ze([],_e(t),!1).sort(function(r,n){return Qc(r[e],n[e])}):ze([],_e(t),!1).sort(Qc)}var $w=function(t){return t.split("+").map(decodeURIComponent).join(" ")},Ow=function(t){return t.split(" ").map(encodeURIComponent).join("+")},Fw=function(t,e){return t.join(e===void 0?" ":e)},Pw=function(t){return ft(t)?Vc(t):""},kw=function(t){return ft(t)?t[0]:""},Iw=function(t){return ze([],_e(t),!1).reverse()};function Lw(t,e){var r=this,n=function(i){return e?r.context.getFromScope(i,e.split(".")):i};return on(t).sort(function(i,s){return i=n(i),s=n(s),i<s?-1:i>s?1:0})}var Bw=function(t){return t&&t.length||0};function Nw(t,e){var r=this;return on(t).map(function(n){return r.context.getFromScope(n,e.split("."))})}function Mw(t){return on(t).filter(function(e){return!Tr(e)})}function jw(t,e){return on(t).concat(e)}function Hw(t,e,r){return r===void 0&&(r=1),e=e<0?t.length+e:e,t.slice(e,e+r)}function Uw(t,e,r){var n=this;return on(t).filter(function(i){var s=n.context.getFromScope(i,String(e).split("."));return r===void 0?nr(s,n.context):Je(r)?r.equals(s):s===r})}function qw(t){var e={};return(t||[]).filter(function(r){return e.hasOwnProperty(String(r))?!1:(e[String(r)]=!0,!0)})}var Gw=/%([-_0^#:]+)?(\d+)?([EO])?(.)/,_h=["January","February","March","April","May","June","July","August","September","October","November","December"],Sh=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],zw=_h.map(Ah),Vw=Sh.map(Ah),Ch={1:"st",2:"nd",3:"rd",default:"th"};function Ah(t){return t.slice(0,3)}function Ww(t){var e=Yw(t)?29:28;return[31,e,31,30,31,30,31,31,30,31,30,31]}function Rh(t){for(var e=0,r=0;r<t.getMonth();++r)e+=Ww(t)[r];return e+t.getDate()}function Th(t,e){var r=Rh(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 Yw(t){var e=t.getFullYear();return!!((e&3)===0&&(e%100||e%400===0&&e))}function Kw(t){var e=t.getDate().toString(),r=parseInt(e.slice(-1));return Ch[r]||Ch.default}function Xw(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}var Qw={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},Jw={a:" ",A:" ",b:" ",B:" ",c:" ",e:" ",k:" ",l:" ",p:" ",P:" "},Ba={a:function(t){return Vw[t.getDay()]},A:function(t){return Sh[t.getDay()]},b:function(t){return zw[t.getMonth()]},B:function(t){return _h[t.getMonth()]},c:function(t){return t.toLocaleString()},C:function(t){return Xw(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 Rh(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 wD(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 Kw(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 Th(t,0)},w:function(t){return t.getDay()},W:function(t){return Th(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?"-":"+")+li(n,2,"0")+(e.flags[":"]?":":"")+li(i,2,"0")},t:function(){return" "},n:function(){return`
|
|
92
|
-
`},"%":function(){return"%"}};Ba.h=Ba.b;function Zw(t,e){for(var r="",n=e,i;i=Gw.exec(n);)r+=n.slice(0,i.index),n=n.slice(i.index+i[0].length),r+=e1(t,i);return r+n}function e1(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=Ba[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=Jw[h]||"0",_=u||Qw[h]||0;return c["^"]?b=b.toUpperCase():c["#"]&&(b=SD(b)),c._?D=" ":c["0"]&&(D="0"),c["-"]&&(_=0),li(b,_,D)}var t1=6e4,r1=new Date().getTimezoneOffset(),n1=/([zZ]|([+-])(\d{2}):(\d{2}))$/,Na=function(){function t(e,r){if(e instanceof t)this.date=e.date,r=e.timezoneOffset;else{var n=(r1-r)*t1,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(n1);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 i1(t,e){var r=this.context.opts,n;return t==="now"||t==="today"?n=new Date:Ea(t)?n=new Date(t*1e3):Ft(t)?/^\d+$/.test(t)?n=new Date(+t*1e3):r.preserveTimezones?n=Na.createDateFixedToTimezone(t):n=new Date(t):n=t,s1(n)?(r.hasOwnProperty("timezoneOffset")&&(n=new Na(n,r.timezoneOffset)),Zw(n,e)):t}function s1(t){return(t instanceof Date||t instanceof Na)&&!isNaN(t.getTime())}function a1(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:_a(t,this.context)?e:t)}function o1(t){return JSON.stringify(t)}function u1(t,e){return Pe(arguments.length===2,"append expect 2 arguments"),fe(t)+fe(e)}function l1(t,e){return Pe(arguments.length===2,"prepend expect 2 arguments"),fe(e)+fe(t)}function c1(t){return fe(t).replace(/^\s+/,"")}function h1(t){return fe(t).toLowerCase()}function f1(t){return fe(t).toUpperCase()}function d1(t,e){return fe(t).split(String(e)).join("")}function p1(t,e){return fe(t).replace(String(e),"")}function m1(t){return fe(t).replace(/\s+$/,"")}function g1(t,e){return fe(t).split(String(e))}function y1(t){return fe(t).trim()}function v1(t){return fe(t).replace(/\n/g,"")}function b1(t){return t=fe(t),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function D1(t,e,r){return fe(t).split(String(e)).join(r)}function E1(t,e,r){return fe(t).replace(String(e),r)}function w1(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 _1(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 S1=Object.freeze({__proto__:null,escape:wh,escapeOnce:mw,newlineToBr:gw,stripHtml:yw,abs:vw,atLeast:bw,atMost:Dw,ceil:Ew,dividedBy:ww,floor:_w,minus:Sw,modulo:Cw,times:Aw,round:Rw,plus:Tw,sortNatural:xw,urlDecode:$w,urlEncode:Ow,join:Fw,last:Pw,first:kw,reverse:Iw,sort:Lw,size:Bw,map:Nw,compact:Mw,concat:jw,slice:Hw,where:Uw,uniq:qw,date:i1,Default:a1,json:o1,append:u1,prepend:l1,lstrip:c1,downcase:h1,upcase:f1,remove:d1,removeFirst:p1,rstrip:m1,split:g1,strip:y1,stripNewlines:v1,capitalize:b1,replace:D1,replaceFirst:E1,truncate:w1,truncatewords:_1}),C1=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}(),A1=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 vh(e,this.get(e),r,this.liquid)},t}(),R1=function(){function t(e){var r=this;e===void 0&&(e={}),this.options=MD(e),this.parser=new ME(this),this.renderer=new nE,this.filters=new A1(this.options.strictFilters,this),this.tags=new C1,zc(hw,function(n,i){return r.registerTag(Xc(i),n)}),zc(S1,function(n,i){return r.registerFilter(Xc(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 Aa(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,pi(this._render(e,r,Ge(Ge({},n),{sync:!1})))]})})},t.prototype.renderSync=function(e,r,n){return mi(this._render(e,r,Ge(Ge({},n),{sync:!0})))},t.prototype.renderToNodeStream=function(e,r,n){n===void 0&&(n={});var i=new Aa(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,pi(this._parseAndRender(e,r,Ge(Ge({},n),{sync:!1})))]})})},t.prototype.parseAndRenderSync=function(e,r,n){return mi(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,pi(this.parser.parseFile(e,!1))]})})},t.prototype.parseFileSync=function(e){return mi(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,pi(this._evalValue(e,r))]})})},t.prototype.evalValueSync=function(e,r){return mi(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=hi(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 T1(t){return e=>{const r=new R1;return r.render(r.parse(t),e)}}function x1(t){return t.toLowerCase()}var $1=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],O1=/[^A-Z0-9]+/gi;function xh(t,e){e===void 0&&(e={});for(var r=e.splitRegexp,n=r===void 0?$1:r,i=e.stripRegexp,s=i===void 0?O1:i,a=e.transform,o=a===void 0?x1:a,u=e.delimiter,l=u===void 0?" ":u,h=$h($h(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 $h(t,e,r){return e instanceof RegExp?t.replace(e,r):e.reduce(function(n,i){return n.replace(i,r)},t)}function Oh(t,e){var r=t.charAt(0),n=t.substr(1).toLowerCase();return e>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function F1(t,e){return e===void 0&&(e={}),xh(t,Er({delimiter:"",transform:Oh},e))}function P1(t,e){return e===0?t.toLowerCase():Oh(t,e)}function k1(t,e){return e===void 0&&(e={}),F1(t,Er({transform:P1},e))}function I1(t,e){return e===void 0&&(e={}),xh(t,Er({delimiter:"."},e))}function L1(t,e){return e===void 0&&(e={}),I1(t,Er({delimiter:"-"},e))}var B1=Object.freeze({__proto__:null,camelize:k1,hyphenize:L1});function Et(t=""){return t.includes("\\")?t.replace(/\\/g,"/"):t}const N1=/^[/][/]/,M1=/^[/][/]([.]{1,2}[/])?([a-zA-Z]):[/]/,j1=/^\/|^\\|^[a-zA-Z]:[/\\]/,Fh="/",Ph=":",Ma=function(t){if(t.length===0)return".";t=Et(t);const e=t.match(N1),r=e&&t.match(M1),n=Or(t),i=t[t.length-1]==="/";return t=yi(t,!n),t.length===0?n?"/":i?"./":".":(i&&(t+="/"),e?r?`//./${t}`:`//${t}`:n&&!Or(t)?`/${t}`:t)},kh=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?".":Ma(e)},Ih=function(...t){t=t.map(n=>Et(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=Or(i))}return e=yi(e,!r),r&&!Or(e)?`/${e}`:e.length>0?e:"."};function yi(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 Or=function(t){return j1.test(t)},Lh=function(t){return Et(t)},Bh=function(t){return Ee.posix.extname(Et(t))},Nh=function(t,e){return Ee.posix.relative(Et(t),Et(e))},Mh=function(t){return Ee.posix.dirname(Et(t))},jh=function(t){return Et(Ee.posix.format(t))},Hh=function(t,e){return Ee.posix.basename(Et(t),e)},Uh=function(t){return Ee.posix.parse(Et(t))},H1=Object.freeze({__proto__:null,sep:Fh,delimiter:Ph,normalize:Ma,join:kh,resolve:Ih,normalizeString:yi,isAbsolute:Or,toNamespacedPath:Lh,extname:Bh,relative:Nh,dirname:Mh,format:jh,basename:Hh,parse:Uh});({...H1});class U1{constructor(e){fs(this,"value");fs(this,"next");this.value=e}}class q1{constructor(){Ln(this,Rt,void 0);Ln(this,pr,void 0);Ln(this,mr,void 0);this.clear()}enqueue(e){const r=new U1(e);Mt(this,Rt)?(Mt(this,pr).next=r,Tt(this,pr,r)):(Tt(this,Rt,r),Tt(this,pr,r)),ds(this,mr)._++}dequeue(){const e=Mt(this,Rt);if(!!e)return Tt(this,Rt,Mt(this,Rt).next),ds(this,mr)._--,e.value}clear(){Tt(this,Rt,void 0),Tt(this,pr,void 0),Tt(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 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 q1;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 G1=async(t,e)=>e(await t),z1=async t=>{const e=await Promise.all(t);if(e[1]===!0)throw new Gh(e[0]);return!1};async function V1(t,e,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){const i=qh(r),s=[...t].map(o=>[o,i(G1,o,e)]),a=qh(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(s.map(o=>a(z1,o)))}catch(o){if(o instanceof Gh)return o.value;throw o}}const zh={directory:"isDirectory",file:"isFile"};function W1(t){if(!(t in zh))throw new Error(`Invalid type specified: ${t}`)}const Y1=(t,e)=>t===void 0||e[zh[t]]();async function Vh(t,{cwd:e=ht.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:i,preserveOrder:s}={}){W1(r);const a=n?Zu.stat:Zu.lstat;return V1(t,async o=>{try{const u=await a(it.resolve(e,o));return Y1(r,u)}catch{return!1}},{concurrency:i,preserveOrder:s})}const K1=Symbol("findUpStop");async function X1(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 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===K1||(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 X1(t,{...e,limit:1}))[0]}var Me={},ge={},Fr={};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.splitWhen=Fr.flatten=void 0;function J1(t){return t.reduce((e,r)=>[].concat(e,r),[])}Fr.flatten=J1;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}Fr.splitWhen=Z1;var vi={};Object.defineProperty(vi,"__esModule",{value:!0}),vi.isEnoentCodeError=void 0;function e_(t){return t.code==="ENOENT"}vi.isEnoentCodeError=e_;var bi={};Object.defineProperty(bi,"__esModule",{value:!0}),bi.createDirentFromStats=void 0;class t_{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 r_(t,e){return new t_(t,e)}bi.createDirentFromStats=r_;var wt={};Object.defineProperty(wt,"__esModule",{value:!0}),wt.removeLeadingDotSegment=wt.escape=wt.makeAbsolute=wt.unixify=void 0;const n_=Ee,i_=2,s_=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function a_(t){return t.replace(/\\/g,"/")}wt.unixify=a_;function o_(t,e){return n_.resolve(t,e)}wt.makeAbsolute=o_;function u_(t){return t.replace(s_,"\\$2")}wt.escape=u_;function l_(t){if(t.charAt(0)==="."){const e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(i_)}return t}wt.removeLeadingDotSegment=l_;var V={};/*!
|
|
93
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
94
|
-
*
|
|
95
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
96
|
-
* Licensed under the MIT License.
|
|
97
|
-
*/var c_=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
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
99
|
-
*
|
|
100
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
101
|
-
* Released under the MIT License.
|
|
102
|
-
*/var h_=c_,Wh={"{":"}","(":")","[":"]"},f_=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},d_=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},p_=function(e,r){if(typeof e!="string"||e==="")return!1;if(h_(e))return!0;var n=f_;return r&&r.strict===!1&&(n=d_),n(e)},m_=p_,g_=Ee.posix.dirname,y_=Bn.platform()==="win32",ja="/",v_=/\\/g,b_=/[\{\[].*[\}\]]$/,D_=/(^|[^\\])([\{\[]|\([^\)]+$)/,E_=/\\([\!\*\?\|\[\]\(\)\{\}])/g,w_=function(e,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&y_&&e.indexOf(ja)<0&&(e=e.replace(v_,ja)),b_.test(e)&&(e+=ja),e+="a";do e=g_(e);while(m_(e)||D_.test(e));return e.replace(E_,"$1")},Di={};(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}})(Di);const Yh=Di;var Ha=(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
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
|
104
|
-
*
|
|
105
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
106
|
-
* Released under the MIT License.
|
|
107
|
-
*/var __=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1};/*!
|
|
108
|
-
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
109
|
-
*
|
|
110
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
111
|
-
* Released under the MIT License.
|
|
112
|
-
*/const Kh=__,sr=(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(sr.cache.hasOwnProperty(u))return sr.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=S_(p,m),n.capture===!0?c.result=`(${c.result})`:n.wrap!==!1&&m.length+p.length>1&&(c.result=`(?:${c.result})`),sr.cache[u]=c,c.result};function S_(t,e,r){let n=Ua(t,e,"-",!1)||[],i=Ua(e,t,"",!1)||[],s=Ua(t,e,"-?",!0)||[];return n.concat(s).concat(i).join("|")}function C_(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(T_),s}function A_(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let n=R_(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+=x_(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=C_(t,e),s=[],a=t,o;for(let u=0;u<i.length;u++){let l=i[u],h=A_(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,r,n)),h.string=f+h.pattern+ef(h.count),s.push(h),a=l+1,o=h}return s}function Ua(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 R_(t,e){let r=[];for(let n=0;n<t.length;n++)r.push([t[n],e[n]]);return r}function T_(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 x_(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function tf(t){return/^-?(0+)\d/.test(t)}function $_(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}}`}}sr.cache={},sr.clearCache=()=>sr.cache={};var O_=sr;/*!
|
|
113
|
-
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
114
|
-
*
|
|
115
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
116
|
-
* Licensed under the MIT License.
|
|
117
|
-
*/const F_=Kt,rf=O_,nf=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),P_=t=>e=>t===!0?Number(e):String(e),qa=t=>typeof t=="number"||typeof t=="string"&&t!=="",ln=t=>Number.isInteger(+t),Ga=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},k_=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,I_=(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},L_=(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: "+F_.inspect(...t)),lf=(t,e,r)=>{if(r.strictRanges===!0)throw uf([t,e]);return[]},B_=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},N_=(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=Ga(o)||Ga(u)||Ga(l),f=h?Math.max(o.length,u.length,l.length):0,c=h===!1&&k_(t,e,n)===!1,m=n.transform||P_(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(I_(m(i,D),f,c)),i=a?i-r:i+r,D++;return n.toRegex===!0?r>1?L_(p,n):of(b,null,{wrap:!1,...n}):b},M_=(t,e,r=1,n={})=>{if(!ln(t)&&t.length>1||!ln(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},Ei=(t,e,r,n={})=>{if(e==null&&qa(t))return[t];if(!qa(t)||!qa(e))return lf(t,e,n);if(typeof r=="function")return Ei(t,e,1,{transform:r});if(nf(r))return Ei(t,e,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,ln(r)?ln(t)&&ln(e)?N_(t,e,r,i):M_(t,e,Math.max(Math.abs(r),1),i):r!=null&&!nf(r)?B_(r,i):Ei(t,e,1,r)};var cf=Ei;const j_=cf,hf=Di,H_=(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=j_(...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 U_=H_;const q_=cf,ff=Ha,Pr=Di,ar=(t="",e="",r=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?Pr.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let s of i)n.push(ar(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?ar(i,s,r):i+s);return Pr.flatten(n)},G_=(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(ar(o.pop(),ff(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){o.push(ar(o.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let f=Pr.reduce(i.nodes);if(Pr.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=q_(...f,e);c.length===0&&(c=ff(i,e)),o.push(ar(o.pop(),c)),i.nodes=[];return}let u=Pr.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(ar(o.pop(),l,u));continue}if(c.value&&c.type!=="open"){l.push(ar(l.pop(),c.value));continue}c.nodes&&n(c,i)}return l};return Pr.flatten(n(t))};var z_=G_,V_={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 W_=Ha,{MAX_LENGTH:df,CHAR_BACKSLASH:za,CHAR_BACKTICK:Y_,CHAR_COMMA:K_,CHAR_DOT:X_,CHAR_LEFT_PARENTHESES:Q_,CHAR_RIGHT_PARENTHESES:J_,CHAR_LEFT_CURLY_BRACE:Z_,CHAR_RIGHT_CURLY_BRACE:eS,CHAR_LEFT_SQUARE_BRACKET:pf,CHAR_RIGHT_SQUARE_BRACKET:mf,CHAR_DOUBLE_QUOTE:tS,CHAR_SINGLE_QUOTE:rS,CHAR_NO_BREAK_SPACE:nS,CHAR_ZERO_WIDTH_NOBREAK_SPACE:iS}=V_,sS=(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===iS||c===nS)){if(c===za){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===za){c+=m();continue}if(y===mf&&(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===J_){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===tS||c===rS||c===Y_){let y=c,b;for(e.keepQuotes!==!0&&(c="");h<l&&(b=m());){if(b===za){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===eS){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===K_&&f>0){if(a.ranges>0){a.ranges=0;let y=a.nodes.shift();a.nodes=[y,{type:"text",value:W_(a)}]}p({type:"comma",value:c}),a.commas++;continue}if(c===X_&&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 aS=sS;const gf=Ha,oS=U_,uS=z_,lS=aS,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={})=>lS(t,e),Ze.stringify=(t,e={})=>gf(typeof t=="string"?Ze.parse(t,e):t,e),Ze.compile=(t,e={})=>(typeof t=="string"&&(t=Ze.parse(t,e)),oS(t,e)),Ze.expand=(t,e={})=>{typeof t=="string"&&(t=Ze.parse(t,e));let r=uS(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 cS=Ze,cn={};const hS=Ee,_t="\\\\/",yf=`[^${_t}]`,kt="\\.",fS="\\+",dS="\\?",wi="\\/",pS="(?=.)",vf="[^/]",Va=`(?:${wi}|$)`,bf=`(?:^|${wi})`,Wa=`${kt}{1,2}${Va}`,mS=`(?!${kt})`,gS=`(?!${bf}${Wa})`,yS=`(?!${kt}{0,1}${Va})`,vS=`(?!${Wa})`,bS=`[^.${wi}]`,DS=`${vf}*?`,Df={DOT_LITERAL:kt,PLUS_LITERAL:fS,QMARK_LITERAL:dS,SLASH_LITERAL:wi,ONE_CHAR:pS,QMARK:vf,END_ANCHOR:Va,DOTS_SLASH:Wa,NO_DOT:mS,NO_DOTS:gS,NO_DOT_SLASH:yS,NO_DOTS_SLASH:vS,QMARK_NO_DOT:bS,STAR:DS,START_ANCHOR:bf},ES={...Df,SLASH_LITERAL:`[${_t}]`,QMARK:yf,STAR:`${yf}*?`,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}]|$)`},wS={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 _i={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:wS,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:hS.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?ES:Df}};(function(t){const e=Ee,r=process.platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:a}=_i;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}})(cn);const Ef=cn,{CHAR_ASTERISK:Ya,CHAR_AT:_S,CHAR_BACKWARD_SLASH:hn,CHAR_COMMA:SS,CHAR_DOT:Ka,CHAR_EXCLAMATION_MARK:Xa,CHAR_FORWARD_SLASH:wf,CHAR_LEFT_CURLY_BRACE:Qa,CHAR_LEFT_PARENTHESES:Ja,CHAR_LEFT_SQUARE_BRACKET:CS,CHAR_PLUS:AS,CHAR_QUESTION_MARK:_f,CHAR_RIGHT_CURLY_BRACE:RS,CHAR_RIGHT_PARENTHESES:Sf,CHAR_RIGHT_SQUARE_BRACKET:TS}=_i,Cf=t=>t===wf||t===hn,Af=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},xS=(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,E,x,$={value:"",depth:0,isGlob:!1};const j=()=>l>=n,A=()=>u.charCodeAt(l+1),I=()=>(E=x,u.charCodeAt(++l));for(;l<n;){x=I();let re;if(x===hn){_=$.backslashes=!0,x=I(),x===Qa&&(D=!0);continue}if(D===!0||x===Qa){for(d++;j()!==!0&&(x=I());){if(x===hn){_=$.backslashes=!0,I();continue}if(x===Qa){d++;continue}if(D!==!0&&x===Ka&&(x=I())===Ka){if(c=$.isBrace=!0,p=$.isGlob=!0,v=!0,i===!0)continue;break}if(D!==!0&&x===SS){if(c=$.isBrace=!0,p=$.isGlob=!0,v=!0,i===!0)continue;break}if(x===RS&&(d--,d===0)){D=!1,c=$.isBrace=!0,v=!0;break}}if(i===!0)continue;break}if(x===wf){if(s.push(l),a.push($),$={value:"",depth:0,isGlob:!1},v===!0)continue;if(E===Ka&&l===h+1){h+=2;continue}f=l+1;continue}if(r.noext!==!0&&(x===AS||x===_S||x===Ya||x===_f||x===Xa)===!0&&A()===Ja){if(p=$.isGlob=!0,y=$.isExtglob=!0,v=!0,x===Xa&&l===h&&(S=!0),i===!0){for(;j()!==!0&&(x=I());){if(x===hn){_=$.backslashes=!0,x=I();continue}if(x===Sf){p=$.isGlob=!0,v=!0;break}}continue}break}if(x===Ya){if(E===Ya&&(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===CS){for(;j()!==!0&&(re=I());){if(re===hn){_=$.backslashes=!0,I();continue}if(re===TS){m=$.isBracket=!0,p=$.isGlob=!0,v=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&x===Xa&&l===h){R=$.negated=!0,h++;continue}if(r.noparen!==!0&&x===Ja){if(p=$.isGlob=!0,i===!0){for(;j()!==!0&&(x=I());){if(x===Ja){_=$.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=Ef.removeBackslashes(C)),B&&_===!0&&(B=Ef.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 Te=re?re+1:h,Ue=s[q],ye=t.slice(Te,Ue);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=Ue}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 $S=xS;const Si=_i,et=cn,{MAX_LENGTH:Ci,POSIX_REGEX_SOURCE:OS,REGEX_NON_SPECIAL_CHARS:FS,REGEX_SPECIAL_CHARS_BACKREF:PS,REPLACEMENTS:Rf}=Si,kS=(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},kr=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Za=(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(Ci,r.maxLength):Ci;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=Si.globChars(u),h=Si.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,E=k=>`(${o}(?:(?!${d}${k.dot?y:f}).)*?)`,x=r.dot?"":b,$=r.dot?R:S;let j=r.bash===!0?E(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,T;const re=()=>A.index===i-1,q=A.peek=(k=1)=>t[A.index+k],Te=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)==="?");)Te(),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 Y=(r.capture?"(":"")+P.open;lt("parens"),G({type:k,value:ie,output:A.output?"":p}),G({type:"paren",extglob:!0,value:Te(),output:Y}),I.push(P)},kn=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=E(r)),(Y!==j||re()||/^\)+$/.test(Ue()))&&(ie=k.close=`)$))${Y}`),k.inner.includes("*")&&(P=Ue())&&/^\.[^\\/.]+$/.test(P)){const se=Za(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}),nt("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let k=!1,ie=t.replace(PS,(P,Y,se,xe,be,Wr)=>xe==="\\"?(k=!0,P):xe==="?"?Y?Y+xe+(be?R.repeat(be.length):""):Wr===0?$+(be?R.repeat(be.length):""):R.repeat(se.length):xe==="."?f.repeat(se.length):xe==="*"?Y?Y+xe+(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=et.wrapOutput(ie,A,e),A)}for(;!re();){if(T=Te(),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(Ue());let se=0;if(Y&&Y[0].length>2&&(se=Y[0].length,A.index+=se,se%2!==0&&(T+="\\")),r.unescape===!0?T=Te():T+=Te(),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),xe=C.value.slice(Y+2),be=OS[xe];if(be){C.value=se+be,A.backtrack=!0,Te(),!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,rt({value:T});continue}if(A.quotes===1&&T!=='"'){T=et.escapeRegex(T),C.value+=T,rt({value:T});continue}if(T==='"'){A.quotes=A.quotes===1?0:1,r.keepQuotes===!0&&G({type:"text",value:T});continue}if(T==="("){lt("parens"),G({type:"paren",value:T});continue}if(T===")"){if(A.parens===0&&r.strictBrackets===!0)throw new SyntaxError(kr("opening","("));const P=I[I.length-1];if(P&&A.parens===P.parens+1){kn(I.pop());continue}G({type:"paren",value:T,output:A.parens?")":"\\)"}),nt("parens");continue}if(T==="["){if(r.nobracket===!0||!Ue().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(kr("closing","]"));T=`\\${T}`}else lt("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(kr("opening","["));G({type:"text",value:T,output:`\\${T}`});continue}nt("brackets");const P=C.value.slice(1);if(C.posix!==!0&&P[0]==="^"&&!P.includes("/")&&(T=`/${T}`),C.value+=T,rt({value:T}),r.literalBrackets===!1||et.hasRegexChars(P))continue;const Y=et.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){lt("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(),xe=[];for(let be=se.length-1;be>=0&&(a.pop(),se[be].type!=="brace");be--)se[be].type!=="dots"&&xe.unshift(se[be].value);Y=kS(xe,r),A.backtrack=!0}if(P.comma!==!0&&P.dots!==!0){const se=A.output.slice(0,P.outputIndex),xe=A.tokens.slice(P.tokensIndex);P.value=P.output="\\{",T=Y="\\}",A.output=se;for(const be of xe)A.output+=be.output||be.value}G({type:"brace",value:T,output:Y}),nt("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)!=="?"){Dt("qmark",T);continue}if(C&&C.type==="paren"){const Y=q();let se=T;if(Y==="<"&&!et.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(C.value==="("&&!/[!=<:]/.test(Y)||Y==="<"&&!/<([!=]|\w+>)/.test(Ue()))&&(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)))){Dt("negate",T);continue}if(r.nonegate!==!0&&A.index===0){gr();continue}}if(T==="+"){if(r.noextglob!==!0&&q()==="("&&q(2)!=="?"){Dt("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=FS.exec(Ue());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=Ue();if(r.noextglob!==!0&&/^\([^?]/.test(k)){Dt("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",xe=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"),Wr=I.length&&(P.type==="pipe"||P.type==="paren");if(!se&&P.type!=="paren"&&!be&&!Wr){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=E(r),A.output=C.output,A.globstar=!0,ye(T);continue}if(P.type==="slash"&&P.prev.type!=="bos"&&!xe&&re()){A.output=A.output.slice(0,-(P.output+C.output).length),P.output=`(?:${P.output}`,C.type="globstar",C.output=E(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=`${E(r)}${m}|${m}${me})`,C.value+=T,A.output+=P.output+C.output,A.globstar=!0,ye(T+Te()),G({type:"slash",value:"/",output:""});continue}if(P.type==="bos"&&k[0]==="/"){C.type="globstar",C.value+=T,C.output=`(?:^|${m}|${E(r)}${m})`,A.output=C.output,A.globstar=!0,ye(T+Te()),G({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-C.output.length),C.type="globstar",C.output=E(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(kr("closing","]"));A.output=et.escapeLast(A.output,"["),nt("brackets")}for(;A.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(kr("closing",")"));A.output=et.escapeLast(A.output,"("),nt("parens")}for(;A.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(kr("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};Za.fastpaths=(t,e)=>{const r={...e},n=typeof r.maxLength=="number"?Math.min(Ci,r.maxLength):Ci,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);t=Rf[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}=Si.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=et.removePrefix(t,_);let E=v(d);return E&&r.strictSlashes!==!0&&(E+=`${o}?`),E};var IS=Za;const LS=Ee,BS=$S,eo=IS,to=cn,NS=_i,MS=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=MS(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=to.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?to.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=to.isWindows(r))=>(e instanceof RegExp?e:Se.makeRe(e,r)).test(LS.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)):eo(t,{...e,fastpaths:!1}),Se.scan=(t,e)=>BS(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=eo.fastpaths(t,e)),i.output||(i=eo(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=NS;var jS=Se,HS=jS;const Tf=Kt,xf=cS,St=HS,ro=cn,$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=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: "${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(!ro.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: "${Tf.inspect(t)}"`);return[].concat(e).every(n=>St(n,r)(t))},de.capture=(t,e,r)=>{let n=ro.isWindows(r),s=St.makeRe(String(t),{...r,capture:!0}).exec(n?ro.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 xf(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]: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 US=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 qS=Ee,GS=w_,no=US,Of="**",zS="\\",VS=/[*?]|^!/,WS=/\[[^[]*]/,YS=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,KS=/[!*+?@]\([^(]*\)/,XS=/,|\.\./;function Ff(t,e={}){return!Pf(t,e)}V.isStaticPattern=Ff;function Pf(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(zS)||VS.test(t)||WS.test(t)||YS.test(t)||e.extglob!==!1&&KS.test(t)||e.braceExpansion!==!1&&QS(t))}V.isDynamicPattern=Pf;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 XS.test(n)}function JS(t){return Ai(t)?t.slice(1):t}V.convertToPositivePattern=JS;function ZS(t){return"!"+t}V.convertToNegativePattern=ZS;function Ai(t){return t.startsWith("!")&&t[1]!=="("}V.isNegativePattern=Ai;function kf(t){return!Ai(t)}V.isPositivePattern=kf;function eC(t){return t.filter(Ai)}V.getNegativePatterns=eC;function tC(t){return t.filter(kf)}V.getPositivePatterns=tC;function rC(t){return t.filter(e=>!io(e))}V.getPatternsInsideCurrentDirectory=rC;function nC(t){return t.filter(io)}V.getPatternsOutsideCurrentDirectory=nC;function io(t){return t.startsWith("..")||t.startsWith("./..")}V.isPatternRelatedToParentDirectory=io;function iC(t){return GS(t,{flipBackslashes:!1})}V.getBaseDirectory=iC;function sC(t){return t.includes(Of)}V.hasGlobStar=sC;function If(t){return t.endsWith("/"+Of)}V.endsWithSlashGlobStar=If;function aC(t){const e=qS.basename(t);return If(t)||Ff(e)}V.isAffectDepthOfReadingPattern=aC;function oC(t){return t.reduce((e,r)=>e.concat(Lf(r)),[])}V.expandPatternsWithBraceExpansion=oC;function Lf(t){return no.braces(t,{expand:!0,nodupes:!0})}V.expandBraceExpansion=Lf;function uC(t,e){let{parts:r}=no.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=uC;function Bf(t,e){return no.makeRe(t,e)}V.makeRe=Bf;function lC(t,e){return t.map(r=>Bf(r,e))}V.convertPatternsToRe=lC;function cC(t,e){return e.some(r=>r.test(t))}V.matchAny=cC;var Ri={};const hC=Ke,Nf=hC.PassThrough,fC=Array.prototype.slice;var dC=pC;function pC(){const t=[],e=fC.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(Ri,"__esModule",{value:!0}),Ri.merge=void 0;const mC=dC;function gC(t){const e=mC(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>jf(t)),e.once("end",()=>jf(t)),e}Ri.merge=gC;function jf(t){t.forEach(e=>e.emit("close"))}var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.isEmpty=Ir.isString=void 0;function yC(t){return typeof t=="string"}Ir.isString=yC;function vC(t){return t===""}Ir.isEmpty=vC,Object.defineProperty(ge,"__esModule",{value:!0}),ge.string=ge.stream=ge.pattern=ge.path=ge.fs=ge.errno=ge.array=void 0;const bC=Fr;ge.array=bC;const DC=vi;ge.errno=DC;const EC=bi;ge.fs=EC;const wC=wt;ge.path=wC;const _C=V;ge.pattern=_C;const SC=Ri;ge.stream=SC;const CC=Ir;ge.string=CC,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 AC(t,e){const r=Hf(t),n=Uf(t,e.ignore),i=r.filter(u=>It.pattern.isStaticPattern(u,e)),s=r.filter(u=>It.pattern.isDynamicPattern(u,e)),a=so(i,n,!1),o=so(s,n,!0);return a.concat(o)}Me.generate=AC;function so(t,e,r){const n=[],i=It.pattern.getPatternsOutsideCurrentDirectory(t),s=It.pattern.getPatternsInsideCurrentDirectory(t),a=ao(i),o=ao(s);return n.push(...oo(a,e,r)),"."in o?n.push(uo(".",s,e,r)):n.push(...oo(o,e,r)),n}Me.convertPatternsToTasks=so;function Hf(t){return It.pattern.getPositivePatterns(t)}Me.getPositivePatterns=Hf;function Uf(t,e){return It.pattern.getNegativePatterns(t).concat(e).map(It.pattern.convertToPositivePattern)}Me.getNegativePatternsAsPositive=Uf;function ao(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=ao;function oo(t,e,r){return Object.keys(t).map(n=>uo(n,t[n],e,r))}Me.convertPatternGroupsToTasks=oo;function uo(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(It.pattern.convertToNegativePattern))}}Me.convertPatternGroupToTask=uo;var Lr={};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.removeDuplicateSlashes=Lr.transform=void 0;const RC=/(?!^)\/{2,}/g;function TC(t){return t.map(e=>qf(e))}Lr.transform=TC;function qf(t){return t.replace(RC,"/")}Lr.removeDuplicateSlashes=qf;var lo={},Ti={},tt={},xi={};Object.defineProperty(xi,"__esModule",{value:!0}),xi.read=void 0;function xC(t,e,r){e.fs.lstat(t,(n,i)=>{if(n!==null){Gf(r,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){co(r,i);return}e.fs.stat(t,(s,a)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){Gf(r,s);return}co(r,i);return}e.markSymbolicLink&&(a.isSymbolicLink=()=>!0),co(r,a)})})}xi.read=xC;function Gf(t,e){t(e)}function co(t,e){t(null,e)}var $i={};Object.defineProperty($i,"__esModule",{value:!0}),$i.read=void 0;function $C(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}}$i.read=$C;var ho={},zf={};(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})(zf),Object.defineProperty(ho,"__esModule",{value:!0});const OC=zf;class FC{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=OC.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}}ho.default=FC,Object.defineProperty(tt,"__esModule",{value:!0}),tt.statSync=tt.stat=tt.Settings=void 0;const Vf=xi,PC=$i,fo=ho;tt.Settings=fo.default;function kC(t,e,r){if(typeof e=="function"){Vf.read(t,po(),e);return}Vf.read(t,po(e),r)}tt.stat=kC;function IC(t,e){const r=po(e);return PC.read(t,r)}tt.statSync=IC;function po(t={}){return t instanceof fo.default?t:new fo.default(t)}var mt={},mo={},Oi={},Ct={},zt={};/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */let Wf;var LC=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 BC=MC;const NC=LC;function MC(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?NC(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 fn={};Object.defineProperty(fn,"__esModule",{value:!0}),fn.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const Fi=process.versions.node.split(".");if(Fi[0]===void 0||Fi[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const Yf=Number.parseInt(Fi[0],10),jC=Number.parseInt(Fi[1],10),Kf=10,HC=10,UC=Yf>Kf,qC=Yf===Kf&&jC>=HC;fn.IS_SUPPORT_READDIR_WITH_FILE_TYPES=UC||qC;var dn={},Pi={};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.createDirentFromStats=void 0;class GC{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 zC(t,e){return new GC(t,e)}Pi.createDirentFromStats=zC,Object.defineProperty(dn,"__esModule",{value:!0}),dn.fs=void 0;const VC=Pi;dn.fs=VC;var pn={};Object.defineProperty(pn,"__esModule",{value:!0}),pn.joinPathSegments=void 0;function WC(t,e,r){return t.endsWith(r)?t+e:t+r+e}pn.joinPathSegments=WC,Object.defineProperty(zt,"__esModule",{value:!0}),zt.readdir=zt.readdirWithFileTypes=zt.read=void 0;const YC=tt,Xf=BC,KC=fn,Qf=dn,Jf=pn;function XC(t,e,r){if(!e.stats&&KC.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Zf(t,e,r);return}ed(t,e,r)}zt.read=XC;function Zf(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,i)=>{if(n!==null){ki(r,n);return}const s=i.map(o=>({dirent:o,name:o.name,path:Jf.joinPathSegments(t,o.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){go(r,s);return}const a=s.map(o=>QC(o,e));Xf(a,(o,u)=>{if(o!==null){ki(r,o);return}go(r,u)})})}zt.readdirWithFileTypes=Zf;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=Qf.fs.createDirentFromStats(t.name,i),r(null,t)})}}function ed(t,e,r){e.fs.readdir(t,(n,i)=>{if(n!==null){ki(r,n);return}const s=i.map(a=>{const o=Jf.joinPathSegments(t,a,e.pathSegmentSeparator);return u=>{YC.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){ki(r,a);return}go(r,o)})})}zt.readdir=ed;function ki(t,e){t(e)}function go(t,e){t(null,e)}var Vt={};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.readdir=Vt.readdirWithFileTypes=Vt.read=void 0;const JC=tt,ZC=fn,td=dn,rd=pn;function e2(t,e){return!e.stats&&ZC.IS_SUPPORT_READDIR_WITH_FILE_TYPES?nd(t,e):id(t,e)}Vt.read=e2;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})}Vt.readdirWithFileTypes=nd;function id(t,e){return e.fs.readdirSync(t).map(n=>{const i=rd.joinPathSegments(t,n,e.pathSegmentSeparator),s=JC.statSync(i,e.fsStatSettings),a={name:n,path:i,dirent:td.fs.createDirentFromStats(n,s)};return e.stats&&(a.stats=s),a})}Vt.readdir=id;var yo={},sd={};(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})(sd),Object.defineProperty(yo,"__esModule",{value:!0});const t2=Ee,r2=tt,n2=sd;class i2{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n2.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t2.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new r2.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}}yo.default=i2,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.Settings=Ct.scandirSync=Ct.scandir=void 0;const ad=zt,s2=Vt,vo=yo;Ct.Settings=vo.default;function a2(t,e,r){if(typeof e=="function"){ad.read(t,bo(),e);return}ad.read(t,bo(e),r)}Ct.scandir=a2;function o2(t,e){const r=bo(e);return s2.read(t,r)}Ct.scandirSync=o2;function bo(t={}){return t instanceof vo.default?t:new vo.default(t)}var Do={exports:{}};function u2(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 l2=u2,c2=l2;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=c2(h2),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 E=n.get();E.context=t,E.release=D,E.value=v,E.callback=d||at,E.errorHandler=o,a===u.concurrency||u.paused?s?(s.next=E,s=E):(i=E,s=E,u.saturated()):(a++,e.call(t,E.value,E.worked))}function b(v,d){var E=n.get();E.context=t,E.release=D,E.value=v,E.callback=d||at,a===u.concurrency||u.paused?i?(E.next=i,i=E):(i=E,s=E,u.saturated()):(a++,e.call(t,E.value,E.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 h2(){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 f2(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(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}}Do.exports=od,Do.exports.promise=f2;var ot={};Object.defineProperty(ot,"__esModule",{value:!0}),ot.joinPathSegments=ot.replacePathSegmentSeparator=ot.isAppliedFilter=ot.isFatalError=void 0;function d2(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}ot.isFatalError=d2;function p2(t,e){return t===null||t(e)}ot.isAppliedFilter=p2;function m2(t,e){return t.split(/[/\\]/).join(e)}ot.replacePathSegmentSeparator=m2;function g2(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}ot.joinPathSegments=g2;var Ii={};Object.defineProperty(Ii,"__esModule",{value:!0});const y2=ot;class v2{constructor(e,r){this._root=e,this._settings=r,this._root=y2.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}}Ii.default=v2,Object.defineProperty(Oi,"__esModule",{value:!0});const b2=jt,D2=Ct,E2=Do.exports,Li=ot,w2=Ii;class _2 extends w2.default{constructor(e,r){super(e,r);this._settings=r,this._scandir=D2.scandir,this._emitter=new b2.EventEmitter,this._queue=E2(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||!Li.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=Li.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Li.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Li.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}Oi.default=_2,Object.defineProperty(mo,"__esModule",{value:!0});const S2=Oi;class C2{constructor(e,r){this._root=e,this._settings=r,this._reader=new S2.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{A2(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{R2(e,this._storage)}),this._reader.read()}}mo.default=C2;function A2(t,e){t(e)}function R2(t,e){t(null,e)}var Eo={};Object.defineProperty(Eo,"__esModule",{value:!0});const T2=Ke,x2=Oi;class $2{constructor(e,r){this._root=e,this._settings=r,this._reader=new x2.default(this._root,this._settings),this._stream=new T2.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}}Eo.default=$2;var wo={},_o={};Object.defineProperty(_o,"__esModule",{value:!0});const O2=Ct,Bi=ot,F2=Ii;class P2 extends F2.default{constructor(){super(...arguments);this._scandir=O2.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(!!Bi.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;r!==void 0&&(e.path=Bi.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Bi.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&Bi.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}_o.default=P2,Object.defineProperty(wo,"__esModule",{value:!0});const k2=_o;class I2{constructor(e,r){this._root=e,this._settings=r,this._reader=new k2.default(this._root,this._settings)}read(){return this._reader.read()}}wo.default=I2;var So={};Object.defineProperty(So,"__esModule",{value:!0});const L2=Ee,B2=Ct;class N2{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,L2.sep),this.fsScandirSettings=new B2.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}}So.default=N2,Object.defineProperty(mt,"__esModule",{value:!0}),mt.Settings=mt.walkStream=mt.walkSync=mt.walk=void 0;const ud=mo,M2=Eo,j2=wo,Co=So;mt.Settings=Co.default;function H2(t,e,r){if(typeof e=="function"){new ud.default(t,Ni()).read(e);return}new ud.default(t,Ni(e)).read(r)}mt.walk=H2;function U2(t,e){const r=Ni(e);return new j2.default(t,r).read()}mt.walkSync=U2;function q2(t,e){const r=Ni(e);return new M2.default(t,r).read()}mt.walkStream=q2;function Ni(t={}){return t instanceof Co.default?t:new Co.default(t)}var Mi={};Object.defineProperty(Mi,"__esModule",{value:!0});const G2=Ee,z2=tt,ld=ge;class V2{constructor(e){this._settings=e,this._fsStatSettings=new z2.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return G2.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}}Mi.default=V2,Object.defineProperty(Ti,"__esModule",{value:!0});const W2=Ke,Y2=tt,K2=mt,X2=Mi;class Q2 extends X2.default{constructor(){super(...arguments);this._walkStream=K2.walkStream,this._stat=Y2.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){const n=e.map(this._getFullEntryPath,this),i=new W2.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))})}}Ti.default=Q2;var mn={},Ao={},Ro={},To={};Object.defineProperty(To,"__esModule",{value:!0});const Br=ge;class J2{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){const e=Br.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 Br.pattern.getPatternParts(e,this._micromatchOptions).map(n=>Br.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:Br.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return Br.array.splitWhen(e,r=>r.dynamic&&Br.pattern.hasGlobStar(r.pattern))}}To.default=J2,Object.defineProperty(Ro,"__esModule",{value:!0});const Z2=To;class eA 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}}Ro.default=eA,Object.defineProperty(Ao,"__esModule",{value:!0});const ji=ge,tA=Ro;class rA{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 tA.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const r=e.filter(ji.pattern.isAffectDepthOfReadingPattern);return ji.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,i){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;const s=ji.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!ji.pattern.matchAny(e,r)}}Ao.default=rA;var xo={};Object.defineProperty(xo,"__esModule",{value:!0});const or=ge;class nA{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)}}xo.default=nA;var $o={};Object.defineProperty($o,"__esModule",{value:!0});const iA=ge;class sA{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return iA.errno.isEnoentCodeError(e)||this._settings.suppressErrors}}$o.default=sA;var Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});const cd=ge;class aA{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}}Oo.default=aA,Object.defineProperty(mn,"__esModule",{value:!0});const oA=Ee,uA=Ao,lA=xo,cA=$o,hA=Oo;class fA{constructor(e){this._settings=e,this.errorFilter=new cA.default(this._settings),this.entryFilter=new lA.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new uA.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new hA.default(this._settings)}_getRootDirectory(e){return oA.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}}}mn.default=fA,Object.defineProperty(lo,"__esModule",{value:!0});const dA=Ti,pA=mn;class mA extends pA.default{constructor(){super(...arguments);this._reader=new dA.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)}}lo.default=mA;var Fo={};Object.defineProperty(Fo,"__esModule",{value:!0});const gA=Ke,yA=Ti,vA=mn;class bA extends vA.default{constructor(){super(...arguments);this._reader=new yA.default(this._settings)}read(e){const r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(r,e,n),s=new gA.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)}}Fo.default=bA;var Po={},ko={};Object.defineProperty(ko,"__esModule",{value:!0});const DA=tt,EA=mt,wA=Mi;class _A extends wA.default{constructor(){super(...arguments);this._walkSync=EA.walkSync,this._statSync=DA.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)}}ko.default=_A,Object.defineProperty(Po,"__esModule",{value:!0});const SA=ko,CA=mn;class AA extends CA.default{constructor(){super(...arguments);this._reader=new SA.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)}}Po.default=AA;var hd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const e=Qe,n=Math.max(Bn.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=Me,dd=Lr,RA=lo,TA=Fo,xA=Po,Io=hd,ur=ge;async function Lo(t,e){Nr(t);const r=Bo(t,RA.default,e),n=await Promise.all(r);return ur.array.flatten(n)}(function(t){function e(a,o){Nr(a);const u=Bo(a,xA.default,o);return ur.array.flatten(u)}t.sync=e;function r(a,o){Nr(a);const u=Bo(a,TA.default,o);return ur.stream.merge(u)}t.stream=r;function n(a,o){Nr(a);const u=dd.transform([].concat(a)),l=new Io.default(o);return fd.generate(u,l)}t.generateTasks=n;function i(a,o){Nr(a);const u=new Io.default(o);return ur.pattern.isDynamicPattern(a,u)}t.isDynamicPattern=i;function s(a){return Nr(a),ur.path.escape(a)}t.escapePath=s})(Lo||(Lo={}));function Bo(t,e,r){const n=dd.transform([].concat(t)),i=new Io.default(r),s=fd.generate(n,i),a=new e(i);return s.map(a.read,a)}function Nr(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 $A=Lo,OA=Object.freeze({__proto__:null,findUp:Q1,glob:$A,basename:Hh,delimiter:Ph,dirname:Mh,extname:Bh,format:jh,isAbsolute:Or,join:kh,normalize:Ma,normalizeString:yi,parse:Uh,relative:Nh,resolve:Ih,sep:Fh,toNamespacedPath:Lh});const FA=async t=>Qe.promises.readFile(t,{encoding:"utf-8"}),PA=async(t,e)=>Qe.promises.writeFile(t,e);async function kA(t){return Qe.promises.mkdir(t,{recursive:!0})}const IA=t=>Qe.lstatSync(t).isDirectory();var LA=Object.freeze({__proto__:null,readFile:FA,write:PA,mkdir:kA,isDirectory:IA}),No={exports:{}};let BA=pm,NA=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||BA.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+pd(i,e,r,s)+e:t+i+e},pd=(t,e,r,n)=>{let i=t.substring(0,n)+r,s=t.substring(n+e.length),a=s.indexOf(e);return~a?i+pd(s,e,r,a):i+s},md=(t=NA)=>({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});No.exports=md(),No.exports.createColors=md;var Mo=No.exports;class gd{constructor(e,r){this.type=r,this.value=e}}const MA={command:t=>new gd(t,0),path:t=>new gd(t,1)};class jA{constructor(e){this.value=e}}function HA(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+=Mo.bold(s.value);break;case 1:r+=Mo.italic(s.value);break}}),new jA(r)}const UA=t=>{console.log(Mo.green(`\u{1F389} ${t.value}`))};var qA=Object.freeze({__proto__:null,token:MA,content:HA,success:UA}),yd=(t=>(t.Npm="npm",t.Yarn="yarn",t.Pnpm="pnpm",t))(yd||{});function GA(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 mc("Couldn't determine the dependency used to run the create workflow")}async function zA(t,e){await sn(e,["install"],{cwd:t})}var VA=Object.freeze({__proto__:null,DependencyManager:yd,dependencyManagerUsedForCreating:GA,install:zA}),gn={exports:{}},jo={exports:{}},Ho={},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 E=>typeof E===d}const{toString:l}=Object.prototype,h=d=>{const E=l.call(d).slice(8,-1);if(/HTML\w+Element/.test(E)&&c.domElement(d))return"HTMLElement";if(s(E))return E},f=d=>E=>h(E)===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 E=h(d);if(E)return E;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,E)=>Array.isArray(d)?c.function_(E)?d.every(E):!0:!1,c.buffer=d=>{var E,x,$,j;return(j=($=(x=(E=d)===null||E===void 0?void 0:E.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 E;return c.function_((E=d)===null||E===void 0?void 0:E[Symbol.iterator])},c.asyncIterable=d=>{var E;return c.function_((E=d)===null||E===void 0?void 0:E[Symbol.asyncIterator])},c.generator=d=>{var E,x;return c.iterable(d)&&c.function_((E=d)===null||E===void 0?void 0:E.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 E,x;return c.function_((E=d)===null||E===void 0?void 0:E.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,E)=>Object.values(E).includes(d),c.directInstanceOf=(d,E)=>Object.getPrototypeOf(d)===E.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 E=Object.getPrototypeOf(d);return E===null||E===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,E)=>{if(c.number(E))return d>=Math.min(0,E)&&d<=Math.max(E,0);if(c.array(E)&&E.length===2)return d>=Math.min(...E)&&d<=Math.max(...E);throw new TypeError(`Invalid range: ${JSON.stringify(E)}`)};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(E=>E in d),c.observable=d=>{var E,x,$,j;return d?d===((x=(E=d)[Symbol.observable])===null||x===void 0?void 0:x.call(E))||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=>E=>c.integer(E)&&Math.abs(E%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,E,x)=>{if(!c.function_(E))throw new TypeError(`Invalid predicate: ${JSON.stringify(E)}`);if(x.length===0)throw new TypeError("Invalid number of values");return d.call(x,E)};c.any=(d,...E)=>(c.array(d)?d:[d]).some($=>S(Array.prototype.some,$,E)),c.all=(d,...E)=>S(Array.prototype.every,d,E);const v=(d,E,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 \`${E}\`, ${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,E)=>{v(c.array(d),"Array",d),E&&d.forEach(E)},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,E)=>v(c.enumCase(d,E),"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,E)=>v(c.directInstanceOf(d,E),"T",d),inRange:(d,E)=>v(c.inRange(d,E),"in range",d),any:(d,...E)=>v(c.any(d,...E),"predicate returns truthy for any value",E,{multipleValues:!0}),all:(d,...E)=>v(c.all(d,...E),"predicate returns truthy for all values",E,{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 Uo={},qo={exports:{}};class vd extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return!0}}class ls{static fn(e){return(...r)=>new ls((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 vd(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(ls.prototype,Promise.prototype),qo.exports=ls,qo.exports.CancelError=vd;var yn={},vn={},Go={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=Kt,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}(Go,Go.exports);var Vo={exports:{}};const{V4MAPPED:WA,ADDRCONFIG:YA,ALL:bd,promises:{Resolver:Dd},lookup:KA}=Sm,{promisify:Wo}=Kt,XA=Bn,Mr=Symbol("cacheableLookupCreateConnection"),Yo=Symbol("cacheableLookupInstance"),Ed=Symbol("expires"),QA=typeof bd=="number",wd=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},JA=t=>{for(const e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},_d=()=>{let t=!1,e=!1;for(const r of Object.values(XA.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}},ZA=t=>Symbol.iterator in t,Sd={ttl:!0},eR={all:!0};class Cd{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:n=3600,errorTtl:i=.15,resolver:s=new Dd,lookup:a=KA}={}){if(this.maxTtl=r,this.errorTtl=i,this._cache=e,this._resolver=s,this._dnsLookup=Wo(a),this._resolver instanceof Dd?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=Wo(this._resolver.resolve4.bind(this._resolver)),this._resolve6=Wo(this._resolver.resolve6.bind(this._resolver))),this._iface=_d(),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&WA&&(QA&&r.hints&bd||i.length===0)?JA(n):n=i}else r.family===4&&(n=n.filter(i=>i.family===4));if(r.hints&YA){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,Sd),this._resolve6(e,Sd)].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[Ed]=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}}ZA(this._cache)&&this._tick(n)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,eR);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[Ed];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(wd(e),Mr in e)throw new Error("CacheableLookup has been already installed");e[Mr]=e.createConnection,e[Yo]=this,e.createConnection=(r,n)=>("lookup"in r||(r.lookup=this.lookup),e[Mr](r,n))}uninstall(e){if(wd(e),e[Mr]){if(e[Yo]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[Mr],delete e[Mr],delete e[Yo]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=_d(),(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()}}Vo.exports=Cd,Vo.exports.default=Cd;const tR="text/plain",rR="us-ascii",Ad=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),nR=(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===rR)?"":`${c}${m?`=${m}`:""}`}).filter(Boolean)];return o&&h.push("base64"),(h.length!==0||u&&u!==tR)&&h.unshift(u),`data:${h.join(";")},${o?i.trim():i}${s?`#${s}`:""}`},iR=(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 nR(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];Ad(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()])Ad(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 sR=iR;const aR=new Set([200,203,204,206,300,301,404,405,410,414,501]),oR=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),uR=new Set([500,502,503,504]),lR={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},cR={"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 hR(t){return t?uR.has(t.status):!0}function Ko(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 fR(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 dR=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=Ko(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=Ko(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":fR(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())&&oR.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||aR.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=Ko(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)lR[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()&&hR(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&&!cR[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}}},Xo=t=>{const e={};for(const[r,n]of Object.entries(t))e[r.toLowerCase()]=n;return e};const pR=Ke.Readable,mR=Xo;class gR extends pR{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=mR(r),this.body=n,this.url=i}_read(){this.push(this.body),this.push(null)}}var yR=gR;const vR=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];var Rd=(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(vR)),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 bR=Ke.PassThrough,DR=Rd,ER=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");const e=new bR;return DR(t,e),t.pipe(e)};var wR=ER,Qo={};Qo.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)},Qo.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 _R=jt,Td=Qo;BigInt.prototype.toJSON=function(){return this.toString()};const SR=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(Rm(e[r]))(t)}return new Map};class CR extends _R{constructor(e,r){super();if(this.opts=Object.assign({namespace:"keyv",serialize:Td.stringify,deserialize:Td.parse},typeof e=="string"?{uri:e}:e,r),!this.opts.store){const n=Object.assign({},this.opts);this.opts.store=SR(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 AR=CR;const RR=jt,Hi=Yr,TR=sR,xR=Ar.exports,Jo=dR,xd=yR,$R=Xo,OR=wR,FR=AR;class Nt{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new FR({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=Zo(Hi.parse(r)),r={};else if(r instanceof Hi.URL)i=Zo(Hi.parse(r.toString())),r={};else{const[f,...c]=(r.path||"").split("?"),m=c.length>0?`?${c.join("?")}`:"";i=Zo({...r,pathname:f,search:m})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...PR(i)},r.headers=$R(r.headers);const s=new RR,a=TR(Hi.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 _=Jo.fromObject(u.cachePolicy).revalidatedPolicy(f,b);if(!_.modified){const R=_.policy.responseHeaders();b=new xd(u.statusCode,R,u.body,u.url),b.cachePolicy=_.policy,b.fromCache=!0}}b.fromCache||(b.cachePolicy=new Jo(f,b,f),b.fromCache=!1);let D;f.cache&&b.cachePolicy.storable()?(D=OR(b),(async()=>{try{const _=xR.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=Jo.fromObject(p.cachePolicy);if(y.satisfiesWithoutRevalidation(m)&&!m.forceRefresh){const b=y.responseHeaders(),D=new xd(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 PR(t){const e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function Zo(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 kR=Nt;const{Transform:IR,PassThrough:LR}=Ke,eu=Cm,BR=Rd;var NR=t=>{const e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;const r=e==="br";if(r&&typeof eu.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let n=!0;const i=new IR({transform(o,u,l){n=!1,l(null,o)},flush(o){o()}}),s=new LR({autoDestroy:!1,destroy(o,u){t.destroy(),u(o)}}),a=r?eu.createBrotliDecompress():eu.createUnzip();return a.once("error",o=>{if(n&&!t.readable){s.end();return}s.destroy(o)}),BR(t,s),t.pipe(i).pipe(a).pipe(s),s};class MR{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 $d=MR;const jR=jt,HR=el,UR=ys,qR=$d,Ve=Symbol("currentStreamsCount"),Od=Symbol("request"),ut=Symbol("cachedOriginSet"),jr=Symbol("gracefullyClosing"),GR=["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"],zR=(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},VR=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,tu=(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&&Pd(r)},WR=(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&&Pd(e)},Fd=({agent:t,isFree:e})=>{const r={};for(const n in t.sessions){const s=t.sessions[n].filter(a=>{const o=a[Yt.kCurrentStreamsCount]<a.remoteSettings.maxConcurrentStreams;return e?o:!o});s.length!==0&&(r[n]=s)}return r},Pd=t=>{t[jr]=!0,t[Ve]===0&&t.close()};class Yt extends jR{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 qR({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 GR)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=Yt.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[jr]||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=UR.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(h),...r});c[Ve]=0,c[jr]=!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(),tu(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(zR(D,c,VR),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(),tu(this.sessions[a],c)})}),c[Od]=c.request,c.request=(b,D)=>{if(c[jr])throw new Error("The session is gracefully closing. No new streams are allowed.");const _=c[Od](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&&(WR(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[jr])?c.close():(tu(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 Yt.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),HR.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 Fd({agent:this,isFree:!0})}get busySessions(){return Fd({agent:this,isFree:!1})}}Yt.kCurrentStreamsCount=Ve,Yt.kGracefullyClosing=jr;var kd={Agent:Yt,globalAgent:new Yt};const{Readable:YR}=Ke;class KR extends YR{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 Id=KR,Ld=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},XR=(t,e,r)=>{for(const n of r)t.on(n,(...i)=>e.emit(n,...i))},QR=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}},Bd={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]}]`)})(Bd);const JR=ys,{Writable:ZR}=Ke,{Agent:Nd,globalAgent:eT}=kd,tT=Id,rT=Ld,nT=XR,iT=QR,{ERR_INVALID_ARG_TYPE:ru,ERR_INVALID_PROTOCOL:sT,ERR_HTTP_HEADERS_SENT:Md,ERR_INVALID_HTTP_TOKEN:aT,ERR_HTTP_INVALID_HEADER_VALUE:oT,ERR_INVALID_CHAR:uT}=Bd.exports,{HTTP2_HEADER_STATUS:jd,HTTP2_HEADER_METHOD:Hd,HTTP2_HEADER_PATH:Ud,HTTP2_METHOD_CONNECT:lT}=JR.constants,je=Symbol("headers"),nu=Symbol("origin"),iu=Symbol("session"),qd=Symbol("options"),Ui=Symbol("flushedHeaders"),bn=Symbol("jobs"),cT=/^[\^`\-\w!#$%&*+.|~]+$/,hT=/[^\t\u0020-\u007E\u0080-\u00FF]/;class fT extends ZR{constructor(e,r,n){super({autoDestroy:!1});const i=typeof e=="string"||e instanceof URL;if(i&&(e=rT(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[iu]=r.h2session;else if(r.agent===!1)this.agent=new Nd({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new Nd({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=eT;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new ru("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new sT(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[bn]=[],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[qd]=r,s===443?(this[nu]=`https://${a}`,":authority"in this[je]||(this[je][":authority"]=a)):(this[nu]=`https://${a}:${s}`,":authority"in this[je]||(this[je][":authority"]=`${a}:${s}`)),o&&this.setTimeout(o),n&&this.once("response",n),this[Ui]=!1}get method(){return this[je][Hd]}set method(e){e&&(this[je][Hd]=e.toUpperCase())}get path(){return this[je][Ud]}set path(e){e&&(this[je][Ud]=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[bn].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[bn].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[Ui]||this.destroyed)return;this[Ui]=!0;const e=this.method===lT,r=n=>{if(this._request=n,this.destroyed){n.destroy();return}e||nT(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 tT(this.socket,n.readableHighWaterMark);this.res=l,l.req=this,l.statusCode=a[jd],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[jd]}))),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[bn])a();this.emit("socket",this.socket)};if(this[iu])try{r(this[iu].request(this[je]))}catch(n){this.emit("error",n)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[nu],this[qd],this[je]))}catch(n){this.emit("error",n)}}}getHeader(e){if(typeof e!="string")throw new ru("name","string",e);return this[je][e.toLowerCase()]}get headersSent(){return this[Ui]}removeHeader(e){if(typeof e!="string")throw new ru("name","string",e);if(this.headersSent)throw new Md("remove");delete this[je][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new Md("set");if(typeof e!="string"||!cT.test(e)&&!iT(e))throw new aT("Header name",e);if(typeof r>"u")throw new oT(r,e);if(hT.test(r))throw new uT("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[bn].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}}var Gd=fT,su={exports:{}};const dT=el;var pT=(t={},e=dT.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 mT=tl;var gT=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]),mT.isIP(e)?"":e};const zd=Nn,au=gs,yT=pT,vT=$d,bT=Gd,DT=gT,ET=Ld,qi=new vT({maxSize:100}),Dn=new Map,Vd=(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)},wT=async t=>{const e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!qi.has(e)){if(Dn.has(e))return(await Dn.get(e)).alpnProtocol;const{path:r,agent:n}=t;t.path=t.socketPath;const i=yT(t);Dn.set(e,i);try{const{socket:s,alpnProtocol:a}=await i;if(qi.set(e,a),t.path=r,a==="h2")s.destroy();else{const{globalAgent:o}=au,u=au.Agent.prototype.createConnection;n?n.createConnection===u?Vd(n,s,t):s.destroy():o.createConnection===u?Vd(o,s,t):s.destroy()}return Dn.delete(e),a}catch(s){throw Dn.delete(e),s}}return qi.get(e)};su.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=ET(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||DT(e),e.port=e.port||(n?443:80),e._defaultAgent=n?au.globalAgent:zd.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 wT(e)==="h2"?(i&&(e.agent=i.http2),new bT(e,r)):zd.request(e,r)},su.exports.protocolCache=qi;const _T=ys,ST=kd,ou=Gd,CT=Id,AT=su.exports,RT=(t,e,r)=>new ou(t,e,r),TT=(t,e,r)=>{const n=new ou(t,e,r);return n.end(),n};var xT={..._T,ClientRequest:ou,IncomingMessage:CT,...ST,request:RT,get:TT,auto:AT},uu={},Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});const Wd=At.exports;Gi.default=t=>Wd.default.nodeStream(t)&&Wd.default.function_(t.getBoundary),Object.defineProperty(uu,"__esModule",{value:!0});const Yd=Qe,Kd=Kt,Xd=At.exports,$T=Gi,OT=Kd.promisify(Yd.stat);uu.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(Xd.default.string(t))return Buffer.byteLength(t);if(Xd.default.buffer(t))return t.length;if($T.default(t))return Kd.promisify(t.getLength.bind(t))();if(t instanceof Yd.ReadStream){const{size:r}=await OT(t.path);return r===0?void 0:r}};var zi={};Object.defineProperty(zi,"__esModule",{value:!0});function FT(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])}}zi.default=FT;var En={},lu={};Object.defineProperty(lu,"__esModule",{value:!0}),lu.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(En,"__esModule",{value:!0}),En.TimeoutError=void 0;const PT=tl,kT=lu,Qd=Symbol("reentry"),IT=()=>{};class Jd extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`);this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}}En.TimeoutError=Jd,En.default=(t,e,r)=>{if(Qd in t)return IT;t[Qd]=!0;const n=[],{once:i,unhandleAll:s}=kT.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 Jd(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??PT.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 cu={};Object.defineProperty(cu,"__esModule",{value:!0});const Zd=At.exports;cu.default=t=>{t=t;const e={protocol:t.protocol,hostname:Zd.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 Zd.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 hu={};Object.defineProperty(hu,"__esModule",{value:!0});const LT=Yr,BT=["protocol","host","hostname","port","pathname","search"];hu.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 LT.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 BT)e[s]&&(i[s]=e[s].toString());return i};var fu={};Object.defineProperty(fu,"__esModule",{value:!0});class NT{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)}}fu.default=NT;var Vi={};Object.defineProperty(Vi,"__esModule",{value:!0});const MT=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(""))};Vi.default=MT;var ep={};(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")}})(ep);var wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn.isResponseOk=void 0,wn.isResponseOk=t=>{const{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304};var du={};Object.defineProperty(du,"__esModule",{value:!0});const tp=new Set;du.default=t=>{tp.has(t)||(tp.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))};var pu={};Object.defineProperty(pu,"__esModule",{value:!0});const ce=At.exports,jT=(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};pu.default=jT;var _n={};Object.defineProperty(_n,"__esModule",{value:!0}),_n.retryAfterStatusCodes=void 0,_n.retryAfterStatusCodes=new Set([413,429,503]);const HT=({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};_n.default=HT,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=Kt,r=Ke,n=Qe,i=Yr,s=Nn,a=Nn,o=gs,u=Go.exports,l=Vo.exports,h=kR,f=NR,c=xT,m=Xo,p=At.exports,y=uu,b=Gi,D=zi,_=En,R=cu,S=hu,v=fu,d=Vi,E=ep,x=wn,$=du,j=pu,A=_n;let I;const B=Symbol("request"),J=Symbol("response"),C=Symbol("responseSize"),T=Symbol("downloadedSize"),re=Symbol("bodySize"),q=Symbol("uploadedSize"),Te=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"),kn=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 w in De){const g=De[w];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,xe=async De=>new Promise((w,g)=>{const O=H=>{g(H)};De.pending||w(),De.once("error",O),De.once("ready",()=>{De.off("error",O),w()})}),be=new Set([300,301,302,303,304,307,308]),Wr=["context","body","json","form"];t.setNonEnumerableProperties=(De,w)=>{const g={};for(const O of De)if(!!O)for(const H of Wr)H in O&&(g[H]={writable:!0,configurable:!0,enumerable:!1,value:O[H]});Object.defineProperties(w,g)};class me extends Error{constructor(w,g,O){var H,N;super(w);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 Vu?(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
|
-
`).reverse(),U=g.stack.slice(g.stack.indexOf(g.message)+g.message.length).split(`
|
|
121
|
-
`).reverse();for(;U.length!==0&&U[0]===M[0];)M.shift();this.stack=`${this.stack.slice(0,F)}${M.reverse().join(`
|
|
122
|
-
`)}${U.reverse().join(`
|
|
123
|
-
`)}`}}}t.RequestError=me;class ju extends me{constructor(w){super(`Redirected ${w.options.maxRedirects} times. Aborting.`,{},w);this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}}t.MaxRedirectsError=ju;class Hu extends me{constructor(w){super(`Response code ${w.statusCode} (${w.statusMessage})`,{},w.request);this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}}t.HTTPError=Hu;class Uu extends me{constructor(w,g){super(w.message,w,g);this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}}t.CacheError=Uu;class qu extends me{constructor(w,g){super(w.message,w,g);this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}}t.UploadError=qu;class Gu extends me{constructor(w,g,O){super(w.message,w,O);this.name="TimeoutError",this.event=w.event,this.timings=g}}t.TimeoutError=Gu;class hs extends me{constructor(w,g){super(w.message,w,g);this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}}t.ReadError=hs;class zu extends me{constructor(w){super(`Unsupported protocol "${w.url.protocol}"`,{},w);this.name="UnsupportedProtocolError",this.code="ERR_UNSUPPORTED_PROTOCOL"}}t.UnsupportedProtocolError=zu;const um=["socket","connect","continue","information","upgrade","timeout"];class Vu extends r.Duplex{constructor(w,g={},O){super({autoDestroy:!1,highWaterMark:0});this[T]=0,this[q]=0,this.requestInitialized=!1,this[Te]=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",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(w,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 xe(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){(K=this[B])===null||K===void 0||K.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(w,g,O){var H,N,F,M,U;const K=g;if(p.default.object(w)&&!p.default.urlInstance(w))g={...O,...w,...g};else{if(w&&g&&g.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");g={...O,...g},w!==void 0&&(g.url=w),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([E.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: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 In=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&&!In)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 w=()=>{throw new TypeError("The payload has been already provided")};this.write=w,this.end=w}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){const{options:w}=this,{headers:g}=w,O=!p.default.undefined(w.form),H=!p.default.undefined(w.json),N=!p.default.undefined(w.body),F=O||H||N,M=t.withoutBody.has(w.method)&&!(w.method==="GET"&&w.allowGetBody);if(this._cannotHaveBody=M,F){if(M)throw new TypeError(`The \`${w.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&&!(w.body instanceof r.Readable)&&!p.default.string(w.body)&&!p.default.buffer(w.body)&&!b.default(w.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(O&&!p.default.object(w.form))throw new TypeError("The `form` option must be an Object");{const U=!p.default.string(g["content-type"]);N?(b.default(w.body)&&U&&(g["content-type"]=`multipart/form-data; boundary=${w.body.getBoundary()}`),this[G]=w.body):O?(U&&(g["content-type"]="application/x-www-form-urlencoded"),this[G]=new i.URLSearchParams(w.form).toString()):(U&&(g["content-type"]="application/json"),this[G]=w.stringifyJson(w.json));const K=await y.default(this[G],w.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(w){const{options:g}=this,{url:O}=g;this[kn]=w,g.decompress&&(w=f(w));const H=w.statusCode,N=w;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=w.fromCache||!1,N.ip=this.ip,N.retryCount=this.retryCount,this[ye]=N.isFromCache,this[C]=Number(w.headers["content-length"])||void 0,this[J]=w,w.once("end",()=>{this[C]=this[T],this.emit("downloadProgress",this.downloadProgress)}),w.once("error",M=>{w.destroy(),this._beforeError(new hs(M,this))}),w.once("aborted",()=>{this._beforeError(new hs({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);const F=w.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&&w.headers.location&&be.has(H)){if(w.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 ju(this));return}try{const U=Buffer.from(w.headers.location,"binary").toString(),K=new i.URL(U,O),Le=K.toString();decodeURI(Le),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(Le),g.url=K;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&&!x.isResponseOk(N)){this._beforeError(new Hu(N));return}w.on("readable",()=>{this[nt]&&this._read()}),this.on("resume",()=>{w.resume()}),this.on("pause",()=>{w.pause()}),w.once("end",()=>{this.push(null)}),this.emit("response",w);for(const M of this[Te])if(!M.headersSent){for(const U in w.headers){const K=g.decompress?U!=="content-encoding":!0,Le=w.headers[U];K&&M.setHeader(U,Le)}M.statusCode=H}}async _onResponse(w){try{await this._onResponseBase(w)}catch(g){this._beforeError(g)}}_onRequest(w){const{options:g}=this,{timeout:O,url:H}=g;u.default(w),this[rt]=_.default(w,O,H);const N=g.cache?"cacheableResponse":"response";w.once(N,U=>{this._onResponse(U)}),w.once("error",U=>{var K;w.destroy(),(K=w.res)===null||K===void 0||K.removeAllListeners("end"),U=U instanceof _.TimeoutError?new Gu(U,this.timings,this):new me(U.message,U,this),this._beforeError(U)}),this[Ue]=D.default(w,this,um),this[B]=w,this.emit("uploadProgress",this.uploadProgress);const F=this[G],M=this.redirects.length===0?this:w;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",w)}async _createCacheableRequest(w,g){return new Promise((O,H)=>{Object.assign(g,R.default(w)),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=w,F.once("error",H),F.once("request",async M=>{N=M,O(N)})})}async _makeRequest(){var w,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:K,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:lm}=Z.groups;Object.assign(F,{socketPath:yr,path:lm,host:""})}}const In=qe.protocol==="https:";let z;F.http2?z=c.auto:z=In?o.request:s.request;const ve=(w=F.request)!==null&&w!==void 0?w:z,Ae=F.cache?this._createCacheableRequest:ve;U&&!F.http2&&(F.agent=U[In?"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=E.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=K,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),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 Uu(Z,this):new me(Z.message,Z,this)}}async _error(w){try{for(const g of this.options.hooks.beforeError)w=await g(w)}catch(g){w=new me(g.message,g,this)}this.destroy(w)}_beforeError(w){if(this[lt])return;const{options:g}=this,O=this.retryCount+1;this[lt]=!0,w instanceof me||(w=new me(w.message,w,this));const H=w,{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,w,this));return}this.destroyed||(this.destroy(),this.emit("retry",O,w))};this[k]=setTimeout(M,F);return}}this._error(H)})()}_read(){this[nt]=!0;const w=this[J];if(w&&!this[lt]){w.readableLength&&(this[nt]=!1);let g;for(;(g=w.read())!==null;){this[T]+=g.length,this[gr]=!0;const O=this.downloadProgress;O.percent<1&&this.emit("downloadProgress",O),this.push(g)}}}_write(w,g,O){const H=()=>{this._writeRequest(w,g,O)};this.requestInitialized?H():this[Dt].push(H)}_writeRequest(w,g,O){this[B].destroyed||(this._progressCallbacks.push(()=>{this[q]+=Buffer.byteLength(w,g);const H=this.uploadProgress;H.percent<1&&this.emit("uploadProgress",H)}),this[B].write(w,g,H=>{!H&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),O(H)}))}_final(w){const g=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(B in this)){w();return}if(this[B].destroyed){w();return}this[B].end(O=>{O||(this[re]=this[q],this.emit("uploadProgress",this.uploadProgress),this[B].emit("upload-complete")),w(O)})};this.requestInitialized?g():this[Dt].push(g)}_destroy(w,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()),w!==null&&!p.default.undefined(w)&&!(w instanceof me)&&(w=new me(w.message,w,this)),g(w)}get _isAboutToError(){return this[lt]}get ip(){var w;return(w=this.socket)===null||w===void 0?void 0:w.remoteAddress}get aborted(){var w,g,O;return((g=(w=this[B])===null||w===void 0?void 0:w.destroyed)!==null&&g!==void 0?g:this.destroyed)&&!((O=this[kn])===null||O===void 0?void 0:O.complete)}get socket(){var w,g;return(g=(w=this[B])===null||w===void 0?void 0:w.socket)!==null&&g!==void 0?g:void 0}get downloadProgress(){let w;return this[C]?w=this[T]/this[C]:this[C]===this[T]?w=1:w=0,{percent:w,transferred:this[T],total:this[C]}}get uploadProgress(){let w;return this[re]?w=this[q]/this[re]:this[re]===this[q]?w=1:w=0,{percent:w,transferred:this[q],total:this[re]}}get timings(){var w;return(w=this[B])===null||w===void 0?void 0:w.timings}get isFromCache(){return this[ye]}pipe(w,g){if(this[gr])throw new Error("Failed to pipe. The response has been emitted already.");return w instanceof a.ServerResponse&&this[Te].add(w),super.pipe(w,g)}unpipe(w){return w instanceof a.ServerResponse&&this[Te].delete(w),super.unpipe(w),this}}t.default=Vu}(vn),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=vn;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(vn,t)}(yn);var mu={};Object.defineProperty(mu,"__esModule",{value:!0});const rp=yn,UT=(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 rp.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(s){throw new rp.ParseError(s,t)}};mu.default=UT,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=qo.exports,a=yn,o=mu,u=vn,l=zi,h=Vi,f=wn,c=["request","response","redirect","uploadProgress","downloadProgress"];function m(p){let y,b;const D=new n.EventEmitter,_=new s((S,v,d)=>{const E=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,Te]of re.hooks.afterResponse.entries())I=await Te(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}E(I)}),l.default($,D,c)};E(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(yn,t)}(Uo);var gu={};Object.defineProperty(gu,"__esModule",{value:!0});const qT=yn;function GT(t,...e){const r=(async()=>{if(t instanceof qT.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}gu.default=GT;var yu={};Object.defineProperty(yu,"__esModule",{value:!0});const np=At.exports;function ip(t){for(const e of Object.values(t))(np.default.plainObject(e)||np.default.array(e))&&ip(e);return Object.freeze(t)}yu.default=ip;var sp={};Object.defineProperty(sp,"__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=Uo,s=gu,a=vn,o=yu,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 E;const x=S(v,$=>(E=d($),E));if(x!==E&&!v.isStream&&E){const $=x,{then:j,catch:A,finally:I}=$;Object.setPrototypeOf($,Object.getPrototypeOf(E)),Object.defineProperties($,Object.getOwnPropertyDescriptors(E)),$.then=j,$.catch=A,$.finally=I}return x});const _=(S,v={},d)=>{var E,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((E=v.hooks)===null||E===void 0?void 0:E.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],E;for(const x of S)m(x)?(v.push(x.defaults.options),d.push(...x.defaults._rawHandlers),E=x.defaults.mutableDefaults):(v.push(x),"handlers"in x&&d.push(...x.handlers),E=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(E)})};const R=async function*(S,v){let d=h(S,v,D.options);d.resolveBodyOnly=!1;const E=d.pagination;if(!n.default.object(E))throw new TypeError("`options.pagination` must be implemented");const x=[];let{countLimit:$}=E,j=0;for(;j<E.requestLimit;){j!==0&&await l(E.backoff);const A=await _(void 0,void 0,d),I=await E.transform(A),B=[];for(const C of I)if(E.filter(C,x,B)&&(!E.shouldContinue(C,x,B)||(yield C,E.stackAllItems&&x.push(C),B.push(C),--$<=0)))return;const J=E.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 E of R(S,v))d.push(E);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(sp,t)}(Ho),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=Yr,s=Ho,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(Ho,e),n(Uo,e)}(jo,jo.exports);var vu={exports:{}},Hr={},cr={};cr.parse=cr.decode=zT,cr.stringify=cr.encode=ap,cr.safe=Ur,cr.unsafe=Wi;var bu=typeof process<"u"&&process.platform==="win32"?`\r
|
|
124
|
-
`:`
|
|
125
|
-
`;function ap(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+=Ur(s+"[]")+i+Ur(l)+`
|
|
126
|
-
`}):u&&typeof u=="object"?r.push(s):n+=Ur(s)+i+Ur(u)+bu}),e.section&&n.length&&(n="["+Ur(e.section)+"]"+bu+n),r.forEach(function(s,a,o){var u=op(s).join("\\."),l=(e.section?e.section+".":"")+u,h=ap(t[s],{section:l,whitespace:e.whitespace});n.length&&h.length&&(n+=bu),n+=h}),n}function op(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 zT(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=Wi(l[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var h=Wi(l[2]);if(h!=="__proto__"){var f=l[3]?Wi(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=op(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 up(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function Ur(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&up(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Wi(t,e){if(t=(t||"").trim(),up(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 Du=Symbol("singleComment"),lp=Symbol("multiComment"),VT=()=>"",WT=(t,e,r)=>t.slice(e,r).replace(/\S/g," "),YT=(t,e)=>{let r=e-1,n=0;for(;t[r]==="\\";)r-=1,n+=1;return Boolean(n%2)};var KT=(t,e={})=>{if(typeof t!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof t}\``);const r=e.whitespace===!1?VT:WT;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==='"'&&(YT(t,o)||(n=!n)),!n){if(!i&&u+l==="//")a+=t.slice(s,o),s=o,i=Du,o++;else if(i===Du&&u+l===`\r
|
|
127
|
-
`){o++,i=!1,a+=r(t,s,o),s=o;continue}else if(i===Du&&u===`
|
|
128
|
-
`)i=!1,a+=r(t,s,o),s=o;else if(!i&&u+l==="/*"){a+=t.slice(s,o),s=o,i=lp,o++;continue}else if(i===lp&&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))},cp=Qe,XT=cr,Sn=Ee,QT=KT,JT=Hr.parse=function(t){return/^\s*{/.test(t)?JSON.parse(QT(t)):XT.parse(t)},ZT=Hr.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=Sn.join.apply(null,t);try{return cp.readFileSync(r,"utf-8")}catch{return}};Hr.json=function(){var t=ZT.apply(null,arguments);return t?JT(t):null},Hr.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},Hr.find=function(){var t=Sn.join.apply(null,[].slice.call(arguments));function e(r,n){var i=Sn.join(r,n);try{return cp.statSync(i),i}catch{if(Sn.dirname(r)!==r)return e(Sn.dirname(r),n)}}return e(process.cwd(),t)};var hp={exports:{}};/*!
|
|
129
|
-
* @description Recursive object extending
|
|
130
|
-
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
|
131
|
-
* @license MIT
|
|
132
|
-
*
|
|
133
|
-
* The MIT License (MIT)
|
|
134
|
-
*
|
|
135
|
-
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
|
136
|
-
*
|
|
137
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
138
|
-
* this software and associated documentation files (the "Software"), to deal in
|
|
139
|
-
* the Software without restriction, including without limitation the rights to
|
|
140
|
-
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
141
|
-
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
142
|
-
* subject to the following conditions:
|
|
143
|
-
*
|
|
144
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
145
|
-
* copies or substantial portions of the Software.
|
|
146
|
-
*
|
|
147
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
148
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
149
|
-
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
150
|
-
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
151
|
-
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
152
|
-
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
153
|
-
*/function fp(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function dp(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 pp(t){var e=[];return t.forEach(function(r,n){typeof r=="object"&&r!==null?Array.isArray(r)?e[n]=pp(r):fp(r)?e[n]=dp(r):e[n]=Eu({},r):e[n]=r}),e}function mp(t,e){return e==="__proto__"?void 0:t[e]}var Eu=hp.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=mp(t,s),r=mp(i,s),r!==t)if(typeof r!="object"||r===null){t[s]=r;return}else if(Array.isArray(r)){t[s]=pp(r);return}else if(fp(r)){t[s]=dp(r);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[s]=Eu({},r);return}else{t[s]=Eu(n,r);return}})}),t},ex=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 E=!r.strings[S]&&gp(v)?Number(v):v;l(s,S.split("."),E),(n[S]||[]).forEach(function(x){l(s,x.split("."),E)})}}function l(S,v,d){for(var E=S,x=0;x<v.length-1;x++){var $=v[x];if($==="__proto__")return;E[$]===void 0&&(E[$]={}),(E[$]===Object.prototype||E[$]===Number.prototype||E[$]===String.prototype)&&(E[$]={}),E[$]===Array.prototype&&(E[$]=[]),E=E[$]}var $=v[v.length-1];$!=="__proto__"&&((E===Object.prototype||E===Number.prototype||E===String.prototype)&&(E={}),E===Array.prototype&&(E=[]),E[$]===void 0||r.bools[$]||typeof E[$]=="boolean"?E[$]=d:Array.isArray(E[$])?E[$].push(d):E[$]=[E[$],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._||!gp(c)?c:Number(c)),e.stopEarly){s._.push.apply(s._,t.slice(f+1));break}}return Object.keys(i).forEach(function(S){tx(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 tx(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 gp(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}var Cn=Hr,qr=Ee.join,rx=hp.exports,yp="/etc",vp=process.platform==="win32",An=vp?process.env.USERPROFILE:process.env.HOME,bp=function(t,e,r,n){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=ex(process.argv.slice(2))),e=(typeof e=="string"?Cn.json(e):e)||{},n=n||Cn.parse;var i=Cn.env(t+"_"),s=[e],a=[];function o(u){if(!(a.indexOf(u)>=0)){var l=Cn.file(u);l&&(s.push(n(l)),a.push(u))}}return vp||[qr(yp,t,"config"),qr(yp,t+"rc")].forEach(o),An&&[qr(An,".config",t,"config"),qr(An,".config",t),qr(An,"."+t,"config"),qr(An,"."+t+"rc")].forEach(o),o(Cn.find("."+t+"rc")),i.config&&o(i.config),r.config&&o(r.config),rx.apply(null,s.concat([i,r,a.length?{configs:a,config:a[a.length-1]}:void 0]))};const nx=bp,Dp=t=>{const e=nx("npm",{registry:"https://registry.npmjs.org/"}),r=e[`${t}:registry`]||e.config_registry||e.registry;return r.slice(-1)==="/"?r:`${r}/`};vu.exports=Dp,vu.exports.default=Dp;function ix(t){return Buffer.from(t,"base64").toString("utf8")}function sx(t){return Buffer.from(t,"utf8").toString("base64")}var ax={decodeBase64:ix,encodeBase64:sx},wu=Yr,Ep=ax,ox=Ep.decodeBase64,ux=Ep.encodeBase64,wp=":_authToken",_p=":_auth",Sp=":username",Cp=":_password",lx=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||bp("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,Ap(t,e)||cx(e.npmrc)};function Ap(t,e){for(var r=wu.parse(t,!1,!0),n;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";var i="//"+r.host+n.replace(/\/$/,""),s=fx(i,e.npmrc);if(s)return s;if(!e.recursive)return/\/$/.test(t)?void 0:Ap(wu.resolve(t,"."),e);r.pathname=wu.resolve(hx(n),"..")||"/"}}function cx(t){if(!!t._auth){var e=Yi(t._auth);return{token:e,type:"Basic"}}}function hx(t){return t[t.length-1]==="/"?t:t+"/"}function fx(t,e){var r=dx(e[t+wp]||e[t+"/"+wp]);if(r)return r;var n=e[t+Sp]||e[t+"/"+Sp],i=e[t+Cp]||e[t+"/"+Cp],s=px(n,i);if(s)return s;var a=mx(e[t+_p]||e[t+"/"+_p]);if(a)return a}function Yi(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function dx(t){if(!!t){var e=Yi(t);return{token:e,type:"Bearer"}}}function px(t,e){if(!(!t||!e)){var r=ox(Yi(e)),n=ux(t+":"+r);return{token:n,type:"Basic",password:r,username:t}}}function mx(t){if(!!t){var e=Yi(t);return{token:e,type:"Basic"}}}var Wt={exports:{}};const gx="2.0.0",yx=256,vx=Number.MAX_SAFE_INTEGER||9007199254740991,bx=16;var Ki={SEMVER_SPEC_VERSION:gx,MAX_LENGTH:yx,MAX_SAFE_INTEGER:vx,MAX_SAFE_COMPONENT_LENGTH:bx};const Dx=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var Xi=Dx;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r}=Ki,n=Xi;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 Ex=["includePrerelease","loose","rtl"],wx=t=>t?typeof t!="object"?{loose:!0}:Ex.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};var Qi=wx;const Rp=/^[0-9]+$/,Tp=(t,e)=>{const r=Rp.test(t),n=Rp.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},_x=(t,e)=>Tp(e,t);var _u={compareIdentifiers:Tp,rcompareIdentifiers:_x};const Ji=Xi,{MAX_LENGTH:xp,MAX_SAFE_INTEGER:Zi}=Ki,{re:$p,t:Op}=Wt.exports,Sx=Qi,{compareIdentifiers:Rn}=_u;class bt{constructor(e,r){if(r=Sx(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>xp)throw new TypeError(`version is longer than ${xp} characters`);Ji("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?$p[Op.LOOSE]:$p[Op.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>Zi||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Zi||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Zi||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<Zi)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(Ji("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)),Rn(this.major,e.major)||Rn(this.minor,e.minor)||Rn(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(Ji("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 Rn(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(Ji("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 Rn(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:Cx}=Ki,{re:Fp,t:Pp}=Wt.exports,kp=We,Ax=Qi,Rx=(t,e)=>{if(e=Ax(e),t instanceof kp)return t;if(typeof t!="string"||t.length>Cx||!(e.loose?Fp[Pp.LOOSE]:Fp[Pp.FULL]).test(t))return null;try{return new kp(t,e)}catch{return null}};var Gr=Rx;const Tx=Gr,xx=(t,e)=>{const r=Tx(t,e);return r?r.version:null};var $x=xx;const Ox=Gr,Fx=(t,e)=>{const r=Ox(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var Px=Fx;const kx=We,Ix=(t,e,r,n)=>{typeof r=="string"&&(n=r,r=void 0);try{return new kx(t,r).inc(e,n).version}catch{return null}};var Lx=Ix;const Ip=We,Bx=(t,e,r)=>new Ip(t,r).compare(new Ip(e,r));var gt=Bx;const Nx=gt,Mx=(t,e,r)=>Nx(t,e,r)===0;var Su=Mx;const Lp=Gr,jx=Su,Hx=(t,e)=>{if(jx(t,e))return null;{const r=Lp(t),n=Lp(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 Ux=Hx;const qx=We,Gx=(t,e)=>new qx(t,e).major;var zx=Gx;const Vx=We,Wx=(t,e)=>new Vx(t,e).minor;var Yx=Wx;const Kx=We,Xx=(t,e)=>new Kx(t,e).patch;var Qx=Xx;const Jx=Gr,Zx=(t,e)=>{const r=Jx(t,e);return r&&r.prerelease.length?r.prerelease:null};var e$=Zx;const t$=gt,r$=(t,e,r)=>t$(e,t,r);var n$=r$;const i$=gt,s$=(t,e)=>i$(t,e,!0);var a$=s$;const Bp=We,o$=(t,e,r)=>{const n=new Bp(t,r),i=new Bp(e,r);return n.compare(i)||n.compareBuild(i)};var Cu=o$;const u$=Cu,l$=(t,e)=>t.sort((r,n)=>u$(r,n,e));var c$=l$;const h$=Cu,f$=(t,e)=>t.sort((r,n)=>h$(n,r,e));var d$=f$;const p$=gt,m$=(t,e,r)=>p$(t,e,r)>0;var es=m$;const g$=gt,y$=(t,e,r)=>g$(t,e,r)<0;var Au=y$;const v$=gt,b$=(t,e,r)=>v$(t,e,r)!==0;var Np=b$;const D$=gt,E$=(t,e,r)=>D$(t,e,r)>=0;var Ru=E$;const w$=gt,_$=(t,e,r)=>w$(t,e,r)<=0;var Tu=_$;const S$=Su,C$=Np,A$=es,R$=Ru,T$=Au,x$=Tu,$$=(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 S$(t,r,n);case"!=":return C$(t,r,n);case">":return A$(t,r,n);case">=":return R$(t,r,n);case"<":return T$(t,r,n);case"<=":return x$(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var Mp=$$;const O$=We,F$=Gr,{re:ts,t:rs}=Wt.exports,P$=(t,e)=>{if(t instanceof O$)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(ts[rs.COERCE]);else{let n;for(;(n=ts[rs.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),ts[rs.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;ts[rs.COERCERTL].lastIndex=-1}return r===null?null:F$(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};var k$=P$,I$=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++)B$(this,arguments[t]);return this.length},Q.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)N$(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=L$(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 L$(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 B$(t,e){t.tail=new hr(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function N$(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 M$=I$,fr=Symbol("max"),Lt=Symbol("length"),zr=Symbol("lengthCalculator"),Tn=Symbol("allowStale"),dr=Symbol("maxAge"),Bt=Symbol("dispose"),jp=Symbol("noDisposeOnSet"),Re=Symbol("lruList"),yt=Symbol("cache"),Hp=Symbol("updateAgeOnGet"),xu=()=>1;class j${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||xu;if(this[zr]=typeof r!="function"?xu:r,this[Tn]=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[jp]=e.noDisposeOnSet||!1,this[Hp]=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,xn(this)}get max(){return this[fr]}set allowStale(e){this[Tn]=!!e}get allowStale(){return this[Tn]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[dr]=e,xn(this)}get maxAge(){return this[dr]}set lengthCalculator(e){typeof e!="function"&&(e=xu),e!==this[zr]&&(this[zr]=e,this[Lt]=0,this[Re].forEach(r=>{r.length=this[zr](r.value,r.key),this[Lt]+=r.length})),xn(this)}get lengthCalculator(){return this[zr]}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;Up(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[Re].head;n!==null;){const i=n.next;Up(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 M$,this[Lt]=0}dump(){return this[Re].map(e=>ns(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[zr](r,e);if(this[yt].has(e)){if(s>this[fr])return Vr(this,this[yt].get(e)),!1;const u=this[yt].get(e).value;return this[Bt]&&(this[jp]||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),xn(this),!0}const a=new H$(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),xn(this),!0)}has(e){if(!this[yt].has(e))return!1;const r=this[yt].get(e).value;return!ns(this,r)}get(e){return $u(this,e,!0)}peek(e){return $u(this,e,!1)}pop(){const e=this[Re].tail;return e?(Vr(this,e),e.value):null}del(e){Vr(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)=>$u(this,r,!1))}}const $u=(t,e,r)=>{const n=t[yt].get(e);if(n){const i=n.value;if(ns(t,i)){if(Vr(t,n),!t[Tn])return}else r&&(t[Hp]&&(n.value.now=Date.now()),t[Re].unshiftNode(n));return i.value}},ns=(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]},xn=t=>{if(t[Lt]>t[fr])for(let e=t[Re].tail;t[Lt]>t[fr]&&e!==null;){const r=e.prev;Vr(t,e),e=r}},Vr=(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 H${constructor(e,r,n,i,s){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=s||0}}const Up=(t,e,r,n)=>{let i=r.value;ns(t,i)&&(Vr(t,r),t[Tn]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};var U$=j$;class Pn{constructor(e,r){if(r=G$(r),e instanceof Pn)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new Pn(e.raw,r);if(e instanceof Ou)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=>!Gp(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&&K$(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=qp.get(n);if(i)return i;const s=this.options.loose,a=s?He[Ie.HYPHENRANGELOOSE]:He[Ie.HYPHENRANGE];e=e.replace(a,sO(this.options.includePrerelease)),Ce("hyphen replace",e),e=e.replace(He[Ie.COMPARATORTRIM],V$),Ce("comparator trim",e,He[Ie.COMPARATORTRIM]),e=e.replace(He[Ie.TILDETRIM],W$),e=e.replace(He[Ie.CARETTRIM],Y$),e=e.split(/\s+/).join(" ");const o=s?He[Ie.COMPARATORLOOSE]:He[Ie.COMPARATOR],u=e.split(" ").map(f=>X$(f,this.options)).join(" ").split(/\s+/).map(f=>iO(f,this.options)).filter(this.options.loose?f=>!!f.match(o):()=>!0).map(f=>new Ou(f,this.options));u.length;const l=new Map;for(const f of u){if(Gp(f))return[f];l.set(f.value,f)}l.size>1&&l.has("")&&l.delete("");const h=[...l.values()];return qp.set(n,h),h}intersects(e,r){if(!(e instanceof Pn))throw new TypeError("a Range is required");return this.set.some(n=>zp(n,r)&&e.set.some(i=>zp(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 z$(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(aO(this.set[r],e,this.options))return!0;return!1}}var vt=Pn;const q$=U$,qp=new q$({max:1e3}),G$=Qi,Ou=is,Ce=Xi,z$=We,{re:He,t:Ie,comparatorTrimReplace:V$,tildeTrimReplace:W$,caretTrimReplace:Y$}=Wt.exports,Gp=t=>t.value==="<0.0.0-0",K$=t=>t.value==="",zp=(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},X$=(t,e)=>(Ce("comp",t,e),t=Z$(t,e),Ce("caret",t),t=Q$(t,e),Ce("tildes",t),t=tO(t,e),Ce("xrange",t),t=nO(t,e),Ce("stars",t),t),Ye=t=>!t||t.toLowerCase()==="x"||t==="*",Q$=(t,e)=>t.trim().split(/\s+/).map(r=>J$(r,e)).join(" "),J$=(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 Ye(i)?u="":Ye(s)?u=`>=${i}.0.0 <${+i+1}.0.0-0`:Ye(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})},Z$=(t,e)=>t.trim().split(/\s+/).map(r=>eO(r,e)).join(" "),eO=(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 Ye(s)?l="":Ye(a)?l=`>=${s}.0.0${n} <${+s+1}.0.0-0`:Ye(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})},tO=(t,e)=>(Ce("replaceXRanges",t,e),t.split(/\s+/).map(r=>rO(r,e)).join(" ")),rO=(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=Ye(s),h=l||Ye(a),f=h||Ye(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})},nO=(t,e)=>(Ce("replaceStars",t,e),t.trim().replace(He[Ie.STAR],"")),iO=(t,e)=>(Ce("replaceGTE0",t,e),t.trim().replace(He[e.includePrerelease?Ie.GTE0PRE:Ie.GTE0],"")),sO=t=>(e,r,n,i,s,a,o,u,l,h,f,c,m)=>(Ye(n)?r="":Ye(i)?r=`>=${n}.0.0${t?"-0":""}`:Ye(s)?r=`>=${n}.${i}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,Ye(l)?u="":Ye(h)?u=`<${+l+1}.0.0-0`:Ye(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()),aO=(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!==Ou.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},$n=Symbol("SemVer ANY");class cs{static get ANY(){return $n}constructor(e,r){if(r=oO(r),e instanceof cs){if(e.loose===!!r.loose)return e;e=e.value}Pu("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===$n?this.value="":this.value=this.operator+this.semver.version,Pu("comp",this)}parse(e){const r=this.options.loose?Vp[Wp.COMPARATORLOOSE]:Vp[Wp.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 Yp(n[2],this.options.loose):this.semver=$n}toString(){return this.value}test(e){if(Pu("Comparator.test",e,this.options.loose),this.semver===$n||e===$n)return!0;if(typeof e=="string")try{e=new Yp(e,this.options)}catch{return!1}return Fu(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof cs))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Kp(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new Kp(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=Fu(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=Fu(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||s&&a||o||u}}var is=cs;const oO=Qi,{re:Vp,t:Wp}=Wt.exports,Fu=Mp,Pu=Xi,Yp=We,Kp=vt,uO=vt,lO=(t,e,r)=>{try{e=new uO(e,r)}catch{return!1}return e.test(t)};var ss=lO;const cO=vt,hO=(t,e)=>new cO(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var fO=hO;const dO=We,pO=vt,mO=(t,e,r)=>{let n=null,i=null,s=null;try{s=new pO(e,r)}catch{return null}return t.forEach(a=>{s.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new dO(n,r))}),n};var gO=mO;const yO=We,vO=vt,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 ku=We,EO=vt,Xp=es,wO=(t,e)=>{t=new EO(t,e);let r=new ku("0.0.0");if(t.test(r)||(r=new ku("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 ku(a.semver.version);switch(a.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!s||Xp(o,s))&&(s=o);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!r||Xp(r,s))&&(r=s)}return r&&t.test(r)?r:null};var _O=wO;const SO=vt,CO=(t,e)=>{try{return new SO(t,e).range||"*"}catch{return null}};var AO=CO;const RO=We,Qp=is,{ANY:TO}=Qp,xO=vt,$O=ss,Jp=es,Zp=Au,OO=Tu,FO=Ru,PO=(t,e,r,n)=>{t=new RO(t,n),e=new xO(e,n);let i,s,a,o,u;switch(r){case">":i=Jp,s=OO,a=Zp,o=">",u=">=";break;case"<":i=Zp,s=FO,a=Jp,o="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if($O(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===TO&&(m=new Qp(">=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 Iu=PO;const kO=Iu,IO=(t,e,r)=>kO(t,e,">",r);var LO=IO;const BO=Iu,NO=(t,e,r)=>BO(t,e,"<",r);var MO=NO;const em=vt,jO=(t,e,r)=>(t=new em(t,r),e=new em(e,r),t.intersects(e));var HO=jO;const UO=ss,qO=gt;var GO=(t,e,r)=>{const n=[];let i=null,s=null;const a=t.sort((h,f)=>qO(h,f,r));for(const h of a)UO(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 tm=vt,as=is,{ANY:Lu}=as,On=ss,Bu=gt,zO=(t,e,r={})=>{if(t===e)return!0;t=new tm(t,r),e=new tm(e,r);let n=!1;e:for(const i of t.set){for(const s of e.set){const a=VO(i,s,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},VO=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Lu){if(e.length===1&&e[0].semver===Lu)return!0;r.includePrerelease?t=[new as(">=0.0.0-0")]:t=[new as(">=0.0.0")]}if(e.length===1&&e[0].semver===Lu){if(r.includePrerelease)return!0;e=[new as(">=0.0.0")]}const n=new Set;let i,s;for(const m of t)m.operator===">"||m.operator===">="?i=rm(i,m,r):m.operator==="<"||m.operator==="<="?s=nm(s,m,r):n.add(m.semver);if(n.size>1)return null;let a;if(i&&s){if(a=Bu(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&&!On(m,String(i),r)||s&&!On(m,String(s),r))return null;for(const p of e)if(!On(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=rm(i,m,r),o===m&&o!==i)return!1}else if(i.operator===">="&&!On(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=nm(s,m,r),u===m&&u!==s)return!1}else if(s.operator==="<="&&!On(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)},rm=(t,e,r)=>{if(!t)return e;const n=Bu(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},nm=(t,e,r)=>{if(!t)return e;const n=Bu(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var WO=zO;const Nu=Wt.exports;var YO={re:Nu.re,src:Nu.src,tokens:Nu.t,SEMVER_SPEC_VERSION:Ki.SEMVER_SPEC_VERSION,SemVer:We,compareIdentifiers:_u.compareIdentifiers,rcompareIdentifiers:_u.rcompareIdentifiers,parse:Gr,valid:$x,clean:Px,inc:Lx,diff:Ux,major:zx,minor:Yx,patch:Qx,prerelease:e$,compare:gt,rcompare:n$,compareLoose:a$,compareBuild:Cu,sort:c$,rsort:d$,gt:es,lt:Au,eq:Su,neq:Np,gte:Ru,lte:Tu,cmp:Mp,coerce:k$,Comparator:is,Range:vt,satisfies:ss,toComparators:fO,maxSatisfying:gO,minSatisfying:DO,minVersion:_O,validRange:AO,outside:Iu,gtr:LO,ltr:MO,intersects:HO,simplifyRange:GO,subset:WO};const{Agent:KO}=Nn,{Agent:XO}=gs,QO=jo.exports,JO=vu.exports,ZO=lx,eF=YO,im={keepAlive:!0,maxSockets:50},tF=new KO(im),rF=new XO(im);class sm extends Error{constructor(e){super(`Package \`${e}\` could not be found`);this.name="PackageNotFoundError"}}class am extends Error{constructor(e,r){super(`Version \`${r}\` for package \`${e}\` could not be found`);this.name="VersionNotFoundError"}}const om=async(t,e)=>{e={version:"latest",...e};const r=t.split("/")[0],n=e.registryUrl||JO(r),i=new URL(encodeURIComponent(t).replace(/^%40/,"@"),n),s=ZO(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:tF,https:rF}};e.agent&&(o.agent=e.agent);let u;try{u=await QO(i,o).json()}catch(f){throw f.response.statusCode===404?new sm(t):f}if(e.allVersions)return u;let{version:l}=e;const h=new am(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=eF.maxSatisfying(f,l),!l)throw h}if(u=u.versions[l],!u)throw h}return u};gn.exports=om,gn.exports.default=om,gn.exports.PackageNotFoundError=sm,gn.exports.VersionNotFoundError=am;var nF=gn.exports;async function iF(t,e){const{version:r}=await nF(t.toLowerCase(),e);return r}async function sF(t){return iF(t)}var aF=Object.freeze({__proto__:null,latestNpmPackageVersion:sF});const oF=()=>{const{env:t}=ht;return t.SUDO_USER||t.C9_USER||t.LOGNAME||t.USER||t.LNAME||t.USERNAME},uF=()=>{try{return Ju.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(ht.platform==="win32"){const{stdout:n}=await sn("whoami");return lF(n)}const{stdout:r}=await sn("id",["-u"]);try{const{stdout:n}=await sn("id",["-un",r]);return n}catch{}return cF(r)}catch{return null}};var fF=Object.freeze({__proto__:null,username:hF});const Fn={environmentVariables:{debug:"DEBUG",partnersApiEnv:"SHOPIFY_PARTNERS_API_ENV",adminApiEnv:"SHOPIFY_ADMIN_API_ENV",storefrontRendererApiEnv:"SHOPIFY_STOREFRONT_RENDERER_API_ENV",identityEnv:"SHOPIFY_IDENTITY_ENV"}};var os=(t=>(t.Local="local",t.Production="production",t.Spin="spin",t))(os||{});function us(t){return t==="local"?os.Local:t==="spin"?os.Spin:os.Production}function dF(t){return t?["1","true","TRUE","yes","YES"].includes(t):!1}function pF(t=process.env){return dF(t[Fn.environmentVariables.debug])}function mF(t=process.env){return us(t[Fn.environmentVariables.partnersApiEnv])}function gF(t=process.env){return us(t[Fn.environmentVariables.adminApiEnv])}function yF(t=process.env){return us(t[Fn.environmentVariables.storefrontRendererApiEnv])}function vF(t=process.env){return us(t[Fn.environmentVariables.identityEnv])}var bF=Object.freeze({__proto__:null,isDebug:pF,partnersApiEnvironment:mF,adminApiEnvironment:gF,storefrontRendererApiEnvironment:yF,identityEnvironment:vF});export{VA as dependency,bF as environment,L0 as error,LA as fs,fF as os,qA as output,OA as path,B1 as string,bD as system,T1 as template,P0 as ui,aF as version};
|
|
1
|
+
export { m as constants, d as dependency, g as environment, e as error, f as file, l as http, c as os, o as output, p as path, i as schema, h as session, k as store, b as string, s as system, t as template, j as toml, u as ui, v as version } from './index-17ec6a4a.js';
|
|
2
|
+
import 'assert';
|
|
3
|
+
import 'events';
|
|
4
|
+
import 'readline';
|
|
5
|
+
import 'os';
|
|
6
|
+
import 'stream';
|
|
7
|
+
import 'tty';
|
|
8
|
+
import 'node:buffer';
|
|
9
|
+
import 'node:path';
|
|
10
|
+
import 'node:child_process';
|
|
11
|
+
import 'node:process';
|
|
12
|
+
import 'child_process';
|
|
13
|
+
import 'path';
|
|
14
|
+
import 'fs';
|
|
15
|
+
import 'node:url';
|
|
16
|
+
import 'node:os';
|
|
17
|
+
import 'buffer';
|
|
18
|
+
import 'util';
|
|
19
|
+
import 'node:fs';
|
|
20
|
+
import 'constants';
|
|
21
|
+
import 'http';
|
|
22
|
+
import 'https';
|
|
23
|
+
import 'url';
|
|
24
|
+
import 'dns';
|
|
25
|
+
import 'zlib';
|
|
26
|
+
import 'http2';
|
|
27
|
+
import 'tls';
|
|
28
|
+
import 'net';
|
|
29
|
+
import 'crypto';
|
|
30
|
+
import 'node:http';
|
|
31
|
+
import 'node:https';
|
|
32
|
+
import 'node:zlib';
|
|
33
|
+
import 'node:stream';
|
|
34
|
+
import 'node:util';
|
|
35
|
+
import 'node:net';
|
|
36
|
+
//# sourceMappingURL=index.js.map
|