@stacksjs/rpx 0.8.1 → 0.9.1
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/dist/bin/cli.js +8 -1
- package/dist/chunk-2y0c08hn.js +24 -0
- package/dist/chunk-45dw2f5f.js +45 -0
- package/dist/chunk-9v712d8y.js +45 -0
- package/dist/chunk-e794mmrn.js +2 -0
- package/dist/chunk-en36kajt.js +24 -0
- package/dist/chunk-wn28gp4d.js +37 -0
- package/dist/src/index.js +1 -1
- package/dist/start.d.ts +1 -2
- package/package.json +4 -4
- package/dist/chunk-kbhf94ag.js +0 -649
package/dist/chunk-kbhf94ag.js
DELETED
|
@@ -1,649 +0,0 @@
|
|
|
1
|
-
import{createRequire as sd}from"node:module";var td=Object.create;var{getPrototypeOf:ud,defineProperty:ah,getOwnPropertyNames:rd}=Object;var id=Object.prototype.hasOwnProperty;var hh=(e,u,t)=>{t=e!=null?td(ud(e)):{};let r=u||!e||!e.__esModule?ah(t,"default",{value:e,enumerable:!0}):t;for(let s of rd(e))if(!id.call(r,s))ah(r,s,{get:()=>e[s],enumerable:!0});return r};var lh=sd(import.meta.url);import{formatWithOptions as dd}from"util";import{sep as Ed}from"path";import*as Os from"tty";import{stdin as Ad,stdout as vd}from"process";import Ch from"readline";import{WriteStream as Bd}from"tty";import bd from"tty";import Fu from"process";import{createRequire as AE}from"module";import{EventEmitter as jE}from"events";import{access as tC,appendFile as F2,mkdir as A2}from"fs/promises";import{dirname as uC}from"path";import rC from"process";import{basename as uT,delimiter as rT,dirname as iC,extname as iT,isAbsolute as sT,join as nT,normalize as aT,parse as hT,relative as sC,resolve as Ph,sep as lT,toNamespacedPath as oT}from"path";import Mh from"process";import _s from"process";import CC from"process";import Om from"process";import Ss from"process";import Pa from"process";import km from"os";import fo from"tty";import ec from"process";import Ts from"process";import Au from"process";import Fo from"process";import Ru from"process";import Ry from"process";var{create:nd,getPrototypeOf:ad,defineProperty:ua,getOwnPropertyNames:hd}=Object,ld=Object.prototype.hasOwnProperty,Ge=(e,u,t)=>{t=e!=null?nd(ad(e)):{};let r=u||!e||!e.__esModule?ua(t,"default",{value:e,enumerable:!0}):t;for(let s of hd(e))if(!ld.call(r,s))ua(r,s,{get:()=>e[s],enumerable:!0});return r},te=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports),pa=(e,u)=>{for(var t in u)ua(e,t,{get:u[t],enumerable:!0,configurable:!0,set:(r)=>u[t]=()=>r})},js=(e,u)=>()=>(e&&(u=e(e=0)),u);function Mn(e){return e!==null&&typeof e==="object"}function ra(e,u,t=".",r){if(!Mn(u))return ra(e,{},t,r);let s=Object.assign({},u);for(let n in e){if(n==="__proto__"||n==="constructor")continue;let i=e[n];if(i===null||i===void 0)continue;if(r&&r(s,n,i,t))continue;if(Array.isArray(i)&&Array.isArray(s[n]))s[n]=[...i,...s[n]];else if(Mn(i)&&Mn(s[n]))s[n]=ra(i,s[n],(t?`${t}.`:"")+n.toString(),r);else s[n]=i}return s}function od(e){return(...u)=>u.reduce((t,r)=>ra(t,r,"",e),{})}function cd(e){return Object.prototype.toString.call(e)==="[object Object]"}function Dd(e){if(!cd(e))return!1;if(!e.message&&!e.args)return!1;if(e.stack)return!1;return!0}class Yt{constructor(e={}){let u=e.types||ia;this.options=Bo({...e,defaults:{...e.defaults},level:kn(e.level,u),reporters:[...e.reporters||[]]},{types:ia,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let t in u){let r={type:t,...this.options.defaults,...u[t]};this[t]=this._wrapLogFn(r),this[t].raw=this._wrapLogFn(r,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(e){this.options.level=kn(e,this.options.types,this.options.level)}prompt(e,u){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(e,u)}create(e){let u=new Yt({...this.options,...e});if(this._mockFn)u.mockTypes(this._mockFn);return u}withDefaults(e){return this.create({...this.options,defaults:{...this.options.defaults,...e}})}withTag(e){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+e:e})}addReporter(e){return this.options.reporters.push(e),this}removeReporter(e){if(e){let u=this.options.reporters.indexOf(e);if(u>=0)return this.options.reporters.splice(u,1)}else this.options.reporters.splice(0);return this}setReporters(e){return this.options.reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let e in this.options.types){if(!console["__"+e])console["__"+e]=console[e];console[e]=this[e].raw}}restoreConsole(){for(let e in this.options.types)if(console["__"+e])console[e]=console["__"+e],delete console["__"+e]}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(e,u){if(!e)return;if(!e.__write)e.__write=e.write;e.write=(t)=>{this[u].raw(String(t).trim())}}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(e){if(!e)return;if(e.__write)e.write=e.__write,delete e.__write}pauseLogs(){Vn=!0}resumeLogs(){Vn=!1;let e=sa.splice(0);for(let u of e)u[0]._logFn(u[1],u[2])}mockTypes(e){let u=e||this.options.mockFn;if(this._mockFn=u,typeof u!=="function")return;for(let t in this.options.types)this[t]=u(t,this.options.types[t])||this[t],this[t].raw=this[t]}_wrapLogFn(e,u){return(...t)=>{if(Vn){sa.push([this,e,t,u]);return}return this._logFn(e,t,u)}}_logFn(e,u,t){if((e.level||0)>this.level)return!1;let r={date:new Date,args:[],...e,level:kn(e.level,this.options.types)};if(!t&&u.length===1&&Dd(u[0]))Object.assign(r,u[0]);else r.args=[...u];if(r.message)r.args.unshift(r.message),delete r.message;if(r.additional){if(!Array.isArray(r.additional))r.additional=r.additional.split(`
|
|
2
|
-
`);r.args.push(`
|
|
3
|
-
`+r.additional.join(`
|
|
4
|
-
`)),delete r.additional}r.type=typeof r.type==="string"?r.type.toLowerCase():"log",r.tag=typeof r.tag==="string"?r.tag:"";let s=(i=!1)=>{let l=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&l>0){let o=[...this._lastLog.object.args];if(l>1)o.push(`(repeated ${l} times)`);this._log({...this._lastLog.object,args:o}),this._lastLog.count=1}if(i)this._lastLog.object=r,this._log(r)};clearTimeout(this._lastLog.timeout);let n=this._lastLog.time&&r.date?r.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=r.date,n<this.options.throttle)try{let i=JSON.stringify([r.type,r.tag,r.args]),l=this._lastLog.serialized===i;if(this._lastLog.serialized=i,l){if(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin){this._lastLog.timeout=setTimeout(s,this.options.throttle);return}}}catch{}s(!0)}_log(e){for(let u of this.options.reporters)u.log(e,{options:this.options})}}function kn(e,u={},t=3){if(e===void 0)return t;if(typeof e==="number")return e;if(u[e]&&u[e].level!==void 0)return u[e].level;return t}function fd(e={}){return new Yt(e)}var zt,ia,Bo,Vn=!1,sa,ga=js(()=>{zt={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},ia={silent:{level:-1},fatal:{level:zt.fatal},error:{level:zt.error},warn:{level:zt.warn},log:{level:zt.log},info:{level:zt.info},success:{level:zt.success},fail:{level:zt.fail},ready:{level:zt.info},start:{level:zt.info},box:{level:zt.info},debug:{level:zt.debug},trace:{level:zt.trace},verbose:{level:zt.verbose}},Bo=od(),sa=[],Yt.prototype.add=Yt.prototype.addReporter,Yt.prototype.remove=Yt.prototype.removeReporter,Yt.prototype.clear=Yt.prototype.removeReporter,Yt.prototype.withScope=Yt.prototype.withTag,Yt.prototype.mock=Yt.prototype.mockTypes,Yt.prototype.pause=Yt.prototype.pauseLogs,Yt.prototype.resume=Yt.prototype.resumeLogs});function bo(e){let u=process.cwd()+Ed;return e.split(`
|
|
5
|
-
`).splice(1).map((r)=>r.trim().replace("file://","").replace(u,""))}function Cd(e,u){return(u.__write||u.write).call(u,e)}class ma{formatStack(e,u){return" "+bo(e).join(`
|
|
6
|
-
`)}formatArgs(e,u){let t=e.map((r)=>{if(r&&typeof r.stack==="string")return r.message+`
|
|
7
|
-
`+this.formatStack(r.stack,u);return r});return dd(u,...t)}formatDate(e,u){return u.date?e.toLocaleTimeString():""}filterAndJoin(e){return e.filter(Boolean).join(" ")}formatLogObj(e,u){let t=this.formatArgs(e.args,u);if(e.type==="box")return`
|
|
8
|
-
`+[Kn(e.tag),e.title&&e.title,...t.split(`
|
|
9
|
-
`)].filter(Boolean).map((r)=>" > "+r).join(`
|
|
10
|
-
`)+`
|
|
11
|
-
`;return this.filterAndJoin([Kn(e.type),Kn(e.tag),t])}log(e,u){let t=this.formatLogObj(e,{columns:u.options.stdout.columns||0,...u.options.formatOptions});return Cd(t+`
|
|
12
|
-
`,e.level<2?u.options.stderr||process.stderr:u.options.stdout||process.stdout)}}var Kn=(e)=>e?`[${e}]`:"",ya=()=>{};function So(e,u,t,r,s=u.slice(0,Math.max(0,e))+r,n=u.slice(Math.max(0,e+t.length)),i=n.indexOf(t)){return s+(i<0?n:So(i,n,t,r))}function pd(e,u,t,r,s){return e<0?t+u+r:t+So(e,u,r,s)+r}function gd(e,u,t=e,r=e.length+1){return(s)=>s||!(s===""||s===void 0)?pd((""+s).indexOf(u,r),s,e,u,t):""}function Oe(e,u,t){return gd(`\x1B[${e}m`,`\x1B[${u}m`,t)}function md(e=To){return e?na:Object.fromEntries(Object.keys(na).map((u)=>[u,String]))}function yd(e,u="reset"){return re[e]||re[u]}function Bu(e){return e.replace(new RegExp(wo,"g"),"")}function Fd(e,u={}){let t={...u,style:{...Io,...u.style}},r=e.split(`
|
|
13
|
-
`),s=[],n=yd(t.style.borderColor),i={...typeof t.style.borderStyle==="string"?aa[t.style.borderStyle]||aa.solid:t.style.borderStyle};if(n)for(let F in i)i[F]=n(i[F]);let l=t.style.padding%2===0?t.style.padding:t.style.padding+1,o=r.length+l,a=Math.max(...r.map((F)=>F.length))+l,D=a+l,h=t.style.marginLeft>0?" ".repeat(t.style.marginLeft):"";if(t.style.marginTop>0)s.push("".repeat(t.style.marginTop));if(t.title){let F=i.h.repeat(Math.floor((a-Bu(t.title).length)/2)),p=i.h.repeat(a-Bu(t.title).length-Bu(F).length+l);s.push(`${h}${i.tl}${F}${t.title}${p}${i.tr}`)}else s.push(`${h}${i.tl}${i.h.repeat(D)}${i.tr}`);let d=t.style.valign==="center"?Math.floor((o-r.length)/2):t.style.valign==="top"?o-r.length-l:o-r.length;for(let F=0;F<o;F++)if(F<d||F>=d+r.length)s.push(`${h}${i.v}${" ".repeat(D)}${i.v}`);else{let p=r[F-d],f=" ".repeat(l),m=" ".repeat(a-Bu(p).length);s.push(`${h}${i.v}${f}${p}${m}${i.v}`)}if(s.push(`${h}${i.bl}${i.h.repeat(D)}${i.br}`),t.style.marginBottom>0)s.push("".repeat(t.style.marginBottom));return s.join(`
|
|
14
|
-
`)}var xu,Gn,oh,ch,Dh,fh,jn,dh,Eh,To,na,re,wo,aa,Io,Ws=js(()=>{({env:xu={},argv:Gn=[],platform:oh=""}=typeof process==="undefined"?{}:process),ch="NO_COLOR"in xu||Gn.includes("--no-color"),Dh="FORCE_COLOR"in xu||Gn.includes("--color"),fh=oh==="win32",jn=xu.TERM==="dumb",dh=Os&&Os.isatty&&Os.isatty(1)&&xu.TERM&&!jn,Eh="CI"in xu&&(("GITHUB_ACTIONS"in xu)||("GITLAB_CI"in xu)||("CIRCLECI"in xu)),To=!ch&&(Dh||fh&&!jn||dh||Eh),na={reset:Oe(0,0),bold:Oe(1,22,"\x1B[22m\x1B[1m"),dim:Oe(2,22,"\x1B[22m\x1B[2m"),italic:Oe(3,23),underline:Oe(4,24),inverse:Oe(7,27),hidden:Oe(8,28),strikethrough:Oe(9,29),black:Oe(30,39),red:Oe(31,39),green:Oe(32,39),yellow:Oe(33,39),blue:Oe(34,39),magenta:Oe(35,39),cyan:Oe(36,39),white:Oe(37,39),gray:Oe(90,39),bgBlack:Oe(40,49),bgRed:Oe(41,49),bgGreen:Oe(42,49),bgYellow:Oe(43,49),bgBlue:Oe(44,49),bgMagenta:Oe(45,49),bgCyan:Oe(46,49),bgWhite:Oe(47,49),blackBright:Oe(90,39),redBright:Oe(91,39),greenBright:Oe(92,39),yellowBright:Oe(93,39),blueBright:Oe(94,39),magentaBright:Oe(95,39),cyanBright:Oe(96,39),whiteBright:Oe(97,39),bgBlackBright:Oe(100,49),bgRedBright:Oe(101,49),bgGreenBright:Oe(102,49),bgYellowBright:Oe(103,49),bgBlueBright:Oe(104,49),bgMagentaBright:Oe(105,49),bgCyanBright:Oe(106,49),bgWhiteBright:Oe(107,49)},re=md(),wo=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),aa={solid:{tl:"┌",tr:"┐",bl:"└",br:"┘",h:"─",v:"│"},double:{tl:"╔",tr:"╗",bl:"╚",br:"╝",h:"═",v:"║"},doubleSingle:{tl:"╓",tr:"╖",bl:"╙",br:"╜",h:"─",v:"║"},doubleSingleRounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"─",v:"║"},singleThick:{tl:"┏",tr:"┓",bl:"┗",br:"┛",h:"━",v:"┃"},singleDouble:{tl:"╒",tr:"╕",bl:"╘",br:"╛",h:"═",v:"│"},singleDoubleRounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"═",v:"│"},rounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"─",v:"│"}},Io={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1}}),No={};pa(No,{prompt:()=>Id});function Sd({onlyFirst:e=!1}={}){let u=["[\\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(u,e?void 0:"g")}function _o(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Sd(),"")}function Pi(e,u={}){if(typeof e!="string"||e.length===0||(u={ambiguousIsNarrow:!0,...u},e=_o(e),e.length===0))return 0;e=e.replace(_d()," ");let t=u.ambiguousIsNarrow?1:2,r=0;for(let s of e){let n=s.codePointAt(0);if(n<=31||n>=127&&n<=159||n>=768&&n<=879)continue;switch(Oo.eastAsianWidth(s)){case"F":case"W":r+=2;break;case"A":r+=t;break;default:r+=1}}return r}function Td(){let e=new Map;for(let[u,t]of Object.entries(qe)){for(let[r,s]of Object.entries(t))qe[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},t[r]=qe[r],e.set(s[0],s[1]);Object.defineProperty(qe,u,{value:t,enumerable:!1})}return Object.defineProperty(qe,"codes",{value:e,enumerable:!1}),qe.color.close="\x1B[39m",qe.bgColor.close="\x1B[49m",qe.color.ansi=Bh(),qe.color.ansi256=bh(),qe.color.ansi16m=Sh(),qe.bgColor.ansi=Bh(Hn),qe.bgColor.ansi256=bh(Hn),qe.bgColor.ansi16m=Sh(Hn),Object.defineProperties(qe,{rgbToAnsi256:{value:(u,t,r)=>u===t&&t===r?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:(u)=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[r]=t;r.length===3&&(r=[...r].map((n)=>n+n).join(""));let s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:(u)=>qe.rgbToAnsi256(...qe.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:(u)=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,r,s;if(u>=232)t=((u-232)*10+8)/255,r=t,s=t;else{u-=16;let l=u%36;t=Math.floor(u/36)/5,r=Math.floor(l/6)/5,s=l%6/5}let n=Math.max(t,r,s)*2;if(n===0)return 30;let i=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(t));return n===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(u,t,r)=>qe.ansi256ToAnsi(qe.rgbToAnsi256(u,t,r)),enumerable:!1},hexToAnsi:{value:(u)=>qe.ansi256ToAnsi(qe.hexToAnsi256(u)),enumerable:!1}}),qe}function ph(e,u,t){return String(e).normalize().replace(/\r\n/g,`
|
|
15
|
-
`).split(`
|
|
16
|
-
`).map((r)=>Pd(r,u,t)).join(`
|
|
17
|
-
`)}function wd(e,u){if(e===u)return;let t=e.split(`
|
|
18
|
-
`),r=u.split(`
|
|
19
|
-
`),s=[];for(let n=0;n<Math.max(t.length,r.length);n++)t[n]!==r[n]&&s.push(n);return s}function gs(e,u){e.isTTY&&e.setRawMode(u)}class Li{constructor({render:e,input:u=Ad,output:t=vd,...r},s=!0){this._track=!1,this._cursor=0,this.state="initial",this.error="",this.subscribers=new Map,this._prevFrame="",this.opts=r,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=e.bind(this),this._track=s,this.input=u,this.output=t}prompt(){let e=new Bd(0);return e._write=(u,t,r)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),r()},this.input.pipe(e),this.rl=Ch.createInterface({input:this.input,output:e,tabSize:2,prompt:"",escapeCodeTimeout:50}),Ch.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),gs(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((u,t)=>{this.once("submit",()=>{this.output.write(cu.cursor.show),this.output.off("resize",this.render),gs(this.input,!1),u(this.value)}),this.once("cancel",()=>{this.output.write(cu.cursor.show),this.output.off("resize",this.render),gs(this.input,!1),u(Mo)})})}on(e,u){let t=this.subscribers.get(e)??[];t.push({cb:u}),this.subscribers.set(e,t)}once(e,u){let t=this.subscribers.get(e)??[];t.push({cb:u,once:!0}),this.subscribers.set(e,t)}emit(e,...u){let t=this.subscribers.get(e)??[],r=[];for(let s of t)s.cb(...u),s.once&&r.push(()=>t.splice(t.indexOf(s),1));for(let s of r)s()}unsubscribe(){this.subscribers.clear()}onKeypress(e,u){if(this.state==="error"&&(this.state="active"),u?.name&&!this._track&&ha.has(u.name)&&this.emit("cursor",ha.get(u.name)),u?.name&&ko.has(u.name)&&this.emit("cursor",u.name),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),e&&this.emit("key",e.toLowerCase()),u?.name==="return"){if(this.opts.validate){let t=this.opts.validate(this.value);t&&(this.error=t,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}e==="\x03"&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
20
|
-
`),gs(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=ph(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
21
|
-
`).length-1;this.output.write(cu.cursor.move(-999,e*-1))}render(){let e=ph(this._render(this)??"",process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(cu.cursor.hide);else{let u=wd(this._prevFrame,e);if(this.restoreCursor(),u&&u?.length===1){let t=u[0];this.output.write(cu.cursor.move(0,t)),this.output.write(cu.erase.lines(1));let r=e.split(`
|
|
22
|
-
`);this.output.write(r[t]),this._prevFrame=e,this.output.write(cu.cursor.move(0,r.length-t-1));return}else if(u&&u?.length>1){let t=u[0];this.output.write(cu.cursor.move(0,t)),this.output.write(cu.erase.down());let r=e.split(`
|
|
23
|
-
`).slice(t);this.output.write(r.join(`
|
|
24
|
-
`)),this._prevFrame=e;return}this.output.write(cu.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}}async function Id(e,u={}){if(!u.type||u.type==="text")return await Md({message:e,defaultValue:u.default,placeholder:u.placeholder,initialValue:u.initial});if(u.type==="confirm")return await kd({message:e,initialValue:u.initial});if(u.type==="select")return await Vd({message:e,options:u.options.map((t)=>typeof t==="string"?{value:t,label:t}:t)});if(u.type==="multiselect")return await Kd({message:e,options:u.options.map((t)=>typeof t==="string"?{value:t,label:t}:t),required:u.required});throw new Error(`Unknown prompt type: ${u.type}`)}var Wn="\x1B",Je,Nd="\x07",ms,gh,mh,cu,ys,yh,$o,et=(e,u,t=e)=>(r)=>{let s=""+r,n=s.indexOf(u,e.length);return~n?e+Ro(s,u,t,n)+u:e+s+u},Ro=(e,u,t,r)=>{let s=e.substring(0,r)+t,n=e.substring(r+u.length),i=n.indexOf(u);return~i?s+Ro(n,u,t,i):s+n},Fh=(e=$o)=>({isColorSupported:e,reset:e?(u)=>`\x1B[0m${u}\x1B[0m`:String,bold:e?et("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:e?et("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:e?et("\x1B[3m","\x1B[23m"):String,underline:e?et("\x1B[4m","\x1B[24m"):String,inverse:e?et("\x1B[7m","\x1B[27m"):String,hidden:e?et("\x1B[8m","\x1B[28m"):String,strikethrough:e?et("\x1B[9m","\x1B[29m"):String,black:e?et("\x1B[30m","\x1B[39m"):String,red:e?et("\x1B[31m","\x1B[39m"):String,green:e?et("\x1B[32m","\x1B[39m"):String,yellow:e?et("\x1B[33m","\x1B[39m"):String,blue:e?et("\x1B[34m","\x1B[39m"):String,magenta:e?et("\x1B[35m","\x1B[39m"):String,cyan:e?et("\x1B[36m","\x1B[39m"):String,white:e?et("\x1B[37m","\x1B[39m"):String,gray:e?et("\x1B[90m","\x1B[39m"):String,bgBlack:e?et("\x1B[40m","\x1B[49m"):String,bgRed:e?et("\x1B[41m","\x1B[49m"):String,bgGreen:e?et("\x1B[42m","\x1B[49m"):String,bgYellow:e?et("\x1B[43m","\x1B[49m"):String,bgBlue:e?et("\x1B[44m","\x1B[49m"):String,bgMagenta:e?et("\x1B[45m","\x1B[49m"):String,bgCyan:e?et("\x1B[46m","\x1B[49m"):String,bgWhite:e?et("\x1B[47m","\x1B[49m"):String}),Ah,Fs,As,vh,Oo,_d=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},Hn=10,Bh=(e=0)=>(u)=>`\x1B[${u+e}m`,bh=(e=0)=>(u)=>`\x1B[${38+e};5;${u}m`,Sh=(e=0)=>(u,t,r)=>`\x1B[${38+e};2;${u};${t};${r}m`,qe,Th,$d,Lo,ki,Rd=39,Fa="\x07",Uo="[",Od="]",Po="m",Hs,wh=(e)=>`${ki.values().next().value}${Uo}${e}${Po}`,Ih=(e)=>`${ki.values().next().value}${Hs}${e}${Fa}`,Ld=(e)=>e.split(" ").map((u)=>Pi(u)),Qn=(e,u,t)=>{let r=[...u],s=!1,n=!1,i=Pi(_o(e[e.length-1]));for(let[l,o]of r.entries()){let a=Pi(o);if(i+a<=t?e[e.length-1]+=o:(e.push(o),i=0),ki.has(o)&&(s=!0,n=r.slice(l+1).join("").startsWith(Hs)),s){n?o===Fa&&(s=!1,n=!1):o===Po&&(s=!1);continue}i+=a,i===t&&l<r.length-1&&(e.push(""),i=0)}!i&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Ud=(e)=>{let u=e.split(" "),t=u.length;for(;t>0&&!(Pi(u[t-1])>0);)t--;return t===u.length?e:u.slice(0,t).join(" ")+u.slice(t).join("")},Pd=(e,u,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let r="",s,n,i=Ld(e),l=[""];for(let[a,D]of e.split(" ").entries()){t.trim!==!1&&(l[l.length-1]=l[l.length-1].trimStart());let h=Pi(l[l.length-1]);if(a!==0&&(h>=u&&(t.wordWrap===!1||t.trim===!1)&&(l.push(""),h=0),(h>0||t.trim===!1)&&(l[l.length-1]+=" ",h++)),t.hard&&i[a]>u){let d=u-h,F=1+Math.floor((i[a]-d-1)/u);Math.floor((i[a]-1)/u)<F&&l.push(""),Qn(l,D,u);continue}if(h+i[a]>u&&h>0&&i[a]>0){if(t.wordWrap===!1&&h<u){Qn(l,D,u);continue}l.push("")}if(h+i[a]>u&&t.wordWrap===!1){Qn(l,D,u);continue}l[l.length-1]+=D}t.trim!==!1&&(l=l.map((a)=>Ud(a)));let o=[...l.join(`
|
|
25
|
-
`)];for(let[a,D]of o.entries()){if(r+=D,ki.has(D)){let{groups:d}=new RegExp(`(?:\\${Uo}(?<code>\\d+)m|\\${Hs}(?<uri>.*)${Fa})`).exec(o.slice(a).join(""))||{groups:{}};if(d.code!==void 0){let F=Number.parseFloat(d.code);s=F===Rd?void 0:F}else d.uri!==void 0&&(n=d.uri.length===0?void 0:d.uri)}let h=Lo.codes.get(Number(s));o[a+1]===`
|
|
26
|
-
`?(n&&(r+=Ih("")),s&&h&&(r+=wh(h))):D===`
|
|
27
|
-
`&&(s&&h&&(r+=wh(s)),n&&(r+=Ih(n)))}return r},Mo,ha,ko,Vo,Ko,Go,jo,Wo,Zu=(e,u)=>Wo?e:u,Ho,Qo,Yo,zo,xe="",ni="",Ls,Us,qo,la,xo,Qs=(e)=>{switch(e){case"initial":case"active":return re.cyan(Ho);case"cancel":return re.red(Qo);case"error":return re.yellow(Yo);case"submit":return re.green(zo)}},Md=(e)=>{return new jo({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){let u=`${re.gray(xe)}
|
|
28
|
-
${Qs(this.state)} ${e.message}
|
|
29
|
-
`,t=e.placeholder?re.inverse(e.placeholder[0])+re.dim(e.placeholder.slice(1)):re.inverse(re.hidden("_")),r=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${u.trim()}
|
|
30
|
-
${re.yellow(xe)} ${r}
|
|
31
|
-
${re.yellow(ni)} ${re.yellow(this.error)}
|
|
32
|
-
`;case"submit":return`${u}${re.gray(xe)} ${re.dim(this.value||e.placeholder)}`;case"cancel":return`${u}${re.gray(xe)} ${re.strikethrough(re.dim(this.value??""))}${this.value?.trim()?`
|
|
33
|
-
`+re.gray(xe):""}`;default:return`${u}${re.cyan(xe)} ${r}
|
|
34
|
-
${re.cyan(ni)}
|
|
35
|
-
`}}}).prompt()},kd=(e)=>{let u=e.active??"Yes",t=e.inactive??"No";return new Vo({active:u,inactive:t,initialValue:e.initialValue??!0,render(){let r=`${re.gray(xe)}
|
|
36
|
-
${Qs(this.state)} ${e.message}
|
|
37
|
-
`,s=this.value?u:t;switch(this.state){case"submit":return`${r}${re.gray(xe)} ${re.dim(s)}`;case"cancel":return`${r}${re.gray(xe)} ${re.strikethrough(re.dim(s))}
|
|
38
|
-
${re.gray(xe)}`;default:return`${r}${re.cyan(xe)} ${this.value?`${re.green(Ls)} ${u}`:`${re.dim(Us)} ${re.dim(u)}`} ${re.dim("/")} ${this.value?`${re.dim(Us)} ${re.dim(t)}`:`${re.green(Ls)} ${t}`}
|
|
39
|
-
${re.cyan(ni)}
|
|
40
|
-
`}}}).prompt()},Vd=(e)=>{let u=(t,r)=>{let s=t.label??String(t.value);switch(r){case"active":return`${re.green(Ls)} ${s} ${t.hint?re.dim(`(${t.hint})`):""}`;case"selected":return`${re.dim(s)}`;case"cancelled":return`${re.strikethrough(re.dim(s))}`}return`${re.dim(Us)} ${re.dim(s)}`};return new Go({options:e.options,initialValue:e.initialValue,render(){let t=`${re.gray(xe)}
|
|
41
|
-
${Qs(this.state)} ${e.message}
|
|
42
|
-
`;switch(this.state){case"submit":return`${t}${re.gray(xe)} ${u(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${re.gray(xe)} ${u(this.options[this.cursor],"cancelled")}
|
|
43
|
-
${re.gray(xe)}`;default:return`${t}${re.cyan(xe)} ${this.options.map((r,s)=>u(r,s===this.cursor?"active":"inactive")).join(`
|
|
44
|
-
${re.cyan(xe)} `)}
|
|
45
|
-
${re.cyan(ni)}
|
|
46
|
-
`}}}).prompt()},Kd=(e)=>{let u=(t,r)=>{let s=t.label??String(t.value);switch(r){case"active":return`${re.cyan(qo)} ${s} ${t.hint?re.dim(`(${t.hint})`):""}`;case"selected":return`${re.green(la)} ${re.dim(s)}`;case"cancelled":return`${re.strikethrough(re.dim(s))}`;case"active-selected":return`${re.green(la)} ${s} ${t.hint?re.dim(`(${t.hint})`):""}`;case"submitted":return`${re.dim(s)}`}return`${re.dim(xo)} ${re.dim(s)}`};return new Ko({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(t){if(this.required&&t.length===0)return`Please select at least one option.
|
|
47
|
-
${re.reset(re.dim(`Press ${re.gray(re.bgWhite(re.inverse(" space ")))} to select, ${re.gray(re.bgWhite(re.inverse(" enter ")))} to submit`))}`},render(){let t=`${re.gray(xe)}
|
|
48
|
-
${Qs(this.state)} ${e.message}
|
|
49
|
-
`;switch(this.state){case"submit":return`${t}${re.gray(xe)} ${this.options.filter(({value:r})=>this.value.includes(r)).map((r)=>u(r,"submitted")).join(re.dim(", "))||re.dim("none")}`;case"cancel":{let r=this.options.filter(({value:s})=>this.value.includes(s)).map((s)=>u(s,"cancelled")).join(re.dim(", "));return`${t}${re.gray(xe)} ${r.trim()?`${r}
|
|
50
|
-
${re.gray(xe)}`:""}`}case"error":{let r=this.error.split(`
|
|
51
|
-
`).map((s,n)=>n===0?`${re.yellow(ni)} ${re.yellow(s)}`:` ${s}`).join(`
|
|
52
|
-
`);return t+re.yellow(xe)+" "+this.options.map((s,n)=>{let i=this.value.includes(s.value),l=n===this.cursor;if(l&&i)return u(s,"active-selected");if(i)return u(s,"selected");return u(s,l?"active":"inactive")}).join(`
|
|
53
|
-
${re.yellow(xe)} `)+`
|
|
54
|
-
`+r+`
|
|
55
|
-
`}default:return`${t}${re.cyan(xe)} ${this.options.map((r,s)=>{let n=this.value.includes(r.value),i=s===this.cursor;if(i&&n)return u(r,"active-selected");if(n)return u(r,"selected");return u(r,i?"active":"inactive")}).join(`
|
|
56
|
-
${re.cyan(xe)} `)}
|
|
57
|
-
${re.cyan(ni)}
|
|
58
|
-
`}}}).prompt()},Gd=js(()=>{a2(),Ws(),ga(),ya(),Je=`${Wn}[`,ms={to(e,u){if(!u)return`${Je}${e+1}G`;return`${Je}${u+1};${e+1}H`},move(e,u){let t="";if(e<0)t+=`${Je}${-e}D`;else if(e>0)t+=`${Je}${e}C`;if(u<0)t+=`${Je}${-u}A`;else if(u>0)t+=`${Je}${u}B`;return t},up:(e=1)=>`${Je}${e}A`,down:(e=1)=>`${Je}${e}B`,forward:(e=1)=>`${Je}${e}C`,backward:(e=1)=>`${Je}${e}D`,nextLine:(e=1)=>`${Je}E`.repeat(e),prevLine:(e=1)=>`${Je}F`.repeat(e),left:`${Je}G`,hide:`${Je}?25l`,show:`${Je}?25h`,save:`${Wn}7`,restore:`${Wn}8`},gh={up:(e=1)=>`${Je}S`.repeat(e),down:(e=1)=>`${Je}T`.repeat(e)},mh={screen:`${Je}2J`,up:(e=1)=>`${Je}1J`.repeat(e),down:(e=1)=>`${Je}J`.repeat(e),line:`${Je}2K`,lineEnd:`${Je}K`,lineStart:`${Je}1K`,lines(e){let u="";for(let t=0;t<e;t++)u+=this.line+(t<e-1?ms.up():"");if(e)u+=ms.left;return u}},cu={cursor:ms,scroll:gh,erase:mh,beep:Nd},ys={exports:{}},yh=bd,$o=!(("NO_COLOR"in process.env)||process.argv.includes("--no-color"))&&(("FORCE_COLOR"in process.env)||process.argv.includes("--color")||process.platform==="win32"||yh.isatty(1)&&!0||("CI"in process.env)),ys.exports=Fh(),ys.exports.createColors=Fh,Ah=ys.exports,Fs=Zo(Ah),As={},vh={get exports(){return As},set exports(e){As=e}},function(e){var u={};e.exports=u,u.eastAsianWidth=function(r){var s=r.charCodeAt(0),n=r.length==2?r.charCodeAt(1):0,i=s;return 55296<=s&&s<=56319&&56320<=n&&n<=57343&&(s&=1023,n&=1023,i=s<<10|n,i+=65536),i==12288||65281<=i&&i<=65376||65504<=i&&i<=65510?"F":i==8361||65377<=i&&i<=65470||65474<=i&&i<=65479||65482<=i&&i<=65487||65490<=i&&i<=65495||65498<=i&&i<=65500||65512<=i&&i<=65518?"H":4352<=i&&i<=4447||4515<=i&&i<=4519||4602<=i&&i<=4607||9001<=i&&i<=9002||11904<=i&&i<=11929||11931<=i&&i<=12019||12032<=i&&i<=12245||12272<=i&&i<=12283||12289<=i&&i<=12350||12353<=i&&i<=12438||12441<=i&&i<=12543||12549<=i&&i<=12589||12593<=i&&i<=12686||12688<=i&&i<=12730||12736<=i&&i<=12771||12784<=i&&i<=12830||12832<=i&&i<=12871||12880<=i&&i<=13054||13056<=i&&i<=19903||19968<=i&&i<=42124||42128<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||55216<=i&&i<=55238||55243<=i&&i<=55291||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65106||65108<=i&&i<=65126||65128<=i&&i<=65131||110592<=i&&i<=110593||127488<=i&&i<=127490||127504<=i&&i<=127546||127552<=i&&i<=127560||127568<=i&&i<=127569||131072<=i&&i<=194367||177984<=i&&i<=196605||196608<=i&&i<=262141?"W":32<=i&&i<=126||162<=i&&i<=163||165<=i&&i<=166||i==172||i==175||10214<=i&&i<=10221||10629<=i&&i<=10630?"Na":i==161||i==164||167<=i&&i<=168||i==170||173<=i&&i<=174||176<=i&&i<=180||182<=i&&i<=186||188<=i&&i<=191||i==198||i==208||215<=i&&i<=216||222<=i&&i<=225||i==230||232<=i&&i<=234||236<=i&&i<=237||i==240||242<=i&&i<=243||247<=i&&i<=250||i==252||i==254||i==257||i==273||i==275||i==283||294<=i&&i<=295||i==299||305<=i&&i<=307||i==312||319<=i&&i<=322||i==324||328<=i&&i<=331||i==333||338<=i&&i<=339||358<=i&&i<=359||i==363||i==462||i==464||i==466||i==468||i==470||i==472||i==474||i==476||i==593||i==609||i==708||i==711||713<=i&&i<=715||i==717||i==720||728<=i&&i<=731||i==733||i==735||768<=i&&i<=879||913<=i&&i<=929||931<=i&&i<=937||945<=i&&i<=961||963<=i&&i<=969||i==1025||1040<=i&&i<=1103||i==1105||i==8208||8211<=i&&i<=8214||8216<=i&&i<=8217||8220<=i&&i<=8221||8224<=i&&i<=8226||8228<=i&&i<=8231||i==8240||8242<=i&&i<=8243||i==8245||i==8251||i==8254||i==8308||i==8319||8321<=i&&i<=8324||i==8364||i==8451||i==8453||i==8457||i==8467||i==8470||8481<=i&&i<=8482||i==8486||i==8491||8531<=i&&i<=8532||8539<=i&&i<=8542||8544<=i&&i<=8555||8560<=i&&i<=8569||i==8585||8592<=i&&i<=8601||8632<=i&&i<=8633||i==8658||i==8660||i==8679||i==8704||8706<=i&&i<=8707||8711<=i&&i<=8712||i==8715||i==8719||i==8721||i==8725||i==8730||8733<=i&&i<=8736||i==8739||i==8741||8743<=i&&i<=8748||i==8750||8756<=i&&i<=8759||8764<=i&&i<=8765||i==8776||i==8780||i==8786||8800<=i&&i<=8801||8804<=i&&i<=8807||8810<=i&&i<=8811||8814<=i&&i<=8815||8834<=i&&i<=8835||8838<=i&&i<=8839||i==8853||i==8857||i==8869||i==8895||i==8978||9312<=i&&i<=9449||9451<=i&&i<=9547||9552<=i&&i<=9587||9600<=i&&i<=9615||9618<=i&&i<=9621||9632<=i&&i<=9633||9635<=i&&i<=9641||9650<=i&&i<=9651||9654<=i&&i<=9655||9660<=i&&i<=9661||9664<=i&&i<=9665||9670<=i&&i<=9672||i==9675||9678<=i&&i<=9681||9698<=i&&i<=9701||i==9711||9733<=i&&i<=9734||i==9737||9742<=i&&i<=9743||9748<=i&&i<=9749||i==9756||i==9758||i==9792||i==9794||9824<=i&&i<=9825||9827<=i&&i<=9829||9831<=i&&i<=9834||9836<=i&&i<=9837||i==9839||9886<=i&&i<=9887||9918<=i&&i<=9919||9924<=i&&i<=9933||9935<=i&&i<=9953||i==9955||9960<=i&&i<=9983||i==10045||i==10071||10102<=i&&i<=10111||11093<=i&&i<=11097||12872<=i&&i<=12879||57344<=i&&i<=63743||65024<=i&&i<=65039||i==65533||127232<=i&&i<=127242||127248<=i&&i<=127277||127280<=i&&i<=127337||127344<=i&&i<=127386||917760<=i&&i<=917999||983040<=i&&i<=1048573||1048576<=i&&i<=1114109?"A":"N"},u.characterLength=function(r){var s=this.eastAsianWidth(r);return s=="F"||s=="W"||s=="A"?2:1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(r){for(var s=t(r),n=0,i=0;i<s.length;i++)n=n+this.characterLength(s[i]);return n},u.slice=function(r,s,n){textLen=u.length(r),s=s||0,n=n||1,s<0&&(s=textLen+s),n<0&&(n=textLen+n);for(var i="",l=0,o=t(r),a=0;a<o.length;a++){var D=o[a],h=u.length(D);if(l>=s-(h==2?1:0))if(l+h<=n)i+=D;else break;l+=h}return i}}(vh),Oo=As,qe={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Object.keys(qe.modifier),Th=Object.keys(qe.color),$d=Object.keys(qe.bgColor),[...Th],Lo=Td(),ki=new Set(["\x1B",""]),Hs=`${Od}8;;`,Mo=Symbol("clack:cancel"),ha=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),ko=new Set(["up","down","left","right","space","enter"]),Vo=class e extends Li{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(u){super(u,!1),this.value=!!u.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(t)=>{this.output.write(cu.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}},Ko=class e extends Li{constructor(u){super(u,!1),this.cursor=0,this.options=u.options,this.value=[...u.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===u.cursorAt),0),this.on("key",(t)=>{t==="a"&&this.toggleAll()}),this.on("cursor",(t)=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let u=this.value.length===this.options.length;this.value=u?[]:this.options.map((t)=>t.value)}toggleValue(){let u=this.value.includes(this._value);this.value=u?this.value.filter((t)=>t!==this._value):[...this.value,this._value]}},Go=class e extends Li{constructor(u){super(u,!1),this.cursor=0,this.options=u.options,this.cursor=this.options.findIndex(({value:t})=>t===u.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(t)=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}},jo=class e extends Li{constructor(u){super(u),this.valueWithCursor="",this.on("finalize",()=>{this.value||(this.value=u.defaultValue),this.valueWithCursor=this.value}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.value}${Fs.inverse(Fs.hidden("_"))}`;else{let t=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.valueWithCursor=`${t}${Fs.inverse(r[0])}${r.slice(1)}`}})}get cursor(){return this._cursor}},Wo=Xo(),Ho=Zu("❯",">"),Qo=Zu("■","x"),Yo=Zu("▲","x"),zo=Zu("✔","√"),Ls=Zu("●",">"),Us=Zu("○"," "),qo=Zu("◻","[•]"),la=Zu("◼","[+]"),xo=Zu("◻","[ ]")});function jd(e){for(let u of e2){let t=u[1]||u[0];if(e[t])return{name:u[0].toLowerCase(),...u[2]}}if(e.SHELL&&e.SHELL==="/bin/jsh")return{name:"stackblitz",ci:!1};return{name:"",ci:!1}}function _i(e){return e?e!=="false":!1}function Wd({onlyFirst:e=!1}={}){let u=["[\\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(u,e?void 0:"g")}function Hd(e){if(typeof e!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(r2,"")}function Zo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Qd(e,u){if(typeof e!=="string"||e.length===0)return 0;if(u={ambiguousIsNarrow:!0,countAnsiEscapeCodes:!1,...u},!u.countAnsiEscapeCodes)e=Hd(e);if(e.length===0)return 0;let t=u.ambiguousIsNarrow?1:2,r=0;for(let{segment:s}of new Intl.Segmenter().segment(e)){let n=s.codePointAt(0);if(n<=31||n>=127&&n<=159)continue;if(n>=768&&n<=879)continue;if(Zd().test(s)){r+=2;continue}switch(i2.eastAsianWidth(s)){case"F":case"W":{r+=2;break}case"A":{r+=t;break}default:r+=1}}return r}function Xo(){if(Fu.platform!=="win32")return Fu.env.TERM!=="linux";return Boolean(Fu.env.CI)||Boolean(Fu.env.WT_SESSION)||Boolean(Fu.env.TERMINUS_SUBLIME)||Fu.env.ConEmuTask==="{cmd::Cmder}"||Fu.env.TERM_PROGRAM==="Terminus-Sublime"||Fu.env.TERM_PROGRAM==="vscode"||Fu.env.TERM==="xterm-256color"||Fu.env.TERM==="alacritty"||Fu.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function Nh(e){if(!Intl.Segmenter)return Bu(e).length;return Qd(e)}function vs(e){return e.replace(/`([^`]+)`/gm,(u,t)=>re.cyan(t)).replace(/\s+_([^_]+)_\s+/gm,(u,t)=>` ${re.underline(t)} `)}function Yd(e="white"){return re[e]||re.white}function zd(e="bgWhite"){return re[`bg${e[0].toUpperCase()}${e.slice(1)}`]||re.bgWhite}function Jo(e={}){let u=qd();if(process.env.CONSOLA_LEVEL)u=Number.parseInt(process.env.CONSOLA_LEVEL)??u;return fd({level:u,defaults:{level:u},stdout:process.stdout,stderr:process.stderr,prompt:(...r)=>Promise.resolve().then(()=>(Gd(),No)).then((s)=>s.prompt(...r)),reporters:e.reporters||[e.fancy??!(t2||Aa)?new n2:new ma],...e})}function qd(){if(u2)return zt.debug;if(Aa)return zt.warn;return zt.info}var e2,$i,Xr,Yn,_h,t2,xd,u2,Aa,r2,zn,$h,i2,Zd=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g},Rh,Oh,s2,$u=(e,u)=>s2?e:u,qn,n2,Xd,a2=js(()=>{ga(),ya(),Ws(),e2=[["APPVEYOR"],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"]],$i=typeof process!=="undefined"?process:{},Xr=$i.env||{},Yn=jd(Xr),_h=typeof process!=="undefined"&&process.env&&"development"||"",$i.platform,Yn.name,t2=_i(Xr.CI)||Yn.ci!==!1,xd=_i($i.stdout&&$i.stdout.isTTY),u2=_i(Xr.DEBUG),Aa=_h==="test"||_i(Xr.TEST),_i(Xr.MINIMAL),r2=Wd(),zn={exports:{}},function(e){var u={};e.exports=u,u.eastAsianWidth=function(r){var s=r.charCodeAt(0),n=r.length==2?r.charCodeAt(1):0,i=s;if(55296<=s&&s<=56319&&(56320<=n&&n<=57343))s&=1023,n&=1023,i=s<<10|n,i+=65536;if(i==12288||65281<=i&&i<=65376||65504<=i&&i<=65510)return"F";if(i==8361||65377<=i&&i<=65470||65474<=i&&i<=65479||65482<=i&&i<=65487||65490<=i&&i<=65495||65498<=i&&i<=65500||65512<=i&&i<=65518)return"H";if(4352<=i&&i<=4447||4515<=i&&i<=4519||4602<=i&&i<=4607||9001<=i&&i<=9002||11904<=i&&i<=11929||11931<=i&&i<=12019||12032<=i&&i<=12245||12272<=i&&i<=12283||12289<=i&&i<=12350||12353<=i&&i<=12438||12441<=i&&i<=12543||12549<=i&&i<=12589||12593<=i&&i<=12686||12688<=i&&i<=12730||12736<=i&&i<=12771||12784<=i&&i<=12830||12832<=i&&i<=12871||12880<=i&&i<=13054||13056<=i&&i<=19903||19968<=i&&i<=42124||42128<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||55216<=i&&i<=55238||55243<=i&&i<=55291||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65106||65108<=i&&i<=65126||65128<=i&&i<=65131||110592<=i&&i<=110593||127488<=i&&i<=127490||127504<=i&&i<=127546||127552<=i&&i<=127560||127568<=i&&i<=127569||131072<=i&&i<=194367||177984<=i&&i<=196605||196608<=i&&i<=262141)return"W";if(32<=i&&i<=126||162<=i&&i<=163||165<=i&&i<=166||i==172||i==175||10214<=i&&i<=10221||10629<=i&&i<=10630)return"Na";if(i==161||i==164||167<=i&&i<=168||i==170||173<=i&&i<=174||176<=i&&i<=180||182<=i&&i<=186||188<=i&&i<=191||i==198||i==208||215<=i&&i<=216||222<=i&&i<=225||i==230||232<=i&&i<=234||236<=i&&i<=237||i==240||242<=i&&i<=243||247<=i&&i<=250||i==252||i==254||i==257||i==273||i==275||i==283||294<=i&&i<=295||i==299||305<=i&&i<=307||i==312||319<=i&&i<=322||i==324||328<=i&&i<=331||i==333||338<=i&&i<=339||358<=i&&i<=359||i==363||i==462||i==464||i==466||i==468||i==470||i==472||i==474||i==476||i==593||i==609||i==708||i==711||713<=i&&i<=715||i==717||i==720||728<=i&&i<=731||i==733||i==735||768<=i&&i<=879||913<=i&&i<=929||931<=i&&i<=937||945<=i&&i<=961||963<=i&&i<=969||i==1025||1040<=i&&i<=1103||i==1105||i==8208||8211<=i&&i<=8214||8216<=i&&i<=8217||8220<=i&&i<=8221||8224<=i&&i<=8226||8228<=i&&i<=8231||i==8240||8242<=i&&i<=8243||i==8245||i==8251||i==8254||i==8308||i==8319||8321<=i&&i<=8324||i==8364||i==8451||i==8453||i==8457||i==8467||i==8470||8481<=i&&i<=8482||i==8486||i==8491||8531<=i&&i<=8532||8539<=i&&i<=8542||8544<=i&&i<=8555||8560<=i&&i<=8569||i==8585||8592<=i&&i<=8601||8632<=i&&i<=8633||i==8658||i==8660||i==8679||i==8704||8706<=i&&i<=8707||8711<=i&&i<=8712||i==8715||i==8719||i==8721||i==8725||i==8730||8733<=i&&i<=8736||i==8739||i==8741||8743<=i&&i<=8748||i==8750||8756<=i&&i<=8759||8764<=i&&i<=8765||i==8776||i==8780||i==8786||8800<=i&&i<=8801||8804<=i&&i<=8807||8810<=i&&i<=8811||8814<=i&&i<=8815||8834<=i&&i<=8835||8838<=i&&i<=8839||i==8853||i==8857||i==8869||i==8895||i==8978||9312<=i&&i<=9449||9451<=i&&i<=9547||9552<=i&&i<=9587||9600<=i&&i<=9615||9618<=i&&i<=9621||9632<=i&&i<=9633||9635<=i&&i<=9641||9650<=i&&i<=9651||9654<=i&&i<=9655||9660<=i&&i<=9661||9664<=i&&i<=9665||9670<=i&&i<=9672||i==9675||9678<=i&&i<=9681||9698<=i&&i<=9701||i==9711||9733<=i&&i<=9734||i==9737||9742<=i&&i<=9743||9748<=i&&i<=9749||i==9756||i==9758||i==9792||i==9794||9824<=i&&i<=9825||9827<=i&&i<=9829||9831<=i&&i<=9834||9836<=i&&i<=9837||i==9839||9886<=i&&i<=9887||9918<=i&&i<=9919||9924<=i&&i<=9933||9935<=i&&i<=9953||i==9955||9960<=i&&i<=9983||i==10045||i==10071||10102<=i&&i<=10111||11093<=i&&i<=11097||12872<=i&&i<=12879||57344<=i&&i<=63743||65024<=i&&i<=65039||i==65533||127232<=i&&i<=127242||127248<=i&&i<=127277||127280<=i&&i<=127337||127344<=i&&i<=127386||917760<=i&&i<=917999||983040<=i&&i<=1048573||1048576<=i&&i<=1114109)return"A";return"N"},u.characterLength=function(r){var s=this.eastAsianWidth(r);if(s=="F"||s=="W"||s=="A")return 2;else return 1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(r){var s=t(r),n=0;for(var i=0;i<s.length;i++)n=n+this.characterLength(s[i]);return n},u.slice=function(r,s,n){if(textLen=u.length(r),s=s?s:0,n=n?n:1,s<0)s=textLen+s;if(n<0)n=textLen+n;var i="",l=0,o=t(r);for(var a=0;a<o.length;a++){var D=o[a],h=u.length(D);if(l>=s-(h==2?1:0))if(l+h<=n)i+=D;else break;l+=h}return i}}(zn),$h=zn.exports,i2=Zo($h),Rh={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},Oh={0:"red",1:"yellow"},s2=Xo(),qn={error:$u("✖","×"),fatal:$u("✖","×"),ready:$u("✔","√"),warn:$u("⚠","‼"),info:$u("ℹ","i"),success:$u("✔","√"),debug:$u("⚙","D"),trace:$u("→","→"),fail:$u("✖","×"),start:$u("◐","o"),log:""},n2=class e extends ma{formatStack(u){return`
|
|
59
|
-
`+bo(u).map((t)=>" "+t.replace(/^at +/,(r)=>re.gray(r)).replace(/\((.+)\)/,(r,s)=>`(${re.cyan(s)})`)).join(`
|
|
60
|
-
`)}formatType(u,t,r){let s=Rh[u.type]||Oh[u.level]||"gray";if(t)return zd(s)(re.black(` ${u.type.toUpperCase()} `));let n=typeof qn[u.type]==="string"?qn[u.type]:u.icon||u.type;return n?Yd(s)(n):""}formatLogObj(u,t){let[r,...s]=this.formatArgs(u.args,t).split(`
|
|
61
|
-
`);if(u.type==="box")return Fd(vs(r+(s.length>0?`
|
|
62
|
-
`+s.join(`
|
|
63
|
-
`):"")),{title:u.title?vs(u.title):void 0,style:u.style});let n=this.formatDate(u.date,t),i=n&&re.gray(n),l=u.badge??u.level<2,o=this.formatType(u,l,t),a=u.tag?re.gray(u.tag):"",D,h=this.filterAndJoin([o,vs(r)]),d=this.filterAndJoin(t.columns?[a,i]:[a]),F=(t.columns||0)-Nh(h)-Nh(d)-2;if(D=F>0&&(t.columns||0)>=80?h+" ".repeat(F)+d:(d?`${re.gray(`[${d}]`)} `:"")+h,D+=vs(s.length>0?`
|
|
64
|
-
`+s.join(`
|
|
65
|
-
`):""),u.type==="trace"){let p=new Error("Trace: "+u.message);D+=this.formatStack(p.stack||"")}return l?`
|
|
66
|
-
`+D+`
|
|
67
|
-
`:D}},Xd=Jo()}),dt=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function t(s){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t(s)}function r(s){var n=typeof s==="string"||s instanceof String;if(!n){var i=t(s);if(s===null)i="null";else if(i==="object")i=s.constructor.name;throw new TypeError("Expected a string but received a ".concat(i))}}u.exports=e.default,u.exports.default=e.default}),va=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var t=r(dt());function r(D){return D&&D.__esModule?D:{default:D}}var s="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",n="(".concat(s,"[.]){3}").concat(s),i=new RegExp("^".concat(n,"$")),l="(?:[0-9a-fA-F]{1,4})",o=new RegExp("^("+"(?:".concat(l,":){7}(?:").concat(l,"|:)|")+"(?:".concat(l,":){6}(?:").concat(n,"|:").concat(l,"|:)|")+"(?:".concat(l,":){5}(?::").concat(n,"|(:").concat(l,"){1,2}|:)|")+"(?:".concat(l,":){4}(?:(:").concat(l,"){0,1}:").concat(n,"|(:").concat(l,"){1,3}|:)|")+"(?:".concat(l,":){3}(?:(:").concat(l,"){0,2}:").concat(n,"|(:").concat(l,"){1,4}|:)|")+"(?:".concat(l,":){2}(?:(:").concat(l,"){0,3}:").concat(n,"|(:").concat(l,"){1,5}|:)|")+"(?:".concat(l,":){1}(?:(:").concat(l,"){0,4}:").concat(n,"|(:").concat(l,"){1,6}|:)|")+"(?::((?::".concat(l,"){0,5}:").concat(n,"|(?::").concat(l,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function a(D){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.default(D),h=String(h),!h)return a(D,4)||a(D,6);if(h==="4")return i.test(D);if(h==="6")return o.test(D);return!1}u.exports=e.default,u.exports.default=e.default}),Mr=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;for(var n in s)if(typeof r[n]==="undefined")r[n]=s[n];return r}u.exports=e.default,u.exports.default=e.default}),Jd=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var t=s(dt()),r=s(Mr());function s(a){return a&&a.__esModule?a:{default:a}}var n=/[^A-Z0-9+\/=]/i,i=/^[A-Z0-9_\-]*$/i,l={urlSafe:!1};function o(a,D){t.default(a),D=r.default(D,l);var h=a.length;if(D.urlSafe)return i.test(a);if(h%4!==0||n.test(a))return!1;var d=a.indexOf("=");return d===-1||d===h-1||d===h-2&&a[h-1]==="="}u.exports=e.default,u.exports.default=e.default}),e5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=s(dt()),r=s(Jd());function s(i){return i&&i.__esModule?i:{default:i}}function n(i){t.default(i);var l=i.split("."),o=l.length;if(o!==3)return!1;return l.reduce(function(a,D){return a&&r.default(D,{urlSafe:!0})},!0)}u.exports=e.default,u.exports.default=e.default}),h2=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var t=s(dt()),r=s(Mr());function s(l){return l&&l.__esModule?l:{default:l}}var n={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function i(l,o){if(t.default(l),o=r.default(o,n),o.allow_trailing_dot&&l[l.length-1]===".")l=l.substring(0,l.length-1);if(o.allow_wildcard===!0&&l.indexOf("*.")===0)l=l.substring(2);var a=l.split("."),D=a[a.length-1];if(o.require_tld){if(a.length<2)return!1;if(!o.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(D))return!1;if(/\s/.test(D))return!1}if(!o.allow_numeric_tld&&/^\d+$/.test(D))return!1;return a.every(function(h){if(h.length>63&&!o.ignore_max_length)return!1;if(!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(h))return!1;if(/[\uff01-\uff5e]/.test(h))return!1;if(/^-|-$/.test(h))return!1;if(!o.allow_underscores&&/_/.test(h))return!1;return!0})}u.exports=e.default,u.exports.default=e.default}),t5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=B;var t=i(dt()),r=i(h2()),s=i(va()),n=i(Mr());function i(C){return C&&C.__esModule?C:{default:C}}function l(C,c){return d(C)||h(C,c)||a(C,c)||o()}function o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
68
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(C,c){if(!C)return;if(typeof C==="string")return D(C,c);var y=Object.prototype.toString.call(C).slice(8,-1);if(y==="Object"&&C.constructor)y=C.constructor.name;if(y==="Map"||y==="Set")return Array.from(C);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return D(C,c)}function D(C,c){if(c==null||c>C.length)c=C.length;for(var y=0,A=new Array(c);y<c;y++)A[y]=C[y];return A}function h(C,c){var y=C==null?null:typeof Symbol!="undefined"&&C[Symbol.iterator]||C["@@iterator"];if(y!=null){var A,T,I,v,g=[],E=!0,S=!1;try{if(I=(y=y.call(C)).next,c===0){if(Object(y)!==y)return;E=!1}else for(;!(E=(A=I.call(y)).done)&&(g.push(A.value),g.length!==c);E=!0);}catch(_){S=!0,T=_}finally{try{if(!E&&y.return!=null&&(v=y.return(),Object(v)!==v))return}finally{if(S)throw T}}return g}}function d(C){if(Array.isArray(C))return C}var F={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},p=/^\[([^\]]+)\](?::([0-9]+))?$/;function f(C){return Object.prototype.toString.call(C)==="[object RegExp]"}function m(C,c){for(var y=0;y<c.length;y++){var A=c[y];if(C===A||f(A)&&A.test(C))return!0}return!1}function B(C,c){if(t.default(C),!C||/[\s<>]/.test(C))return!1;if(C.indexOf("mailto:")===0)return!1;if(c=n.default(c,F),c.validate_length&&C.length>=2083)return!1;if(!c.allow_fragments&&C.includes("#"))return!1;if(!c.allow_query_components&&(C.includes("?")||C.includes("&")))return!1;var y,A,T,I,v,g,E,S;if(E=C.split("#"),C=E.shift(),E=C.split("?"),C=E.shift(),E=C.split("://"),E.length>1){if(y=E.shift().toLowerCase(),c.require_valid_protocol&&c.protocols.indexOf(y)===-1)return!1}else if(c.require_protocol)return!1;else if(C.slice(0,2)==="//"){if(!c.allow_protocol_relative_urls)return!1;E[0]=C.slice(2)}if(C=E.join("://"),C==="")return!1;if(E=C.split("/"),C=E.shift(),C===""&&!c.require_host)return!0;if(E=C.split("@"),E.length>1){if(c.disallow_auth)return!1;if(E[0]==="")return!1;if(A=E.shift(),A.indexOf(":")>=0&&A.split(":").length>2)return!1;var _=A.split(":"),K=l(_,2),N=K[0],$=K[1];if(N===""&&$==="")return!1}I=E.join("@"),g=null,S=null;var P=I.match(p);if(P)T="",S=P[1],g=P[2]||null;else if(E=I.split(":"),T=E.shift(),E.length)g=E.join(":");if(g!==null&&g.length>0){if(v=parseInt(g,10),!/^[0-9]+$/.test(g)||v<=0||v>65535)return!1}else if(c.require_port)return!1;if(c.host_whitelist)return m(T,c.host_whitelist);if(T===""&&!c.require_host)return!0;if(!s.default(T)&&!r.default(T,c)&&(!S||!s.default(S,6)))return!1;if(T=T||S,c.host_blacklist&&m(T,c.host_blacklist))return!1;return!0}u.exports=e.default,u.exports.default=e.default}),u5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(dt());function r(i){return i&&i.__esModule?i:{default:i}}var s=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;function n(i){return t.default(i),s.test(i)}u.exports=e.default,u.exports.default=e.default}),r5=te((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=l,e.locales=void 0;var u=t(dt());function t(a){return a&&a.__esModule?a:{default:a}}var r={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};function s(a){var D=a.filter(function(h){return!(h in r)});if(D.length>0)return!1;return!0}function n(a,D){var h=a.replace(/[\s\-]+/gi,"").toUpperCase(),d=h.slice(0,2).toUpperCase(),F=d in r;if(D.whitelist){if(!s(D.whitelist))return!1;var p=D.whitelist.includes(d);if(!p)return!1}if(D.blacklist){var f=D.blacklist.includes(d);if(f)return!1}return F&&r[d].test(h)}function i(a){var D=a.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),h=D.slice(4)+D.slice(0,4),d=h.replace(/[A-Z]/g,function(p){return p.charCodeAt(0)-55}),F=d.match(/\d{1,7}/g).reduce(function(p,f){return Number(p+f)%97},"");return F===1}function l(a){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return u.default(a),n(a,D)&&i(a)}var o=e.locales=Object.keys(r)}),i5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(dt());function r(i){return i&&i.__esModule?i:{default:i}}var s={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function n(i,l){t.default(i);var o=s[![void 0,null].includes(l)?l:"all"];return!!o&&o.test(i)}u.exports=e.default,u.exports.default=e.default}),s5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(dt());function r(i){return i&&i.__esModule?i:{default:i}}var s=/^[\x00-\x7F]+$/;function n(i){return t.default(i),s.test(i)}u.exports=e.default,u.exports.default=e.default}),n5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(dt());function r(i){return i&&i.__esModule?i:{default:i}}function s(i){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},s(i)}function n(i,l){t.default(i);var o,a;if(s(l)==="object")o=l.min||0,a=l.max;else o=arguments[1],a=arguments[2];var D=encodeURI(i).split(/%..|./).length-1;return D>=o&&(typeof a==="undefined"||D<=a)}u.exports=e.default,u.exports.default=e.default}),a5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=B;var t=l(dt()),r=l(n5()),s=l(h2()),n=l(va()),i=l(Mr());function l(C){return C&&C.__esModule?C:{default:C}}var o={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},a=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,D=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,h=/^[a-z\d]+$/,d=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,F=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,p=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,f=254;function m(C){var c=C.replace(/^"(.+)"$/,"$1");if(!c.trim())return!1;var y=/[\.";<>]/.test(c);if(y){if(c===C)return!1;var A=c.split('"').length===c.split("\\\"").length;if(!A)return!1}return!0}function B(C,c){if(t.default(C),c=i.default(c,o),c.require_display_name||c.allow_display_name){var y=C.match(a);if(y){var A=y[1];if(C=C.replace(A,"").replace(/(^<|>$)/g,""),A.endsWith(" "))A=A.slice(0,-1);if(!m(A))return!1}else if(c.require_display_name)return!1}if(!c.ignore_max_length&&C.length>f)return!1;var T=C.split("@"),I=T.pop(),v=I.toLowerCase();if(c.host_blacklist.includes(v))return!1;if(c.host_whitelist.length>0&&!c.host_whitelist.includes(v))return!1;var g=T.join("@");if(c.domain_specific_validation&&(v==="gmail.com"||v==="googlemail.com")){g=g.toLowerCase();var E=g.split("+")[0];if(!r.default(E.replace(/\./g,""),{min:6,max:30}))return!1;var S=E.split(".");for(var _=0;_<S.length;_++)if(!h.test(S[_]))return!1}if(c.ignore_max_length===!1&&(!r.default(g,{max:64})||!r.default(I,{max:254})))return!1;if(!s.default(I,{require_tld:c.require_tld,ignore_max_length:c.ignore_max_length,allow_underscores:c.allow_underscores})){if(!c.allow_ip_domain)return!1;if(!n.default(I)){if(!I.startsWith("[")||!I.endsWith("]"))return!1;var K=I.slice(1,-1);if(K.length===0||!n.default(K))return!1}}if(g[0]==='"')return g=g.slice(1,g.length-1),c.allow_utf8_local_part?p.test(g):d.test(g);var N=c.allow_utf8_local_part?F:D,$=g.split(".");for(var P=0;P<$.length;P++)if(!N.test($[P]))return!1;if(c.blacklisted_chars){if(g.search(new RegExp("[".concat(c.blacklisted_chars,"]+"),"g"))!==-1)return!1}return!0}u.exports=e.default,u.exports.default=e.default}),Ba=te((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.farsiLocales=e.englishLocales=e.dotDecimal=e.decimal=e.commaDecimal=e.bengaliLocales=e.arabicLocales=e.alphanumeric=e.alpha=void 0;var u=e.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZ\u00C7\u018F\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"bg-BG":/^[\u0410-\u042F]+$/i,"cs-CZ":/^[A-Z\u00C1\u010C\u010E\u00C9\u011A\u00CD\u0147\u00D3\u0158\u0160\u0164\u00DA\u016E\u00DD\u017D]+$/i,"da-DK":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"de-DE":/^[A-Z\u00C4\u00D6\u00DC\u00DF]+$/i,"el-GR":/^[\u0391-\u03CE]+$/i,"es-ES":/^[A-Z\u00C1\u00C9\u00CD\u00D1\u00D3\u00DA\u00DC]+$/i,"fa-IR":/^[\u0627\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u06CC]+$/i,"fi-FI":/^[A-Z\u00C5\u00C4\u00D6]+$/i,"fr-FR":/^[A-Z\u00C0\u00C2\u00C6\u00C7\u00C9\u00C8\u00CA\u00CB\u00CF\u00CE\u00D4\u0152\u00D9\u00DB\u00DC\u0178]+$/i,"it-IT":/^[A-Z\u00C0\u00C9\u00C8\u00CC\u00CE\u00D3\u00D2\u00D9]+$/i,"ja-JP":/^[\u3041-\u3093\u30A1-\u30F6\uFF66-\uFF9F\u4E00-\u9FA0\u30FC\u30FB\u3002\u3001]+$/i,"nb-NO":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"nl-NL":/^[A-Z\u00C1\u00C9\u00CB\u00CF\u00D3\u00D6\u00DC\u00DA]+$/i,"nn-NO":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"hu-HU":/^[A-Z\u00C1\u00C9\u00CD\u00D3\u00D6\u0150\u00DA\u00DC\u0170]+$/i,"pl-PL":/^[A-Z\u0104\u0106\u0118\u015A\u0141\u0143\u00D3\u017B\u0179]+$/i,"pt-PT":/^[A-Z\u00C3\u00C1\u00C0\u00C2\u00C4\u00C7\u00C9\u00CA\u00CB\u00CD\u00CF\u00D5\u00D3\u00D4\u00D6\u00DA\u00DC]+$/i,"ru-RU":/^[\u0410-\u042F\u0401]+$/i,"kk-KZ":/^[\u0410-\u042F\u0401\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-Z\u010C\u0106\u0110\u0160\u017D]+$/i,"sk-SK":/^[A-Z\u00C1\u010C\u010E\u00C9\u00CD\u0147\u00D3\u0160\u0164\u00DA\u00DD\u017D\u0139\u0154\u013D\u00C4\u00D4]+$/i,"sr-RS@latin":/^[A-Z\u010C\u0106\u017D\u0160\u0110]+$/i,"sr-RS":/^[\u0410-\u042F\u0402\u0408\u0409\u040A\u040B\u040F]+$/i,"sv-SE":/^[A-Z\u00C5\u00C4\u00D6]+$/i,"th-TH":/^[\u0E01-\u0E50\s]+$/i,"tr-TR":/^[A-Z\u00C7\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"uk-UA":/^[\u0410-\u0429\u042C\u042E\u042F\u0404I\u0407\u0490\u0456]+$/i,"vi-VN":/^[A-Z\u00C0\u00C1\u1EA0\u1EA2\u00C3\u00C2\u1EA6\u1EA4\u1EAC\u1EA8\u1EAA\u0102\u1EB0\u1EAE\u1EB6\u1EB2\u1EB4\u0110\u00C8\u00C9\u1EB8\u1EBA\u1EBC\u00CA\u1EC0\u1EBE\u1EC6\u1EC2\u1EC4\u00CC\u00CD\u1ECA\u1EC8\u0128\u00D2\u00D3\u1ECC\u1ECE\u00D5\u00D4\u1ED2\u1ED0\u1ED8\u1ED4\u1ED6\u01A0\u1EDC\u1EDA\u1EE2\u1EDE\u1EE0\u00D9\u00DA\u1EE4\u1EE6\u0168\u01AF\u1EEA\u1EE8\u1EF0\u1EEC\u1EEE\u1EF2\u00DD\u1EF4\u1EF6\u1EF8]+$/i,"ko-KR":/^[\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]*$/,"ku-IQ":/^[\u0626\u0627\u0628\u067E\u062A\u062C\u0686\u062D\u062E\u062F\u0631\u0695\u0632\u0698\u0633\u0634\u0639\u063A\u0641\u06A4\u0642\u06A9\u06AF\u0644\u06B5\u0645\u0646\u0648\u06C6\u06BE\u06D5\u06CC\u06CE\u064A\u0637\u0624\u062B\u0622\u0625\u0623\u0643\u0636\u0635\u0629\u0638\u0630]+$/i,ar:/^[\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\u0670]+$/,he:/^[\u05D0-\u05EA]+$/,fa:/^['\u0622\u0627\u0621\u0623\u0624\u0626\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u0629\u06CC']+$/i,bn:/^['\u0980\u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098A\u098B\u098C\u098F\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099A\u099B\u099C\u099D\u099E\u099F\u09A0\u09A1\u09A2\u09A3\u09A4\u09A5\u09A6\u09A7\u09A8\u09AA\u09AB\u09AC\u09AD\u09AE\u09AF\u09B0\u09B2\u09B6\u09B7\u09B8\u09B9\u09BC\u09BD\u09BE\u09BF\u09C0\u09C1\u09C2\u09C3\u09C4\u09C7\u09C8\u09CB\u09CC\u09CD\u09CE\u09D7\u09DC\u09DD\u09DF\u09E0\u09E1\u09E2\u09E3\u09F0\u09F1\u09F2\u09F3\u09F4\u09F5\u09F6\u09F7\u09F8\u09F9\u09FA\u09FB']+$/,eo:/^[ABC\u0108D-G\u011CH\u0124IJ\u0134K-PRS\u015CTU\u016CVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/},t=e.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZ\u00C7\u018F\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"bg-BG":/^[0-9\u0410-\u042F]+$/i,"cs-CZ":/^[0-9A-Z\u00C1\u010C\u010E\u00C9\u011A\u00CD\u0147\u00D3\u0158\u0160\u0164\u00DA\u016E\u00DD\u017D]+$/i,"da-DK":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"de-DE":/^[0-9A-Z\u00C4\u00D6\u00DC\u00DF]+$/i,"el-GR":/^[0-9\u0391-\u03C9]+$/i,"es-ES":/^[0-9A-Z\u00C1\u00C9\u00CD\u00D1\u00D3\u00DA\u00DC]+$/i,"fi-FI":/^[0-9A-Z\u00C5\u00C4\u00D6]+$/i,"fr-FR":/^[0-9A-Z\u00C0\u00C2\u00C6\u00C7\u00C9\u00C8\u00CA\u00CB\u00CF\u00CE\u00D4\u0152\u00D9\u00DB\u00DC\u0178]+$/i,"it-IT":/^[0-9A-Z\u00C0\u00C9\u00C8\u00CC\u00CE\u00D3\u00D2\u00D9]+$/i,"ja-JP":/^[0-9\uFF10-\uFF19\u3041-\u3093\u30A1-\u30F6\uFF66-\uFF9F\u4E00-\u9FA0\u30FC\u30FB\u3002\u3001]+$/i,"hu-HU":/^[0-9A-Z\u00C1\u00C9\u00CD\u00D3\u00D6\u0150\u00DA\u00DC\u0170]+$/i,"nb-NO":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"nl-NL":/^[0-9A-Z\u00C1\u00C9\u00CB\u00CF\u00D3\u00D6\u00DC\u00DA]+$/i,"nn-NO":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"pl-PL":/^[0-9A-Z\u0104\u0106\u0118\u015A\u0141\u0143\u00D3\u017B\u0179]+$/i,"pt-PT":/^[0-9A-Z\u00C3\u00C1\u00C0\u00C2\u00C4\u00C7\u00C9\u00CA\u00CB\u00CD\u00CF\u00D5\u00D3\u00D4\u00D6\u00DA\u00DC]+$/i,"ru-RU":/^[0-9\u0410-\u042F\u0401]+$/i,"kk-KZ":/^[0-9\u0410-\u042F\u0401\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-Z\u010C\u0106\u0110\u0160\u017D]+$/i,"sk-SK":/^[0-9A-Z\u00C1\u010C\u010E\u00C9\u00CD\u0147\u00D3\u0160\u0164\u00DA\u00DD\u017D\u0139\u0154\u013D\u00C4\u00D4]+$/i,"sr-RS@latin":/^[0-9A-Z\u010C\u0106\u017D\u0160\u0110]+$/i,"sr-RS":/^[0-9\u0410-\u042F\u0402\u0408\u0409\u040A\u040B\u040F]+$/i,"sv-SE":/^[0-9A-Z\u00C5\u00C4\u00D6]+$/i,"th-TH":/^[\u0E01-\u0E59\s]+$/i,"tr-TR":/^[0-9A-Z\u00C7\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"uk-UA":/^[0-9\u0410-\u0429\u042C\u042E\u042F\u0404I\u0407\u0490\u0456]+$/i,"ko-KR":/^[0-9\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]*$/,"ku-IQ":/^[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u06690-9\u0626\u0627\u0628\u067E\u062A\u062C\u0686\u062D\u062E\u062F\u0631\u0695\u0632\u0698\u0633\u0634\u0639\u063A\u0641\u06A4\u0642\u06A9\u06AF\u0644\u06B5\u0645\u0646\u0648\u06C6\u06BE\u06D5\u06CC\u06CE\u064A\u0637\u0624\u062B\u0622\u0625\u0623\u0643\u0636\u0635\u0629\u0638\u0630]+$/i,"vi-VN":/^[0-9A-Z\u00C0\u00C1\u1EA0\u1EA2\u00C3\u00C2\u1EA6\u1EA4\u1EAC\u1EA8\u1EAA\u0102\u1EB0\u1EAE\u1EB6\u1EB2\u1EB4\u0110\u00C8\u00C9\u1EB8\u1EBA\u1EBC\u00CA\u1EC0\u1EBE\u1EC6\u1EC2\u1EC4\u00CC\u00CD\u1ECA\u1EC8\u0128\u00D2\u00D3\u1ECC\u1ECE\u00D5\u00D4\u1ED2\u1ED0\u1ED8\u1ED4\u1ED6\u01A0\u1EDC\u1EDA\u1EE2\u1EDE\u1EE0\u00D9\u00DA\u1EE4\u1EE6\u0168\u01AF\u1EEA\u1EE8\u1EF0\u1EEC\u1EEE\u1EF2\u00DD\u1EF4\u1EF6\u1EF8]+$/i,ar:/^[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u06690-9\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\u0670]+$/,he:/^[0-9\u05D0-\u05EA]+$/,fa:/^['0-9\u0622\u0627\u0621\u0623\u0624\u0626\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u0629\u06CC\u06F1\u06F2\u06F3\u06F4\u06F5\u06F6\u06F7\u06F8\u06F9\u06F0']+$/i,bn:/^['\u0980\u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098A\u098B\u098C\u098F\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099A\u099B\u099C\u099D\u099E\u099F\u09A0\u09A1\u09A2\u09A3\u09A4\u09A5\u09A6\u09A7\u09A8\u09AA\u09AB\u09AC\u09AD\u09AE\u09AF\u09B0\u09B2\u09B6\u09B7\u09B8\u09B9\u09BC\u09BD\u09BE\u09BF\u09C0\u09C1\u09C2\u09C3\u09C4\u09C7\u09C8\u09CB\u09CC\u09CD\u09CE\u09D7\u09DC\u09DD\u09DF\u09E0\u09E1\u09E2\u09E3\u09E6\u09E7\u09E8\u09E9\u09EA\u09EB\u09EC\u09ED\u09EE\u09EF\u09F0\u09F1\u09F2\u09F3\u09F4\u09F5\u09F6\u09F7\u09F8\u09F9\u09FA\u09FB']+$/,eo:/^[0-9ABC\u0108D-G\u011CH\u0124IJ\u0134K-PRS\u015CTU\u016CVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/},r=e.decimal={"en-US":".",ar:"٫"},s=e.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"];for(i=0;i<s.length;i++)n="en-".concat(s[i]),u[n]=u["en-US"],t[n]=t["en-US"],r[n]=r["en-US"];var n,i,l=e.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"];for(a=0;a<l.length;a++)o="ar-".concat(l[a]),u[o]=u.ar,t[o]=t.ar,r[o]=r.ar;var o,a,D=e.farsiLocales=["IR","AF"];for(d=0;d<D.length;d++)h="fa-".concat(D[d]),t[h]=t.fa,r[h]=r.ar;var h,d,F=e.bengaliLocales=["BD","IN"];for(f=0;f<F.length;f++)p="bn-".concat(F[f]),u[p]=u.bn,t[p]=t.bn,r[p]=r["en-US"];var p,f,m=e.dotDecimal=["ar-EG","ar-LB","ar-LY"],B=e.commaDecimal=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","eo","es-ES","fr-CA","fr-FR","id-ID","it-IT","ku-IQ","hi-IN","hu-HU","nb-NO","nn-NO","nl-NL","pl-PL","pt-PT","ru-RU","kk-KZ","si-LK","sl-SI","sr-RS@latin","sr-RS","sv-SE","tr-TR","uk-UA","vi-VN"];for(C=0;C<m.length;C++)r[m[C]]=r["en-US"];var C;for(c=0;c<B.length;c++)r[B[c]]=",";var c;u["fr-CA"]=u["fr-FR"],t["fr-CA"]=t["fr-FR"],u["pt-BR"]=u["pt-PT"],t["pt-BR"]=t["pt-PT"],r["pt-BR"]=r["pt-PT"],u["pl-Pl"]=u["pl-PL"],t["pl-Pl"]=t["pl-PL"],r["pl-Pl"]=r["pl-PL"],u["fa-AF"]=u.fa}),h5=te((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s,e.locales=void 0;var u=r(dt()),t=Ba();function r(i){return i&&i.__esModule?i:{default:i}}function s(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};u.default(i);var a=i,D=o.ignore;if(D)if(D instanceof RegExp)a=a.replace(D,"");else if(typeof D==="string")a=a.replace(new RegExp("[".concat(D.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(l in t.alpha)return t.alpha[l].test(a);throw new Error("Invalid locale '".concat(l,"'"))}var n=e.locales=Object.keys(t.alpha)}),l5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=D;var t=s(dt()),r=s(Mr());function s(h){return h&&h.__esModule?h:{default:h}}var n=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,i=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,l=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,o=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,a={checkDMS:!1};function D(h,d){if(t.default(h),d=r.default(d,a),!h.includes(","))return!1;var F=h.split(",");if(F[0].startsWith("(")&&!F[1].endsWith(")")||F[1].endsWith(")")&&!F[0].startsWith("("))return!1;if(d.checkDMS)return l.test(F[0])&&o.test(F[1]);return n.test(F[0])&&i.test(F[1])}u.exports=e.default,u.exports.default=e.default}),o5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=function s(n,i){return n.some(function(l){return i===l})},r=e.default=t;u.exports=e.default,u.exports.default=e.default}),c5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=D;var t=i(Mr()),r=i(dt()),s=i(o5()),n=Ba();function i(h){return h&&h.__esModule?h:{default:h}}function l(h){var d=new RegExp("^[-+]?([0-9]+)?(\\".concat(n.decimal[h.locale],"[0-9]{").concat(h.decimal_digits,"})").concat(h.force_decimal?"":"?","$"));return d}var o={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},a=["","-","+"];function D(h,d){if(r.default(h),d=t.default(d,o),d.locale in n.decimal)return!s.default(a,h.replace(/ /g,""))&&l(d).test(h);throw new Error("Invalid locale '".concat(d.locale,"'"))}u.exports=e.default,u.exports.default=e.default}),D5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(dt());function r(i){return i&&i.__esModule?i:{default:i}}var s=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;function n(i){return t.default(i),s.test(i)}u.exports=e.default,u.exports.default=e.default}),f5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var t=r(dt());function r(n){return n&&n.__esModule?n:{default:n}}function s(n){t.default(n);var i=n.replace(/[- ]+/g,""),l=0,o,a,D;for(var h=i.length-1;h>=0;h--){if(o=i.substring(h,h+1),a=parseInt(o,10),D)if(a*=2,a>=10)l+=a%10+1;else l+=a;else l+=a;D=!D}return!!(l%10===0?i:!1)}u.exports=e.default,u.exports.default=e.default}),d5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var t=s(dt()),r=s(f5());function s(o){return o&&o.__esModule?o:{default:o}}var n={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},i=function(){var o=[];for(var a in n)if(n.hasOwnProperty(a))o.push(n[a]);return o}();function l(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};t.default(o);var D=a.provider,h=o.replace(/[- ]+/g,"");if(D&&D.toLowerCase()in n){if(!n[D.toLowerCase()].test(h))return!1}else if(D&&!(D.toLowerCase()in n))throw new Error("".concat(D," is not a valid credit card provider."));else if(!i.some(function(d){return d.test(h)}))return!1;return r.default(o)}u.exports=e.default,u.exports.default=e.default}),E5=te((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s,e.locales=void 0;var u=r(dt()),t=Ba();function r(i){return i&&i.__esModule?i:{default:i}}function s(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};u.default(i);var a=i,D=o.ignore;if(D)if(D instanceof RegExp)a=a.replace(D,"");else if(typeof D==="string")a=a.replace(new RegExp("[".concat(D.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(l in t.alphanumeric)return t.alphanumeric[l].test(a);throw new Error("Invalid locale '".concat(l,"'"))}var n=e.locales=Object.keys(t.alphanumeric)}),C5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(dt());function r(i){return i&&i.__esModule?i:{default:i}}var s={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$/,ZA:/^[TAMD]\d{8}$/};function n(i,l){t.default(i);var o=i.replace(/\s/g,"").toUpperCase();return l.toUpperCase()in s&&s[l].test(o)}u.exports=e.default,u.exports.default=e.default}),l2=te((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a,e.locales=void 0;var u=t(dt());function t(D){return D&&D.__esModule?D:{default:D}}var r=/^\d{3}$/,s=/^\d{4}$/,n=/^\d{5}$/,i=/^\d{6}$/,l={AD:/^AD\d{3}$/,AT:s,AU:s,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:s,BG:s,BR:/^\d{5}-\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:s,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CZ:/^\d{3}\s?\d{2}$/,DE:n,DK:s,DO:n,DZ:n,EE:n,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:n,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:s,ID:n,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:r,IT:n,JP:/^\d{3}\-\d{4}$/,KE:n,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:s,LV:/^LV\-\d{4}$/,LK:n,MG:r,MX:n,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:n,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:s,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:s,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:i,RU:i,SA:n,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:i,SI:s,SK:/^\d{3}\s?\d{2}$/,TH:n,TN:s,TW:/^\d{3}(\d{2})?$/,UA:n,US:/^\d{5}(-\d{4})?$/,ZA:s,ZM:n},o=e.locales=Object.keys(l);function a(D,h){if(u.default(D),h in l)return l[h].test(D);else if(h==="any"){for(var d in l)if(l.hasOwnProperty(d)){var F=l[d];if(F.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(h,"'"))}}),o2=te((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s,e.locales=void 0;var u=t(dt());function t(i){return i&&i.__esModule?i:{default:i}}var r={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?(9[1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|6)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+244)\d{9}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[789]\d{6}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/};r["en-CA"]=r["en-US"],r["fr-CA"]=r["en-CA"],r["fr-BE"]=r["nl-BE"],r["zh-HK"]=r["en-HK"],r["zh-MO"]=r["en-MO"],r["ga-IE"]=r["en-IE"],r["fr-CH"]=r["de-CH"],r["it-CH"]=r["fr-CH"];function s(i,l,o){if(u.default(i),o&&o.strictMode&&!i.startsWith("+"))return!1;if(Array.isArray(l))return l.some(function(h){if(r.hasOwnProperty(h)){var d=r[h];if(d.test(i))return!0}return!1});else if(l in r)return r[l].test(i);else if(!l||l==="any"){for(var a in r)if(r.hasOwnProperty(a)){var D=r[a];if(D.test(i))return!0}return!1}throw new Error("Invalid locale '".concat(l,"'"))}var n=e.locales=Object.keys(r)}),c2=te((e,u)=>{(function(t,r){typeof e=="object"&&typeof u!="undefined"?u.exports=r():typeof define=="function"&&define.amd?define(r):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs=r()})(e,function(){var t=1000,r=60000,s=3600000,n="millisecond",i="second",l="minute",o="hour",a="day",D="week",h="month",d="quarter",F="year",p="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,B=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var $=["th","st","nd","rd"],P=N%100;return"["+N+($[(P-20)%10]||$[P]||$[0])+"]"}},c=function(N,$,P){var V=String(N);return!V||V.length>=$?N:""+Array($+1-V.length).join(P)+N},y={s:c,z:function(N){var $=-N.utcOffset(),P=Math.abs($),V=Math.floor(P/60),k=P%60;return($<=0?"+":"-")+c(V,2,"0")+":"+c(k,2,"0")},m:function N($,P){if($.date()<P.date())return-N(P,$);var V=12*(P.year()-$.year())+(P.month()-$.month()),k=$.clone().add(V,h),W=P-k<0,Q=$.clone().add(V+(W?-1:1),h);return+(-(V+(P-k)/(W?k-Q:Q-k))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:h,y:F,w:D,d:a,D:p,h:o,m:l,s:i,ms:n,Q:d}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},A="en",T={};T[A]=C;var I="$isDayjsObject",v=function(N){return N instanceof _||!(!N||!N[I])},g=function N($,P,V){var k;if(!$)return A;if(typeof $=="string"){var W=$.toLowerCase();T[W]&&(k=W),P&&(T[W]=P,k=W);var Q=$.split("-");if(!k&&Q.length>1)return N(Q[0])}else{var z=$.name;T[z]=$,k=z}return!V&&k&&(A=k),k||!V&&A},E=function(N,$){if(v(N))return N.clone();var P=typeof $=="object"?$:{};return P.date=N,P.args=arguments,new _(P)},S=y;S.l=g,S.i=v,S.w=function(N,$){return E(N,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var _=function(){function N(P){this.$L=g(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[I]=!0}var $=N.prototype;return $.parse=function(P){this.$d=function(V){var{date:k,utc:W}=V;if(k===null)return new Date(NaN);if(S.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var Q=k.match(m);if(Q){var z=Q[2]-1||0,x=(Q[7]||"0").substring(0,3);return W?new Date(Date.UTC(Q[1],z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,x)):new Date(Q[1],z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,x)}}return new Date(k)}(P),this.init()},$.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},$.$utils=function(){return S},$.isValid=function(){return this.$d.toString()!==f},$.isSame=function(P,V){var k=E(P);return this.startOf(V)<=k&&k<=this.endOf(V)},$.isAfter=function(P,V){return E(P)<this.startOf(V)},$.isBefore=function(P,V){return this.endOf(V)<E(P)},$.$g=function(P,V,k){return S.u(P)?this[V]:this.set(k,P)},$.unix=function(){return Math.floor(this.valueOf()/1000)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(P,V){var k=this,W=!!S.u(V)||V,Q=S.p(P),z=function(Ie,ce){var w=S.w(k.$u?Date.UTC(k.$y,ce,Ie):new Date(k.$y,ce,Ie),k);return W?w:w.endOf(a)},x=function(Ie,ce){return S.w(k.toDate()[Ie].apply(k.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(ce)),k)},ne=this.$W,Ee=this.$M,Fe=this.$D,J="set"+(this.$u?"UTC":"");switch(Q){case F:return W?z(1,0):z(31,11);case h:return W?z(1,Ee):z(0,Ee+1);case D:var ye=this.$locale().weekStart||0,se=(ne<ye?ne+7:ne)-ye;return z(W?Fe-se:Fe+(6-se),Ee);case a:case p:return x(J+"Hours",0);case o:return x(J+"Minutes",1);case l:return x(J+"Seconds",2);case i:return x(J+"Milliseconds",3);default:return this.clone()}},$.endOf=function(P){return this.startOf(P,!1)},$.$set=function(P,V){var k,W=S.p(P),Q="set"+(this.$u?"UTC":""),z=(k={},k[a]=Q+"Date",k[p]=Q+"Date",k[h]=Q+"Month",k[F]=Q+"FullYear",k[o]=Q+"Hours",k[l]=Q+"Minutes",k[i]=Q+"Seconds",k[n]=Q+"Milliseconds",k)[W],x=W===a?this.$D+(V-this.$W):V;if(W===h||W===F){var ne=this.clone().set(p,1);ne.$d[z](x),ne.init(),this.$d=ne.set(p,Math.min(this.$D,ne.daysInMonth())).$d}else z&&this.$d[z](x);return this.init(),this},$.set=function(P,V){return this.clone().$set(P,V)},$.get=function(P){return this[S.p(P)]()},$.add=function(P,V){var k,W=this;P=Number(P);var Q=S.p(V),z=function(Ee){var Fe=E(W);return S.w(Fe.date(Fe.date()+Math.round(Ee*P)),W)};if(Q===h)return this.set(h,this.$M+P);if(Q===F)return this.set(F,this.$y+P);if(Q===a)return z(1);if(Q===D)return z(7);var x=(k={},k[l]=r,k[o]=s,k[i]=t,k)[Q]||1,ne=this.$d.getTime()+P*x;return S.w(ne,this)},$.subtract=function(P,V){return this.add(-1*P,V)},$.format=function(P){var V=this,k=this.$locale();if(!this.isValid())return k.invalidDate||f;var W=P||"YYYY-MM-DDTHH:mm:ssZ",Q=S.z(this),z=this.$H,x=this.$m,ne=this.$M,Ee=k.weekdays,Fe=k.months,J=k.meridiem,ye=function(ce,w,M,L){return ce&&(ce[w]||ce(V,W))||M[w].slice(0,L)},se=function(ce){return S.s(z%12||12,ce,"0")},Ie=J||function(ce,w,M){var L=ce<12?"AM":"PM";return M?L.toLowerCase():L};return W.replace(B,function(ce,w){return w||function(M){switch(M){case"YY":return String(V.$y).slice(-2);case"YYYY":return S.s(V.$y,4,"0");case"M":return ne+1;case"MM":return S.s(ne+1,2,"0");case"MMM":return ye(k.monthsShort,ne,Fe,3);case"MMMM":return ye(Fe,ne);case"D":return V.$D;case"DD":return S.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return ye(k.weekdaysMin,V.$W,Ee,2);case"ddd":return ye(k.weekdaysShort,V.$W,Ee,3);case"dddd":return Ee[V.$W];case"H":return String(z);case"HH":return S.s(z,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return Ie(z,x,!0);case"A":return Ie(z,x,!1);case"m":return String(x);case"mm":return S.s(x,2,"0");case"s":return String(V.$s);case"ss":return S.s(V.$s,2,"0");case"SSS":return S.s(V.$ms,3,"0");case"Z":return Q}return null}(ce)||Q.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(P,V,k){var W,Q=this,z=S.p(V),x=E(P),ne=(x.utcOffset()-this.utcOffset())*r,Ee=this-x,Fe=function(){return S.m(Q,x)};switch(z){case F:W=Fe()/12;break;case h:W=Fe();break;case d:W=Fe()/3;break;case D:W=(Ee-ne)/604800000;break;case a:W=(Ee-ne)/86400000;break;case o:W=Ee/s;break;case l:W=Ee/r;break;case i:W=Ee/t;break;default:W=Ee}return k?W:S.a(W)},$.daysInMonth=function(){return this.endOf(h).$D},$.$locale=function(){return T[this.$L]},$.locale=function(P,V){if(!P)return this.$L;var k=this.clone(),W=g(P,V,!0);return W&&(k.$L=W),k},$.clone=function(){return S.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},N}(),K=_.prototype;return E.prototype=K,[["$ms",n],["$s",i],["$m",l],["$H",o],["$W",a],["$M",h],["$y",F],["$D",p]].forEach(function(N){K[N[1]]=function($){return this.$g($,N[0],N[1])}}),E.extend=function(N,$){return N.$i||(N($,_,E),N.$i=!0),E},E.locale=g,E.isDayjs=v,E.unix=function(N){return E(1000*N)},E.en=T[A],E.Ls=T,E.p={},E})}),p5=te((e,u)=>{(function(t,r){typeof e=="object"&&typeof u!="undefined"?u.exports=r():typeof define=="function"&&define.amd?define(r):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs_plugin_isSameOrAfter=r()})(e,function(){return function(t,r){r.prototype.isSameOrAfter=function(s,n){return this.isSame(s,n)||this.isAfter(s,n)}}})}),g5=te((e,u)=>{(function(t,r){typeof e=="object"&&typeof u!="undefined"?u.exports=r():typeof define=="function"&&define.amd?define(r):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs_plugin_isSameOrBefore=r()})(e,function(){return function(t,r){r.prototype.isSameOrBefore=function(s,n){return this.isSame(s,n)||this.isBefore(s,n)}}})}),m5=te((e,u)=>{(function(t,r){typeof e=="object"&&typeof u!="undefined"?u.exports=r():typeof define=="function"&&define.amd?define(r):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs_plugin_customParseFormat=r()})(e,function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,n=/\d\d/,i=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,o={},a=function(m){return(m=+m)+(m>68?1900:2000)},D=function(m){return function(B){this[m]=+B}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(B){if(!B)return 0;if(B==="Z")return 0;var C=B.match(/([+-]|\d\d)/g),c=60*C[1]+(+C[2]||0);return c===0?0:C[0]==="+"?-c:c}(m)}],d=function(m){var B=o[m];return B&&(B.indexOf?B:B.s.concat(B.f))},F=function(m,B){var C,c=o.meridiem;if(c){for(var y=1;y<=24;y+=1)if(m.indexOf(c(y,0,B))>-1){C=y>12;break}}else C=m===(B?"pm":"PM");return C},p={A:[l,function(m){this.afternoon=F(m,!1)}],a:[l,function(m){this.afternoon=F(m,!0)}],Q:[s,function(m){this.month=3*(m-1)+1}],S:[s,function(m){this.milliseconds=100*+m}],SS:[n,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[i,D("seconds")],ss:[i,D("seconds")],m:[i,D("minutes")],mm:[i,D("minutes")],H:[i,D("hours")],h:[i,D("hours")],HH:[i,D("hours")],hh:[i,D("hours")],D:[i,D("day")],DD:[n,D("day")],Do:[l,function(m){var B=o.ordinal,C=m.match(/\d+/);if(this.day=C[0],B)for(var c=1;c<=31;c+=1)B(c).replace(/\[|\]/g,"")===m&&(this.day=c)}],w:[i,D("week")],ww:[n,D("week")],M:[i,D("month")],MM:[n,D("month")],MMM:[l,function(m){var B=d("months"),C=(d("monthsShort")||B.map(function(c){return c.slice(0,3)})).indexOf(m)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[l,function(m){var B=d("months").indexOf(m)+1;if(B<1)throw new Error;this.month=B%12||B}],Y:[/[+-]?\d+/,D("year")],YY:[n,function(m){this.year=a(m)}],YYYY:[/\d{4}/,D("year")],Z:h,ZZ:h};function f(m){var B,C;B=m,C=o&&o.formats;for(var c=(m=B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(E,S,_){var K=_&&_.toUpperCase();return S||C[_]||t[_]||C[K].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(N,$,P){return $||P.slice(1)})})).match(r),y=c.length,A=0;A<y;A+=1){var T=c[A],I=p[T],v=I&&I[0],g=I&&I[1];c[A]=g?{regex:v,parser:g}:T.replace(/^\[|\]$/g,"")}return function(E){for(var S={},_=0,K=0;_<y;_+=1){var N=c[_];if(typeof N=="string")K+=N.length;else{var{regex:$,parser:P}=N,V=E.slice(K),k=$.exec(V)[0];P.call(S,k),E=E.replace(k,"")}}return function(W){var Q=W.afternoon;if(Q!==void 0){var z=W.hours;Q?z<12&&(W.hours+=12):z===12&&(W.hours=0),delete W.afternoon}}(S),S}}return function(m,B,C){C.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(a=m.parseTwoDigitYear);var c=B.prototype,y=c.parse;c.parse=function(A){var{date:T,utc:I,args:v}=A;this.$u=I;var g=v[1];if(typeof g=="string"){var E=v[2]===!0,S=v[3]===!0,_=E||S,K=v[2];S&&(K=v[2]),o=this.$locale(),!E&&K&&(o=C.Ls[K]),this.$d=function(V,k,W,Q){try{if(["x","X"].indexOf(k)>-1)return new Date((k==="X"?1000:1)*V);var z=f(k)(V),x=z.year,ne=z.month,Ee=z.day,Fe=z.hours,J=z.minutes,ye=z.seconds,se=z.milliseconds,Ie=z.zone,ce=z.week,w=new Date,M=Ee||(x||ne?1:w.getDate()),L=x||w.getFullYear(),b=0;x&&!ne||(b=ne>0?ne-1:w.getMonth());var O,H=Fe||0,j=J||0,Z=ye||0,he=se||0;return Ie?new Date(Date.UTC(L,b,M,H,j,Z,he+60*Ie.offset*1000)):W?new Date(Date.UTC(L,b,M,H,j,Z,he)):(O=new Date(L,b,M,H,j,Z,he),ce&&(O=Q(O).week(ce).toDate()),O)}catch(ge){return new Date("")}}(T,g,I,C),this.init(),K&&K!==!0&&(this.$L=this.locale(K).$L),_&&T!=this.format(g)&&(this.$d=new Date("")),o={}}else if(g instanceof Array)for(var N=g.length,$=1;$<=N;$+=1){v[1]=g[$-1];var P=C.apply(this,v);if(P.isValid()){this.$d=P.$d,this.$L=P.$L,this.init();break}$===N&&(this.$d=new Date(""))}else y.call(this,A)}}})}),y5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var t=r(dt());function r(n){return n&&n.__esModule?n:{default:n}}function s(n){return t.default(n),n.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")}u.exports=e.default,u.exports.default=e.default}),F5=te((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=D;var t=r(Mr());function r(h){return h&&h.__esModule?h:{default:h}}var s={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},n=["icloud.com","me.com"],i=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],l=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],o=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function a(h){if(h.length>1)return h;return""}function D(h,d){d=t.default(d,s);var F=h.split("@"),p=F.pop(),f=F.join("@"),m=[f,p];if(m[1]=m[1].toLowerCase(),m[1]==="gmail.com"||m[1]==="googlemail.com"){if(d.gmail_remove_subaddress)m[0]=m[0].split("+")[0];if(d.gmail_remove_dots)m[0]=m[0].replace(/\.+/g,a);if(!m[0].length)return!1;if(d.all_lowercase||d.gmail_lowercase)m[0]=m[0].toLowerCase();m[1]=d.gmail_convert_googlemaildotcom?"gmail.com":m[1]}else if(n.indexOf(m[1])>=0){if(d.icloud_remove_subaddress)m[0]=m[0].split("+")[0];if(!m[0].length)return!1;if(d.all_lowercase||d.icloud_lowercase)m[0]=m[0].toLowerCase()}else if(i.indexOf(m[1])>=0){if(d.outlookdotcom_remove_subaddress)m[0]=m[0].split("+")[0];if(!m[0].length)return!1;if(d.all_lowercase||d.outlookdotcom_lowercase)m[0]=m[0].toLowerCase()}else if(l.indexOf(m[1])>=0){if(d.yahoo_remove_subaddress){var B=m[0].split("-");m[0]=B.length>1?B.slice(0,-1).join("-"):B[0]}if(!m[0].length)return!1;if(d.all_lowercase||d.yahoo_lowercase)m[0]=m[0].toLowerCase()}else if(o.indexOf(m[1])>=0){if(d.all_lowercase||d.yandex_lowercase)m[0]=m[0].toLowerCase();m[1]="yandex.ru"}else if(d.all_lowercase)m[0]=m[0].toLowerCase();return m.join("@")}u.exports=e.default,u.exports.default=e.default}),Et=te((e,u)=>{var{FORCE_COLOR:t,NODE_DISABLE_COLORS:r,TERM:s}=process.env,n={enabled:!r&&s!=="dumb"&&t!=="0",reset:o(0,0),bold:o(1,22),dim:o(2,22),italic:o(3,23),underline:o(4,24),inverse:o(7,27),hidden:o(8,28),strikethrough:o(9,29),black:o(30,39),red:o(31,39),green:o(32,39),yellow:o(33,39),blue:o(34,39),magenta:o(35,39),cyan:o(36,39),white:o(37,39),gray:o(90,39),grey:o(90,39),bgBlack:o(40,49),bgRed:o(41,49),bgGreen:o(42,49),bgYellow:o(43,49),bgBlue:o(44,49),bgMagenta:o(45,49),bgCyan:o(46,49),bgWhite:o(47,49)};function i(a,D){let h=0,d,F="",p="";for(;h<a.length;h++)if(d=a[h],F+=d.open,p+=d.close,D.includes(d.close))D=D.replace(d.rgx,d.close+d.open);return F+D+p}function l(a,D){let h={has:a,keys:D};return h.reset=n.reset.bind(h),h.bold=n.bold.bind(h),h.dim=n.dim.bind(h),h.italic=n.italic.bind(h),h.underline=n.underline.bind(h),h.inverse=n.inverse.bind(h),h.hidden=n.hidden.bind(h),h.strikethrough=n.strikethrough.bind(h),h.black=n.black.bind(h),h.red=n.red.bind(h),h.green=n.green.bind(h),h.yellow=n.yellow.bind(h),h.blue=n.blue.bind(h),h.magenta=n.magenta.bind(h),h.cyan=n.cyan.bind(h),h.white=n.white.bind(h),h.gray=n.gray.bind(h),h.grey=n.grey.bind(h),h.bgBlack=n.bgBlack.bind(h),h.bgRed=n.bgRed.bind(h),h.bgGreen=n.bgGreen.bind(h),h.bgYellow=n.bgYellow.bind(h),h.bgBlue=n.bgBlue.bind(h),h.bgMagenta=n.bgMagenta.bind(h),h.bgCyan=n.bgCyan.bind(h),h.bgWhite=n.bgWhite.bind(h),h}function o(a,D){let h={open:`\x1B[${a}m`,close:`\x1B[${D}m`,rgx:new RegExp(`\\x1b\\[${D}m`,"g")};return function(d){if(this!==void 0&&this.has!==void 0)return this.has.includes(a)||(this.has.push(a),this.keys.push(h)),d===void 0?this:n.enabled?i(this.keys,d+""):d+"";return d===void 0?l([a],[h]):n.enabled?i([h],d+""):d+""}}u.exports=n}),A5=te((e,u)=>{u.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return!1}}),ba=te((e,u)=>{u.exports=(t)=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),s=new RegExp(r,"g");return typeof t==="string"?t.replace(s,""):t}}),Ct=te((e,u)=>{var t="\x1B",r=`${t}[`,s="\x07",n={to(o,a){if(!a)return`${r}${o+1}G`;return`${r}${a+1};${o+1}H`},move(o,a){let D="";if(o<0)D+=`${r}${-o}D`;else if(o>0)D+=`${r}${o}C`;if(a<0)D+=`${r}${-a}A`;else if(a>0)D+=`${r}${a}B`;return D},up:(o=1)=>`${r}${o}A`,down:(o=1)=>`${r}${o}B`,forward:(o=1)=>`${r}${o}C`,backward:(o=1)=>`${r}${o}D`,nextLine:(o=1)=>`${r}E`.repeat(o),prevLine:(o=1)=>`${r}F`.repeat(o),left:`${r}G`,hide:`${r}?25l`,show:`${r}?25h`,save:`${t}7`,restore:`${t}8`},i={up:(o=1)=>`${r}S`.repeat(o),down:(o=1)=>`${r}T`.repeat(o)},l={screen:`${r}2J`,up:(o=1)=>`${r}1J`.repeat(o),down:(o=1)=>`${r}J`.repeat(o),line:`${r}2K`,lineEnd:`${r}K`,lineStart:`${r}1K`,lines(o){let a="";for(let D=0;D<o;D++)a+=this.line+(D<o-1?n.up():"");if(o)a+=n.left;return a}};u.exports={cursor:n,scroll:i,erase:l,beep:s}}),v5=te((e,u)=>{function t(D,h){var d=typeof Symbol!=="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(!d){if(Array.isArray(D)||(d=r(D))||h&&D&&typeof D.length==="number"){if(d)D=d;var F=0,p=function C(){};return{s:p,n:function C(){if(F>=D.length)return{done:!0};return{done:!1,value:D[F++]}},e:function C(c){throw c},f:p}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
69
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f=!0,m=!1,B;return{s:function C(){d=d.call(D)},n:function C(){var c=d.next();return f=c.done,c},e:function C(c){m=!0,B=c},f:function C(){try{if(!f&&d.return!=null)d.return()}finally{if(m)throw B}}}}function r(D,h){if(!D)return;if(typeof D==="string")return s(D,h);var d=Object.prototype.toString.call(D).slice(8,-1);if(d==="Object"&&D.constructor)d=D.constructor.name;if(d==="Map"||d==="Set")return Array.from(D);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return s(D,h)}function s(D,h){if(h==null||h>D.length)h=D.length;for(var d=0,F=new Array(h);d<h;d++)F[d]=D[d];return F}var n=ba(),i=Ct(),l=i.erase,o=i.cursor,a=(D)=>[...n(D)].length;u.exports=function(D,h){if(!h)return l.line+o.to(0);let d=0,F=D.split(/\r?\n/);var p=t(F),f;try{for(p.s();!(f=p.n()).done;){let m=f.value;d+=1+Math.floor(Math.max(a(m)-1,0)/h)}}catch(m){p.e(m)}finally{p.f()}return l.lines(d)}}),D2=te((e,u)=>{var t={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"},s=process.platform==="win32"?r:t;u.exports=s}),B5=te((e,u)=>{var t=Et(),r=D2(),s=Object.freeze({password:{scale:1,render:(D)=>"*".repeat(D.length)},emoji:{scale:2,render:(D)=>"\uD83D\uDE03".repeat(D.length)},invisible:{scale:0,render:(D)=>""},default:{scale:1,render:(D)=>`${D}`}}),n=(D)=>s[D]||s.default,i=Object.freeze({aborted:t.red(r.cross),done:t.green(r.tick),exited:t.yellow(r.cross),default:t.cyan("?")}),l=(D,h,d)=>h?i.aborted:d?i.exited:D?i.done:i.default,o=(D)=>t.gray(D?r.ellipsis:r.pointerSmall),a=(D,h)=>t.gray(D?h?r.pointerSmall:"+":r.line);u.exports={styles:s,render:n,symbols:i,symbol:l,delimiter:o,item:a}}),b5=te((e,u)=>{var t=ba();u.exports=function(r,s){let n=String(t(r)||"").split(/\r?\n/);if(!s)return n.length;return n.map((i)=>Math.ceil(i.length/s)).reduce((i,l)=>i+l)}}),S5=te((e,u)=>{u.exports=(t,r={})=>{let s=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"",n=r.width;return(t||"").split(/\r?\n/g).map((i)=>i.split(/\s+/g).reduce((l,o)=>{if(o.length+s.length>=n||l[l.length-1].length+o.length+1<n)l[l.length-1]+=` ${o}`;else l.push(`${s}${o}`);return l},[s]).join(`
|
|
70
|
-
`)).join(`
|
|
71
|
-
`)}}),T5=te((e,u)=>{u.exports=(t,r,s)=>{s=s||r;let n=Math.min(r-s,t-Math.floor(s/2));if(n<0)n=0;let i=Math.min(n+s,r);return{startIndex:n,endIndex:i}}}),Pu=te((e,u)=>{u.exports={action:A5(),clear:v5(),style:B5(),strip:ba(),figures:D2(),lines:b5(),wrap:S5(),entriesToDisplay:T5()}}),gr=te((e,u)=>{var t=import.meta.require("readline"),r=Pu(),s=r.action,n=import.meta.require("events"),i=Ct(),l=i.beep,o=i.cursor,a=Et();class D extends n{constructor(h={}){super();this.firstRender=!0,this.in=h.stdin||process.stdin,this.out=h.stdout||process.stdout,this.onRender=(h.onRender||(()=>{return})).bind(this);let d=t.createInterface({input:this.in,escapeCodeTimeout:50});if(t.emitKeypressEvents(this.in,d),this.in.isTTY)this.in.setRawMode(!0);let F=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,p=(f,m)=>{let B=s(m,F);if(B===!1)this._&&this._(f,m);else if(typeof this[B]==="function")this[B](m);else this.bell()};this.close=()=>{if(this.out.write(o.show),this.in.removeListener("keypress",p),this.in.isTTY)this.in.setRawMode(!1);d.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",p)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(l)}render(){if(this.onRender(a),this.firstRender)this.firstRender=!1}}u.exports=D}),w5=te((e,u)=>{function t(f,m,B,C,c,y,A){try{var T=f[y](A),I=T.value}catch(v){B(v);return}if(T.done)m(I);else Promise.resolve(I).then(C,c)}function r(f){return function(){var m=this,B=arguments;return new Promise(function(C,c){var y=f.apply(m,B);function A(I){t(y,C,c,A,T,"next",I)}function T(I){t(y,C,c,A,T,"throw",I)}A(void 0)})}}var s=Et(),n=gr(),i=Ct(),l=i.erase,o=i.cursor,a=Pu(),D=a.style,h=a.clear,d=a.lines,F=a.figures;class p extends n{constructor(f={}){super(f);this.transform=D.render(f.style),this.scale=this.transform.scale,this.msg=f.message,this.initial=f.initial||"",this.validator=f.validate||(()=>!0),this.value="",this.errorMsg=f.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=h("",this.out.columns),this.render()}set value(f){if(!f&&this.initial)this.placeholder=!0,this.rendered=s.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(f);this._value=f,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
|
|
72
|
-
`),this.close()}validate(){var f=this;return r(function*(){let m=yield f.validator(f.value);if(typeof m==="string")f.errorMsg=m,m=!1;f.error=!m})()}submit(){var f=this;return r(function*(){if(f.value=f.value||f.initial,f.cursorOffset=0,f.cursor=f.rendered.length,yield f.validate(),f.error){f.red=!0,f.fire(),f.render();return}f.done=!0,f.aborted=!1,f.fire(),f.render(),f.out.write(`
|
|
73
|
-
`),f.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(f){if(this.placeholder)return;this.cursor=this.cursor+f,this.cursorOffset+=f}_(f,m){let B=this.value.slice(0,this.cursor),C=this.value.slice(this.cursor);this.value=`${B}${f}${C}`,this.red=!1,this.cursor=this.placeholder?0:B.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let f=this.value.slice(0,this.cursor-1),m=this.value.slice(this.cursor);if(this.value=`${f}${m}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let f=this.value.slice(0,this.cursor),m=this.value.slice(this.cursor+1);if(this.value=`${f}${m}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else this.cursorOffset++;this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(o.down(d(this.outputError,this.out.columns)-1)+h(this.outputError,this.out.columns));this.out.write(h(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[D.symbol(this.done,this.aborted),s.bold(this.msg),D.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split(`
|
|
74
|
-
`).reduce((f,m,B)=>f+`
|
|
75
|
-
${B?" ":F.pointerSmall} ${s.red().italic(m)}`,"");this.out.write(l.line+o.to(0)+this.outputText+o.save+this.outputError+o.restore+o.move(this.cursorOffset,0))}}u.exports=p}),I5=te((e,u)=>{var t=Et(),r=gr(),s=Pu(),n=s.style,i=s.clear,l=s.figures,o=s.wrap,a=s.entriesToDisplay,D=Ct(),h=D.cursor;class d extends r{constructor(F={}){super(F);this.msg=F.message,this.hint=F.hint||"- Use arrow-keys. Return to submit.",this.warn=F.warn||"- This option is disabled",this.cursor=F.initial||0,this.choices=F.choices.map((p,f)=>{if(typeof p==="string")p={title:p,value:f};return{title:p&&(p.title||p.value||p),value:p&&(p.value===void 0?f:p.value),description:p&&p.description,selected:p&&p.selected,disabled:p&&p.disabled}}),this.optionsPerPage=F.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=i("",this.out.columns),this.render()}moveCursor(F){this.cursor=F,this.value=this.choices[F].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
76
|
-
`),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
77
|
-
`),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(F,p){if(F===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(i(this.outputText,this.out.columns));super.render();let F=a(this.cursor,this.choices.length,this.optionsPerPage),p=F.startIndex,f=F.endIndex;if(this.outputText=[n.symbol(this.done,this.aborted),t.bold(this.msg),n.delimiter(!1),this.done?this.selection.title:this.selection.disabled?t.yellow(this.warn):t.gray(this.hint)].join(" "),!this.done){this.outputText+=`
|
|
78
|
-
`;for(let m=p;m<f;m++){let B,C,c="",y=this.choices[m];if(m===p&&p>0)C=l.arrowUp;else if(m===f-1&&f<this.choices.length)C=l.arrowDown;else C=" ";if(y.disabled)B=this.cursor===m?t.gray().underline(y.title):t.strikethrough().gray(y.title),C=(this.cursor===m?t.bold().gray(l.pointer)+" ":" ")+C;else if(B=this.cursor===m?t.cyan().underline(y.title):y.title,C=(this.cursor===m?t.cyan(l.pointer)+" ":" ")+C,y.description&&this.cursor===m){if(c=` - ${y.description}`,C.length+B.length+c.length>=this.out.columns||y.description.split(/\r?\n/).length>1)c=`
|
|
79
|
-
`+o(y.description,{margin:3,width:this.out.columns})}this.outputText+=`${C} ${B}${t.gray(c)}
|
|
80
|
-
`}}this.out.write(this.outputText)}}u.exports=d}),N5=te((e,u)=>{var t=Et(),r=gr(),s=Pu(),n=s.style,i=s.clear,l=Ct(),o=l.cursor,a=l.erase;class D extends r{constructor(h={}){super(h);this.msg=h.message,this.value=!!h.initial,this.active=h.active||"on",this.inactive=h.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
81
|
-
`),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
82
|
-
`),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(h,d){if(h===" ")this.value=!this.value;else if(h==="1")this.value=!0;else if(h==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(o.hide);else this.out.write(i(this.outputText,this.out.columns));super.render(),this.outputText=[n.symbol(this.done,this.aborted),t.bold(this.msg),n.delimiter(this.done),this.value?this.inactive:t.cyan().underline(this.inactive),t.gray("/"),this.value?t.cyan().underline(this.active):this.active].join(" "),this.out.write(a.line+o.to(0)+this.outputText)}}u.exports=D}),tr=te((e,u)=>{class t{constructor({token:r,date:s,parts:n,locales:i}){this.token=r,this.date=s||new Date,this.parts=n||[this],this.locales=i||{}}up(){}down(){}next(){let r=this.parts.indexOf(this);return this.parts.find((s,n)=>n>r&&s instanceof t)}setTo(r){}prev(){let r=[].concat(this.parts).reverse(),s=r.indexOf(this);return r.find((n,i)=>i>s&&n instanceof t)}toString(){return String(this.date)}}u.exports=t}),_5=te((e,u)=>{var t=tr();class r extends t{constructor(s={}){super(s)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let s=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?s.toUpperCase():s}}u.exports=r}),$5=te((e,u)=>{var t=tr(),r=(n)=>{return n=n%10,n===1?"st":n===2?"nd":n===3?"rd":"th"};class s extends t{constructor(n={}){super(n)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(n){this.date.setDate(parseInt(n.substr(-2)))}toString(){let n=this.date.getDate(),i=this.date.getDay();return this.token==="DD"?String(n).padStart(2,"0"):this.token==="Do"?n+r(n):this.token==="d"?i+1:this.token==="ddd"?this.locales.weekdaysShort[i]:this.token==="dddd"?this.locales.weekdays[i]:n}}u.exports=s}),R5=te((e,u)=>{var t=tr();class r extends t{constructor(s={}){super(s)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(s){this.date.setHours(parseInt(s.substr(-2)))}toString(){let s=this.date.getHours();if(/h/.test(this.token))s=s%12||12;return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),O5=te((e,u)=>{var t=tr();class r extends t{constructor(s={}){super(s)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(s){this.date.setMilliseconds(parseInt(s.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}u.exports=r}),L5=te((e,u)=>{var t=tr();class r extends t{constructor(s={}){super(s)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(s){this.date.setMinutes(parseInt(s.substr(-2)))}toString(){let s=this.date.getMinutes();return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),U5=te((e,u)=>{var t=tr();class r extends t{constructor(s={}){super(s)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(s){s=parseInt(s.substr(-2))-1,this.date.setMonth(s<0?0:s)}toString(){let s=this.date.getMonth(),n=this.token.length;return n===2?String(s+1).padStart(2,"0"):n===3?this.locales.monthsShort[s]:n===4?this.locales.months[s]:String(s+1)}}u.exports=r}),P5=te((e,u)=>{var t=tr();class r extends t{constructor(s={}){super(s)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(s){this.date.setSeconds(parseInt(s.substr(-2)))}toString(){let s=this.date.getSeconds();return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),M5=te((e,u)=>{var t=tr();class r extends t{constructor(s={}){super(s)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(s){this.date.setFullYear(s.substr(-4))}toString(){let s=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?s.substr(-2):s}}u.exports=r}),k5=te((e,u)=>{u.exports={DatePart:tr(),Meridiem:_5(),Day:$5(),Hours:R5(),Milliseconds:O5(),Minutes:L5(),Month:U5(),Seconds:P5(),Year:M5()}}),V5=te((e,u)=>{function t(S,_,K,N,$,P,V){try{var k=S[P](V),W=k.value}catch(Q){K(Q);return}if(k.done)_(W);else Promise.resolve(W).then(N,$)}function r(S){return function(){var _=this,K=arguments;return new Promise(function(N,$){var P=S.apply(_,K);function V(W){t(P,N,$,V,k,"next",W)}function k(W){t(P,N,$,V,k,"throw",W)}V(void 0)})}}var s=Et(),n=gr(),i=Pu(),l=i.style,o=i.clear,a=i.figures,D=Ct(),h=D.erase,d=D.cursor,F=k5(),p=F.DatePart,f=F.Meridiem,m=F.Day,B=F.Hours,C=F.Milliseconds,c=F.Minutes,y=F.Month,A=F.Seconds,T=F.Year,I=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,v={1:({token:S})=>S.replace(/\\(.)/g,"$1"),2:(S)=>new m(S),3:(S)=>new y(S),4:(S)=>new T(S),5:(S)=>new f(S),6:(S)=>new B(S),7:(S)=>new c(S),8:(S)=>new A(S),9:(S)=>new C(S)},g={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class E extends n{constructor(S={}){super(S);this.msg=S.message,this.cursor=0,this.typed="",this.locales=Object.assign(g,S.locales),this._date=S.initial||new Date,this.errorMsg=S.error||"Please Enter A Valid Value",this.validator=S.validate||(()=>!0),this.mask=S.mask||"YYYY-MM-DD HH:mm:ss",this.clear=o("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(S){if(S)this._date.setTime(S.getTime())}set mask(S){let _;this.parts=[];while(_=I.exec(S)){let N=_.shift(),$=_.findIndex((P)=>P!=null);this.parts.push($ in v?v[$]({token:_[$]||N,date:this.date,parts:this.parts,locales:this.locales}):_[$]||N)}let K=this.parts.reduce((N,$)=>{if(typeof $==="string"&&typeof N[N.length-1]==="string")N[N.length-1]+=$;else N.push($);return N},[]);this.parts.splice(0),this.parts.push(...K),this.reset()}moveCursor(S){this.typed="",this.cursor=S,this.fire()}reset(){this.moveCursor(this.parts.findIndex((S)=>S instanceof p)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
83
|
-
`),this.close()}validate(){var S=this;return r(function*(){let _=yield S.validator(S.value);if(typeof _==="string")S.errorMsg=_,_=!1;S.error=!_})()}submit(){var S=this;return r(function*(){if(yield S.validate(),S.error){S.color="red",S.fire(),S.render();return}S.done=!0,S.aborted=!1,S.fire(),S.render(),S.out.write(`
|
|
84
|
-
`),S.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let S=this.parts[this.cursor].prev();if(S==null)return this.bell();this.moveCursor(this.parts.indexOf(S)),this.render()}right(){let S=this.parts[this.cursor].next();if(S==null)return this.bell();this.moveCursor(this.parts.indexOf(S)),this.render()}next(){let S=this.parts[this.cursor].next();this.moveCursor(S?this.parts.indexOf(S):this.parts.findIndex((_)=>_ instanceof p)),this.render()}_(S){if(/\d/.test(S))this.typed+=S,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(o(this.outputText,this.out.columns));if(super.render(),this.outputText=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(!1),this.parts.reduce((S,_,K)=>S.concat(K===this.cursor&&!this.done?s.cyan().underline(_.toString()):_),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split(`
|
|
85
|
-
`).reduce((S,_,K)=>S+`
|
|
86
|
-
${K?" ":a.pointerSmall} ${s.red().italic(_)}`,"");this.out.write(h.line+d.to(0)+this.outputText)}}u.exports=E}),K5=te((e,u)=>{function t(C,c,y,A,T,I,v){try{var g=C[I](v),E=g.value}catch(S){y(S);return}if(g.done)c(E);else Promise.resolve(E).then(A,T)}function r(C){return function(){var c=this,y=arguments;return new Promise(function(A,T){var I=C.apply(c,y);function v(E){t(I,A,T,v,g,"next",E)}function g(E){t(I,A,T,v,g,"throw",E)}v(void 0)})}}var s=Et(),n=gr(),i=Ct(),l=i.cursor,o=i.erase,a=Pu(),D=a.style,h=a.figures,d=a.clear,F=a.lines,p=/[0-9]/,f=(C)=>C!==void 0,m=(C,c)=>{let y=Math.pow(10,c);return Math.round(C*y)/y};class B extends n{constructor(C={}){super(C);this.transform=D.render(C.style),this.msg=C.message,this.initial=f(C.initial)?C.initial:"",this.float=!!C.float,this.round=C.round||2,this.inc=C.increment||1,this.min=f(C.min)?C.min:-1/0,this.max=f(C.max)?C.max:1/0,this.errorMsg=C.error||"Please Enter A Valid Value",this.validator=C.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(C){if(!C&&C!==0)this.placeholder=!0,this.rendered=s.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${m(C,this.round)}`),this._value=m(C,this.round);this.fire()}get value(){return this._value}parse(C){return this.float?parseFloat(C):parseInt(C)}valid(C){return C==="-"||C==="."&&this.float||p.test(C)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let C=this.value;this.value=C!==""?C:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
87
|
-
`),this.close()}validate(){var C=this;return r(function*(){let c=yield C.validator(C.value);if(typeof c==="string")C.errorMsg=c,c=!1;C.error=!c})()}submit(){var C=this;return r(function*(){if(yield C.validate(),C.error){C.color="red",C.fire(),C.render();return}let c=C.value;C.value=c!==""?c:C.initial,C.done=!0,C.aborted=!1,C.error=!1,C.fire(),C.render(),C.out.write(`
|
|
88
|
-
`),C.close()})()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value==="")this.value=this.min+this.inc;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let C=this.value.toString();if(C.length===0)return this.bell();if(this.value=this.parse(C=C.slice(0,-1))||"",this.value!==""&&this.value<this.min)this.value=this.min;this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(C,c){if(!this.valid(C))return this.bell();let y=Date.now();if(y-this.lastHit>1000)this.typed="";if(this.typed+=C,this.lastHit=y,this.color="cyan",C===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(l.down(F(this.outputError,this.out.columns)-1)+d(this.outputError,this.out.columns));this.out.write(d(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[D.symbol(this.done,this.aborted),s.bold(this.msg),D.delimiter(this.done),!this.done||!this.done&&!this.placeholder?s[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split(`
|
|
89
|
-
`).reduce((C,c,y)=>C+`
|
|
90
|
-
${y?" ":h.pointerSmall} ${s.red().italic(c)}`,"");this.out.write(o.line+l.to(0)+this.outputText+l.save+this.outputError+l.restore)}}u.exports=B}),f2=te((e,u)=>{var t=Et(),r=Ct(),s=r.cursor,n=gr(),i=Pu(),l=i.clear,o=i.figures,a=i.style,D=i.wrap,h=i.entriesToDisplay;class d extends n{constructor(F={}){super(F);if(this.msg=F.message,this.cursor=F.cursor||0,this.scrollIndex=F.cursor||0,this.hint=F.hint||"",this.warn=F.warn||"- This option is disabled -",this.minSelected=F.min,this.showMinError=!1,this.maxChoices=F.max,this.instructions=F.instructions,this.optionsPerPage=F.optionsPerPage||10,this.value=F.choices.map((p,f)=>{if(typeof p==="string")p={title:p,value:f};return{title:p&&(p.title||p.value||p),description:p&&p.description,value:p&&(p.value===void 0?f:p.value),selected:p&&p.selected,disabled:p&&p.disabled}}),this.clear=l("",this.out.columns),!F.overrideRender)this.render()}reset(){this.value.map((F)=>!F.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((F)=>F.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
91
|
-
`),this.close()}submit(){let F=this.value.filter((p)=>p.selected);if(this.minSelected&&F.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
92
|
-
`),this.close()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((F)=>F.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let F=this.value[this.cursor];if(F.selected)F.selected=!1,this.render();else if(F.disabled||this.value.filter((p)=>p.selected).length>=this.maxChoices)return this.bell();else F.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let F=!this.value[this.cursor].selected;this.value.filter((p)=>!p.disabled).forEach((p)=>p.selected=F),this.render()}_(F,p){if(F===" ")this.handleSpaceToggle();else if(F==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
93
|
-
Instructions:
|
|
94
|
-
${o.arrowUp}/${o.arrowDown}: Highlight option
|
|
95
|
-
${o.arrowLeft}/${o.arrowRight}/[space]: Toggle selection
|
|
96
|
-
`+(this.maxChoices===void 0?` a: Toggle all
|
|
97
|
-
`:"")+" enter/return: Complete answer"}return""}renderOption(F,p,f,m){let B=(p.selected?t.green(o.radioOn):o.radioOff)+" "+m+" ",C,c;if(p.disabled)C=F===f?t.gray().underline(p.title):t.strikethrough().gray(p.title);else if(C=F===f?t.cyan().underline(p.title):p.title,F===f&&p.description){if(c=` - ${p.description}`,B.length+C.length+c.length>=this.out.columns||p.description.split(/\r?\n/).length>1)c=`
|
|
98
|
-
`+D(p.description,{margin:B.length,width:this.out.columns})}return B+C+t.gray(c||"")}paginateOptions(F){if(F.length===0)return t.red("No matches for this query.");let p=h(this.cursor,F.length,this.optionsPerPage),f=p.startIndex,m=p.endIndex,B,C=[];for(let c=f;c<m;c++){if(c===f&&f>0)B=o.arrowUp;else if(c===m-1&&m<F.length)B=o.arrowDown;else B=" ";C.push(this.renderOption(this.cursor,F[c],c,B))}return`
|
|
99
|
-
`+C.join(`
|
|
100
|
-
`)}renderOptions(F){if(!this.done)return this.paginateOptions(F);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((p)=>p.selected).map((p)=>p.title).join(", ");let F=[t.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)F.push(t.yellow(this.warn));return F.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(s.hide);super.render();let F=[a.symbol(this.done,this.aborted),t.bold(this.msg),a.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)F+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;F+=this.renderOptions(this.value),this.out.write(this.clear+F),this.clear=l(F,this.out.columns)}}u.exports=d}),G5=te((e,u)=>{function t(c,y,A,T,I,v,g){try{var E=c[v](g),S=E.value}catch(_){A(_);return}if(E.done)y(S);else Promise.resolve(S).then(T,I)}function r(c){return function(){var y=this,A=arguments;return new Promise(function(T,I){var v=c.apply(y,A);function g(S){t(v,T,I,g,E,"next",S)}function E(S){t(v,T,I,g,E,"throw",S)}g(void 0)})}}var s=Et(),n=gr(),i=Ct(),l=i.erase,o=i.cursor,a=Pu(),D=a.style,h=a.clear,d=a.figures,F=a.wrap,p=a.entriesToDisplay,f=(c,y)=>c[y]&&(c[y].value||c[y].title||c[y]),m=(c,y)=>c[y]&&(c[y].title||c[y].value||c[y]),B=(c,y)=>{let A=c.findIndex((T)=>T.value===y||T.title===y);return A>-1?A:void 0};class C extends n{constructor(c={}){super(c);this.msg=c.message,this.suggest=c.suggest,this.choices=c.choices,this.initial=typeof c.initial==="number"?c.initial:B(c.choices,c.initial),this.select=this.initial||c.cursor||0,this.i18n={noMatches:c.noMatches||"no matches found"},this.fallback=c.fallback||this.initial,this.clearFirst=c.clearFirst||!1,this.suggestions=[],this.input="",this.limit=c.limit||10,this.cursor=0,this.transform=D.render(c.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=h("",this.out.columns),this.complete(this.render),this.render()}set fallback(c){this._fb=Number.isSafeInteger(parseInt(c))?parseInt(c):c}get fallback(){let c;if(typeof this._fb==="number")c=this.choices[this._fb];else if(typeof this._fb==="string")c={title:this._fb};return c||this._fb||{title:this.i18n.noMatches}}moveSelect(c){if(this.select=c,this.suggestions.length>0)this.value=f(this.suggestions,c);else this.value=this.fallback.value;this.fire()}complete(c){var y=this;return r(function*(){let A=y.completing=y.suggest(y.input,y.choices),T=yield A;if(y.completing!==A)return;y.suggestions=T.map((v,g,E)=>({title:m(E,g),value:f(E,g),description:v.description})),y.completing=!1;let I=Math.max(T.length-1,0);y.moveSelect(Math.min(I,y.select)),c&&c()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
101
|
-
`),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
102
|
-
`),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
103
|
-
`),this.close()}_(c,y){let A=this.input.slice(0,this.cursor),T=this.input.slice(this.cursor);this.input=`${A}${c}${T}`,this.cursor=A.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let c=this.input.slice(0,this.cursor-1),y=this.input.slice(this.cursor);this.input=`${c}${y}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let c=this.input.slice(0,this.cursor),y=this.input.slice(this.cursor+1);this.input=`${c}${y}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(c,y,A,T){let I,v=A?d.arrowUp:T?d.arrowDown:" ",g=y?s.cyan().underline(c.title):c.title;if(v=(y?s.cyan(d.pointer)+" ":" ")+v,c.description){if(I=` - ${c.description}`,v.length+g.length+I.length>=this.out.columns||c.description.split(/\r?\n/).length>1)I=`
|
|
104
|
-
`+F(c.description,{margin:3,width:this.out.columns})}return v+" "+g+s.gray(I||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(o.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();let c=p(this.select,this.choices.length,this.limit),y=c.startIndex,A=c.endIndex;if(this.outputText=[D.symbol(this.done,this.aborted,this.exited),s.bold(this.msg),D.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let T=this.suggestions.slice(y,A).map((I,v)=>this.renderOption(I,this.select===v+y,v===0&&y>0,v+y===A-1&&A<this.choices.length)).join(`
|
|
105
|
-
`);this.outputText+=`
|
|
106
|
-
`+(T||s.gray(this.fallback.title))}this.out.write(l.line+o.to(0)+this.outputText)}}u.exports=C}),j5=te((e,u)=>{var t=Et(),r=Ct(),s=r.cursor,n=f2(),i=Pu(),l=i.clear,o=i.style,a=i.figures;class D extends n{constructor(h={}){h.overrideRender=!0;super(h);this.inputValue="",this.clear=l("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((h)=>h.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){let h=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((F)=>{if(this.inputValue){if(typeof F.title==="string"){if(F.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof F.value==="string"){if(F.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});let d=this.filteredOptions.findIndex((F)=>F===h);this.cursor=d<0?0:d,this.render()}handleSpaceToggle(){let h=this.filteredOptions[this.cursor];if(h.selected)h.selected=!1,this.render();else if(h.disabled||this.value.filter((d)=>d.selected).length>=this.maxChoices)return this.bell();else h.selected=!0,this.render()}handleInputChange(h){this.inputValue=this.inputValue+h,this.updateFilteredOptions()}_(h,d){if(h===" ")this.handleSpaceToggle();else this.handleInputChange(h)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
107
|
-
Instructions:
|
|
108
|
-
${a.arrowUp}/${a.arrowDown}: Highlight option
|
|
109
|
-
${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection
|
|
110
|
-
[a,b,c]/delete: Filter choices
|
|
111
|
-
enter/return: Complete answer
|
|
112
|
-
`}return""}renderCurrentInput(){return`
|
|
113
|
-
Filtered results for: ${this.inputValue?this.inputValue:t.gray("Enter something to filter")}
|
|
114
|
-
`}renderOption(h,d,F){let p;if(d.disabled)p=h===F?t.gray().underline(d.title):t.strikethrough().gray(d.title);else p=h===F?t.cyan().underline(d.title):d.title;return(d.selected?t.green(a.radioOn):a.radioOff)+" "+p}renderDoneOrInstructions(){if(this.done)return this.value.filter((d)=>d.selected).map((d)=>d.title).join(", ");let h=[t.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)h.push(t.yellow(this.warn));return h.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(s.hide);super.render();let h=[o.symbol(this.done,this.aborted),t.bold(this.msg),o.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)h+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;h+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+h),this.clear=l(h,this.out.columns)}}u.exports=D}),W5=te((e,u)=>{var t=Et(),r=gr(),s=Pu(),n=s.style,i=s.clear,l=Ct(),o=l.erase,a=l.cursor;class D extends r{constructor(h={}){super(h);this.msg=h.message,this.value=h.initial,this.initialValue=!!h.initial,this.yesMsg=h.yes||"yes",this.yesOption=h.yesOption||"(Y/n)",this.noMsg=h.no||"no",this.noOption=h.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
115
|
-
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
116
|
-
`),this.close()}_(h,d){if(h.toLowerCase()==="y")return this.value=!0,this.submit();if(h.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);else this.out.write(i(this.outputText,this.out.columns));super.render(),this.outputText=[n.symbol(this.done,this.aborted),t.bold(this.msg),n.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:t.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(o.line+a.to(0)+this.outputText)}}u.exports=D}),H5=te((e,u)=>{u.exports={TextPrompt:w5(),SelectPrompt:I5(),TogglePrompt:N5(),DatePrompt:V5(),NumberPrompt:K5(),MultiselectPrompt:f2(),AutocompletePrompt:G5(),AutocompleteMultiselectPrompt:j5(),ConfirmPrompt:W5()}}),Q5=te((e)=>{var u=e,t=H5(),r=(i)=>i;function s(i,l,o={}){return new Promise((a,D)=>{let h=new t[i](l),d=o.onAbort||r,F=o.onSubmit||r,p=o.onExit||r;h.on("state",l.onState||r),h.on("submit",(f)=>a(F(f))),h.on("exit",(f)=>a(p(f))),h.on("abort",(f)=>D(d(f)))})}u.text=(i)=>s("TextPrompt",i),u.password=(i)=>{return i.style="password",u.text(i)},u.invisible=(i)=>{return i.style="invisible",u.text(i)},u.number=(i)=>s("NumberPrompt",i),u.date=(i)=>s("DatePrompt",i),u.confirm=(i)=>s("ConfirmPrompt",i),u.list=(i)=>{let l=i.separator||",";return s("TextPrompt",i,{onSubmit:(o)=>o.split(l).map((a)=>a.trim())})},u.toggle=(i)=>s("TogglePrompt",i),u.select=(i)=>s("SelectPrompt",i),u.multiselect=(i)=>{i.choices=[].concat(i.choices||[]);let l=(o)=>o.filter((a)=>a.selected).map((a)=>a.value);return s("MultiselectPrompt",i,{onAbort:l,onSubmit:l})},u.autocompleteMultiselect=(i)=>{i.choices=[].concat(i.choices||[]);let l=(o)=>o.filter((a)=>a.selected).map((a)=>a.value);return s("AutocompleteMultiselectPrompt",i,{onAbort:l,onSubmit:l})};var n=(i,l)=>Promise.resolve(l.filter((o)=>o.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));u.autocomplete=(i)=>{return i.suggest=i.suggest||n,i.choices=[].concat(i.choices||[]),s("AutocompletePrompt",i)}}),Y5=te((e,u)=>{function t(C,c){var y=Object.keys(C);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(C);if(c)A=A.filter(function(T){return Object.getOwnPropertyDescriptor(C,T).enumerable});y.push.apply(y,A)}return y}function r(C){for(var c=1;c<arguments.length;c++){var y=arguments[c]!=null?arguments[c]:{};if(c%2)t(Object(y),!0).forEach(function(A){s(C,A,y[A])});else if(Object.getOwnPropertyDescriptors)Object.defineProperties(C,Object.getOwnPropertyDescriptors(y));else t(Object(y)).forEach(function(A){Object.defineProperty(C,A,Object.getOwnPropertyDescriptor(y,A))})}return C}function s(C,c,y){if(c in C)Object.defineProperty(C,c,{value:y,enumerable:!0,configurable:!0,writable:!0});else C[c]=y;return C}function n(C,c){var y=typeof Symbol!=="undefined"&&C[Symbol.iterator]||C["@@iterator"];if(!y){if(Array.isArray(C)||(y=i(C))||c&&C&&typeof C.length==="number"){if(y)C=y;var A=0,T=function E(){};return{s:T,n:function E(){if(A>=C.length)return{done:!0};return{done:!1,value:C[A++]}},e:function E(S){throw S},f:T}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
117
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I=!0,v=!1,g;return{s:function E(){y=y.call(C)},n:function E(){var S=y.next();return I=S.done,S},e:function E(S){v=!0,g=S},f:function E(){try{if(!I&&y.return!=null)y.return()}finally{if(v)throw g}}}}function i(C,c){if(!C)return;if(typeof C==="string")return l(C,c);var y=Object.prototype.toString.call(C).slice(8,-1);if(y==="Object"&&C.constructor)y=C.constructor.name;if(y==="Map"||y==="Set")return Array.from(C);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return l(C,c)}function l(C,c){if(c==null||c>C.length)c=C.length;for(var y=0,A=new Array(c);y<c;y++)A[y]=C[y];return A}function o(C,c,y,A,T,I,v){try{var g=C[I](v),E=g.value}catch(S){y(S);return}if(g.done)c(E);else Promise.resolve(E).then(A,T)}function a(C){return function(){var c=this,y=arguments;return new Promise(function(A,T){var I=C.apply(c,y);function v(E){o(I,A,T,v,g,"next",E)}function g(E){o(I,A,T,v,g,"throw",E)}v(void 0)})}}var D=Q5(),h=["suggest","format","onState","validate","onRender","type"],d=()=>{};function F(){return p.apply(this,arguments)}function p(){return p=a(function*(C=[],{onSubmit:c=d,onCancel:y=d}={}){let A={},T=F._override||{};C=[].concat(C);let I,v,g,E,S,_,K=function(){var k=a(function*(W,Q,z=!1){if(!z&&W.validate&&W.validate(Q)!==!0)return;return W.format?yield W.format(Q,A):Q});return function W(Q,z){return k.apply(this,arguments)}}();var N=n(C),$;try{for(N.s();!($=N.n()).done;){v=$.value;var P=v;if(E=P.name,S=P.type,typeof S==="function")S=yield S(I,r({},A),v),v.type=S;if(!S)continue;for(let k in v){if(h.includes(k))continue;let W=v[k];v[k]=typeof W==="function"?yield W(I,r({},A),_):W}if(_=v,typeof v.message!=="string")throw new Error("prompt message is required");var V=v;if(E=V.name,S=V.type,D[S]===void 0)throw new Error(`prompt type (${S}) is not defined`);if(T[v.name]!==void 0){if(I=yield K(v,T[v.name]),I!==void 0){A[E]=I;continue}}try{I=F._injected?f(F._injected,v.initial):yield D[S](v),A[E]=I=yield K(v,I,!0),g=yield c(v,I,A)}catch(k){g=!(yield y(v,A))}if(g)return A}}catch(k){N.e(k)}finally{N.f()}return A}),p.apply(this,arguments)}function f(C,c){let y=C.shift();if(y instanceof Error)throw y;return y===void 0?c:y}function m(C){F._injected=(F._injected||[]).concat(C)}function B(C){F._override=Object.assign({},C)}u.exports=Object.assign(F,{prompt:F,prompts:D,inject:m,override:B})}),z5=te((e,u)=>{u.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return!1}}),Sa=te((e,u)=>{u.exports=(t)=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),s=new RegExp(r,"g");return typeof t==="string"?t.replace(s,""):t}}),q5=te((e,u)=>{var t=Sa(),{erase:r,cursor:s}=Ct(),n=(i)=>[...t(i)].length;u.exports=function(i,l){if(!l)return r.line+s.to(0);let o=0,a=i.split(/\r?\n/);for(let D of a)o+=1+Math.floor(Math.max(n(D)-1,0)/l);return r.lines(o)}}),d2=te((e,u)=>{var t={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"},s=process.platform==="win32"?r:t;u.exports=s}),x5=te((e,u)=>{var t=Et(),r=d2(),s=Object.freeze({password:{scale:1,render:(D)=>"*".repeat(D.length)},emoji:{scale:2,render:(D)=>"\uD83D\uDE03".repeat(D.length)},invisible:{scale:0,render:(D)=>""},default:{scale:1,render:(D)=>`${D}`}}),n=(D)=>s[D]||s.default,i=Object.freeze({aborted:t.red(r.cross),done:t.green(r.tick),exited:t.yellow(r.cross),default:t.cyan("?")}),l=(D,h,d)=>h?i.aborted:d?i.exited:D?i.done:i.default,o=(D)=>t.gray(D?r.ellipsis:r.pointerSmall),a=(D,h)=>t.gray(D?h?r.pointerSmall:"+":r.line);u.exports={styles:s,render:n,symbols:i,symbol:l,delimiter:o,item:a}}),Z5=te((e,u)=>{var t=Sa();u.exports=function(r,s){let n=String(t(r)||"").split(/\r?\n/);if(!s)return n.length;return n.map((i)=>Math.ceil(i.length/s)).reduce((i,l)=>i+l)}}),X5=te((e,u)=>{u.exports=(t,r={})=>{let s=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"",n=r.width;return(t||"").split(/\r?\n/g).map((i)=>i.split(/\s+/g).reduce((l,o)=>{if(o.length+s.length>=n||l[l.length-1].length+o.length+1<n)l[l.length-1]+=` ${o}`;else l.push(`${s}${o}`);return l},[s]).join(`
|
|
118
|
-
`)).join(`
|
|
119
|
-
`)}}),J5=te((e,u)=>{u.exports=(t,r,s)=>{s=s||r;let n=Math.min(r-s,t-Math.floor(s/2));if(n<0)n=0;let i=Math.min(n+s,r);return{startIndex:n,endIndex:i}}}),Mu=te((e,u)=>{u.exports={action:z5(),clear:q5(),style:x5(),strip:Sa(),figures:d2(),lines:Z5(),wrap:X5(),entriesToDisplay:J5()}}),mr=te((e,u)=>{var t=import.meta.require("readline"),{action:r}=Mu(),s=import.meta.require("events"),{beep:n,cursor:i}=Ct(),l=Et();class o extends s{constructor(a={}){super();this.firstRender=!0,this.in=a.stdin||process.stdin,this.out=a.stdout||process.stdout,this.onRender=(a.onRender||(()=>{return})).bind(this);let D=t.createInterface({input:this.in,escapeCodeTimeout:50});if(t.emitKeypressEvents(this.in,D),this.in.isTTY)this.in.setRawMode(!0);let h=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,d=(F,p)=>{let f=r(p,h);if(f===!1)this._&&this._(F,p);else if(typeof this[f]==="function")this[f](p);else this.bell()};this.close=()=>{if(this.out.write(i.show),this.in.removeListener("keypress",d),this.in.isTTY)this.in.setRawMode(!1);D.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",d)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(n)}render(){if(this.onRender(l),this.firstRender)this.firstRender=!1}}u.exports=o}),eE=te((e,u)=>{var t=Et(),r=mr(),{erase:s,cursor:n}=Ct(),{style:i,clear:l,lines:o,figures:a}=Mu();class D extends r{constructor(h={}){super(h);this.transform=i.render(h.style),this.scale=this.transform.scale,this.msg=h.message,this.initial=h.initial||"",this.validator=h.validate||(()=>!0),this.value="",this.errorMsg=h.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=l("",this.out.columns),this.render()}set value(h){if(!h&&this.initial)this.placeholder=!0,this.rendered=t.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(h);this._value=h,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
|
|
120
|
-
`),this.close()}async validate(){let h=await this.validator(this.value);if(typeof h==="string")this.errorMsg=h,h=!1;this.error=!h}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
121
|
-
`),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(h){if(this.placeholder)return;this.cursor=this.cursor+h,this.cursorOffset+=h}_(h,d){let F=this.value.slice(0,this.cursor),p=this.value.slice(this.cursor);this.value=`${F}${h}${p}`,this.red=!1,this.cursor=this.placeholder?0:F.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let h=this.value.slice(0,this.cursor-1),d=this.value.slice(this.cursor);if(this.value=`${h}${d}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let h=this.value.slice(0,this.cursor),d=this.value.slice(this.cursor+1);if(this.value=`${h}${d}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else this.cursorOffset++;this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(n.down(o(this.outputError,this.out.columns)-1)+l(this.outputError,this.out.columns));this.out.write(l(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(this.done),this.red?t.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split(`
|
|
122
|
-
`).reduce((h,d,F)=>h+`
|
|
123
|
-
${F?" ":a.pointerSmall} ${t.red().italic(d)}`,"");this.out.write(s.line+n.to(0)+this.outputText+n.save+this.outputError+n.restore+n.move(this.cursorOffset,0))}}u.exports=D}),tE=te((e,u)=>{var t=Et(),r=mr(),{style:s,clear:n,figures:i,wrap:l,entriesToDisplay:o}=Mu(),{cursor:a}=Ct();class D extends r{constructor(h={}){super(h);this.msg=h.message,this.hint=h.hint||"- Use arrow-keys. Return to submit.",this.warn=h.warn||"- This option is disabled",this.cursor=h.initial||0,this.choices=h.choices.map((d,F)=>{if(typeof d==="string")d={title:d,value:F};return{title:d&&(d.title||d.value||d),value:d&&(d.value===void 0?F:d.value),description:d&&d.description,selected:d&&d.selected,disabled:d&&d.disabled}}),this.optionsPerPage=h.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=n("",this.out.columns),this.render()}moveCursor(h){this.cursor=h,this.value=this.choices[h].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
124
|
-
`),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
125
|
-
`),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(h,d){if(h===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);else this.out.write(n(this.outputText,this.out.columns));super.render();let{startIndex:h,endIndex:d}=o(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[s.symbol(this.done,this.aborted),t.bold(this.msg),s.delimiter(!1),this.done?this.selection.title:this.selection.disabled?t.yellow(this.warn):t.gray(this.hint)].join(" "),!this.done){this.outputText+=`
|
|
126
|
-
`;for(let F=h;F<d;F++){let p,f,m="",B=this.choices[F];if(F===h&&h>0)f=i.arrowUp;else if(F===d-1&&d<this.choices.length)f=i.arrowDown;else f=" ";if(B.disabled)p=this.cursor===F?t.gray().underline(B.title):t.strikethrough().gray(B.title),f=(this.cursor===F?t.bold().gray(i.pointer)+" ":" ")+f;else if(p=this.cursor===F?t.cyan().underline(B.title):B.title,f=(this.cursor===F?t.cyan(i.pointer)+" ":" ")+f,B.description&&this.cursor===F){if(m=` - ${B.description}`,f.length+p.length+m.length>=this.out.columns||B.description.split(/\r?\n/).length>1)m=`
|
|
127
|
-
`+l(B.description,{margin:3,width:this.out.columns})}this.outputText+=`${f} ${p}${t.gray(m)}
|
|
128
|
-
`}}this.out.write(this.outputText)}}u.exports=D}),uE=te((e,u)=>{var t=Et(),r=mr(),{style:s,clear:n}=Mu(),{cursor:i,erase:l}=Ct();class o extends r{constructor(a={}){super(a);this.msg=a.message,this.value=!!a.initial,this.active=a.active||"on",this.inactive=a.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
129
|
-
`),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
130
|
-
`),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(a,D){if(a===" ")this.value=!this.value;else if(a==="1")this.value=!0;else if(a==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);else this.out.write(n(this.outputText,this.out.columns));super.render(),this.outputText=[s.symbol(this.done,this.aborted),t.bold(this.msg),s.delimiter(this.done),this.value?this.inactive:t.cyan().underline(this.inactive),t.gray("/"),this.value?t.cyan().underline(this.active):this.active].join(" "),this.out.write(l.line+i.to(0)+this.outputText)}}u.exports=o}),ur=te((e,u)=>{class t{constructor({token:r,date:s,parts:n,locales:i}){this.token=r,this.date=s||new Date,this.parts=n||[this],this.locales=i||{}}up(){}down(){}next(){let r=this.parts.indexOf(this);return this.parts.find((s,n)=>n>r&&s instanceof t)}setTo(r){}prev(){let r=[].concat(this.parts).reverse(),s=r.indexOf(this);return r.find((n,i)=>i>s&&n instanceof t)}toString(){return String(this.date)}}u.exports=t}),rE=te((e,u)=>{var t=ur();class r extends t{constructor(s={}){super(s)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let s=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?s.toUpperCase():s}}u.exports=r}),iE=te((e,u)=>{var t=ur(),r=(n)=>{return n=n%10,n===1?"st":n===2?"nd":n===3?"rd":"th"};class s extends t{constructor(n={}){super(n)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(n){this.date.setDate(parseInt(n.substr(-2)))}toString(){let n=this.date.getDate(),i=this.date.getDay();return this.token==="DD"?String(n).padStart(2,"0"):this.token==="Do"?n+r(n):this.token==="d"?i+1:this.token==="ddd"?this.locales.weekdaysShort[i]:this.token==="dddd"?this.locales.weekdays[i]:n}}u.exports=s}),sE=te((e,u)=>{var t=ur();class r extends t{constructor(s={}){super(s)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(s){this.date.setHours(parseInt(s.substr(-2)))}toString(){let s=this.date.getHours();if(/h/.test(this.token))s=s%12||12;return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),nE=te((e,u)=>{var t=ur();class r extends t{constructor(s={}){super(s)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(s){this.date.setMilliseconds(parseInt(s.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}u.exports=r}),aE=te((e,u)=>{var t=ur();class r extends t{constructor(s={}){super(s)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(s){this.date.setMinutes(parseInt(s.substr(-2)))}toString(){let s=this.date.getMinutes();return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),hE=te((e,u)=>{var t=ur();class r extends t{constructor(s={}){super(s)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(s){s=parseInt(s.substr(-2))-1,this.date.setMonth(s<0?0:s)}toString(){let s=this.date.getMonth(),n=this.token.length;return n===2?String(s+1).padStart(2,"0"):n===3?this.locales.monthsShort[s]:n===4?this.locales.months[s]:String(s+1)}}u.exports=r}),lE=te((e,u)=>{var t=ur();class r extends t{constructor(s={}){super(s)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(s){this.date.setSeconds(parseInt(s.substr(-2)))}toString(){let s=this.date.getSeconds();return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),oE=te((e,u)=>{var t=ur();class r extends t{constructor(s={}){super(s)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(s){this.date.setFullYear(s.substr(-4))}toString(){let s=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?s.substr(-2):s}}u.exports=r}),cE=te((e,u)=>{u.exports={DatePart:ur(),Meridiem:rE(),Day:iE(),Hours:sE(),Milliseconds:nE(),Minutes:aE(),Month:hE(),Seconds:lE(),Year:oE()}}),DE=te((e,u)=>{var t=Et(),r=mr(),{style:s,clear:n,figures:i}=Mu(),{erase:l,cursor:o}=Ct(),{DatePart:a,Meridiem:D,Day:h,Hours:d,Milliseconds:F,Minutes:p,Month:f,Seconds:m,Year:B}=cE(),C=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,c={1:({token:T})=>T.replace(/\\(.)/g,"$1"),2:(T)=>new h(T),3:(T)=>new f(T),4:(T)=>new B(T),5:(T)=>new D(T),6:(T)=>new d(T),7:(T)=>new p(T),8:(T)=>new m(T),9:(T)=>new F(T)},y={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class A extends r{constructor(T={}){super(T);this.msg=T.message,this.cursor=0,this.typed="",this.locales=Object.assign(y,T.locales),this._date=T.initial||new Date,this.errorMsg=T.error||"Please Enter A Valid Value",this.validator=T.validate||(()=>!0),this.mask=T.mask||"YYYY-MM-DD HH:mm:ss",this.clear=n("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(T){if(T)this._date.setTime(T.getTime())}set mask(T){let I;this.parts=[];while(I=C.exec(T)){let g=I.shift(),E=I.findIndex((S)=>S!=null);this.parts.push(E in c?c[E]({token:I[E]||g,date:this.date,parts:this.parts,locales:this.locales}):I[E]||g)}let v=this.parts.reduce((g,E)=>{if(typeof E==="string"&&typeof g[g.length-1]==="string")g[g.length-1]+=E;else g.push(E);return g},[]);this.parts.splice(0),this.parts.push(...v),this.reset()}moveCursor(T){this.typed="",this.cursor=T,this.fire()}reset(){this.moveCursor(this.parts.findIndex((T)=>T instanceof a)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
131
|
-
`),this.close()}async validate(){let T=await this.validator(this.value);if(typeof T==="string")this.errorMsg=T,T=!1;this.error=!T}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
132
|
-
`),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let T=this.parts[this.cursor].prev();if(T==null)return this.bell();this.moveCursor(this.parts.indexOf(T)),this.render()}right(){let T=this.parts[this.cursor].next();if(T==null)return this.bell();this.moveCursor(this.parts.indexOf(T)),this.render()}next(){let T=this.parts[this.cursor].next();this.moveCursor(T?this.parts.indexOf(T):this.parts.findIndex((I)=>I instanceof a)),this.render()}_(T){if(/\d/.test(T))this.typed+=T,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(o.hide);else this.out.write(n(this.outputText,this.out.columns));if(super.render(),this.outputText=[s.symbol(this.done,this.aborted),t.bold(this.msg),s.delimiter(!1),this.parts.reduce((T,I,v)=>T.concat(v===this.cursor&&!this.done?t.cyan().underline(I.toString()):I),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split(`
|
|
133
|
-
`).reduce((T,I,v)=>T+`
|
|
134
|
-
${v?" ":i.pointerSmall} ${t.red().italic(I)}`,"");this.out.write(l.line+o.to(0)+this.outputText)}}u.exports=A}),fE=te((e,u)=>{var t=Et(),r=mr(),{cursor:s,erase:n}=Ct(),{style:i,figures:l,clear:o,lines:a}=Mu(),D=/[0-9]/,h=(p)=>p!==void 0,d=(p,f)=>{let m=Math.pow(10,f);return Math.round(p*m)/m};class F extends r{constructor(p={}){super(p);this.transform=i.render(p.style),this.msg=p.message,this.initial=h(p.initial)?p.initial:"",this.float=!!p.float,this.round=p.round||2,this.inc=p.increment||1,this.min=h(p.min)?p.min:-1/0,this.max=h(p.max)?p.max:1/0,this.errorMsg=p.error||"Please Enter A Valid Value",this.validator=p.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(p){if(!p&&p!==0)this.placeholder=!0,this.rendered=t.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${d(p,this.round)}`),this._value=d(p,this.round);this.fire()}get value(){return this._value}parse(p){return this.float?parseFloat(p):parseInt(p)}valid(p){return p==="-"||p==="."&&this.float||D.test(p)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let p=this.value;this.value=p!==""?p:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
135
|
-
`),this.close()}async validate(){let p=await this.validator(this.value);if(typeof p==="string")this.errorMsg=p,p=!1;this.error=!p}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let p=this.value;this.value=p!==""?p:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
136
|
-
`),this.close()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value==="")this.value=this.min+this.inc;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let p=this.value.toString();if(p.length===0)return this.bell();if(this.value=this.parse(p=p.slice(0,-1))||"",this.value!==""&&this.value<this.min)this.value=this.min;this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(p,f){if(!this.valid(p))return this.bell();let m=Date.now();if(m-this.lastHit>1000)this.typed="";if(this.typed+=p,this.lastHit=m,this.color="cyan",p===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(s.down(a(this.outputError,this.out.columns)-1)+o(this.outputError,this.out.columns));this.out.write(o(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(this.done),!this.done||!this.done&&!this.placeholder?t[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split(`
|
|
137
|
-
`).reduce((p,f,m)=>p+`
|
|
138
|
-
${m?" ":l.pointerSmall} ${t.red().italic(f)}`,"");this.out.write(n.line+s.to(0)+this.outputText+s.save+this.outputError+s.restore)}}u.exports=F}),E2=te((e,u)=>{var t=Et(),{cursor:r}=Ct(),s=mr(),{clear:n,figures:i,style:l,wrap:o,entriesToDisplay:a}=Mu();class D extends s{constructor(h={}){super(h);if(this.msg=h.message,this.cursor=h.cursor||0,this.scrollIndex=h.cursor||0,this.hint=h.hint||"",this.warn=h.warn||"- This option is disabled -",this.minSelected=h.min,this.showMinError=!1,this.maxChoices=h.max,this.instructions=h.instructions,this.optionsPerPage=h.optionsPerPage||10,this.value=h.choices.map((d,F)=>{if(typeof d==="string")d={title:d,value:F};return{title:d&&(d.title||d.value||d),description:d&&d.description,value:d&&(d.value===void 0?F:d.value),selected:d&&d.selected,disabled:d&&d.disabled}}),this.clear=n("",this.out.columns),!h.overrideRender)this.render()}reset(){this.value.map((h)=>!h.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((h)=>h.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
139
|
-
`),this.close()}submit(){let h=this.value.filter((d)=>d.selected);if(this.minSelected&&h.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
140
|
-
`),this.close()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((h)=>h.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let h=this.value[this.cursor];if(h.selected)h.selected=!1,this.render();else if(h.disabled||this.value.filter((d)=>d.selected).length>=this.maxChoices)return this.bell();else h.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let h=!this.value[this.cursor].selected;this.value.filter((d)=>!d.disabled).forEach((d)=>d.selected=h),this.render()}_(h,d){if(h===" ")this.handleSpaceToggle();else if(h==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
141
|
-
Instructions:
|
|
142
|
-
${i.arrowUp}/${i.arrowDown}: Highlight option
|
|
143
|
-
${i.arrowLeft}/${i.arrowRight}/[space]: Toggle selection
|
|
144
|
-
`+(this.maxChoices===void 0?` a: Toggle all
|
|
145
|
-
`:"")+" enter/return: Complete answer"}return""}renderOption(h,d,F,p){let f=(d.selected?t.green(i.radioOn):i.radioOff)+" "+p+" ",m,B;if(d.disabled)m=h===F?t.gray().underline(d.title):t.strikethrough().gray(d.title);else if(m=h===F?t.cyan().underline(d.title):d.title,h===F&&d.description){if(B=` - ${d.description}`,f.length+m.length+B.length>=this.out.columns||d.description.split(/\r?\n/).length>1)B=`
|
|
146
|
-
`+o(d.description,{margin:f.length,width:this.out.columns})}return f+m+t.gray(B||"")}paginateOptions(h){if(h.length===0)return t.red("No matches for this query.");let{startIndex:d,endIndex:F}=a(this.cursor,h.length,this.optionsPerPage),p,f=[];for(let m=d;m<F;m++){if(m===d&&d>0)p=i.arrowUp;else if(m===F-1&&F<h.length)p=i.arrowDown;else p=" ";f.push(this.renderOption(this.cursor,h[m],m,p))}return`
|
|
147
|
-
`+f.join(`
|
|
148
|
-
`)}renderOptions(h){if(!this.done)return this.paginateOptions(h);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((d)=>d.selected).map((d)=>d.title).join(", ");let h=[t.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)h.push(t.yellow(this.warn));return h.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(r.hide);super.render();let h=[l.symbol(this.done,this.aborted),t.bold(this.msg),l.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)h+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;h+=this.renderOptions(this.value),this.out.write(this.clear+h),this.clear=n(h,this.out.columns)}}u.exports=D}),dE=te((e,u)=>{var t=Et(),r=mr(),{erase:s,cursor:n}=Ct(),{style:i,clear:l,figures:o,wrap:a,entriesToDisplay:D}=Mu(),h=(f,m)=>f[m]&&(f[m].value||f[m].title||f[m]),d=(f,m)=>f[m]&&(f[m].title||f[m].value||f[m]),F=(f,m)=>{let B=f.findIndex((C)=>C.value===m||C.title===m);return B>-1?B:void 0};class p extends r{constructor(f={}){super(f);this.msg=f.message,this.suggest=f.suggest,this.choices=f.choices,this.initial=typeof f.initial==="number"?f.initial:F(f.choices,f.initial),this.select=this.initial||f.cursor||0,this.i18n={noMatches:f.noMatches||"no matches found"},this.fallback=f.fallback||this.initial,this.clearFirst=f.clearFirst||!1,this.suggestions=[],this.input="",this.limit=f.limit||10,this.cursor=0,this.transform=i.render(f.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=l("",this.out.columns),this.complete(this.render),this.render()}set fallback(f){this._fb=Number.isSafeInteger(parseInt(f))?parseInt(f):f}get fallback(){let f;if(typeof this._fb==="number")f=this.choices[this._fb];else if(typeof this._fb==="string")f={title:this._fb};return f||this._fb||{title:this.i18n.noMatches}}moveSelect(f){if(this.select=f,this.suggestions.length>0)this.value=h(this.suggestions,f);else this.value=this.fallback.value;this.fire()}async complete(f){let m=this.completing=this.suggest(this.input,this.choices),B=await m;if(this.completing!==m)return;this.suggestions=B.map((c,y,A)=>({title:d(A,y),value:h(A,y),description:c.description})),this.completing=!1;let C=Math.max(B.length-1,0);this.moveSelect(Math.min(C,this.select)),f&&f()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
149
|
-
`),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
150
|
-
`),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
151
|
-
`),this.close()}_(f,m){let B=this.input.slice(0,this.cursor),C=this.input.slice(this.cursor);this.input=`${B}${f}${C}`,this.cursor=B.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let f=this.input.slice(0,this.cursor-1),m=this.input.slice(this.cursor);this.input=`${f}${m}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let f=this.input.slice(0,this.cursor),m=this.input.slice(this.cursor+1);this.input=`${f}${m}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(f,m,B,C){let c,y=B?o.arrowUp:C?o.arrowDown:" ",A=m?t.cyan().underline(f.title):f.title;if(y=(m?t.cyan(o.pointer)+" ":" ")+y,f.description){if(c=` - ${f.description}`,y.length+A.length+c.length>=this.out.columns||f.description.split(/\r?\n/).length>1)c=`
|
|
152
|
-
`+a(f.description,{margin:3,width:this.out.columns})}return y+" "+A+t.gray(c||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);else this.out.write(l(this.outputText,this.out.columns));super.render();let{startIndex:f,endIndex:m}=D(this.select,this.choices.length,this.limit);if(this.outputText=[i.symbol(this.done,this.aborted,this.exited),t.bold(this.msg),i.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let B=this.suggestions.slice(f,m).map((C,c)=>this.renderOption(C,this.select===c+f,c===0&&f>0,c+f===m-1&&m<this.choices.length)).join(`
|
|
153
|
-
`);this.outputText+=`
|
|
154
|
-
`+(B||t.gray(this.fallback.title))}this.out.write(s.line+n.to(0)+this.outputText)}}u.exports=p}),EE=te((e,u)=>{var t=Et(),{cursor:r}=Ct(),s=E2(),{clear:n,style:i,figures:l}=Mu();class o extends s{constructor(a={}){a.overrideRender=!0;super(a);this.inputValue="",this.clear=n("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((a)=>a.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){let a=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((h)=>{if(this.inputValue){if(typeof h.title==="string"){if(h.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof h.value==="string"){if(h.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});let D=this.filteredOptions.findIndex((h)=>h===a);this.cursor=D<0?0:D,this.render()}handleSpaceToggle(){let a=this.filteredOptions[this.cursor];if(a.selected)a.selected=!1,this.render();else if(a.disabled||this.value.filter((D)=>D.selected).length>=this.maxChoices)return this.bell();else a.selected=!0,this.render()}handleInputChange(a){this.inputValue=this.inputValue+a,this.updateFilteredOptions()}_(a,D){if(a===" ")this.handleSpaceToggle();else this.handleInputChange(a)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
155
|
-
Instructions:
|
|
156
|
-
${l.arrowUp}/${l.arrowDown}: Highlight option
|
|
157
|
-
${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection
|
|
158
|
-
[a,b,c]/delete: Filter choices
|
|
159
|
-
enter/return: Complete answer
|
|
160
|
-
`}return""}renderCurrentInput(){return`
|
|
161
|
-
Filtered results for: ${this.inputValue?this.inputValue:t.gray("Enter something to filter")}
|
|
162
|
-
`}renderOption(a,D,h){let d;if(D.disabled)d=a===h?t.gray().underline(D.title):t.strikethrough().gray(D.title);else d=a===h?t.cyan().underline(D.title):D.title;return(D.selected?t.green(l.radioOn):l.radioOff)+" "+d}renderDoneOrInstructions(){if(this.done)return this.value.filter((D)=>D.selected).map((D)=>D.title).join(", ");let a=[t.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)a.push(t.yellow(this.warn));return a.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(r.hide);super.render();let a=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)a+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;a+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+a),this.clear=n(a,this.out.columns)}}u.exports=o}),CE=te((e,u)=>{var t=Et(),r=mr(),{style:s,clear:n}=Mu(),{erase:i,cursor:l}=Ct();class o extends r{constructor(a={}){super(a);this.msg=a.message,this.value=a.initial,this.initialValue=!!a.initial,this.yesMsg=a.yes||"yes",this.yesOption=a.yesOption||"(Y/n)",this.noMsg=a.no||"no",this.noOption=a.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
163
|
-
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
164
|
-
`),this.close()}_(a,D){if(a.toLowerCase()==="y")return this.value=!0,this.submit();if(a.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);else this.out.write(n(this.outputText,this.out.columns));super.render(),this.outputText=[s.symbol(this.done,this.aborted),t.bold(this.msg),s.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:t.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(i.line+l.to(0)+this.outputText)}}u.exports=o}),pE=te((e,u)=>{u.exports={TextPrompt:eE(),SelectPrompt:tE(),TogglePrompt:uE(),DatePrompt:DE(),NumberPrompt:fE(),MultiselectPrompt:E2(),AutocompletePrompt:dE(),AutocompleteMultiselectPrompt:EE(),ConfirmPrompt:CE()}}),gE=te((e)=>{var u=e,t=pE(),r=(i)=>i;function s(i,l,o={}){return new Promise((a,D)=>{let h=new t[i](l),d=o.onAbort||r,F=o.onSubmit||r,p=o.onExit||r;h.on("state",l.onState||r),h.on("submit",(f)=>a(F(f))),h.on("exit",(f)=>a(p(f))),h.on("abort",(f)=>D(d(f)))})}u.text=(i)=>s("TextPrompt",i),u.password=(i)=>{return i.style="password",u.text(i)},u.invisible=(i)=>{return i.style="invisible",u.text(i)},u.number=(i)=>s("NumberPrompt",i),u.date=(i)=>s("DatePrompt",i),u.confirm=(i)=>s("ConfirmPrompt",i),u.list=(i)=>{let l=i.separator||",";return s("TextPrompt",i,{onSubmit:(o)=>o.split(l).map((a)=>a.trim())})},u.toggle=(i)=>s("TogglePrompt",i),u.select=(i)=>s("SelectPrompt",i),u.multiselect=(i)=>{i.choices=[].concat(i.choices||[]);let l=(o)=>o.filter((a)=>a.selected).map((a)=>a.value);return s("MultiselectPrompt",i,{onAbort:l,onSubmit:l})},u.autocompleteMultiselect=(i)=>{i.choices=[].concat(i.choices||[]);let l=(o)=>o.filter((a)=>a.selected).map((a)=>a.value);return s("AutocompleteMultiselectPrompt",i,{onAbort:l,onSubmit:l})};var n=(i,l)=>Promise.resolve(l.filter((o)=>o.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));u.autocomplete=(i)=>{return i.suggest=i.suggest||n,i.choices=[].concat(i.choices||[]),s("AutocompletePrompt",i)}}),mE=te((e,u)=>{var t=gE(),r=["suggest","format","onState","validate","onRender","type"],s=()=>{};async function n(a=[],{onSubmit:D=s,onCancel:h=s}={}){let d={},F=n._override||{};a=[].concat(a);let p,f,m,B,C,c,y=async(A,T,I=!1)=>{if(!I&&A.validate&&A.validate(T)!==!0)return;return A.format?await A.format(T,d):T};for(f of a){if({name:B,type:C}=f,typeof C==="function")C=await C(p,{...d},f),f.type=C;if(!C)continue;for(let A in f){if(r.includes(A))continue;let T=f[A];f[A]=typeof T==="function"?await T(p,{...d},c):T}if(c=f,typeof f.message!=="string")throw new Error("prompt message is required");if({name:B,type:C}=f,t[C]===void 0)throw new Error(`prompt type (${C}) is not defined`);if(F[f.name]!==void 0){if(p=await y(f,F[f.name]),p!==void 0){d[B]=p;continue}}try{p=n._injected?i(n._injected,f.initial):await t[C](f),d[B]=p=await y(f,p,!0),m=await D(f,p,d)}catch(A){m=!await h(f,d)}if(m)return d}return d}function i(a,D){let h=a.shift();if(h instanceof Error)throw h;return h===void 0?D:h}function l(a){n._injected=(n._injected||[]).concat(a)}function o(a){n._override=Object.assign({},a)}u.exports=Object.assign(n,{prompt:n,prompts:t,inject:l,override:o})}),yE=te((e,u)=>{function t(r){r=(Array.isArray(r)?r:r.split(".")).map(Number);let s=0,n=process.versions.node.split(".").map(Number);for(;s<r.length;s++){if(n[s]>r[s])return!1;if(r[s]>n[s])return!0}return!1}u.exports=t("8.6.0")?Y5():mE()}),FE=te((e,u)=>{u.exports={dots:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},dots2:{interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},dots3:{interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},dots4:{interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},dots5:{interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},dots6:{interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},dots7:{interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},dots8:{interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},dots9:{interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},dots10:{interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},dots11:{interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},dots12:{interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},dots13:{interval:80,frames:["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},dots8Bit:{interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},sand:{interval:80,frames:["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["⠂","-","–","—","–","-"]},pipe:{interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["✶","✸","✹","✺","✹","✷"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},hamburger:{interval:100,frames:["☱","☲","☴"]},growVertical:{interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},growHorizontal:{interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","°","O","o","."]},noise:{interval:100,frames:["▓","▒","░"]},bounce:{interval:120,frames:["⠁","⠂","⠄","⠂"]},boxBounce:{interval:120,frames:["▖","▘","▝","▗"]},boxBounce2:{interval:100,frames:["▌","▀","▐","▄"]},triangle:{interval:50,frames:["◢","◣","◤","◥"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["◜","◠","◝","◞","◡","◟"]},circle:{interval:120,frames:["◡","⊙","◠"]},squareCorners:{interval:180,frames:["◰","◳","◲","◱"]},circleQuarters:{interval:120,frames:["◴","◷","◶","◵"]},circleHalves:{interval:50,frames:["◐","◓","◑","◒"]},squish:{interval:100,frames:["╫","╪"]},toggle:{interval:250,frames:["⊶","⊷"]},toggle2:{interval:80,frames:["▫","▪"]},toggle3:{interval:120,frames:["□","■"]},toggle4:{interval:100,frames:["■","□","▪","▫"]},toggle5:{interval:100,frames:["▮","▯"]},toggle6:{interval:300,frames:["ဝ","၀"]},toggle7:{interval:80,frames:["⦾","⦿"]},toggle8:{interval:100,frames:["◍","◌"]},toggle9:{interval:100,frames:["◉","◎"]},toggle10:{interval:100,frames:["㊂","㊀","㊁"]},toggle11:{interval:50,frames:["⧇","⧆"]},toggle12:{interval:120,frames:["☗","☖"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},arrow2:{interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},arrow3:{interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},smiley:{interval:200,frames:["\uD83D\uDE04 ","\uD83D\uDE1D "]},monkey:{interval:300,frames:["\uD83D\uDE48 ","\uD83D\uDE48 ","\uD83D\uDE49 ","\uD83D\uDE4A "]},hearts:{interval:100,frames:["\uD83D\uDC9B ","\uD83D\uDC99 ","\uD83D\uDC9C ","\uD83D\uDC9A ","❤️ "]},clock:{interval:100,frames:["\uD83D\uDD5B ","\uD83D\uDD50 ","\uD83D\uDD51 ","\uD83D\uDD52 ","\uD83D\uDD53 ","\uD83D\uDD54 ","\uD83D\uDD55 ","\uD83D\uDD56 ","\uD83D\uDD57 ","\uD83D\uDD58 ","\uD83D\uDD59 ","\uD83D\uDD5A "]},earth:{interval:180,frames:["\uD83C\uDF0D ","\uD83C\uDF0E ","\uD83C\uDF0F "]},material:{interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},moon:{interval:80,frames:["\uD83C\uDF11 ","\uD83C\uDF12 ","\uD83C\uDF13 ","\uD83C\uDF14 ","\uD83C\uDF15 ","\uD83C\uDF16 ","\uD83C\uDF17 ","\uD83C\uDF18 "]},runner:{interval:140,frames:["\uD83D\uDEB6 ","\uD83C\uDFC3 "]},pong:{interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},shark:{interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["☀️ ","☀️ ","☀️ ","\uD83C\uDF24 ","⛅️ ","\uD83C\uDF25 ","☁️ ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","⛈ ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","☁️ ","\uD83C\uDF25 ","⛅️ ","\uD83C\uDF24 ","☀️ ","☀️ "]},christmas:{interval:400,frames:["\uD83C\uDF32","\uD83C\uDF84"]},grenade:{interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},point:{interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},layer:{interval:150,frames:["-","=","≡"]},betaWave:{interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},fingerDance:{interval:160,frames:["\uD83E\uDD18 ","\uD83E\uDD1F ","\uD83D\uDD96 ","✋ ","\uD83E\uDD1A ","\uD83D\uDC46 "]},fistBump:{interval:80,frames:["\uD83E\uDD1C \uD83E\uDD1B ","\uD83E\uDD1C \uD83E\uDD1B ","\uD83E\uDD1C \uD83E\uDD1B "," \uD83E\uDD1C \uD83E\uDD1B "," \uD83E\uDD1C\uD83E\uDD1B "," \uD83E\uDD1C✨\uD83E\uDD1B ","\uD83E\uDD1C ✨ \uD83E\uDD1B "]},soccerHeader:{interval:80,frames:[" \uD83E\uDDD1⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️\uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 "]},mindblown:{interval:160,frames:["\uD83D\uDE10 ","\uD83D\uDE10 ","\uD83D\uDE2E ","\uD83D\uDE2E ","\uD83D\uDE26 ","\uD83D\uDE26 ","\uD83D\uDE27 ","\uD83D\uDE27 ","\uD83E\uDD2F ","\uD83D\uDCA5 ","✨ "," "," "," "]},speaker:{interval:160,frames:["\uD83D\uDD08 ","\uD83D\uDD09 ","\uD83D\uDD0A ","\uD83D\uDD09 "]},orangePulse:{interval:100,frames:["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 "]},bluePulse:{interval:100,frames:["\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},orangeBluePulse:{interval:100,frames:["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 ","\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},timeTravel:{interval:100,frames:["\uD83D\uDD5B ","\uD83D\uDD5A ","\uD83D\uDD59 ","\uD83D\uDD58 ","\uD83D\uDD57 ","\uD83D\uDD56 ","\uD83D\uDD55 ","\uD83D\uDD54 ","\uD83D\uDD53 ","\uD83D\uDD52 ","\uD83D\uDD51 ","\uD83D\uDD50 "]},aesthetic:{interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},dwarfFortress:{interval:80,frames:[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]}}}),C2=te((e,u)=>{var t=Object.assign({},FE()),r=Object.keys(t);Object.defineProperty(t,"random",{get(){let s=Math.floor(Math.random()*r.length),n=r[s];return t[n]}}),u.exports=t});var Jr=AE(import.meta.url),vE=Object.create,p2=Object.defineProperty,BE=Object.getOwnPropertyDescriptor,bE=Object.getOwnPropertyNames,SE=Object.getPrototypeOf,TE=Object.prototype.hasOwnProperty,yr=((e)=>typeof Jr<"u"?Jr:typeof Proxy<"u"?new Proxy(e,{get:(u,t)=>(typeof Jr<"u"?Jr:u)[t]}):e)(function(e){if(typeof Jr<"u")return Jr.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),hu=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports),wE=(e,u,t,r)=>{if(u&&typeof u=="object"||typeof u=="function")for(let s of bE(u))!TE.call(e,s)&&s!==t&&p2(e,s,{get:()=>u[s],enumerable:!(r=BE(u,s))||r.enumerable});return e},IE=(e,u,t)=>(t=e!=null?vE(SE(e)):{},wE(u||!e||!e.__esModule?p2(t,"default",{value:e,enumerable:!0}):t,e)),NE=hu((e,u)=>{u.exports=n,n.sync=i;var t=yr("fs");function r(l,o){var a=o.pathExt!==void 0?o.pathExt:process.env.PATHEXT;if(!a||(a=a.split(";"),a.indexOf("")!==-1))return!0;for(var D=0;D<a.length;D++){var h=a[D].toLowerCase();if(h&&l.substr(-h.length).toLowerCase()===h)return!0}return!1}function s(l,o,a){return!l.isSymbolicLink()&&!l.isFile()?!1:r(o,a)}function n(l,o,a){t.stat(l,function(D,h){a(D,D?!1:s(h,l,o))})}function i(l,o){return s(t.statSync(l),l,o)}}),_E=hu((e,u)=>{u.exports=r,r.sync=s;var t=yr("fs");function r(l,o,a){t.stat(l,function(D,h){a(D,D?!1:n(h,o))})}function s(l,o){return n(t.statSync(l),o)}function n(l,o){return l.isFile()&&i(l,o)}function i(l,o){var{mode:a,uid:D,gid:h}=l,d=o.uid!==void 0?o.uid:process.getuid&&process.getuid(),F=o.gid!==void 0?o.gid:process.getgid&&process.getgid(),p=parseInt("100",8),f=parseInt("010",8),m=parseInt("001",8),B=p|f,C=a&m||a&f&&h===F||a&p&&D===d||a&B&&d===0;return C}}),$E=hu((e,u)=>{var t=yr("fs"),r;process.platform==="win32"||global.TESTING_WINDOWS?r=NE():r=_E(),u.exports=s,s.sync=n;function s(i,l,o){if(typeof l=="function"&&(o=l,l={}),!o){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(a,D){s(i,l||{},function(h,d){h?D(h):a(d)})})}r(i,l||{},function(a,D){a&&(a.code==="EACCES"||l&&l.ignoreErrors)&&(a=null,D=!1),o(a,D)})}function n(i,l){try{return r.sync(i,l||{})}catch(o){if(l&&l.ignoreErrors||o.code==="EACCES")return!1;throw o}}}),RE=hu((e,u)=>{var t=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",r=yr("path"),s=t?";":":",n=$E(),i=(D)=>Object.assign(new Error(`not found: ${D}`),{code:"ENOENT"}),l=(D,h)=>{let d=h.colon||s,F=D.match(/\//)||t&&D.match(/\\/)?[""]:[...t?[process.cwd()]:[],...(h.path||"/Users/chrisbreuer/Code/stacks/storage/framework/core/cli/node_modules/.bin:/Users/chrisbreuer/Code/stacks/storage/framework/core/cli/node_modules/.bin:/Users/chrisbreuer/Code/stacks/storage/framework/core/node_modules/.bin:/Users/chrisbreuer/Code/stacks/storage/framework/node_modules/.bin:/Users/chrisbreuer/Code/stacks/storage/node_modules/.bin:/Users/chrisbreuer/Code/stacks/node_modules/.bin:/Users/chrisbreuer/Code/node_modules/.bin:/Users/chrisbreuer/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Users/chrisbreuer/.bun/bin:/Users/chrisbreuer/.pkgx/libpng.org/v1.6.43/bin:/Users/chrisbreuer/.pkgx/freedesktop.org/pkg-config/v0.29.2/bin:/Users/chrisbreuer/.pkgx/sourceware.org/bzip2/v1.0.8/bin:/Users/chrisbreuer/.pkgx/libexpat.github.io/v2.6.2/bin:/Users/chrisbreuer/.pkgx/tukaani.org/xz/v5.6.1/bin:/Users/chrisbreuer/.pkgx/sqlite.org/v3.45.2/bin:/Users/chrisbreuer/.pkgx/gnu.org/readline/v8.2.0/bin:/Users/chrisbreuer/.pkgx/invisible-island.net/ncurses/v6.4.0/bin:/Users/chrisbreuer/.pkgx/tcl-lang.org/v8.6.14/bin:/Users/chrisbreuer/.pkgx/gnome.org/libxml2/v2.12.6/bin:/Users/chrisbreuer/.pkgx/pkgx.sh/v1.1.6/bin:/Users/chrisbreuer/.pkgx/openssl.org/v1.1.1w/bin:/Users/chrisbreuer/.pkgx/python.org/v3.11.9/bin:/Users/chrisbreuer/.pkgx/gnu.org/gettext/v0.21.1/bin:/Users/chrisbreuer/.pkgx/curl.se/v8.6.0/bin:/Users/chrisbreuer/.pkgx/perl.org/v5.38.2/bin:/Users/chrisbreuer/.pkgx/aws.amazon.com/cli/v2.17.13/bin:/Users/chrisbreuer/.pkgx/bun.sh/v1.1.33/bin:/Users/chrisbreuer/.pkgx/dns.lookup.dog/v0.1.0/bin:/Users/chrisbreuer/.pkgx/httpie.io/v3.2.2/bin:/Users/chrisbreuer/.pkgx/info-zip.org/zip/v3.0.0/bin:/Users/chrisbreuer/.pkgx/info-zip.org/unzip/v6.0.0/bin:/Users/chrisbreuer/.pkgx/mailpit.axllent.org/v1.15.0/bin:/Users/chrisbreuer/.pkgx/redis.io/v7.4.0/bin:/Users/chrisbreuer/.pkgx/git-scm.org/v2.44.0/bin:.:node_modules/.bin:vendor/bin:/opt/homebrew/bin:/Users/chrisbreuer/.composer/vendor/bin:/Users/chrisbreuer/.dotfiles/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/share/cputil-osx-x64_v112/cputil-osx-x64:/Users/chrisbreuer/.bun/bin:.:node_modules/.bin:vendor/bin:/Users/chrisbreuer/.composer/vendor/bin:/Users/chrisbreuer/.dotfiles/bin:/Users/chrisbreuer/.local/bin:/Users/chrisbreuer/Library/Application Support/JetBrains/Toolbox/scripts:/Users/chrisbreuer/Library/Application Support/JetBrains/Toolbox/scripts").split(d)],p=t?h.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",f=t?p.split(d):[""];return t&&D.indexOf(".")!==-1&&f[0]!==""&&f.unshift(""),{pathEnv:F,pathExt:f,pathExtExe:p}},o=(D,h,d)=>{typeof h=="function"&&(d=h,h={}),h||(h={});let{pathEnv:F,pathExt:p,pathExtExe:f}=l(D,h),m=[],B=(c)=>new Promise((y,A)=>{if(c===F.length)return h.all&&m.length?y(m):A(i(D));let T=F[c],I=/^".*"$/.test(T)?T.slice(1,-1):T,v=r.join(I,D),g=!I&&/^\.[\\\/]/.test(D)?D.slice(0,2)+v:v;y(C(g,c,0))}),C=(c,y,A)=>new Promise((T,I)=>{if(A===p.length)return T(B(y+1));let v=p[A];n(c+v,{pathExt:f},(g,E)=>{if(!g&&E)if(h.all)m.push(c+v);else return T(c+v);return T(C(c,y,A+1))})});return d?B(0).then((c)=>d(null,c),d):B(0)},a=(D,h)=>{h=h||{};let{pathEnv:d,pathExt:F,pathExtExe:p}=l(D,h),f=[];for(let m=0;m<d.length;m++){let B=d[m],C=/^".*"$/.test(B)?B.slice(1,-1):B,c=r.join(C,D),y=!C&&/^\.[\\\/]/.test(D)?D.slice(0,2)+c:c;for(let A=0;A<F.length;A++){let T=y+F[A];try{if(n.sync(T,{pathExt:p}))if(h.all)f.push(T);else return T}catch{}}}if(h.all&&f.length)return f;if(h.nothrow)return null;throw i(D)};u.exports=o,o.sync=a}),OE=hu((e,u)=>{var t=(r={})=>{let s=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(s).reverse().find((n)=>n.toUpperCase()==="PATH")||"Path"};u.exports=t,u.exports.default=t}),LE=hu((e,u)=>{var t=yr("path"),r=RE(),s=OE();function n(l,o){let a=l.options.env||process.env,D=process.cwd(),h=l.options.cwd!=null,d=h&&process.chdir!==void 0&&!process.chdir.disabled;if(d)try{process.chdir(l.options.cwd)}catch{}let F;try{F=r.sync(l.command,{path:a[s({env:a})],pathExt:o?t.delimiter:void 0})}catch{}finally{d&&process.chdir(D)}return F&&(F=t.resolve(h?l.options.cwd:"",F)),F}function i(l){return n(l)||n(l,!0)}u.exports=i}),UE=hu((e,u)=>{var t=/([()\][%!^"`<>&|;, *?])/g;function r(n){return n=n.replace(t,"^$1"),n}function s(n,i){return n=`${n}`,n=n.replace(/(\\*)"/g,"$1$1\\\""),n=n.replace(/(\\*)$/,"$1$1"),n=`"${n}"`,n=n.replace(t,"^$1"),i&&(n=n.replace(t,"^$1")),n}u.exports.command=r,u.exports.argument=s}),PE=hu((e,u)=>{u.exports=/^#!(.*)/}),ME=hu((e,u)=>{var t=PE();u.exports=(r="")=>{let s=r.match(t);if(!s)return null;let[n,i]=s[0].replace(/#! ?/,"").split(" "),l=n.split("/").pop();return l==="env"?i:i?`${l} ${i}`:l}}),kE=hu((e,u)=>{var t=yr("fs"),r=ME();function s(n){let i=Buffer.alloc(150),l;try{l=t.openSync(n,"r"),t.readSync(l,i,0,150,0),t.closeSync(l)}catch{}return r(i.toString())}u.exports=s}),VE=hu((e,u)=>{var t=yr("path"),r=LE(),s=UE(),n=kE(),i=process.platform==="win32",l=/\.(?:com|exe)$/i,o=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function a(d){d.file=r(d);let F=d.file&&n(d.file);return F?(d.args.unshift(d.file),d.command=F,r(d)):d.file}function D(d){if(!i)return d;let F=a(d),p=!l.test(F);if(d.options.forceShell||p){let f=o.test(F);d.command=t.normalize(d.command),d.command=s.command(d.command),d.args=d.args.map((B)=>s.argument(B,f));let m=[d.command].concat(d.args).join(" ");d.args=["/d","/s","/c",`"${m}"`],d.command=process.env.comspec||"cmd.exe",d.options.windowsVerbatimArguments=!0}return d}function h(d,F,p){F&&!Array.isArray(F)&&(p=F,F=null),F=F?F.slice(0):[],p=Object.assign({},p);let f={command:d,args:F,options:p,file:void 0,original:{command:d,args:F}};return p.shell?f:D(f)}u.exports=h}),KE=hu((e,u)=>{var t=process.platform==="win32";function r(l,o){return Object.assign(new Error(`${o} ${l.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${o} ${l.command}`,path:l.command,spawnargs:l.args})}function s(l,o){if(!t)return;let a=l.emit;l.emit=function(D,h){if(D==="exit"){let d=n(h,o,"spawn");if(d)return a.call(l,"error",d)}return a.apply(l,arguments)}}function n(l,o){return t&&l===1&&!o.file?r(o.original,"spawn"):null}function i(l,o){return t&&l===1&&!o.file?r(o.original,"spawnSync"):null}u.exports={hookChildProcess:s,verifyENOENT:n,verifyENOENTSync:i,notFoundError:r}}),GE=hu((e,u)=>{var t=yr("child_process"),r=VE(),s=KE();function n(l,o,a){let D=r(l,o,a),h=t.spawn(D.command,D.args,D.options);return s.hookChildProcess(h,D),h}function i(l,o,a){let D=r(l,o,a),h=t.spawnSync(D.command,D.args,D.options);return h.error=h.error||s.verifyENOENTSync(h.status,D),h}u.exports=n,u.exports.spawn=n,u.exports.sync=i,u.exports._parse=r,u.exports._enoent=s});var xS=IE(GE(),1);function xn(e){return e==null?[]:Array.isArray(e)?e:[e]}function WE(e,u,t,r){var s,n=e[u],i=~r.string.indexOf(u)?t==null||t===!0?"":String(t):typeof t==="boolean"?t:~r.boolean.indexOf(u)?t==="false"?!1:t==="true"||(e._.push((s=+t,s*0===0)?s:t),!!t):(s=+t,s*0===0)?s:t;e[u]=n==null?i:Array.isArray(n)?n.concat(i):[n,i]}function HE(e,u){e=e||[],u=u||{};var t,r,s,n,i,l={_:[]},o=0,a=0,D=0,h=e.length;let d=u.alias!==void 0,F=u.unknown!==void 0,p=u.default!==void 0;if(u.alias=u.alias||{},u.string=xn(u.string),u.boolean=xn(u.boolean),d)for(t in u.alias){r=u.alias[t]=xn(u.alias[t]);for(o=0;o<r.length;o++)(u.alias[r[o]]=r.concat(t)).splice(o,1)}for(o=u.boolean.length;o-- >0;){r=u.alias[u.boolean[o]]||[];for(a=r.length;a-- >0;)u.boolean.push(r[a])}for(o=u.string.length;o-- >0;){r=u.alias[u.string[o]]||[];for(a=r.length;a-- >0;)u.string.push(r[a])}if(p){for(t in u.default)if(n=typeof u.default[t],r=u.alias[t]=u.alias[t]||[],u[n]!==void 0){u[n].push(t);for(o=0;o<r.length;o++)u[n].push(r[o])}}let f=F?Object.keys(u.alias):[];for(o=0;o<h;o++){if(s=e[o],s==="--"){l._=l._.concat(e.slice(++o));break}for(a=0;a<s.length;a++)if(s.charCodeAt(a)!==45)break;if(a===0)l._.push(s);else if(s.substring(a,a+3)==="no-"){if(n=s.substring(a+3),F&&!~f.indexOf(n))return u.unknown(s);l[n]=!1}else{for(D=a+1;D<s.length;D++)if(s.charCodeAt(D)===61)break;n=s.substring(a,D),i=s.substring(++D)||(o+1===h||(""+e[o+1]).charCodeAt(0)===45||e[++o]),r=a===2?[n]:n;for(D=0;D<r.length;D++){if(n=r[D],F&&!~f.indexOf(n))return u.unknown("-".repeat(a)+n);WE(l,n,D+1<r.length||i,u)}}}if(p){for(t in u.default)if(l[t]===void 0)l[t]=u.default[t]}if(d)for(t in l){r=u.alias[t]||[];while(r.length>0)l[r.shift()]=l[t]}return l}var g2=(e)=>e.replace(/[<[].+/,"").trim(),QE=(e)=>{let u=/<([^>]+)>/g,t=/\[([^\]]+)\]/g,r=[],s=(l)=>{let o=!1,a=l[1];if(a.startsWith("..."))a=a.slice(3),o=!0;return{required:l[0].startsWith("<"),value:a,variadic:o}},n;while(n=u.exec(e))r.push(s(n));let i;while(i=t.exec(e))r.push(s(i));return r},YE=(e)=>{let u={alias:{},boolean:[]};for(let[t,r]of e.entries()){if(r.names.length>1)u.alias[r.names[0]]=r.names.slice(1);if(r.isBoolean)if(r.negated){if(!e.some((n,i)=>{return i!==t&&n.names.some((l)=>r.names.includes(l))&&typeof n.required==="boolean"}))u.boolean.push(r.names[0])}else u.boolean.push(r.names[0])}return u},Lh=(e)=>{return e.sort((u,t)=>{return u.length>t.length?-1:1})[0]},Uh=(e,u)=>{return e.length>=u?e:`${e}${" ".repeat(u-e.length)}`},zE=(e)=>{return e.replace(/([a-z])-([a-z])/g,(u,t,r)=>{return t+r.toUpperCase()})},qE=(e,u,t)=>{let r=0,s=u.length,n=e,i;for(;r<s;++r)i=n[u[r]],n=n[u[r]]=r===s-1?t:i!=null?i:!!~u[r+1].indexOf(".")||!(+u[r+1]>-1)?{}:[]},xE=(e,u)=>{for(let t of Object.keys(u)){let r=u[t];if(r.shouldTransform){if(e[t]=Array.prototype.concat.call([],e[t]),typeof r.transformFunction==="function")e[t]=e[t].map(r.transformFunction)}}},ZE=(e)=>{let u=/([^\\\/]+)$/.exec(e);return u?u[1]:""},m2=(e)=>{return e.split(".").map((u,t)=>{return t===0?zE(u):u}).join(".")};class Ns extends Error{constructor(e){super(e);if(this.name=this.constructor.name,typeof Error.captureStackTrace==="function")Error.captureStackTrace(this,this.constructor);else this.stack=new Error(e).stack}}class y2{constructor(e,u,t){if(this.rawName=e,this.description=u,this.config=Object.assign({},t),e=e.replace(/\.\*/g,""),this.negated=!1,this.names=g2(e).split(",").map((r)=>{let s=r.trim().replace(/^-{1,2}/,"");if(s.startsWith("no-"))this.negated=!0,s=s.replace(/^no-/,"");return m2(s)}).sort((r,s)=>r.length>s.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null)this.config.default=!0;if(e.includes("<"))this.required=!0;else if(e.includes("["))this.required=!1;else this.isBoolean=!0}}var XE=process.argv,JE=`${process.platform}-${process.arch} node-${process.version}`;class Ta{constructor(e,u,t={},r){this.rawName=e,this.description=u,this.config=t,this.cli=r,this.options=[],this.aliasNames=[],this.name=g2(e),this.args=QE(e),this.examples=[]}usage(e){return this.usageText=e,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(e,u="-v, --version"){return this.versionNumber=e,this.option(u,"Display version number"),this}example(e){return this.examples.push(e),this}option(e,u,t){let r=new y2(e,u,t);return this.options.push(r),this}alias(e){return this.aliasNames.push(e),this}action(e){return this.commandAction=e,this}isMatched(e){return this.name===e||this.aliasNames.includes(e)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof wa}hasOption(e){return e=e.split(".")[0],this.options.find((u)=>{return u.names.includes(e)})}outputHelp(){let{name:e,commands:u}=this.cli,{versionNumber:t,options:r,helpCallback:s}=this.cli.globalCommand,n=[{body:`${e}${t?`/${t}`:""}`}];if(n.push({title:"Usage",body:` $ ${e} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&u.length>0){let o=Lh(u.map((a)=>a.rawName));n.push({title:"Commands",body:u.map((a)=>{return` ${Uh(a.rawName,o.length)} ${a.description}`}).join(`
|
|
165
|
-
`)}),n.push({title:"For more info, run any command with the `--help` flag",body:u.map((a)=>` $ ${e}${a.name===""?"":` ${a.name}`} --help`).join(`
|
|
166
|
-
`)})}let l=this.isGlobalCommand?r:[...this.options,...r||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand)l=l.filter((o)=>o.name!=="version");if(l.length>0){let o=Lh(l.map((a)=>a.rawName));n.push({title:"Options",body:l.map((a)=>{return` ${Uh(a.rawName,o.length)} ${a.description} ${a.config.default===void 0?"":`(default: ${a.config.default})`}`}).join(`
|
|
167
|
-
`)})}if(this.examples.length>0)n.push({title:"Examples",body:this.examples.map((o)=>{if(typeof o==="function")return o(e);return o}).join(`
|
|
168
|
-
`)});if(s)n=s(n)||n;console.log(n.map((o)=>{return o.title?`${o.title}:
|
|
169
|
-
${o.body}`:o.body}).join(`
|
|
170
|
-
|
|
171
|
-
`))}outputVersion(){let{name:e}=this.cli,{versionNumber:u}=this.cli.globalCommand;if(u)console.log(`${e}/${u} ${JE}`)}checkRequiredArgs(){let e=this.args.filter((u)=>u.required).length;if(this.cli.args.length<e)throw new Ns(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:e,globalCommand:u}=this.cli;if(!this.config.allowUnknownOptions){for(let t of Object.keys(e))if(t!=="--"&&!this.hasOption(t)&&!u.hasOption(t))throw new Ns(`Unknown option \`${t.length>1?`--${t}`:`-${t}`}\``)}}checkOptionValue(){let{options:e,globalCommand:u}=this.cli,t=[...u.options,...this.options];for(let r of t){let s=e[r.name.split(".")[0]];if(r.required){let n=t.some((i)=>i.negated&&i.names.includes(r.name));if(s===!0||s===!1&&!n)throw new Ns(`option \`${r.rawName}\` value is missing`)}}}}class wa extends Ta{constructor(e){super("@@global@@","",{},e)}}var Bs=Object.assign;class eC extends jE{constructor(e=""){super();this.name=e,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new wa(this),this.globalCommand.usage("<command> [options]")}usage(e){return this.globalCommand.usage(e),this}command(e,u,t){let r=new Ta(e,u||"",t,this);return r.globalCommand=this.globalCommand,this.commands.push(r),r}option(e,u,t){return this.globalCommand.option(e,u,t),this}help(e){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=e,this.showHelpOnExit=!0,this}version(e,u="-v, --version"){return this.globalCommand.version(e,u),this.showVersionOnExit=!0,this}example(e){return this.globalCommand.example(e),this}outputHelp(){if(this.matchedCommand)this.matchedCommand.outputHelp();else this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:e,options:u},t,r){if(this.args=e,this.options=u,t)this.matchedCommand=t;if(r)this.matchedCommandName=r;return this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(e=XE,{run:u=!0}={}){if(this.rawArgs=e,!this.name)this.name=e[1]?ZE(e[1]):"cli";let t=!0;for(let s of this.commands){let n=this.mri(e.slice(2),s),i=n.args[0];if(s.isMatched(i)){t=!1;let l=Bs(Bs({},n),{args:n.args.slice(1)});this.setParsedInfo(l,s,i),this.emit(`command:${i}`,s)}}if(t){for(let s of this.commands)if(s.name===""){t=!1;let n=this.mri(e.slice(2),s);this.setParsedInfo(n,s),this.emit("command:!",s)}}if(t){let s=this.mri(e.slice(2));this.setParsedInfo(s)}if(this.options.help&&this.showHelpOnExit)this.outputHelp(),u=!1,this.unsetMatchedCommand();if(this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null)this.outputVersion(),u=!1,this.unsetMatchedCommand();let r={args:this.args,options:this.options};if(u)this.runMatchedCommand();if(!this.matchedCommand&&this.args[0])this.emit("command:*");return r}mri(e,u){let t=[...this.globalCommand.options,...u?u.options:[]],r=YE(t),s=[],n=e.indexOf("--");if(n>-1)s=e.slice(n+1),e=e.slice(0,n);let i=HE(e,r);i=Object.keys(i).reduce((h,d)=>{return Bs(Bs({},h),{[m2(d)]:i[d]})},{_:[]});let l=i._,o={"--":s},a=u&&u.config.ignoreOptionDefaultValue?u.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,D=Object.create(null);for(let h of t){if(!a&&h.config.default!==void 0)for(let d of h.names)o[d]=h.config.default;if(Array.isArray(h.config.type)){if(D[h.name]===void 0)D[h.name]=Object.create(null),D[h.name].shouldTransform=!0,D[h.name].transformFunction=h.config.type[0]}}for(let h of Object.keys(i))if(h!=="_"){let d=h.split(".");qE(o,d,i[h]),xE(o,D)}return{args:l,options:o}}runMatchedCommand(){let{args:e,options:u,matchedCommand:t}=this;if(!t||!t.commandAction)return;t.checkUnknownOptions(),t.checkOptionValue(),t.checkRequiredArgs();let r=[];return t.args.forEach((s,n)=>{if(s.variadic)r.push(e.slice(n));else r.push(e[n])}),r.push(u),t.commandAction.apply(this,r)}}var At={};pa(At,{ui:()=>Mg,team:()=>Pg,storage:()=>Ug,services:()=>Lg,security:()=>$g,searchEngine:()=>Og,saas:()=>Rg,queue:()=>_g,ports:()=>Ng,payment:()=>Ig,overrides:()=>H2,notification:()=>wg,logging:()=>Tg,localUrl:()=>Vp,library:()=>Sg,hashing:()=>bg,git:()=>Bg,errors:()=>vg,email:()=>Ag,docs:()=>Fg,dns:()=>yg,determineAppEnv:()=>kg,defineUi:()=>cg,defineStorage:()=>og,defineStacksConfig:()=>Kp,defineSms:()=>lg,defineServices:()=>hg,defineSecurity:()=>ag,defineSearchEngine:()=>ng,defineQueue:()=>sg,definePayment:()=>ig,defineNotification:()=>rg,defineModel:()=>Dg,defineLibrary:()=>ug,defineJob:()=>Yp,defineHashing:()=>tg,defineGit:()=>eg,defineEvents:()=>fg,defineEmailConfig:()=>Xp,defineEmail:()=>Jp,defineDns:()=>Zp,defineDependencies:()=>xp,defineDatabase:()=>qp,defineCronJob:()=>zp,defineCli:()=>Qp,defineChat:()=>Hp,defineCdn:()=>Wp,defineCache:()=>jp,defineApp:()=>Gp,defaults:()=>w2,database:()=>mg,config:()=>Ye,cloud:()=>pg,cli:()=>gg,cache:()=>Cg,app:()=>Rr,analytics:()=>Eg,ai:()=>dg});var nC=new Set([".","!","?"]),fT=new Set([...nC,":",'"',"'","”"]);var Ia=[],Na=[],v2={},Vi={},Ki={};function B2(e){return typeof e==="string"?new RegExp(`^${e}$`,"i"):e}function Ps(e,u){if(e===u)return u;if(e===e.toLowerCase())return u.toLowerCase();if(e===e.toUpperCase())return u.toUpperCase();if(e[0]===e[0].toUpperCase())return u.charAt(0).toUpperCase()+u.slice(1).toLowerCase();return u.toLowerCase()}function aC(e,...u){return e.replace(/\$(\d{1,2})/g,(t,r)=>u[Number(r)]||"")}function hC(e,u){return e.replace(u[0],(...t)=>{let r=aC(u[1],...t);if(t[0]==="")return Ps(e[t[t.length-2]-1],r);return Ps(t[0],r)})}function b2(e,u,t){if(!e.length||v2[e])return u;for(let r=t.length-1;r>=0;r--){let s=t[r];if(s[0].test(u))return hC(u,s)}return u}function S2(e,u,t){return(r)=>{let s=r.toLowerCase();if(u[s])return Ps(r,s);if(e[s])return Ps(r,e[s]);return b2(s,r,t)}}function T2(e,u,t){return(r)=>{let s=r.toLowerCase();if(u[s])return!0;if(e[s])return!1;return b2(s,s,t)===s}}var Zt=(e,u={})=>{let{count:t=2,inclusive:r=!1}=u;if(typeof e!=="string")throw new TypeError("Word must be a string");let s=t===1?Zt.singular(e):Zt.plural(e);return r?`${t} ${s}`:s};Zt.plural=S2(Ki,Vi,Ia);Zt.isPlural=T2(Ki,Vi,Ia);Zt.singular=S2(Vi,Ki,Na);Zt.isSingular=T2(Vi,Ki,Na);Zt.addPluralRule=(e,u)=>{Ia.push([B2(e),u])};Zt.addSingularRule=(e,u)=>{Na.push([B2(e),u])};Zt.addUncountableRule=(e)=>{if(typeof e==="string"){v2[e.toLowerCase()]=!0;return}Zt.addPluralRule(e,"$0"),Zt.addSingularRule(e,"$0")};Zt.addIrregularRule=(e,u)=>{let t=u.toLowerCase(),r=e.toLowerCase();Ki[r]=t,Vi[t]=r};[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["my","our"],["its","their"],["his","their"],["her","their"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"],["canvas","canvases"]].forEach(([e,u])=>Zt.addIrregularRule(e,u));[[/s?$/i,"s"],[/[^\x20-\x7F]$/,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(([e,u])=>Zt.addPluralRule(e,u));[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|\W|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/(dg|ss|ois|lk|ok|wn|mb|th|ch|ec|oal|is|ck|ix|sser|ts|wb)ies$/i,"$1ie"],[/\b(l|(?:neck|cross|hog|aun)?t|coll|faer|food|gen|goon|group|hipp|junk|vegg|(?:pork)?p|charl|calor|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(([e,u])=>Zt.addSingularRule(e,u));["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\u00E9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(Zt.addUncountableRule);var dT=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}'),ET=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');a2();ga();ya();Ws();function lC(){let e=/--verbose(?!\s*=\s*false|\s+false)(?:\s+|=true)?(?:$|\s)/,u=J2();if(e.test(u))return 4;return 3}var Ri={...Jo({level:lC()}),warning:(e)=>console.warn(e),dump:(...e)=>console.log(...e),dd:(...e)=>{console.log(...e),_s.exit(1)},echo:(e)=>console.log(e)},me={info:async(e,u)=>{if(u?.styled===!1)console.log(e);else Ri.info(e);await Or(`INFO: ${Bu(e)}`)},success:async(e,u)=>{if(u?.styled===!1)console.log(e);else Ri.success(e);await Or(`SUCCESS: ${Bu(e)}`)},warn:async(e,u)=>{if(u?.styled===!1)console.log(e);else Ri.warn(e);await Or(`WARN: ${Bu(e)}`)},warning:async(e,u)=>{if(u?.styled===!1)console.log(e);else Ri.warn(e);await Or(`WARN: ${Bu(e)}`)},error:async(e,u)=>{Vg(e,u)},debug:async(...e)=>{let t=`DEBUG: ${e.map((r)=>typeof r==="object"?JSON.stringify(r,null,2):r).join(" ")}`;if(_s.env.APP_ENV==="production"||_s.env.APP_ENV==="prod")return Or(t);Ri.debug(t),await Or(Bu(t))},dump:(...e)=>e.forEach((u)=>console.log(u)),dd:(...e)=>{e.forEach((u)=>console.log(u)),_s.exit(1)},echo:(...e)=>console.log(...e)};function oC(e){return _a(`database/${e||""}`)}function cC(e){return _a(`app/${e||""}`)}function DC(e){return cC(`Commands/${e||""}`)}function kh(e){return oa(`logs/${e||""}`)}function _a(e="",u){let t=Mh.cwd();while(t.includes("storage"))t=Ph(t,"..");let r=Ph(t,e);if(u?.relative)return sC(Mh.cwd(),r);return r}function oa(e){return _a(`storage/${e||""}`)}var fC={ai:{deploy:!1,models:["amazon.titan-embed-text-v1","amazon.titan-text-express-v1","amazon.titan-embed-image-v1","amazon.titan-image-generator-v1","anthropic.claude-v1","anthropic.claude-v2","anthropic.claude-v2:1","anthropic.claude-instant-v1","meta.llama2-13b-chat-v1","meta.llama2-70b-chat-v1"]},analytics:{driver:void 0},app:{name:"Stacks",description:"A Stacks application.",env:"local",url:"stacks.localhost",debug:!0,key:"",timezone:"UTC",locale:"en",fallbackLocale:"en",cipher:"AES-256-CBC",docMode:!1,redirectUrls:[],maintenanceMode:!1},cli:{name:"My Custom CLI",command:"my-custom-cli",description:"Stacks is a full-stack framework for TypeScript.",source:DC(),deploy:!1},cache:{driver:"redis",prefix:"stx",ttl:3600,drivers:{redis:{connection:"default",host:"localhost",port:6379,username:"",password:""}}},cloud:{type:"serverless",driver:"aws",storage:{},environments:["production","staging","development"],firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0},cdn:{allowedMethods:"GET_HEAD",cachedMethods:"GET_HEAD",minTtl:0,defaultTtl:86400,maxTtl:31536000,compress:!0,priceClass:"PriceClass_All",originShieldRegion:"us-east-1",cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:2}},fileSystem:!1},database:{default:"sqlite",connections:{sqlite:{database:oC("stacks.sqlite"),prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"},dns:{driver:"aws",a:[],aaaa:[],cname:[],mx:[],txt:[]},docs:{lang:"en-US",title:"Stacks",description:"Rapid application, cloud & library framework.",lastUpdated:!0,deploy:!1,themeConfig:{editLink:{pattern:"https://github.com/stacksjs/stacks/edit/main/docs/docs/:path",text:"Edit this page on GitHub"},footer:{message:"Released under the MIT License.",copyright:"Copyright © 2024-present Stacks.js, Inc."}}},email:{from:{name:"Stacks",address:"no-reply@stacksjs.org"},mailboxes:[],server:{scan:!0}},errors:{messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}},git:{hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you’re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:`Write a SHORT, IMPERATIVE tense description of the change:
|
|
172
|
-
`,body:`Provide a LONGER description of the change (optional). Use "|" to break new line:
|
|
173
|
-
`,breaking:`List any BREAKING CHANGES (optional). Use "|" to break new line:
|
|
174
|
-
`,footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:`List any ISSUES by this change. E.g.: #31, #34:
|
|
175
|
-
`,confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: ✨ A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: ♻️ A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: ⚡️ A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: ✅ Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6️ Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don’t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: ⏪️ Reverts a previous commit",emoji:":rewind:"}]},hashing:{driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,time:1}},library:{name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}},logging:{logsPath:"storage/logs/stacks.log",deploymentsPath:"storage/logs/deployments.log"},notification:{default:"email"},payment:{driver:"stripe"},ports:{frontend:3000,backend:3001,admin:3002,library:3003,desktop:3004,email:3005,docs:3006,inspect:3007,api:3008,systemTray:3009,database:3010},queue:{default:"sync",connections:{sync:{driver:"sync"},database:{driver:"database",table:"jobs",queue:"default",retry_after:90},redis:{driver:"redis",connection:"default",queue:"default",retry_after:90},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}},saas:{plans:[{productName:"Stacks Hobby",description:"All the Stacks features.",pricing:[{key:"stacks_hobby_monthly",price:3900,interval:"month",currency:"usd"},{key:"stacks_hobby_yearly",price:37900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}},{productName:"Stacks Pro",description:"All the Stacks features, including being able to invite team members.",pricing:[{key:"stacks_pro_monthly",price:5900,interval:"month",currency:"usd"},{key:"stacks_pro_yearly",price:57900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}}],webhook:{endpoint:"/webhooks/stripe",secret:""},currencies:["usd"],coupons:[{code:"SUMMER2024",amountOff:500,duration:"once"}],products:[{name:"Stacks Pro",description:"All the Stacks features.",images:["url_to_image"]}]},searchEngine:{driver:"opensearch"},security:{firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0}},services:{aws:{accountId:"",appId:"",apiKey:"",region:"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}},storage:{driver:"s3"},team:{name:"Stacks",members:{"Chris Breuer":"chris@stacksjs.org"}},ui:{shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}}}},w2=fC,dC={default:"meta.llama2-70b-chat-v1",models:["amazon.titan-text-express-v1","amazon.titan-text-lite-v1","meta.llama2-70b-chat-v1"],deploy:!0},EC={driver:"fathom",drivers:{googleAnalytics:{trackingId:"UA-XXXXXXXXX-X"},fathom:{siteId:"WOLZMJDL"}}};function pC(e){return typeof e==="string"}var le={required:"The {{ field }} field must be defined",string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",mobile:"The {{ field }} field must be a valid mobile phone number",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",regex:"The {{ field }} field format is invalid",ascii:"The {{ field }} field must only contain ASCII characters",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",hexCode:"The {{ field }} field must be a valid hex color code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number","number.in":"The selected {{ field }} is not in {{ values }}",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must be an integer",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}","date.afterOrSameAs":"The {{ field }} field must be a date after or same as {{ otherField }}","date.beforeField":"The {{ field }} field must be a date before {{ otherField }}","date.beforeOrSameAs":"The {{ field }} field must be a date before or same as {{ otherField }}","date.weekend":"The {{ field }} field is not a weekend","date.weekday":"The {{ field }} field is not a weekday"},gC={"":"data"},mC=Object.defineProperty,I2=(e,u)=>{for(var t in u)mC(e,t,{get:u[t],enumerable:!0})};function yC(e,u,t,r,s){for(u=u.split?u.split("."):u,r=0;r<u.length;r++)e=e?e[u[r]]:s;return e===s?t:e}var FC=Ge(va(),1),AC=Ge(e5(),1),vC=Ge(t5(),1),BC=Ge(u5(),1),bC=Ge(r5(),1),SC=Ge(i5(),1),TC=Ge(s5(),1),wC=Ge(a5(),1),IC=Ge(h5(),1),NC=Ge(l5(),1),_C=Ge(c5(),1),$C=Ge(D5(),1),RC=Ge(d5(),1),OC=Ge(E5(),1),LC=Ge(C5(),1),UC=Ge(l2(),1),PC=Ge(o2(),1),MC=Ge(o2(),1),kC=Ge(l2(),1),VC=class{#e;#t;constructor(e,u){this.#e=e,this.#t=u||{}}#u(e,u){if(!e.includes("{{"))return e;return e.replace(/(\\)?{{(.*?)}}/g,(t,r,s)=>{let n=s.trim().split("."),i=u;while(n.length){if(i===null||typeof i!=="object")return;let l=n.shift();i=Object.hasOwn(i,l)?i[l]:void 0}return i})}getMessage(e,u,t,r){let s=this.#t[t.name]||t.name,n=this.#e[`${t.getFieldPath()}.${u}`];if(n)return this.#u(n,{field:s,...r});let i=this.#e[`${t.wildCardPath}.${u}`];if(i)return this.#u(i,{field:s,...r});let l=this.#e[u];if(l)return this.#u(l,{field:s,...r});return this.#u(e,{field:s,...r})}toJSON(){return{messages:this.#e,fields:this.#t}}},KC={};I2(KC,{E_VALIDATION_ERROR:()=>_2});var N2=class extends Error{constructor(e,u){super("Validation failure",u);this.messages=e;let t=this.constructor;Error.captureStackTrace(this,t)}status=422;code="E_VALIDATION_ERROR";get[Symbol.toStringTag](){return this.constructor.name}toString(){return`${this.name} [${this.code}]: ${this.message}`}},_2=N2,GC=class{hasErrors=!1;errors=[];report(e,u,t,r){let s={message:e,rule:u,field:t.getFieldPath()};if(r)s.meta=r;if(t.isArrayMember)s.index=t.name;this.hasErrors=!0,this.errors.push(s)}createError(){return new _2(this.errors)}},jC=["1",1,"true",!0,"on"],WC=["0",0,"false",!1],Be={exists(e){return e!==null&&e!==void 0},isMissing(e){return!this.exists(e)},isTrue(e){return jC.includes(e)},isFalse(e){return WC.includes(e)},isString(e){return typeof e==="string"},isObject(e){return!!(e&&typeof e==="object"&&!Array.isArray(e))},hasKeys(e,u){for(let t of u)if(t in e===!1)return!1;return!0},isArray(e){return Array.isArray(e)},isNumeric(e){return!Number.isNaN(Number(e))},asNumber(e){return e===null?Number.NaN:Number(e)},asBoolean(e){if(this.isTrue(e))return!0;if(this.isFalse(e))return!1;return null},isEmail:wC.default.default,isURL:vC.default.default,isAlpha:IC.default.default,isAlphaNumeric:OC.default.default,isIP:FC.default.default,isUUID:SC.default.default,isAscii:TC.default.default,isCreditCard:RC.default.default,isIBAN:bC.default.default,isJWT:AC.default.default,isLatLong:NC.default.default,isMobilePhone:PC.default.default,isPassportNumber:LC.default.default,isPostalCode:UC.default.default,isSlug:BC.default.default,isDecimal:_C.default.default,mobileLocales:MC.locales,postalCountryCodes:kC.locales,passportCountryCodes:["AM","AR","AT","AU","AZ","BE","BG","BR","BY","CA","CH","CY","CZ","DE","DK","DZ","ES","FI","FR","GB","GR","HR","HU","IE","IN","ID","IR","IS","IT","JM","JP","KR","KZ","LI","LT","LU","LV","LY","MT","MZ","MY","MX","NL","NZ","PH","PK","PL","PT","RO","RU","SE","SL","SK","TH","TR","UA","US"],isHexColor:(e)=>{if(!e.startsWith("#"))return!1;return $C.default.default(e)},isActiveURL:async(e)=>{let{resolve4:u,resolve6:t}=await import("dns/promises");try{let{hostname:r}=new URL(e);if((await t(r)).length)return!0;else return(await u(r)).length>0}catch{return!1}},isDistinct:(e,u)=>{let t=new Set;if(!u){for(let s of e)if(Be.exists(s))if(t.has(s))return!1;else t.add(s);return!0}let r=Array.isArray(u)?u:[u];for(let s of e)if(Be.isObject(s)&&Be.hasKeys(s,r)){let n=r.map((i)=>s[i]).join("_");if(t.has(n))return!1;else t.add(n)}return!0},getNestedValue(e,u){if(e.indexOf(".")>-1)return yC(u.data,e);return u.parent[e]}},$a=class{static macro(e,u){this.prototype[e]=u}static getter(e,u,t=!1){Object.defineProperty(this.prototype,e,{get(){let r=u.call(this);if(t)Object.defineProperty(this,e,{configurable:!1,enumerable:!1,value:r,writable:!1});return r},configurable:!0,enumerable:!1})}},HC=/[\p{Lu}]/u,QC=/[\p{Ll}]/u,Vh=/^[\p{Lu}](?![\p{Lu}])/gu,$2=/([\p{Alpha}\p{N}_]|$)/u,Ra=/[_.\- ]+/,YC=new RegExp("^"+Ra.source),Kh=new RegExp(Ra.source+$2.source,"gu"),Gh=new RegExp("\\d+"+$2.source,"gu"),zC=(e,u,t,r)=>{let s=!1,n=!1,i=!1,l=!1;for(let o=0;o<e.length;o++){let a=e[o];if(l=o>2?e[o-3]==="-":!0,s&&HC.test(a))e=e.slice(0,o)+"-"+e.slice(o),s=!1,i=n,n=!0,o++;else if(n&&i&&QC.test(a)&&(!l||r))e=e.slice(0,o-1)+"-"+e.slice(o-1),i=n,n=!1,s=!0;else s=u(a)===a&&t(a)!==a,i=n,n=t(a)===a&&u(a)!==a}return e},qC=(e,u)=>{return Vh.lastIndex=0,e.replaceAll(Vh,(t)=>u(t))},xC=(e,u)=>{return Kh.lastIndex=0,Gh.lastIndex=0,e.replaceAll(Gh,(t,r,s)=>["_","-"].includes(e.charAt(s+t.length))?t:u(t)).replaceAll(Kh,(t,r)=>u(r))};function Fr(e,u){if(!(typeof e==="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(u={pascalCase:!1,preserveConsecutiveUppercase:!1,...u},Array.isArray(e))e=e.map((n)=>n.trim()).filter((n)=>n.length).join("-");else e=e.trim();if(e.length===0)return"";let t=u.locale===!1?(n)=>n.toLowerCase():(n)=>n.toLocaleLowerCase(u.locale),r=u.locale===!1?(n)=>n.toUpperCase():(n)=>n.toLocaleUpperCase(u.locale);if(e.length===1){if(Ra.test(e))return"";return u.pascalCase?r(e):t(e)}if(e!==t(e))e=zC(e,t,r,u.preserveConsecutiveUppercase);if(e=e.replace(YC,""),e=u.preserveConsecutiveUppercase?qC(e,t):t(e),u.pascalCase)e=r(e.charAt(0))+e.slice(1);return xC(e,r)}var ZC=Ge(c2(),1),ut=Ge(c2(),1),XC=Ge(p5(),1),JC=Ge(g5(),1),e6=Ge(m5(),1),t6="text/plain",u6="us-ascii",Zn=(e,u)=>u.some((t)=>t instanceof RegExp?t.test(e):t===e),r6=new Set(["https:","http:","file:"]),i6=(e)=>{try{let{protocol:u}=new URL(e);return u.endsWith(":")&&!u.includes(".")&&!r6.has(u)}catch{return!1}},s6=(e,{stripHash:u})=>{let t=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!t)throw new Error(`Invalid URL: ${e}`);let{type:r,data:s,hash:n}=t.groups,i=r.split(";");n=u?"":n;let l=!1;if(i[i.length-1]==="base64")i.pop(),l=!0;let o=i.shift()?.toLowerCase()??"",D=[...i.map((h)=>{let[d,F=""]=h.split("=").map((p)=>p.trim());if(d==="charset"){if(F=F.toLowerCase(),F===u6)return""}return`${d}${F?`=${F}`:""}`}).filter(Boolean)];if(l)D.push("base64");if(D.length>0||o&&o!==t6)D.unshift(o);return`data:${D.join(";")},${l?s.trim():s}${n?`#${n}`:""}`};function n6(e,u){if(u={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,removeExplicitPort:!1,sortQueryParameters:!0,...u},typeof u.defaultProtocol==="string"&&!u.defaultProtocol.endsWith(":"))u.defaultProtocol=`${u.defaultProtocol}:`;if(e=e.trim(),/^data:/i.test(e))return s6(e,u);if(i6(e))return e;let t=e.startsWith("//");if(!(!t&&/^\.*\//.test(e)))e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,u.defaultProtocol);let s=new URL(e);if(u.forceHttp&&u.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(u.forceHttp&&s.protocol==="https:")s.protocol="http:";if(u.forceHttps&&s.protocol==="http:")s.protocol="https:";if(u.stripAuthentication)s.username="",s.password="";if(u.stripHash)s.hash="";else if(u.stripTextFragment)s.hash=s.hash.replace(/#?:~:text.*?$/i,"");if(s.pathname){let i=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,l=0,o="";for(;;){let D=i.exec(s.pathname);if(!D)break;let h=D[0],d=D.index,F=s.pathname.slice(l,d);o+=F.replace(/\/{2,}/g,"/"),o+=h,l=d+h.length}let a=s.pathname.slice(l,s.pathname.length);o+=a.replace(/\/{2,}/g,"/"),s.pathname=o}if(s.pathname)try{s.pathname=decodeURI(s.pathname)}catch{}if(u.removeDirectoryIndex===!0)u.removeDirectoryIndex=[/^index\.[a-z]+$/];if(Array.isArray(u.removeDirectoryIndex)&&u.removeDirectoryIndex.length>0){let i=s.pathname.split("/"),l=i[i.length-1];if(Zn(l,u.removeDirectoryIndex))i=i.slice(0,-1),s.pathname=i.slice(1).join("/")+"/"}if(s.hostname){if(s.hostname=s.hostname.replace(/\.$/,""),u.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(s.hostname))s.hostname=s.hostname.replace(/^www\./,"")}if(Array.isArray(u.removeQueryParameters)){for(let i of[...s.searchParams.keys()])if(Zn(i,u.removeQueryParameters))s.searchParams.delete(i)}if(!Array.isArray(u.keepQueryParameters)&&u.removeQueryParameters===!0)s.search="";if(Array.isArray(u.keepQueryParameters)&&u.keepQueryParameters.length>0){for(let i of[...s.searchParams.keys()])if(!Zn(i,u.keepQueryParameters))s.searchParams.delete(i)}if(u.sortQueryParameters){s.searchParams.sort();try{s.search=decodeURIComponent(s.search)}catch{}}if(u.removeTrailingSlash)s.pathname=s.pathname.replace(/\/$/,"");if(u.removeExplicitPort&&s.port)s.port="";let n=e;if(e=s.toString(),!u.removeSingleSlash&&s.pathname==="/"&&!n.endsWith("/")&&s.hash==="")e=e.replace(/\/$/,"");if((u.removeTrailingSlash||s.pathname==="/")&&s.hash===""&&u.removeSingleSlash)e=e.replace(/\/$/,"");if(t&&!u.normalizeProtocol)e=e.replace(/^http:\/\//,"//");if(u.stripProtocol)e=e.replace(/^(?:https?:)?\/\//,"");return e}var a6=Ge(y5(),1),h6=Ge(F5(),1),l6=class e{#e="";newLine=`
|
|
176
|
-
`;writeStatement(u){this.#e=`${this.#e}${this.newLine}${u}`}child(){return new e}toString(){return this.#e}flush(){this.#e=""}};function o6({parseFnRefId:e,variableName:u,wildCardPath:t,isArrayMember:r,valueExpression:s,parentExpression:n,fieldNameExpression:i,parentValueExpression:l}){let o=e?`refs['${e}'](${s}, {
|
|
177
|
-
data: root,
|
|
178
|
-
meta: meta,
|
|
179
|
-
parent: ${l}
|
|
180
|
-
})`:s,a="";if(n==="root"||n==="root_item")a=i;else if(i!=="''")a=`${n}.getFieldPath() + '.' + ${i}`;return`const ${u} = defineValue(${o}, {
|
|
181
|
-
data: root,
|
|
182
|
-
meta: meta,
|
|
183
|
-
name: ${i},
|
|
184
|
-
wildCardPath: '${t}',
|
|
185
|
-
getFieldPath() {
|
|
186
|
-
return ${a};
|
|
187
|
-
},
|
|
188
|
-
mutate: defineValue,
|
|
189
|
-
report: report,
|
|
190
|
-
isValid: true,
|
|
191
|
-
parent: ${l},
|
|
192
|
-
isArrayMember: ${r},
|
|
193
|
-
});`}var oi=class{#e;#t;field;constructor(e,u,t,r){if(this.#t=r,this.#e=e,this.#t)this.field=this.#t;else u.variablesCounter++,this.field=u.createFieldFor(e,t)}defineField(e){if(!this.#t)e.writeStatement(o6({fieldNameExpression:this.field.fieldNameExpression,isArrayMember:this.field.isArrayMember,parentExpression:this.field.parentExpression,parentValueExpression:this.field.parentValueExpression,valueExpression:this.field.valueExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath,parseFnRefId:"parseFnId"in this.#e?this.#e.parseFnId:void 0}))}};function R2({variableName:e,guardedCodeSnippet:u}){return`if (ensureIsArray(${e})) {
|
|
194
|
-
${u}
|
|
195
|
-
}`}function Ys({variableName:e,bail:u,guardedCodeSnippet:t}){if(!u)return t;return`if (${e}.isValid) {
|
|
196
|
-
${t}
|
|
197
|
-
}`}function Gi({allowNull:e,conditional:u,variableName:t,outputExpression:r,transformFnRefId:s}){if(!e)return"";return`${u||"if"}(${t}.value === null) {
|
|
198
|
-
${r} = ${s?`refs['${s}'](null, ${t});`:"null;"}
|
|
199
|
-
}`}function c6(e,u){let[t,r]=e;if(t&&r)return`if (${t} && ${r}) {
|
|
200
|
-
${u}
|
|
201
|
-
}`;if(t)return`if (${t}) {
|
|
202
|
-
${u}
|
|
203
|
-
}`;if(r)return`if (${r}) {
|
|
204
|
-
${u}
|
|
205
|
-
}`;return u}function D6({isAsync:e,implicit:u,ruleFnId:t},r,s,n){let i=`refs['${t}']`,l=`${i}.validator(${r}.value, ${i}.options, ${r});`,o=s?`${r}.isValid`:"",a=u||n?"":`${r}.isDefined`;return c6([o,a],e?`await ${l}`:`${l}`)}function ji({bail:e,validations:u,variableName:t,dropMissingCheck:r}){return`${u.map((s)=>D6(s,t,e,r)).join(`
|
|
206
|
-
`)}`}function O2({variableName:e,outputExpression:u,outputValueExpression:t}){return`const ${e}_out = ${t};
|
|
207
|
-
${u} = ${e}_out;`}function Wi({allowNull:e,isOptional:u,variableName:t}){if(u===!1)if(e===!1)return`ensureExists(${t});`;else return`ensureIsDefined(${t});`;return""}var f6=class extends oi{#e;#t;#u;constructor(e,u,t,r,s){super(e,t,r,s);this.#e=e,this.#t=u,this.#u=t}#r(){let e=this.#t.child(),u={type:"tuple",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#e.properties.forEach((t)=>{this.#u.compileNode(t,e,u)}),e.toString()}compile(){this.defineField(this.#t),this.#t.writeStatement(Wi({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName}));let e=Ys({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${O2({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:this.#e.allowUnknownProperties?`copyProperties(${this.field.variableName}.value)`:"[]"})}${this.#r()}`}),u=R2({variableName:this.field.variableName,guardedCodeSnippet:`${ji({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!0})}${this.#t.newLine}${e}`});this.#t.writeStatement(`${u}${this.#t.newLine}${Gi({allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function d6({variableName:e,loopCodeSnippet:u,startingIndex:t}){return t=t||0,`const ${e}_items_size = ${e}.value.length;
|
|
208
|
-
for (let ${e}_i = ${t}; ${e}_i < ${e}_items_size; ${e}_i++) {
|
|
209
|
-
${u}
|
|
210
|
-
}`}var E6=class extends oi{#e;#t;#u;constructor(e,u,t,r,s){super(e,t,r,s);this.#e=e,this.#t=u,this.#u=t}#r(){let e=this.#t.child();this.#u.compileNode(this.#e.each,e,{type:"array",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath});let u=this.#t.child();return u.writeStatement(d6({variableName:this.field.variableName,startingIndex:0,loopCodeSnippet:e.toString()})),e.flush(),u.toString()}compile(){this.defineField(this.#t),this.#t.writeStatement(Wi({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName}));let e=Ys({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${O2({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"[]"})}${this.#t.newLine}${this.#r()}`}),u=R2({variableName:this.field.variableName,guardedCodeSnippet:`${ji({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!0})}${this.#t.newLine}${e}`});this.#t.writeStatement(`${u}${this.#t.newLine}${Gi({allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function C6({parseFnRefId:e,variableName:u}){if(e)return`${u}.value = refs['${e}'](${u}.value);`;return""}function L2({variableName:e,conditionalFnRefId:u}){return`else {
|
|
211
|
-
refs['${u}'](${e}.value, ${e});
|
|
212
|
-
}`}function U2({conditional:e,variableName:u,conditionalFnRefId:t,guardedCodeSnippet:r}){return`${e}(refs['${t}'](${u}.value, ${u})) {
|
|
213
|
-
${r}
|
|
214
|
-
}`}var p6=class extends oi{#e;#t;#u;#r;constructor(e,u,t,r,s){super(e,t,r,s);this.#t=e,this.#u=u,this.#r=r,this.#e=t}#i(){let e=this.#u.child();if(this.#t.conditions.forEach((u,t)=>{let r=this.#u.child();if("parseFnId"in u.schema)r.writeStatement(C6({parseFnRefId:u.schema.parseFnId,variableName:this.field.variableName}));this.#e.compileNode(u.schema,r,this.#r,this.field),e.writeStatement(U2({conditional:t===0?"if":"else if",variableName:this.field.variableName,conditionalFnRefId:u.conditionalFnRefId,guardedCodeSnippet:r.toString()})),r.flush()}),this.#t.elseConditionalFnRefId&&this.#t.conditions.length)e.writeStatement(L2({variableName:this.field.variableName,conditionalFnRefId:this.#t.elseConditionalFnRefId}));return e.toString()}compile(){this.defineField(this.#u),this.#u.writeStatement(this.#i())}};function g6({variableName:e,loopCodeSnippet:u}){return`const ${e}_keys = Object.keys(${e}.value);
|
|
215
|
-
const ${e}_keys_size = ${e}_keys.length;
|
|
216
|
-
for (let ${e}_key_i = 0; ${e}_key_i < ${e}_keys_size; ${e}_key_i++) {
|
|
217
|
-
const ${e}_i = ${e}_keys[${e}_key_i];
|
|
218
|
-
${u}
|
|
219
|
-
}`}function P2({variableName:e,guardedCodeSnippet:u}){return`if (ensureIsObject(${e})) {
|
|
220
|
-
${u}
|
|
221
|
-
}`}function M2({variableName:e,outputExpression:u,outputValueExpression:t}){return`const ${e}_out = ${t};
|
|
222
|
-
${u} = ${e}_out;`}var m6=class extends oi{#e;#t;#u;constructor(e,u,t,r,s){super(e,t,r,s);this.#e=e,this.#t=u,this.#u=t}#r(){let e=this.#t.child(),u=this.#t.child();return this.#u.compileNode(this.#e.each,u,{type:"record",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath}),e.writeStatement(g6({variableName:this.field.variableName,loopCodeSnippet:u.toString()})),u.flush(),e.toString()}compile(){this.defineField(this.#t),this.#t.writeStatement(Wi({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName}));let e=Ys({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${M2({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#r()}`}),u=P2({variableName:this.field.variableName,guardedCodeSnippet:`${ji({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!0})}${this.#t.newLine}${e}`});this.#t.writeStatement(`${u}${this.#t.newLine}${Gi({allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function y6(e){return`[${e.map((u)=>`"${u}"`).join(", ")}]`}function F6({variableName:e,fieldsToIgnore:u,allowUnknownProperties:t}){if(!t)return"";let r=y6(u);return`moveProperties(${e}.value, ${e}_out, ${r});`}var A6=class extends oi{#e;#t;#u;constructor(e,u,t,r,s){super(e,t,r,s);this.#e=e,this.#t=u,this.#u=t}#r(e){let u=e.properties.map((r)=>r.fieldName),t=e.groups.flatMap((r)=>this.#i(r));return u.concat(t)}#i(e){return e.conditions.flatMap((u)=>{return this.#r(u.schema)})}#n(){let e=this.#t.child(),u={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#e.properties.forEach((t)=>this.#u.compileNode(t,e,u)),e.toString()}#s(){let e=this.#t.child(),u={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#e.groups.forEach((t)=>this.#a(t,e,u)),e.toString()}#a(e,u,t){if(e.conditions.forEach((r,s)=>{let n=u.child();r.schema.properties.forEach((i)=>{this.#u.compileNode(i,n,t)}),r.schema.groups.forEach((i)=>{this.#a(i,n,t)}),u.writeStatement(U2({variableName:this.field.variableName,conditional:s===0?"if":"else if",conditionalFnRefId:r.conditionalFnRefId,guardedCodeSnippet:n.toString()}))}),e.elseConditionalFnRefId&&e.conditions.length)u.writeStatement(L2({variableName:this.field.variableName,conditionalFnRefId:e.elseConditionalFnRefId}))}compile(){this.defineField(this.#t),this.#t.writeStatement(Wi({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName}));let e=Ys({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${M2({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#t.newLine}${this.#n()}${this.#t.newLine}${this.#s()}${this.#t.newLine}${F6({variableName:this.field.variableName,allowUnknownProperties:this.#e.allowUnknownProperties,fieldsToIgnore:this.#e.allowUnknownProperties?this.#r(this.#e):[]})}`}),u=P2({variableName:this.field.variableName,guardedCodeSnippet:`${ji({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!0})}${e}`});this.#t.writeStatement(`${u}${this.#t.newLine}${Gi({variableName:this.field.variableName,allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,conditional:"else if"})}`)}};function v6(e){return{parentExpression:e.variableName,parentValueExpression:e.variableName,fieldNameExpression:"''",fieldPathExpression:"''",wildCardPath:"",variableName:`${e.variableName}_item`,valueExpression:"root",outputExpression:e.outputExpression,isArrayMember:!1}}function B6({variableName:e,outputExpression:u,transformFnRefId:t}){let r=t?`refs['${t}'](${e}.value, ${e})`:`${e}.value`;return`if (${e}.isDefined && ${e}.isValid) {
|
|
223
|
-
${u} = ${r};
|
|
224
|
-
}`}var b6=class extends oi{#e;#t;constructor(e,u,t,r,s){super(e,t,r,s);this.#e=e,this.#t=u}compile(){this.defineField(this.#t),this.#t.writeStatement(Wi({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName})),this.#t.writeStatement(ji({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!1})),this.#t.writeStatement(`${B6({variableName:this.field.variableName,outputExpression:this.field.outputExpression,transformFnRefId:this.#e.transformFnId})}${this.#t.newLine}${Gi({variableName:this.field.variableName,allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,transformFnRefId:this.#e.transformFnId,conditional:"else if"})}`)}};function S6(e){let u=e.wildCardPath!==""?`${e.wildCardPath}.*`:"*";return{parentExpression:e.variableName,parentValueExpression:`${e.variableName}.value`,fieldNameExpression:`${e.variableName}_i`,fieldPathExpression:u,wildCardPath:u,variableName:`${e.variableName}_item`,valueExpression:`${e.variableName}.value[${e.variableName}_i]`,outputExpression:`${e.variableName}_out[${e.variableName}_i]`,isArrayMember:!0}}function T6(e,u){let t=u.wildCardPath!==""?`${u.wildCardPath}.${e.fieldName}`:e.fieldName;return{parentExpression:u.variableName,parentValueExpression:`${u.variableName}.value`,fieldNameExpression:`${e.fieldName}`,fieldPathExpression:t,wildCardPath:t,variableName:`${u.variableName}_item_${e.fieldName}`,valueExpression:`${u.variableName}.value[${e.fieldName}]`,outputExpression:`${u.variableName}_out[${e.propertyName}]`,isArrayMember:!0}}function w6(){return`if(errorReporter.hasErrors) {
|
|
225
|
-
throw errorReporter.createError();
|
|
226
|
-
}`}function I6(e,u,t){let r=t.wildCardPath!==""?`${t.wildCardPath}.${e.fieldName}`:e.fieldName;return{parentExpression:t.variableName,parentValueExpression:`${t.variableName}.value`,fieldNameExpression:`'${e.fieldName}'`,fieldPathExpression:r,wildCardPath:r,variableName:`${e.propertyName}_${u}`,valueExpression:`${t.variableName}.value['${e.fieldName}']`,outputExpression:`${t.variableName}_out['${e.propertyName}']`,isArrayMember:!1}}function N6(e){let u=e.wildCardPath!==""?`${e.wildCardPath}.*`:"*";return{parentExpression:e.variableName,parentValueExpression:`${e.variableName}.value`,fieldNameExpression:`${e.variableName}_i`,fieldPathExpression:u,wildCardPath:u,variableName:`${e.variableName}_item`,valueExpression:`${e.variableName}.value[${e.variableName}_i]`,outputExpression:`${e.variableName}_out[${e.variableName}_i]`,isArrayMember:!1}}function _6(e){return`function report(message, rule, field, args) {
|
|
227
|
-
field.isValid = false;
|
|
228
|
-
errorReporter.report(messagesProvider.getMessage(message, rule, field, args), rule, field, args);
|
|
229
|
-
};
|
|
230
|
-
function defineValue(value, field) {
|
|
231
|
-
${e.convertEmptyStringsToNull?"if (value === '') { value = null; }":""}
|
|
232
|
-
field.value = value;
|
|
233
|
-
field.isDefined = value !== undefined && value !== null;
|
|
234
|
-
return field;
|
|
235
|
-
};
|
|
236
|
-
function ensureExists(field) {
|
|
237
|
-
if (field.value === undefined || field.value === null) {
|
|
238
|
-
field.report(REQUIRED, 'required', field);
|
|
239
|
-
return false;
|
|
240
|
-
}
|
|
241
|
-
return true;
|
|
242
|
-
};
|
|
243
|
-
function ensureIsDefined(field) {
|
|
244
|
-
if (field.value === undefined) {
|
|
245
|
-
field.report(REQUIRED, 'required', field);
|
|
246
|
-
return false;
|
|
247
|
-
}
|
|
248
|
-
return true;
|
|
249
|
-
};
|
|
250
|
-
function ensureIsObject(field) {
|
|
251
|
-
if (!field.isDefined) {
|
|
252
|
-
return false;
|
|
253
|
-
}
|
|
254
|
-
if (typeof field.value == 'object' && !Array.isArray(field.value)) {
|
|
255
|
-
return true;
|
|
256
|
-
}
|
|
257
|
-
field.report(NOT_AN_OBJECT, 'object', field);
|
|
258
|
-
return false;
|
|
259
|
-
};
|
|
260
|
-
function ensureIsArray(field) {
|
|
261
|
-
if (!field.isDefined) {
|
|
262
|
-
return false;
|
|
263
|
-
}
|
|
264
|
-
if (Array.isArray(field.value)) {
|
|
265
|
-
return true;
|
|
266
|
-
}
|
|
267
|
-
field.report(NOT_AN_ARRAY, 'array', field);
|
|
268
|
-
return false;
|
|
269
|
-
};
|
|
270
|
-
function copyProperties(val) {
|
|
271
|
-
let k, out, tmp;
|
|
272
|
-
|
|
273
|
-
if (Array.isArray(val)) {
|
|
274
|
-
out = Array((k = val.length))
|
|
275
|
-
while (k--) out[k] = (tmp = val[k]) && typeof tmp == 'object' ? copyProperties(tmp) : tmp
|
|
276
|
-
return out
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
if (Object.prototype.toString.call(val) === '[object Object]') {
|
|
280
|
-
out = {} // null
|
|
281
|
-
for (k in val) {
|
|
282
|
-
out[k] = (tmp = val[k]) && typeof tmp == 'object' ? copyProperties(tmp) : tmp
|
|
283
|
-
}
|
|
284
|
-
return out
|
|
285
|
-
}
|
|
286
|
-
return val
|
|
287
|
-
};
|
|
288
|
-
function moveProperties(source, destination, ignoreKeys) {
|
|
289
|
-
for (let key in source) {
|
|
290
|
-
if (!ignoreKeys.includes(key)) {
|
|
291
|
-
const value = source[key]
|
|
292
|
-
destination[key] = copyProperties(value)
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
};`}function $6(e){return`const REQUIRED = '${e.required}';
|
|
296
|
-
const NOT_AN_OBJECT = '${e.object}';
|
|
297
|
-
const NOT_AN_ARRAY = '${e.array}';`}var R6=Object.getPrototypeOf(async function(){}).constructor,O6=class{variablesCounter=0;#e;#t;#u=new l6;constructor(e,u){this.#e=e,this.#t=u||{convertEmptyStringsToNull:!1}}#r(){this.#u.writeStatement($6({required:"value is required",object:"value is not a valid object",array:"value is not a valid array",...this.#t.messages})),this.#u.writeStatement(_6(this.#t)),this.#u.writeStatement("let out;")}#i(){this.#u.writeStatement(w6()),this.#u.writeStatement("return out;")}#n(){this.compileNode(this.#e.schema,this.#u,{type:"root",variableName:"root",outputExpression:"out",fieldPathExpression:"out",wildCardPath:""})}#s(){return new R6("root","meta","refs","messagesProvider","errorReporter",this.#u.toString())}createFieldFor(e,u){switch(u.type){case"array":return S6(u);case"root":return v6(u);case"object":return I6(e,this.variablesCounter,u);case"tuple":return T6(e,u);case"record":return N6(u)}}compileNode(e,u,t,r){switch(e.type){case"literal":return new b6(e,u,this,t,r).compile();case"array":return new E6(e,u,this,t,r).compile();case"record":return new m6(e,u,this,t,r).compile();case"object":return new A6(e,u,this,t,r).compile();case"tuple":return new f6(e,u,this,t,r).compile();case"union":return new p6(e,u,this,t,r).compile()}}compile(){this.#r(),this.#n(),this.#i();let e=this.#s();return this.variablesCounter=0,this.#u.flush(),e}};function L6(){let e=0,u={};return{toJSON(){return u},track(t){e++;let r=`ref://${e}`;return u[r]=t,r},trackValidation(t){return this.track(t)},trackParser(t){return this.track(t)},trackTransformer(t){return this.track(t)},trackConditional(t){return this.track(t)}}}function fe(e,u){let t={validator:e,isAsync:u?.isAsync||e.constructor.name==="AsyncFunction",implicit:u?.implicit??!1};return function(...r){return{rule:t,options:r[0]}}}var U6={};I2(U6,{COTYPE:()=>k6,IS_OF_TYPE:()=>fu,ITYPE:()=>P6,OTYPE:()=>M6,PARSE:()=>ke,UNIQUE_NAME:()=>uu,VALIDATION:()=>Pr});var uu=Symbol.for("schema_name"),fu=Symbol.for("is_of_type"),ke=Symbol.for("parse"),P6=Symbol.for("opaque_input_type"),M6=Symbol.for("opaque_type"),k6=Symbol.for("camelcase_opaque_type"),Pr=Symbol.for("to_validation"),ei=fe((e,u,t)=>{let r=u(t);if(!t.isDefined&&r)t.report(le.required,"required",t)},{implicit:!0}),zs=class extends $a{optional(e){return new K6(this,e)}nullable(){return new V6(this)}transform(e){return new G6(e,this)}},V6=class e extends zs{#e;constructor(u){super();this.#e=u}clone(){return new e(this.#e.clone())}[ke](u,t,r){let s=this.#e[ke](u,t,r);return s.allowNull=!0,s}},K6=class e extends zs{#e;validations;constructor(u,t){super();this.#e=u,this.validations=t||[]}cloneValidations(){return this.validations.map((u)=>{return{options:u.options,rule:u.rule}})}compileValidations(u){return this.validations.map((t)=>{return{ruleFnId:u.track({validator:t.rule.validator,options:t.options}),implicit:t.rule.implicit,isAsync:t.rule.isAsync}})}use(u){return this.validations.push(Pr in u?u[Pr]():u),this}requiredWhen(u,t,r){if(typeof u==="function")return this.use(ei(u));let s;switch(t){case"=":s=(n)=>n===r;break;case"!=":s=(n)=>n!==r;break;case"in":s=(n)=>r.includes(n);break;case"notIn":s=(n)=>!r.includes(n);break;case">":s=(n)=>n>r;break;case"<":s=(n)=>n<r;break;case">=":s=(n)=>n>=r;break;case"<=":s=(n)=>n<=r}return this.use(ei((n)=>{let i=Be.getNestedValue(u,n);return s(i)}))}requiredIfExists(u){let t=Array.isArray(u)?u:[u];return this.use(ei((r)=>{return t.every((s)=>Be.exists(Be.getNestedValue(s,r)))}))}requiredIfAnyExists(u){return this.use(ei((t)=>{return u.some((r)=>Be.exists(Be.getNestedValue(r,t)))}))}requiredIfMissing(u){let t=Array.isArray(u)?u:[u];return this.use(ei((r)=>{return t.every((s)=>Be.isMissing(Be.getNestedValue(s,r)))}))}requiredIfAnyMissing(u){return this.use(ei((t)=>{return u.some((r)=>Be.isMissing(Be.getNestedValue(r,t)))}))}clone(){return new e(this.#e.clone(),this.cloneValidations())}[ke](u,t,r){let s=this.#e[ke](u,t,r);return s.isOptional=!0,s.validations=s.validations.concat(this.compileValidations(t)),s}},G6=class e extends zs{#e;#t;constructor(u,t){super();this.#t=u,this.#e=t}clone(){return new e(this.#t,this.#e.clone())}[ke](u,t,r){let s=this.#e[ke](u,t,r);return s.transformFnId=t.trackTransformer(this.#t),s}},rr=class extends zs{options;validations;constructor(e,u){super();this.options={bail:!0,allowNull:!1,isOptional:!1,...e},this.validations=u||[]}cloneValidations(){return this.validations.map((e)=>{return{options:e.options,rule:e.rule}})}cloneOptions(){return{...this.options}}compileValidations(e){return this.validations.map((u)=>{return{ruleFnId:e.track({validator:u.rule.validator,options:u.options}),implicit:u.rule.implicit,isAsync:u.rule.isAsync}})}parse(e){return this.options.parse=e,this}use(e){return this.validations.push(Pr in e?e[Pr]():e),this}bail(e){return this.options.bail=e,this}[ke](e,u,t){return{type:"literal",fieldName:e,propertyName:t.toCamelCase?Fr(e):e,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?u.trackParser(this.options.parse):void 0,validations:this.compileValidations(u)}}},j6=class e extends rr{constructor(u,t){super(u,t)}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},Ms=fe((e,u,t)=>{let r=typeof u.choices==="function"?u.choices(t):u.choices;if(!r.includes(e))t.report(le.enum,"enum",t,{choices:r})}),k2=class e extends rr{static rules={enum:Ms};#e;getChoices(){return this.#e}constructor(u,t,r){super(t,r||[Ms({choices:u})]);this.#e=u}clone(){return new e(this.#e,this.cloneOptions(),this.cloneValidations())}},kr=["YYYY-MM-DD","YYYY-MM-DD HH:mm:ss"];ut.default.extend(e6.default);ut.default.extend(XC.default);ut.default.extend(JC.default);var W6=fe((e,u,t)=>{if(typeof e!=="string"&&typeof e!=="number"){t.report(le.date,"date",t);return}let r=!1,s=u.formats||kr;if(Array.isArray(s))s=[...s],r=s.includes("x");else if(typeof s!=="string")s={...s},r=s.format==="x";let n=r?Be.asNumber(e):e,i=r&&!Number.isNaN(n)?ut.default(n):ut.default(e,s,!0);if(!i.isValid()){t.report(le.date,"date",t);return}t.meta.$value=i,t.meta.$formats=s,t.mutate(i.toDate(),t)}),jh=fe((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=u.format||kr,n=t.meta.$value,i=typeof u.expectedValue==="function"?u.expectedValue(t):u.expectedValue,l=ut.default(i,s,!0);if(!l.isValid())throw new Error(`Invalid datetime value "${i}" value provided to the equals rule`);if(!n.isSame(l,r))t.report(le["date.equals"],"date.equals",t,{expectedValue:i,compare:r})}),Wh=fe((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=u.format||kr,n=t.meta.$value,i=typeof u.expectedValue==="function"?u.expectedValue(t):u.expectedValue,l=i==="today"?ut.default():i==="tomorrow"?ut.default().add(1,"day"):ut.default(i,s,!0);if(!l.isValid())throw new Error(`Invalid datetime value "${i}" value provided to the after rule`);if(!n.isAfter(l,r))t.report(le["date.after"],"date.after",t,{expectedValue:i,compare:r})}),Hh=fe((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=u.format||kr,n=t.meta.$value,i=typeof u.expectedValue==="function"?u.expectedValue(t):u.expectedValue,l=i==="today"?ut.default():i==="tomorrow"?ut.default().add(1,"day"):ut.default(i,s,!0);if(!l.isValid())throw new Error(`Invalid datetime value "${i}" value provided to the afterOrEqual rule`);if(!n.isSameOrAfter(l,r))t.report(le["date.afterOrEqual"],"date.afterOrEqual",t,{expectedValue:i,compare:r})}),Qh=fe((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=u.format||kr,n=t.meta.$value,i=typeof u.expectedValue==="function"?u.expectedValue(t):u.expectedValue,l=i==="today"?ut.default():i==="yesterday"?ut.default().subtract(1,"day"):ut.default(i,s,!0);if(!l.isValid())throw new Error(`Invalid datetime value "${i}" value provided to the before rule`);if(!n.isBefore(l,r))t.report(le["date.before"],"date.before",t,{expectedValue:i,compare:r})}),Yh=fe((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=u.format||kr,n=t.meta.$value,i=typeof u.expectedValue==="function"?u.expectedValue(t):u.expectedValue,l=i==="today"?ut.default():i==="yesterday"?ut.default().subtract(1,"day"):ut.default(i,s,!0);if(!l.isValid())throw new Error(`Invalid datetime value "${i}" value provided to the beforeOrEqual rule`);if(!n.isSameOrBefore(l,r))t.report(le["date.beforeOrEqual"],"date.beforeOrEqual",t,{expectedValue:i,compare:r})}),zh=fe((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=Be.getNestedValue(u.otherField,t),l=ut.default(i,n,!0);if(!l.isValid())return;if(!s.isSame(l,r))t.report(le["date.sameAs"],"date.sameAs",t,{otherField:u.otherField,expectedValue:i,compare:r})}),qh=fe((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=Be.getNestedValue(u.otherField,t),l=ut.default(i,n,!0);if(!l.isValid())return;if(s.isSame(l,r))t.report(le["date.notSameAs"],"date.notSameAs",t,{otherField:u.otherField,expectedValue:i,compare:r})}),xh=fe((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=Be.getNestedValue(u.otherField,t),l=ut.default(i,n,!0);if(!l.isValid())return;if(!s.isAfter(l,r))t.report(le["date.afterField"],"date.afterField",t,{otherField:u.otherField,expectedValue:i,compare:r})}),Zh=fe((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=Be.getNestedValue(u.otherField,t),l=ut.default(i,n,!0);if(!l.isValid())return;if(!s.isSameOrAfter(l,r))t.report(le["date.afterOrSameAs"],"date.afterOrSameAs",t,{otherField:u.otherField,expectedValue:i,compare:r})}),Xh=fe((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=Be.getNestedValue(u.otherField,t),l=ut.default(i,n,!0);if(!l.isValid())return;if(!s.isBefore(l,r))t.report(le["date.beforeField"],"date.beforeField",t,{otherField:u.otherField,expectedValue:i,compare:r})}),Jh=fe((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=Be.getNestedValue(u.otherField,t),l=ut.default(i,n,!0);if(!l.isValid())return;if(!s.isSameOrBefore(l,r))t.report(le["date.beforeOrSameAs"],"date.beforeOrSameAs",t,{otherField:u.otherField,expectedValue:i,compare:r})}),el=fe((e,u,t)=>{if(!t.meta.$value)return;let s=t.meta.$value.day();if(s!==0&&s!==6)t.report(le["date.weekend"],"date.weekend",t)}),tl=fe((e,u,t)=>{if(!t.meta.$value)return;let s=t.meta.$value.day();if(s===0||s===6)t.report(le["date.weekday"],"date.weekday",t)}),H6=class e extends rr{static rules={equals:jh,after:Wh,afterOrEqual:Hh,before:Qh,beforeOrEqual:Yh,sameAs:zh,notSameAs:qh,afterField:xh,afterOrSameAs:Zh,beforeField:Xh,beforeOrSameAs:Jh,weekend:el,weekday:tl};[uu]="vine.date";[fu]=(u)=>{if(typeof u!=="string")return!1;return ZC.default(u,this.options.formats||kr,!0).isValid()};constructor(u,t){super(u,t||[W6(u||{})])}equals(u,t){return this.use(jh({expectedValue:u,...t}))}after(u,t){return this.use(Wh({expectedValue:u,...t}))}afterOrEqual(u,t){return this.use(Hh({expectedValue:u,...t}))}before(u,t){return this.use(Qh({expectedValue:u,...t}))}beforeOrEqual(u,t){return this.use(Yh({expectedValue:u,...t}))}sameAs(u,t){return this.use(zh({otherField:u,...t}))}notSameAs(u,t){return this.use(qh({otherField:u,...t}))}afterField(u,t){return this.use(xh({otherField:u,...t}))}afterOrSameAs(u,t){return this.use(Zh({otherField:u,...t}))}beforeField(u,t){return this.use(Xh({otherField:u,...t}))}beforeOrSameAs(u,t){return this.use(Jh({otherField:u,...t}))}weekend(){return this.use(el())}weekday(){return this.use(tl())}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},Q6=class e{#e;#t=(u,t)=>{t.report(le.union,"union",t)};constructor(u){this.#e=u}otherwise(u){return this.#t=u,this}clone(){let u=new e(this.#e);return u.otherwise(this.#t),u}[ke](u,t,r){return{type:"union",fieldName:u,propertyName:r.toCamelCase?Fr(u):u,elseConditionalFnRefId:t.trackConditional(this.#t),conditions:this.#e.map((s)=>s[ke](u,t,r))}}},V2=class{#e;#t;constructor(e,u){this.#e=u,this.#t=e}[ke](e,u,t){return{conditionalFnRefId:u.trackConditional(this.#t),schema:this.#e[ke](e,u,t)}}};function Oa(e){return new Q6(e)}Oa.if=function e(u,t){return new V2(u,t)};Oa.else=function e(u){return new V2(()=>!0,u)};var qs=class extends $a{optional(){return new z6(this)}nullable(){return new Y6(this)}},Y6=class e extends qs{#e;constructor(u){super();this.#e=u}clone(){return new e(this.#e.clone())}[ke](u,t,r){let s=this.#e[ke](u,t,r);if(s.type!=="union")s.allowNull=!0;return s}},z6=class e extends qs{#e;constructor(u){super();this.#e=u}clone(){return new e(this.#e.clone())}[ke](u,t,r){let s=this.#e[ke](u,t,r);if(s.type!=="union")s.isOptional=!0;return s}},xs=class extends qs{options;validations;constructor(e,u){super();this.options=e||{bail:!0,allowNull:!1,isOptional:!1},this.validations=u||[]}cloneValidations(){return this.validations.map((e)=>{return{options:e.options,rule:e.rule}})}cloneOptions(){return{...this.options}}compileValidations(e){return this.validations.map((u)=>{return{ruleFnId:e.track({validator:u.rule.validator,options:u.options}),implicit:u.rule.implicit,isAsync:u.rule.isAsync}})}parse(e){return this.options.parse=e,this}use(e){return this.validations.push(Pr in e?e[Pr]():e),this}bail(e){return this.options.bail=e,this}},q6=class e extends xs{#e;#t=!1;[uu]="vine.array";[fu]=(u)=>{return Array.isArray(u)};constructor(u,t,r){super(t,r);this.#e=u}allowUnknownProperties(){return this.#t=!0,this}clone(){let u=new e(this.#e.map((t)=>t.clone()),this.cloneOptions(),this.cloneValidations());if(this.#t)u.allowUnknownProperties();return u}[ke](u,t,r){return{type:"tuple",fieldName:u,propertyName:r.toCamelCase?Fr(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,allowUnknownProperties:this.#t,parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:this.compileValidations(t),properties:this.#e.map((s,n)=>s[ke](String(n),t,r))}}},ul=fe((e,u,t)=>{if(!t.isValid)return;if(e.length<u.min)t.report(le["array.minLength"],"array.minLength",t,u)}),rl=fe((e,u,t)=>{if(!t.isValid)return;if(e.length>u.max)t.report(le["array.maxLength"],"array.maxLength",t,u)}),il=fe((e,u,t)=>{if(!t.isValid)return;if(e.length!==u.size)t.report(le["array.fixedLength"],"array.fixedLength",t,u)}),sl=fe((e,u,t)=>{if(!t.isValid)return;if(e.length<=0)t.report(le.notEmpty,"notEmpty",t)}),nl=fe((e,u,t)=>{if(!t.isValid)return;if(!Be.isDistinct(e,u.fields))t.report(le.distinct,"distinct",t,u)}),al=fe((e,u,t)=>{if(!t.isValid)return;t.mutate(e.filter((r)=>Be.exists(r)&&r!==""),t)}),x6=class e extends xs{static rules={compact:al,notEmpty:sl,distinct:nl,minLength:ul,maxLength:rl,fixedLength:il};#e;[uu]="vine.array";[fu]=(u)=>{return Array.isArray(u)};constructor(u,t,r){super(t,r);this.#e=u}minLength(u){return this.use(ul({min:u}))}maxLength(u){return this.use(rl({max:u}))}fixedLength(u){return this.use(il({size:u}))}notEmpty(){return this.use(sl())}distinct(u){return this.use(nl({fields:u}))}compact(){return this.use(al())}clone(){return new e(this.#e.clone(),this.cloneOptions(),this.cloneValidations())}[ke](u,t,r){return{type:"array",fieldName:u,propertyName:r.toCamelCase?Fr(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#e[ke]("*",t,r),parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:this.compileValidations(t)}}},Z6=class e extends qs{#e;[uu]="types.object";[fu]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u){super();this.#e=u}clone(){return new e(this.#e.clone())}[ke](u,t,r){return r.toCamelCase=!0,this.#e[ke](u,t,r)}},X6=class e extends xs{#e;#t=[];#u=!1;[uu]="vine.object";[fu]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,t,r){super(t,r);this.#e=u}getProperties(){return Object.keys(this.#e).reduce((u,t)=>{return u[t]=this.#e[t].clone(),u},{})}allowUnknownProperties(){return this.#u=!0,this}merge(u){return this.#t.push(u),this}clone(){let u=new e(this.getProperties(),this.cloneOptions(),this.cloneValidations());if(this.#t.forEach((t)=>u.merge(t)),this.#u)u.allowUnknownProperties();return u}toCamelCase(){return new Z6(this)}[ke](u,t,r){return{type:"object",fieldName:u,propertyName:r.toCamelCase?Fr(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,allowUnknownProperties:this.#u,validations:this.compileValidations(t),properties:Object.keys(this.#e).map((s)=>{return this.#e[s][ke](s,t,r)}),groups:this.#t.map((s)=>{return s[ke](t,r)})}}},hl=fe((e,u,t)=>{if(!t.isValid)return;if(Object.keys(e).length<u.min)t.report(le["record.minLength"],"record.minLength",t,u)}),ll=fe((e,u,t)=>{if(!t.isValid)return;if(Object.keys(e).length>u.max)t.report(le["record.maxLength"],"record.maxLength",t,u)}),ol=fe((e,u,t)=>{if(!t.isValid)return;if(Object.keys(e).length!==u.size)t.report(le["record.fixedLength"],"record.fixedLength",t,u)}),cl=fe((e,u,t)=>{if(!t.isValid)return;u(Object.keys(e),t)}),J6=class e extends xs{static rules={maxLength:ll,minLength:hl,fixedLength:ol,validateKeys:cl};#e;[uu]="vine.object";[fu]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,t,r){super(t,r);this.#e=u}minLength(u){return this.use(hl({min:u}))}maxLength(u){return this.use(ll({max:u}))}fixedLength(u){return this.use(ol({size:u}))}validateKeys(...u){return this.use(cl(...u))}clone(){return new e(this.#e.clone(),this.cloneOptions(),this.cloneValidations())}[ke](u,t,r){return{type:"record",fieldName:u,propertyName:r.toCamelCase?Fr(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#e[ke]("*",t,r),parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:this.compileValidations(t)}}},Dl=fe((e,u,t)=>{if(typeof e!=="string")t.report(le.string,"string",t)}),fl=fe((e,u,t)=>{if(!t.isValid)return;if(!Be.isEmail(e,u))t.report(le.email,"email",t)}),dl=fe((e,u,t)=>{if(!t.isValid)return;let r=u&&typeof u==="function"?u(t):u,s=r?.locale||"any";if(!Be.isMobilePhone(e,s,r))t.report(le.mobile,"mobile",t)}),El=fe((e,u,t)=>{if(!t.isValid)return;if(!Be.isIP(e,u?.version))t.report(le.ipAddress,"ipAddress",t)}),Cl=fe((e,u,t)=>{if(!t.isValid)return;if(!u.test(e))t.report(le.regex,"regex",t)}),pl=fe((e,u,t)=>{if(!t.isValid)return;if(!Be.isHexColor(e))t.report(le.hexCode,"hexCode",t)}),gl=fe((e,u,t)=>{if(!t.isValid)return;if(!Be.isURL(e,u))t.report(le.url,"url",t)}),ml=fe(async(e,u,t)=>{if(!t.isValid)return;if(!await Be.isActiveURL(e))t.report(le.activeUrl,"activeUrl",t)}),yl=fe((e,u,t)=>{if(!t.isValid)return;let r="a-zA-Z";if(u){if(u.allowSpaces)r+="\\s";if(u.allowDashes)r+="-";if(u.allowUnderscores)r+="_"}if(!new RegExp(`^[${r}]+$`).test(e))t.report(le.alpha,"alpha",t)}),Fl=fe((e,u,t)=>{if(!t.isValid)return;let r="a-zA-Z0-9";if(u){if(u.allowSpaces)r+="\\s";if(u.allowDashes)r+="-";if(u.allowUnderscores)r+="_"}if(!new RegExp(`^[${r}]+$`).test(e))t.report(le.alphaNumeric,"alphaNumeric",t)}),Al=fe((e,u,t)=>{if(!t.isValid)return;if(e.length<u.min)t.report(le.minLength,"minLength",t,u)}),vl=fe((e,u,t)=>{if(!t.isValid)return;if(e.length>u.max)t.report(le.maxLength,"maxLength",t,u)}),Bl=fe((e,u,t)=>{if(!t.isValid)return;if(e.length!==u.size)t.report(le.fixedLength,"fixedLength",t,u)}),bl=fe((e,u,t)=>{if(!t.isValid)return;if(!e.endsWith(u.substring))t.report(le.endsWith,"endsWith",t,u)}),Sl=fe((e,u,t)=>{if(!t.isValid)return;if(!e.startsWith(u.substring))t.report(le.startsWith,"startsWith",t,u)}),Tl=fe((e,u,t)=>{if(!t.isValid)return;if(Be.getNestedValue(u.otherField,t)!==e){t.report(le.sameAs,"sameAs",t,u);return}}),wl=fe((e,u,t)=>{if(!t.isValid)return;if(Be.getNestedValue(u.otherField,t)===e){t.report(le.notSameAs,"notSameAs",t,u);return}}),Il=fe((e,u,t)=>{if(!t.isValid)return;let r=u?.confirmationField||`${t.name}_confirmation`;if(t.parent[r]!==e){t.report(le.confirmed,"confirmed",t,{otherField:r});return}}),Nl=fe((e,u,t)=>{if(!t.isValid)return;t.mutate(e.trim(),t)}),_l=fe((e,u,t)=>{if(!t.isValid)return;t.mutate(h6.default.default(e,u),t)}),$l=fe((e,u,t)=>{if(!t.isValid)return;t.mutate(e.toLocaleUpperCase(u),t)}),Rl=fe((e,u,t)=>{if(!t.isValid)return;t.mutate(e.toLocaleLowerCase(u),t)}),Ol=fe((e,u,t)=>{if(!t.isValid)return;t.mutate(Fr(e),t)}),Ll=fe((e,u,t)=>{if(!t.isValid)return;t.mutate(a6.default.default(e),t)}),Ul=fe((e,u,t)=>{if(!t.isValid)return;t.mutate(n6(e,u),t)}),Pl=fe((e,u,t)=>{if(!t.isValid)return;if(!(typeof u.choices==="function"?u.choices(t):u.choices).includes(e)){t.report(le.in,"in",t,u);return}}),Ml=fe((e,u,t)=>{if(!t.isValid)return;if((typeof u.list==="function"?u.list(t):u.list).includes(e)){t.report(le.notIn,"notIn",t,u);return}}),kl=fe((e,u,t)=>{if(!t.isValid)return;let r=u?typeof u==="function"?u(t)?.provider||[]:u.provider:[];if(!r.length){if(!Be.isCreditCard(e))t.report(le.creditCard,"creditCard",t,{providersList:"credit"})}else if(!r.find((n)=>Be.isCreditCard(e,{provider:n})))t.report(le.creditCard,"creditCard",t,{providers:r,providersList:r.join("/")})}),Vl=fe((e,u,t)=>{if(!t.isValid)return;let r=typeof u==="function"?u(t).countryCode:u.countryCode;if(!r.find((n)=>Be.isPassportNumber(e,n)))t.report(le.passport,"passport",t,{countryCodes:r})}),Kl=fe((e,u,t)=>{if(!t.isValid)return;let r=u?typeof u==="function"?u(t)?.countryCode||[]:u.countryCode:[];if(!r.length){if(!Be.isPostalCode(e,"any"))t.report(le.postalCode,"postalCode",t)}else if(!r.find((n)=>Be.isPostalCode(e,n)))t.report(le.postalCode,"postalCode",t,{countryCodes:r})}),Gl=fe((e,u,t)=>{if(!t.isValid)return;if(!u||!u.version){if(!Be.isUUID(e))t.report(le.uuid,"uuid",t)}else if(!u.version.find((s)=>Be.isUUID(e,s)))t.report(le.uuid,"uuid",t,u)}),jl=fe((e,u,t)=>{if(!t.isValid)return;if(!Be.isAscii(e))t.report(le.ascii,"ascii",t)}),Wl=fe((e,u,t)=>{if(!t.isValid)return;if(!Be.isIBAN(e))t.report(le.iban,"iban",t)}),Hl=fe((e,u,t)=>{if(!t.isValid)return;if(!Be.isJWT(e))t.report(le.jwt,"jwt",t)}),Ql=fe((e,u,t)=>{if(!t.isValid)return;if(!Be.isLatLong(e))t.report(le.coordinates,"coordinates",t)}),ep=class e extends rr{static rules={in:Pl,jwt:Hl,url:gl,iban:Wl,uuid:Gl,trim:Nl,email:fl,alpha:yl,ascii:jl,notIn:Ml,regex:Cl,escape:Ll,sameAs:Tl,mobile:dl,string:Dl,hexCode:pl,passport:Vl,endsWith:bl,confirmed:Il,activeUrl:ml,minLength:Al,notSameAs:wl,maxLength:vl,ipAddress:El,creditCard:kl,postalCode:Kl,startsWith:Sl,toUpperCase:$l,toLowerCase:Rl,toCamelCase:Ol,fixedLength:Bl,coordinates:Ql,normalizeUrl:Ul,alphaNumeric:Fl,normalizeEmail:_l};[uu]="vine.string";[fu]=(u)=>{return typeof u==="string"};constructor(u,t){super(u,t||[Dl()])}url(...u){return this.use(gl(...u))}activeUrl(){return this.use(ml())}email(...u){return this.use(fl(...u))}mobile(...u){return this.use(dl(...u))}ipAddress(u){return this.use(El(u?{version:u}:void 0))}hexCode(){return this.use(pl())}regex(u){return this.use(Cl(u))}alpha(u){return this.use(yl(u))}alphaNumeric(u){return this.use(Fl(u))}minLength(u){return this.use(Al({min:u}))}maxLength(u){return this.use(vl({max:u}))}fixedLength(u){return this.use(Bl({size:u}))}confirmed(u){return this.use(Il(u))}trim(){return this.use(Nl())}normalizeEmail(u){return this.use(_l(u))}toUpperCase(){return this.use($l())}toLowerCase(){return this.use(Rl())}toCamelCase(){return this.use(Ol())}escape(){return this.use(Ll())}normalizeUrl(...u){return this.use(Ul(...u))}startsWith(u){return this.use(Sl({substring:u}))}endsWith(u){return this.use(bl({substring:u}))}sameAs(u){return this.use(Tl({otherField:u}))}notSameAs(u){return this.use(wl({otherField:u}))}in(u){return this.use(Pl({choices:u}))}notIn(u){return this.use(Ml({list:u}))}creditCard(...u){return this.use(kl(...u))}passport(...u){return this.use(Vl(...u))}postalCode(...u){return this.use(Kl(...u))}uuid(...u){return this.use(Gl(...u))}ascii(){return this.use(jl())}iban(){return this.use(Wl())}jwt(){return this.use(Hl())}coordinates(){return this.use(Ql())}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},Yl=fe((e,u,t)=>{let r=u.strict?e:Be.asNumber(e);if(typeof r!=="number"||Number.isNaN(r)||r===Number.POSITIVE_INFINITY||r===Number.NEGATIVE_INFINITY){t.report(le.number,"number",t);return}t.mutate(r,t)}),zl=fe((e,u,t)=>{if(!t.isValid)return;if(e<u.min)t.report(le.min,"min",t,u)}),ql=fe((e,u,t)=>{if(!t.isValid)return;if(e>u.max)t.report(le.max,"max",t,u)}),xl=fe((e,u,t)=>{if(!t.isValid)return;if(e<u.min||e>u.max)t.report(le.range,"range",t,u)}),Zl=fe((e,u,t)=>{if(!t.isValid)return;if(e<0)t.report(le.positive,"positive",t)}),Xl=fe((e,u,t)=>{if(!t.isValid)return;if(e>=0)t.report(le.negative,"negative",t)}),Jl=fe((e,u,t)=>{if(!t.isValid)return;if(!Be.isDecimal(String(e),{force_decimal:u.range[0]!==0,decimal_digits:u.range.join(",")}))t.report(le.decimal,"decimal",t,{digits:u.range.join("-")})}),eo=fe((e,u,t)=>{if(!t.isValid)return;if(!Number.isInteger(e))t.report(le.withoutDecimals,"withoutDecimals",t)}),to=fe((e,u,t)=>{if(!t.isValid)return;if(!u.values.includes(e))t.report(le["number.in"],"in",t,u)}),K2=class e extends rr{static rules={in:to,max:ql,min:zl,range:xl,number:Yl,decimal:Jl,negative:Xl,positive:Zl,withoutDecimals:eo};[uu]="vine.number";[fu]=(u)=>{let t=Be.asNumber(u);return!Number.isNaN(t)};constructor(u,t){super(u,t||[Yl(u||{})])}min(u){return this.use(zl({min:u}))}max(u){return this.use(ql({max:u}))}range(u){return this.use(xl({min:u[0],max:u[1]}))}positive(){return this.use(Zl())}negative(){return this.use(Xl())}decimal(u){return this.use(Jl({range:Array.isArray(u)?u:[u]}))}withoutDecimals(){return this.use(eo())}clone(){return new e(this.cloneOptions(),this.cloneValidations())}in(u){return this.use(to({values:u}))}},uo=fe((e,u,t)=>{let r=u.strict===!0?e:Be.asBoolean(e);if(typeof r!=="boolean"){t.report(le.boolean,"boolean",t);return}t.mutate(r,t)}),G2=class e extends rr{static rules={boolean:uo};[uu]="vine.boolean";[fu]=(u)=>{return typeof(this.options.strict===!0?u:Be.asBoolean(u))==="boolean"};constructor(u,t){super(u,t||[uo(u||{})])}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},ro=fe((e,u,t)=>{let r=e;if(typeof u.expectedValue==="boolean")r=Be.asBoolean(e);else if(typeof u.expectedValue==="number")r=Be.asNumber(e);if(r!==u.expectedValue){t.report(le.literal,"literal",t,u);return}t.mutate(r,t)}),tp=class e extends rr{static rules={equals:ro};#e;constructor(u,t,r){super(t,r||[ro({expectedValue:u})]);this.#e=u}clone(){return new e(this.#e,this.cloneOptions(),this.cloneValidations())}},up=["on","1","yes","true",!0,1],io=fe((e,u,t)=>{if(!up.includes(e))t.report(le.accepted,"accepted",t)}),rp=class e extends rr{static rules={accepted:io};constructor(u,t){super(u,t||[io()])}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},ip=class e{#e;#t=(u,t)=>{t.report(le.unionGroup,"unionGroup",t)};constructor(u){this.#e=u}clone(){let u=new e(this.#e);return u.otherwise(this.#t),u}otherwise(u){return this.#t=u,this}[ke](u,t){return{type:"group",elseConditionalFnRefId:u.trackConditional(this.#t),conditions:this.#e.map((r)=>r[ke](u,t))}}},j2=class{#e;#t;constructor(e,u){this.#e=u,this.#t=e}[ke](e,u){return{schema:{type:"sub_object",properties:Object.keys(this.#e).map((t)=>{return this.#e[t][ke](t,e,u)}),groups:[]},conditionalFnRefId:e.trackConditional(this.#t)}}};function La(e){return new ip(e)}La.if=function e(u,t){return new j2(u,t)};La.else=function e(u){return new j2(()=>!0,u)};var sp=class e extends rr{static rules={enum:Ms};#e;constructor(u,t,r){super(t,r||[Ms({choices:Object.values(u)})]);this.#e=u}clone(){return new e(this.#e,this.cloneOptions(),this.cloneValidations())}},np=class e{#e;#t=(u,t)=>{t.report(le.unionOfTypes,"unionOfTypes",t)};constructor(u){this.#e=u}otherwise(u){return this.#t=u,this}clone(){let u=new e(this.#e);return u.otherwise(this.#t),u}[ke](u,t,r){return{type:"union",fieldName:u,propertyName:r.toCamelCase?Fr(u):u,elseConditionalFnRefId:t.trackConditional(this.#t),conditions:this.#e.map((s)=>{return{conditionalFnRefId:t.trackConditional((n,i)=>{return s[fu](n,i)}),schema:s[ke](u,t,r)}})}}},ap=class extends $a{group=La;union=Oa;string(){return new ep}boolean(e){return new G2(e)}accepted(){return new rp}number(e){return new K2(e)}date(e){return new H6(e)}literal(e){return new tp(e)}object(e){return new X6(e)}array(e){return new x6(e)}tuple(e){return new q6(e)}record(e){return new J6(e)}enum(e){if(Array.isArray(e)||typeof e==="function")return new k2(e);return new sp(e)}any(){return new j6}unionOfTypes(e){let u=new Set;return e.forEach((t)=>{if(!t[fu]||!t[uu])throw new Error(`Cannot use "${t.constructor.name}". The schema type is not compatible for use with "vine.unionOfTypes"`);if(u.has(t[uu]))throw new Error(`Cannot use duplicate schema "${t[uu]}". "vine.unionOfTypes" needs distinct schema types only`);u.add(t[uu])}),u.clear(),new np(e)}},hp={required:le.required,array:le.array,object:le.object},so=class{#e;messagesProvider;errorReporter;#t(e){let u=L6();return{compilerNode:{type:"root",schema:e[ke]("",u,{toCamelCase:!1})},refs:u.toJSON()}}constructor(e,u){let{compilerNode:t,refs:r}=this.#t(e);this.#e={schema:t,refs:r};let s=u.metaDataValidator,n=new O6(t,{convertEmptyStringsToNull:u.convertEmptyStringsToNull,messages:hp}).compile();if(this.errorReporter=u.errorReporter,this.messagesProvider=u.messagesProvider,s)this.validate=(i,l)=>{let o=l??{},a=o.meta??{},D=o.errorReporter??this.errorReporter,h=o.messagesProvider??this.messagesProvider;return s(a),n(i,a,r,h,D())};else this.validate=(i,l)=>{let o=l??{},a=o.meta??{},D=o.errorReporter??this.errorReporter,h=o.messagesProvider??this.messagesProvider;return n(i,a,r,h,D())}}async tryValidate(e,...[u]){try{return[null,await this.validate(e,u)]}catch(t){if(t instanceof N2)return[t,null];throw t}}toJSON(){let{schema:e,refs:u}=this.#e;return{schema:structuredClone(e),refs:u}}},lp=class extends ap{messagesProvider=new VC(le,gC);errorReporter=()=>new GC;convertEmptyStringsToNull=!1;helpers=Be;createRule=fe;compile(e){return new so(e,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter})}withMetaData(e){return{compile:(u)=>{return new so(u,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter,metaDataValidator:e})}}}validate(e){return this.compile(e.schema).validate(e.data,e)}tryValidate(e){return this.compile(e.schema).tryValidate(e.data,e)}},op=new lp,Ae=op,cp={APP_NAME:Ae.string(),APP_ENV:Ae.enum(["local","dev","stage","prod"]),APP_KEY:Ae.string(),APP_URL:Ae.string(),PORT:Ae.number(),PORT_BACKEND:Ae.number(),PORT_ADMIN:Ae.number(),PORT_LIBRARY:Ae.number(),PORT_DESKTOP:Ae.number(),PORT_EMAIL:Ae.number(),PORT_DOCS:Ae.number(),PORT_INSPECT:Ae.number(),PORT_API:Ae.number(),PORT_SYSTEM_TRAY:Ae.number(),APP_MAINTENANCE:Ae.boolean(),DEBUG:Ae.boolean(),API_PREFIX:Ae.string(),DOCS_PREFIX:Ae.string(),DB_CONNECTION:Ae.enum(["mysql","sqlite","postgres"]),DB_HOST:Ae.string(),DB_PORT:Ae.number(),DB_DATABASE:Ae.string(),DB_USERNAME:Ae.string(),DB_PASSWORD:Ae.string(),AWS_ACCOUNT_ID:Ae.string(),AWS_ACCESS_KEY_ID:Ae.string(),AWS_SECRET_ACCESS_KEY:Ae.string(),AWS_DEFAULT_REGION:Ae.string(),AWS_DEFAULT_PASSWORD:Ae.string(),MAIL_MAILER:Ae.enum(["ses","sendmail","log","smtp"]),MAIL_HOST:Ae.string(),MAIL_PORT:Ae.number(),MAIL_USERNAME:Ae.string(),MAIL_PASSWORD:Ae.string(),MAIL_ENCRYPTION:Ae.string(),MAIL_FROM_NAME:Ae.string(),MAIL_FROM_ADDRESS:Ae.string(),SEARCH_ENGINE_DRIVER:Ae.enum(["meilisearch","algolia","typesense"]),MEILISEARCH_HOST:Ae.string(),MEILISEARCH_KEY:Ae.string(),FRONTEND_APP_ENV:Ae.enum(["development","staging","production"]),FRONTEND_APP_URL:Ae.string()},Dp={APP_ENV:["local","dev","development","staging","prod","production"],DB_CONNECTION:["mysql","sqlite","postgres","dynamodb"],MAIL_MAILER:["smtp","mailgun","ses","postmark","sendmail","log"],SEARCH_ENGINE_DRIVER:["opensearch"],FRONTEND_APP_ENV:["development","staging","production"]},fp=Object.entries(cp).reduce((e,[u,t])=>{let r;switch(typeof t){case"string":r=Ae.string();break;case"number":r=Ae.number();break;case"boolean":r=Ae.boolean();break;default:if(Array.isArray(t)){r=Ae.enum(t);break}if(typeof t==="object"){let n=Symbol.for("schema_name"),i=t[n];if(i==="vine.string"){r=Ae.string();break}if(i==="vine.number"){r=Ae.number();break}if(i==="vine.boolean"){r=Ae.boolean();break}if(!i){r=Ae.enum(Dp.APP_ENV);break}console.error("Unknown env value type",typeof t)}throw new Error(`Invalid env value for ${u}`)}let s=u;return e[s]=r,e},{}),pT=Ae.object(fp),dp={get:(e,u)=>{let t=e[u];if(typeof t==="string"&&/^\d+$/.test(t)&&u!=="AWS_ACCOUNT_ID")return Number(t);if(typeof t==="string"&&/^true|false$/.test(t))return t==="true";if(t instanceof k2)return e[u];if(t instanceof G2)return!!e[u];if(t instanceof K2)return Number(e[u]);return t}};function Ep(){return typeof Bun!=="undefined"?Bun.env:CC.env}var Se=new Proxy(Ep(),dp),Cp={name:Se.APP_NAME??"Stacks",description:"Stacks is a full-stack framework for building modern web applications.",env:Se.APP_ENV??"local",url:Se.APP_URL??"stacks.localhost",redirectUrls:["stacksjs.com"],debug:Se.DEBUG??!1,key:Se.APP_KEY,maintenanceMode:Se.APP_MAINTENANCE??!1,docMode:!1,timezone:"America/Los_Angeles",locale:"en",fallbackLocale:"en",cipher:"aes-256-cbc"},pp={driver:"dynamodb",prefix:"stacks",ttl:3600,drivers:{dynamodb:{key:Se.AWS_ACCESS_KEY_ID||"",secret:Se.AWS_SECRET_ACCESS_KEY||"",region:Se.AWS_DEFAULT_REGION||"us-east-1",table:"cache",endpoint:""},memcached:{persistent_id:"",sasl:["",""],options:{},servers:[{host:"127.0.0.1",port:11211,weight:100}]},redis:{connection:"cache",host:"127.0.0.1",port:6379,password:"",username:"stacks"}}},gp={name:"My Custom CLI",command:"custom-cli",description:"This is an example command to illustrate how to create your own commands. Check out `../app/commands` for more.",deploy:!0},W2={firewall:{enabled:!0,countryCodes:["RU","IR"],ipAddresses:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0,queryString:[],httpHeaders:[]}},mp={sites:{root:"stacksjs.org",path:"dist",modals:{domain:"modals.stacksjs.org",path:"dist"},stepper:{domain:"stepper.stacksjs.org",path:"dist"},notification:{domain:"notification.stacksjs.org",path:"dist"},docs:{domain:"docs.stacksjs.org",path:"dist"},tlsx:{domain:"tlsx.stacksjs.org",path:"dist"},dtsx:{domain:"dtsx.stacksjs.org",path:"dist"},spreadsheet:{domain:"spreadsheet.stacksjs.org",path:"dist"}},infrastructure:{type:"serverless",driver:"aws",firewall:W2.firewall,environments:["production","staging","development"],storage:{},api:{prefix:Se.API_PREFIX||"api",description:"My awesome Stacks API",deploy:!0,memorySize:512,prewarm:10,timeout:30},cdn:{compress:!0,allowedMethods:"ALL",cachedMethods:"GET_HEAD",originShieldRegion:"us-east-1",minTtl:0,defaultTtl:86400,maxTtl:31536000,cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:1}},fileSystem:!0}},yp={default:Se.DB_CONNECTION||"sqlite",connections:{sqlite:{database:Se.DB_DATABASE||"database/stacks.sqlite",prefix:""},dynamodb:{key:Se.AWS_ACCESS_KEY_ID||"",secret:Se.AWS_SECRET_ACCESS_KEY||"",region:Se.AWS_DEFAULT_REGION||"us-east-1",prefix:Se.DB_DATABASE||"stacks",endpoint:"http://localhost",port:Se.DB_PORT||8000},mysql:{name:Se.DB_DATABASE||"stacks",host:Se.DB_HOST||"127.0.0.1",port:Se.DB_PORT||3306,username:Se.DB_USERNAME||"root",password:Se.DB_PASSWORD||"",prefix:""},postgres:{name:Se.DB_DATABASE||"stacks",host:Se.DB_HOST||"127.0.0.1",port:Se.DB_PORT||3306,username:Se.DB_USERNAME||"",password:Se.DB_PASSWORD||"",prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"},Fp={a:[{name:Se.APP_URL||"",address:"10.0.0.1",ttl:300},{name:"www",address:"@",ttl:300}],aaaa:[],cname:[],mx:[],txt:[],nameservers:[]},Ap={from:{name:Se.MAIL_FROM_NAME||"Stacks",address:Se.MAIL_FROM_ADDRESS||"no-reply@stacksjs.org"},mailboxes:["chris@stacksjs.org","blake@stacksjs.org","glenn@stacksjs.org"],url:Se.APP_URL||"http://localhost:3000",charset:"UTF-8",server:{scan:!0}},vp={messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}},Bp={hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you’re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:`Write a SHORT, IMPERATIVE tense description of the change:
|
|
298
|
-
`,body:`Provide a LONGER description of the change (optional). Use "|" to break new line:
|
|
299
|
-
`,breaking:`List any BREAKING CHANGES (optional). Use "|" to break new line:
|
|
300
|
-
`,footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:`List any ISSUES by this change. E.g.: #31, #34:
|
|
301
|
-
`,confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: ✨ A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: ♻️ A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: ⚡️ A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: ✅ Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6️ Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don’t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: ⏪️ Reverts a previous commit",emoji:":rewind:"}]},bp={driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,threads:1,time:1}},Sp={name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",releaseable:!0,vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}},Tp={logsPath:oa("logs/stacks.log"),deploymentsPath:oa("logs/deployments.log")},wp={default:"email"},Ip={driver:"stripe",stripe:{publishableKey:Se.STRIPE_PUBLISHABLE_KEY||"",secretKey:Se.STRIPE_SECRET_KEY||""}},Np={frontend:Se.PORT??3000,backend:Se.PORT_BACKEND??3001,admin:Se.PORT_ADMIN??3002,library:Se.PORT_LIBRARY??3003,desktop:Se.PORT_DESKTOP??3004,email:Se.PORT_EMAIL??3005,docs:Se.PORT_DOCS??3006,inspect:Se.PORT_INSPECT??3007,api:Se.PORT_API??3008,systemTray:Se.PORT_SYSTEM_TRAY??3009,database:3010},_p={default:"sync",connections:{sync:{driver:"sync"},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}},$p={plans:[{productName:"Stacks Hobby",description:"All the Stacks features.",pricing:[{key:"stacks_hobby_monthly",price:3900,interval:"month",currency:"usd"},{key:"stacks_hobby_yearly",price:37900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}},{productName:"Stacks Pro",description:"All the Stacks features, including being able to invite team members.",pricing:[{key:"stacks_pro_monthly",price:5900,interval:"month",currency:"usd"},{key:"stacks_pro_yearly",price:57900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}}],webhook:{endpoint:"/webhooks/stripe",secret:""},currencies:["usd"],coupons:[{code:"SUMMER2024",amountOff:500,duration:"once"}],products:[{name:"Stacks Pro",description:"All the Stacks features.",images:["url_to_image"]}]},Rp={driver:"opensearch"},Op={aws:{accountId:Se.AWS_ACCOUNT_ID||"",appId:Se.AWS_ACCESS_KEY_ID||"",apiKey:Se.AWS_SECRET_ACCESS_KEY||"",region:Se.AWS_DEFAULT_REGION||"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},lemonSqueezy:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}},Lp={driver:"s3"},Up={name:"Stacks",members:{chris:"chris@stacksjs.org",blake:"blake@stacksjs.org",zoltan:"zoltan@stacksjs.org",freddy:"freddy@stacksjs.org",glenn:"glenn@stacksjs.org",dorell:"dorell@stacksjs.org",avery:"avery@stacksjs.org",adelino:"adelino@stacksjs.org"}},Pp={shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}},theme:{colors:{veryCool:"#0000ff",brand:{primary:"hsl(var(--hue, 217) 78% 51%)"}}}},Mp={ai:dC,analytics:EC,app:Cp,cache:pp,cli:gp,cloud:mp,database:yp,dns:Fp,email:Ap,errors:vp,git:Bp,hashing:bp,library:Sp,logging:Tp,notification:wp,queue:_p,payment:Ip,ports:Np,saas:$p,searchEngine:Rp,security:W2,services:Op,storage:Lp,team:Up,ui:Pp},H2=Mp;async function kp(e){if(!e?.port)e={port:3000};return console.log("Creating local tunnel",e.port),"localTunnel"}async function Cr(e){return await kp({port:e})}async function Vp({domain:e=At.app.url||"stacks",type:u="frontend",localhost:t=!1,https:r=void 0,network:s=void 0}={}){let n=e.replace(/\.[^.]+$/,".localhost");switch(u){case"frontend":if(s)return await Cr(At.ports?.frontend||3000);if(t)return`http://localhost:${At.ports?.frontend}`;break;case"backend":if(s)return await Cr(At.ports?.backend||3001);if(t)return`http://localhost:${At.ports?.backend}`;n=`api.${n}`;break;case"admin":if(s)return await Cr(At.ports?.admin||3002);if(t)return`http://localhost:${At.ports?.admin}`;n=`admin.${n}`;break;case"library":if(s)return await Cr(At.ports?.library||3003);if(t)return`http://localhost:${At.ports?.library}`;n=`libs.${n}`;break;case"email":if(s)return await Cr(At.ports?.email||3005);if(t)return`http://localhost:${At.ports?.email}`;n=`email.${n}`;break;case"desktop":if(s)return await Cr(At.ports?.desktop||3004);if(t)return`http://localhost:${At.ports?.desktop}`;n=`desktop.${n}`;break;case"docs":if(s)return await Cr(At.ports?.docs||3006);if(t)return`http://localhost:${At.ports?.docs}`;n=`docs.${n}`;break;case"inspect":if(s)return await Cr(At.ports?.inspect||3007);if(t)return`http://localhost:${At.ports?.inspect}`;n=`inspect.${n}`;break;default:if(t)return`http://localhost:${At.ports?.frontend}`}if(r)return`https://${n}`;return`http://${n}`}function Kp(e){return e}function Gp(e){return e}function jp(e){return e}function Wp(e){return e}function Hp(e){return e}function Qp(e){return e}function Yp(e){return e}function zp(e){return e}function qp(e){return e}function xp(e){return e}function Zp(e){return e}function Xp(e){return e}function Jp(e){return e}function eg(e){return e}function tg(e){return e}function ug(e){return e}function rg(e){return e}function ig(e){return e}function sg(e){return e}function ng(e){return e}function ag(e){return e}function hg(e){return e}function lg(e){return e}function og(e){return e}function cg(e){return e}function Dg(e){return e}function fg(e){return e}var Ye={...w2,...H2},dg=Ye.ai,Eg=Ye.analytics,Rr=Ye.app,Cg=Ye.cache,pg=Ye.cloud,gg=Ye.cli,mg=Ye.database,yg=Ye.dns,Fg=Ye.docs,Ag=Ye.email,vg=Ye.errors,Bg=Ye.git,bg=Ye.hashing,Sg=Ye.library,Tg=Ye.logging,wg=Ye.notification,Ig=Ye.payment,Ng=Ye.ports,_g=Ye.queue,$g=Ye.security,Rg=Ye.saas,Og=Ye.searchEngine,Lg=Ye.services,Ug=Ye.storage,Pg=Ye.team,Mg=Ye.ui;function kg(){if(Rr.env==="local")return"dev";if(Rr.env==="development")return"dev";if(Rr.env==="staging")return"stage";if(Rr.env==="production")return"prod";if(!Rr.env)throw new Error("Couldn't determine app environment");return Rr.env}class Q2{static isTestEnvironment=!1;static shouldExitProcess=!0;static handle(e,u){if(this.shouldExitProcess=u?.shouldExit!==!1,u?.silent!==!0)this.writeErrorToConsole(e);let t;if(u?.message)t=u.message;else if(e instanceof Error)t=e.message;else if(typeof e==="string")t=e;else t=JSON.stringify(e);let r=new Error(t);if(e instanceof Error)Object.assign(r,e);return this.writeErrorToFile(r).catch((s)=>console.error(s)),r}static handleError(e,u){return this.handle(e,u),e}static async writeErrorToFile(e){if(!(e instanceof Error)){console.error("Error is not an instance of Error:",e);return}let u=`[${new Date().toISOString()}] ${e.name}: ${e.message}
|
|
302
|
-
`,t=kh("stacks.log")??kh("errors.log");try{await A2(iC(t),{recursive:!0}),await F2(t,u)}catch(r){console.error("Failed to write to error file:",r)}}static writeErrorToConsole(e){console.error(e);let u=typeof e==="string"?e:e instanceof Error?e.message:JSON.stringify(e);if(u.includes("bunx --bun cdk destroy")||u===`Failed to execute command: ${Da("bunx --bun eslint . --fix")}`||u===`Failed to execute command: ${Da("bun storage/framework/core/actions/src/lint/fix.ts")}`){if(!this.isTestEnvironment)console.log("No need to worry. The edge function is currently being destroyed. Please run `buddy undeploy` shortly again, and continue doing so until it succeeds running."),console.log("Hoping to see you back soon!")}if(this.shouldExitProcess)rC.exit(1)}}function Vg(e,u){let t;if(pC(e))t=e;else if(e instanceof Error)t=e.message;else if(u instanceof Error)t=u.message;else t=String(e);return Or(`ERROR: ${Bu(t)}`),Q2.handle(e,u)}async function Or(e,u){let t=`[${new Date().toISOString()}] ${e}
|
|
303
|
-
`;try{let r=u?.logFile??At.logging.logsPath??"storage/logs/stacks.log";try{await tC(r)}catch{await A2(uC(r),{recursive:!0})}await F2(r,t)}catch(r){console.error("Failed to write to log file:",r)}}var Kg={withStackTrace:!1},Y2=(e,u,t=Kg)=>{let r=u.isOk()?{type:"Ok",value:u.value}:{type:"Err",value:u.error},s=t.withStackTrace?new Error().stack:void 0;return{data:r,message:e,stack:s}};function ti(e,u,t,r){function s(n){return n instanceof t?n:new t(function(i){i(n)})}return new(t||(t=Promise))(function(n,i){function l(D){try{a(r.next(D))}catch(h){i(h)}}function o(D){try{a(r.throw(D))}catch(h){i(h)}}function a(D){D.done?n(D.value):s(D.value).then(l,o)}a((r=r.apply(e,u||[])).next())})}function no(e){var u=typeof Symbol==="function"&&Symbol.iterator,t=u&&e[u],r=0;if(t)return t.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&r>=e.length)e=void 0;return{value:e&&e[r++],done:!e}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")}function Uu(e){return this instanceof Uu?(this.v=e,this):new Uu(e)}function ao(e,u,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t.apply(e,u||[]),s,n=[];return s=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",i),s[Symbol.asyncIterator]=function(){return this},s;function i(F){return function(p){return Promise.resolve(p).then(F,h)}}function l(F,p){if(r[F]){if(s[F]=function(f){return new Promise(function(m,B){n.push([F,f,m,B])>1||o(F,f)})},p)s[F]=p(s[F])}}function o(F,p){try{a(r[F](p))}catch(f){d(n[0][3],f)}}function a(F){F.value instanceof Uu?Promise.resolve(F.value.v).then(D,h):d(n[0][2],F)}function D(F){o("next",F)}function h(F){o("throw",F)}function d(F,p){if(F(p),n.shift(),n.length)o(n[0][0],n[0][1])}}function Gg(e){var u,t;return u={},r("next"),r("throw",function(s){throw s}),r("return"),u[Symbol.iterator]=function(){return this},u;function r(s,n){u[s]=e[s]?function(i){return(t=!t)?{value:Uu(e[s](i)),done:!1}:n?n(i):i}:n}}function jg(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u=e[Symbol.asyncIterator],t;return u?u.call(e):(e=typeof no==="function"?no(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(i){return new Promise(function(l,o){i=e[n](i),s(l,o,i.done,i.value)})}}function s(n,i,l,o){Promise.resolve(o).then(function(a){n({value:a,done:l})},i)}}class jt{constructor(e){this._promise=e}static fromSafePromise(e){let u=e.then((t)=>new Ou(t));return new jt(u)}static fromPromise(e,u){let t=e.then((r)=>new Ou(r)).catch((r)=>new vu(u(r)));return new jt(t)}static fromThrowable(e,u){return(...t)=>{return new jt((()=>ti(this,void 0,void 0,function*(){try{return new Ou(yield e(...t))}catch(r){return new vu(u?u(r):r)}}))())}}static combine(e){return Wg(e)}static combineWithAllErrors(e){return Hg(e)}map(e){return new jt(this._promise.then((u)=>ti(this,void 0,void 0,function*(){if(u.isErr())return new vu(u.error);return new Ou(yield e(u.value))})))}andThrough(e){return new jt(this._promise.then((u)=>ti(this,void 0,void 0,function*(){if(u.isErr())return new vu(u.error);let t=yield e(u.value);if(t.isErr())return new vu(t.error);return new Ou(u.value)})))}andTee(e){return new jt(this._promise.then((u)=>ti(this,void 0,void 0,function*(){if(u.isErr())return new vu(u.error);try{yield e(u.value)}catch(t){}return new Ou(u.value)})))}mapErr(e){return new jt(this._promise.then((u)=>ti(this,void 0,void 0,function*(){if(u.isOk())return new Ou(u.value);return new vu(yield e(u.error))})))}andThen(e){return new jt(this._promise.then((u)=>{if(u.isErr())return new vu(u.error);let t=e(u.value);return t instanceof jt?t._promise:t}))}orElse(e){return new jt(this._promise.then((u)=>ti(this,void 0,void 0,function*(){if(u.isErr())return e(u.error);return new Ou(u.value)})))}match(e,u){return this._promise.then((t)=>t.match(e,u))}unwrapOr(e){return this._promise.then((u)=>u.unwrapOr(e))}safeUnwrap(){return ao(this,arguments,function*e(){return yield Uu(yield Uu(yield*Gg(jg(yield Uu(this._promise.then((u)=>u.safeUnwrap()))))))})}then(e,u){return this._promise.then(e,u)}[Symbol.asyncIterator](){return ao(this,arguments,function*e(){let u=yield Uu(this._promise);if(u.isErr())yield yield Uu($s(u.error));return yield Uu(u.value)})}}var $s=(e)=>new jt(Promise.resolve(new vu(e))),gT=jt.fromPromise,mT=jt.fromSafePromise,yT=jt.fromThrowable,z2=(e)=>{let u=Ur([]);for(let t of e)if(t.isErr()){u=Ju(t.error);break}else u.map((r)=>r.push(t.value));return u},Wg=(e)=>jt.fromSafePromise(Promise.all(e)).andThen(z2),q2=(e)=>{let u=Ur([]);for(let t of e)if(t.isErr()&&u.isErr())u.error.push(t.error);else if(t.isErr()&&u.isOk())u=Ju([t.error]);else if(t.isOk()&&u.isOk())u.value.push(t.value);return u},Hg=(e)=>jt.fromSafePromise(Promise.all(e)).andThen(q2),ca;(function(e){function u(s,n){return(...i)=>{try{let l=s(...i);return Ur(l)}catch(l){return Ju(n?n(l):l)}}}e.fromThrowable=u;function t(s){return z2(s)}e.combine=t;function r(s){return q2(s)}e.combineWithAllErrors=r})(ca||(ca={}));var Ur=(e)=>new Ou(e);function Ju(e){return new vu(e)}class Ou{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return Ur(e(this.value))}mapErr(e){return Ur(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map((u)=>this.value)}andTee(e){try{e(this.value)}catch(u){}return Ur(this.value)}orElse(e){return Ur(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return jt.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,u){return e(this.value)}safeUnwrap(){let e=this.value;return function*(){return e}()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw Y2("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}}class vu{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return Ju(this.error)}mapErr(e){return Ju(e(this.error))}andThrough(e){return Ju(this.error)}andTee(e){return Ju(this.error)}andThen(e){return Ju(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return $s(this.error)}asyncAndThrough(e){return $s(this.error)}asyncMap(e){return $s(this.error)}unwrapOr(e){return e}match(e,u){return u(this.error)}safeUnwrap(){let e=this.error;return function*(){throw yield Ju(e),new Error("Do not use this generator out of `safeTry`")}()}_unsafeUnwrap(e){throw Y2("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){let e=this;return yield e,e}}var FT=ca.fromThrowable,Qg=Ge(yE(),1);var Yg={};pa(Yg,{yellow:()=>um,white:()=>nm,underline:()=>xg,trueColorBg:()=>$m,trueColor:()=>_m,stripColors:()=>zg,strikethrough:()=>Jg,reset:()=>qg,red:()=>tm,options:()=>ai,magenta:()=>im,link:()=>Rm,lightYellow:()=>cm,lightRed:()=>lm,lightMagenta:()=>fm,lightGreen:()=>om,lightGray:()=>hm,lightCyan:()=>dm,lightBlue:()=>Dm,italic:()=>Da,inverse:()=>Zg,hidden:()=>Xg,green:()=>Ar,gray:()=>am,dim:()=>Zs,cyan:()=>sm,bold:()=>Ua,blue:()=>rm,black:()=>em,bgYellow:()=>gm,bgWhite:()=>Am,bgRed:()=>Cm,bgMagenta:()=>ym,bgLightYellow:()=>Sm,bgLightRed:()=>Bm,bgLightMagenta:()=>wm,bgLightGreen:()=>bm,bgLightGray:()=>Nm,bgLightCyan:()=>Im,bgLightBlue:()=>Tm,bgGreen:()=>pm,bgGray:()=>vm,bgCyan:()=>Fm,bgBlue:()=>mm,bgBlack:()=>Em,ansi256Bg:()=>X2,ansi256:()=>Z2});var Lr=!0,ui=typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:{},Ui=0;if(ui.process&&ui.process.env&&ui.process.stdout){let{FORCE_COLOR:e,NODE_DISABLE_COLORS:u,NO_COLOR:t,TERM:r,COLORTERM:s}=ui.process.env;if(u||t||e==="0")Lr=!1;else if(e==="1"||e==="2"||e==="3")Lr=!0;else if(r==="dumb")Lr=!1;else if("CI"in ui.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((n)=>(n in ui.process.env)))Lr=!0;else Lr=process.stdout.isTTY;if(Lr)if(process.platform==="win32")Ui=3;else if(s&&(s==="truecolor"||s==="24bit"))Ui=3;else if(r&&(r.endsWith("-256color")||r.endsWith("256")))Ui=2;else Ui=1}var ai={enabled:Lr,supportLevel:Ui};function Ne(e,u,t=1){let r=`\x1B[${e}m`,s=`\x1B[${u}m`,n=new RegExp(`\\x1b\\[${u}m`,"g");return(i)=>{return ai.enabled&&ai.supportLevel>=t?r+(""+i).replace(n,r)+s:""+i}}function x2(e,u,t){if(e>>4===u>>4&&u>>4===t>>4){if(e<8)return 16;if(e>248)return 231;return Math.round((e-8)/247*24)+232}return 16+36*Math.round(e/255*5)+6*Math.round(u/255*5)+Math.round(t/255*5)}function zg(e){return(""+e).replace(/\x1b\[[0-9;]+m/g,"").replace(/\x1b\]8;;.*?\x07(.*?)\x1b\]8;;\x07/g,(u,t)=>t)}var qg=Ne(0,0),Ua=Ne(1,22),Zs=Ne(2,22),Da=Ne(3,23),xg=Ne(4,24),Zg=Ne(7,27),Xg=Ne(8,28),Jg=Ne(9,29),em=Ne(30,39),tm=Ne(31,39),Ar=Ne(32,39),um=Ne(33,39),rm=Ne(34,39),im=Ne(35,39),sm=Ne(36,39),nm=Ne(97,39),am=Ne(90,39),hm=Ne(37,39),lm=Ne(91,39),om=Ne(92,39),cm=Ne(93,39),Dm=Ne(94,39),fm=Ne(95,39),dm=Ne(96,39),Em=Ne(40,49),Cm=Ne(41,49),pm=Ne(42,49),gm=Ne(43,49),mm=Ne(44,49),ym=Ne(45,49),Fm=Ne(46,49),Am=Ne(107,49),vm=Ne(100,49),Bm=Ne(101,49),bm=Ne(102,49),Sm=Ne(103,49),Tm=Ne(104,49),wm=Ne(105,49),Im=Ne(106,49),Nm=Ne(47,49),Z2=(e)=>Ne("38;5;"+e,0,2),X2=(e)=>Ne("48;5;"+e,0,2),_m=(e,u,t)=>{return ai.supportLevel===2?Z2(x2(e,u,t)):Ne(`38;2;${e};${u};${t}`,0,3)},$m=(e,u,t)=>{return ai.supportLevel===2?X2(x2(e,u,t)):Ne(`48;2;${e};${u};${t}`,0,3)},ho="\x1B]",lo="\x07",bs=";";function Rm(e,u){return ai.enabled?ho+"8"+bs+bs+u+lo+e+ho+"8"+bs+bs+lo:`${e} (${u})`}function J2(e){if(Array.isArray(e)){if(e=Array.from(new Set(e)),Array.isArray(e)&&e[0]&&!e[0].startsWith("-"))e.shift();return e.join(" ")}if(typeof e==="object"&&e!==null)return Object.entries(e).map(([u,t])=>{if(t===!0)return`--${u}`;return`--${u} ${t}`}).join(" ");return J2(Om.argv.slice(2))}var Xn=10,oo=(e=0)=>(u)=>`\x1B[${u+e}m`,co=(e=0)=>(u)=>`\x1B[${38+e};5;${u}m`,Do=(e=0)=>(u,t,r)=>`\x1B[${38+e};2;${u};${t};${r}m`,tt={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},BT=Object.keys(tt.modifier),Lm=Object.keys(tt.color),Um=Object.keys(tt.bgColor),bT=[...Lm,...Um];function Pm(){let e=new Map;for(let[u,t]of Object.entries(tt)){for(let[r,s]of Object.entries(t))tt[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},t[r]=tt[r],e.set(s[0],s[1]);Object.defineProperty(tt,u,{value:t,enumerable:!1})}return Object.defineProperty(tt,"codes",{value:e,enumerable:!1}),tt.color.close="\x1B[39m",tt.bgColor.close="\x1B[49m",tt.color.ansi=oo(),tt.color.ansi256=co(),tt.color.ansi16m=Do(),tt.bgColor.ansi=oo(Xn),tt.bgColor.ansi256=co(Xn),tt.bgColor.ansi16m=Do(Xn),Object.defineProperties(tt,{rgbToAnsi256:{value(u,t,r){if(u===t&&t===r){if(u<8)return 16;if(u>248)return 231;return Math.round((u-8)/247*24)+232}return 16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(u){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[r]=t;if(r.length===3)r=[...r].map((n)=>n+n).join("");let s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:(u)=>tt.rgbToAnsi256(...tt.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,r,s;if(u>=232)t=((u-232)*10+8)/255,r=t,s=t;else{u-=16;let l=u%36;t=Math.floor(u/36)/5,r=Math.floor(l/6)/5,s=l%6/5}let n=Math.max(t,r,s)*2;if(n===0)return 30;let i=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(t));if(n===2)i+=60;return i},enumerable:!1},rgbToAnsi:{value:(u,t,r)=>tt.ansi256ToAnsi(tt.rgbToAnsi256(u,t,r)),enumerable:!1},hexToAnsi:{value:(u)=>tt.ansi256ToAnsi(tt.hexToAnsi256(u)),enumerable:!1}}),tt}var Mm=Pm(),Lu=Mm;function Du(e,u=globalThis.Deno?globalThis.Deno.args:Pa.argv){let t=e.startsWith("-")?"":e.length===1?"-":"--",r=u.indexOf(t+e),s=u.indexOf("--");return r!==-1&&(s===-1||r<s)}var{env:lt}=Pa,ks;if(Du("no-color")||Du("no-colors")||Du("color=false")||Du("color=never"))ks=0;else if(Du("color")||Du("colors")||Du("color=true")||Du("color=always"))ks=1;function Vm(){if("FORCE_COLOR"in lt){if(lt.FORCE_COLOR==="true")return 1;if(lt.FORCE_COLOR==="false")return 0;return lt.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(lt.FORCE_COLOR,10),3)}}function Km(e){if(e===0)return!1;return{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Gm(e,{streamIsTTY:u,sniffFlags:t=!0}={}){let r=Vm();if(r!==void 0)ks=r;let s=t?ks:r;if(s===0)return 0;if(t){if(Du("color=16m")||Du("color=full")||Du("color=truecolor"))return 3;if(Du("color=256"))return 2}if("TF_BUILD"in lt&&"AGENT_NAME"in lt)return 1;if(e&&!u&&s===void 0)return 0;let n=s||0;if(lt.TERM==="dumb")return n;if(Pa.platform==="win32"){let i=km.release().split(".");if(Number(i[0])>=10&&Number(i[2])>=10586)return Number(i[2])>=14931?3:2;return 1}if("CI"in lt){if("GITHUB_ACTIONS"in lt||"GITEA_ACTIONS"in lt)return 3;if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((i)=>(i in lt))||lt.CI_NAME==="codeship")return 1;return n}if("TEAMCITY_VERSION"in lt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(lt.TEAMCITY_VERSION)?1:0;if(lt.COLORTERM==="truecolor")return 3;if(lt.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in lt){let i=Number.parseInt((lt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(lt.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(lt.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(lt.TERM))return 1;if("COLORTERM"in lt)return 1;return n}function Eo(e,u={}){let t=Gm(e,{streamIsTTY:e&&e.isTTY,...u});return Km(t)}var jm={stdout:Eo({isTTY:fo.isatty(1)}),stderr:Eo({isTTY:fo.isatty(2)})},Wm=jm;function Hm(e,u,t){let r=e.indexOf(u);if(r===-1)return e;let s=u.length,n=0,i="";do i+=e.slice(n,r)+u+t,n=r+s,r=e.indexOf(u,n);while(r!==-1);return i+=e.slice(n),i}function Qm(e,u,t,r){let s=0,n="";do{let i=e[r-1]==="\r";n+=e.slice(s,i?r-1:r)+u+(i?`\r
|
|
304
|
-
`:`
|
|
305
|
-
`)+t,s=r+1,r=e.indexOf(`
|
|
306
|
-
`,s)}while(r!==-1);return n+=e.slice(s),n}var{stdout:Co,stderr:po}=Wm,fa=Symbol("GENERATOR"),hi=Symbol("STYLER"),Mi=Symbol("IS_EMPTY"),go=["ansi","ansi","ansi256","ansi16m"],li=Object.create(null),Ym=(e,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=Co?Co.level:0;e.level=u.level===void 0?t:u.level},zm=(e)=>{let u=(...t)=>t.join(" ");return Ym(u,e),Object.setPrototypeOf(u,Hi.prototype),u};function Hi(e){return zm(e)}Object.setPrototypeOf(Hi.prototype,Function.prototype);for(let[e,u]of Object.entries(Lu))li[e]={get(){let t=Vs(this,Ea(u.open,u.close,this[hi]),this[Mi]);return Object.defineProperty(this,e,{value:t}),t}};li.visible={get(){let e=Vs(this,this[hi],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var da=(e,u,t,...r)=>{if(e==="rgb"){if(u==="ansi16m")return Lu[t].ansi16m(...r);if(u==="ansi256")return Lu[t].ansi256(Lu.rgbToAnsi256(...r));return Lu[t].ansi(Lu.rgbToAnsi(...r))}if(e==="hex")return da("rgb",u,t,...Lu.hexToRgb(...r));return Lu[t][e](...r)},qm=["rgb","hex","ansi256"];for(let e of qm){li[e]={get(){let{level:t}=this;return function(...r){let s=Ea(da(e,go[t],"color",...r),Lu.color.close,this[hi]);return Vs(this,s,this[Mi])}}};let u="bg"+e[0].toUpperCase()+e.slice(1);li[u]={get(){let{level:t}=this;return function(...r){let s=Ea(da(e,go[t],"bgColor",...r),Lu.bgColor.close,this[hi]);return Vs(this,s,this[Mi])}}}}var xm=Object.defineProperties(()=>{},{...li,level:{enumerable:!0,get(){return this[fa].level},set(e){this[fa].level=e}}}),Ea=(e,u,t)=>{let r,s;if(t===void 0)r=e,s=u;else r=t.openAll+e,s=u+t.closeAll;return{open:e,close:u,openAll:r,closeAll:s,parent:t}},Vs=(e,u,t)=>{let r=(...s)=>Zm(r,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(r,xm),r[fa]=e,r[hi]=u,r[Mi]=t,r},Zm=(e,u)=>{if(e.level<=0||!u)return e[Mi]?"":u;let t=e[hi];if(t===void 0)return u;let{openAll:r,closeAll:s}=t;if(u.includes("\x1B"))while(t!==void 0)u=Hm(u,t.close,t.open),t=t.parent;let n=u.indexOf(`
|
|
307
|
-
`);if(n!==-1)u=Qm(u,s,r,n);return r+u+s};Object.defineProperties(Hi.prototype,li);var Xm=Hi(),IT=Hi({level:po?po.level:0}),er=Xm,Jm=(e,u,t,r)=>{if(t==="length"||t==="prototype")return;if(t==="arguments"||t==="caller")return;let s=Object.getOwnPropertyDescriptor(e,t),n=Object.getOwnPropertyDescriptor(u,t);if(!ey(s,n)&&r)return;Object.defineProperty(e,t,n)},ey=function(e,u){return e===void 0||e.configurable||e.writable===u.writable&&e.enumerable===u.enumerable&&e.configurable===u.configurable&&(e.writable||e.value===u.value)},ty=(e,u)=>{let t=Object.getPrototypeOf(u);if(t===Object.getPrototypeOf(e))return;Object.setPrototypeOf(e,t)},uy=(e,u)=>`/* Wrapped ${e}*/
|
|
308
|
-
${u}`,ry=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),iy=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),sy=(e,u,t)=>{let r=t===""?"":`with ${t.trim()}() `,s=uy.bind(null,r,u.toString());Object.defineProperty(s,"name",iy);let{writable:n,enumerable:i,configurable:l}=ry;Object.defineProperty(e,"toString",{value:s,writable:n,enumerable:i,configurable:l})};function ny(e,u,{ignoreNonConfigurable:t=!1}={}){let{name:r}=e;for(let s of Reflect.ownKeys(u))Jm(e,u,s,t);return ty(e,u),sy(e,u,r),e}var Ks=new WeakMap,tc=(e,u={})=>{if(typeof e!=="function")throw new TypeError("Expected a function");let t,r=0,s=e.displayName||e.name||"<anonymous>",n=function(...i){if(Ks.set(n,++r),r===1)t=e.apply(this,i),e=void 0;else if(u.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return t};return ny(n,e),Ks.set(n,r),n};tc.callCount=(e)=>{if(!Ks.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Ks.get(e)};var ay=tc,ii=[];ii.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")ii.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")ii.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Rs=(e)=>!!e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function",Jn=Symbol.for("signal-exit emitter"),ea=globalThis,hy=Object.defineProperty.bind(Object);class uc{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ea[Jn])return ea[Jn];hy(ea,Jn,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,u){this.listeners[e].push(u)}removeListener(e,u){let t=this.listeners[e],r=t.indexOf(u);if(r===-1)return;if(r===0&&t.length===1)t.length=0;else t.splice(r,1)}emit(e,u,t){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let s of this.listeners[e])r=s(u,t)===!0||r;if(e==="exit")r=this.emit("afterExit",u,t)||r;return r}}class Ma{}var ly=(e)=>{return{onExit(u,t){return e.onExit(u,t)},load(){return e.load()},unload(){return e.unload()}}};class rc extends Ma{onExit(){return()=>{}}load(){}unload(){}}class ic extends Ma{#e=Ca.platform==="win32"?"SIGINT":"SIGHUP";#t=new uc;#u;#r;#i;#n={};#s=!1;constructor(e){super();this.#u=e,this.#n={};for(let u of ii)this.#n[u]=()=>{let t=this.#u.listeners(u),{count:r}=this.#t,s=e;if(typeof s.__signal_exit_emitter__==="object"&&typeof s.__signal_exit_emitter__.count==="number")r+=s.__signal_exit_emitter__.count;if(t.length===r){this.unload();let n=this.#t.emit("exit",null,u),i=u==="SIGHUP"?this.#e:u;if(!n)e.kill(e.pid,i)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,u){if(!Rs(this.#u))return()=>{};if(this.#s===!1)this.load();let t=u?.alwaysLast?"afterExit":"exit";return this.#t.on(t,e),()=>{if(this.#t.removeListener(t,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0)this.unload()}}load(){if(this.#s)return;this.#s=!0,this.#t.count+=1;for(let e of ii)try{let u=this.#n[e];if(u)this.#u.on(e,u)}catch(u){}this.#u.emit=(e,...u)=>{return this.#f(e,...u)},this.#u.reallyExit=(e)=>{return this.#a(e)}}unload(){if(!this.#s)return;this.#s=!1,ii.forEach((e)=>{let u=this.#n[e];if(!u)throw new Error("Listener not defined for signal: "+e);try{this.#u.removeListener(e,u)}catch(t){}}),this.#u.emit=this.#r,this.#u.reallyExit=this.#i,this.#t.count-=1}#a(e){if(!Rs(this.#u))return 0;return this.#u.exitCode=e||0,this.#t.emit("exit",this.#u.exitCode,null),this.#i.call(this.#u,this.#u.exitCode)}#f(e,...u){let t=this.#r;if(e==="exit"&&Rs(this.#u)){if(typeof u[0]==="number")this.#u.exitCode=u[0];let r=t.call(this.#u,e,...u);return this.#t.emit("exit",this.#u.exitCode,null),r}else return t.call(this.#u,e,...u)}}var Ca=globalThis.process,{onExit:oy,load:$T,unload:RT}=ly(Rs(Ca)?new ic(Ca):new rc),mo=Ts.stderr.isTTY?Ts.stderr:Ts.stdout.isTTY?Ts.stdout:void 0,cy=mo?ay(()=>{oy(()=>{mo.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},Dy=cy,Gs=!1,si={};si.show=(e=ec.stderr)=>{if(!e.isTTY)return;Gs=!1,e.write("\x1B[?25h")};si.hide=(e=ec.stderr)=>{if(!e.isTTY)return;Dy(),Gs=!0,e.write("\x1B[?25l")};si.toggle=(e,u)=>{if(e!==void 0)Gs=e;if(Gs)si.show(u);else si.hide(u)};var yo=si,ws=Ge(C2(),1);function fy(){if(Au.platform!=="win32")return Au.env.TERM!=="linux";return Boolean(Au.env.CI)||Boolean(Au.env.WT_SESSION)||Boolean(Au.env.TERMINUS_SUBLIME)||Au.env.ConEmuTask==="{cmd::Cmder}"||Au.env.TERM_PROGRAM==="Terminus-Sublime"||Au.env.TERM_PROGRAM==="vscode"||Au.env.TERM==="xterm-256color"||Au.env.TERM==="alacritty"||Au.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var dy={info:er.blue("ℹ"),success:er.green("✔"),warning:er.yellow("⚠"),error:er.red("✖")},Ey={info:er.blue("i"),success:er.green("√"),warning:er.yellow("‼"),error:er.red("×")},Cy=fy()?dy:Ey,Is=Cy;function py({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var gy=py();function sc(e){if(typeof e!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(gy,"")}function my(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function yy(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Fy(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function Ay(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function vy(e,{ambiguousAsWide:u=!1}={}){if(Ay(e),yy(e)||Fy(e)||u&&my(e))return 2;return 1}var By=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g},by=new Intl.Segmenter,Sy=/^\p{Default_Ignorable_Code_Point}$/u;function Ty(e,u={}){if(typeof e!=="string"||e.length===0)return 0;let{ambiguousIsNarrow:t=!0,countAnsiEscapeCodes:r=!1}=u;if(!r)e=sc(e);if(e.length===0)return 0;let s=0,n={ambiguousAsWide:!t};for(let{segment:i}of by.segment(e)){let l=i.codePointAt(0);if(l<=31||l>=127&&l<=159)continue;if(l>=8203&&l<=8207||l===65279)continue;if(l>=768&&l<=879||l>=6832&&l<=6911||l>=7616&&l<=7679||l>=8400&&l<=8447||l>=65056&&l<=65071)continue;if(l>=55296&&l<=57343)continue;if(l>=65024&&l<=65039)continue;if(Sy.test(i))continue;if(By().test(i)){s+=2;continue}s+=vy(l,n)}return s}function wy({stream:e=process.stdout}={}){return Boolean(e&&e.isTTY&&!0&&!("CI"in process.env))}function Iy(){let{env:e}=Fo,{TERM:u,TERM_PROGRAM:t}=e;if(Fo.platform!=="win32")return u!=="linux";return Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||e.ConEmuTask==="{cmd::Cmder}"||t==="Terminus-Sublime"||t==="vscode"||u==="xterm-256color"||u==="alacritty"||u==="rxvt-unicode"||u==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Ny=3;class nc{#e=0;start(){if(this.#e++,this.#e===1)this.#t()}stop(){if(this.#e<=0)throw new Error("`stop` called more times than `start`");if(this.#e--,this.#e===0)this.#u()}#t(){if(Ru.platform==="win32"||!Ru.stdin.isTTY)return;Ru.stdin.setRawMode(!0),Ru.stdin.on("data",this.#r),Ru.stdin.resume()}#u(){if(!Ru.stdin.isTTY)return;Ru.stdin.off("data",this.#r),Ru.stdin.pause(),Ru.stdin.setRawMode(!1)}#r(e){if(e[0]===Ny)Ru.emit("SIGINT")}}var _y=new nc,Ao=_y,PT=Ge(C2(),1);class $y{#e=0;#t=!1;#u=0;#r=0;#i;#n;#s;#a;#f;#o;#c;#D;#E;#h;#l;color;constructor(e){if(typeof e==="string")e={text:e};if(this.#i={color:"cyan",stream:Ss.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#i.color,this.spinner=this.#i.spinner,this.#f=this.#i.interval,this.#s=this.#i.stream,this.#o=typeof this.#i.isEnabled==="boolean"?this.#i.isEnabled:wy({stream:this.#s}),this.#c=typeof this.#i.isSilent==="boolean"?this.#i.isSilent:!1,this.text=this.#i.text,this.prefixText=this.#i.prefixText,this.suffixText=this.#i.suffixText,this.indent=this.#i.indent,Ss.env.NODE_ENV==="test")this._stream=this.#s,this._isEnabled=this.#o,Object.defineProperty(this,"_linesToClear",{get(){return this.#e},set(u){this.#e=u}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#r}}),Object.defineProperty(this,"_lineCount",{get(){return this.#u}})}get indent(){return this.#D}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#D=e,this.#d()}get interval(){return this.#f??this.#n.interval??100}get spinner(){return this.#n}set spinner(e){if(this.#r=0,this.#f=void 0,typeof e==="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#n=e}else if(!Iy())this.#n=ws.default.line;else if(e===void 0)this.#n=ws.default.dots;else if(e!=="default"&&ws.default[e])this.#n=ws.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#E}set text(e=""){this.#E=e,this.#d()}get prefixText(){return this.#h}set prefixText(e=""){this.#h=e,this.#d()}get suffixText(){return this.#l}set suffixText(e=""){this.#l=e,this.#d()}get isSpinning(){return this.#a!==void 0}#C(e=this.#h,u=" "){if(typeof e==="string"&&e!=="")return e+u;if(typeof e==="function")return e()+u;return""}#p(e=this.#l,u=" "){if(typeof e==="string"&&e!=="")return u+e;if(typeof e==="function")return u+e();return""}#d(){let e=this.#s.columns??80,u=this.#C(this.#h,"-"),t=this.#p(this.#l,"-"),r=" ".repeat(this.#D)+u+"--"+this.#E+"--"+t;this.#u=0;for(let s of sc(r).split(`
|
|
309
|
-
`))this.#u+=Math.max(1,Math.ceil(Ty(s,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#o&&!this.#c}set isEnabled(e){if(typeof e!=="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#o=e}get isSilent(){return this.#c}set isSilent(e){if(typeof e!=="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#c=e}frame(){let{frames:e}=this.#n,u=e[this.#r];if(this.color)u=er[this.color](u);this.#r=++this.#r%e.length;let t=typeof this.#h==="string"&&this.#h!==""?this.#h+" ":"",r=typeof this.text==="string"?" "+this.text:"",s=typeof this.#l==="string"&&this.#l!==""?" "+this.#l:"";return t+u+r+s}clear(){if(!this.#o||!this.#s.isTTY)return this;this.#s.cursorTo(0);for(let e=0;e<this.#e;e++){if(e>0)this.#s.moveCursor(0,-1);this.#s.clearLine(1)}if(this.#D||this.lastIndent!==this.#D)this.#s.cursorTo(this.#D);return this.lastIndent=this.#D,this.#e=0,this}render(){if(this.#c)return this;return this.clear(),this.#s.write(this.frame()),this.#e=this.#u,this}start(e){if(e)this.text=e;if(this.#c)return this;if(!this.#o){if(this.text)this.#s.write(`- ${this.text}
|
|
310
|
-
`);return this}if(this.isSpinning)return this;if(this.#i.hideCursor)yo.hide(this.#s);if(this.#i.discardStdin&&Ss.stdin.isTTY)this.#t=!0,Ao.start();return this.render(),this.#a=setInterval(this.render.bind(this),this.interval),this}stop(){if(!this.#o)return this;if(clearInterval(this.#a),this.#a=void 0,this.#r=0,this.clear(),this.#i.hideCursor)yo.show(this.#s);if(this.#i.discardStdin&&Ss.stdin.isTTY&&this.#t)Ao.stop(),this.#t=!1;return this}succeed(e){return this.stopAndPersist({symbol:Is.success,text:e})}fail(e){return this.stopAndPersist({symbol:Is.error,text:e})}warn(e){return this.stopAndPersist({symbol:Is.warning,text:e})}info(e){return this.stopAndPersist({symbol:Is.info,text:e})}stopAndPersist(e={}){if(this.#c)return this;let u=e.prefixText??this.#h,t=this.#C(u," "),r=e.symbol??" ",s=e.text??this.text,n=typeof s==="string"?" "+s:"",i=e.suffixText??this.#l,l=this.#p(i," "),o=t+r+n+l+`
|
|
311
|
-
`;return this.stop(),this.#s.write(o),this}}function vo(e){if(Array.isArray(e))return[...e];return{...e}}function Oy(e){if(Array.isArray(e))return e;return[e]}function ta(e,...u){Oy(u).forEach((t)=>{delete e[t]})}var pr=(e)=>Array.isArray(e);function Xu(e){return typeof e==="object"&&!Array.isArray(e)&&e!==null}var tu=(e)=>typeof e==="function";function ri(e,u){try{return u.split(".").reduce((t,r)=>t[r],e)}catch(t){return e}}function Oi(e){if(Array.isArray(e))return[...e];if("all"in e&&typeof e.all==="function")return e.all();return Object.values(e)}function Ly(e){return new We(e)}class We{items;constructor(e=[]){this.items=e}[Symbol.iterator]=Py;toJSON(){return this.items}all(){return this.items}average(e){if(e===void 0)return this.sum()/Number(this.items.length);if(tu(e))return Number(new this.constructor(this.items).sum(e))/Number(this.items.length);return Number(new this.constructor(this.items).pluck(e).sum())/Number(this.items.length)}avg=this.average;chunk(e){let u=[],t=Array.isArray(this.items)?this.items:Object.values(this.items);for(let r=0;r<t.length;r+=e)u.push(t.slice(r,r+e));return new We(u)}collapse(){return new this.constructor([].concat(...this.items))}combine(e){if(typeof e==="string")e=[e];if(!Array.isArray(e))throw new TypeError("The values must be an array or a string");let u={};return(Array.isArray(this.items)?this.items:Object.keys(this.items)).forEach((r,s)=>{if(e[s]!==void 0)u[r]=e[s]}),new We(u)}concat(e){let u=e;if(e instanceof this.constructor)u=e.all();else if(typeof e==="object")u=[],Object.keys(e).forEach((r)=>{u.push(e[r])});let t=vo(this.items);return u.forEach((r)=>{if(typeof r==="object")Object.keys(r).forEach((s)=>t.push(r[s]));else t.push(r)}),new this.constructor(t)}contains(e,u){if(typeof e==="function")return this.items.some(e);if(Array.isArray(this.items))return this.items.includes(e);if(u!==void 0){if(Array.isArray(this.items))return this.items.some((t)=>t[e]!==void 0&&t[e]===u);return e in this.items&&this.items[e]===u}if(Array.isArray(this.items))return this.items.includes(e);return Object.values(this.items).includes(e)}containsOneItem(){if(typeof this.items==="string")return!0;return Object.keys(this.items).length===1}count(e){if(e)return this.filter(e).count();return Object.keys(this.items).length}countBy(e){let u={};return this.each((t)=>{let r=e?e(t):t;u[r]=(u[r]||0)+1}),new We(u)}crossJoin(...e){function u(t,r,s){let n=s[0];if(n instanceof We)n=n.all();let i=s.slice(1),l=!i.length,o=[];for(let a=0;a<n.length;a+=1){let D=t.slice();if(D.push(n[a]),l)o.push(D);else o=o.concat(u(D,r,i))}return o}return new this.constructor(u([],this.constructor,[].concat([this.items],e)))}dd(){console.log(JSON.stringify(this.all(),null,2)),Ry.exit()}diff(e){let u;if(e instanceof this.constructor)u=e.all();else u=e;let t=this.items.filter((r)=>!u.includes(r));return new this.constructor(t)}diffAssoc(e){let u=e;if(e instanceof this.constructor)u=e.all();let t={};return Object.keys(this.items).forEach((r)=>{if(u[r]===void 0||u[r]!==this.items[r])t[r]=this.items[r]}),new this.constructor(t)}diffKeys(e){let u;if(e instanceof this.constructor)u=e.all();else u=e;let t=Object.keys(u),r=Object.keys(this.items).filter((s)=>!t.includes(s));return new this.constructor(this.items).only(r)}diffUsing(e,u){if(console.log("Original collection:",this.items),console.log("Array to compare:",e),e===null)return new We(this.items);let t=this.items.filter((r)=>{return e.findIndex((n)=>{return u(r,n)===0})===-1});return new We(t)}doesntContain(e,u){if(console.log("doesntContain called with:",{key:e,value:u}),typeof e==="function")return console.log("Function branch"),!this.contains(e);if(u!==void 0)return console.log("Key-value pair branch"),!this.contains((t)=>{return console.log("Comparing:",t[e],"with",u),t[e]===u});return console.log("Single value branch"),!this.contains(e)}dump(){return console.log(this.items),this}duplicates(){let e=[],u={},t=(r)=>{if(Array.isArray(r)||typeof r==="object")return JSON.stringify(r);return r};if(Array.isArray(this.items))this.items.forEach((r,s)=>{let n=t(r);if(!e.includes(n))e.push(n);else u[s]=r});else if(typeof this.items==="object")Object.keys(this.items).forEach((r)=>{let s=t(this.items[r]);if(!e.includes(s))e.push(s);else u[r]=this.items[r]});return new this.constructor(u)}each(e){let u=!1;if(Array.isArray(this.items)){let{length:t}=this.items;for(let r=0;r<t&&!u;r+=1)u=e(this.items[r],r,this.items)===!1}else{let t=Object.keys(this.items),{length:r}=t;for(let s=0;s<r&&!u;s+=1){let n=t[s];u=e(this.items[n],n,this.items)===!1}}return this}eachSpread(e){return this.each((u,t)=>{e(...u,t)}),this}every(e){return Oi(this.items).every(e)}except(e){let u={...this.items};return(Array.isArray(e)?e:[e]).forEach((r)=>delete u[r]),new We(u)}filter(e){if(console.log("Filter method called with callback:",e),console.log("Current items:",this.items),typeof e!=="function"){console.log("No callback provided, removing falsy values");let t=this.items.filter((r)=>{return console.log("Filtering item:",r),Boolean(r)});return console.log("Filtered items:",t),new We(t)}let u=this.items.filter((t,r)=>{return console.log("Filtering item:",t,"at index:",r),e(t,r)});return console.log("Filtered items:",u),new We(u)}first(e,u){if(tu(e)){let t=Object.keys(this.items);for(let r=0;r<t.length;r+=1){let s=t[r],n=this.items[s];if(e(n,s))return n}if(tu(u))return u();return u}if(Array.isArray(this.items)&&this.items.length||Object.keys(this.items).length){if(Array.isArray(this.items))return this.items[0];let t=Object.keys(this.items)[0];return this.items[t]}if(tu(u))return u();return u}firstOrFail(e){let u=this.items.find(e||(()=>!0));if(u===void 0)throw new Error("Item not found.");return u}firstWhere(e,u,t){return this.where(e,u,t).first()||null}flatMap(e){return this.map(e).collapse()}flatten(e=Number.POSITIVE_INFINITY){let u=(t,r)=>{if(!Array.isArray(t)&&typeof t!=="object")return[t];return r>0?Object.values(t).reduce((s,n)=>s.concat(Array.isArray(n)||typeof n==="object"?u(n,r-1):n),[]):Array.isArray(t)?[...t]:[t]};return new We(u(this.items,e))}flip(){let e={};if(Array.isArray(this.items))this.items.forEach((u,t)=>{e[u]=t});else Object.entries(this.items).forEach(([u,t])=>{e[t]=u});return new this.constructor(e)}forPage(e,u){let t={};if(Array.isArray(this.items))t=this.items.slice(e*u-u,e*u);else Object.keys(this.items).slice(e*u-u,e*u).forEach((r)=>{t[r]=this.items[r]});return new this.constructor(t)}forget(e){if(Array.isArray(this.items))this.items=this.items.filter((u,t)=>t!==Number.parseInt(e,10));else if(typeof this.items==="object"&&this.items!==null)delete this.items[e];return this}get(e,u=null){if(Array.isArray(this.items))return this.items[e]??u;return this.items[e]??u}groupBy(e){let u={};return this.each((t,r)=>{let s=typeof e==="function"?e(t):t[e];if(!(s in u))u[s]=new We;u[s].push(t)}),new We(u)}has(e){if(Array.isArray(this.items))return e in this.items;return e in this.items}implode(e,u){if(u===void 0)return this.items.join(e);return new this.constructor(this.items).pluck(e).all().join(u)}includes(e){if(Array.isArray(this.items))return this.items.includes(e);return Object.values(this.items).includes(e)}intersect(e){let u=e;if(e instanceof this.constructor)u=e.all();let t=this.items.filter((r)=>u.includes(r));return new this.constructor(t)}intersectByKeys(e){let u=Object.keys(e);if(e instanceof this.constructor)u=Object.keys(e.all());let t={};return Object.keys(this.items).forEach((r)=>{if(u.includes(r))t[r]=this.items[r]}),new this.constructor(t)}isEmpty(){return this.count()===0}isNotEmpty(){return!this.isEmpty()}join(e,u){let t=this.values();if(u===void 0)return t.implode(e);let r=t.count();if(r===0)return"";if(r===1)return t.last();let s=t.pop();return t.implode(e)+u+s}keyBy(e){let u={};if(tu(e))this.items.forEach((t)=>{u[e(t)]=t});else this.items.forEach((t)=>{let r=ri(t,e);u[r||""]=t});return new this.constructor(u)}keys(){return new We(Object.keys(this.items))}last(e,u){let{items:t}=this;if(tu(e))t=this.filter(e).all();if(Array.isArray(t)&&!t.length||!Object.keys(t).length){if(tu(u))return u();return u}if(Array.isArray(t))return t[t.length-1];let r=Object.keys(t);return t[r[r.length-1]]}macro(e,u){this.constructor.prototype[e]=u}make(e=[]){return new this.constructor(e)}map(e){if(Array.isArray(this.items))return new this.constructor(this.items.map(e));let u={};return Object.keys(this.items).forEach((t)=>{u[t]=e(this.items[t],Number(t))}),new this.constructor(u)}mapSpread(e){return this.map((u,t)=>e(...u,t))}mapToDictionary(e){let u={};return this.items.forEach((t,r)=>{let[s,n]=e(t,r);if(u[s]===void 0)u[s]=[n];else u[s].push(n)}),new this.constructor(u)}mapInto(e){return this.map((u,t)=>new e(u,t))}mapToGroups(e){let u={};return this.items.forEach((t,r)=>{let[s,n]=e(t,r);if(u[s]===void 0)u[s]=[n];else u[s].push(n)}),new this.constructor(u)}mapWithKeys(e){let u={};if(Array.isArray(this.items))this.items.forEach((t,r)=>{let[s,n]=e(t,r);u[s]=n});else Object.keys(this.items).forEach((t)=>{let[r,s]=e(this.items[t],Number(t));u[r]=s});return new this.constructor(u)}max(e){if(typeof e==="string"){let u=this.items.filter((t)=>t[e]!==void 0);return Math.max(...u.map((t)=>t[e]))}return Math.max(...this.items)}median(e){let{length:u}=this.items;if(e===void 0){if(u%2===0)return(this.items[u/2-1]+this.items[u/2])/2;return this.items[Math.floor(u/2)]}if(u%2===0)return(this.items[u/2-1][e]+this.items[u/2][e])/2;return this.items[Math.floor(u/2)][e]}merge(e){let u={...this.items,...e};return new We(u)}mergeRecursive(e){let u=(t,r)=>{let s={};return Object.keys({...t,...r}).forEach((i)=>{if(t[i]===void 0&&r[i]!==void 0)s[i]=r[i];else if(t[i]!==void 0&&r[i]===void 0)s[i]=t[i];else if(t[i]!==void 0&&r[i]!==void 0)if(t[i]===r[i])s[i]=t[i];else if(!Array.isArray(t[i])&&typeof t[i]==="object"&&!Array.isArray(r[i])&&typeof r[i]==="object")s[i]=u(t[i],r[i]);else s[i]=[].concat(t[i],r[i])}),s};if(!e)return this;if(e.constructor.name==="Collection")return new this.constructor(u(this.items,e.all()));return new this.constructor(u(this.items,e))}min(e){if(e!==void 0){let u=this.items.filter((t)=>t[e]!==void 0);return Math.min(...u.map((t)=>t[e]))}return Math.min(...this.items)}mode(e){let u=[],t=1;if(!this.items.length)return null;return this.items.forEach((r)=>{let s=u.filter((n)=>{if(e!==void 0)return n.key===r[e];return n.key===r});if(!s.length)if(e!==void 0)u.push({key:r[e],count:1});else u.push({key:r,count:1});else{s[0].count+=1;let{count:n}=s[0];if(n>t)t=n}}),u.filter((r)=>r.count===t).map((r)=>r.key)}nth(e,u=0){let r=Oi(this.items).slice(u).filter((s,n)=>n%e===0);return new this.constructor(r)}only(e){let u={};return e.forEach((t)=>{if(t in this.items)u[t]=this.items[t]}),new We(u)}pad(e,u){let t=Math.abs(e),r=this.count();if(t<=r)return this;let s=t-r,n=vo(this.items),i=Array.isArray(this.items),l=e<0;for(let o=0;o<s;){if(!i)if(n[o]!==void 0)s+=1;else n[o]=u;else if(l)n.unshift(u);else n.push(u);o+=1}return new this.constructor(n)}partition(e){let u;if(Array.isArray(this.items))u=[new this.constructor([]),new this.constructor([])],this.items.forEach((t)=>{if(e(t)===!0)u[0].push(t);else u[1].push(t)});else u=[new this.constructor({}),new this.constructor({})],Object.keys(this.items).forEach((t)=>{let r=this.items[t];if(e(r)===!0)u[0].put(t,r);else u[1].put(t,r)});return new this.constructor(u)}pipe(e){return e(this)}pluck(e,u){if(e.includes("*")){let t=Uy(this.items),r=[];if(u!==void 0){let l=new RegExp(`0.${u}`,"g"),o=`0.${u}`.split(".").length;Object.keys(t).forEach((a)=>{let D=a.match(l);if(D){let h=D[0];if(h.split(".").length===o)r.push(t[h])}})}let s=[],n=new RegExp(`0.${e}`,"g"),i=`0.${e}`.split(".").length;if(Object.keys(t).forEach((l)=>{let o=l.match(n);if(o){let a=o[0];if(a.split(".").length===i)s.push(t[a])}}),u!==void 0){let l={};return this.items.forEach((o,a)=>{l[r[a]||""]=s}),new this.constructor(l)}return new this.constructor([s])}if(u!==void 0){let t={};return this.items.forEach((r)=>{if(ri(r,e)!==void 0)t[r[u]||""]=ri(r,e);else t[r[u]||""]=null}),new this.constructor(t)}return this.map((t)=>{if(ri(t,e)!==void 0)return ri(t,e);return null})}pop(e=1){if(this.isEmpty())return null;if(pr(this.items)){if(e===1)return this.items.pop();return new this.constructor(this.items.splice(-e))}if(Xu(this.items)){let u=Object.keys(this.items);if(e===1){let s=u[u.length-1],n=this.items[s];return ta(this.items,s),n}let t=u.slice(-e),r=t.reduce((s,n)=>{return s[n]=this.items[n],s},{});return ta(this.items,t),new this.constructor(r)}return null}prepend(e,u){if(u!==void 0)return this.put(u,e);return this.items.unshift(e),this}pull(e,u=null){if(Array.isArray(this.items)){let r=Number(e);if(Number.isNaN(r))return u;let s=this.items[r];return this.items.splice(r,1),s??u}let t=this.items[e];return delete this.items[e],t??u}push(...e){return this.items=[...this.items,...e],this}put(e,u){return this.items[e]=u,this}random(e=null){let u=Oi(this.items),t=new this.constructor(u).shuffle();if(e!==Number.parseInt(e,10))return t.first();return t.take(e)}reduce(e,u){let t=null;if(u!==void 0)t=u;if(Array.isArray(this.items))this.items.forEach((r)=>{t=e(t,r)});else Object.keys(this.items).forEach((r)=>{t=e(t,this.items[r],r)});return t}reject(e){return new this.constructor(this.items).filter((u)=>!e(u))}replace(e){if(!e)return this;if(Array.isArray(e)){let t=this.items.map((r,s)=>e[s]||r);return new this.constructor(t)}if(e.constructor.name==="Collection"){let t={...this.items,...e.all()};return new this.constructor(t)}let u={...this.items,...e};return new this.constructor(u)}replaceRecursive(e){let u=(t,r)=>{let s={...t};return Object.keys({...t,...r}).forEach((i)=>{if(!Array.isArray(r[i])&&typeof r[i]==="object")s[i]=u(t[i],r[i]);else if(t[i]===void 0&&r[i]!==void 0)if(typeof t[i]==="object")s[i]={...r[i]};else s[i]=r[i];else if(t[i]!==void 0&&r[i]===void 0)if(typeof t[i]==="object")s[i]={...t[i]};else s[i]=t[i];else if(t[i]!==void 0&&r[i]!==void 0)if(typeof r[i]==="object")s[i]={...r[i]};else s[i]=r[i]}),s};if(!e)return this;if(!Array.isArray(e)&&typeof e!=="object")return new this.constructor(u(this.items,[e]));if(e.constructor.name==="Collection")return new this.constructor(u(this.items,e.all()));return new this.constructor(u(this.items,e))}reverse(){let e=[].concat(this.items).reverse();return new this.constructor(e)}search(e,u){let t,r=(s,n)=>{if(tu(e))return e(this.items[n],n);if(u)return this.items[n]===e;return this.items[n]==e};if(pr(this.items))t=this.items.findIndex(r);else if(Xu(this.items))t=Object.keys(this.items).find((s)=>r(this.items[s],s));if(t===void 0||t<0)return!1;return t}shift(e=1){if(this.isEmpty())return null;if(pr(this.items)){if(e===1)return this.items.shift();return new this.constructor(this.items.splice(0,e))}if(Xu(this.items)){if(e===1){let s=Object.keys(this.items)[0],n=this.items[s];return delete this.items[s],n}let t=Object.keys(this.items).slice(0,e),r=t.reduce((s,n)=>{return s[n]=this.items[n],s},{});return ta(this.items,t),new this.constructor(r)}return null}shuffle(){let e=Oi(this.items),u,t,r;for(r=e.length;r;r-=1)u=Math.floor(Math.random()*r),t=e[r-1],e[r-1]=e[u],e[u]=t;return this.items=e,this}skip(e){if(Xu(this.items))return new this.constructor(Object.keys(this.items).reduce((u,t,r)=>{if(r+1>e)u[t]=this.items[t];return u},{}));return new this.constructor(this.items.slice(e))}skipUntil(e){let u=null,t,r=(s)=>s===e;if(tu(e))r=e;if(pr(this.items))t=this.items.filter((s)=>{if(u!==!0)u=r(s);return u});if(Xu(this.items))t=Object.keys(this.items).reduce((s,n)=>{if(u!==!0)u=r(this.items[n]);if(u!==!1)s[n]=this.items[n];return s},{});return new this.constructor(t)}skipWhile(e){let u=null,t,r=(s)=>s===e;if(tu(e))r=e;if(pr(this.items))t=this.items.filter((s)=>{if(u!==!0)u=!r(s);return u});if(Xu(this.items))t=Object.keys(this.items).reduce((s,n)=>{if(u!==!0)u=!r(this.items[n]);if(u!==!1)s[n]=this.items[n];return s},{});return new this.constructor(t)}slice(e,u){let t=this.items.slice(e);if(u!==void 0)t=t.slice(0,u);return new this.constructor(t)}sole(){if(this.items.length!==1)throw new Error("Collection does not contain exactly one item.");return this.items[0]}some(e){return this.items.some((u)=>u.hasOwnProperty(e))}sort(e){let u=[].concat(this.items);if(e===void 0)if(this.every((t)=>typeof t==="number"))u.sort((t,r)=>t-r);else u.sort();else u.sort(e);return new this.constructor(u)}sortDesc(){return this.sort().reverse()}sortBy(e){let u=[].concat(this.items),t=(r)=>{if(tu(e))return e(r);return ri(r,e)};return u.sort((r,s)=>{let n=t(r),i=t(s);if(n===null||n===void 0)return 1;if(i===null||i===void 0)return-1;if(n<i)return-1;if(n>i)return 1;return 0}),new this.constructor(u)}sortByDesc(e){return this.sortBy(e).reverse()}sortKeys(){let e={};return Object.keys(this.items).sort().forEach((u)=>{e[u]=this.items[u]}),new this.constructor(e)}sortKeysDesc(){let e={};return Object.keys(this.items).sort().reverse().forEach((u)=>{e[u]=this.items[u]}),new this.constructor(e)}splice(e,u,t){let r=this.slice(e,u);if(this.items=this.diff(r.all()).all(),Array.isArray(t))for(let s=0,{length:n}=t;s<n;s+=1)this.items.splice(e+s,0,t[s]);return r}split(e){let u=this.toArray(),t=[],r=Math.ceil(u.length/e);for(let s=0;s<u.length;s+=r)t.push(u.slice(s,s+r));return new We(t)}sum(e){let u=Oi(this.items),t=0;if(e===void 0)for(let r=0,{length:s}=u;r<s;r+=1)t+=Number.parseFloat(u[r]);else if(tu(e))for(let r=0,{length:s}=u;r<s;r+=1)t+=Number.parseFloat(e(u[r]));else for(let r=0,{length:s}=u;r<s;r+=1)t+=Number.parseFloat(u[r][e]);return Number.parseFloat(t.toPrecision(12))}take(e){if(!Array.isArray(this.items)&&typeof this.items==="object"){let u=Object.keys(this.items),t;if(e<0)t=u.slice(e);else t=u.slice(0,e);let r={};return u.forEach((s)=>{if(t.includes(s))r[s]=this.items[s]}),new this.constructor(r)}if(e<0)return new this.constructor(this.items.slice(e));return new this.constructor(this.items.slice(0,e))}takeUntil(e){let u=null,t,r=(s)=>s===e;if(tu(e))r=e;if(pr(this.items))t=this.items.filter((s)=>{if(u!==!1)u=!r(s);return u});if(Xu(this.items))t=Object.keys(this.items).reduce((s,n)=>{if(u!==!1)u=!r(this.items[n]);if(u!==!1)s[n]=this.items[n];return s},{});return new this.constructor(t)}takeWhile(e){let u=null,t,r=(s)=>s===e;if(tu(e))r=e;if(pr(this.items))t=this.items.filter((s)=>{if(u!==!1)u=r(s);return u});if(Xu(this.items))t=Object.keys(this.items).reduce((s,n)=>{if(u!==!1)u=r(this.items[n]);if(u!==!1)s[n]=this.items[n];return s},{});return new this.constructor(t)}tap(e){return e(this),this}times(e,u){for(let t=1;t<=e;t+=1)this.items.push(u(t));return this}toArray(){return Array.isArray(this.items)?this.items:Object.values(this.items)}toJson(){return JSON.stringify(this.items)}transform(e){if(Array.isArray(this.items))this.items=this.items.map(e);else{let u={};Object.keys(this.items).forEach((t)=>{u[t]=e(this.items[t],t)}),this.items=u}return this}undot(){if(Array.isArray(this.items))return this;let e={};return Object.keys(this.items).forEach((u)=>{if(u.includes(".")){let t=e;u.split(".").reduce((r,s,n,i)=>{if(!r[s])r[s]={};if(n===i.length-1)r[s]=this.items[u];return r[s]},t),e={...e,...t}}else e[u]=this.items[u]}),new this.constructor(e)}unless(e,u,t){if(!e)return u(this);if(t)return t();return}unlessEmpty(e){if(!this.isEmpty())e(this);return this}unlessNotEmpty(e){if(this.isEmpty())e(this);return this}union(e){let u=JSON.parse(JSON.stringify(this.items));return Object.keys(e).forEach((t)=>{if(this.items[t]===void 0)u[t]=e[t]}),new this.constructor(u)}unique(){let e=Array.from(new Set(this.items));return new this.constructor(e)}unwrap(){return this.items}values(){return new We(Object.values(this.items))}when(e,u,t){if(e)u(this,e);else if(t)t();return this}whenEmpty(e,u){if(Array.isArray(this.items)&&!this.items.length)return e(this);if(!Object.keys(this.items).length)return e(this);if(u!==void 0){if(Array.isArray(this.items)&&this.items.length)return u(this);if(Object.keys(this.items).length)return u(this)}return this}whenNotEmpty(e,u){if(Array.isArray(this.items)&&this.items.length)return e(this);if(Object.keys(this.items).length)return e(this);if(u!==void 0){if(Array.isArray(this.items)&&!this.items.length)return u(this);if(!Object.keys(this.items).length)return u(this)}return this}where(e,u,t){if(arguments.length===1)return new We(this.items.filter((s)=>s[e]!==void 0));if(arguments.length===2)t=u,u="===";let r=(s,n,i,l)=>{let o=s[n];switch(l){case"===":return o===i;case"!==":return o!==i;case"<":return o<i;case"<=":return o<=i;case">":return o>i;case">=":return o>=i;default:return o==i}};return new We(this.items.filter((s)=>r(s,e,t,u)))}whereBetween(e,u){return this.filter((t)=>{let r=typeof t==="object"?t[e]:t;return r>=u[0]&&r<=u[1]})}whereIn(e,u){return this.filter((t)=>{let r=typeof t==="object"?t[e]:t;return u.includes(r)})}whereNotBetween(e,u){return this.filter((t)=>{let r=typeof t==="object"?t[e]:t;return r<u[0]||r>u[1]})}whereNotIn(e,u){let t=this.items.filter((r)=>{let s=e.split("."),n=r;for(let i of s){if(n[i]===void 0)return!0;n=n[i]}return!u.includes(n)});return new We(t)}getNestedValue(e,u){return u.split(".").reduce((r,s)=>r&&r[s]!==void 0?r[s]:null,e)}whereInstanceOf(e){return this.filter((u)=>u instanceof e)}whereNotNull(e){return this.where(e,"!==",null)}whereNull(e){return this.where(e,"===",null)}static wrap(e){if(e instanceof We)return e;return new We(Array.isArray(e)?e:[e])}static unwrap(e){if(e instanceof We)return e.all();return e}wrap(e){if(e instanceof We)return e;if(typeof e==="object")return new We(e);return new We([e])}zip(...e){let u=e.map((r)=>this.constructor.wrap(r).all()),t=this.items.map((r,s)=>{let n=[r];return u.forEach((i)=>{n.push(i[s])}),new this.constructor(n)});return new this.constructor(t)}}var Uy=function e(u){let t={};return u.forEach((r,s)=>{function n(i,l){if(Xu(i))Object.keys(i).forEach((o)=>{n(i[o],`${l}.${o}`)});else if(pr(i))i.forEach((o,a)=>{n(o,`${l}.${a}`)});t[l]=i}n(r,s)}),t};function Py(){let e=-1;return{next:()=>{return e+=1,{value:this.items[e],done:e>=this.items.length}}}}Ws();var kT=Ly(["The best way to get started is to quit talking and begin doing.","The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.","Don’t let yesterday take up too much of today.","You learn more from failure than from success. Don’t let it stop you. Failure builds character.","It’s not whether you get knocked down, it’s whether you get up.","If you are working on something that you really care about, you don’t have to be pushed. The vision pulls you.","People who are crazy enough to think they can change the world, are the ones who do.","Failure will never overtake me if my determination to succeed is strong enough.","Entrepreneurs are great at dealing with uncertainty and also very good at minimizing risk. That’s the classic entrepreneur.","We may encounter many defeats but we must not be defeated.","Knowing is not enough; we must apply. Wishing is not enough; we must do.","Imagine your life is perfect in every respect; what would it look like?","We generate fears while we sit. We overcome them by action.","Whether you think you can or think you can’t, you’re right.","Security is mostly a superstition. Life is either a daring adventure or nothing."]),VT=Qg.default;var ac="0.8.1";import{homedir as Va}from"node:os";import{join as Ka}from"node:path";import{resolve as ky}from"path";import Vy from"process";function ka(e,u){if(Array.isArray(u)&&!Array.isArray(e))return u;if(Array.isArray(u)&&Array.isArray(e))return u.map((r,s)=>{let n=e[s];if(ci(r)&&ci(n))return ka(n,r);return r});if(!ci(u)||!ci(e))return u;let t={...e};for(let r in u)if(Object.prototype.hasOwnProperty.call(u,r)){let s=u[r],n=t[r];if(s===null||s===void 0)t[r]=s;else if(ci(s)&&ci(n))t[r]=ka(n,s);else t[r]=s}return t}function ci(e){return Boolean(e&&typeof e==="object"&&!Array.isArray(e))}async function hc({name:e,cwd:u,defaultConfig:t}){let r=ky(u||Vy.cwd(),`${e}.config`);try{let s=await import(r),n=s.default||s;return ka(t,n)}catch(s){return t}}var Ky={from:"localhost:5173",to:"stacks.localhost",cleanUrls:!1,https:{basePath:"",caCertPath:Ka(Va(),".stacks","ssl","stacks.localhost.ca.crt"),certPath:Ka(Va(),".stacks","ssl","stacks.localhost.crt"),keyPath:Ka(Va(),".stacks","ssl","stacks.localhost.crt.key")},etcHostsCleanup:!0,vitePluginUsage:!1,verbose:!0},Qi=await hc({name:"reverse-proxy",defaultConfig:Ky});import*as lc from"node:fs/promises";function ae(e,u,t){if(t)console.debug(`[rpx:${e}] ${u}`)}function pw(e){if(zi(e))return e.proxies.map((u)=>{let t=u.to||"stacks.localhost";return t.startsWith("http")?new URL(t).hostname:t});if(Js(e)){let u=e.to||"stacks.localhost";return[u.startsWith("http")?new URL(u).hostname:u]}return["stacks.localhost"]}function oc(e){return typeof e==="object"&&e!==null&&"certificate"in e&&"privateKey"in e&&typeof e.certificate==="string"&&typeof e.privateKey==="string"}function Xs(e){if(!e)return"stacks.localhost";if(zi(e)&&e.proxies.length>0)return e.proxies[0].to||"stacks.localhost";if(Js(e))return e.to||"stacks.localhost";return"stacks.localhost"}function Yi(e){return"proxies"in e&&Array.isArray(e.proxies)}function zi(e){return"proxies"in e&&Array.isArray(e.proxies)}function Js(e){return"to"in e&&typeof e.to==="string"}async function cc(e,u){try{await lc.unlink(e),ae("certificates",`Successfully deleted: ${e}`,u)}catch(t){if(t.code!=="ENOENT")ae("certificates",`Warning: Could not delete ${e}: ${t}`,u)}}import{exec as Gy}from"node:child_process";import Vr from"node:fs";import Dc from"node:os";import Ga from"node:path";import qi from"node:process";import{promisify as jy}from"node:util";var Wy=jy(Gy),vr=qi.platform==="win32"?Ga.join(qi.env.windir||"C:\\Windows","System32","drivers","etc","hosts"):"/etc/hosts";async function fc(e){if(qi.platform==="win32")throw new Error("Administrator privileges required on Windows");try{await Wy(`sudo ${e}`)}catch(u){throw new Error(`Failed to execute sudo command: ${u.message}`)}}async function dc(e,u){ae("hosts",`Adding hosts: ${e.join(", ")}`,u),ae("hosts",`Using hosts file at: ${vr}`,u);try{let t=await Vr.promises.readFile(vr,"utf-8"),r=e.filter((i)=>{let l=`127.0.0.1 ${i}`,o=`::1 ${i}`;return!t.includes(l)&&!t.includes(o)});if(r.length===0){ae("hosts","All hosts already exist in hosts file",u),me.info("All hosts are already in the hosts file");return}let s=r.map((i)=>`
|
|
312
|
-
# Added by rpx
|
|
313
|
-
127.0.0.1 ${i}
|
|
314
|
-
::1 ${i}`).join(`
|
|
315
|
-
`),n=Ga.join(Dc.tmpdir(),"hosts.tmp");await Vr.promises.writeFile(n,t+s,"utf8");try{await fc(`cp "${n}" "${vr}"`),me.success(`Added new hosts: ${r.join(", ")}`)}catch(i){if(me.error("Failed to modify hosts file automatically"),me.warn("Please add these entries to your hosts file manually:"),s.split(`
|
|
316
|
-
`).forEach((l)=>me.warn(l)),qi.platform==="win32")me.warn(`
|
|
317
|
-
On Windows:`),me.warn("1. Run notepad as administrator"),me.warn("2. Open C:\\Windows\\System32\\drivers\\etc\\hosts");else me.warn(`
|
|
318
|
-
On Unix systems:`),me.warn(`sudo nano ${vr}`);throw new Error("Failed to modify hosts file: manual intervention required")}finally{Vr.unlinkSync(n)}}catch(t){let r=t;throw me.error(`Failed to manage hosts file: ${r.message}`),r}}async function Ec(e,u){ae("hosts",`Removing hosts: ${e.join(", ")}`,u);try{let r=(await Vr.promises.readFile(vr,"utf-8")).split(`
|
|
319
|
-
`),s=r.filter((l,o)=>{if(l.trim()==="# Added by rpx")return r.splice(o+1,2),!1;return!0});while(s[s.length-1]?.trim()==="")s.pop();let n=`${s.join(`
|
|
320
|
-
`)}
|
|
321
|
-
`,i=Ga.join(Dc.tmpdir(),"hosts.tmp");await Vr.promises.writeFile(i,n,"utf8");try{await fc(`cp "${i}" "${vr}"`),me.success("Hosts removed successfully")}catch(l){if(me.error("Failed to modify hosts file automatically"),me.warn("Please remove these entries from your hosts file manually:"),e.forEach((o)=>{me.warn("# Added by rpx"),me.warn(`127.0.0.1 ${o}`),me.warn(`::1 ${o}`)}),qi.platform==="win32")me.warn(`
|
|
322
|
-
On Windows:`),me.warn("1. Run notepad as administrator"),me.warn("2. Open C:\\Windows\\System32\\drivers\\etc\\hosts");else me.warn(`
|
|
323
|
-
On Unix systems:`),me.warn(`sudo nano ${vr}`);throw new Error("Failed to modify hosts file: manual intervention required")}finally{Vr.unlinkSync(i)}}catch(t){let r=t;throw me.error(`Failed to remove hosts: ${r.message}`),r}}async function Cc(e,u){ae("hosts",`Checking hosts: ${e}`,u);let t=await Vr.promises.readFile(vr,"utf-8");return e.map((r)=>{let s=`127.0.0.1 ${r}`,n=`::1 ${r}`;return t.includes(s)||t.includes(n)})}import ds from"node:fs/promises";import{homedir as OS}from"node:os";import{join as qr}from"node:path";import{formatWithOptions as s9}from"util";import{sep as n9}from"path";import*as Cn from"tty";import{stdin as a9,stdout as h9}from"process";import gc from"readline";import{WriteStream as l9}from"tty";import o9 from"tty";import bu from"process";import{createRequire as c9}from"module";import{access as D9,appendFile as Yf,mkdir as zf}from"fs/promises";import{dirname as f9}from"path";import d9 from"process";import{basename as Vw,delimiter as Kw,dirname as E9,extname as Gw,isAbsolute as jw,join as Ww,normalize as Hw,parse as Qw,relative as C9,resolve as mc,sep as Yw,toNamespacedPath as zw}from"path";import yc from"process";import fn from"process";import p9 from"process";import h0 from"process";import g9 from"process";import en from"process";import N0 from"process";import m9 from"os";import Fc from"tty";import qf from"process";import tn from"process";import Su from"process";import Ac from"process";import ku from"process";import y9 from"process";import n0 from"os";import a0 from"path";import{resolve as IS}from"path";import NS from"process";import Nf from"fs";import $S from"path";import ar from"fs";import _f from"os";import mi from"path";var Hy=Object.create,{getPrototypeOf:Qy,defineProperty:pc,getOwnPropertyNames:Yy}=Object,zy=Object.prototype.hasOwnProperty,$f=(e,u,t)=>{t=e!=null?Hy(Qy(e)):{};let r=u||!e||!e.__esModule?pc(t,"default",{value:e,enumerable:!0}):t;for(let s of Yy(e))if(!zy.call(r,s))pc(r,s,{get:()=>e[s],enumerable:!0});return r},$e=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports),Ue=$e((e,u)=>{u.exports={options:{usePureJavaScript:!1}}}),qy=$e((e,u)=>{var t={};u.exports=t;var r={};t.encode=function(n,i,l){if(typeof i!=="string")throw new TypeError('"alphabet" must be a string.');if(l!==void 0&&typeof l!=="number")throw new TypeError('"maxline" must be a number.');var o="";if(!(n instanceof Uint8Array))o=s(n,i);else{var a=0,D=i.length,h=i.charAt(0),d=[0];for(a=0;a<n.length;++a){for(var F=0,p=n[a];F<d.length;++F)p+=d[F]<<8,d[F]=p%D,p=p/D|0;while(p>0)d.push(p%D),p=p/D|0}for(a=0;n[a]===0&&a<n.length-1;++a)o+=h;for(a=d.length-1;a>=0;--a)o+=i[d[a]]}if(l){var f=new RegExp(".{1,"+l+"}","g");o=o.match(f).join(`\r
|
|
324
|
-
`)}return o},t.decode=function(n,i){if(typeof n!=="string")throw new TypeError('"input" must be a string.');if(typeof i!=="string")throw new TypeError('"alphabet" must be a string.');var l=r[i];if(!l){l=r[i]=[];for(var o=0;o<i.length;++o)l[i.charCodeAt(o)]=o}n=n.replace(/\s/g,"");var a=i.length,D=i.charAt(0),h=[0];for(var o=0;o<n.length;o++){var d=l[n.charCodeAt(o)];if(d===void 0)return;for(var F=0,p=d;F<h.length;++F)p+=h[F]*a,h[F]=p&255,p>>=8;while(p>0)h.push(p&255),p>>=8}for(var f=0;n[f]===D&&f<n.length-1;++f)h.push(0);if(typeof Buffer!=="undefined")return Buffer.from(h.reverse());return new Uint8Array(h.reverse())};function s(n,i){var l=0,o=i.length,a=i.charAt(0),D=[0];for(l=0;l<n.length();++l){for(var h=0,d=n.at(l);h<D.length;++h)d+=D[h]<<8,D[h]=d%o,d=d/o|0;while(d>0)D.push(d%o),d=d/o|0}var F="";for(l=0;n.at(l)===0&&l<n.length()-1;++l)F+=a;for(l=D.length-1;l>=0;--l)F+=i[D[l]];return F}}),Ke=$e((e,u)=>{var t=Ue(),r=qy(),s=u.exports=t.util=t.util||{};(function(){if(typeof process!=="undefined"&&process.nextTick){if(s.nextTick=process.nextTick,typeof setImmediate==="function")s.setImmediate=setImmediate;else s.setImmediate=s.nextTick;return}if(typeof setImmediate==="function"){s.setImmediate=function(){return setImmediate.apply(void 0,arguments)},s.nextTick=function(E){return setImmediate(E)};return}if(s.setImmediate=function(E){setTimeout(E,0)},typeof window!=="undefined"&&typeof window.postMessage==="function"){let E=function(S){if(S.source===window&&S.data===y){S.stopPropagation();var _=A.slice();A.length=0,_.forEach(function(K){K()})}};var c=E,y="forge.setImmediate",A=[];s.setImmediate=function(S){if(A.push(S),A.length===1)window.postMessage(y,"*")},window.addEventListener("message",E,!0)}if(typeof MutationObserver!=="undefined"){var T=Date.now(),I=!0,v=document.createElement("div"),A=[];new MutationObserver(function(){var S=A.slice();A.length=0,S.forEach(function(_){_()})}).observe(v,{attributes:!0});var g=s.setImmediate;s.setImmediate=function(S){if(Date.now()-T>15)T=Date.now(),g(S);else if(A.push(S),A.length===1)v.setAttribute("a",I=!I)}}s.nextTick=s.setImmediate})(),s.isNodejs=typeof process!=="undefined"&&process.versions&&process.versions.node,s.globalScope=function(){if(s.isNodejs)return global;return typeof self==="undefined"?window:self}(),s.isArray=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"},s.isArrayBuffer=function(c){return typeof ArrayBuffer!=="undefined"&&c instanceof ArrayBuffer},s.isArrayBufferView=function(c){return c&&s.isArrayBuffer(c.buffer)&&c.byteLength!==void 0};function n(c){if(!(c===8||c===16||c===24||c===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+c)}s.ByteBuffer=i;function i(c){if(this.data="",this.read=0,typeof c==="string")this.data=c;else if(s.isArrayBuffer(c)||s.isArrayBufferView(c))if(typeof Buffer!=="undefined"&&c instanceof Buffer)this.data=c.toString("binary");else{var y=new Uint8Array(c);try{this.data=String.fromCharCode.apply(null,y)}catch(T){for(var A=0;A<y.length;++A)this.putByte(y[A])}}else if(c instanceof i||typeof c==="object"&&typeof c.data==="string"&&typeof c.read==="number")this.data=c.data,this.read=c.read;this._constructedStringLength=0}s.ByteStringBuffer=i;var l=4096;s.ByteStringBuffer.prototype._optimizeConstructedString=function(c){if(this._constructedStringLength+=c,this._constructedStringLength>l)this.data.substr(0,1),this._constructedStringLength=0},s.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},s.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},s.ByteStringBuffer.prototype.putByte=function(c){return this.putBytes(String.fromCharCode(c))},s.ByteStringBuffer.prototype.fillWithByte=function(c,y){c=String.fromCharCode(c);var A=this.data;while(y>0){if(y&1)A+=c;if(y>>>=1,y>0)c+=c}return this.data=A,this._optimizeConstructedString(y),this},s.ByteStringBuffer.prototype.putBytes=function(c){return this.data+=c,this._optimizeConstructedString(c.length),this},s.ByteStringBuffer.prototype.putString=function(c){return this.putBytes(s.encodeUtf8(c))},s.ByteStringBuffer.prototype.putInt16=function(c){return this.putBytes(String.fromCharCode(c>>8&255)+String.fromCharCode(c&255))},s.ByteStringBuffer.prototype.putInt24=function(c){return this.putBytes(String.fromCharCode(c>>16&255)+String.fromCharCode(c>>8&255)+String.fromCharCode(c&255))},s.ByteStringBuffer.prototype.putInt32=function(c){return this.putBytes(String.fromCharCode(c>>24&255)+String.fromCharCode(c>>16&255)+String.fromCharCode(c>>8&255)+String.fromCharCode(c&255))},s.ByteStringBuffer.prototype.putInt16Le=function(c){return this.putBytes(String.fromCharCode(c&255)+String.fromCharCode(c>>8&255))},s.ByteStringBuffer.prototype.putInt24Le=function(c){return this.putBytes(String.fromCharCode(c&255)+String.fromCharCode(c>>8&255)+String.fromCharCode(c>>16&255))},s.ByteStringBuffer.prototype.putInt32Le=function(c){return this.putBytes(String.fromCharCode(c&255)+String.fromCharCode(c>>8&255)+String.fromCharCode(c>>16&255)+String.fromCharCode(c>>24&255))},s.ByteStringBuffer.prototype.putInt=function(c,y){n(y);var A="";do y-=8,A+=String.fromCharCode(c>>y&255);while(y>0);return this.putBytes(A)},s.ByteStringBuffer.prototype.putSignedInt=function(c,y){if(c<0)c+=2<<y-1;return this.putInt(c,y)},s.ByteStringBuffer.prototype.putBuffer=function(c){return this.putBytes(c.getBytes())},s.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},s.ByteStringBuffer.prototype.getInt16=function(){var c=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,c},s.ByteStringBuffer.prototype.getInt24=function(){var c=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,c},s.ByteStringBuffer.prototype.getInt32=function(){var c=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,c},s.ByteStringBuffer.prototype.getInt16Le=function(){var c=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,c},s.ByteStringBuffer.prototype.getInt24Le=function(){var c=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,c},s.ByteStringBuffer.prototype.getInt32Le=function(){var c=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,c},s.ByteStringBuffer.prototype.getInt=function(c){n(c);var y=0;do y=(y<<8)+this.data.charCodeAt(this.read++),c-=8;while(c>0);return y},s.ByteStringBuffer.prototype.getSignedInt=function(c){var y=this.getInt(c),A=2<<c-2;if(y>=A)y-=A<<1;return y},s.ByteStringBuffer.prototype.getBytes=function(c){var y;if(c)c=Math.min(this.length(),c),y=this.data.slice(this.read,this.read+c),this.read+=c;else if(c===0)y="";else y=this.read===0?this.data:this.data.slice(this.read),this.clear();return y},s.ByteStringBuffer.prototype.bytes=function(c){return typeof c==="undefined"?this.data.slice(this.read):this.data.slice(this.read,this.read+c)},s.ByteStringBuffer.prototype.at=function(c){return this.data.charCodeAt(this.read+c)},s.ByteStringBuffer.prototype.setAt=function(c,y){return this.data=this.data.substr(0,this.read+c)+String.fromCharCode(y)+this.data.substr(this.read+c+1),this},s.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},s.ByteStringBuffer.prototype.copy=function(){var c=s.createBuffer(this.data);return c.read=this.read,c},s.ByteStringBuffer.prototype.compact=function(){if(this.read>0)this.data=this.data.slice(this.read),this.read=0;return this},s.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},s.ByteStringBuffer.prototype.truncate=function(c){var y=Math.max(0,this.length()-c);return this.data=this.data.substr(this.read,y),this.read=0,this},s.ByteStringBuffer.prototype.toHex=function(){var c="";for(var y=this.read;y<this.data.length;++y){var A=this.data.charCodeAt(y);if(A<16)c+="0";c+=A.toString(16)}return c},s.ByteStringBuffer.prototype.toString=function(){return s.decodeUtf8(this.bytes())};function o(c,y){y=y||{},this.read=y.readOffset||0,this.growSize=y.growSize||1024;var A=s.isArrayBuffer(c),T=s.isArrayBufferView(c);if(A||T){if(A)this.data=new DataView(c);else this.data=new DataView(c.buffer,c.byteOffset,c.byteLength);this.write="writeOffset"in y?y.writeOffset:this.data.byteLength;return}if(this.data=new DataView(new ArrayBuffer(0)),this.write=0,c!==null&&c!==void 0)this.putBytes(c);if("writeOffset"in y)this.write=y.writeOffset}s.DataBuffer=o,s.DataBuffer.prototype.length=function(){return this.write-this.read},s.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},s.DataBuffer.prototype.accommodate=function(c,y){if(this.length()>=c)return this;y=Math.max(y||this.growSize,c);var A=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),T=new Uint8Array(this.length()+y);return T.set(A),this.data=new DataView(T.buffer),this},s.DataBuffer.prototype.putByte=function(c){return this.accommodate(1),this.data.setUint8(this.write++,c),this},s.DataBuffer.prototype.fillWithByte=function(c,y){this.accommodate(y);for(var A=0;A<y;++A)this.data.setUint8(c);return this},s.DataBuffer.prototype.putBytes=function(c,y){if(s.isArrayBufferView(c)){var A=new Uint8Array(c.buffer,c.byteOffset,c.byteLength),T=A.byteLength-A.byteOffset;this.accommodate(T);var I=new Uint8Array(this.data.buffer,this.write);return I.set(A),this.write+=T,this}if(s.isArrayBuffer(c)){var A=new Uint8Array(c);this.accommodate(A.byteLength);var I=new Uint8Array(this.data.buffer);return I.set(A,this.write),this.write+=A.byteLength,this}if(c instanceof s.DataBuffer||typeof c==="object"&&typeof c.read==="number"&&typeof c.write==="number"&&s.isArrayBufferView(c.data)){var A=new Uint8Array(c.data.byteLength,c.read,c.length());this.accommodate(A.byteLength);var I=new Uint8Array(c.data.byteLength,this.write);return I.set(A),this.write+=A.byteLength,this}if(c instanceof s.ByteStringBuffer)c=c.data,y="binary";if(y=y||"binary",typeof c==="string"){var v;if(y==="hex")return this.accommodate(Math.ceil(c.length/2)),v=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.hex.decode(c,v,this.write),this;if(y==="base64")return this.accommodate(Math.ceil(c.length/4)*3),v=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.base64.decode(c,v,this.write),this;if(y==="utf8")c=s.encodeUtf8(c),y="binary";if(y==="binary"||y==="raw")return this.accommodate(c.length),v=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.raw.decode(v),this;if(y==="utf16")return this.accommodate(c.length*2),v=new Uint16Array(this.data.buffer,this.write),this.write+=s.text.utf16.encode(v),this;throw new Error("Invalid encoding: "+y)}throw Error("Invalid parameter: "+c)},s.DataBuffer.prototype.putBuffer=function(c){return this.putBytes(c),c.clear(),this},s.DataBuffer.prototype.putString=function(c){return this.putBytes(c,"utf16")},s.DataBuffer.prototype.putInt16=function(c){return this.accommodate(2),this.data.setInt16(this.write,c),this.write+=2,this},s.DataBuffer.prototype.putInt24=function(c){return this.accommodate(3),this.data.setInt16(this.write,c>>8&65535),this.data.setInt8(this.write,c>>16&255),this.write+=3,this},s.DataBuffer.prototype.putInt32=function(c){return this.accommodate(4),this.data.setInt32(this.write,c),this.write+=4,this},s.DataBuffer.prototype.putInt16Le=function(c){return this.accommodate(2),this.data.setInt16(this.write,c,!0),this.write+=2,this},s.DataBuffer.prototype.putInt24Le=function(c){return this.accommodate(3),this.data.setInt8(this.write,c>>16&255),this.data.setInt16(this.write,c>>8&65535,!0),this.write+=3,this},s.DataBuffer.prototype.putInt32Le=function(c){return this.accommodate(4),this.data.setInt32(this.write,c,!0),this.write+=4,this},s.DataBuffer.prototype.putInt=function(c,y){n(y),this.accommodate(y/8);do y-=8,this.data.setInt8(this.write++,c>>y&255);while(y>0);return this},s.DataBuffer.prototype.putSignedInt=function(c,y){if(n(y),this.accommodate(y/8),c<0)c+=2<<y-1;return this.putInt(c,y)},s.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},s.DataBuffer.prototype.getInt16=function(){var c=this.data.getInt16(this.read);return this.read+=2,c},s.DataBuffer.prototype.getInt24=function(){var c=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,c},s.DataBuffer.prototype.getInt32=function(){var c=this.data.getInt32(this.read);return this.read+=4,c},s.DataBuffer.prototype.getInt16Le=function(){var c=this.data.getInt16(this.read,!0);return this.read+=2,c},s.DataBuffer.prototype.getInt24Le=function(){var c=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,c},s.DataBuffer.prototype.getInt32Le=function(){var c=this.data.getInt32(this.read,!0);return this.read+=4,c},s.DataBuffer.prototype.getInt=function(c){n(c);var y=0;do y=(y<<8)+this.data.getInt8(this.read++),c-=8;while(c>0);return y},s.DataBuffer.prototype.getSignedInt=function(c){var y=this.getInt(c),A=2<<c-2;if(y>=A)y-=A<<1;return y},s.DataBuffer.prototype.getBytes=function(c){var y;if(c)c=Math.min(this.length(),c),y=this.data.slice(this.read,this.read+c),this.read+=c;else if(c===0)y="";else y=this.read===0?this.data:this.data.slice(this.read),this.clear();return y},s.DataBuffer.prototype.bytes=function(c){return typeof c==="undefined"?this.data.slice(this.read):this.data.slice(this.read,this.read+c)},s.DataBuffer.prototype.at=function(c){return this.data.getUint8(this.read+c)},s.DataBuffer.prototype.setAt=function(c,y){return this.data.setUint8(c,y),this},s.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},s.DataBuffer.prototype.copy=function(){return new s.DataBuffer(this)},s.DataBuffer.prototype.compact=function(){if(this.read>0){var c=new Uint8Array(this.data.buffer,this.read),y=new Uint8Array(c.byteLength);y.set(c),this.data=new DataView(y),this.write-=this.read,this.read=0}return this},s.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},s.DataBuffer.prototype.truncate=function(c){return this.write=Math.max(0,this.length()-c),this.read=Math.min(this.read,this.write),this},s.DataBuffer.prototype.toHex=function(){var c="";for(var y=this.read;y<this.data.byteLength;++y){var A=this.data.getUint8(y);if(A<16)c+="0";c+=A.toString(16)}return c},s.DataBuffer.prototype.toString=function(c){var y=new Uint8Array(this.data,this.read,this.length());if(c=c||"utf8",c==="binary"||c==="raw")return s.binary.raw.encode(y);if(c==="hex")return s.binary.hex.encode(y);if(c==="base64")return s.binary.base64.encode(y);if(c==="utf8")return s.text.utf8.decode(y);if(c==="utf16")return s.text.utf16.decode(y);throw new Error("Invalid encoding: "+c)},s.createBuffer=function(c,y){if(y=y||"raw",c!==void 0&&y==="utf8")c=s.encodeUtf8(c);return new s.ByteBuffer(c)},s.fillString=function(c,y){var A="";while(y>0){if(y&1)A+=c;if(y>>>=1,y>0)c+=c}return A},s.xorBytes=function(c,y,A){var T="",I="",v="",g=0,E=0;for(;A>0;--A,++g){if(I=c.charCodeAt(g)^y.charCodeAt(g),E>=10)T+=v,v="",E=0;v+=String.fromCharCode(I),++E}return T+=v,T},s.hexToBytes=function(c){var y="",A=0;if(c.length&!0)A=1,y+=String.fromCharCode(parseInt(c[0],16));for(;A<c.length;A+=2)y+=String.fromCharCode(parseInt(c.substr(A,2),16));return y},s.bytesToHex=function(c){return s.createBuffer(c).toHex()},s.int32ToBytes=function(c){return String.fromCharCode(c>>24&255)+String.fromCharCode(c>>16&255)+String.fromCharCode(c>>8&255)+String.fromCharCode(c&255)};var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",D=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],h="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";s.encode64=function(c,y){var A="",T="",I,v,g,E=0;while(E<c.length){if(I=c.charCodeAt(E++),v=c.charCodeAt(E++),g=c.charCodeAt(E++),A+=a.charAt(I>>2),A+=a.charAt((I&3)<<4|v>>4),isNaN(v))A+="==";else A+=a.charAt((v&15)<<2|g>>6),A+=isNaN(g)?"=":a.charAt(g&63);if(y&&A.length>y)T+=A.substr(0,y)+`\r
|
|
325
|
-
`,A=A.substr(y)}return T+=A,T},s.decode64=function(c){c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");var y="",A,T,I,v,g=0;while(g<c.length)if(A=D[c.charCodeAt(g++)-43],T=D[c.charCodeAt(g++)-43],I=D[c.charCodeAt(g++)-43],v=D[c.charCodeAt(g++)-43],y+=String.fromCharCode(A<<2|T>>4),I!==64){if(y+=String.fromCharCode((T&15)<<4|I>>2),v!==64)y+=String.fromCharCode((I&3)<<6|v)}return y},s.encodeUtf8=function(c){return unescape(encodeURIComponent(c))},s.decodeUtf8=function(c){return decodeURIComponent(escape(c))},s.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:r.encode,decode:r.decode}},s.binary.raw.encode=function(c){return String.fromCharCode.apply(null,c)},s.binary.raw.decode=function(c,y,A){var T=y;if(!T)T=new Uint8Array(c.length);A=A||0;var I=A;for(var v=0;v<c.length;++v)T[I++]=c.charCodeAt(v);return y?I-A:T},s.binary.hex.encode=s.bytesToHex,s.binary.hex.decode=function(c,y,A){var T=y;if(!T)T=new Uint8Array(Math.ceil(c.length/2));A=A||0;var I=0,v=A;if(c.length&1)I=1,T[v++]=parseInt(c[0],16);for(;I<c.length;I+=2)T[v++]=parseInt(c.substr(I,2),16);return y?v-A:T},s.binary.base64.encode=function(c,y){var A="",T="",I,v,g,E=0;while(E<c.byteLength){if(I=c[E++],v=c[E++],g=c[E++],A+=a.charAt(I>>2),A+=a.charAt((I&3)<<4|v>>4),isNaN(v))A+="==";else A+=a.charAt((v&15)<<2|g>>6),A+=isNaN(g)?"=":a.charAt(g&63);if(y&&A.length>y)T+=A.substr(0,y)+`\r
|
|
326
|
-
`,A=A.substr(y)}return T+=A,T},s.binary.base64.decode=function(c,y,A){var T=y;if(!T)T=new Uint8Array(Math.ceil(c.length/4)*3);c=c.replace(/[^A-Za-z0-9\+\/\=]/g,""),A=A||0;var I,v,g,E,S=0,_=A;while(S<c.length)if(I=D[c.charCodeAt(S++)-43],v=D[c.charCodeAt(S++)-43],g=D[c.charCodeAt(S++)-43],E=D[c.charCodeAt(S++)-43],T[_++]=I<<2|v>>4,g!==64){if(T[_++]=(v&15)<<4|g>>2,E!==64)T[_++]=(g&3)<<6|E}return y?_-A:T.subarray(0,_)},s.binary.base58.encode=function(c,y){return s.binary.baseN.encode(c,h,y)},s.binary.base58.decode=function(c,y){return s.binary.baseN.decode(c,h,y)},s.text={utf8:{},utf16:{}},s.text.utf8.encode=function(c,y,A){c=s.encodeUtf8(c);var T=y;if(!T)T=new Uint8Array(c.length);A=A||0;var I=A;for(var v=0;v<c.length;++v)T[I++]=c.charCodeAt(v);return y?I-A:T},s.text.utf8.decode=function(c){return s.decodeUtf8(String.fromCharCode.apply(null,c))},s.text.utf16.encode=function(c,y,A){var T=y;if(!T)T=new Uint8Array(c.length*2);var I=new Uint16Array(T.buffer);A=A||0;var v=A,g=A;for(var E=0;E<c.length;++E)I[g++]=c.charCodeAt(E),v+=2;return y?v-A:T},s.text.utf16.decode=function(c){return String.fromCharCode.apply(null,new Uint16Array(c.buffer))},s.deflate=function(c,y,A){if(y=s.decode64(c.deflate(s.encode64(y)).rval),A){var T=2,I=y.charCodeAt(1);if(I&32)T=6;y=y.substring(T,y.length-4)}return y},s.inflate=function(c,y,A){var T=c.inflate(s.encode64(y)).rval;return T===null?null:s.decode64(T)};var d=function(c,y,A){if(!c)throw new Error("WebStorage not available.");var T;if(A===null)T=c.removeItem(y);else A=s.encode64(JSON.stringify(A)),T=c.setItem(y,A);if(typeof T!=="undefined"&&T.rval!==!0){var I=new Error(T.error.message);throw I.id=T.error.id,I.name=T.error.name,I}},F=function(c,y){if(!c)throw new Error("WebStorage not available.");var A=c.getItem(y);if(c.init)if(A.rval===null){if(A.error){var T=new Error(A.error.message);throw T.id=A.error.id,T.name=A.error.name,T}A=null}else A=A.rval;if(A!==null)A=JSON.parse(s.decode64(A));return A},p=function(c,y,A,T){var I=F(c,y);if(I===null)I={};I[A]=T,d(c,y,I)},f=function(c,y,A){var T=F(c,y);if(T!==null)T=A in T?T[A]:null;return T},m=function(c,y,A){var T=F(c,y);if(T!==null&&A in T){delete T[A];var I=!0;for(var v in T){I=!1;break}if(I)T=null;d(c,y,T)}},B=function(c,y){d(c,y,null)},C=function(c,y,A){var T=null;if(typeof A==="undefined")A=["web","flash"];var I,v=!1,g=null;for(var E in A){I=A[E];try{if(I==="flash"||I==="both"){if(y[0]===null)throw new Error("Flash local storage not available.");T=c.apply(this,y),v=I==="flash"}if(I==="web"||I==="both")y[0]=localStorage,T=c.apply(this,y),v=!0}catch(S){g=S}if(v)break}if(!v)throw g;return T};s.setItem=function(c,y,A,T,I){C(p,arguments,I)},s.getItem=function(c,y,A,T){return C(f,arguments,T)},s.removeItem=function(c,y,A,T){C(m,arguments,T)},s.clearItems=function(c,y,A){C(B,arguments,A)},s.isEmpty=function(c){for(var y in c)if(c.hasOwnProperty(y))return!1;return!0},s.format=function(c){var y=/%./g,A,T,I=0,v=[],g=0;while(A=y.exec(c)){if(T=c.substring(g,y.lastIndex-2),T.length>0)v.push(T);g=y.lastIndex;var E=A[0][1];switch(E){case"s":case"o":if(I<arguments.length)v.push(arguments[I+++1]);else v.push("<?>");break;case"%":v.push("%");break;default:v.push("<%"+E+"?>")}}return v.push(c.substring(g)),v.join("")},s.formatNumber=function(c,y,A,T){var I=c,v=isNaN(y=Math.abs(y))?2:y,g=A===void 0?",":A,E=T===void 0?".":T,S=I<0?"-":"",_=parseInt(I=Math.abs(+I||0).toFixed(v),10)+"",K=_.length>3?_.length%3:0;return S+(K?_.substr(0,K)+E:"")+_.substr(K).replace(/(\d{3})(?=\d)/g,"$1"+E)+(v?g+Math.abs(I-_).toFixed(v).slice(2):"")},s.formatSize=function(c){if(c>=1073741824)c=s.formatNumber(c/1073741824,2,".","")+" GiB";else if(c>=1048576)c=s.formatNumber(c/1048576,2,".","")+" MiB";else if(c>=1024)c=s.formatNumber(c/1024,0)+" KiB";else c=s.formatNumber(c,0)+" bytes";return c},s.bytesFromIP=function(c){if(c.indexOf(".")!==-1)return s.bytesFromIPv4(c);if(c.indexOf(":")!==-1)return s.bytesFromIPv6(c);return null},s.bytesFromIPv4=function(c){if(c=c.split("."),c.length!==4)return null;var y=s.createBuffer();for(var A=0;A<c.length;++A){var T=parseInt(c[A],10);if(isNaN(T))return null;y.putByte(T)}return y.getBytes()},s.bytesFromIPv6=function(c){var y=0;c=c.split(":").filter(function(g){if(g.length===0)++y;return!0});var A=(8-c.length+y)*2,T=s.createBuffer();for(var I=0;I<8;++I){if(!c[I]||c[I].length===0){T.fillWithByte(0,A),A=0;continue}var v=s.hexToBytes(c[I]);if(v.length<2)T.putByte(0);T.putBytes(v)}return T.getBytes()},s.bytesToIP=function(c){if(c.length===4)return s.bytesToIPv4(c);if(c.length===16)return s.bytesToIPv6(c);return null},s.bytesToIPv4=function(c){if(c.length!==4)return null;var y=[];for(var A=0;A<c.length;++A)y.push(c.charCodeAt(A));return y.join(".")},s.bytesToIPv6=function(c){if(c.length!==16)return null;var y=[],A=[],T=0;for(var I=0;I<c.length;I+=2){var v=s.bytesToHex(c[I]+c[I+1]);while(v[0]==="0"&&v!=="0")v=v.substr(1);if(v==="0"){var g=A[A.length-1],E=y.length;if(!g||E!==g.end+1)A.push({start:E,end:E});else if(g.end=E,g.end-g.start>A[T].end-A[T].start)T=A.length-1}y.push(v)}if(A.length>0){var S=A[T];if(S.end-S.start>0){if(y.splice(S.start,S.end-S.start+1,""),S.start===0)y.unshift("");if(S.end===7)y.push("")}}return y.join(":")},s.estimateCores=function(c,y){if(typeof c==="function")y=c,c={};if(c=c||{},"cores"in s&&!c.update)return y(null,s.cores);if(typeof navigator!=="undefined"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return s.cores=navigator.hardwareConcurrency,y(null,s.cores);if(typeof Worker==="undefined")return s.cores=1,y(null,s.cores);if(typeof Blob==="undefined")return s.cores=2,y(null,s.cores);var A=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(g){var E=Date.now(),S=E+4;while(Date.now()<S);self.postMessage({st:E,et:S})})}.toString(),")()"],{type:"application/javascript"}));T([],5,16);function T(g,E,S){if(E===0){var _=Math.floor(g.reduce(function(K,N){return K+N},0)/g.length);return s.cores=Math.max(1,_),URL.revokeObjectURL(A),y(null,s.cores)}I(S,function(K,N){g.push(v(S,N)),T(g,E-1,S)})}function I(g,E){var S=[],_=[];for(var K=0;K<g;++K){var N=new Worker(A);N.addEventListener("message",function($){if(_.push($.data),_.length===g){for(var P=0;P<g;++P)S[P].terminate();E(null,_)}}),S.push(N)}for(var K=0;K<g;++K)S[K].postMessage(K)}function v(g,E){var S=[];for(var _=0;_<g;++_){var K=E[_],N=S[_]=[];for(var $=0;$<g;++$){if(_===$)continue;var P=E[$];if(K.st>P.st&&K.st<P.et||P.st>K.st&&P.st<K.et)N.push($)}}return S.reduce(function(V,k){return Math.max(V,k.length)},0)}}}),b0=$e((e,u)=>{var t=Ue();Ke(),u.exports=t.cipher=t.cipher||{},t.cipher.algorithms=t.cipher.algorithms||{},t.cipher.createCipher=function(s,n){var i=s;if(typeof i==="string"){if(i=t.cipher.getAlgorithm(i),i)i=i()}if(!i)throw new Error("Unsupported algorithm: "+s);return new t.cipher.BlockCipher({algorithm:i,key:n,decrypt:!1})},t.cipher.createDecipher=function(s,n){var i=s;if(typeof i==="string"){if(i=t.cipher.getAlgorithm(i),i)i=i()}if(!i)throw new Error("Unsupported algorithm: "+s);return new t.cipher.BlockCipher({algorithm:i,key:n,decrypt:!0})},t.cipher.registerAlgorithm=function(s,n){s=s.toUpperCase(),t.cipher.algorithms[s]=n},t.cipher.getAlgorithm=function(s){if(s=s.toUpperCase(),s in t.cipher.algorithms)return t.cipher.algorithms[s];return null};var r=t.cipher.BlockCipher=function(s){this.algorithm=s.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=s.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=s.decrypt,this.algorithm.initialize(s)};r.prototype.start=function(s){s=s||{};var n={};for(var i in s)n[i]=s[i];n.decrypt=this._decrypt,this._finish=!1,this._input=t.util.createBuffer(),this.output=s.output||t.util.createBuffer(),this.mode.start(n)},r.prototype.update=function(s){if(s)this._input.putBuffer(s);while(!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish);this._input.compact()},r.prototype.finish=function(s){if(s&&(this.mode.name==="ECB"||this.mode.name==="CBC"))this.mode.pad=function(i){return s(this.blockSize,i,!1)},this.mode.unpad=function(i){return s(this.blockSize,i,!0)};var n={};if(n.decrypt=this._decrypt,n.overflow=this._input.length()%this.blockSize,!this._decrypt&&this.mode.pad){if(!this.mode.pad(this._input,n))return!1}if(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad){if(!this.mode.unpad(this.output,n))return!1}if(this.mode.afterFinish){if(!this.mode.afterFinish(this.output,n))return!1}return!0}}),Rf=$e((e,u)=>{var t=Ue();Ke(),t.cipher=t.cipher||{};var r=u.exports=t.cipher.modes=t.cipher.modes||{};r.ecb=function(l){l=l||{},this.name="ECB",this.cipher=l.cipher,this.blockSize=l.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},r.ecb.prototype.start=function(l){},r.ecb.prototype.encrypt=function(l,o,a){if(l.length()<this.blockSize&&!(a&&l.length()>0))return!0;for(var D=0;D<this._ints;++D)this._inBlock[D]=l.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var D=0;D<this._ints;++D)o.putInt32(this._outBlock[D])},r.ecb.prototype.decrypt=function(l,o,a){if(l.length()<this.blockSize&&!(a&&l.length()>0))return!0;for(var D=0;D<this._ints;++D)this._inBlock[D]=l.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var D=0;D<this._ints;++D)o.putInt32(this._outBlock[D])},r.ecb.prototype.pad=function(l,o){var a=l.length()===this.blockSize?this.blockSize:this.blockSize-l.length();return l.fillWithByte(a,a),!0},r.ecb.prototype.unpad=function(l,o){if(o.overflow>0)return!1;var a=l.length(),D=l.at(a-1);if(D>this.blockSize<<2)return!1;return l.truncate(D),!0},r.cbc=function(l){l=l||{},this.name="CBC",this.cipher=l.cipher,this.blockSize=l.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},r.cbc.prototype.start=function(l){if(l.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if(!("iv"in l))throw new Error("Invalid IV parameter.");else this._iv=s(l.iv,this.blockSize),this._prev=this._iv.slice(0)},r.cbc.prototype.encrypt=function(l,o,a){if(l.length()<this.blockSize&&!(a&&l.length()>0))return!0;for(var D=0;D<this._ints;++D)this._inBlock[D]=this._prev[D]^l.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var D=0;D<this._ints;++D)o.putInt32(this._outBlock[D]);this._prev=this._outBlock},r.cbc.prototype.decrypt=function(l,o,a){if(l.length()<this.blockSize&&!(a&&l.length()>0))return!0;for(var D=0;D<this._ints;++D)this._inBlock[D]=l.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var D=0;D<this._ints;++D)o.putInt32(this._prev[D]^this._outBlock[D]);this._prev=this._inBlock.slice(0)},r.cbc.prototype.pad=function(l,o){var a=l.length()===this.blockSize?this.blockSize:this.blockSize-l.length();return l.fillWithByte(a,a),!0},r.cbc.prototype.unpad=function(l,o){if(o.overflow>0)return!1;var a=l.length(),D=l.at(a-1);if(D>this.blockSize<<2)return!1;return l.truncate(D),!0},r.cfb=function(l){l=l||{},this.name="CFB",this.cipher=l.cipher,this.blockSize=l.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=t.util.createBuffer(),this._partialBytes=0},r.cfb.prototype.start=function(l){if(!("iv"in l))throw new Error("Invalid IV parameter.");this._iv=s(l.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},r.cfb.prototype.encrypt=function(l,o,a){var D=l.length();if(D===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&D>=this.blockSize){for(var h=0;h<this._ints;++h)this._inBlock[h]=l.getInt32()^this._outBlock[h],o.putInt32(this._inBlock[h]);return}var d=(this.blockSize-D)%this.blockSize;if(d>0)d=this.blockSize-d;this._partialOutput.clear();for(var h=0;h<this._ints;++h)this._partialBlock[h]=l.getInt32()^this._outBlock[h],this._partialOutput.putInt32(this._partialBlock[h]);if(d>0)l.read-=this.blockSize;else for(var h=0;h<this._ints;++h)this._inBlock[h]=this._partialBlock[h];if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(d>0&&!a)return o.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=d,!0;o.putBytes(this._partialOutput.getBytes(D-this._partialBytes)),this._partialBytes=0},r.cfb.prototype.decrypt=function(l,o,a){var D=l.length();if(D===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&D>=this.blockSize){for(var h=0;h<this._ints;++h)this._inBlock[h]=l.getInt32(),o.putInt32(this._inBlock[h]^this._outBlock[h]);return}var d=(this.blockSize-D)%this.blockSize;if(d>0)d=this.blockSize-d;this._partialOutput.clear();for(var h=0;h<this._ints;++h)this._partialBlock[h]=l.getInt32(),this._partialOutput.putInt32(this._partialBlock[h]^this._outBlock[h]);if(d>0)l.read-=this.blockSize;else for(var h=0;h<this._ints;++h)this._inBlock[h]=this._partialBlock[h];if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(d>0&&!a)return o.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=d,!0;o.putBytes(this._partialOutput.getBytes(D-this._partialBytes)),this._partialBytes=0},r.ofb=function(l){l=l||{},this.name="OFB",this.cipher=l.cipher,this.blockSize=l.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=t.util.createBuffer(),this._partialBytes=0},r.ofb.prototype.start=function(l){if(!("iv"in l))throw new Error("Invalid IV parameter.");this._iv=s(l.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},r.ofb.prototype.encrypt=function(l,o,a){var D=l.length();if(l.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&D>=this.blockSize){for(var h=0;h<this._ints;++h)o.putInt32(l.getInt32()^this._outBlock[h]),this._inBlock[h]=this._outBlock[h];return}var d=(this.blockSize-D)%this.blockSize;if(d>0)d=this.blockSize-d;this._partialOutput.clear();for(var h=0;h<this._ints;++h)this._partialOutput.putInt32(l.getInt32()^this._outBlock[h]);if(d>0)l.read-=this.blockSize;else for(var h=0;h<this._ints;++h)this._inBlock[h]=this._outBlock[h];if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(d>0&&!a)return o.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=d,!0;o.putBytes(this._partialOutput.getBytes(D-this._partialBytes)),this._partialBytes=0},r.ofb.prototype.decrypt=r.ofb.prototype.encrypt,r.ctr=function(l){l=l||{},this.name="CTR",this.cipher=l.cipher,this.blockSize=l.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=t.util.createBuffer(),this._partialBytes=0},r.ctr.prototype.start=function(l){if(!("iv"in l))throw new Error("Invalid IV parameter.");this._iv=s(l.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},r.ctr.prototype.encrypt=function(l,o,a){var D=l.length();if(D===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&D>=this.blockSize)for(var h=0;h<this._ints;++h)o.putInt32(l.getInt32()^this._outBlock[h]);else{var d=(this.blockSize-D)%this.blockSize;if(d>0)d=this.blockSize-d;this._partialOutput.clear();for(var h=0;h<this._ints;++h)this._partialOutput.putInt32(l.getInt32()^this._outBlock[h]);if(d>0)l.read-=this.blockSize;if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(d>0&&!a)return o.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=d,!0;o.putBytes(this._partialOutput.getBytes(D-this._partialBytes)),this._partialBytes=0}n(this._inBlock)},r.ctr.prototype.decrypt=r.ctr.prototype.encrypt,r.gcm=function(l){l=l||{},this.name="GCM",this.cipher=l.cipher,this.blockSize=l.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=t.util.createBuffer(),this._partialBytes=0,this._R=3774873600},r.gcm.prototype.start=function(l){if(!("iv"in l))throw new Error("Invalid IV parameter.");var o=t.util.createBuffer(l.iv);this._cipherLength=0;var a;if("additionalData"in l)a=t.util.createBuffer(l.additionalData);else a=t.util.createBuffer();if("tagLength"in l)this._tagLength=l.tagLength;else this._tagLength=128;if(this._tag=null,l.decrypt){if(this._tag=t.util.createBuffer(l.tag).getBytes(),this._tag.length!==this._tagLength/8)throw new Error("Authentication tag does not match tag length.")}this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var D=o.length();if(D===12)this._j0=[o.getInt32(),o.getInt32(),o.getInt32(),1];else{this._j0=[0,0,0,0];while(o.length()>0)this._j0=this.ghash(this._hashSubkey,this._j0,[o.getInt32(),o.getInt32(),o.getInt32(),o.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(i(D*8)))}this._inBlock=this._j0.slice(0),n(this._inBlock),this._partialBytes=0,a=t.util.createBuffer(a),this._aDataLength=i(a.length()*8);var h=a.length()%this.blockSize;if(h)a.fillWithByte(0,this.blockSize-h);this._s=[0,0,0,0];while(a.length()>0)this._s=this.ghash(this._hashSubkey,this._s,[a.getInt32(),a.getInt32(),a.getInt32(),a.getInt32()])},r.gcm.prototype.encrypt=function(l,o,a){var D=l.length();if(D===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&D>=this.blockSize){for(var h=0;h<this._ints;++h)o.putInt32(this._outBlock[h]^=l.getInt32());this._cipherLength+=this.blockSize}else{var d=(this.blockSize-D)%this.blockSize;if(d>0)d=this.blockSize-d;this._partialOutput.clear();for(var h=0;h<this._ints;++h)this._partialOutput.putInt32(l.getInt32()^this._outBlock[h]);if(d<=0||a){if(a){var F=D%this.blockSize;this._cipherLength+=F,this._partialOutput.truncate(this.blockSize-F)}else this._cipherLength+=this.blockSize;for(var h=0;h<this._ints;++h)this._outBlock[h]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0)this._partialOutput.getBytes(this._partialBytes);if(d>0&&!a)return l.read-=this.blockSize,o.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=d,!0;o.putBytes(this._partialOutput.getBytes(D-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),n(this._inBlock)},r.gcm.prototype.decrypt=function(l,o,a){var D=l.length();if(D<this.blockSize&&!(a&&D>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),n(this._inBlock),this._hashBlock[0]=l.getInt32(),this._hashBlock[1]=l.getInt32(),this._hashBlock[2]=l.getInt32(),this._hashBlock[3]=l.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var h=0;h<this._ints;++h)o.putInt32(this._outBlock[h]^this._hashBlock[h]);if(D<this.blockSize)this._cipherLength+=D%this.blockSize;else this._cipherLength+=this.blockSize},r.gcm.prototype.afterFinish=function(l,o){var a=!0;if(o.decrypt&&o.overflow)l.truncate(this.blockSize-o.overflow);this.tag=t.util.createBuffer();var D=this._aDataLength.concat(i(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,D);var h=[];this.cipher.encrypt(this._j0,h);for(var d=0;d<this._ints;++d)this.tag.putInt32(this._s[d]^h[d]);if(this.tag.truncate(this.tag.length()%(this._tagLength/8)),o.decrypt&&this.tag.bytes()!==this._tag)a=!1;return a},r.gcm.prototype.multiply=function(l,o){var a=[0,0,0,0],D=o.slice(0);for(var h=0;h<128;++h){var d=l[h/32|0]&1<<31-h%32;if(d)a[0]^=D[0],a[1]^=D[1],a[2]^=D[2],a[3]^=D[3];this.pow(D,D)}return a},r.gcm.prototype.pow=function(l,o){var a=l[3]&1;for(var D=3;D>0;--D)o[D]=l[D]>>>1|(l[D-1]&1)<<31;if(o[0]=l[0]>>>1,a)o[0]^=this._R},r.gcm.prototype.tableMultiply=function(l){var o=[0,0,0,0];for(var a=0;a<32;++a){var D=a/8|0,h=l[D]>>>(7-a%8)*4&15,d=this._m[a][h];o[0]^=d[0],o[1]^=d[1],o[2]^=d[2],o[3]^=d[3]}return o},r.gcm.prototype.ghash=function(l,o,a){return o[0]^=a[0],o[1]^=a[1],o[2]^=a[2],o[3]^=a[3],this.tableMultiply(o)},r.gcm.prototype.generateHashTable=function(l,o){var a=8/o,D=4*a,h=16*a,d=new Array(h);for(var F=0;F<h;++F){var p=[0,0,0,0],f=F/D|0,m=(D-1-F%D)*o;p[f]=1<<o-1<<m,d[F]=this.generateSubHashTable(this.multiply(p,l),o)}return d},r.gcm.prototype.generateSubHashTable=function(l,o){var a=1<<o,D=a>>>1,h=new Array(a);h[D]=l.slice(0);var d=D>>>1;while(d>0)this.pow(h[2*d],h[d]=[]),d>>=1;d=2;while(d<D){for(var F=1;F<d;++F){var p=h[d],f=h[F];h[d+F]=[p[0]^f[0],p[1]^f[1],p[2]^f[2],p[3]^f[3]]}d*=2}h[0]=[0,0,0,0];for(d=D+1;d<a;++d){var m=h[d^D];h[d]=[l[0]^m[0],l[1]^m[1],l[2]^m[2],l[3]^m[3]]}return h};function s(l,o){if(typeof l==="string")l=t.util.createBuffer(l);if(t.util.isArray(l)&&l.length>4){var a=l;l=t.util.createBuffer();for(var D=0;D<a.length;++D)l.putByte(a[D])}if(l.length()<o)throw new Error("Invalid IV length; got "+l.length()+" bytes and expected "+o+" bytes.");if(!t.util.isArray(l)){var h=[],d=o/4;for(var D=0;D<d;++D)h.push(l.getInt32());l=h}return l}function n(l){l[l.length-1]=l[l.length-1]+1&4294967295}function i(l){return[l/4294967296|0,l&4294967295]}}),Hr=$e((e,u)=>{var t=Ue();b0(),Rf(),Ke(),u.exports=t.aes=t.aes||{},t.aes.startEncrypting=function(f,m,B,C){var c=p({key:f,output:B,decrypt:!1,mode:C});return c.start(m),c},t.aes.createEncryptionCipher=function(f,m){return p({key:f,output:null,decrypt:!1,mode:m})},t.aes.startDecrypting=function(f,m,B,C){var c=p({key:f,output:B,decrypt:!0,mode:C});return c.start(m),c},t.aes.createDecryptionCipher=function(f,m){return p({key:f,output:null,decrypt:!0,mode:m})},t.aes.Algorithm=function(f,m){if(!s)h();var B=this;B.name=f,B.mode=new m({blockSize:16,cipher:{encrypt:function(C,c){return F(B._w,C,c,!1)},decrypt:function(C,c){return F(B._w,C,c,!0)}}}),B._init=!1},t.aes.Algorithm.prototype.initialize=function(f){if(this._init)return;var m=f.key,B;if(typeof m==="string"&&(m.length===16||m.length===24||m.length===32))m=t.util.createBuffer(m);else if(t.util.isArray(m)&&(m.length===16||m.length===24||m.length===32)){B=m,m=t.util.createBuffer();for(var C=0;C<B.length;++C)m.putByte(B[C])}if(!t.util.isArray(m)){B=m,m=[];var c=B.length();if(c===16||c===24||c===32){c=c>>>2;for(var C=0;C<c;++C)m.push(B.getInt32())}}if(!t.util.isArray(m)||!(m.length===4||m.length===6||m.length===8))throw new Error("Invalid key parameter.");var y=this.mode.name,A=["CFB","OFB","CTR","GCM"].indexOf(y)!==-1;this._w=d(m,f.decrypt&&!A),this._init=!0},t.aes._expandKey=function(f,m){if(!s)h();return d(f,m)},t.aes._updateBlock=F,r("AES-ECB",t.cipher.modes.ecb),r("AES-CBC",t.cipher.modes.cbc),r("AES-CFB",t.cipher.modes.cfb),r("AES-OFB",t.cipher.modes.ofb),r("AES-CTR",t.cipher.modes.ctr),r("AES-GCM",t.cipher.modes.gcm);function r(f,m){var B=function(){return new t.aes.Algorithm(f,m)};t.cipher.registerAlgorithm(f,B)}var s=!1,n=4,i,l,o,a,D;function h(){s=!0,o=[0,1,2,4,8,16,32,64,128,27,54];var f=new Array(256);for(var m=0;m<128;++m)f[m]=m<<1,f[m+128]=m+128<<1^283;i=new Array(256),l=new Array(256),a=new Array(4),D=new Array(4);for(var m=0;m<4;++m)a[m]=new Array(256),D[m]=new Array(256);var B=0,C=0,c,y,A,T,I,v,g;for(var m=0;m<256;++m){T=C^C<<1^C<<2^C<<3^C<<4,T=T>>8^T&255^99,i[B]=T,l[T]=B,I=f[T],c=f[B],y=f[c],A=f[y],v=I<<24^T<<16^T<<8^(T^I),g=(c^y^A)<<24^(B^A)<<16^(B^y^A)<<8^(B^c^A);for(var E=0;E<4;++E)a[E][B]=v,D[E][T]=g,v=v<<24|v>>>8,g=g<<24|g>>>8;if(B===0)B=C=1;else B=c^f[f[f[c^A]]],C^=f[f[C]]}}function d(f,m){var B=f.slice(0),C,c=1,y=B.length,A=y+6+1,T=n*A;for(var I=y;I<T;++I){if(C=B[I-1],I%y===0)C=i[C>>>16&255]<<24^i[C>>>8&255]<<16^i[C&255]<<8^i[C>>>24]^o[c]<<24,c++;else if(y>6&&I%y===4)C=i[C>>>24]<<24^i[C>>>16&255]<<16^i[C>>>8&255]<<8^i[C&255];B[I]=B[I-y]^C}if(m){var v,g=D[0],E=D[1],S=D[2],_=D[3],K=B.slice(0);T=B.length;for(var I=0,N=T-n;I<T;I+=n,N-=n)if(I===0||I===T-n)K[I]=B[N],K[I+1]=B[N+3],K[I+2]=B[N+2],K[I+3]=B[N+1];else for(var $=0;$<n;++$)v=B[N+$],K[I+(3&-$)]=g[i[v>>>24]]^E[i[v>>>16&255]]^S[i[v>>>8&255]]^_[i[v&255]];B=K}return B}function F(f,m,B,C){var c=f.length/4-1,y,A,T,I,v;if(C)y=D[0],A=D[1],T=D[2],I=D[3],v=l;else y=a[0],A=a[1],T=a[2],I=a[3],v=i;var g,E,S,_,K,N,$;g=m[0]^f[0],E=m[C?3:1]^f[1],S=m[2]^f[2],_=m[C?1:3]^f[3];var P=3;for(var V=1;V<c;++V)K=y[g>>>24]^A[E>>>16&255]^T[S>>>8&255]^I[_&255]^f[++P],N=y[E>>>24]^A[S>>>16&255]^T[_>>>8&255]^I[g&255]^f[++P],$=y[S>>>24]^A[_>>>16&255]^T[g>>>8&255]^I[E&255]^f[++P],_=y[_>>>24]^A[g>>>16&255]^T[E>>>8&255]^I[S&255]^f[++P],g=K,E=N,S=$;B[0]=v[g>>>24]<<24^v[E>>>16&255]<<16^v[S>>>8&255]<<8^v[_&255]^f[++P],B[C?3:1]=v[E>>>24]<<24^v[S>>>16&255]<<16^v[_>>>8&255]<<8^v[g&255]^f[++P],B[2]=v[S>>>24]<<24^v[_>>>16&255]<<16^v[g>>>8&255]<<8^v[E&255]^f[++P],B[C?1:3]=v[_>>>24]<<24^v[g>>>16&255]<<16^v[E>>>8&255]<<8^v[S&255]^f[++P]}function p(f){f=f||{};var m=(f.mode||"CBC").toUpperCase(),B="AES-"+m,C;if(f.decrypt)C=t.cipher.createDecipher(B,f.key);else C=t.cipher.createCipher(B,f.key);var c=C.start;return C.start=function(y,A){var T=null;if(A instanceof t.util.ByteBuffer)T=A,A={};A=A||{},A.output=T,A.iv=y,c.call(C,A)},C}}),Qr=$e((e,u)=>{var t=Ue();t.pki=t.pki||{};var r=u.exports=t.pki.oids=t.oids=t.oids||{};function s(i,l){r[i]=l,r[l]=i}function n(i,l){r[i]=l}s("1.2.840.113549.1.1.1","rsaEncryption"),s("1.2.840.113549.1.1.4","md5WithRSAEncryption"),s("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),s("1.2.840.113549.1.1.7","RSAES-OAEP"),s("1.2.840.113549.1.1.8","mgf1"),s("1.2.840.113549.1.1.9","pSpecified"),s("1.2.840.113549.1.1.10","RSASSA-PSS"),s("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),s("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),s("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),s("1.3.101.112","EdDSA25519"),s("1.2.840.10040.4.3","dsa-with-sha1"),s("1.3.14.3.2.7","desCBC"),s("1.3.14.3.2.26","sha1"),s("1.3.14.3.2.29","sha1WithRSASignature"),s("2.16.840.1.101.3.4.2.1","sha256"),s("2.16.840.1.101.3.4.2.2","sha384"),s("2.16.840.1.101.3.4.2.3","sha512"),s("2.16.840.1.101.3.4.2.4","sha224"),s("2.16.840.1.101.3.4.2.5","sha512-224"),s("2.16.840.1.101.3.4.2.6","sha512-256"),s("1.2.840.113549.2.2","md2"),s("1.2.840.113549.2.5","md5"),s("1.2.840.113549.1.7.1","data"),s("1.2.840.113549.1.7.2","signedData"),s("1.2.840.113549.1.7.3","envelopedData"),s("1.2.840.113549.1.7.4","signedAndEnvelopedData"),s("1.2.840.113549.1.7.5","digestedData"),s("1.2.840.113549.1.7.6","encryptedData"),s("1.2.840.113549.1.9.1","emailAddress"),s("1.2.840.113549.1.9.2","unstructuredName"),s("1.2.840.113549.1.9.3","contentType"),s("1.2.840.113549.1.9.4","messageDigest"),s("1.2.840.113549.1.9.5","signingTime"),s("1.2.840.113549.1.9.6","counterSignature"),s("1.2.840.113549.1.9.7","challengePassword"),s("1.2.840.113549.1.9.8","unstructuredAddress"),s("1.2.840.113549.1.9.14","extensionRequest"),s("1.2.840.113549.1.9.20","friendlyName"),s("1.2.840.113549.1.9.21","localKeyId"),s("1.2.840.113549.1.9.22.1","x509Certificate"),s("1.2.840.113549.1.12.10.1.1","keyBag"),s("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),s("1.2.840.113549.1.12.10.1.3","certBag"),s("1.2.840.113549.1.12.10.1.4","crlBag"),s("1.2.840.113549.1.12.10.1.5","secretBag"),s("1.2.840.113549.1.12.10.1.6","safeContentsBag"),s("1.2.840.113549.1.5.13","pkcs5PBES2"),s("1.2.840.113549.1.5.12","pkcs5PBKDF2"),s("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),s("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),s("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),s("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),s("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),s("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),s("1.2.840.113549.2.7","hmacWithSHA1"),s("1.2.840.113549.2.8","hmacWithSHA224"),s("1.2.840.113549.2.9","hmacWithSHA256"),s("1.2.840.113549.2.10","hmacWithSHA384"),s("1.2.840.113549.2.11","hmacWithSHA512"),s("1.2.840.113549.3.7","des-EDE3-CBC"),s("2.16.840.1.101.3.4.1.2","aes128-CBC"),s("2.16.840.1.101.3.4.1.22","aes192-CBC"),s("2.16.840.1.101.3.4.1.42","aes256-CBC"),s("2.5.4.3","commonName"),s("2.5.4.4","surname"),s("2.5.4.5","serialNumber"),s("2.5.4.6","countryName"),s("2.5.4.7","localityName"),s("2.5.4.8","stateOrProvinceName"),s("2.5.4.9","streetAddress"),s("2.5.4.10","organizationName"),s("2.5.4.11","organizationalUnitName"),s("2.5.4.12","title"),s("2.5.4.13","description"),s("2.5.4.15","businessCategory"),s("2.5.4.17","postalCode"),s("2.5.4.42","givenName"),s("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),s("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),s("2.16.840.1.113730.1.1","nsCertType"),s("2.16.840.1.113730.1.13","nsComment"),n("2.5.29.1","authorityKeyIdentifier"),n("2.5.29.2","keyAttributes"),n("2.5.29.3","certificatePolicies"),n("2.5.29.4","keyUsageRestriction"),n("2.5.29.5","policyMapping"),n("2.5.29.6","subtreesConstraint"),n("2.5.29.7","subjectAltName"),n("2.5.29.8","issuerAltName"),n("2.5.29.9","subjectDirectoryAttributes"),n("2.5.29.10","basicConstraints"),n("2.5.29.11","nameConstraints"),n("2.5.29.12","policyConstraints"),n("2.5.29.13","basicConstraints"),s("2.5.29.14","subjectKeyIdentifier"),s("2.5.29.15","keyUsage"),n("2.5.29.16","privateKeyUsagePeriod"),s("2.5.29.17","subjectAltName"),s("2.5.29.18","issuerAltName"),s("2.5.29.19","basicConstraints"),n("2.5.29.20","cRLNumber"),n("2.5.29.21","cRLReason"),n("2.5.29.22","expirationDate"),n("2.5.29.23","instructionCode"),n("2.5.29.24","invalidityDate"),n("2.5.29.25","cRLDistributionPoints"),n("2.5.29.26","issuingDistributionPoint"),n("2.5.29.27","deltaCRLIndicator"),n("2.5.29.28","issuingDistributionPoint"),n("2.5.29.29","certificateIssuer"),n("2.5.29.30","nameConstraints"),s("2.5.29.31","cRLDistributionPoints"),s("2.5.29.32","certificatePolicies"),n("2.5.29.33","policyMappings"),n("2.5.29.34","policyConstraints"),s("2.5.29.35","authorityKeyIdentifier"),n("2.5.29.36","policyConstraints"),s("2.5.29.37","extKeyUsage"),n("2.5.29.46","freshestCRL"),n("2.5.29.54","inhibitAnyPolicy"),s("1.3.6.1.4.1.11129.2.4.2","timestampList"),s("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),s("1.3.6.1.5.5.7.3.1","serverAuth"),s("1.3.6.1.5.5.7.3.2","clientAuth"),s("1.3.6.1.5.5.7.3.3","codeSigning"),s("1.3.6.1.5.5.7.3.4","emailProtection"),s("1.3.6.1.5.5.7.3.8","timeStamping")}),Wu=$e((e,u)=>{var t=Ue();Ke(),Qr();var r=u.exports=t.asn1=t.asn1||{};r.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},r.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},r.create=function(o,a,D,h,d){if(t.util.isArray(h)){var F=[];for(var p=0;p<h.length;++p)if(h[p]!==void 0)F.push(h[p]);h=F}var f={tagClass:o,type:a,constructed:D,composed:D||t.util.isArray(h),value:h};if(d&&"bitStringContents"in d)f.bitStringContents=d.bitStringContents,f.original=r.copy(f);return f},r.copy=function(o,a){var D;if(t.util.isArray(o)){D=[];for(var h=0;h<o.length;++h)D.push(r.copy(o[h],a));return D}if(typeof o==="string")return o;if(D={tagClass:o.tagClass,type:o.type,constructed:o.constructed,composed:o.composed,value:r.copy(o.value,a)},a&&!a.excludeBitStringContents)D.bitStringContents=o.bitStringContents;return D},r.equals=function(o,a,D){if(t.util.isArray(o)){if(!t.util.isArray(a))return!1;if(o.length!==a.length)return!1;for(var h=0;h<o.length;++h)if(!r.equals(o[h],a[h]))return!1;return!0}if(typeof o!==typeof a)return!1;if(typeof o==="string")return o===a;var d=o.tagClass===a.tagClass&&o.type===a.type&&o.constructed===a.constructed&&o.composed===a.composed&&r.equals(o.value,a.value);if(D&&D.includeBitStringContents)d=d&&o.bitStringContents===a.bitStringContents;return d},r.getBerValueLength=function(o){var a=o.getByte();if(a===128)return;var D,h=a&128;if(!h)D=a;else D=o.getInt((a&127)<<3);return D};function s(o,a,D){if(D>a){var h=new Error("Too few bytes to parse DER.");throw h.available=o.length(),h.remaining=a,h.requested=D,h}}var n=function(o,a){var D=o.getByte();if(a--,D===128)return;var h,d=D&128;if(!d)h=D;else{var F=D&127;s(o,a,F),h=o.getInt(F<<3)}if(h<0)throw new Error("Negative length: "+h);return h};r.fromDer=function(o,a){if(a===void 0)a={strict:!0,parseAllBytes:!0,decodeBitStrings:!0};if(typeof a==="boolean")a={strict:a,parseAllBytes:!0,decodeBitStrings:!0};if(!("strict"in a))a.strict=!0;if(!("parseAllBytes"in a))a.parseAllBytes=!0;if(!("decodeBitStrings"in a))a.decodeBitStrings=!0;if(typeof o==="string")o=t.util.createBuffer(o);var D=o.length(),h=i(o,o.length(),0,a);if(a.parseAllBytes&&o.length()!==0){var d=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw d.byteCount=D,d.remaining=o.length(),d}return h};function i(o,a,D,h){var d;s(o,a,2);var F=o.getByte();a--;var p=F&192,f=F&31;d=o.length();var m=n(o,a);if(a-=d-o.length(),m!==void 0&&m>a){if(h.strict){var B=new Error("Too few bytes to read ASN.1 value.");throw B.available=o.length(),B.remaining=a,B.requested=m,B}m=a}var C,c,y=(F&32)===32;if(y)if(C=[],m===void 0)for(;;){if(s(o,a,2),o.bytes(2)===String.fromCharCode(0,0)){o.getBytes(2),a-=2;break}d=o.length(),C.push(i(o,a,D+1,h)),a-=d-o.length()}else while(m>0)d=o.length(),C.push(i(o,m,D+1,h)),a-=d-o.length(),m-=d-o.length();if(C===void 0&&p===r.Class.UNIVERSAL&&f===r.Type.BITSTRING)c=o.bytes(m);if(C===void 0&&h.decodeBitStrings&&p===r.Class.UNIVERSAL&&f===r.Type.BITSTRING&&m>1){var A=o.read,T=a,I=0;if(f===r.Type.BITSTRING)s(o,a,1),I=o.getByte(),a--;if(I===0)try{d=o.length();var v={strict:!0,decodeBitStrings:!0},g=i(o,a,D+1,v),E=d-o.length();if(a-=E,f==r.Type.BITSTRING)E++;var S=g.tagClass;if(E===m&&(S===r.Class.UNIVERSAL||S===r.Class.CONTEXT_SPECIFIC))C=[g]}catch(K){}if(C===void 0)o.read=A,a=T}if(C===void 0){if(m===void 0){if(h.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");m=a}if(f===r.Type.BMPSTRING){C="";for(;m>0;m-=2)s(o,a,2),C+=String.fromCharCode(o.getInt16()),a-=2}else C=o.getBytes(m),a-=m}var _=c===void 0?null:{bitStringContents:c};return r.create(p,f,y,C,_)}r.toDer=function(o){var a=t.util.createBuffer(),D=o.tagClass|o.type,h=t.util.createBuffer(),d=!1;if("bitStringContents"in o){if(d=!0,o.original)d=r.equals(o,o.original)}if(d)h.putBytes(o.bitStringContents);else if(o.composed){if(o.constructed)D|=32;else h.putByte(0);for(var F=0;F<o.value.length;++F)if(o.value[F]!==void 0)h.putBuffer(r.toDer(o.value[F]))}else if(o.type===r.Type.BMPSTRING)for(var F=0;F<o.value.length;++F)h.putInt16(o.value.charCodeAt(F));else if(o.type===r.Type.INTEGER&&o.value.length>1&&(o.value.charCodeAt(0)===0&&(o.value.charCodeAt(1)&128)===0||o.value.charCodeAt(0)===255&&(o.value.charCodeAt(1)&128)===128))h.putBytes(o.value.substr(1));else h.putBytes(o.value);if(a.putByte(D),h.length()<=127)a.putByte(h.length()&127);else{var p=h.length(),f="";do f+=String.fromCharCode(p&255),p=p>>>8;while(p>0);a.putByte(f.length|128);for(var F=f.length-1;F>=0;--F)a.putByte(f.charCodeAt(F))}return a.putBuffer(h),a},r.oidToDer=function(o){var a=o.split("."),D=t.util.createBuffer();D.putByte(40*parseInt(a[0],10)+parseInt(a[1],10));var h,d,F,p;for(var f=2;f<a.length;++f){h=!0,d=[],F=parseInt(a[f],10);do{if(p=F&127,F=F>>>7,!h)p|=128;d.push(p),h=!1}while(F>0);for(var m=d.length-1;m>=0;--m)D.putByte(d[m])}return D},r.derToOid=function(o){var a;if(typeof o==="string")o=t.util.createBuffer(o);var D=o.getByte();a=Math.floor(D/40)+"."+D%40;var h=0;while(o.length()>0)if(D=o.getByte(),h=h<<7,D&128)h+=D&127;else a+="."+(h+D),h=0;return a},r.utcTimeToDate=function(o){var a=new Date,D=parseInt(o.substr(0,2),10);D=D>=50?1900+D:2000+D;var h=parseInt(o.substr(2,2),10)-1,d=parseInt(o.substr(4,2),10),F=parseInt(o.substr(6,2),10),p=parseInt(o.substr(8,2),10),f=0;if(o.length>11){var m=o.charAt(10),B=10;if(m!=="+"&&m!=="-")f=parseInt(o.substr(10,2),10),B+=2}if(a.setUTCFullYear(D,h,d),a.setUTCHours(F,p,f,0),B){if(m=o.charAt(B),m==="+"||m==="-"){var C=parseInt(o.substr(B+1,2),10),c=parseInt(o.substr(B+4,2),10),y=C*60+c;if(y*=60000,m==="+")a.setTime(+a-y);else a.setTime(+a+y)}}return a},r.generalizedTimeToDate=function(o){var a=new Date,D=parseInt(o.substr(0,4),10),h=parseInt(o.substr(4,2),10)-1,d=parseInt(o.substr(6,2),10),F=parseInt(o.substr(8,2),10),p=parseInt(o.substr(10,2),10),f=parseInt(o.substr(12,2),10),m=0,B=0,C=!1;if(o.charAt(o.length-1)==="Z")C=!0;var c=o.length-5,y=o.charAt(c);if(y==="+"||y==="-"){var A=parseInt(o.substr(c+1,2),10),T=parseInt(o.substr(c+4,2),10);if(B=A*60+T,B*=60000,y==="+")B*=-1;C=!0}if(o.charAt(14)===".")m=parseFloat(o.substr(14),10)*1000;if(C)a.setUTCFullYear(D,h,d),a.setUTCHours(F,p,f,m),a.setTime(+a+B);else a.setFullYear(D,h,d),a.setHours(F,p,f,m);return a},r.dateToUtcTime=function(o){if(typeof o==="string")return o;var a="",D=[];D.push((""+o.getUTCFullYear()).substr(2)),D.push(""+(o.getUTCMonth()+1)),D.push(""+o.getUTCDate()),D.push(""+o.getUTCHours()),D.push(""+o.getUTCMinutes()),D.push(""+o.getUTCSeconds());for(var h=0;h<D.length;++h){if(D[h].length<2)a+="0";a+=D[h]}return a+="Z",a},r.dateToGeneralizedTime=function(o){if(typeof o==="string")return o;var a="",D=[];D.push(""+o.getUTCFullYear()),D.push(""+(o.getUTCMonth()+1)),D.push(""+o.getUTCDate()),D.push(""+o.getUTCHours()),D.push(""+o.getUTCMinutes()),D.push(""+o.getUTCSeconds());for(var h=0;h<D.length;++h){if(D[h].length<2)a+="0";a+=D[h]}return a+="Z",a},r.integerToDer=function(o){var a=t.util.createBuffer();if(o>=-128&&o<128)return a.putSignedInt(o,8);if(o>=-32768&&o<32768)return a.putSignedInt(o,16);if(o>=-8388608&&o<8388608)return a.putSignedInt(o,24);if(o>=-2147483648&&o<2147483648)return a.putSignedInt(o,32);var D=new Error("Integer too large; max is 32-bits.");throw D.integer=o,D},r.derToInteger=function(o){if(typeof o==="string")o=t.util.createBuffer(o);var a=o.length()*8;if(a>32)throw new Error("Integer too large; max is 32-bits.");return o.getSignedInt(a)},r.validate=function(o,a,D,h){var d=!1;if((o.tagClass===a.tagClass||typeof a.tagClass==="undefined")&&(o.type===a.type||typeof a.type==="undefined")){if(o.constructed===a.constructed||typeof a.constructed==="undefined"){if(d=!0,a.value&&t.util.isArray(a.value)){var F=0;for(var p=0;d&&p<a.value.length;++p){if(d=a.value[p].optional||!1,o.value[F]){if(d=r.validate(o.value[F],a.value[p],D,h),d)++F;else if(a.value[p].optional)d=!0}if(!d&&h)h.push("["+a.name+'] Tag class "'+a.tagClass+'", type "'+a.type+'" expected value length "'+a.value.length+'", got "'+o.value.length+'"')}}if(d&&D){if(a.capture)D[a.capture]=o.value;if(a.captureAsn1)D[a.captureAsn1]=o;if(a.captureBitStringContents&&"bitStringContents"in o)D[a.captureBitStringContents]=o.bitStringContents;if(a.captureBitStringValue&&"bitStringContents"in o){var f;if(o.bitStringContents.length<2)D[a.captureBitStringValue]="";else{var m=o.bitStringContents.charCodeAt(0);if(m!==0)throw new Error("captureBitStringValue only supported for zero unused bits");D[a.captureBitStringValue]=o.bitStringContents.slice(1)}}}}else if(h)h.push("["+a.name+'] Expected constructed "'+a.constructed+'", got "'+o.constructed+'"')}else if(h){if(o.tagClass!==a.tagClass)h.push("["+a.name+'] Expected tag class "'+a.tagClass+'", got "'+o.tagClass+'"');if(o.type!==a.type)h.push("["+a.name+'] Expected type "'+a.type+'", got "'+o.type+'"')}return d};var l=/[^\\u0000-\\u00ff]/;r.prettyPrint=function(o,a,D){var h="";if(a=a||0,D=D||2,a>0)h+=`
|
|
327
|
-
`;var d="";for(var F=0;F<a*D;++F)d+=" ";switch(h+=d+"Tag: ",o.tagClass){case r.Class.UNIVERSAL:h+="Universal:";break;case r.Class.APPLICATION:h+="Application:";break;case r.Class.CONTEXT_SPECIFIC:h+="Context-Specific:";break;case r.Class.PRIVATE:h+="Private:";break}if(o.tagClass===r.Class.UNIVERSAL)switch(h+=o.type,o.type){case r.Type.NONE:h+=" (None)";break;case r.Type.BOOLEAN:h+=" (Boolean)";break;case r.Type.INTEGER:h+=" (Integer)";break;case r.Type.BITSTRING:h+=" (Bit string)";break;case r.Type.OCTETSTRING:h+=" (Octet string)";break;case r.Type.NULL:h+=" (Null)";break;case r.Type.OID:h+=" (Object Identifier)";break;case r.Type.ODESC:h+=" (Object Descriptor)";break;case r.Type.EXTERNAL:h+=" (External or Instance of)";break;case r.Type.REAL:h+=" (Real)";break;case r.Type.ENUMERATED:h+=" (Enumerated)";break;case r.Type.EMBEDDED:h+=" (Embedded PDV)";break;case r.Type.UTF8:h+=" (UTF8)";break;case r.Type.ROID:h+=" (Relative Object Identifier)";break;case r.Type.SEQUENCE:h+=" (Sequence)";break;case r.Type.SET:h+=" (Set)";break;case r.Type.PRINTABLESTRING:h+=" (Printable String)";break;case r.Type.IA5String:h+=" (IA5String (ASCII))";break;case r.Type.UTCTIME:h+=" (UTC time)";break;case r.Type.GENERALIZEDTIME:h+=" (Generalized time)";break;case r.Type.BMPSTRING:h+=" (BMP String)";break}else h+=o.type;if(h+=`
|
|
328
|
-
`,h+=d+"Constructed: "+o.constructed+`
|
|
329
|
-
`,o.composed){var p=0,f="";for(var F=0;F<o.value.length;++F)if(o.value[F]!==void 0){if(p+=1,f+=r.prettyPrint(o.value[F],a+1,D),F+1<o.value.length)f+=","}h+=d+"Sub values: "+p+f}else{if(h+=d+"Value: ",o.type===r.Type.OID){var m=r.derToOid(o.value);if(h+=m,t.pki&&t.pki.oids){if(m in t.pki.oids)h+=" ("+t.pki.oids[m]+") "}}if(o.type===r.Type.INTEGER)try{h+=r.derToInteger(o.value)}catch(C){h+="0x"+t.util.bytesToHex(o.value)}else if(o.type===r.Type.BITSTRING){if(o.value.length>1)h+="0x"+t.util.bytesToHex(o.value.slice(1));else h+="(none)";if(o.value.length>0){var B=o.value.charCodeAt(0);if(B==1)h+=" (1 unused bit shown)";else if(B>1)h+=" ("+B+" unused bits shown)"}}else if(o.type===r.Type.OCTETSTRING){if(!l.test(o.value))h+="("+o.value+") ";h+="0x"+t.util.bytesToHex(o.value)}else if(o.type===r.Type.UTF8)try{h+=t.util.decodeUtf8(o.value)}catch(C){if(C.message==="URI malformed")h+="0x"+t.util.bytesToHex(o.value)+" (malformed UTF8)";else throw C}else if(o.type===r.Type.PRINTABLESTRING||o.type===r.Type.IA5String)h+=o.value;else if(l.test(o.value))h+="0x"+t.util.bytesToHex(o.value);else if(o.value.length===0)h+="[null]";else h+=o.value}return h}}),or=$e((e,u)=>{var t=Ue();u.exports=t.md=t.md||{},t.md.algorithms=t.md.algorithms||{}}),ss=$e((e,u)=>{var t=Ue();or(),Ke();var r=u.exports=t.hmac=t.hmac||{};r.create=function(){var s=null,n=null,i=null,l=null,o={};return o.start=function(a,D){if(a!==null)if(typeof a==="string")if(a=a.toLowerCase(),a in t.md.algorithms)n=t.md.algorithms[a].create();else throw new Error('Unknown hash algorithm "'+a+'"');else n=a;if(D===null)D=s;else{if(typeof D==="string")D=t.util.createBuffer(D);else if(t.util.isArray(D)){var h=D;D=t.util.createBuffer();for(var d=0;d<h.length;++d)D.putByte(h[d])}var F=D.length();if(F>n.blockLength)n.start(),n.update(D.bytes()),D=n.digest();i=t.util.createBuffer(),l=t.util.createBuffer(),F=D.length();for(var d=0;d<F;++d){var h=D.at(d);i.putByte(54^h),l.putByte(92^h)}if(F<n.blockLength){var h=n.blockLength-F;for(var d=0;d<h;++d)i.putByte(54),l.putByte(92)}s=D,i=i.bytes(),l=l.bytes()}n.start(),n.update(i)},o.update=function(a){n.update(a)},o.getMac=function(){var a=n.digest().bytes();return n.start(),n.update(l),n.update(a),n.digest()},o.digest=o.getMac,o}}),S0=$e((e,u)=>{var t=Ue();or(),Ke();var r=u.exports=t.md5=t.md5||{};t.md.md5=t.md.algorithms.md5=r,r.create=function(){if(!o)a();var h=null,d=t.util.createBuffer(),F=new Array(16),p={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return p.start=function(){p.messageLength=0,p.fullMessageLength=p.messageLength64=[];var f=p.messageLengthSize/4;for(var m=0;m<f;++m)p.fullMessageLength.push(0);return d=t.util.createBuffer(),h={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},p},p.start(),p.update=function(f,m){if(m==="utf8")f=t.util.encodeUtf8(f);var B=f.length;p.messageLength+=B,B=[B/4294967296>>>0,B>>>0];for(var C=p.fullMessageLength.length-1;C>=0;--C)p.fullMessageLength[C]+=B[1],B[1]=B[0]+(p.fullMessageLength[C]/4294967296>>>0),p.fullMessageLength[C]=p.fullMessageLength[C]>>>0,B[0]=B[1]/4294967296>>>0;if(d.putBytes(f),D(h,F,d),d.read>2048||d.length()===0)d.compact();return p},p.digest=function(){var f=t.util.createBuffer();f.putBytes(d.bytes());var m=p.fullMessageLength[p.fullMessageLength.length-1]+p.messageLengthSize,B=m&p.blockLength-1;f.putBytes(s.substr(0,p.blockLength-B));var C,c=0;for(var y=p.fullMessageLength.length-1;y>=0;--y)C=p.fullMessageLength[y]*8+c,c=C/4294967296>>>0,f.putInt32Le(C>>>0);var A={h0:h.h0,h1:h.h1,h2:h.h2,h3:h.h3};D(A,F,f);var T=t.util.createBuffer();return T.putInt32Le(A.h0),T.putInt32Le(A.h1),T.putInt32Le(A.h2),T.putInt32Le(A.h3),T},p};var s=null,n=null,i=null,l=null,o=!1;function a(){s=String.fromCharCode(128),s+=t.util.fillString(String.fromCharCode(0),64),n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],i=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],l=new Array(64);for(var h=0;h<64;++h)l[h]=Math.floor(Math.abs(Math.sin(h+1))*4294967296);o=!0}function D(h,d,F){var p,f,m,B,C,c,y,A,T=F.length();while(T>=64){f=h.h0,m=h.h1,B=h.h2,C=h.h3;for(A=0;A<16;++A)d[A]=F.getInt32Le(),c=C^m&(B^C),p=f+c+l[A]+d[A],y=i[A],f=C,C=B,B=m,m+=p<<y|p>>>32-y;for(;A<32;++A)c=B^C&(m^B),p=f+c+l[A]+d[n[A]],y=i[A],f=C,C=B,B=m,m+=p<<y|p>>>32-y;for(;A<48;++A)c=m^B^C,p=f+c+l[A]+d[n[A]],y=i[A],f=C,C=B,B=m,m+=p<<y|p>>>32-y;for(;A<64;++A)c=B^(m|~C),p=f+c+l[A]+d[n[A]],y=i[A],f=C,C=B,B=m,m+=p<<y|p>>>32-y;h.h0=h.h0+f|0,h.h1=h.h1+m|0,h.h2=h.h2+B|0,h.h3=h.h3+C|0,T-=64}}}),Si=$e((e,u)=>{var t=Ue();Ke();var r=u.exports=t.pem=t.pem||{};r.encode=function(i,l){l=l||{};var o="-----BEGIN "+i.type+`-----\r
|
|
330
|
-
`,a;if(i.procType)a={name:"Proc-Type",values:[String(i.procType.version),i.procType.type]},o+=s(a);if(i.contentDomain)a={name:"Content-Domain",values:[i.contentDomain]},o+=s(a);if(i.dekInfo){if(a={name:"DEK-Info",values:[i.dekInfo.algorithm]},i.dekInfo.parameters)a.values.push(i.dekInfo.parameters);o+=s(a)}if(i.headers)for(var D=0;D<i.headers.length;++D)o+=s(i.headers[D]);if(i.procType)o+=`\r
|
|
331
|
-
`;return o+=t.util.encode64(i.body,l.maxline||64)+`\r
|
|
332
|
-
`,o+="-----END "+i.type+`-----\r
|
|
333
|
-
`,o},r.decode=function(i){var l=[],o=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,a=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,D=/\r?\n/,h;while(!0){if(h=o.exec(i),!h)break;var d=h[1];if(d==="NEW CERTIFICATE REQUEST")d="CERTIFICATE REQUEST";var F={type:d,procType:null,contentDomain:null,dekInfo:null,headers:[],body:t.util.decode64(h[3])};if(l.push(F),!h[2])continue;var p=h[2].split(D),f=0;while(h&&f<p.length){var m=p[f].replace(/\s+$/,"");for(var B=f+1;B<p.length;++B){var C=p[B];if(!/\s/.test(C[0]))break;m+=C,f=B}if(h=m.match(a),h){var c={name:h[1],values:[]},y=h[2].split(",");for(var A=0;A<y.length;++A)c.values.push(n(y[A]));if(!F.procType){if(c.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');else if(c.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');F.procType={version:y[0],type:y[1]}}else if(!F.contentDomain&&c.name==="Content-Domain")F.contentDomain=y[0]||"";else if(!F.dekInfo&&c.name==="DEK-Info"){if(c.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');F.dekInfo={algorithm:y[0],parameters:y[1]||null}}else F.headers.push(c)}++f}if(F.procType==="ENCRYPTED"&&!F.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}if(l.length===0)throw new Error("Invalid PEM formatted message.");return l};function s(i){var l=i.name+": ",o=[],a=function(p,f){return" "+f};for(var D=0;D<i.values.length;++D)o.push(i.values[D].replace(/^(\S+\r\n)/,a));l+=o.join(",")+`\r
|
|
334
|
-
`;var h=0,d=-1;for(var D=0;D<l.length;++D,++h)if(h>65&&d!==-1){var F=l[d];if(F===",")++d,l=l.substr(0,d)+`\r
|
|
335
|
-
`+l.substr(d);else l=l.substr(0,d)+`\r
|
|
336
|
-
`+F+l.substr(d+1);h=D-d-1,d=-1,++D}else if(l[D]===" "||l[D]==="\t"||l[D]===",")d=D;return l}function n(i){return i.replace(/^\s+/,"")}}),bn=$e((e,u)=>{var t=Ue();b0(),Rf(),Ke(),u.exports=t.des=t.des||{},t.des.startEncrypting=function(f,m,B,C){var c=p({key:f,output:B,decrypt:!1,mode:C||(m===null?"ECB":"CBC")});return c.start(m),c},t.des.createEncryptionCipher=function(f,m){return p({key:f,output:null,decrypt:!1,mode:m})},t.des.startDecrypting=function(f,m,B,C){var c=p({key:f,output:B,decrypt:!0,mode:C||(m===null?"ECB":"CBC")});return c.start(m),c},t.des.createDecryptionCipher=function(f,m){return p({key:f,output:null,decrypt:!0,mode:m})},t.des.Algorithm=function(f,m){var B=this;B.name=f,B.mode=new m({blockSize:8,cipher:{encrypt:function(C,c){return F(B._keys,C,c,!1)},decrypt:function(C,c){return F(B._keys,C,c,!0)}}}),B._init=!1},t.des.Algorithm.prototype.initialize=function(f){if(this._init)return;var m=t.util.createBuffer(f.key);if(this.name.indexOf("3DES")===0){if(m.length()!==24)throw new Error("Invalid Triple-DES key size: "+m.length()*8)}this._keys=d(m),this._init=!0},r("DES-ECB",t.cipher.modes.ecb),r("DES-CBC",t.cipher.modes.cbc),r("DES-CFB",t.cipher.modes.cfb),r("DES-OFB",t.cipher.modes.ofb),r("DES-CTR",t.cipher.modes.ctr),r("3DES-ECB",t.cipher.modes.ecb),r("3DES-CBC",t.cipher.modes.cbc),r("3DES-CFB",t.cipher.modes.cfb),r("3DES-OFB",t.cipher.modes.ofb),r("3DES-CTR",t.cipher.modes.ctr);function r(f,m){var B=function(){return new t.des.Algorithm(f,m)};t.cipher.registerAlgorithm(f,B)}var s=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],i=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],l=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],o=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],a=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],D=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function d(f){var m=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],B=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],C=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],c=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],y=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],A=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],T=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],I=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],v=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],g=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],E=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],S=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],_=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],N=f.length()>8?3:1,$=[],P=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],V=0,k;for(var W=0;W<N;W++){var Q=f.getInt32(),z=f.getInt32();k=(Q>>>4^z)&252645135,z^=k,Q^=k<<4,k=(z>>>-16^Q)&65535,Q^=k,z^=k<<-16,k=(Q>>>2^z)&858993459,z^=k,Q^=k<<2,k=(z>>>-16^Q)&65535,Q^=k,z^=k<<-16,k=(Q>>>1^z)&1431655765,z^=k,Q^=k<<1,k=(z>>>8^Q)&16711935,Q^=k,z^=k<<8,k=(Q>>>1^z)&1431655765,z^=k,Q^=k<<1,k=Q<<8|z>>>20&240,Q=z<<24|z<<8&16711680|z>>>8&65280|z>>>24&240,z=k;for(var x=0;x<P.length;++x){if(P[x])Q=Q<<2|Q>>>26,z=z<<2|z>>>26;else Q=Q<<1|Q>>>27,z=z<<1|z>>>27;Q&=-15,z&=-15;var ne=m[Q>>>28]|B[Q>>>24&15]|C[Q>>>20&15]|c[Q>>>16&15]|y[Q>>>12&15]|A[Q>>>8&15]|T[Q>>>4&15],Ee=I[z>>>28]|v[z>>>24&15]|g[z>>>20&15]|E[z>>>16&15]|S[z>>>12&15]|_[z>>>8&15]|K[z>>>4&15];k=(Ee>>>16^ne)&65535,$[V++]=ne^k,$[V++]=Ee^k<<16}}return $}function F(f,m,B,C){var c=f.length===32?3:9,y;if(c===3)y=C?[30,-2,-2]:[0,32,2];else y=C?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var A,T=m[0],I=m[1];A=(T>>>4^I)&252645135,I^=A,T^=A<<4,A=(T>>>16^I)&65535,I^=A,T^=A<<16,A=(I>>>2^T)&858993459,T^=A,I^=A<<2,A=(I>>>8^T)&16711935,T^=A,I^=A<<8,A=(T>>>1^I)&1431655765,I^=A,T^=A<<1,T=T<<1|T>>>31,I=I<<1|I>>>31;for(var v=0;v<c;v+=3){var g=y[v+1],E=y[v+2];for(var S=y[v];S!=g;S+=E){var _=I^f[S],K=(I>>>4|I<<28)^f[S+1];A=T,T=I,I=A^(n[_>>>24&63]|l[_>>>16&63]|a[_>>>8&63]|h[_&63]|s[K>>>24&63]|i[K>>>16&63]|o[K>>>8&63]|D[K&63])}A=T,T=I,I=A}T=T>>>1|T<<31,I=I>>>1|I<<31,A=(T>>>1^I)&1431655765,I^=A,T^=A<<1,A=(I>>>8^T)&16711935,T^=A,I^=A<<8,A=(I>>>2^T)&858993459,T^=A,I^=A<<2,A=(T>>>16^I)&65535,I^=A,T^=A<<16,A=(T>>>4^I)&252645135,I^=A,T^=A<<4,B[0]=T,B[1]=I}function p(f){f=f||{};var m=(f.mode||"CBC").toUpperCase(),B="DES-"+m,C;if(f.decrypt)C=t.cipher.createDecipher(B,f.key);else C=t.cipher.createCipher(B,f.key);var c=C.start;return C.start=function(y,A){var T=null;if(A instanceof t.util.ByteBuffer)T=A,A={};A=A||{},A.output=T,A.iv=y,c.call(C,A)},C}}),T0=$e((e,u)=>{var t=Ue();ss(),or(),Ke();var r=t.pkcs5=t.pkcs5||{},s;if(t.util.isNodejs&&!t.options.usePureJavaScript)s=import.meta.require("crypto");u.exports=t.pbkdf2=r.pbkdf2=function(n,i,l,o,a,D){if(typeof a==="function")D=a,a=null;if(t.util.isNodejs&&!t.options.usePureJavaScript&&s.pbkdf2&&(a===null||typeof a!=="object")&&(s.pbkdf2Sync.length>4||(!a||a==="sha1"))){if(typeof a!=="string")a="sha1";if(n=Buffer.from(n,"binary"),i=Buffer.from(i,"binary"),!D){if(s.pbkdf2Sync.length===4)return s.pbkdf2Sync(n,i,l,o).toString("binary");return s.pbkdf2Sync(n,i,l,o,a).toString("binary")}if(s.pbkdf2Sync.length===4)return s.pbkdf2(n,i,l,o,function(v,g){if(v)return D(v);D(null,g.toString("binary"))});return s.pbkdf2(n,i,l,o,a,function(v,g){if(v)return D(v);D(null,g.toString("binary"))})}if(typeof a==="undefined"||a===null)a="sha1";if(typeof a==="string"){if(!(a in t.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=t.md[a].create()}var h=a.digestLength;if(o>4294967295*h){var d=new Error("Derived key is too long.");if(D)return D(d);throw d}var F=Math.ceil(o/h),p=o-(F-1)*h,f=t.hmac.create();f.start(a,n);var m="",B,C,c;if(!D){for(var y=1;y<=F;++y){f.start(null,null),f.update(i),f.update(t.util.int32ToBytes(y)),B=c=f.digest().getBytes();for(var A=2;A<=l;++A)f.start(null,null),f.update(c),C=f.digest().getBytes(),B=t.util.xorBytes(B,C,h),c=C;m+=y<F?B:B.substr(0,p)}return m}var y=1,A;function T(){if(y>F)return D(null,m);f.start(null,null),f.update(i),f.update(t.util.int32ToBytes(y)),B=c=f.digest().getBytes(),A=2,I()}function I(){if(A<=l)return f.start(null,null),f.update(c),C=f.digest().getBytes(),B=t.util.xorBytes(B,C,h),c=C,++A,t.util.setImmediate(I);m+=y<F?B:B.substr(0,p),++y,T()}T()}}),Of=$e((e,u)=>{var t=Ue();or(),Ke();var r=u.exports=t.sha256=t.sha256||{};t.md.sha256=t.md.algorithms.sha256=r,r.create=function(){if(!n)l();var a=null,D=t.util.createBuffer(),h=new Array(64),d={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return d.start=function(){d.messageLength=0,d.fullMessageLength=d.messageLength64=[];var F=d.messageLengthSize/4;for(var p=0;p<F;++p)d.fullMessageLength.push(0);return D=t.util.createBuffer(),a={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},d},d.start(),d.update=function(F,p){if(p==="utf8")F=t.util.encodeUtf8(F);var f=F.length;d.messageLength+=f,f=[f/4294967296>>>0,f>>>0];for(var m=d.fullMessageLength.length-1;m>=0;--m)d.fullMessageLength[m]+=f[1],f[1]=f[0]+(d.fullMessageLength[m]/4294967296>>>0),d.fullMessageLength[m]=d.fullMessageLength[m]>>>0,f[0]=f[1]/4294967296>>>0;if(D.putBytes(F),o(a,h,D),D.read>2048||D.length()===0)D.compact();return d},d.digest=function(){var F=t.util.createBuffer();F.putBytes(D.bytes());var p=d.fullMessageLength[d.fullMessageLength.length-1]+d.messageLengthSize,f=p&d.blockLength-1;F.putBytes(s.substr(0,d.blockLength-f));var m,B,C=d.fullMessageLength[0]*8;for(var c=0;c<d.fullMessageLength.length-1;++c)m=d.fullMessageLength[c+1]*8,B=m/4294967296>>>0,C+=B,F.putInt32(C>>>0),C=m>>>0;F.putInt32(C);var y={h0:a.h0,h1:a.h1,h2:a.h2,h3:a.h3,h4:a.h4,h5:a.h5,h6:a.h6,h7:a.h7};o(y,h,F);var A=t.util.createBuffer();return A.putInt32(y.h0),A.putInt32(y.h1),A.putInt32(y.h2),A.putInt32(y.h3),A.putInt32(y.h4),A.putInt32(y.h5),A.putInt32(y.h6),A.putInt32(y.h7),A},d};var s=null,n=!1,i=null;function l(){s=String.fromCharCode(128),s+=t.util.fillString(String.fromCharCode(0),64),i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],n=!0}function o(a,D,h){var d,F,p,f,m,B,C,c,y,A,T,I,v,g,E,S=h.length();while(S>=64){for(C=0;C<16;++C)D[C]=h.getInt32();for(;C<64;++C)d=D[C-2],d=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,F=D[C-15],F=(F>>>7|F<<25)^(F>>>18|F<<14)^F>>>3,D[C]=d+D[C-7]+F+D[C-16]|0;c=a.h0,y=a.h1,A=a.h2,T=a.h3,I=a.h4,v=a.h5,g=a.h6,E=a.h7;for(C=0;C<64;++C)f=(I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25|I<<7),m=g^I&(v^g),p=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),B=c&y|A&(c^y),d=E+f+m+i[C]+D[C],F=p+B,E=g,g=v,v=I,I=T+d>>>0,T=A,A=y,y=c,c=d+F>>>0;a.h0=a.h0+c|0,a.h1=a.h1+y|0,a.h2=a.h2+A|0,a.h3=a.h3+T|0,a.h4=a.h4+I|0,a.h5=a.h5+v|0,a.h6=a.h6+g|0,a.h7=a.h7+E|0,S-=64}}}),Lf=$e((e,u)=>{var t=Ue();Ke();var r=null;if(t.util.isNodejs&&!t.options.usePureJavaScript&&!process.versions["node-webkit"])r=import.meta.require("crypto");var s=u.exports=t.prng=t.prng||{};s.create=function(n){var i={plugin:n,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},l=n.md,o=new Array(32);for(var a=0;a<32;++a)o[a]=l.create();i.pools=o,i.pool=0,i.generate=function(p,f){if(!f)return i.generateSync(p);var m=i.plugin.cipher,B=i.plugin.increment,C=i.plugin.formatKey,c=i.plugin.formatSeed,y=t.util.createBuffer();i.key=null,A();function A(T){if(T)return f(T);if(y.length()>=p)return f(null,y.getBytes(p));if(i.generated>1048575)i.key=null;if(i.key===null)return t.util.nextTick(function(){D(A)});var I=m(i.key,i.seed);i.generated+=I.length,y.putBytes(I),i.key=C(m(i.key,B(i.seed))),i.seed=c(m(i.key,i.seed)),t.util.setImmediate(A)}},i.generateSync=function(p){var f=i.plugin.cipher,m=i.plugin.increment,B=i.plugin.formatKey,C=i.plugin.formatSeed;i.key=null;var c=t.util.createBuffer();while(c.length()<p){if(i.generated>1048575)i.key=null;if(i.key===null)h();var y=f(i.key,i.seed);i.generated+=y.length,c.putBytes(y),i.key=B(f(i.key,m(i.seed))),i.seed=C(f(i.key,i.seed))}return c.getBytes(p)};function D(p){if(i.pools[0].messageLength>=32)return d(),p();var f=32-i.pools[0].messageLength<<5;i.seedFile(f,function(m,B){if(m)return p(m);i.collect(B),d(),p()})}function h(){if(i.pools[0].messageLength>=32)return d();var p=32-i.pools[0].messageLength<<5;i.collect(i.seedFileSync(p)),d()}function d(){i.reseeds=i.reseeds===4294967295?0:i.reseeds+1;var p=i.plugin.md.create();p.update(i.keyBytes);var f=1;for(var m=0;m<32;++m){if(i.reseeds%f===0)p.update(i.pools[m].digest().getBytes()),i.pools[m].start();f=f<<1}i.keyBytes=p.digest().getBytes(),p.start(),p.update(i.keyBytes);var B=p.digest().getBytes();i.key=i.plugin.formatKey(i.keyBytes),i.seed=i.plugin.formatSeed(B),i.generated=0}function F(p){var f=null,m=t.util.globalScope,B=m.crypto||m.msCrypto;if(B&&B.getRandomValues)f=function(E){return B.getRandomValues(E)};var C=t.util.createBuffer();if(f)while(C.length()<p){var c=Math.max(1,Math.min(p-C.length(),65536)/4),y=new Uint32Array(Math.floor(c));try{f(y);for(var A=0;A<y.length;++A)C.putInt32(y[A])}catch(E){if(!(typeof QuotaExceededError!=="undefined"&&E instanceof QuotaExceededError))throw E}}if(C.length()<p){var T,I,v,g=Math.floor(Math.random()*65536);while(C.length()<p){I=16807*(g&65535),T=16807*(g>>16),I+=(T&32767)<<16,I+=T>>15,I=(I&2147483647)+(I>>31),g=I&4294967295;for(var A=0;A<3;++A)v=g>>>(A<<3),v^=Math.floor(Math.random()*256),C.putByte(v&255)}}return C.getBytes(p)}if(r)i.seedFile=function(p,f){r.randomBytes(p,function(m,B){if(m)return f(m);f(null,B.toString())})},i.seedFileSync=function(p){return r.randomBytes(p).toString()};else i.seedFile=function(p,f){try{f(null,F(p))}catch(m){f(m)}},i.seedFileSync=F;return i.collect=function(p){var f=p.length;for(var m=0;m<f;++m)i.pools[i.pool].update(p.substr(m,1)),i.pool=i.pool===31?0:i.pool+1},i.collectInt=function(p,f){var m="";for(var B=0;B<f;B+=8)m+=String.fromCharCode(p>>B&255);i.collect(m)},i.registerWorker=function(p){if(p===self)i.seedFile=function(m,B){function C(c){var y=c.data;if(y.forge&&y.forge.prng)self.removeEventListener("message",C),B(y.forge.prng.err,y.forge.prng.bytes)}self.addEventListener("message",C),self.postMessage({forge:{prng:{needed:m}}})};else{var f=function(m){var B=m.data;if(B.forge&&B.forge.prng)i.seedFile(B.forge.prng.needed,function(C,c){p.postMessage({forge:{prng:{err:C,bytes:c}}})})};p.addEventListener("message",f)}},i}}),Nu=$e((e,u)=>{var t=Ue();Hr(),Of(),Lf(),Ke(),function(){if(t.random&&t.random.getBytes){u.exports=t.random;return}(function(r){var s={},n=new Array(4),i=t.util.createBuffer();s.formatKey=function(p){var f=t.util.createBuffer(p);return p=new Array(4),p[0]=f.getInt32(),p[1]=f.getInt32(),p[2]=f.getInt32(),p[3]=f.getInt32(),t.aes._expandKey(p,!1)},s.formatSeed=function(p){var f=t.util.createBuffer(p);return p=new Array(4),p[0]=f.getInt32(),p[1]=f.getInt32(),p[2]=f.getInt32(),p[3]=f.getInt32(),p},s.cipher=function(p,f){return t.aes._updateBlock(p,f,n,!1),i.putInt32(n[0]),i.putInt32(n[1]),i.putInt32(n[2]),i.putInt32(n[3]),i.getBytes()},s.increment=function(p){return++p[3],p},s.md=t.md.sha256;function l(){var p=t.prng.create(s);return p.getBytes=function(f,m){return p.generate(f,m)},p.getBytesSync=function(f){return p.generate(f)},p}var o=l(),a=null,D=t.util.globalScope,h=D.crypto||D.msCrypto;if(h&&h.getRandomValues)a=function(p){return h.getRandomValues(p)};if(t.options.usePureJavaScript||!t.util.isNodejs&&!a){if(typeof window==="undefined"||window.document===void 0);if(o.collectInt(+new Date,32),typeof navigator!=="undefined"){var d="";for(var F in navigator)try{if(typeof navigator[F]=="string")d+=navigator[F]}catch(p){}o.collect(d),d=null}if(r)r().mousemove(function(p){o.collectInt(p.clientX,16),o.collectInt(p.clientY,16)}),r().keypress(function(p){o.collectInt(p.charCode,8)})}if(!t.random)t.random=o;else for(var F in o)t.random[F]=o[F];t.random.createInstance=l,u.exports=t.random})(typeof jQuery!=="undefined"?jQuery:null)}()}),Uf=$e((e,u)=>{var t=Ue();Ke();var r=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],s=[1,2,3,5],n=function(o,a){return o<<a&65535|(o&65535)>>16-a},i=function(o,a){return(o&65535)>>a|o<<16-a&65535};u.exports=t.rc2=t.rc2||{},t.rc2.expandKey=function(o,a){if(typeof o==="string")o=t.util.createBuffer(o);a=a||128;var D=o,h=o.length(),d=a,F=Math.ceil(d/8),p=255>>(d&7),f;for(f=h;f<128;f++)D.putByte(r[D.at(f-1)+D.at(f-h)&255]);D.setAt(128-F,r[D.at(128-F)&p]);for(f=127-F;f>=0;f--)D.setAt(f,r[D.at(f+1)^D.at(f+F)]);return D};var l=function(o,a,D){var h=!1,d=null,F=null,p=null,f,m,B,C,c=[];o=t.rc2.expandKey(o,a);for(B=0;B<64;B++)c.push(o.getInt16Le());if(D)f=function(T){for(B=0;B<4;B++)T[B]+=c[C]+(T[(B+3)%4]&T[(B+2)%4])+(~T[(B+3)%4]&T[(B+1)%4]),T[B]=n(T[B],s[B]),C++},m=function(T){for(B=0;B<4;B++)T[B]+=c[T[(B+3)%4]&63]};else f=function(T){for(B=3;B>=0;B--)T[B]=i(T[B],s[B]),T[B]-=c[C]+(T[(B+3)%4]&T[(B+2)%4])+(~T[(B+3)%4]&T[(B+1)%4]),C--},m=function(T){for(B=3;B>=0;B--)T[B]-=c[T[(B+3)%4]&63]};var y=function(T){var I=[];for(B=0;B<4;B++){var v=d.getInt16Le();if(p!==null)if(D)v^=p.getInt16Le();else p.putInt16Le(v);I.push(v&65535)}C=D?0:63;for(var g=0;g<T.length;g++)for(var E=0;E<T[g][0];E++)T[g][1](I);for(B=0;B<4;B++){if(p!==null)if(D)p.putInt16Le(I[B]);else I[B]^=p.getInt16Le();F.putInt16Le(I[B])}},A=null;return A={start:function(T,I){if(T){if(typeof T==="string")T=t.util.createBuffer(T)}h=!1,d=t.util.createBuffer(),F=I||new t.util.createBuffer,p=T,A.output=F},update:function(T){if(!h)d.putBuffer(T);while(d.length()>=8)y([[5,f],[1,m],[6,f],[1,m],[5,f]])},finish:function(T){var I=!0;if(D)if(T)I=T(8,d,!D);else{var v=d.length()===8?8:8-d.length();d.fillWithByte(v,v)}if(I)h=!0,A.update();if(!D){if(I=d.length()===0,I)if(T)I=T(8,F,!D);else{var g=F.length(),E=F.at(g-1);if(E>g)I=!1;else F.truncate(E)}}return I}},A};t.rc2.startEncrypting=function(o,a,D){var h=t.rc2.createEncryptionCipher(o,128);return h.start(a,D),h},t.rc2.createEncryptionCipher=function(o,a){return l(o,a,!0)},t.rc2.startDecrypting=function(o,a,D){var h=t.rc2.createDecryptionCipher(o,128);return h.start(a,D),h},t.rc2.createDecryptionCipher=function(o,a){return l(o,a,!1)}}),Sn=$e((e,u)=>{var t=Ue();u.exports=t.jsbn=t.jsbn||{};var r,s=244837814094590,n=(s&16777215)==15715070;function i(R,U,G){if(this.data=[],R!=null)if(typeof R=="number")this.fromNumber(R,U,G);else if(U==null&&typeof R!="string")this.fromString(R,256);else this.fromString(R,U)}t.jsbn.BigInteger=i;function l(){return new i(null)}function o(R,U,G,Y,X,ee){while(--ee>=0){var pe=U*this.data[R++]+G.data[Y]+X;X=Math.floor(pe/67108864),G.data[Y++]=pe&67108863}return X}function a(R,U,G,Y,X,ee){var pe=U&32767,De=U>>15;while(--ee>=0){var Qe=this.data[R]&32767,Gt=this.data[R++]>>15,ou=De*Qe+Gt*pe;Qe=pe*Qe+((ou&32767)<<15)+G.data[Y]+(X&1073741823),X=(Qe>>>30)+(ou>>>15)+De*Gt+(X>>>30),G.data[Y++]=Qe&1073741823}return X}function D(R,U,G,Y,X,ee){var pe=U&16383,De=U>>14;while(--ee>=0){var Qe=this.data[R]&16383,Gt=this.data[R++]>>14,ou=De*Qe+Gt*pe;Qe=pe*Qe+((ou&16383)<<14)+G.data[Y]+X,X=(Qe>>28)+(ou>>14)+De*Gt,G.data[Y++]=Qe&268435455}return X}if(typeof navigator==="undefined")i.prototype.am=D,r=28;else if(n&&navigator.appName=="Microsoft Internet Explorer")i.prototype.am=a,r=30;else if(n&&navigator.appName!="Netscape")i.prototype.am=o,r=26;else i.prototype.am=D,r=28;i.prototype.DB=r,i.prototype.DM=(1<<r)-1,i.prototype.DV=1<<r;var h=52;i.prototype.FV=Math.pow(2,h),i.prototype.F1=h-r,i.prototype.F2=2*r-h;var d="0123456789abcdefghijklmnopqrstuvwxyz",F=new Array,p,f;p=48;for(f=0;f<=9;++f)F[p++]=f;p=97;for(f=10;f<36;++f)F[p++]=f;p=65;for(f=10;f<36;++f)F[p++]=f;function m(R){return d.charAt(R)}function B(R,U){var G=F[R.charCodeAt(U)];return G==null?-1:G}function C(R){for(var U=this.t-1;U>=0;--U)R.data[U]=this.data[U];R.t=this.t,R.s=this.s}function c(R){if(this.t=1,this.s=R<0?-1:0,R>0)this.data[0]=R;else if(R<-1)this.data[0]=R+this.DV;else this.t=0}function y(R){var U=l();return U.fromInt(R),U}function A(R,U){var G;if(U==16)G=4;else if(U==8)G=3;else if(U==256)G=8;else if(U==2)G=1;else if(U==32)G=5;else if(U==4)G=2;else{this.fromRadix(R,U);return}this.t=0,this.s=0;var Y=R.length,X=!1,ee=0;while(--Y>=0){var pe=G==8?R[Y]&255:B(R,Y);if(pe<0){if(R.charAt(Y)=="-")X=!0;continue}if(X=!1,ee==0)this.data[this.t++]=pe;else if(ee+G>this.DB)this.data[this.t-1]|=(pe&(1<<this.DB-ee)-1)<<ee,this.data[this.t++]=pe>>this.DB-ee;else this.data[this.t-1]|=pe<<ee;if(ee+=G,ee>=this.DB)ee-=this.DB}if(G==8&&(R[0]&128)!=0){if(this.s=-1,ee>0)this.data[this.t-1]|=(1<<this.DB-ee)-1<<ee}if(this.clamp(),X)i.ZERO.subTo(this,this)}function T(){var R=this.s&this.DM;while(this.t>0&&this.data[this.t-1]==R)--this.t}function I(R){if(this.s<0)return"-"+this.negate().toString(R);var U;if(R==16)U=4;else if(R==8)U=3;else if(R==2)U=1;else if(R==32)U=5;else if(R==4)U=2;else return this.toRadix(R);var G=(1<<U)-1,Y,X=!1,ee="",pe=this.t,De=this.DB-pe*this.DB%U;if(pe-- >0){if(De<this.DB&&(Y=this.data[pe]>>De)>0)X=!0,ee=m(Y);while(pe>=0){if(De<U)Y=(this.data[pe]&(1<<De)-1)<<U-De,Y|=this.data[--pe]>>(De+=this.DB-U);else if(Y=this.data[pe]>>(De-=U)&G,De<=0)De+=this.DB,--pe;if(Y>0)X=!0;if(X)ee+=m(Y)}}return X?ee:"0"}function v(){var R=l();return i.ZERO.subTo(this,R),R}function g(){return this.s<0?this.negate():this}function E(R){var U=this.s-R.s;if(U!=0)return U;var G=this.t;if(U=G-R.t,U!=0)return this.s<0?-U:U;while(--G>=0)if((U=this.data[G]-R.data[G])!=0)return U;return 0}function S(R){var U=1,G;if((G=R>>>16)!=0)R=G,U+=16;if((G=R>>8)!=0)R=G,U+=8;if((G=R>>4)!=0)R=G,U+=4;if((G=R>>2)!=0)R=G,U+=2;if((G=R>>1)!=0)R=G,U+=1;return U}function _(){if(this.t<=0)return 0;return this.DB*(this.t-1)+S(this.data[this.t-1]^this.s&this.DM)}function K(R,U){var G;for(G=this.t-1;G>=0;--G)U.data[G+R]=this.data[G];for(G=R-1;G>=0;--G)U.data[G]=0;U.t=this.t+R,U.s=this.s}function N(R,U){for(var G=R;G<this.t;++G)U.data[G-R]=this.data[G];U.t=Math.max(this.t-R,0),U.s=this.s}function $(R,U){var G=R%this.DB,Y=this.DB-G,X=(1<<Y)-1,ee=Math.floor(R/this.DB),pe=this.s<<G&this.DM,De;for(De=this.t-1;De>=0;--De)U.data[De+ee+1]=this.data[De]>>Y|pe,pe=(this.data[De]&X)<<G;for(De=ee-1;De>=0;--De)U.data[De]=0;U.data[ee]=pe,U.t=this.t+ee+1,U.s=this.s,U.clamp()}function P(R,U){U.s=this.s;var G=Math.floor(R/this.DB);if(G>=this.t){U.t=0;return}var Y=R%this.DB,X=this.DB-Y,ee=(1<<Y)-1;U.data[0]=this.data[G]>>Y;for(var pe=G+1;pe<this.t;++pe)U.data[pe-G-1]|=(this.data[pe]&ee)<<X,U.data[pe-G]=this.data[pe]>>Y;if(Y>0)U.data[this.t-G-1]|=(this.s&ee)<<X;U.t=this.t-G,U.clamp()}function V(R,U){var G=0,Y=0,X=Math.min(R.t,this.t);while(G<X)Y+=this.data[G]-R.data[G],U.data[G++]=Y&this.DM,Y>>=this.DB;if(R.t<this.t){Y-=R.s;while(G<this.t)Y+=this.data[G],U.data[G++]=Y&this.DM,Y>>=this.DB;Y+=this.s}else{Y+=this.s;while(G<R.t)Y-=R.data[G],U.data[G++]=Y&this.DM,Y>>=this.DB;Y-=R.s}if(U.s=Y<0?-1:0,Y<-1)U.data[G++]=this.DV+Y;else if(Y>0)U.data[G++]=Y;U.t=G,U.clamp()}function k(R,U){var G=this.abs(),Y=R.abs(),X=G.t;U.t=X+Y.t;while(--X>=0)U.data[X]=0;for(X=0;X<Y.t;++X)U.data[X+G.t]=G.am(0,Y.data[X],U,X,0,G.t);if(U.s=0,U.clamp(),this.s!=R.s)i.ZERO.subTo(U,U)}function W(R){var U=this.abs(),G=R.t=2*U.t;while(--G>=0)R.data[G]=0;for(G=0;G<U.t-1;++G){var Y=U.am(G,U.data[G],R,2*G,0,1);if((R.data[G+U.t]+=U.am(G+1,2*U.data[G],R,2*G+1,Y,U.t-G-1))>=U.DV)R.data[G+U.t]-=U.DV,R.data[G+U.t+1]=1}if(R.t>0)R.data[R.t-1]+=U.am(G,U.data[G],R,2*G,0,1);R.s=0,R.clamp()}function Q(R,U,G){var Y=R.abs();if(Y.t<=0)return;var X=this.abs();if(X.t<Y.t){if(U!=null)U.fromInt(0);if(G!=null)this.copyTo(G);return}if(G==null)G=l();var ee=l(),pe=this.s,De=R.s,Qe=this.DB-S(Y.data[Y.t-1]);if(Qe>0)Y.lShiftTo(Qe,ee),X.lShiftTo(Qe,G);else Y.copyTo(ee),X.copyTo(G);var Gt=ee.t,ou=ee.data[Gt-1];if(ou==0)return;var au=ou*(1<<this.F1)+(Gt>1?ee.data[Gt-2]>>this.F2:0),qu=this.FV/au,Cs=(1<<this.F1)/au,mu=1<<this.F2,yu=G.t,ps=yu-Gt,Er=U==null?l():U;if(ee.dlShiftTo(ps,Er),G.compareTo(Er)>=0)G.data[G.t++]=1,G.subTo(Er,G);i.ONE.dlShiftTo(Gt,Er),Er.subTo(ee,ee);while(ee.t<Gt)ee.data[ee.t++]=0;while(--ps>=0){var Pn=G.data[--yu]==ou?this.DM:Math.floor(G.data[yu]*qu+(G.data[yu-1]+mu)*Cs);if((G.data[yu]+=ee.am(0,Pn,G,ps,0,Gt))<Pn){ee.dlShiftTo(ps,Er),G.subTo(Er,G);while(G.data[yu]<--Pn)G.subTo(Er,G)}}if(U!=null){if(G.drShiftTo(Gt,U),pe!=De)i.ZERO.subTo(U,U)}if(G.t=Gt,G.clamp(),Qe>0)G.rShiftTo(Qe,G);if(pe<0)i.ZERO.subTo(G,G)}function z(R){var U=l();if(this.abs().divRemTo(R,null,U),this.s<0&&U.compareTo(i.ZERO)>0)R.subTo(U,U);return U}function x(R){this.m=R}function ne(R){if(R.s<0||R.compareTo(this.m)>=0)return R.mod(this.m);else return R}function Ee(R){return R}function Fe(R){R.divRemTo(this.m,null,R)}function J(R,U,G){R.multiplyTo(U,G),this.reduce(G)}function ye(R,U){R.squareTo(U),this.reduce(U)}x.prototype.convert=ne,x.prototype.revert=Ee,x.prototype.reduce=Fe,x.prototype.mulTo=J,x.prototype.sqrTo=ye;function se(){if(this.t<1)return 0;var R=this.data[0];if((R&1)==0)return 0;var U=R&3;return U=U*(2-(R&15)*U)&15,U=U*(2-(R&255)*U)&255,U=U*(2-((R&65535)*U&65535))&65535,U=U*(2-R*U%this.DV)%this.DV,U>0?this.DV-U:-U}function Ie(R){this.m=R,this.mp=R.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<R.DB-15)-1,this.mt2=2*R.t}function ce(R){var U=l();if(R.abs().dlShiftTo(this.m.t,U),U.divRemTo(this.m,null,U),R.s<0&&U.compareTo(i.ZERO)>0)this.m.subTo(U,U);return U}function w(R){var U=l();return R.copyTo(U),this.reduce(U),U}function M(R){while(R.t<=this.mt2)R.data[R.t++]=0;for(var U=0;U<this.m.t;++U){var G=R.data[U]&32767,Y=G*this.mpl+((G*this.mph+(R.data[U]>>15)*this.mpl&this.um)<<15)&R.DM;G=U+this.m.t,R.data[G]+=this.m.am(0,Y,R,U,0,this.m.t);while(R.data[G]>=R.DV)R.data[G]-=R.DV,R.data[++G]++}if(R.clamp(),R.drShiftTo(this.m.t,R),R.compareTo(this.m)>=0)R.subTo(this.m,R)}function L(R,U){R.squareTo(U),this.reduce(U)}function b(R,U,G){R.multiplyTo(U,G),this.reduce(G)}Ie.prototype.convert=ce,Ie.prototype.revert=w,Ie.prototype.reduce=M,Ie.prototype.mulTo=b,Ie.prototype.sqrTo=L;function O(){return(this.t>0?this.data[0]&1:this.s)==0}function H(R,U){if(R>4294967295||R<1)return i.ONE;var G=l(),Y=l(),X=U.convert(this),ee=S(R)-1;X.copyTo(G);while(--ee>=0)if(U.sqrTo(G,Y),(R&1<<ee)>0)U.mulTo(Y,X,G);else{var pe=G;G=Y,Y=pe}return U.revert(G)}function j(R,U){var G;if(R<256||U.isEven())G=new x(U);else G=new Ie(U);return this.exp(R,G)}i.prototype.copyTo=C,i.prototype.fromInt=c,i.prototype.fromString=A,i.prototype.clamp=T,i.prototype.dlShiftTo=K,i.prototype.drShiftTo=N,i.prototype.lShiftTo=$,i.prototype.rShiftTo=P,i.prototype.subTo=V,i.prototype.multiplyTo=k,i.prototype.squareTo=W,i.prototype.divRemTo=Q,i.prototype.invDigit=se,i.prototype.isEven=O,i.prototype.exp=H,i.prototype.toString=I,i.prototype.negate=v,i.prototype.abs=g,i.prototype.compareTo=E,i.prototype.bitLength=_,i.prototype.mod=z,i.prototype.modPowInt=j,i.ZERO=y(0),i.ONE=y(1);function Z(){var R=l();return this.copyTo(R),R}function he(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this.data[0];else if(this.t==0)return 0;return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function ge(){return this.t==0?this.s:this.data[0]<<24>>24}function q(){return this.t==0?this.s:this.data[0]<<16>>16}function Ce(R){return Math.floor(Math.LN2*this.DB/Math.log(R))}function we(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this.data[0]<=0)return 0;else return 1}function Me(R){if(R==null)R=10;if(this.signum()==0||R<2||R>36)return"0";var U=this.chunkSize(R),G=Math.pow(R,U),Y=y(G),X=l(),ee=l(),pe="";this.divRemTo(Y,X,ee);while(X.signum()>0)pe=(G+ee.intValue()).toString(R).substr(1)+pe,X.divRemTo(Y,X,ee);return ee.intValue().toString(R)+pe}function Re(R,U){if(this.fromInt(0),U==null)U=10;var G=this.chunkSize(U),Y=Math.pow(U,G),X=!1,ee=0,pe=0;for(var De=0;De<R.length;++De){var Qe=B(R,De);if(Qe<0){if(R.charAt(De)=="-"&&this.signum()==0)X=!0;continue}if(pe=U*pe+Qe,++ee>=G)this.dMultiply(Y),this.dAddOffset(pe,0),ee=0,pe=0}if(ee>0)this.dMultiply(Math.pow(U,ee)),this.dAddOffset(pe,0);if(X)i.ZERO.subTo(this,this)}function ct(R,U,G){if(typeof U=="number")if(R<2)this.fromInt(1);else{if(this.fromNumber(R,G),!this.testBit(R-1))this.bitwiseTo(i.ONE.shiftLeft(R-1),Tt,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(U))if(this.dAddOffset(2,0),this.bitLength()>R)this.subTo(i.ONE.shiftLeft(R-1),this)}else{var Y=new Array,X=R&7;if(Y.length=(R>>3)+1,U.nextBytes(Y),X>0)Y[0]&=(1<<X)-1;else Y[0]=0;this.fromString(Y,256)}}function Ft(){var R=this.t,U=new Array;U[0]=this.s;var G=this.DB-R*this.DB%8,Y,X=0;if(R-- >0){if(G<this.DB&&(Y=this.data[R]>>G)!=(this.s&this.DM)>>G)U[X++]=Y|this.s<<this.DB-G;while(R>=0){if(G<8)Y=(this.data[R]&(1<<G)-1)<<8-G,Y|=this.data[--R]>>(G+=this.DB-8);else if(Y=this.data[R]>>(G-=8)&255,G<=0)G+=this.DB,--R;if((Y&128)!=0)Y|=-256;if(X==0&&(this.s&128)!=(Y&128))++X;if(X>0||Y!=this.s)U[X++]=Y}}return U}function yt(R){return this.compareTo(R)==0}function Dt(R){return this.compareTo(R)<0?this:R}function at(R){return this.compareTo(R)>0?this:R}function ht(R,U,G){var Y,X,ee=Math.min(R.t,this.t);for(Y=0;Y<ee;++Y)G.data[Y]=U(this.data[Y],R.data[Y]);if(R.t<this.t){X=R.s&this.DM;for(Y=ee;Y<this.t;++Y)G.data[Y]=U(this.data[Y],X);G.t=this.t}else{X=this.s&this.DM;for(Y=ee;Y<R.t;++Y)G.data[Y]=U(X,R.data[Y]);G.t=R.t}G.s=U(this.s,R.s),G.clamp()}function St(R,U){return R&U}function Qt(R){var U=l();return this.bitwiseTo(R,St,U),U}function Tt(R,U){return R|U}function Jt(R){var U=l();return this.bitwiseTo(R,Tt,U),U}function eu(R,U){return R^U}function su(R){var U=l();return this.bitwiseTo(R,eu,U),U}function nu(R,U){return R&~U}function pu(R){var U=l();return this.bitwiseTo(R,nu,U),U}function _u(){var R=l();for(var U=0;U<this.t;++U)R.data[U]=this.DM&~this.data[U];return R.t=this.t,R.s=~this.s,R}function zu(R){var U=l();if(R<0)this.rShiftTo(-R,U);else this.lShiftTo(R,U);return U}function dr(R){var U=l();if(R<0)this.lShiftTo(-R,U);else this.rShiftTo(R,U);return U}function $r(R){if(R==0)return-1;var U=0;if((R&65535)==0)R>>=16,U+=16;if((R&255)==0)R>>=8,U+=8;if((R&15)==0)R>>=4,U+=4;if((R&3)==0)R>>=2,U+=2;if((R&1)==0)++U;return U}function xr(){for(var R=0;R<this.t;++R)if(this.data[R]!=0)return R*this.DB+$r(this.data[R]);if(this.s<0)return this.t*this.DB;return-1}function Ni(R){var U=0;while(R!=0)R&=R-1,++U;return U}function Es(){var R=0,U=this.s&this.DM;for(var G=0;G<this.t;++G)R+=Ni(this.data[G]^U);return R}function wt(R){var U=Math.floor(R/this.DB);if(U>=this.t)return this.s!=0;return(this.data[U]&1<<R%this.DB)!=0}function It(R,U){var G=i.ONE.shiftLeft(R);return this.bitwiseTo(G,U,G),G}function Nt(R){return this.changeBit(R,Tt)}function _t(R){return this.changeBit(R,nu)}function $t(R){return this.changeBit(R,eu)}function Rt(R,U){var G=0,Y=0,X=Math.min(R.t,this.t);while(G<X)Y+=this.data[G]+R.data[G],U.data[G++]=Y&this.DM,Y>>=this.DB;if(R.t<this.t){Y+=R.s;while(G<this.t)Y+=this.data[G],U.data[G++]=Y&this.DM,Y>>=this.DB;Y+=this.s}else{Y+=this.s;while(G<R.t)Y+=R.data[G],U.data[G++]=Y&this.DM,Y>>=this.DB;Y+=R.s}if(U.s=Y<0?-1:0,Y>0)U.data[G++]=Y;else if(Y<-1)U.data[G++]=this.DV+Y;U.t=G,U.clamp()}function Ot(R){var U=l();return this.addTo(R,U),U}function Lt(R){var U=l();return this.subTo(R,U),U}function Ut(R){var U=l();return this.multiplyTo(R,U),U}function Pt(R){var U=l();return this.divRemTo(R,U,null),U}function Mt(R){var U=l();return this.divRemTo(R,null,U),U}function kt(R){var U=l(),G=l();return this.divRemTo(R,U,G),new Array(U,G)}function Vt(R){this.data[this.t]=this.am(0,R-1,this,0,0,this.t),++this.t,this.clamp()}function Kt(R,U){if(R==0)return;while(this.t<=U)this.data[this.t++]=0;this.data[U]+=R;while(this.data[U]>=this.DV){if(this.data[U]-=this.DV,++U>=this.t)this.data[this.t++]=0;++this.data[U]}}function ft(){}function Bt(R){return R}function P8(R,U,G){R.multiplyTo(U,G)}function M8(R,U){R.squareTo(U)}ft.prototype.convert=Bt,ft.prototype.revert=Bt,ft.prototype.mulTo=P8,ft.prototype.sqrTo=M8;function k8(R){return this.exp(R,new ft)}function V8(R,U,G){var Y=Math.min(this.t+R.t,U);G.s=0,G.t=Y;while(Y>0)G.data[--Y]=0;var X;for(X=G.t-this.t;Y<X;++Y)G.data[Y+this.t]=this.am(0,R.data[Y],G,Y,0,this.t);for(X=Math.min(R.t,U);Y<X;++Y)this.am(0,R.data[Y],G,Y,0,U-Y);G.clamp()}function K8(R,U,G){--U;var Y=G.t=this.t+R.t-U;G.s=0;while(--Y>=0)G.data[Y]=0;for(Y=Math.max(U-this.t,0);Y<R.t;++Y)G.data[this.t+Y-U]=this.am(U-Y,R.data[Y],G,0,0,this.t+Y-U);G.clamp(),G.drShiftTo(1,G)}function Zr(R){this.r2=l(),this.q3=l(),i.ONE.dlShiftTo(2*R.t,this.r2),this.mu=this.r2.divide(R),this.m=R}function G8(R){if(R.s<0||R.t>2*this.m.t)return R.mod(this.m);else if(R.compareTo(this.m)<0)return R;else{var U=l();return R.copyTo(U),this.reduce(U),U}}function j8(R){return R}function W8(R){if(R.drShiftTo(this.m.t-1,this.r2),R.t>this.m.t+1)R.t=this.m.t+1,R.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(R.compareTo(this.r2)<0)R.dAddOffset(1,this.m.t+1);R.subTo(this.r2,R);while(R.compareTo(this.m)>=0)R.subTo(this.m,R)}function H8(R,U){R.squareTo(U),this.reduce(U)}function Q8(R,U,G){R.multiplyTo(U,G),this.reduce(G)}Zr.prototype.convert=G8,Zr.prototype.revert=j8,Zr.prototype.reduce=W8,Zr.prototype.mulTo=Q8,Zr.prototype.sqrTo=H8;function Y8(R,U){var G=R.bitLength(),Y,X=y(1),ee;if(G<=0)return X;else if(G<18)Y=1;else if(G<48)Y=3;else if(G<144)Y=4;else if(G<768)Y=5;else Y=6;if(G<8)ee=new x(U);else if(U.isEven())ee=new Zr(U);else ee=new Ie(U);var pe=new Array,De=3,Qe=Y-1,Gt=(1<<Y)-1;if(pe[1]=ee.convert(this),Y>1){var ou=l();ee.sqrTo(pe[1],ou);while(De<=Gt)pe[De]=l(),ee.mulTo(ou,pe[De-2],pe[De]),De+=2}var au=R.t-1,qu,Cs=!0,mu=l(),yu;G=S(R.data[au])-1;while(au>=0){if(G>=Qe)qu=R.data[au]>>G-Qe≫else if(qu=(R.data[au]&(1<<G+1)-1)<<Qe-G,au>0)qu|=R.data[au-1]>>this.DB+G-Qe;De=Y;while((qu&1)==0)qu>>=1,--De;if((G-=De)<0)G+=this.DB,--au;if(Cs)pe[qu].copyTo(X),Cs=!1;else{while(De>1)ee.sqrTo(X,mu),ee.sqrTo(mu,X),De-=2;if(De>0)ee.sqrTo(X,mu);else yu=X,X=mu,mu=yu;ee.mulTo(mu,pe[qu],X)}while(au>=0&&(R.data[au]&1<<G)==0)if(ee.sqrTo(X,mu),yu=X,X=mu,mu=yu,--G<0)G=this.DB-1,--au}return ee.revert(X)}function z8(R){var U=this.s<0?this.negate():this.clone(),G=R.s<0?R.negate():R.clone();if(U.compareTo(G)<0){var Y=U;U=G,G=Y}var X=U.getLowestSetBit(),ee=G.getLowestSetBit();if(ee<0)return U;if(X<ee)ee=X;if(ee>0)U.rShiftTo(ee,U),G.rShiftTo(ee,G);while(U.signum()>0){if((X=U.getLowestSetBit())>0)U.rShiftTo(X,U);if((X=G.getLowestSetBit())>0)G.rShiftTo(X,G);if(U.compareTo(G)>=0)U.subTo(G,U),U.rShiftTo(1,U);else G.subTo(U,G),G.rShiftTo(1,G)}if(ee>0)G.lShiftTo(ee,G);return G}function q8(R){if(R<=0)return 0;var U=this.DV%R,G=this.s<0?R-1:0;if(this.t>0)if(U==0)G=this.data[0]%R;else for(var Y=this.t-1;Y>=0;--Y)G=(U*G+this.data[Y])%R;return G}function x8(R){var U=R.isEven();if(this.isEven()&&U||R.signum()==0)return i.ZERO;var G=R.clone(),Y=this.clone(),X=y(1),ee=y(0),pe=y(0),De=y(1);while(G.signum()!=0){while(G.isEven()){if(G.rShiftTo(1,G),U){if(!X.isEven()||!ee.isEven())X.addTo(this,X),ee.subTo(R,ee);X.rShiftTo(1,X)}else if(!ee.isEven())ee.subTo(R,ee);ee.rShiftTo(1,ee)}while(Y.isEven()){if(Y.rShiftTo(1,Y),U){if(!pe.isEven()||!De.isEven())pe.addTo(this,pe),De.subTo(R,De);pe.rShiftTo(1,pe)}else if(!De.isEven())De.subTo(R,De);De.rShiftTo(1,De)}if(G.compareTo(Y)>=0){if(G.subTo(Y,G),U)X.subTo(pe,X);ee.subTo(De,ee)}else{if(Y.subTo(G,Y),U)pe.subTo(X,pe);De.subTo(ee,De)}}if(Y.compareTo(i.ONE)!=0)return i.ZERO;if(De.compareTo(R)>=0)return De.subtract(R);if(De.signum()<0)De.addTo(R,De);else return De;if(De.signum()<0)return De.add(R);else return De}var gu=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],Z8=67108864/gu[gu.length-1];function X8(R){var U,G=this.abs();if(G.t==1&&G.data[0]<=gu[gu.length-1]){for(U=0;U<gu.length;++U)if(G.data[0]==gu[U])return!0;return!1}if(G.isEven())return!1;U=1;while(U<gu.length){var Y=gu[U],X=U+1;while(X<gu.length&&Y<Z8)Y*=gu[X++];Y=G.modInt(Y);while(U<X)if(Y%gu[U++]==0)return!1}return G.millerRabin(R)}function J8(R){var U=this.subtract(i.ONE),G=U.getLowestSetBit();if(G<=0)return!1;var Y=U.shiftRight(G),X=ed(),ee;for(var pe=0;pe<R;++pe){do ee=new i(this.bitLength(),X);while(ee.compareTo(i.ONE)<=0||ee.compareTo(U)>=0);var De=ee.modPow(Y,this);if(De.compareTo(i.ONE)!=0&&De.compareTo(U)!=0){var Qe=1;while(Qe++<G&&De.compareTo(U)!=0)if(De=De.modPowInt(2,this),De.compareTo(i.ONE)==0)return!1;if(De.compareTo(U)!=0)return!1}}return!0}function ed(){return{nextBytes:function(R){for(var U=0;U<R.length;++U)R[U]=Math.floor(Math.random()*256)}}}i.prototype.chunkSize=Ce,i.prototype.toRadix=Me,i.prototype.fromRadix=Re,i.prototype.fromNumber=ct,i.prototype.bitwiseTo=ht,i.prototype.changeBit=It,i.prototype.addTo=Rt,i.prototype.dMultiply=Vt,i.prototype.dAddOffset=Kt,i.prototype.multiplyLowerTo=V8,i.prototype.multiplyUpperTo=K8,i.prototype.modInt=q8,i.prototype.millerRabin=J8,i.prototype.clone=Z,i.prototype.intValue=he,i.prototype.byteValue=ge,i.prototype.shortValue=q,i.prototype.signum=we,i.prototype.toByteArray=Ft,i.prototype.equals=yt,i.prototype.min=Dt,i.prototype.max=at,i.prototype.and=Qt,i.prototype.or=Jt,i.prototype.xor=su,i.prototype.andNot=pu,i.prototype.not=_u,i.prototype.shiftLeft=zu,i.prototype.shiftRight=dr,i.prototype.getLowestSetBit=xr,i.prototype.bitCount=Es,i.prototype.testBit=wt,i.prototype.setBit=Nt,i.prototype.clearBit=_t,i.prototype.flipBit=$t,i.prototype.add=Ot,i.prototype.subtract=Lt,i.prototype.multiply=Ut,i.prototype.divide=Pt,i.prototype.remainder=Mt,i.prototype.divideAndRemainder=kt,i.prototype.modPow=Y8,i.prototype.modInverse=x8,i.prototype.pow=k8,i.prototype.gcd=z8,i.prototype.isProbablePrime=X8}),ns=$e((e,u)=>{var t=Ue();or(),Ke();var r=u.exports=t.sha1=t.sha1||{};t.md.sha1=t.md.algorithms.sha1=r,r.create=function(){if(!n)i();var o=null,a=t.util.createBuffer(),D=new Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return h.start=function(){h.messageLength=0,h.fullMessageLength=h.messageLength64=[];var d=h.messageLengthSize/4;for(var F=0;F<d;++F)h.fullMessageLength.push(0);return a=t.util.createBuffer(),o={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},h},h.start(),h.update=function(d,F){if(F==="utf8")d=t.util.encodeUtf8(d);var p=d.length;h.messageLength+=p,p=[p/4294967296>>>0,p>>>0];for(var f=h.fullMessageLength.length-1;f>=0;--f)h.fullMessageLength[f]+=p[1],p[1]=p[0]+(h.fullMessageLength[f]/4294967296>>>0),h.fullMessageLength[f]=h.fullMessageLength[f]>>>0,p[0]=p[1]/4294967296>>>0;if(a.putBytes(d),l(o,D,a),a.read>2048||a.length()===0)a.compact();return h},h.digest=function(){var d=t.util.createBuffer();d.putBytes(a.bytes());var F=h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize,p=F&h.blockLength-1;d.putBytes(s.substr(0,h.blockLength-p));var f,m,B=h.fullMessageLength[0]*8;for(var C=0;C<h.fullMessageLength.length-1;++C)f=h.fullMessageLength[C+1]*8,m=f/4294967296>>>0,B+=m,d.putInt32(B>>>0),B=f>>>0;d.putInt32(B);var c={h0:o.h0,h1:o.h1,h2:o.h2,h3:o.h3,h4:o.h4};l(c,D,d);var y=t.util.createBuffer();return y.putInt32(c.h0),y.putInt32(c.h1),y.putInt32(c.h2),y.putInt32(c.h3),y.putInt32(c.h4),y},h};var s=null,n=!1;function i(){s=String.fromCharCode(128),s+=t.util.fillString(String.fromCharCode(0),64),n=!0}function l(o,a,D){var h,d,F,p,f,m,B,C,c=D.length();while(c>=64){d=o.h0,F=o.h1,p=o.h2,f=o.h3,m=o.h4;for(C=0;C<16;++C)h=D.getInt32(),a[C]=h,B=f^F&(p^f),h=(d<<5|d>>>27)+B+m+1518500249+h,m=f,f=p,p=(F<<30|F>>>2)>>>0,F=d,d=h;for(;C<20;++C)h=a[C-3]^a[C-8]^a[C-14]^a[C-16],h=h<<1|h>>>31,a[C]=h,B=f^F&(p^f),h=(d<<5|d>>>27)+B+m+1518500249+h,m=f,f=p,p=(F<<30|F>>>2)>>>0,F=d,d=h;for(;C<32;++C)h=a[C-3]^a[C-8]^a[C-14]^a[C-16],h=h<<1|h>>>31,a[C]=h,B=F^p^f,h=(d<<5|d>>>27)+B+m+1859775393+h,m=f,f=p,p=(F<<30|F>>>2)>>>0,F=d,d=h;for(;C<40;++C)h=a[C-6]^a[C-16]^a[C-28]^a[C-32],h=h<<2|h>>>30,a[C]=h,B=F^p^f,h=(d<<5|d>>>27)+B+m+1859775393+h,m=f,f=p,p=(F<<30|F>>>2)>>>0,F=d,d=h;for(;C<60;++C)h=a[C-6]^a[C-16]^a[C-28]^a[C-32],h=h<<2|h>>>30,a[C]=h,B=F&p|f&(F^p),h=(d<<5|d>>>27)+B+m+2400959708+h,m=f,f=p,p=(F<<30|F>>>2)>>>0,F=d,d=h;for(;C<80;++C)h=a[C-6]^a[C-16]^a[C-28]^a[C-32],h=h<<2|h>>>30,a[C]=h,B=F^p^f,h=(d<<5|d>>>27)+B+m+3395469782+h,m=f,f=p,p=(F<<30|F>>>2)>>>0,F=d,d=h;o.h0=o.h0+d|0,o.h1=o.h1+F|0,o.h2=o.h2+p|0,o.h3=o.h3+f|0,o.h4=o.h4+m|0,c-=64}}}),Pf=$e((e,u)=>{var t=Ue();Ke(),Nu(),ns();var r=u.exports=t.pkcs1=t.pkcs1||{};r.encode_rsa_oaep=function(n,i,l){var o,a,D,h;if(typeof l==="string")o=l,a=arguments[3]||void 0,D=arguments[4]||void 0;else if(l){if(o=l.label||void 0,a=l.seed||void 0,D=l.md||void 0,l.mgf1&&l.mgf1.md)h=l.mgf1.md}if(!D)D=t.md.sha1.create();else D.start();if(!h)h=D;var d=Math.ceil(n.n.bitLength()/8),F=d-2*D.digestLength-2;if(i.length>F){var p=new Error("RSAES-OAEP input message length is too long.");throw p.length=i.length,p.maxLength=F,p}if(!o)o="";D.update(o,"raw");var f=D.digest(),m="",B=F-i.length;for(var C=0;C<B;C++)m+="\x00";var c=f.getBytes()+m+"\x01"+i;if(!a)a=t.random.getBytes(D.digestLength);else if(a.length!==D.digestLength){var p=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw p.seedLength=a.length,p.digestLength=D.digestLength,p}var y=s(a,d-D.digestLength-1,h),A=t.util.xorBytes(c,y,c.length),T=s(A,D.digestLength,h),I=t.util.xorBytes(a,T,a.length);return"\x00"+I+A},r.decode_rsa_oaep=function(n,i,l){var o,a,D;if(typeof l==="string")o=l,a=arguments[3]||void 0;else if(l){if(o=l.label||void 0,a=l.md||void 0,l.mgf1&&l.mgf1.md)D=l.mgf1.md}var h=Math.ceil(n.n.bitLength()/8);if(i.length!==h){var A=new Error("RSAES-OAEP encoded message length is invalid.");throw A.length=i.length,A.expectedLength=h,A}if(a===void 0)a=t.md.sha1.create();else a.start();if(!D)D=a;if(h<2*a.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");if(!o)o="";a.update(o,"raw");var d=a.digest().getBytes(),F=i.charAt(0),p=i.substring(1,a.digestLength+1),f=i.substring(1+a.digestLength),m=s(f,a.digestLength,D),B=t.util.xorBytes(p,m,p.length),C=s(B,h-a.digestLength-1,D),c=t.util.xorBytes(f,C,f.length),y=c.substring(0,a.digestLength),A=F!=="\x00";for(var T=0;T<a.digestLength;++T)A|=d.charAt(T)!==y.charAt(T);var I=1,v=a.digestLength;for(var g=a.digestLength;g<c.length;g++){var E=c.charCodeAt(g),S=E&1^1,_=I?65534:0;A|=E&_,I=I&S,v+=I}if(A||c.charCodeAt(v)!==1)throw new Error("Invalid RSAES-OAEP padding.");return c.substring(v+1)};function s(n,i,l){if(!l)l=t.md.sha1.create();var o="",a=Math.ceil(i/l.digestLength);for(var D=0;D<a;++D){var h=String.fromCharCode(D>>24&255,D>>16&255,D>>8&255,D&255);l.start(),l.update(n+h),o+=l.digest().getBytes()}return o.substring(0,i)}}),Mf=$e((e,u)=>{var t=Ue();Ke(),Sn(),Nu(),function(){if(t.prime){u.exports=t.prime;return}var r=u.exports=t.prime=t.prime||{},s=t.jsbn.BigInteger,n=[6,4,2,4,2,4,6,2],i=new s(null);i.fromInt(30);var l=function(p,f){return p|f};r.generateProbablePrime=function(p,f,m){if(typeof f==="function")m=f,f={};f=f||{};var B=f.algorithm||"PRIMEINC";if(typeof B==="string")B={name:B};B.options=B.options||{};var C=f.prng||t.random,c={nextBytes:function(y){var A=C.getBytesSync(y.length);for(var T=0;T<y.length;++T)y[T]=A.charCodeAt(T)}};if(B.name==="PRIMEINC")return o(p,c,B.options,m);throw new Error("Invalid prime generation algorithm: "+B.name)};function o(p,f,m,B){if("workers"in m)return h(p,f,m,B);return a(p,f,m,B)}function a(p,f,m,B){var C=d(p,f),c=0,y=F(C.bitLength());if("millerRabinTests"in m)y=m.millerRabinTests;var A=10;if("maxBlockTime"in m)A=m.maxBlockTime;D(C,p,f,c,y,A,B)}function D(p,f,m,B,C,c,y){var A=+new Date;do{if(p.bitLength()>f)p=d(f,m);if(p.isProbablePrime(C))return y(null,p);p.dAddOffset(n[B++%8],0)}while(c<0||+new Date-A<c);t.util.setImmediate(function(){D(p,f,m,B,C,c,y)})}function h(p,f,m,B){if(typeof Worker==="undefined")return a(p,f,m,B);var C=d(p,f),c=m.workers,y=m.workLoad||100,A=y*30/8,T=m.workerScript||"forge/prime.worker.js";if(c===-1)return t.util.estimateCores(function(v,g){if(v)g=2;c=g-1,I()});I();function I(){c=Math.max(1,c);var v=[];for(var g=0;g<c;++g)v[g]=new Worker(T);var E=c;for(var g=0;g<c;++g)v[g].addEventListener("message",_);var S=!1;function _(K){if(S)return;--E;var N=K.data;if(N.found){for(var $=0;$<v.length;++$)v[$].terminate();return S=!0,B(null,new s(N.prime,16))}if(C.bitLength()>p)C=d(p,f);var P=C.toString(16);K.target.postMessage({hex:P,workLoad:y}),C.dAddOffset(A,0)}}}function d(p,f){var m=new s(p,f),B=p-1;if(!m.testBit(B))m.bitwiseTo(s.ONE.shiftLeft(B),l,m);return m.dAddOffset(31-m.mod(i).byteValue(),0),m}function F(p){if(p<=100)return 27;if(p<=150)return 18;if(p<=200)return 15;if(p<=250)return 12;if(p<=300)return 9;if(p<=350)return 8;if(p<=400)return 7;if(p<=500)return 6;if(p<=600)return 5;if(p<=800)return 4;if(p<=1250)return 3;return 2}}()}),Tn=$e((e,u)=>{var t=Ue();if(Wu(),Sn(),Qr(),Pf(),Mf(),Nu(),Ke(),typeof r==="undefined")r=t.jsbn.BigInteger;var r,s=t.util.isNodejs?import.meta.require("crypto"):null,n=t.asn1,i=t.util;t.pki=t.pki||{},u.exports=t.pki.rsa=t.rsa=t.rsa||{};var l=t.pki,o=[6,4,2,4,2,4,6,2],a={name:"PrivateKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},h={name:"RSAPublicKey",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},d=t.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},F={name:"DigestInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:n.Class.UNIVERSAL,type:n.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},p=function(g){var E;if(g.algorithm in l.oids)E=l.oids[g.algorithm];else{var S=new Error("Unknown message digest algorithm.");throw S.algorithm=g.algorithm,S}var _=n.oidToDer(E).getBytes(),K=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),N=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]);N.value.push(n.create(n.Class.UNIVERSAL,n.Type.OID,!1,_)),N.value.push(n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,""));var $=n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,g.digest().getBytes());return K.value.push(N),K.value.push($),n.toDer(K).getBytes()},f=function(g,E,S){if(S)return g.modPow(E.e,E.n);if(!E.p||!E.q)return g.modPow(E.d,E.n);if(!E.dP)E.dP=E.d.mod(E.p.subtract(r.ONE));if(!E.dQ)E.dQ=E.d.mod(E.q.subtract(r.ONE));if(!E.qInv)E.qInv=E.q.modInverse(E.p);var _;do _=new r(t.util.bytesToHex(t.random.getBytes(E.n.bitLength()/8)),16);while(_.compareTo(E.n)>=0||!_.gcd(E.n).equals(r.ONE));g=g.multiply(_.modPow(E.e,E.n)).mod(E.n);var K=g.mod(E.p).modPow(E.dP,E.p),N=g.mod(E.q).modPow(E.dQ,E.q);while(K.compareTo(N)<0)K=K.add(E.p);var $=K.subtract(N).multiply(E.qInv).mod(E.p).multiply(E.q).add(N);return $=$.multiply(_.modInverse(E.n)).mod(E.n),$};l.rsa.encrypt=function(g,E,S){var _=S,K,N=Math.ceil(E.n.bitLength()/8);if(S!==!1&&S!==!0)_=S===2,K=m(g,E,S);else K=t.util.createBuffer(),K.putBytes(g);var $=new r(K.toHex(),16),P=f($,E,_),V=P.toString(16),k=t.util.createBuffer(),W=N-Math.ceil(V.length/2);while(W>0)k.putByte(0),--W;return k.putBytes(t.util.hexToBytes(V)),k.getBytes()},l.rsa.decrypt=function(g,E,S,_){var K=Math.ceil(E.n.bitLength()/8);if(g.length!==K){var N=new Error("Encrypted message length is invalid.");throw N.length=g.length,N.expected=K,N}var $=new r(t.util.createBuffer(g).toHex(),16);if($.compareTo(E.n)>=0)throw new Error("Encrypted message is invalid.");var P=f($,E,S),V=P.toString(16),k=t.util.createBuffer(),W=K-Math.ceil(V.length/2);while(W>0)k.putByte(0),--W;if(k.putBytes(t.util.hexToBytes(V)),_!==!1)return B(k.getBytes(),E,S);return k.getBytes()},l.rsa.createKeyPairGenerationState=function(g,E,S){if(typeof g==="string")g=parseInt(g,10);g=g||2048,S=S||{};var _=S.prng||t.random,K={nextBytes:function(P){var V=_.getBytesSync(P.length);for(var k=0;k<P.length;++k)P[k]=V.charCodeAt(k)}},N=S.algorithm||"PRIMEINC",$;if(N==="PRIMEINC")$={algorithm:N,state:0,bits:g,rng:K,eInt:E||65537,e:new r(null),p:null,q:null,qBits:g>>1,pBits:g-(g>>1),pqState:0,num:null,keys:null},$.e.fromInt($.eInt);else throw new Error("Invalid key generation algorithm: "+N);return $},l.rsa.stepKeyPairGenerationState=function(g,E){if(!("algorithm"in g))g.algorithm="PRIMEINC";var S=new r(null);S.fromInt(30);var _=0,K=function(Q,z){return Q|z},N=+new Date,$,P=0;while(g.keys===null&&(E<=0||P<E)){if(g.state===0){var V=g.p===null?g.pBits:g.qBits,k=V-1;if(g.pqState===0){if(g.num=new r(V,g.rng),!g.num.testBit(k))g.num.bitwiseTo(r.ONE.shiftLeft(k),K,g.num);g.num.dAddOffset(31-g.num.mod(S).byteValue(),0),_=0,++g.pqState}else if(g.pqState===1)if(g.num.bitLength()>V)g.pqState=0;else if(g.num.isProbablePrime(y(g.num.bitLength())))++g.pqState;else g.num.dAddOffset(o[_++%8],0);else if(g.pqState===2)g.pqState=g.num.subtract(r.ONE).gcd(g.e).compareTo(r.ONE)===0?3:0;else if(g.pqState===3){if(g.pqState=0,g.p===null)g.p=g.num;else g.q=g.num;if(g.p!==null&&g.q!==null)++g.state;g.num=null}}else if(g.state===1){if(g.p.compareTo(g.q)<0)g.num=g.p,g.p=g.q,g.q=g.num;++g.state}else if(g.state===2)g.p1=g.p.subtract(r.ONE),g.q1=g.q.subtract(r.ONE),g.phi=g.p1.multiply(g.q1),++g.state;else if(g.state===3)if(g.phi.gcd(g.e).compareTo(r.ONE)===0)++g.state;else g.p=null,g.q=null,g.state=0;else if(g.state===4)if(g.n=g.p.multiply(g.q),g.n.bitLength()===g.bits)++g.state;else g.q=null,g.state=0;else if(g.state===5){var W=g.e.modInverse(g.phi);g.keys={privateKey:l.rsa.setPrivateKey(g.n,g.e,W,g.p,g.q,W.mod(g.p1),W.mod(g.q1),g.q.modInverse(g.p)),publicKey:l.rsa.setPublicKey(g.n,g.e)}}$=+new Date,P+=$-N,N=$}return g.keys!==null},l.rsa.generateKeyPair=function(g,E,S,_){if(arguments.length===1){if(typeof g==="object")S=g,g=void 0;else if(typeof g==="function")_=g,g=void 0}else if(arguments.length===2)if(typeof g==="number"){if(typeof E==="function")_=E,E=void 0;else if(typeof E!=="number")S=E,E=void 0}else S=g,_=E,g=void 0,E=void 0;else if(arguments.length===3)if(typeof E==="number"){if(typeof S==="function")_=S,S=void 0}else _=S,S=E,E=void 0;if(S=S||{},g===void 0)g=S.bits||2048;if(E===void 0)E=S.e||65537;if(!t.options.usePureJavaScript&&!S.prng&&g>=256&&g<=16384&&(E===65537||E===3)){if(_){if(A("generateKeyPair"))return s.generateKeyPair("rsa",{modulusLength:g,publicExponent:E,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(P,V,k){if(P)return _(P);_(null,{privateKey:l.privateKeyFromPem(k),publicKey:l.publicKeyFromPem(V)})});if(T("generateKey")&&T("exportKey"))return i.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:g,publicExponent:v(E),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(P){return i.globalScope.crypto.subtle.exportKey("pkcs8",P.privateKey)}).then(void 0,function(P){_(P)}).then(function(P){if(P){var V=l.privateKeyFromAsn1(n.fromDer(t.util.createBuffer(P)));_(null,{privateKey:V,publicKey:l.setRsaPublicKey(V.n,V.e)})}});if(I("generateKey")&&I("exportKey")){var K=i.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:g,publicExponent:v(E),hash:{name:"SHA-256"}},!0,["sign","verify"]);K.oncomplete=function(P){var V=P.target.result,k=i.globalScope.msCrypto.subtle.exportKey("pkcs8",V.privateKey);k.oncomplete=function(W){var Q=W.target.result,z=l.privateKeyFromAsn1(n.fromDer(t.util.createBuffer(Q)));_(null,{privateKey:z,publicKey:l.setRsaPublicKey(z.n,z.e)})},k.onerror=function(W){_(W)}},K.onerror=function(P){_(P)};return}}else if(A("generateKeyPairSync")){var N=s.generateKeyPairSync("rsa",{modulusLength:g,publicExponent:E,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:l.privateKeyFromPem(N.privateKey),publicKey:l.publicKeyFromPem(N.publicKey)}}}var $=l.rsa.createKeyPairGenerationState(g,E,S);if(!_)return l.rsa.stepKeyPairGenerationState($,0),$.keys;C($,S,_)},l.setRsaPublicKey=l.rsa.setPublicKey=function(g,E){var S={n:g,e:E};return S.encrypt=function(_,K,N){if(typeof K==="string")K=K.toUpperCase();else if(K===void 0)K="RSAES-PKCS1-V1_5";if(K==="RSAES-PKCS1-V1_5")K={encode:function(P,V,k){return m(P,V,2).getBytes()}};else if(K==="RSA-OAEP"||K==="RSAES-OAEP")K={encode:function(P,V){return t.pkcs1.encode_rsa_oaep(V,P,N)}};else if(["RAW","NONE","NULL",null].indexOf(K)!==-1)K={encode:function(P){return P}};else if(typeof K==="string")throw new Error('Unsupported encryption scheme: "'+K+'".');var $=K.encode(_,S,!0);return l.rsa.encrypt($,S,!0)},S.verify=function(_,K,N,$){if(typeof N==="string")N=N.toUpperCase();else if(N===void 0)N="RSASSA-PKCS1-V1_5";if($===void 0)$={_parseAllDigestBytes:!0};if(!("_parseAllDigestBytes"in $))$._parseAllDigestBytes=!0;if(N==="RSASSA-PKCS1-V1_5")N={verify:function(V,k){k=B(k,S,!0);var W=n.fromDer(k,{parseAllBytes:$._parseAllDigestBytes}),Q={},z=[];if(!n.validate(W,F,Q,z)){var x=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw x.errors=z,x}var ne=n.derToOid(Q.algorithmIdentifier);if(!(ne===t.oids.md2||ne===t.oids.md5||ne===t.oids.sha1||ne===t.oids.sha224||ne===t.oids.sha256||ne===t.oids.sha384||ne===t.oids.sha512||ne===t.oids["sha512-224"]||ne===t.oids["sha512-256"])){var x=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw x.oid=ne,x}if(ne===t.oids.md2||ne===t.oids.md5){if(!("parameters"in Q))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.")}return V===Q.digest}};else if(N==="NONE"||N==="NULL"||N===null)N={verify:function(V,k){return k=B(k,S,!0),V===k}};var P=l.rsa.decrypt(K,S,!0,!1);return N.verify(_,P,S.n.bitLength())},S},l.setRsaPrivateKey=l.rsa.setPrivateKey=function(g,E,S,_,K,N,$,P){var V={n:g,e:E,d:S,p:_,q:K,dP:N,dQ:$,qInv:P};return V.decrypt=function(k,W,Q){if(typeof W==="string")W=W.toUpperCase();else if(W===void 0)W="RSAES-PKCS1-V1_5";var z=l.rsa.decrypt(k,V,!1,!1);if(W==="RSAES-PKCS1-V1_5")W={decode:B};else if(W==="RSA-OAEP"||W==="RSAES-OAEP")W={decode:function(x,ne){return t.pkcs1.decode_rsa_oaep(ne,x,Q)}};else if(["RAW","NONE","NULL",null].indexOf(W)!==-1)W={decode:function(x){return x}};else throw new Error('Unsupported encryption scheme: "'+W+'".');return W.decode(z,V,!1)},V.sign=function(k,W){var Q=!1;if(typeof W==="string")W=W.toUpperCase();if(W===void 0||W==="RSASSA-PKCS1-V1_5")W={encode:p},Q=1;else if(W==="NONE"||W==="NULL"||W===null)W={encode:function(){return k}},Q=1;var z=W.encode(k,V.n.bitLength());return l.rsa.encrypt(z,V,Q)},V},l.wrapRsaPrivateKey=function(g){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(0).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(l.oids.rsaEncryption).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")]),n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,n.toDer(g).getBytes())])},l.privateKeyFromAsn1=function(g){var E={},S=[];if(n.validate(g,a,E,S))g=n.fromDer(t.util.createBuffer(E.privateKey));if(E={},S=[],!n.validate(g,D,E,S)){var _=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw _.errors=S,_}var K,N,$,P,V,k,W,Q;return K=t.util.createBuffer(E.privateKeyModulus).toHex(),N=t.util.createBuffer(E.privateKeyPublicExponent).toHex(),$=t.util.createBuffer(E.privateKeyPrivateExponent).toHex(),P=t.util.createBuffer(E.privateKeyPrime1).toHex(),V=t.util.createBuffer(E.privateKeyPrime2).toHex(),k=t.util.createBuffer(E.privateKeyExponent1).toHex(),W=t.util.createBuffer(E.privateKeyExponent2).toHex(),Q=t.util.createBuffer(E.privateKeyCoefficient).toHex(),l.setRsaPrivateKey(new r(K,16),new r(N,16),new r($,16),new r(P,16),new r(V,16),new r(k,16),new r(W,16),new r(Q,16))},l.privateKeyToAsn1=l.privateKeyToRSAPrivateKey=function(g){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(0).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,c(g.n)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,c(g.e)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,c(g.d)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,c(g.p)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,c(g.q)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,c(g.dP)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,c(g.dQ)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,c(g.qInv))])},l.publicKeyFromAsn1=function(g){var E={},S=[];if(n.validate(g,d,E,S)){var _=n.derToOid(E.publicKeyOid);if(_!==l.oids.rsaEncryption){var K=new Error("Cannot read public key. Unknown OID.");throw K.oid=_,K}g=E.rsaPublicKey}if(S=[],!n.validate(g,h,E,S)){var K=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw K.errors=S,K}var N=t.util.createBuffer(E.publicKeyModulus).toHex(),$=t.util.createBuffer(E.publicKeyExponent).toHex();return l.setRsaPublicKey(new r(N,16),new r($,16))},l.publicKeyToAsn1=l.publicKeyToSubjectPublicKeyInfo=function(g){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(l.oids.rsaEncryption).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")]),n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,[l.publicKeyToRSAPublicKey(g)])])},l.publicKeyToRSAPublicKey=function(g){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,c(g.n)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,c(g.e))])};function m(g,E,S){var _=t.util.createBuffer(),K=Math.ceil(E.n.bitLength()/8);if(g.length>K-11){var N=new Error("Message is too long for PKCS#1 v1.5 padding.");throw N.length=g.length,N.max=K-11,N}_.putByte(0),_.putByte(S);var $=K-3-g.length,P;if(S===0||S===1){P=S===0?0:255;for(var V=0;V<$;++V)_.putByte(P)}else while($>0){var k=0,W=t.random.getBytes($);for(var V=0;V<$;++V)if(P=W.charCodeAt(V),P===0)++k;else _.putByte(P);$=k}return _.putByte(0),_.putBytes(g),_}function B(g,E,S,_){var K=Math.ceil(E.n.bitLength()/8),N=t.util.createBuffer(g),$=N.getByte(),P=N.getByte();if($!==0||S&&P!==0&&P!==1||!S&&P!=2||S&&P===0&&typeof _==="undefined")throw new Error("Encryption block is invalid.");var V=0;if(P===0){V=K-3-_;for(var k=0;k<V;++k)if(N.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(P===1){V=0;while(N.length()>1){if(N.getByte()!==255){--N.read;break}++V}}else if(P===2){V=0;while(N.length()>1){if(N.getByte()===0){--N.read;break}++V}}var W=N.getByte();if(W!==0||V!==K-3-N.length())throw new Error("Encryption block is invalid.");return N.getBytes()}function C(g,E,S){if(typeof E==="function")S=E,E={};E=E||{};var _={algorithm:{name:E.algorithm||"PRIMEINC",options:{workers:E.workers||2,workLoad:E.workLoad||100,workerScript:E.workerScript}}};if("prng"in E)_.prng=E.prng;K();function K(){N(g.pBits,function(P,V){if(P)return S(P);if(g.p=V,g.q!==null)return $(P,g.q);N(g.qBits,$)})}function N(P,V){t.prime.generateProbablePrime(P,_,V)}function $(P,V){if(P)return S(P);if(g.q=V,g.p.compareTo(g.q)<0){var k=g.p;g.p=g.q,g.q=k}if(g.p.subtract(r.ONE).gcd(g.e).compareTo(r.ONE)!==0){g.p=null,K();return}if(g.q.subtract(r.ONE).gcd(g.e).compareTo(r.ONE)!==0){g.q=null,N(g.qBits,$);return}if(g.p1=g.p.subtract(r.ONE),g.q1=g.q.subtract(r.ONE),g.phi=g.p1.multiply(g.q1),g.phi.gcd(g.e).compareTo(r.ONE)!==0){g.p=g.q=null,K();return}if(g.n=g.p.multiply(g.q),g.n.bitLength()!==g.bits){g.q=null,N(g.qBits,$);return}var W=g.e.modInverse(g.phi);g.keys={privateKey:l.rsa.setPrivateKey(g.n,g.e,W,g.p,g.q,W.mod(g.p1),W.mod(g.q1),g.q.modInverse(g.p)),publicKey:l.rsa.setPublicKey(g.n,g.e)},S(null,g.keys)}}function c(g){var E=g.toString(16);if(E[0]>="8")E="00"+E;var S=t.util.hexToBytes(E);if(S.length>1&&(S.charCodeAt(0)===0&&(S.charCodeAt(1)&128)===0||S.charCodeAt(0)===255&&(S.charCodeAt(1)&128)===128))return S.substr(1);return S}function y(g){if(g<=100)return 27;if(g<=150)return 18;if(g<=200)return 15;if(g<=250)return 12;if(g<=300)return 9;if(g<=350)return 8;if(g<=400)return 7;if(g<=500)return 6;if(g<=600)return 5;if(g<=800)return 4;if(g<=1250)return 3;return 2}function A(g){return t.util.isNodejs&&typeof s[g]==="function"}function T(g){return typeof i.globalScope!=="undefined"&&typeof i.globalScope.crypto==="object"&&typeof i.globalScope.crypto.subtle==="object"&&typeof i.globalScope.crypto.subtle[g]==="function"}function I(g){return typeof i.globalScope!=="undefined"&&typeof i.globalScope.msCrypto==="object"&&typeof i.globalScope.msCrypto.subtle==="object"&&typeof i.globalScope.msCrypto.subtle[g]==="function"}function v(g){var E=t.util.hexToBytes(g.toString(16)),S=new Uint8Array(E.length);for(var _=0;_<E.length;++_)S[_]=E.charCodeAt(_);return S}}),kf=$e((e,u)=>{var t=Ue();if(Hr(),Wu(),bn(),or(),Qr(),T0(),Si(),Nu(),Uf(),Tn(),Ke(),typeof r==="undefined")r=t.jsbn.BigInteger;var r,s=t.asn1,n=t.pki=t.pki||{};u.exports=n.pbe=t.pbe=t.pbe||{};var i=n.oids,l={name:"EncryptedPrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},o={name:"PBES2Algorithms",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},a={name:"pkcs-12PbeParams",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"iterations"}]};n.encryptPrivateKeyInfo=function(p,f,m){m=m||{},m.saltSize=m.saltSize||8,m.count=m.count||2048,m.algorithm=m.algorithm||"aes128",m.prfAlgorithm=m.prfAlgorithm||"sha1";var B=t.random.getBytesSync(m.saltSize),C=m.count,c=s.integerToDer(C),y,A,T;if(m.algorithm.indexOf("aes")===0||m.algorithm==="des"){var I,v,g;switch(m.algorithm){case"aes128":y=16,I=16,v=i["aes128-CBC"],g=t.aes.createEncryptionCipher;break;case"aes192":y=24,I=16,v=i["aes192-CBC"],g=t.aes.createEncryptionCipher;break;case"aes256":y=32,I=16,v=i["aes256-CBC"],g=t.aes.createEncryptionCipher;break;case"des":y=8,I=8,v=i.desCBC,g=t.des.createEncryptionCipher;break;default:var E=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw E.algorithm=m.algorithm,E}var S="hmacWith"+m.prfAlgorithm.toUpperCase(),_=d(S),K=t.pkcs5.pbkdf2(f,B,C,y,_),N=t.random.getBytesSync(I),$=g(K);$.start(N),$.update(s.toDer(p)),$.finish(),T=$.output.getBytes();var P=F(B,c,y,S);A=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(i.pkcs5PBES2).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(i.pkcs5PBKDF2).getBytes()),P]),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(v).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,N)])])])}else if(m.algorithm==="3des"){y=24;var V=new t.util.ByteBuffer(B),K=n.pbe.generatePkcs12Key(f,V,1,C,y),N=n.pbe.generatePkcs12Key(f,V,2,C,y),$=t.des.createEncryptionCipher(K);$.start(N),$.update(s.toDer(p)),$.finish(),T=$.output.getBytes(),A=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(i["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,B),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,c.getBytes())])])}else{var E=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw E.algorithm=m.algorithm,E}var k=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[A,s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,T)]);return k},n.decryptPrivateKeyInfo=function(p,f){var m=null,B={},C=[];if(!s.validate(p,l,B,C)){var c=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw c.errors=C,c}var y=s.derToOid(B.encryptionOid),A=n.pbe.getCipher(y,B.encryptionParams,f),T=t.util.createBuffer(B.encryptedData);if(A.update(T),A.finish())m=s.fromDer(A.output);return m},n.encryptedPrivateKeyToPem=function(p,f){var m={type:"ENCRYPTED PRIVATE KEY",body:s.toDer(p).getBytes()};return t.pem.encode(m,{maxline:f})},n.encryptedPrivateKeyFromPem=function(p){var f=t.pem.decode(p)[0];if(f.type!=="ENCRYPTED PRIVATE KEY"){var m=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw m.headerType=f.type,m}if(f.procType&&f.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return s.fromDer(f.body)},n.encryptRsaPrivateKey=function(p,f,m){if(m=m||{},!m.legacy){var B=n.wrapRsaPrivateKey(n.privateKeyToAsn1(p));return B=n.encryptPrivateKeyInfo(B,f,m),n.encryptedPrivateKeyToPem(B)}var C,c,y,A;switch(m.algorithm){case"aes128":C="AES-128-CBC",y=16,c=t.random.getBytesSync(16),A=t.aes.createEncryptionCipher;break;case"aes192":C="AES-192-CBC",y=24,c=t.random.getBytesSync(16),A=t.aes.createEncryptionCipher;break;case"aes256":C="AES-256-CBC",y=32,c=t.random.getBytesSync(16),A=t.aes.createEncryptionCipher;break;case"3des":C="DES-EDE3-CBC",y=24,c=t.random.getBytesSync(8),A=t.des.createEncryptionCipher;break;case"des":C="DES-CBC",y=8,c=t.random.getBytesSync(8),A=t.des.createEncryptionCipher;break;default:var T=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+m.algorithm+'".');throw T.algorithm=m.algorithm,T}var I=t.pbe.opensslDeriveBytes(f,c.substr(0,8),y),v=A(I);v.start(c),v.update(s.toDer(n.privateKeyToAsn1(p))),v.finish();var g={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:C,parameters:t.util.bytesToHex(c).toUpperCase()},body:v.output.getBytes()};return t.pem.encode(g)},n.decryptRsaPrivateKey=function(p,f){var m=null,B=t.pem.decode(p)[0];if(B.type!=="ENCRYPTED PRIVATE KEY"&&B.type!=="PRIVATE KEY"&&B.type!=="RSA PRIVATE KEY"){var C=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw C.headerType=C,C}if(B.procType&&B.procType.type==="ENCRYPTED"){var c,y;switch(B.dekInfo.algorithm){case"DES-CBC":c=8,y=t.des.createDecryptionCipher;break;case"DES-EDE3-CBC":c=24,y=t.des.createDecryptionCipher;break;case"AES-128-CBC":c=16,y=t.aes.createDecryptionCipher;break;case"AES-192-CBC":c=24,y=t.aes.createDecryptionCipher;break;case"AES-256-CBC":c=32,y=t.aes.createDecryptionCipher;break;case"RC2-40-CBC":c=5,y=function(g){return t.rc2.createDecryptionCipher(g,40)};break;case"RC2-64-CBC":c=8,y=function(g){return t.rc2.createDecryptionCipher(g,64)};break;case"RC2-128-CBC":c=16,y=function(g){return t.rc2.createDecryptionCipher(g,128)};break;default:var C=new Error('Could not decrypt private key; unsupported encryption algorithm "'+B.dekInfo.algorithm+'".');throw C.algorithm=B.dekInfo.algorithm,C}var A=t.util.hexToBytes(B.dekInfo.parameters),T=t.pbe.opensslDeriveBytes(f,A.substr(0,8),c),I=y(T);if(I.start(A),I.update(t.util.createBuffer(B.body)),I.finish())m=I.output.getBytes();else return m}else m=B.body;if(B.type==="ENCRYPTED PRIVATE KEY")m=n.decryptPrivateKeyInfo(s.fromDer(m),f);else m=s.fromDer(m);if(m!==null)m=n.privateKeyFromAsn1(m);return m},n.pbe.generatePkcs12Key=function(p,f,m,B,C,c){var y,A;if(typeof c==="undefined"||c===null){if(!("sha1"in t.md))throw new Error('"sha1" hash algorithm unavailable.');c=t.md.sha1.create()}var{digestLength:T,blockLength:I}=c,v=new t.util.ByteBuffer,g=new t.util.ByteBuffer;if(p!==null&&p!==void 0){for(A=0;A<p.length;A++)g.putInt16(p.charCodeAt(A));g.putInt16(0)}var E=g.length(),S=f.length(),_=new t.util.ByteBuffer;_.fillWithByte(m,I);var K=I*Math.ceil(S/I),N=new t.util.ByteBuffer;for(A=0;A<K;A++)N.putByte(f.at(A%S));var $=I*Math.ceil(E/I),P=new t.util.ByteBuffer;for(A=0;A<$;A++)P.putByte(g.at(A%E));var V=N;V.putBuffer(P);var k=Math.ceil(C/T);for(var W=1;W<=k;W++){var Q=new t.util.ByteBuffer;Q.putBytes(_.bytes()),Q.putBytes(V.bytes());for(var z=0;z<B;z++)c.start(),c.update(Q.getBytes()),Q=c.digest();var x=new t.util.ByteBuffer;for(A=0;A<I;A++)x.putByte(Q.at(A%T));var ne=Math.ceil(S/I)+Math.ceil(E/I),Ee=new t.util.ByteBuffer;for(y=0;y<ne;y++){var Fe=new t.util.ByteBuffer(V.getBytes(I)),J=511;for(A=x.length()-1;A>=0;A--)J=J>>8,J+=x.at(A)+Fe.at(A),Fe.setAt(A,J&255);Ee.putBuffer(Fe)}V=Ee,v.putBuffer(Q)}return v.truncate(v.length()-C),v},n.pbe.getCipher=function(p,f,m){switch(p){case n.oids.pkcs5PBES2:return n.pbe.getCipherForPBES2(p,f,m);case n.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case n.oids["pbewithSHAAnd40BitRC2-CBC"]:return n.pbe.getCipherForPKCS12PBE(p,f,m);default:var B=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw B.oid=p,B.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],B}},n.pbe.getCipherForPBES2=function(p,f,m){var B={},C=[];if(!s.validate(f,o,B,C)){var c=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw c.errors=C,c}if(p=s.derToOid(B.kdfOid),p!==n.oids.pkcs5PBKDF2){var c=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw c.oid=p,c.supportedOids=["pkcs5PBKDF2"],c}if(p=s.derToOid(B.encOid),p!==n.oids["aes128-CBC"]&&p!==n.oids["aes192-CBC"]&&p!==n.oids["aes256-CBC"]&&p!==n.oids["des-EDE3-CBC"]&&p!==n.oids.desCBC){var c=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw c.oid=p,c.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],c}var y=B.kdfSalt,A=t.util.createBuffer(B.kdfIterationCount);A=A.getInt(A.length()<<3);var T,I;switch(n.oids[p]){case"aes128-CBC":T=16,I=t.aes.createDecryptionCipher;break;case"aes192-CBC":T=24,I=t.aes.createDecryptionCipher;break;case"aes256-CBC":T=32,I=t.aes.createDecryptionCipher;break;case"des-EDE3-CBC":T=24,I=t.des.createDecryptionCipher;break;case"desCBC":T=8,I=t.des.createDecryptionCipher;break}var v=h(B.prfOid),g=t.pkcs5.pbkdf2(m,y,A,T,v),E=B.encIv,S=I(g);return S.start(E),S},n.pbe.getCipherForPKCS12PBE=function(p,f,m){var B={},C=[];if(!s.validate(f,a,B,C)){var c=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw c.errors=C,c}var y=t.util.createBuffer(B.salt),A=t.util.createBuffer(B.iterations);A=A.getInt(A.length()<<3);var T,I,v;switch(p){case n.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:T=24,I=8,v=t.des.startDecrypting;break;case n.oids["pbewithSHAAnd40BitRC2-CBC"]:T=5,I=8,v=function(K,N){var $=t.rc2.createDecryptionCipher(K,40);return $.start(N,null),$};break;default:var c=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw c.oid=p,c}var g=h(B.prfOid),E=n.pbe.generatePkcs12Key(m,y,1,A,T,g);g.start();var S=n.pbe.generatePkcs12Key(m,y,2,A,I,g);return v(E,S)},n.pbe.opensslDeriveBytes=function(p,f,m,B){if(typeof B==="undefined"||B===null){if(!("md5"in t.md))throw new Error('"md5" hash algorithm unavailable.');B=t.md.md5.create()}if(f===null)f="";var C=[D(B,p+f)];for(var c=16,y=1;c<m;++y,c+=16)C.push(D(B,C[y-1]+p+f));return C.join("").substr(0,m)};function D(p,f){return p.start().update(f).digest().getBytes()}function h(p){var f;if(!p)f="hmacWithSHA1";else if(f=n.oids[s.derToOid(p)],!f){var m=new Error("Unsupported PRF OID.");throw m.oid=p,m.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],m}return d(f)}function d(p){var f=t.md;switch(p){case"hmacWithSHA224":f=t.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":p=p.substr(8).toLowerCase();break;default:var m=new Error("Unsupported PRF algorithm.");throw m.algorithm=p,m.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],m}if(!f||!(p in f))throw new Error("Unknown hash algorithm: "+p);return f[p].create()}function F(p,f,m,B){var C=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,p),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,f.getBytes())]);if(B!=="hmacWithSHA1")C.value.push(s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,t.util.hexToBytes(m.toString(16))),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(n.oids[B]).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]));return C}}),Vf=$e((e,u)=>{var t=Ue();Wu(),Ke();var r=t.asn1,s=u.exports=t.pkcs7asn1=t.pkcs7asn1||{};t.pkcs7=t.pkcs7||{},t.pkcs7.asn1=s;var n={name:"ContentInfo",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:r.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};s.contentInfoValidator=n;var i={name:"EncryptedContentInfo",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:r.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:r.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};s.envelopedDataValidator={name:"EnvelopedData",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:r.Class.UNIVERSAL,type:r.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(i)},s.encryptedDataValidator={name:"EncryptedData",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"version"}].concat(i)};var l={name:"SignerInfo",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:r.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:r.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:r.Class.UNIVERSAL,type:r.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:r.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};s.signedDataValidator={name:"SignedData",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:r.Class.UNIVERSAL,type:r.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},n,{name:"SignedData.Certificates",tagClass:r.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:r.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:r.Class.UNIVERSAL,type:r.Type.SET,capture:"signerInfos",optional:!0,value:[l]}]},s.recipientInfoValidator={name:"RecipientInfo",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:r.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:r.Class.UNIVERSAL,type:r.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}),Kf=$e((e,u)=>{var t=Ue();Ke(),t.mgf=t.mgf||{};var r=u.exports=t.mgf.mgf1=t.mgf1=t.mgf1||{};r.create=function(s){var n={generate:function(i,l){var o=new t.util.ByteBuffer,a=Math.ceil(l/s.digestLength);for(var D=0;D<a;D++){var h=new t.util.ByteBuffer;h.putInt32(D),s.start(),s.update(i+h.getBytes()),o.putBuffer(s.digest())}return o.truncate(o.length()-l),o.getBytes()}};return n}}),xy=$e((e,u)=>{var t=Ue();Kf(),u.exports=t.mgf=t.mgf||{},t.mgf.mgf1=t.mgf1}),w0=$e((e,u)=>{var t=Ue();Nu(),Ke();var r=u.exports=t.pss=t.pss||{};r.create=function(s){if(arguments.length===3)s={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]};var{md:n,mgf:i}=s,l=n.digestLength,o=s.salt||null;if(typeof o==="string")o=t.util.createBuffer(o);var a;if("saltLength"in s)a=s.saltLength;else if(o!==null)a=o.length();else throw new Error("Salt length not specified or specific salt not given.");if(o!==null&&o.length()!==a)throw new Error("Given salt length does not match length of given salt.");var D=s.prng||t.random,h={};return h.encode=function(d,F){var p,f=F-1,m=Math.ceil(f/8),B=d.digest().getBytes();if(m<l+a+2)throw new Error("Message is too long to encrypt.");var C;if(o===null)C=D.getBytesSync(a);else C=o.bytes();var c=new t.util.ByteBuffer;c.fillWithByte(0,8),c.putBytes(B),c.putBytes(C),n.start(),n.update(c.getBytes());var y=n.digest().getBytes(),A=new t.util.ByteBuffer;A.fillWithByte(0,m-a-l-2),A.putByte(1),A.putBytes(C);var T=A.getBytes(),I=m-l-1,v=i.generate(y,I),g="";for(p=0;p<I;p++)g+=String.fromCharCode(T.charCodeAt(p)^v.charCodeAt(p));var E=65280>>8*m-f&255;return g=String.fromCharCode(g.charCodeAt(0)&~E)+g.substr(1),g+y+String.fromCharCode(188)},h.verify=function(d,F,p){var f,m=p-1,B=Math.ceil(m/8);if(F=F.substr(-B),B<l+a+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(F.charCodeAt(B-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var C=B-l-1,c=F.substr(0,C),y=F.substr(C,l),A=65280>>8*B-m&255;if((c.charCodeAt(0)&A)!==0)throw new Error("Bits beyond keysize not zero as expected.");var T=i.generate(y,C),I="";for(f=0;f<C;f++)I+=String.fromCharCode(c.charCodeAt(f)^T.charCodeAt(f));I=String.fromCharCode(I.charCodeAt(0)&~A)+I.substr(1);var v=B-l-a-2;for(f=0;f<v;f++)if(I.charCodeAt(f)!==0)throw new Error("Leftmost octets not zero as expected");if(I.charCodeAt(v)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var g=I.substr(-a),E=new t.util.ByteBuffer;E.fillWithByte(0,8),E.putBytes(d),E.putBytes(g),n.start(),n.update(E.getBytes());var S=n.digest().getBytes();return y===S},h}}),I0=$e((e,u)=>{var t=Ue();Hr(),Wu(),bn(),or(),xy(),Qr(),Si(),w0(),Tn(),Ke();var r=t.asn1,s=u.exports=t.pki=t.pki||{},n=s.oids,i={};i.CN=n.commonName,i.commonName="CN",i.C=n.countryName,i.countryName="C",i.L=n.localityName,i.localityName="L",i.ST=n.stateOrProvinceName,i.stateOrProvinceName="ST",i.O=n.organizationName,i.organizationName="O",i.OU=n.organizationalUnitName,i.organizationalUnitName="OU",i.E=n.emailAddress,i.emailAddress="E";var l=t.pki.rsa.publicKeyValidator,o={name:"Certificate",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:r.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:r.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:r.Class.UNIVERSAL,type:r.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:r.Class.UNIVERSAL,type:r.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:r.Class.UNIVERSAL,type:r.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:r.Class.UNIVERSAL,type:r.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},l,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:r.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:r.Class.UNIVERSAL,type:r.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:r.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:r.Class.UNIVERSAL,type:r.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:r.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:r.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:r.Class.UNIVERSAL,type:r.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},a={name:"rsapss",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:r.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:r.Class.UNIVERSAL,type:r.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:r.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:r.Class.UNIVERSAL,type:r.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:r.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:r.Class.UNIVERSAL,type:r.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:r.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:r.Class.UNIVERSAL,type:r.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},D={name:"CertificationRequestInfo",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},l,{name:"CertificationRequestInfo.attributes",tagClass:r.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:r.Class.UNIVERSAL,type:r.Type.SET,constructed:!0}]}]}]},h={name:"CertificationRequest",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[D,{name:"CertificationRequest.signatureAlgorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:r.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:r.Class.UNIVERSAL,type:r.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};s.RDNAttributesAsArray=function(v,g){var E=[],S,_,K;for(var N=0;N<v.value.length;++N){S=v.value[N];for(var $=0;$<S.value.length;++$){if(K={},_=S.value[$],K.type=r.derToOid(_.value[0].value),K.value=_.value[1].value,K.valueTagClass=_.value[1].type,K.type in n){if(K.name=n[K.type],K.name in i)K.shortName=i[K.name]}if(g)g.update(K.type),g.update(K.value);E.push(K)}}return E},s.CRIAttributesAsArray=function(v){var g=[];for(var E=0;E<v.length;++E){var S=v[E],_=r.derToOid(S.value[0].value),K=S.value[1].value;for(var N=0;N<K.length;++N){var $={};if($.type=_,$.value=K[N].value,$.valueTagClass=K[N].type,$.type in n){if($.name=n[$.type],$.name in i)$.shortName=i[$.name]}if($.type===n.extensionRequest){$.extensions=[];for(var P=0;P<$.value.length;++P)$.extensions.push(s.certificateExtensionFromAsn1($.value[P]))}g.push($)}}return g};function d(v,g){if(typeof g==="string")g={shortName:g};var E=null,S;for(var _=0;E===null&&_<v.attributes.length;++_)if(S=v.attributes[_],g.type&&g.type===S.type)E=S;else if(g.name&&g.name===S.name)E=S;else if(g.shortName&&g.shortName===S.shortName)E=S;return E}var F=function(v,g,E){var S={};if(v!==n["RSASSA-PSS"])return S;if(E)S={hash:{algorithmOid:n.sha1},mgf:{algorithmOid:n.mgf1,hash:{algorithmOid:n.sha1}},saltLength:20};var _={},K=[];if(!r.validate(g,a,_,K)){var N=new Error("Cannot read RSASSA-PSS parameter block.");throw N.errors=K,N}if(_.hashOid!==void 0)S.hash=S.hash||{},S.hash.algorithmOid=r.derToOid(_.hashOid);if(_.maskGenOid!==void 0)S.mgf=S.mgf||{},S.mgf.algorithmOid=r.derToOid(_.maskGenOid),S.mgf.hash=S.mgf.hash||{},S.mgf.hash.algorithmOid=r.derToOid(_.maskGenHashOid);if(_.saltLength!==void 0)S.saltLength=_.saltLength.charCodeAt(0);return S},p=function(v){switch(n[v.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return t.md.sha1.create();case"md5WithRSAEncryption":return t.md.md5.create();case"sha256WithRSAEncryption":return t.md.sha256.create();case"sha384WithRSAEncryption":return t.md.sha384.create();case"sha512WithRSAEncryption":return t.md.sha512.create();case"RSASSA-PSS":return t.md.sha256.create();default:var g=new Error("Could not compute "+v.type+" digest. Unknown signature OID.");throw g.signatureOid=v.signatureOid,g}},f=function(v){var g=v.certificate,E;switch(g.signatureOid){case n.sha1WithRSAEncryption:case n.sha1WithRSASignature:break;case n["RSASSA-PSS"]:var S,_;if(S=n[g.signatureParameters.mgf.hash.algorithmOid],S===void 0||t.md[S]===void 0){var K=new Error("Unsupported MGF hash function.");throw K.oid=g.signatureParameters.mgf.hash.algorithmOid,K.name=S,K}if(_=n[g.signatureParameters.mgf.algorithmOid],_===void 0||t.mgf[_]===void 0){var K=new Error("Unsupported MGF function.");throw K.oid=g.signatureParameters.mgf.algorithmOid,K.name=_,K}if(_=t.mgf[_].create(t.md[S].create()),S=n[g.signatureParameters.hash.algorithmOid],S===void 0||t.md[S]===void 0){var K=new Error("Unsupported RSASSA-PSS hash function.");throw K.oid=g.signatureParameters.hash.algorithmOid,K.name=S,K}E=t.pss.create(t.md[S].create(),_,g.signatureParameters.saltLength);break}return g.publicKey.verify(v.md.digest().getBytes(),v.signature,E)};s.certificateFromPem=function(v,g,E){var S=t.pem.decode(v)[0];if(S.type!=="CERTIFICATE"&&S.type!=="X509 CERTIFICATE"&&S.type!=="TRUSTED CERTIFICATE"){var _=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw _.headerType=S.type,_}if(S.procType&&S.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var K=r.fromDer(S.body,E);return s.certificateFromAsn1(K,g)},s.certificateToPem=function(v,g){var E={type:"CERTIFICATE",body:r.toDer(s.certificateToAsn1(v)).getBytes()};return t.pem.encode(E,{maxline:g})},s.publicKeyFromPem=function(v){var g=t.pem.decode(v)[0];if(g.type!=="PUBLIC KEY"&&g.type!=="RSA PUBLIC KEY"){var E=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw E.headerType=g.type,E}if(g.procType&&g.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var S=r.fromDer(g.body);return s.publicKeyFromAsn1(S)},s.publicKeyToPem=function(v,g){var E={type:"PUBLIC KEY",body:r.toDer(s.publicKeyToAsn1(v)).getBytes()};return t.pem.encode(E,{maxline:g})},s.publicKeyToRSAPublicKeyPem=function(v,g){var E={type:"RSA PUBLIC KEY",body:r.toDer(s.publicKeyToRSAPublicKey(v)).getBytes()};return t.pem.encode(E,{maxline:g})},s.getPublicKeyFingerprint=function(v,g){g=g||{};var E=g.md||t.md.sha1.create(),S=g.type||"RSAPublicKey",_;switch(S){case"RSAPublicKey":_=r.toDer(s.publicKeyToRSAPublicKey(v)).getBytes();break;case"SubjectPublicKeyInfo":_=r.toDer(s.publicKeyToAsn1(v)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+g.type+'".')}E.start(),E.update(_);var K=E.digest();if(g.encoding==="hex"){var N=K.toHex();if(g.delimiter)return N.match(/.{2}/g).join(g.delimiter);return N}else if(g.encoding==="binary")return K.getBytes();else if(g.encoding)throw new Error('Unknown encoding "'+g.encoding+'".');return K},s.certificationRequestFromPem=function(v,g,E){var S=t.pem.decode(v)[0];if(S.type!=="CERTIFICATE REQUEST"){var _=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw _.headerType=S.type,_}if(S.procType&&S.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var K=r.fromDer(S.body,E);return s.certificationRequestFromAsn1(K,g)},s.certificationRequestToPem=function(v,g){var E={type:"CERTIFICATE REQUEST",body:r.toDer(s.certificationRequestToAsn1(v)).getBytes()};return t.pem.encode(E,{maxline:g})},s.createCertificate=function(){var v={};return v.version=2,v.serialNumber="00",v.signatureOid=null,v.signature=null,v.siginfo={},v.siginfo.algorithmOid=null,v.validity={},v.validity.notBefore=new Date,v.validity.notAfter=new Date,v.issuer={},v.issuer.getField=function(g){return d(v.issuer,g)},v.issuer.addField=function(g){B([g]),v.issuer.attributes.push(g)},v.issuer.attributes=[],v.issuer.hash=null,v.subject={},v.subject.getField=function(g){return d(v.subject,g)},v.subject.addField=function(g){B([g]),v.subject.attributes.push(g)},v.subject.attributes=[],v.subject.hash=null,v.extensions=[],v.publicKey=null,v.md=null,v.setSubject=function(g,E){if(B(g),v.subject.attributes=g,delete v.subject.uniqueId,E)v.subject.uniqueId=E;v.subject.hash=null},v.setIssuer=function(g,E){if(B(g),v.issuer.attributes=g,delete v.issuer.uniqueId,E)v.issuer.uniqueId=E;v.issuer.hash=null},v.setExtensions=function(g){for(var E=0;E<g.length;++E)C(g[E],{cert:v});v.extensions=g},v.getExtension=function(g){if(typeof g==="string")g={name:g};var E=null,S;for(var _=0;E===null&&_<v.extensions.length;++_)if(S=v.extensions[_],g.id&&S.id===g.id)E=S;else if(g.name&&S.name===g.name)E=S;return E},v.sign=function(g,E){v.md=E||t.md.sha1.create();var S=n[v.md.algorithm+"WithRSAEncryption"];if(!S){var _=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw _.algorithm=v.md.algorithm,_}v.signatureOid=v.siginfo.algorithmOid=S,v.tbsCertificate=s.getTBSCertificate(v);var K=r.toDer(v.tbsCertificate);v.md.update(K.getBytes()),v.signature=g.sign(v.md)},v.verify=function(g){var E=!1;if(!v.issued(g)){var S=g.issuer,_=v.subject,K=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw K.expectedIssuer=_.attributes,K.actualIssuer=S.attributes,K}var N=g.md;if(N===null){N=p({signatureOid:g.signatureOid,type:"certificate"});var $=g.tbsCertificate||s.getTBSCertificate(g),P=r.toDer($);N.update(P.getBytes())}if(N!==null)E=f({certificate:v,md:N,signature:g.signature});return E},v.isIssuer=function(g){var E=!1,S=v.issuer,_=g.subject;if(S.hash&&_.hash)E=S.hash===_.hash;else if(S.attributes.length===_.attributes.length){E=!0;var K,N;for(var $=0;E&&$<S.attributes.length;++$)if(K=S.attributes[$],N=_.attributes[$],K.type!==N.type||K.value!==N.value)E=!1}return E},v.issued=function(g){return g.isIssuer(v)},v.generateSubjectKeyIdentifier=function(){return s.getPublicKeyFingerprint(v.publicKey,{type:"RSAPublicKey"})},v.verifySubjectKeyIdentifier=function(){var g=n.subjectKeyIdentifier;for(var E=0;E<v.extensions.length;++E){var S=v.extensions[E];if(S.id===g){var _=v.generateSubjectKeyIdentifier().getBytes();return t.util.hexToBytes(S.subjectKeyIdentifier)===_}}return!1},v},s.certificateFromAsn1=function(v,g){var E={},S=[];if(!r.validate(v,o,E,S)){var _=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw _.errors=S,_}var K=r.derToOid(E.publicKeyOid);if(K!==s.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var N=s.createCertificate();N.version=E.certVersion?E.certVersion.charCodeAt(0):0;var $=t.util.createBuffer(E.certSerialNumber);N.serialNumber=$.toHex(),N.signatureOid=t.asn1.derToOid(E.certSignatureOid),N.signatureParameters=F(N.signatureOid,E.certSignatureParams,!0),N.siginfo.algorithmOid=t.asn1.derToOid(E.certinfoSignatureOid),N.siginfo.parameters=F(N.siginfo.algorithmOid,E.certinfoSignatureParams,!1),N.signature=E.certSignature;var P=[];if(E.certValidity1UTCTime!==void 0)P.push(r.utcTimeToDate(E.certValidity1UTCTime));if(E.certValidity2GeneralizedTime!==void 0)P.push(r.generalizedTimeToDate(E.certValidity2GeneralizedTime));if(E.certValidity3UTCTime!==void 0)P.push(r.utcTimeToDate(E.certValidity3UTCTime));if(E.certValidity4GeneralizedTime!==void 0)P.push(r.generalizedTimeToDate(E.certValidity4GeneralizedTime));if(P.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(P.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(N.validity.notBefore=P[0],N.validity.notAfter=P[1],N.tbsCertificate=E.tbsCertificate,g){N.md=p({signatureOid:N.signatureOid,type:"certificate"});var V=r.toDer(N.tbsCertificate);N.md.update(V.getBytes())}var k=t.md.sha1.create(),W=r.toDer(E.certIssuer);if(k.update(W.getBytes()),N.issuer.getField=function(x){return d(N.issuer,x)},N.issuer.addField=function(x){B([x]),N.issuer.attributes.push(x)},N.issuer.attributes=s.RDNAttributesAsArray(E.certIssuer),E.certIssuerUniqueId)N.issuer.uniqueId=E.certIssuerUniqueId;N.issuer.hash=k.digest().toHex();var Q=t.md.sha1.create(),z=r.toDer(E.certSubject);if(Q.update(z.getBytes()),N.subject.getField=function(x){return d(N.subject,x)},N.subject.addField=function(x){B([x]),N.subject.attributes.push(x)},N.subject.attributes=s.RDNAttributesAsArray(E.certSubject),E.certSubjectUniqueId)N.subject.uniqueId=E.certSubjectUniqueId;if(N.subject.hash=Q.digest().toHex(),E.certExtensions)N.extensions=s.certificateExtensionsFromAsn1(E.certExtensions);else N.extensions=[];return N.publicKey=s.publicKeyFromAsn1(E.subjectPublicKeyInfo),N},s.certificateExtensionsFromAsn1=function(v){var g=[];for(var E=0;E<v.value.length;++E){var S=v.value[E];for(var _=0;_<S.value.length;++_)g.push(s.certificateExtensionFromAsn1(S.value[_]))}return g},s.certificateExtensionFromAsn1=function(v){var g={};if(g.id=r.derToOid(v.value[0].value),g.critical=!1,v.value[1].type===r.Type.BOOLEAN)g.critical=v.value[1].value.charCodeAt(0)!==0,g.value=v.value[2].value;else g.value=v.value[1].value;if(g.id in n){if(g.name=n[g.id],g.name==="keyUsage"){var E=r.fromDer(g.value),S=0,_=0;if(E.value.length>1)S=E.value.charCodeAt(1),_=E.value.length>2?E.value.charCodeAt(2):0;g.digitalSignature=(S&128)===128,g.nonRepudiation=(S&64)===64,g.keyEncipherment=(S&32)===32,g.dataEncipherment=(S&16)===16,g.keyAgreement=(S&8)===8,g.keyCertSign=(S&4)===4,g.cRLSign=(S&2)===2,g.encipherOnly=(S&1)===1,g.decipherOnly=(_&128)===128}else if(g.name==="basicConstraints"){var E=r.fromDer(g.value);if(E.value.length>0&&E.value[0].type===r.Type.BOOLEAN)g.cA=E.value[0].value.charCodeAt(0)!==0;else g.cA=!1;var K=null;if(E.value.length>0&&E.value[0].type===r.Type.INTEGER)K=E.value[0].value;else if(E.value.length>1)K=E.value[1].value;if(K!==null)g.pathLenConstraint=r.derToInteger(K)}else if(g.name==="extKeyUsage"){var E=r.fromDer(g.value);for(var N=0;N<E.value.length;++N){var $=r.derToOid(E.value[N].value);if($ in n)g[n[$]]=!0;else g[$]=!0}}else if(g.name==="nsCertType"){var E=r.fromDer(g.value),S=0;if(E.value.length>1)S=E.value.charCodeAt(1);g.client=(S&128)===128,g.server=(S&64)===64,g.email=(S&32)===32,g.objsign=(S&16)===16,g.reserved=(S&8)===8,g.sslCA=(S&4)===4,g.emailCA=(S&2)===2,g.objCA=(S&1)===1}else if(g.name==="subjectAltName"||g.name==="issuerAltName"){g.altNames=[];var P,E=r.fromDer(g.value);for(var V=0;V<E.value.length;++V){P=E.value[V];var k={type:P.type,value:P.value};switch(g.altNames.push(k),P.type){case 1:case 2:case 6:break;case 7:k.ip=t.util.bytesToIP(P.value);break;case 8:k.oid=r.derToOid(P.value);break;default:}}}else if(g.name==="subjectKeyIdentifier"){var E=r.fromDer(g.value);g.subjectKeyIdentifier=t.util.bytesToHex(E.value)}}return g},s.certificationRequestFromAsn1=function(v,g){var E={},S=[];if(!r.validate(v,h,E,S)){var _=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw _.errors=S,_}var K=r.derToOid(E.publicKeyOid);if(K!==s.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var N=s.createCertificationRequest();if(N.version=E.csrVersion?E.csrVersion.charCodeAt(0):0,N.signatureOid=t.asn1.derToOid(E.csrSignatureOid),N.signatureParameters=F(N.signatureOid,E.csrSignatureParams,!0),N.siginfo.algorithmOid=t.asn1.derToOid(E.csrSignatureOid),N.siginfo.parameters=F(N.siginfo.algorithmOid,E.csrSignatureParams,!1),N.signature=E.csrSignature,N.certificationRequestInfo=E.certificationRequestInfo,g){N.md=p({signatureOid:N.signatureOid,type:"certification request"});var $=r.toDer(N.certificationRequestInfo);N.md.update($.getBytes())}var P=t.md.sha1.create();return N.subject.getField=function(V){return d(N.subject,V)},N.subject.addField=function(V){B([V]),N.subject.attributes.push(V)},N.subject.attributes=s.RDNAttributesAsArray(E.certificationRequestInfoSubject,P),N.subject.hash=P.digest().toHex(),N.publicKey=s.publicKeyFromAsn1(E.subjectPublicKeyInfo),N.getAttribute=function(V){return d(N,V)},N.addAttribute=function(V){B([V]),N.attributes.push(V)},N.attributes=s.CRIAttributesAsArray(E.certificationRequestInfoAttributes||[]),N},s.createCertificationRequest=function(){var v={};return v.version=0,v.signatureOid=null,v.signature=null,v.siginfo={},v.siginfo.algorithmOid=null,v.subject={},v.subject.getField=function(g){return d(v.subject,g)},v.subject.addField=function(g){B([g]),v.subject.attributes.push(g)},v.subject.attributes=[],v.subject.hash=null,v.publicKey=null,v.attributes=[],v.getAttribute=function(g){return d(v,g)},v.addAttribute=function(g){B([g]),v.attributes.push(g)},v.md=null,v.setSubject=function(g){B(g),v.subject.attributes=g,v.subject.hash=null},v.setAttributes=function(g){B(g),v.attributes=g},v.sign=function(g,E){v.md=E||t.md.sha1.create();var S=n[v.md.algorithm+"WithRSAEncryption"];if(!S){var _=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw _.algorithm=v.md.algorithm,_}v.signatureOid=v.siginfo.algorithmOid=S,v.certificationRequestInfo=s.getCertificationRequestInfo(v);var K=r.toDer(v.certificationRequestInfo);v.md.update(K.getBytes()),v.signature=g.sign(v.md)},v.verify=function(){var g=!1,E=v.md;if(E===null){E=p({signatureOid:v.signatureOid,type:"certification request"});var S=v.certificationRequestInfo||s.getCertificationRequestInfo(v),_=r.toDer(S);E.update(_.getBytes())}if(E!==null)g=f({certificate:v,md:E,signature:v.signature});return g},v};function m(v){var g=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[]),E,S,_=v.attributes;for(var K=0;K<_.length;++K){E=_[K];var N=E.value,$=r.Type.PRINTABLESTRING;if("valueTagClass"in E){if($=E.valueTagClass,$===r.Type.UTF8)N=t.util.encodeUtf8(N)}S=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(E.type).getBytes()),r.create(r.Class.UNIVERSAL,$,!1,N)])]),g.value.push(S)}return g}function B(v){var g;for(var E=0;E<v.length;++E){if(g=v[E],typeof g.name==="undefined"){if(g.type&&g.type in s.oids)g.name=s.oids[g.type];else if(g.shortName&&g.shortName in i)g.name=s.oids[i[g.shortName]]}if(typeof g.type==="undefined")if(g.name&&g.name in s.oids)g.type=s.oids[g.name];else{var S=new Error("Attribute type not specified.");throw S.attribute=g,S}if(typeof g.shortName==="undefined"){if(g.name&&g.name in i)g.shortName=i[g.name]}if(g.type===n.extensionRequest){if(g.valueConstructed=!0,g.valueTagClass=r.Type.SEQUENCE,!g.value&&g.extensions){g.value=[];for(var _=0;_<g.extensions.length;++_)g.value.push(s.certificateExtensionToAsn1(C(g.extensions[_])))}}if(typeof g.value==="undefined"){var S=new Error("Attribute value not specified.");throw S.attribute=g,S}}}function C(v,g){if(g=g||{},typeof v.name==="undefined"){if(v.id&&v.id in s.oids)v.name=s.oids[v.id]}if(typeof v.id==="undefined")if(v.name&&v.name in s.oids)v.id=s.oids[v.name];else{var E=new Error("Extension ID not specified.");throw E.extension=v,E}if(typeof v.value!=="undefined")return v;if(v.name==="keyUsage"){var S=0,_=0,K=0;if(v.digitalSignature)_|=128,S=7;if(v.nonRepudiation)_|=64,S=6;if(v.keyEncipherment)_|=32,S=5;if(v.dataEncipherment)_|=16,S=4;if(v.keyAgreement)_|=8,S=3;if(v.keyCertSign)_|=4,S=2;if(v.cRLSign)_|=2,S=1;if(v.encipherOnly)_|=1,S=0;if(v.decipherOnly)K|=128,S=7;var N=String.fromCharCode(S);if(K!==0)N+=String.fromCharCode(_)+String.fromCharCode(K);else if(_!==0)N+=String.fromCharCode(_);v.value=r.create(r.Class.UNIVERSAL,r.Type.BITSTRING,!1,N)}else if(v.name==="basicConstraints"){if(v.value=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[]),v.cA)v.value.value.push(r.create(r.Class.UNIVERSAL,r.Type.BOOLEAN,!1,String.fromCharCode(255)));if("pathLenConstraint"in v)v.value.value.push(r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(v.pathLenConstraint).getBytes()))}else if(v.name==="extKeyUsage"){v.value=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[]);var $=v.value.value;for(var P in v){if(v[P]!==!0)continue;if(P in n)$.push(r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(n[P]).getBytes()));else if(P.indexOf(".")!==-1)$.push(r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(P).getBytes()))}}else if(v.name==="nsCertType"){var S=0,_=0;if(v.client)_|=128,S=7;if(v.server)_|=64,S=6;if(v.email)_|=32,S=5;if(v.objsign)_|=16,S=4;if(v.reserved)_|=8,S=3;if(v.sslCA)_|=4,S=2;if(v.emailCA)_|=2,S=1;if(v.objCA)_|=1,S=0;var N=String.fromCharCode(S);if(_!==0)N+=String.fromCharCode(_);v.value=r.create(r.Class.UNIVERSAL,r.Type.BITSTRING,!1,N)}else if(v.name==="subjectAltName"||v.name==="issuerAltName"){v.value=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[]);var V;for(var k=0;k<v.altNames.length;++k){V=v.altNames[k];var N=V.value;if(V.type===7&&V.ip){if(N=t.util.bytesFromIP(V.ip),N===null){var E=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw E.extension=v,E}}else if(V.type===8)if(V.oid)N=r.oidToDer(r.oidToDer(V.oid));else N=r.oidToDer(N);v.value.value.push(r.create(r.Class.CONTEXT_SPECIFIC,V.type,!1,N))}}else if(v.name==="nsComment"&&g.cert){if(!/^[\x00-\x7F]*$/.test(v.comment)||v.comment.length<1||v.comment.length>128)throw new Error('Invalid "nsComment" content.');v.value=r.create(r.Class.UNIVERSAL,r.Type.IA5STRING,!1,v.comment)}else if(v.name==="subjectKeyIdentifier"&&g.cert){var W=g.cert.generateSubjectKeyIdentifier();v.subjectKeyIdentifier=W.toHex(),v.value=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,W.getBytes())}else if(v.name==="authorityKeyIdentifier"&&g.cert){v.value=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[]);var $=v.value.value;if(v.keyIdentifier){var Q=v.keyIdentifier===!0?g.cert.generateSubjectKeyIdentifier().getBytes():v.keyIdentifier;$.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!1,Q))}if(v.authorityCertIssuer){var z=[r.create(r.Class.CONTEXT_SPECIFIC,4,!0,[m(v.authorityCertIssuer===!0?g.cert.issuer:v.authorityCertIssuer)])];$.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,z))}if(v.serialNumber){var x=t.util.hexToBytes(v.serialNumber===!0?g.cert.serialNumber:v.serialNumber);$.push(r.create(r.Class.CONTEXT_SPECIFIC,2,!1,x))}}else if(v.name==="cRLDistributionPoints"){v.value=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[]);var $=v.value.value,ne=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[]),Ee=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]),V;for(var k=0;k<v.altNames.length;++k){V=v.altNames[k];var N=V.value;if(V.type===7&&V.ip){if(N=t.util.bytesFromIP(V.ip),N===null){var E=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw E.extension=v,E}}else if(V.type===8)if(V.oid)N=r.oidToDer(r.oidToDer(V.oid));else N=r.oidToDer(N);Ee.value.push(r.create(r.Class.CONTEXT_SPECIFIC,V.type,!1,N))}ne.value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[Ee])),$.push(ne)}if(typeof v.value==="undefined"){var E=new Error("Extension value not specified.");throw E.extension=v,E}return v}function c(v,g){switch(v){case n["RSASSA-PSS"]:var E=[];if(g.hash.algorithmOid!==void 0)E.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g.hash.algorithmOid).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]));if(g.mgf.algorithmOid!==void 0)E.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g.mgf.algorithmOid).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(g.mgf.hash.algorithmOid).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])])]));if(g.saltLength!==void 0)E.push(r.create(r.Class.CONTEXT_SPECIFIC,2,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(g.saltLength).getBytes())]));return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,E);default:return r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")}}function y(v){var g=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);if(v.attributes.length===0)return g;var E=v.attributes;for(var S=0;S<E.length;++S){var _=E[S],K=_.value,N=r.Type.UTF8;if("valueTagClass"in _)N=_.valueTagClass;if(N===r.Type.UTF8)K=t.util.encodeUtf8(K);var $=!1;if("valueConstructed"in _)$=_.valueConstructed;var P=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(_.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[r.create(r.Class.UNIVERSAL,N,$,K)])]);g.value.push(P)}return g}var A=new Date("1950-01-01T00:00:00Z"),T=new Date("2050-01-01T00:00:00Z");function I(v){if(v>=A&&v<T)return r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(v));else return r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(v))}s.getTBSCertificate=function(v){var g=I(v.validity.notBefore),E=I(v.validity.notAfter),S=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(v.version).getBytes())]),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,t.util.hexToBytes(v.serialNumber)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(v.siginfo.algorithmOid).getBytes()),c(v.siginfo.algorithmOid,v.siginfo.parameters)]),m(v.issuer),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[g,E]),m(v.subject),s.publicKeyToAsn1(v.publicKey)]);if(v.issuer.uniqueId)S.value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[r.create(r.Class.UNIVERSAL,r.Type.BITSTRING,!1,String.fromCharCode(0)+v.issuer.uniqueId)]));if(v.subject.uniqueId)S.value.push(r.create(r.Class.CONTEXT_SPECIFIC,2,!0,[r.create(r.Class.UNIVERSAL,r.Type.BITSTRING,!1,String.fromCharCode(0)+v.subject.uniqueId)]));if(v.extensions.length>0)S.value.push(s.certificateExtensionsToAsn1(v.extensions));return S},s.getCertificationRequestInfo=function(v){var g=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(v.version).getBytes()),m(v.subject),s.publicKeyToAsn1(v.publicKey),y(v)]);return g},s.distinguishedNameToAsn1=function(v){return m(v)},s.certificateToAsn1=function(v){var g=v.tbsCertificate||s.getTBSCertificate(v);return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[g,r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(v.signatureOid).getBytes()),c(v.signatureOid,v.signatureParameters)]),r.create(r.Class.UNIVERSAL,r.Type.BITSTRING,!1,String.fromCharCode(0)+v.signature)])},s.certificateExtensionsToAsn1=function(v){var g=r.create(r.Class.CONTEXT_SPECIFIC,3,!0,[]),E=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[]);g.value.push(E);for(var S=0;S<v.length;++S)E.value.push(s.certificateExtensionToAsn1(v[S]));return g},s.certificateExtensionToAsn1=function(v){var g=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[]);if(g.value.push(r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(v.id).getBytes())),v.critical)g.value.push(r.create(r.Class.UNIVERSAL,r.Type.BOOLEAN,!1,String.fromCharCode(255)));var E=v.value;if(typeof v.value!=="string")E=r.toDer(E).getBytes();return g.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,E)),g},s.certificationRequestToAsn1=function(v){var g=v.certificationRequestInfo||s.getCertificationRequestInfo(v);return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[g,r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(v.signatureOid).getBytes()),c(v.signatureOid,v.signatureParameters)]),r.create(r.Class.UNIVERSAL,r.Type.BITSTRING,!1,String.fromCharCode(0)+v.signature)])},s.createCaStore=function(v){var g={certs:{}};g.getIssuer=function(N){var $=E(N.issuer);return $},g.addCertificate=function(N){if(typeof N==="string")N=t.pki.certificateFromPem(N);if(S(N.subject),!g.hasCertificate(N))if(N.subject.hash in g.certs){var $=g.certs[N.subject.hash];if(!t.util.isArray($))$=[$];$.push(N),g.certs[N.subject.hash]=$}else g.certs[N.subject.hash]=N},g.hasCertificate=function(N){if(typeof N==="string")N=t.pki.certificateFromPem(N);var $=E(N.subject);if(!$)return!1;if(!t.util.isArray($))$=[$];var P=r.toDer(s.certificateToAsn1(N)).getBytes();for(var V=0;V<$.length;++V){var k=r.toDer(s.certificateToAsn1($[V])).getBytes();if(P===k)return!0}return!1},g.listAllCertificates=function(){var N=[];for(var $ in g.certs)if(g.certs.hasOwnProperty($)){var P=g.certs[$];if(!t.util.isArray(P))N.push(P);else for(var V=0;V<P.length;++V)N.push(P[V])}return N},g.removeCertificate=function(N){var $;if(typeof N==="string")N=t.pki.certificateFromPem(N);if(S(N.subject),!g.hasCertificate(N))return null;var P=E(N.subject);if(!t.util.isArray(P))return $=g.certs[N.subject.hash],delete g.certs[N.subject.hash],$;var V=r.toDer(s.certificateToAsn1(N)).getBytes();for(var k=0;k<P.length;++k){var W=r.toDer(s.certificateToAsn1(P[k])).getBytes();if(V===W)$=P[k],P.splice(k,1)}if(P.length===0)delete g.certs[N.subject.hash];return $};function E(N){return S(N),g.certs[N.hash]||null}function S(N){if(!N.hash){var $=t.md.sha1.create();N.attributes=s.RDNAttributesAsArray(m(N),$),N.hash=$.digest().toHex()}}if(v)for(var _=0;_<v.length;++_){var K=v[_];g.addCertificate(K)}return g},s.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},s.verifyCertificateChain=function(v,g,E){if(typeof E==="function")E={verify:E};E=E||{},g=g.slice(0);var S=g.slice(0),_=E.validityCheckDate;if(typeof _==="undefined")_=new Date;var K=!0,N=null,$=0;do{var P=g.shift(),V=null,k=!1;if(_){if(_<P.validity.notBefore||_>P.validity.notAfter)N={message:"Certificate is not valid yet or has expired.",error:s.certificateError.certificate_expired,notBefore:P.validity.notBefore,notAfter:P.validity.notAfter,now:_}}if(N===null){if(V=g[0]||v.getIssuer(P),V===null){if(P.isIssuer(P))k=!0,V=P}if(V){var W=V;if(!t.util.isArray(W))W=[W];var Q=!1;while(!Q&&W.length>0){V=W.shift();try{Q=V.verify(P)}catch(Ie){}}if(!Q)N={message:"Certificate signature is invalid.",error:s.certificateError.bad_certificate}}if(N===null&&(!V||k)&&!v.hasCertificate(P))N={message:"Certificate is not trusted.",error:s.certificateError.unknown_ca}}if(N===null&&V&&!P.isIssuer(V))N={message:"Certificate issuer is invalid.",error:s.certificateError.bad_certificate};if(N===null){var z={keyUsage:!0,basicConstraints:!0};for(var x=0;N===null&&x<P.extensions.length;++x){var ne=P.extensions[x];if(ne.critical&&!(ne.name in z))N={message:"Certificate has an unsupported critical extension.",error:s.certificateError.unsupported_certificate}}}if(N===null&&(!K||g.length===0&&(!V||k))){var Ee=P.getExtension("basicConstraints"),Fe=P.getExtension("keyUsage");if(Fe!==null){if(!Fe.keyCertSign||Ee===null)N={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:s.certificateError.bad_certificate}}if(N===null&&Ee!==null&&!Ee.cA)N={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:s.certificateError.bad_certificate};if(N===null&&Fe!==null&&"pathLenConstraint"in Ee){var J=$-1;if(J>Ee.pathLenConstraint)N={message:"Certificate basicConstraints pathLenConstraint violated.",error:s.certificateError.bad_certificate}}}var ye=N===null?!0:N.error,se=E.verify?E.verify(ye,$,S):ye;if(se===!0)N=null;else{if(ye===!0)N={message:"The application rejected the certificate.",error:s.certificateError.bad_certificate};if(se||se===0){if(typeof se==="object"&&!t.util.isArray(se)){if(se.message)N.message=se.message;if(se.error)N.error=se.error}else if(typeof se==="string")N.error=se}throw N}K=!1,++$}while(g.length>0);return!0}}),Gf=$e((e,u)=>{var t=Ue();Wu(),ss(),Qr(),Vf(),kf(),Nu(),Tn(),ns(),Ke(),I0();var{asn1:r,pki:s}=t,n=u.exports=t.pkcs12=t.pkcs12||{},i={name:"ContentInfo",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:r.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},l={name:"PFX",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,capture:"version"},i,{name:"PFX.macData",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:r.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:r.Class.UNIVERSAL,type:r.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:r.Class.UNIVERSAL,type:r.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:r.Class.UNIVERSAL,type:r.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},o={name:"SafeBag",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:r.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:r.Class.UNIVERSAL,type:r.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},a={name:"Attribute",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:r.Class.UNIVERSAL,type:r.Type.SET,constructed:!0,capture:"values"}]},D={name:"CertBag",tagClass:r.Class.UNIVERSAL,type:r.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:r.Class.UNIVERSAL,type:r.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:r.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:r.Class.UNIVERSAL,type:r.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function h(B,C,c,y){var A=[];for(var T=0;T<B.length;T++)for(var I=0;I<B[T].safeBags.length;I++){var v=B[T].safeBags[I];if(y!==void 0&&v.type!==y)continue;if(C===null){A.push(v);continue}if(v.attributes[C]!==void 0&&v.attributes[C].indexOf(c)>=0)A.push(v)}return A}n.pkcs12FromAsn1=function(B,C,c){if(typeof C==="string")c=C,C=!0;else if(C===void 0)C=!0;var y={},A=[];if(!r.validate(B,l,y,A)){var T=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw T.errors=T,T}var I={version:y.version.charCodeAt(0),safeContents:[],getBags:function(V){var k={},W;if("localKeyId"in V)W=V.localKeyId;else if("localKeyIdHex"in V)W=t.util.hexToBytes(V.localKeyIdHex);if(W===void 0&&!("friendlyName"in V)&&"bagType"in V)k[V.bagType]=h(I.safeContents,null,null,V.bagType);if(W!==void 0)k.localKeyId=h(I.safeContents,"localKeyId",W,V.bagType);if("friendlyName"in V)k.friendlyName=h(I.safeContents,"friendlyName",V.friendlyName,V.bagType);return k},getBagsByFriendlyName:function(V,k){return h(I.safeContents,"friendlyName",V,k)},getBagsByLocalKeyId:function(V,k){return h(I.safeContents,"localKeyId",V,k)}};if(y.version.charCodeAt(0)!==3){var T=new Error("PKCS#12 PFX of version other than 3 not supported.");throw T.version=y.version.charCodeAt(0),T}if(r.derToOid(y.contentType)!==s.oids.data){var T=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw T.oid=r.derToOid(y.contentType),T}var v=y.content.value[0];if(v.tagClass!==r.Class.UNIVERSAL||v.type!==r.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(v=d(v),y.mac){var g=null,E=0,S=r.derToOid(y.macAlgorithm);switch(S){case s.oids.sha1:g=t.md.sha1.create(),E=20;break;case s.oids.sha256:g=t.md.sha256.create(),E=32;break;case s.oids.sha384:g=t.md.sha384.create(),E=48;break;case s.oids.sha512:g=t.md.sha512.create(),E=64;break;case s.oids.md5:g=t.md.md5.create(),E=16;break}if(g===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+S);var _=new t.util.ByteBuffer(y.macSalt),K="macIterations"in y?parseInt(t.util.bytesToHex(y.macIterations),16):1,N=n.generateKey(c,_,3,K,E,g),$=t.hmac.create();$.start(g,N),$.update(v.value);var P=$.getMac();if(P.getBytes()!==y.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return F(I,v.value,C,c),I};function d(B){if(B.composed||B.constructed){var C=t.util.createBuffer();for(var c=0;c<B.value.length;++c)C.putBytes(B.value[c].value);B.composed=B.constructed=!1,B.value=C.getBytes()}return B}function F(B,C,c,y){if(C=r.fromDer(C,c),C.tagClass!==r.Class.UNIVERSAL||C.type!==r.Type.SEQUENCE||C.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var A=0;A<C.value.length;A++){var T=C.value[A],I={},v=[];if(!r.validate(T,i,I,v)){var g=new Error("Cannot read ContentInfo.");throw g.errors=v,g}var E={encrypted:!1},S=null,_=I.content.value[0];switch(r.derToOid(I.contentType)){case s.oids.data:if(_.tagClass!==r.Class.UNIVERSAL||_.type!==r.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");S=d(_).value;break;case s.oids.encryptedData:S=p(_,y),E.encrypted=!0;break;default:var g=new Error("Unsupported PKCS#12 contentType.");throw g.contentType=r.derToOid(I.contentType),g}E.safeBags=f(S,c,y),B.safeContents.push(E)}}function p(B,C){var c={},y=[];if(!r.validate(B,t.pkcs7.asn1.encryptedDataValidator,c,y)){var A=new Error("Cannot read EncryptedContentInfo.");throw A.errors=y,A}var T=r.derToOid(c.contentType);if(T!==s.oids.data){var A=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw A.oid=T,A}T=r.derToOid(c.encAlgorithm);var I=s.pbe.getCipher(T,c.encParameter,C),v=d(c.encryptedContentAsn1),g=t.util.createBuffer(v.value);if(I.update(g),!I.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return I.output.getBytes()}function f(B,C,c){if(!C&&B.length===0)return[];if(B=r.fromDer(B,C),B.tagClass!==r.Class.UNIVERSAL||B.type!==r.Type.SEQUENCE||B.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");var y=[];for(var A=0;A<B.value.length;A++){var T=B.value[A],I={},v=[];if(!r.validate(T,o,I,v)){var g=new Error("Cannot read SafeBag.");throw g.errors=v,g}var E={type:r.derToOid(I.bagId),attributes:m(I.bagAttributes)};y.push(E);var S,_,K=I.bagValue.value[0];switch(E.type){case s.oids.pkcs8ShroudedKeyBag:if(K=s.decryptPrivateKeyInfo(K,c),K===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case s.oids.keyBag:try{E.key=s.privateKeyFromAsn1(K)}catch($){E.key=null,E.asn1=K}continue;case s.oids.certBag:S=D,_=function(){if(r.derToOid(I.certId)!==s.oids.x509Certificate){var $=new Error("Unsupported certificate type, only X.509 supported.");throw $.oid=r.derToOid(I.certId),$}var P=r.fromDer(I.cert,C);try{E.cert=s.certificateFromAsn1(P,!0)}catch(V){E.cert=null,E.asn1=P}};break;default:var g=new Error("Unsupported PKCS#12 SafeBag type.");throw g.oid=E.type,g}if(S!==void 0&&!r.validate(K,S,I,v)){var g=new Error("Cannot read PKCS#12 "+S.name);throw g.errors=v,g}_()}return y}function m(B){var C={};if(B!==void 0)for(var c=0;c<B.length;++c){var y={},A=[];if(!r.validate(B[c],a,y,A)){var T=new Error("Cannot read PKCS#12 BagAttribute.");throw T.errors=A,T}var I=r.derToOid(y.oid);if(s.oids[I]===void 0)continue;C[s.oids[I]]=[];for(var v=0;v<y.values.length;++v)C[s.oids[I]].push(y.values[v].value)}return C}n.toPkcs12Asn1=function(B,C,c,y){if(y=y||{},y.saltSize=y.saltSize||8,y.count=y.count||2048,y.algorithm=y.algorithm||y.encAlgorithm||"aes128",!("useMac"in y))y.useMac=!0;if(!("localKeyId"in y))y.localKeyId=null;if(!("generateLocalKeyId"in y))y.generateLocalKeyId=!0;var A=y.localKeyId,T;if(A!==null)A=t.util.hexToBytes(A);else if(y.generateLocalKeyId)if(C){var I=t.util.isArray(C)?C[0]:C;if(typeof I==="string")I=s.certificateFromPem(I);var v=t.md.sha1.create();v.update(r.toDer(s.certificateToAsn1(I)).getBytes()),A=v.digest().getBytes()}else A=t.random.getBytes(20);var g=[];if(A!==null)g.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(s.oids.localKeyId).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,A)])]));if("friendlyName"in y)g.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(s.oids.friendlyName).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[r.create(r.Class.UNIVERSAL,r.Type.BMPSTRING,!1,y.friendlyName)])]));if(g.length>0)T=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,g);var E=[],S=[];if(C!==null)if(t.util.isArray(C))S=C;else S=[C];var _=[];for(var K=0;K<S.length;++K){if(C=S[K],typeof C==="string")C=s.certificateFromPem(C);var N=K===0?T:void 0,$=s.certificateToAsn1(C),P=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(s.oids.certBag).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(s.oids.x509Certificate).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,r.toDer($).getBytes())])])]),N]);_.push(P)}if(_.length>0){var V=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,_),k=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(s.oids.data).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,r.toDer(V).getBytes())])]);E.push(k)}var W=null;if(B!==null){var Q=s.wrapRsaPrivateKey(s.privateKeyToAsn1(B));if(c===null)W=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(s.oids.keyBag).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[Q]),T]);else W=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(s.oids.pkcs8ShroudedKeyBag).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[s.encryptPrivateKeyInfo(Q,c,y)]),T]);var z=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[W]),x=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(s.oids.data).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,r.toDer(z).getBytes())])]);E.push(x)}var ne=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,E),Ee;if(y.useMac){var v=t.md.sha1.create(),Fe=new t.util.ByteBuffer(t.random.getBytes(y.saltSize)),J=y.count,B=n.generateKey(c,Fe,3,J,20),ye=t.hmac.create();ye.start(v,B),ye.update(r.toDer(ne).getBytes());var se=ye.getMac();Ee=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(s.oids.sha1).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,se.getBytes())]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,Fe.getBytes()),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(J).getBytes())])}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(3).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(s.oids.data).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,r.toDer(ne).getBytes())])]),Ee])},n.generateKey=t.pbe.generatePkcs12Key}),jf=$e((e,u)=>{var t=Ue();Wu(),Qr(),kf(),Si(),T0(),Gf(),w0(),Tn(),Ke(),I0();var r=t.asn1,s=u.exports=t.pki=t.pki||{};s.pemToDer=function(n){var i=t.pem.decode(n)[0];if(i.procType&&i.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return t.util.createBuffer(i.body)},s.privateKeyFromPem=function(n){var i=t.pem.decode(n)[0];if(i.type!=="PRIVATE KEY"&&i.type!=="RSA PRIVATE KEY"){var l=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw l.headerType=i.type,l}if(i.procType&&i.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var o=r.fromDer(i.body);return s.privateKeyFromAsn1(o)},s.privateKeyToPem=function(n,i){var l={type:"RSA PRIVATE KEY",body:r.toDer(s.privateKeyToAsn1(n)).getBytes()};return t.pem.encode(l,{maxline:i})},s.privateKeyInfoToPem=function(n,i){var l={type:"PRIVATE KEY",body:r.toDer(n).getBytes()};return t.pem.encode(l,{maxline:i})}}),Wf=$e((e,u)=>{var t=Ue();Wu(),ss(),S0(),Si(),jf(),Nu(),ns(),Ke();var r=function(w,M,L,b){var O=t.util.createBuffer(),H=w.length>>1,j=H+(w.length&1),Z=w.substr(0,j),he=w.substr(H,j),ge=t.util.createBuffer(),q=t.hmac.create();L=M+L;var Ce=Math.ceil(b/16),we=Math.ceil(b/20);q.start("MD5",Z);var Me=t.util.createBuffer();ge.putBytes(L);for(var Re=0;Re<Ce;++Re)q.start(null,null),q.update(ge.getBytes()),ge.putBuffer(q.digest()),q.start(null,null),q.update(ge.bytes()+L),Me.putBuffer(q.digest());q.start("SHA1",he);var ct=t.util.createBuffer();ge.clear(),ge.putBytes(L);for(var Re=0;Re<we;++Re)q.start(null,null),q.update(ge.getBytes()),ge.putBuffer(q.digest()),q.start(null,null),q.update(ge.bytes()+L),ct.putBuffer(q.digest());return O.putBytes(t.util.xorBytes(Me.getBytes(),ct.getBytes(),b)),O},s=function(w,M,L){var b=t.hmac.create();b.start("SHA1",w);var O=t.util.createBuffer();return O.putInt32(M[0]),O.putInt32(M[1]),O.putByte(L.type),O.putByte(L.version.major),O.putByte(L.version.minor),O.putInt16(L.length),O.putBytes(L.fragment.bytes()),b.update(O.getBytes()),b.digest().getBytes()},n=function(w,M,L){var b=!1;try{var O=w.deflate(M.fragment.getBytes());M.fragment=t.util.createBuffer(O),M.length=O.length,b=!0}catch(H){}return b},i=function(w,M,L){var b=!1;try{var O=w.inflate(M.fragment.getBytes());M.fragment=t.util.createBuffer(O),M.length=O.length,b=!0}catch(H){}return b},l=function(w,M){var L=0;switch(M){case 1:L=w.getByte();break;case 2:L=w.getInt16();break;case 3:L=w.getInt24();break;case 4:L=w.getInt32();break}return t.util.createBuffer(w.getBytes(L))},o=function(w,M,L){w.putInt(L.length(),M<<3),w.putBuffer(L)},a={};a.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}},a.SupportedVersions=[a.Versions.TLS_1_1,a.Versions.TLS_1_0],a.Version=a.SupportedVersions[0],a.MaxFragment=15360,a.ConnectionEnd={server:0,client:1},a.PRFAlgorithm={tls_prf_sha256:0},a.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},a.CipherType={stream:0,block:1,aead:2},a.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},a.CompressionMethod={none:0,deflate:1},a.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},a.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},a.Alert={},a.Alert.Level={warning:1,fatal:2},a.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},a.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},a.CipherSuites={},a.getCipherSuite=function(w){var M=null;for(var L in a.CipherSuites){var b=a.CipherSuites[L];if(b.id[0]===w.charCodeAt(0)&&b.id[1]===w.charCodeAt(1)){M=b;break}}return M},a.handleUnexpected=function(w,M){var L=!w.open&&w.entity===a.ConnectionEnd.client;if(!L)w.error(w,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unexpected_message}})},a.handleHelloRequest=function(w,M,L){if(!w.handshaking&&w.handshakes>0)a.queue(w,a.createAlert(w,{level:a.Alert.Level.warning,description:a.Alert.Description.no_renegotiation})),a.flush(w);w.process()},a.parseHelloMessage=function(w,M,L){var b=null,O=w.entity===a.ConnectionEnd.client;if(L<38)w.error(w,{message:O?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});else{var H=M.fragment,j=H.length();if(b={version:{major:H.getByte(),minor:H.getByte()},random:t.util.createBuffer(H.getBytes(32)),session_id:l(H,1),extensions:[]},O)b.cipher_suite=H.getBytes(2),b.compression_method=H.getByte();else b.cipher_suites=l(H,2),b.compression_methods=l(H,1);if(j=L-(j-H.length()),j>0){var Z=l(H,2);while(Z.length()>0)b.extensions.push({type:[Z.getByte(),Z.getByte()],data:l(Z,2)});if(!O)for(var he=0;he<b.extensions.length;++he){var ge=b.extensions[he];if(ge.type[0]===0&&ge.type[1]===0){var q=l(ge.data,2);while(q.length()>0){var Ce=q.getByte();if(Ce!==0)break;w.session.extensions.server_name.serverNameList.push(l(q,2).getBytes())}}}}if(w.session.version){if(b.version.major!==w.session.version.major||b.version.minor!==w.session.version.minor)return w.error(w,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.protocol_version}})}if(O)w.session.cipherSuite=a.getCipherSuite(b.cipher_suite);else{var we=t.util.createBuffer(b.cipher_suites.bytes());while(we.length()>0)if(w.session.cipherSuite=a.getCipherSuite(we.getBytes(2)),w.session.cipherSuite!==null)break}if(w.session.cipherSuite===null)return w.error(w,{message:"No cipher suites in common.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.handshake_failure},cipherSuite:t.util.bytesToHex(b.cipher_suite)});if(O)w.session.compressionMethod=b.compression_method;else w.session.compressionMethod=a.CompressionMethod.none}return b},a.createSecurityParameters=function(w,M){var L=w.entity===a.ConnectionEnd.client,b=M.random.bytes(),O=L?w.session.sp.client_random:b,H=L?b:a.createRandom().getBytes();w.session.sp={entity:w.entity,prf_algorithm:a.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:w.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:O,server_random:H}},a.handleServerHello=function(w,M,L){var b=a.parseHelloMessage(w,M,L);if(w.fail)return;if(b.version.minor<=w.version.minor)w.version.minor=b.version.minor;else return w.error(w,{message:"Incompatible TLS version.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.protocol_version}});w.session.version=w.version;var O=b.session_id.bytes();if(O.length>0&&O===w.session.id)w.expect=f,w.session.resuming=!0,w.session.sp.server_random=b.random.bytes();else w.expect=h,w.session.resuming=!1,a.createSecurityParameters(w,b);w.session.id=O,w.process()},a.handleClientHello=function(w,M,L){var b=a.parseHelloMessage(w,M,L);if(w.fail)return;var O=b.session_id.bytes(),H=null;if(w.sessionCache){if(H=w.sessionCache.getSession(O),H===null)O="";else if(H.version.major!==b.version.major||H.version.minor>b.version.minor)H=null,O=""}if(O.length===0)O=t.random.getBytes(32);if(w.session.id=O,w.session.clientHelloVersion=b.version,w.session.sp={},H)w.version=w.session.version=H.version,w.session.sp=H.sp;else{var j;for(var Z=1;Z<a.SupportedVersions.length;++Z)if(j=a.SupportedVersions[Z],j.minor<=b.version.minor)break;w.version={major:j.major,minor:j.minor},w.session.version=w.version}if(H!==null)w.expect=I,w.session.resuming=!0,w.session.sp.client_random=b.random.bytes();else w.expect=w.verifyClient!==!1?y:A,w.session.resuming=!1,a.createSecurityParameters(w,b);if(w.open=!0,a.queue(w,a.createRecord(w,{type:a.ContentType.handshake,data:a.createServerHello(w)})),w.session.resuming)a.queue(w,a.createRecord(w,{type:a.ContentType.change_cipher_spec,data:a.createChangeCipherSpec()})),w.state.pending=a.createConnectionState(w),w.state.current.write=w.state.pending.write,a.queue(w,a.createRecord(w,{type:a.ContentType.handshake,data:a.createFinished(w)}));else if(a.queue(w,a.createRecord(w,{type:a.ContentType.handshake,data:a.createCertificate(w)})),!w.fail){if(a.queue(w,a.createRecord(w,{type:a.ContentType.handshake,data:a.createServerKeyExchange(w)})),w.verifyClient!==!1)a.queue(w,a.createRecord(w,{type:a.ContentType.handshake,data:a.createCertificateRequest(w)}));a.queue(w,a.createRecord(w,{type:a.ContentType.handshake,data:a.createServerHelloDone(w)}))}a.flush(w),w.process()},a.handleCertificate=function(w,M,L){if(L<3)return w.error(w,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var b=M.fragment,O={certificate_list:l(b,3)},H,j,Z=[];try{while(O.certificate_list.length()>0)H=l(O.certificate_list,3),j=t.asn1.fromDer(H),H=t.pki.certificateFromAsn1(j,!0),Z.push(H)}catch(ge){return w.error(w,{message:"Could not parse certificate list.",cause:ge,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.bad_certificate}})}var he=w.entity===a.ConnectionEnd.client;if((he||w.verifyClient===!0)&&Z.length===0)w.error(w,{message:he?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});else if(Z.length===0)w.expect=he?d:A;else{if(he)w.session.serverCertificate=Z[0];else w.session.clientCertificate=Z[0];if(a.verifyCertificateChain(w,Z))w.expect=he?d:A}w.process()},a.handleServerKeyExchange=function(w,M,L){if(L>0)return w.error(w,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unsupported_certificate}});w.expect=F,w.process()},a.handleClientKeyExchange=function(w,M,L){if(L<48)return w.error(w,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unsupported_certificate}});var b=M.fragment,O={enc_pre_master_secret:l(b,2).getBytes()},H=null;if(w.getPrivateKey)try{H=w.getPrivateKey(w,w.session.serverCertificate),H=t.pki.privateKeyFromPem(H)}catch(he){w.error(w,{message:"Could not get private key.",cause:he,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}})}if(H===null)return w.error(w,{message:"No private key set.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}});try{var j=w.session.sp;j.pre_master_secret=H.decrypt(O.enc_pre_master_secret);var Z=w.session.clientHelloVersion;if(Z.major!==j.pre_master_secret.charCodeAt(0)||Z.minor!==j.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(he){j.pre_master_secret=t.random.getBytes(48)}if(w.expect=I,w.session.clientCertificate!==null)w.expect=T;w.process()},a.handleCertificateRequest=function(w,M,L){if(L<3)return w.error(w,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var b=M.fragment,O={certificate_types:l(b,1),certificate_authorities:l(b,2)};w.session.certificateRequest=O,w.expect=p,w.process()},a.handleCertificateVerify=function(w,M,L){if(L<2)return w.error(w,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var b=M.fragment;b.read-=4;var O=b.bytes();b.read+=4;var H={signature:l(b,2).getBytes()},j=t.util.createBuffer();j.putBuffer(w.session.md5.digest()),j.putBuffer(w.session.sha1.digest()),j=j.getBytes();try{var Z=w.session.clientCertificate;if(!Z.publicKey.verify(j,H.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");w.session.md5.update(O),w.session.sha1.update(O)}catch(he){return w.error(w,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.handshake_failure}})}w.expect=I,w.process()},a.handleServerHelloDone=function(w,M,L){if(L>0)return w.error(w,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.record_overflow}});if(w.serverCertificate===null){var b={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.insufficient_security}},O=0,H=w.verify(w,b.alert.description,O,[]);if(H!==!0){if(H||H===0){if(typeof H==="object"&&!t.util.isArray(H)){if(H.message)b.message=H.message;if(H.alert)b.alert.description=H.alert}else if(typeof H==="number")b.alert.description=H}return w.error(w,b)}}if(w.session.certificateRequest!==null)M=a.createRecord(w,{type:a.ContentType.handshake,data:a.createCertificate(w)}),a.queue(w,M);M=a.createRecord(w,{type:a.ContentType.handshake,data:a.createClientKeyExchange(w)}),a.queue(w,M),w.expect=C;var j=function(Z,he){if(Z.session.certificateRequest!==null&&Z.session.clientCertificate!==null)a.queue(Z,a.createRecord(Z,{type:a.ContentType.handshake,data:a.createCertificateVerify(Z,he)}));a.queue(Z,a.createRecord(Z,{type:a.ContentType.change_cipher_spec,data:a.createChangeCipherSpec()})),Z.state.pending=a.createConnectionState(Z),Z.state.current.write=Z.state.pending.write,a.queue(Z,a.createRecord(Z,{type:a.ContentType.handshake,data:a.createFinished(Z)})),Z.expect=f,a.flush(Z),Z.process()};if(w.session.certificateRequest===null||w.session.clientCertificate===null)return j(w,null);a.getClientSignature(w,j)},a.handleChangeCipherSpec=function(w,M){if(M.fragment.getByte()!==1)return w.error(w,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var L=w.entity===a.ConnectionEnd.client;if(w.session.resuming&&L||!w.session.resuming&&!L)w.state.pending=a.createConnectionState(w);if(w.state.current.read=w.state.pending.read,!w.session.resuming&&L||w.session.resuming&&!L)w.state.pending=null;w.expect=L?m:v,w.process()},a.handleFinished=function(w,M,L){var b=M.fragment;b.read-=4;var O=b.bytes();b.read+=4;var H=M.fragment.getBytes();b=t.util.createBuffer(),b.putBuffer(w.session.md5.digest()),b.putBuffer(w.session.sha1.digest());var j=w.entity===a.ConnectionEnd.client,Z=j?"server finished":"client finished",he=w.session.sp,ge=12,q=r;if(b=q(he.master_secret,Z,b.getBytes(),ge),b.getBytes()!==H)return w.error(w,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.decrypt_error}});if(w.session.md5.update(O),w.session.sha1.update(O),w.session.resuming&&j||!w.session.resuming&&!j)a.queue(w,a.createRecord(w,{type:a.ContentType.change_cipher_spec,data:a.createChangeCipherSpec()})),w.state.current.write=w.state.pending.write,w.state.pending=null,a.queue(w,a.createRecord(w,{type:a.ContentType.handshake,data:a.createFinished(w)}));w.expect=j?B:g,w.handshaking=!1,++w.handshakes,w.peerCertificate=j?w.session.serverCertificate:w.session.clientCertificate,a.flush(w),w.isConnected=!0,w.connected(w),w.process()},a.handleAlert=function(w,M){var L=M.fragment,b={level:L.getByte(),description:L.getByte()},O;switch(b.description){case a.Alert.Description.close_notify:O="Connection closed.";break;case a.Alert.Description.unexpected_message:O="Unexpected message.";break;case a.Alert.Description.bad_record_mac:O="Bad record MAC.";break;case a.Alert.Description.decryption_failed:O="Decryption failed.";break;case a.Alert.Description.record_overflow:O="Record overflow.";break;case a.Alert.Description.decompression_failure:O="Decompression failed.";break;case a.Alert.Description.handshake_failure:O="Handshake failure.";break;case a.Alert.Description.bad_certificate:O="Bad certificate.";break;case a.Alert.Description.unsupported_certificate:O="Unsupported certificate.";break;case a.Alert.Description.certificate_revoked:O="Certificate revoked.";break;case a.Alert.Description.certificate_expired:O="Certificate expired.";break;case a.Alert.Description.certificate_unknown:O="Certificate unknown.";break;case a.Alert.Description.illegal_parameter:O="Illegal parameter.";break;case a.Alert.Description.unknown_ca:O="Unknown certificate authority.";break;case a.Alert.Description.access_denied:O="Access denied.";break;case a.Alert.Description.decode_error:O="Decode error.";break;case a.Alert.Description.decrypt_error:O="Decrypt error.";break;case a.Alert.Description.export_restriction:O="Export restriction.";break;case a.Alert.Description.protocol_version:O="Unsupported protocol version.";break;case a.Alert.Description.insufficient_security:O="Insufficient security.";break;case a.Alert.Description.internal_error:O="Internal error.";break;case a.Alert.Description.user_canceled:O="User canceled.";break;case a.Alert.Description.no_renegotiation:O="Renegotiation not supported.";break;default:O="Unknown error.";break}if(b.description===a.Alert.Description.close_notify)return w.close();w.error(w,{message:O,send:!1,origin:w.entity===a.ConnectionEnd.client?"server":"client",alert:b}),w.process()},a.handleHandshake=function(w,M){var L=M.fragment,b=L.getByte(),O=L.getInt24();if(O>L.length())return w.fragmented=M,M.fragment=t.util.createBuffer(),L.read-=4,w.process();w.fragmented=null,L.read-=4;var H=L.bytes(O+4);if(L.read+=4,b in Ee[w.entity][w.expect]){if(w.entity===a.ConnectionEnd.server&&!w.open&&!w.fail)w.handshaking=!0,w.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:t.md.md5.create(),sha1:t.md.sha1.create()};if(b!==a.HandshakeType.hello_request&&b!==a.HandshakeType.certificate_verify&&b!==a.HandshakeType.finished)w.session.md5.update(H),w.session.sha1.update(H);Ee[w.entity][w.expect][b](w,M,O)}else a.handleUnexpected(w,M)},a.handleApplicationData=function(w,M){w.data.putBuffer(M.fragment),w.dataReady(w),w.process()},a.handleHeartbeat=function(w,M){var L=M.fragment,b=L.getByte(),O=L.getInt16(),H=L.getBytes(O);if(b===a.HeartbeatMessageType.heartbeat_request){if(w.handshaking||O>H.length)return w.process();a.queue(w,a.createRecord(w,{type:a.ContentType.heartbeat,data:a.createHeartbeat(a.HeartbeatMessageType.heartbeat_response,H)})),a.flush(w)}else if(b===a.HeartbeatMessageType.heartbeat_response){if(H!==w.expectedHeartbeatPayload)return w.process();if(w.heartbeatReceived)w.heartbeatReceived(w,t.util.createBuffer(H))}w.process()};var D=0,h=1,d=2,F=3,p=4,f=5,m=6,B=7,C=8,c=0,y=1,A=2,T=3,I=4,v=5,g=6,E=a.handleUnexpected,S=a.handleChangeCipherSpec,_=a.handleAlert,K=a.handleHandshake,N=a.handleApplicationData,$=a.handleHeartbeat,P=[];P[a.ConnectionEnd.client]=[[E,_,K,E,$],[E,_,K,E,$],[E,_,K,E,$],[E,_,K,E,$],[E,_,K,E,$],[S,_,E,E,$],[E,_,K,E,$],[E,_,K,N,$],[E,_,K,E,$]],P[a.ConnectionEnd.server]=[[E,_,K,E,$],[E,_,K,E,$],[E,_,K,E,$],[E,_,K,E,$],[S,_,E,E,$],[E,_,K,E,$],[E,_,K,N,$],[E,_,K,E,$]];var{handleHelloRequest:V,handleServerHello:k,handleCertificate:W,handleServerKeyExchange:Q,handleCertificateRequest:z,handleServerHelloDone:x,handleFinished:ne}=a,Ee=[];Ee[a.ConnectionEnd.client]=[[E,E,k,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[V,E,E,E,E,E,E,E,E,E,E,W,Q,z,x,E,E,E,E,E,E],[V,E,E,E,E,E,E,E,E,E,E,E,Q,z,x,E,E,E,E,E,E],[V,E,E,E,E,E,E,E,E,E,E,E,E,z,x,E,E,E,E,E,E],[V,E,E,E,E,E,E,E,E,E,E,E,E,E,x,E,E,E,E,E,E],[V,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[V,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,ne],[V,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[V,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]];var{handleClientHello:Fe,handleClientKeyExchange:J,handleCertificateVerify:ye}=a;Ee[a.ConnectionEnd.server]=[[E,Fe,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,W,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,J,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,ye,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,ne],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E],[E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E]],a.generateKeys=function(w,M){var L=r,b=M.client_random+M.server_random;if(!w.session.resuming)M.master_secret=L(M.pre_master_secret,"master secret",b,48).bytes(),M.pre_master_secret=null;b=M.server_random+M.client_random;var O=2*M.mac_key_length+2*M.enc_key_length,H=w.version.major===a.Versions.TLS_1_0.major&&w.version.minor===a.Versions.TLS_1_0.minor;if(H)O+=2*M.fixed_iv_length;var j=L(M.master_secret,"key expansion",b,O),Z={client_write_MAC_key:j.getBytes(M.mac_key_length),server_write_MAC_key:j.getBytes(M.mac_key_length),client_write_key:j.getBytes(M.enc_key_length),server_write_key:j.getBytes(M.enc_key_length)};if(H)Z.client_write_IV=j.getBytes(M.fixed_iv_length),Z.server_write_IV=j.getBytes(M.fixed_iv_length);return Z},a.createConnectionState=function(w){var M=w.entity===a.ConnectionEnd.client,L=function(){var H={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(j){return!0},compressionState:null,compressFunction:function(j){return!0},updateSequenceNumber:function(){if(H.sequenceNumber[1]===4294967295)H.sequenceNumber[1]=0,++H.sequenceNumber[0];else++H.sequenceNumber[1]}};return H},b={read:L(),write:L()};if(b.read.update=function(H,j){if(!b.read.cipherFunction(j,b.read))H.error(H,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.bad_record_mac}});else if(!b.read.compressFunction(H,j,b.read))H.error(H,{message:"Could not decompress record.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.decompression_failure}});return!H.fail},b.write.update=function(H,j){if(!b.write.compressFunction(H,j,b.write))H.error(H,{message:"Could not compress record.",send:!1,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}});else if(!b.write.cipherFunction(j,b.write))H.error(H,{message:"Could not encrypt record.",send:!1,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}});return!H.fail},w.session){var O=w.session.sp;switch(w.session.cipherSuite.initSecurityParameters(O),O.keys=a.generateKeys(w,O),b.read.macKey=M?O.keys.server_write_MAC_key:O.keys.client_write_MAC_key,b.write.macKey=M?O.keys.client_write_MAC_key:O.keys.server_write_MAC_key,w.session.cipherSuite.initConnectionState(b,w,O),O.compression_algorithm){case a.CompressionMethod.none:break;case a.CompressionMethod.deflate:b.read.compressFunction=i,b.write.compressFunction=n;break;default:throw new Error("Unsupported compression algorithm.")}}return b},a.createRandom=function(){var w=new Date,M=+w+w.getTimezoneOffset()*60000,L=t.util.createBuffer();return L.putInt32(M),L.putBytes(t.random.getBytes(28)),L},a.createRecord=function(w,M){if(!M.data)return null;var L={type:M.type,version:{major:w.version.major,minor:w.version.minor},length:M.data.length(),fragment:M.data};return L},a.createAlert=function(w,M){var L=t.util.createBuffer();return L.putByte(M.level),L.putByte(M.description),a.createRecord(w,{type:a.ContentType.alert,data:L})},a.createClientHello=function(w){w.session.clientHelloVersion={major:w.version.major,minor:w.version.minor};var M=t.util.createBuffer();for(var L=0;L<w.cipherSuites.length;++L){var b=w.cipherSuites[L];M.putByte(b.id[0]),M.putByte(b.id[1])}var O=M.length(),H=t.util.createBuffer();H.putByte(a.CompressionMethod.none);var j=H.length(),Z=t.util.createBuffer();if(w.virtualHost){var he=t.util.createBuffer();he.putByte(0),he.putByte(0);var ge=t.util.createBuffer();ge.putByte(0),o(ge,2,t.util.createBuffer(w.virtualHost));var q=t.util.createBuffer();o(q,2,ge),o(he,2,q),Z.putBuffer(he)}var Ce=Z.length();if(Ce>0)Ce+=2;var we=w.session.id,Me=we.length+1+2+4+28+2+O+1+j+Ce,Re=t.util.createBuffer();if(Re.putByte(a.HandshakeType.client_hello),Re.putInt24(Me),Re.putByte(w.version.major),Re.putByte(w.version.minor),Re.putBytes(w.session.sp.client_random),o(Re,1,t.util.createBuffer(we)),o(Re,2,M),o(Re,1,H),Ce>0)o(Re,2,Z);return Re},a.createServerHello=function(w){var M=w.session.id,L=M.length+1+2+4+28+2+1,b=t.util.createBuffer();return b.putByte(a.HandshakeType.server_hello),b.putInt24(L),b.putByte(w.version.major),b.putByte(w.version.minor),b.putBytes(w.session.sp.server_random),o(b,1,t.util.createBuffer(M)),b.putByte(w.session.cipherSuite.id[0]),b.putByte(w.session.cipherSuite.id[1]),b.putByte(w.session.compressionMethod),b},a.createCertificate=function(w){var M=w.entity===a.ConnectionEnd.client,L=null;if(w.getCertificate){var b;if(M)b=w.session.certificateRequest;else b=w.session.extensions.server_name.serverNameList;L=w.getCertificate(w,b)}var O=t.util.createBuffer();if(L!==null)try{if(!t.util.isArray(L))L=[L];var H=null;for(var j=0;j<L.length;++j){var Z=t.pem.decode(L[j])[0];if(Z.type!=="CERTIFICATE"&&Z.type!=="X509 CERTIFICATE"&&Z.type!=="TRUSTED CERTIFICATE"){var he=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw he.headerType=Z.type,he}if(Z.procType&&Z.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var ge=t.util.createBuffer(Z.body);if(H===null)H=t.asn1.fromDer(ge.bytes(),!1);var q=t.util.createBuffer();o(q,3,ge),O.putBuffer(q)}if(L=t.pki.certificateFromAsn1(H),M)w.session.clientCertificate=L;else w.session.serverCertificate=L}catch(Me){return w.error(w,{message:"Could not send certificate list.",cause:Me,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.bad_certificate}})}var Ce=3+O.length(),we=t.util.createBuffer();return we.putByte(a.HandshakeType.certificate),we.putInt24(Ce),o(we,3,O),we},a.createClientKeyExchange=function(w){var M=t.util.createBuffer();M.putByte(w.session.clientHelloVersion.major),M.putByte(w.session.clientHelloVersion.minor),M.putBytes(t.random.getBytes(46));var L=w.session.sp;L.pre_master_secret=M.getBytes();var b=w.session.serverCertificate.publicKey;M=b.encrypt(L.pre_master_secret);var O=M.length+2,H=t.util.createBuffer();return H.putByte(a.HandshakeType.client_key_exchange),H.putInt24(O),H.putInt16(M.length),H.putBytes(M),H},a.createServerKeyExchange=function(w){var M=0,L=t.util.createBuffer();if(M>0)L.putByte(a.HandshakeType.server_key_exchange),L.putInt24(M);return L},a.getClientSignature=function(w,M){var L=t.util.createBuffer();L.putBuffer(w.session.md5.digest()),L.putBuffer(w.session.sha1.digest()),L=L.getBytes(),w.getSignature=w.getSignature||function(b,O,H){var j=null;if(b.getPrivateKey)try{j=b.getPrivateKey(b,b.session.clientCertificate),j=t.pki.privateKeyFromPem(j)}catch(Z){b.error(b,{message:"Could not get private key.",cause:Z,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}})}if(j===null)b.error(b,{message:"No private key set.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}});else O=j.sign(O,null);H(b,O)},w.getSignature(w,L,M)},a.createCertificateVerify=function(w,M){var L=M.length+2,b=t.util.createBuffer();return b.putByte(a.HandshakeType.certificate_verify),b.putInt24(L),b.putInt16(M.length),b.putBytes(M),b},a.createCertificateRequest=function(w){var M=t.util.createBuffer();M.putByte(1);var L=t.util.createBuffer();for(var b in w.caStore.certs){var O=w.caStore.certs[b],H=t.pki.distinguishedNameToAsn1(O.subject),j=t.asn1.toDer(H);L.putInt16(j.length()),L.putBuffer(j)}var Z=1+M.length()+2+L.length(),he=t.util.createBuffer();return he.putByte(a.HandshakeType.certificate_request),he.putInt24(Z),o(he,1,M),o(he,2,L),he},a.createServerHelloDone=function(w){var M=t.util.createBuffer();return M.putByte(a.HandshakeType.server_hello_done),M.putInt24(0),M},a.createChangeCipherSpec=function(){var w=t.util.createBuffer();return w.putByte(1),w},a.createFinished=function(w){var M=t.util.createBuffer();M.putBuffer(w.session.md5.digest()),M.putBuffer(w.session.sha1.digest());var L=w.entity===a.ConnectionEnd.client,b=w.session.sp,O=12,H=r,j=L?"client finished":"server finished";M=H(b.master_secret,j,M.getBytes(),O);var Z=t.util.createBuffer();return Z.putByte(a.HandshakeType.finished),Z.putInt24(M.length()),Z.putBuffer(M),Z},a.createHeartbeat=function(w,M,L){if(typeof L==="undefined")L=M.length;var b=t.util.createBuffer();b.putByte(w),b.putInt16(L),b.putBytes(M);var O=b.length(),H=Math.max(16,O-L-3);return b.putBytes(t.random.getBytes(H)),b},a.queue=function(w,M){if(!M)return;if(M.fragment.length()===0){if(M.type===a.ContentType.handshake||M.type===a.ContentType.alert||M.type===a.ContentType.change_cipher_spec)return}if(M.type===a.ContentType.handshake){var L=M.fragment.bytes();w.session.md5.update(L),w.session.sha1.update(L),L=null}var b;if(M.fragment.length()<=a.MaxFragment)b=[M];else{b=[];var O=M.fragment.bytes();while(O.length>a.MaxFragment)b.push(a.createRecord(w,{type:M.type,data:t.util.createBuffer(O.slice(0,a.MaxFragment))})),O=O.slice(a.MaxFragment);if(O.length>0)b.push(a.createRecord(w,{type:M.type,data:t.util.createBuffer(O)}))}for(var H=0;H<b.length&&!w.fail;++H){var j=b[H],Z=w.state.current.write;if(Z.update(w,j))w.records.push(j)}},a.flush=function(w){for(var M=0;M<w.records.length;++M){var L=w.records[M];w.tlsData.putByte(L.type),w.tlsData.putByte(L.version.major),w.tlsData.putByte(L.version.minor),w.tlsData.putInt16(L.fragment.length()),w.tlsData.putBuffer(w.records[M].fragment)}return w.records=[],w.tlsDataReady(w)};var se=function(w){switch(w){case!0:return!0;case t.pki.certificateError.bad_certificate:return a.Alert.Description.bad_certificate;case t.pki.certificateError.unsupported_certificate:return a.Alert.Description.unsupported_certificate;case t.pki.certificateError.certificate_revoked:return a.Alert.Description.certificate_revoked;case t.pki.certificateError.certificate_expired:return a.Alert.Description.certificate_expired;case t.pki.certificateError.certificate_unknown:return a.Alert.Description.certificate_unknown;case t.pki.certificateError.unknown_ca:return a.Alert.Description.unknown_ca;default:return a.Alert.Description.bad_certificate}},Ie=function(w){switch(w){case!0:return!0;case a.Alert.Description.bad_certificate:return t.pki.certificateError.bad_certificate;case a.Alert.Description.unsupported_certificate:return t.pki.certificateError.unsupported_certificate;case a.Alert.Description.certificate_revoked:return t.pki.certificateError.certificate_revoked;case a.Alert.Description.certificate_expired:return t.pki.certificateError.certificate_expired;case a.Alert.Description.certificate_unknown:return t.pki.certificateError.certificate_unknown;case a.Alert.Description.unknown_ca:return t.pki.certificateError.unknown_ca;default:return t.pki.certificateError.bad_certificate}};a.verifyCertificateChain=function(w,M){try{var L={};for(var b in w.verifyOptions)L[b]=w.verifyOptions[b];L.verify=function(H,j,Z){var he=se(H),ge=w.verify(w,H,j,Z);if(ge!==!0){if(typeof ge==="object"&&!t.util.isArray(ge)){var q=new Error("The application rejected the certificate.");if(q.send=!0,q.alert={level:a.Alert.Level.fatal,description:a.Alert.Description.bad_certificate},ge.message)q.message=ge.message;if(ge.alert)q.alert.description=ge.alert;throw q}if(ge!==H)ge=Ie(ge)}return ge},t.pki.verifyCertificateChain(w.caStore,M,L)}catch(H){var O=H;if(typeof O!=="object"||t.util.isArray(O))O={send:!0,alert:{level:a.Alert.Level.fatal,description:se(H)}};if(!("send"in O))O.send=!0;if(!("alert"in O))O.alert={level:a.Alert.Level.fatal,description:se(O.error)};w.error(w,O)}return!w.fail},a.createSessionCache=function(w,M){var L=null;if(w&&w.getSession&&w.setSession&&w.order)L=w;else{L={},L.cache=w||{},L.capacity=Math.max(M||100,1),L.order=[];for(var b in w)if(L.order.length<=M)L.order.push(b);else delete w[b];L.getSession=function(O){var H=null,j=null;if(O)j=t.util.bytesToHex(O);else if(L.order.length>0)j=L.order[0];if(j!==null&&j in L.cache){H=L.cache[j],delete L.cache[j];for(var Z in L.order)if(L.order[Z]===j){L.order.splice(Z,1);break}}return H},L.setSession=function(O,H){if(L.order.length===L.capacity){var j=L.order.shift();delete L.cache[j]}var j=t.util.bytesToHex(O);L.order.push(j),L.cache[j]=H}}return L},a.createConnection=function(w){var M=null;if(w.caStore)if(t.util.isArray(w.caStore))M=t.pki.createCaStore(w.caStore);else M=w.caStore;else M=t.pki.createCaStore();var L=w.cipherSuites||null;if(L===null){L=[];for(var b in a.CipherSuites)L.push(a.CipherSuites[b])}var O=w.server?a.ConnectionEnd.server:a.ConnectionEnd.client,H=w.sessionCache?a.createSessionCache(w.sessionCache):null,j={version:{major:a.Version.major,minor:a.Version.minor},entity:O,sessionId:w.sessionId,caStore:M,sessionCache:H,cipherSuites:L,connected:w.connected,virtualHost:w.virtualHost||null,verifyClient:w.verifyClient||!1,verify:w.verify||function(q,Ce,we,Me){return Ce},verifyOptions:w.verifyOptions||{},getCertificate:w.getCertificate||null,getPrivateKey:w.getPrivateKey||null,getSignature:w.getSignature||null,input:t.util.createBuffer(),tlsData:t.util.createBuffer(),data:t.util.createBuffer(),tlsDataReady:w.tlsDataReady,dataReady:w.dataReady,heartbeatReceived:w.heartbeatReceived,closed:w.closed,error:function(q,Ce){if(Ce.origin=Ce.origin||(q.entity===a.ConnectionEnd.client?"client":"server"),Ce.send)a.queue(q,a.createAlert(q,Ce.alert)),a.flush(q);var we=Ce.fatal!==!1;if(we)q.fail=!0;if(w.error(q,Ce),we)q.close(!1)},deflate:w.deflate||null,inflate:w.inflate||null};j.reset=function(q){j.version={major:a.Version.major,minor:a.Version.minor},j.record=null,j.session=null,j.peerCertificate=null,j.state={pending:null,current:null},j.expect=j.entity===a.ConnectionEnd.client?D:c,j.fragmented=null,j.records=[],j.open=!1,j.handshakes=0,j.handshaking=!1,j.isConnected=!1,j.fail=!(q||typeof q==="undefined"),j.input.clear(),j.tlsData.clear(),j.data.clear(),j.state.current=a.createConnectionState(j)},j.reset();var Z=function(q,Ce){var we=Ce.type-a.ContentType.change_cipher_spec,Me=P[q.entity][q.expect];if(we in Me)Me[we](q,Ce);else a.handleUnexpected(q,Ce)},he=function(q){var Ce=0,we=q.input,Me=we.length();if(Me<5)Ce=5-Me;else{q.record={type:we.getByte(),version:{major:we.getByte(),minor:we.getByte()},length:we.getInt16(),fragment:t.util.createBuffer(),ready:!1};var Re=q.record.version.major===q.version.major;if(Re&&q.session&&q.session.version)Re=q.record.version.minor===q.version.minor;if(!Re)q.error(q,{message:"Incompatible TLS version.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.protocol_version}})}return Ce},ge=function(q){var Ce=0,we=q.input,Me=we.length();if(Me<q.record.length)Ce=q.record.length-Me;else{q.record.fragment.putBytes(we.getBytes(q.record.length)),we.compact();var Re=q.state.current.read;if(Re.update(q,q.record)){if(q.fragmented!==null)if(q.fragmented.type===q.record.type)q.fragmented.fragment.putBuffer(q.record.fragment),q.record=q.fragmented;else q.error(q,{message:"Invalid fragmented record.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unexpected_message}});q.record.ready=!0}}return Ce};return j.handshake=function(q){if(j.entity!==a.ConnectionEnd.client)j.error(j,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(j.handshaking)j.error(j,{message:"Handshake already in progress.",fatal:!1});else{if(j.fail&&!j.open&&j.handshakes===0)j.fail=!1;j.handshaking=!0,q=q||"";var Ce=null;if(q.length>0){if(j.sessionCache)Ce=j.sessionCache.getSession(q);if(Ce===null)q=""}if(q.length===0&&j.sessionCache){if(Ce=j.sessionCache.getSession(),Ce!==null)q=Ce.id}if(j.session={id:q,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:t.md.md5.create(),sha1:t.md.sha1.create()},Ce)j.version=Ce.version,j.session.sp=Ce.sp;j.session.sp.client_random=a.createRandom().getBytes(),j.open=!0,a.queue(j,a.createRecord(j,{type:a.ContentType.handshake,data:a.createClientHello(j)})),a.flush(j)}},j.process=function(q){var Ce=0;if(q)j.input.putBytes(q);if(!j.fail){if(j.record!==null&&j.record.ready&&j.record.fragment.isEmpty())j.record=null;if(j.record===null)Ce=he(j);if(!j.fail&&j.record!==null&&!j.record.ready)Ce=ge(j);if(!j.fail&&j.record!==null&&j.record.ready)Z(j,j.record)}return Ce},j.prepare=function(q){return a.queue(j,a.createRecord(j,{type:a.ContentType.application_data,data:t.util.createBuffer(q)})),a.flush(j)},j.prepareHeartbeatRequest=function(q,Ce){if(q instanceof t.util.ByteBuffer)q=q.bytes();if(typeof Ce==="undefined")Ce=q.length;return j.expectedHeartbeatPayload=q,a.queue(j,a.createRecord(j,{type:a.ContentType.heartbeat,data:a.createHeartbeat(a.HeartbeatMessageType.heartbeat_request,q,Ce)})),a.flush(j)},j.close=function(q){if(!j.fail&&j.sessionCache&&j.session){var Ce={id:j.session.id,version:j.session.version,sp:j.session.sp};Ce.sp.keys=null,j.sessionCache.setSession(Ce.id,Ce)}if(j.open){if(j.open=!1,j.input.clear(),j.isConnected||j.handshaking)j.isConnected=j.handshaking=!1,a.queue(j,a.createAlert(j,{level:a.Alert.Level.warning,description:a.Alert.Description.close_notify})),a.flush(j);j.closed(j)}j.reset(q)},j},u.exports=t.tls=t.tls||{};for(ce in a)if(typeof a[ce]!=="function")t.tls[ce]=a[ce];var ce;t.tls.prf_tls1=r,t.tls.hmac_sha1=s,t.tls.createSessionCache=a.createSessionCache,t.tls.createConnection=a.createConnection}),Zy=$e((e,u)=>{var t=Ue();Hr(),Wf();var r=u.exports=t.tls;r.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(D){D.bulk_cipher_algorithm=r.BulkCipherAlgorithm.aes,D.cipher_type=r.CipherType.block,D.enc_key_length=16,D.block_length=16,D.fixed_iv_length=16,D.record_iv_length=16,D.mac_algorithm=r.MACAlgorithm.hmac_sha1,D.mac_length=20,D.mac_key_length=20},initConnectionState:s},r.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(D){D.bulk_cipher_algorithm=r.BulkCipherAlgorithm.aes,D.cipher_type=r.CipherType.block,D.enc_key_length=32,D.block_length=16,D.fixed_iv_length=16,D.record_iv_length=16,D.mac_algorithm=r.MACAlgorithm.hmac_sha1,D.mac_length=20,D.mac_key_length=20},initConnectionState:s};function s(D,h,d){var F=h.entity===t.tls.ConnectionEnd.client;D.read.cipherState={init:!1,cipher:t.cipher.createDecipher("AES-CBC",F?d.keys.server_write_key:d.keys.client_write_key),iv:F?d.keys.server_write_IV:d.keys.client_write_IV},D.write.cipherState={init:!1,cipher:t.cipher.createCipher("AES-CBC",F?d.keys.client_write_key:d.keys.server_write_key),iv:F?d.keys.client_write_IV:d.keys.server_write_IV},D.read.cipherFunction=o,D.write.cipherFunction=n,D.read.macLength=D.write.macLength=d.mac_length,D.read.macFunction=D.write.macFunction=r.hmac_sha1}function n(D,h){var d=!1,F=h.macFunction(h.macKey,h.sequenceNumber,D);D.fragment.putBytes(F),h.updateSequenceNumber();var p;if(D.version.minor===r.Versions.TLS_1_0.minor)p=h.cipherState.init?null:h.cipherState.iv;else p=t.random.getBytesSync(16);h.cipherState.init=!0;var f=h.cipherState.cipher;if(f.start({iv:p}),D.version.minor>=r.Versions.TLS_1_1.minor)f.output.putBytes(p);if(f.update(D.fragment),f.finish(i))D.fragment=f.output,D.length=D.fragment.length(),d=!0;return d}function i(D,h,d){if(!d){var F=D-h.length()%D;h.fillWithByte(F-1,F)}return!0}function l(D,h,d){var F=!0;if(d){var p=h.length(),f=h.last();for(var m=p-1-f;m<p-1;++m)F=F&&h.at(m)==f;if(F)h.truncate(f+1)}return F}function o(D,h){var d=!1,F;if(D.version.minor===r.Versions.TLS_1_0.minor)F=h.cipherState.init?null:h.cipherState.iv;else F=D.fragment.getBytes(16);h.cipherState.init=!0;var p=h.cipherState.cipher;p.start({iv:F}),p.update(D.fragment),d=p.finish(l);var f=h.macLength,m=t.random.getBytesSync(f),B=p.output.length();if(B>=f)D.fragment=p.output.getBytes(B-f),m=p.output.getBytes(f);else D.fragment=p.output.getBytes();D.fragment=t.util.createBuffer(D.fragment),D.length=D.fragment.length();var C=h.macFunction(h.macKey,h.sequenceNumber,D);return h.updateSequenceNumber(),d=a(h.macKey,m,C)&&d,d}function a(D,h,d){var F=t.hmac.create();return F.start("SHA1",D),F.update(h),h=F.digest().getBytes(),F.start(null,null),F.update(d),d=F.digest().getBytes(),h===d}}),Hf=$e((e,u)=>{var t=Ue();or(),Ke();var r=u.exports=t.sha512=t.sha512||{};t.md.sha512=t.md.algorithms.sha512=r;var s=t.sha384=t.sha512.sha384=t.sha512.sha384||{};s.create=function(){return r.create("SHA-384")},t.md.sha384=t.md.algorithms.sha384=s,t.sha512.sha256=t.sha512.sha256||{create:function(){return r.create("SHA-512/256")}},t.md["sha512/256"]=t.md.algorithms["sha512/256"]=t.sha512.sha256,t.sha512.sha224=t.sha512.sha224||{create:function(){return r.create("SHA-512/224")}},t.md["sha512/224"]=t.md.algorithms["sha512/224"]=t.sha512.sha224,r.create=function(h){if(!i)a();if(typeof h==="undefined")h="SHA-512";if(!(h in o))throw new Error("Invalid SHA-512 algorithm: "+h);var d=o[h],F=null,p=t.util.createBuffer(),f=new Array(80);for(var m=0;m<80;++m)f[m]=new Array(2);var B=64;switch(h){case"SHA-384":B=48;break;case"SHA-512/256":B=32;break;case"SHA-512/224":B=28;break}var C={algorithm:h.replace("-","").toLowerCase(),blockLength:128,digestLength:B,messageLength:0,fullMessageLength:null,messageLengthSize:16};return C.start=function(){C.messageLength=0,C.fullMessageLength=C.messageLength128=[];var c=C.messageLengthSize/4;for(var y=0;y<c;++y)C.fullMessageLength.push(0);p=t.util.createBuffer(),F=new Array(d.length);for(var y=0;y<d.length;++y)F[y]=d[y].slice(0);return C},C.start(),C.update=function(c,y){if(y==="utf8")c=t.util.encodeUtf8(c);var A=c.length;C.messageLength+=A,A=[A/4294967296>>>0,A>>>0];for(var T=C.fullMessageLength.length-1;T>=0;--T)C.fullMessageLength[T]+=A[1],A[1]=A[0]+(C.fullMessageLength[T]/4294967296>>>0),C.fullMessageLength[T]=C.fullMessageLength[T]>>>0,A[0]=A[1]/4294967296>>>0;if(p.putBytes(c),D(F,f,p),p.read>2048||p.length()===0)p.compact();return C},C.digest=function(){var c=t.util.createBuffer();c.putBytes(p.bytes());var y=C.fullMessageLength[C.fullMessageLength.length-1]+C.messageLengthSize,A=y&C.blockLength-1;c.putBytes(n.substr(0,C.blockLength-A));var T,I,v=C.fullMessageLength[0]*8;for(var g=0;g<C.fullMessageLength.length-1;++g)T=C.fullMessageLength[g+1]*8,I=T/4294967296>>>0,v+=I,c.putInt32(v>>>0),v=T>>>0;c.putInt32(v);var E=new Array(F.length);for(var g=0;g<F.length;++g)E[g]=F[g].slice(0);D(E,f,c);var S=t.util.createBuffer(),_;if(h==="SHA-512")_=E.length;else if(h==="SHA-384")_=E.length-2;else _=E.length-4;for(var g=0;g<_;++g)if(S.putInt32(E[g][0]),g!==_-1||h!=="SHA-512/224")S.putInt32(E[g][1]);return S},C};var n=null,i=!1,l=null,o=null;function a(){n=String.fromCharCode(128),n+=t.util.fillString(String.fromCharCode(0),128),l=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],o={},o["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],o["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],o["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],o["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],i=!0}function D(h,d,F){var p,f,m,B,C,c,y,A,T,I,v,g,E,S,_,K,N,$,P,V,k,W,Q,z,x,ne,Ee,Fe,J,ye,se,Ie,ce,w,M,L=F.length();while(L>=128){for(J=0;J<16;++J)d[J][0]=F.getInt32()>>>0,d[J][1]=F.getInt32()>>>0;for(;J<80;++J)Ie=d[J-2],ye=Ie[0],se=Ie[1],p=((ye>>>19|se<<13)^(se>>>29|ye<<3)^ye>>>6)>>>0,f=((ye<<13|se>>>19)^(se<<3|ye>>>29)^(ye<<26|se>>>6))>>>0,w=d[J-15],ye=w[0],se=w[1],m=((ye>>>1|se<<31)^(ye>>>8|se<<24)^ye>>>7)>>>0,B=((ye<<31|se>>>1)^(ye<<24|se>>>8)^(ye<<25|se>>>7))>>>0,ce=d[J-7],M=d[J-16],se=f+ce[1]+B+M[1],d[J][0]=p+ce[0]+m+M[0]+(se/4294967296>>>0)>>>0,d[J][1]=se>>>0;E=h[0][0],S=h[0][1],_=h[1][0],K=h[1][1],N=h[2][0],$=h[2][1],P=h[3][0],V=h[3][1],k=h[4][0],W=h[4][1],Q=h[5][0],z=h[5][1],x=h[6][0],ne=h[6][1],Ee=h[7][0],Fe=h[7][1];for(J=0;J<80;++J)y=((k>>>14|W<<18)^(k>>>18|W<<14)^(W>>>9|k<<23))>>>0,A=((k<<18|W>>>14)^(k<<14|W>>>18)^(W<<23|k>>>9))>>>0,T=(x^k&(Q^x))>>>0,I=(ne^W&(z^ne))>>>0,C=((E>>>28|S<<4)^(S>>>2|E<<30)^(S>>>7|E<<25))>>>0,c=((E<<4|S>>>28)^(S<<30|E>>>2)^(S<<25|E>>>7))>>>0,v=(E&_|N&(E^_))>>>0,g=(S&K|$&(S^K))>>>0,se=Fe+A+I+l[J][1]+d[J][1],p=Ee+y+T+l[J][0]+d[J][0]+(se/4294967296>>>0)>>>0,f=se>>>0,se=c+g,m=C+v+(se/4294967296>>>0)>>>0,B=se>>>0,Ee=x,Fe=ne,x=Q,ne=z,Q=k,z=W,se=V+f,k=P+p+(se/4294967296>>>0)>>>0,W=se>>>0,P=N,V=$,N=_,$=K,_=E,K=S,se=f+B,E=p+m+(se/4294967296>>>0)>>>0,S=se>>>0;se=h[0][1]+S,h[0][0]=h[0][0]+E+(se/4294967296>>>0)>>>0,h[0][1]=se>>>0,se=h[1][1]+K,h[1][0]=h[1][0]+_+(se/4294967296>>>0)>>>0,h[1][1]=se>>>0,se=h[2][1]+$,h[2][0]=h[2][0]+N+(se/4294967296>>>0)>>>0,h[2][1]=se>>>0,se=h[3][1]+V,h[3][0]=h[3][0]+P+(se/4294967296>>>0)>>>0,h[3][1]=se>>>0,se=h[4][1]+W,h[4][0]=h[4][0]+k+(se/4294967296>>>0)>>>0,h[4][1]=se>>>0,se=h[5][1]+z,h[5][0]=h[5][0]+Q+(se/4294967296>>>0)>>>0,h[5][1]=se>>>0,se=h[6][1]+ne,h[6][0]=h[6][0]+x+(se/4294967296>>>0)>>>0,h[6][1]=se>>>0,se=h[7][1]+Fe,h[7][0]=h[7][0]+Ee+(se/4294967296>>>0)>>>0,h[7][1]=se>>>0,L-=128}}}),Xy=$e((e)=>{var u=Ue();Wu();var t=u.asn1;e.privateKeyValidator={name:"PrivateKeyInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},e.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}}),Jy=$e((e,u)=>{var t=Ue();Sn(),Nu(),Hf(),Ke();var r=Xy(),s=r.publicKeyValidator,n=r.privateKeyValidator;if(typeof i==="undefined")i=t.jsbn.BigInteger;var i,l=t.util.ByteBuffer,o=typeof Buffer==="undefined"?Uint8Array:Buffer;t.pki=t.pki||{},u.exports=t.pki.ed25519=t.ed25519=t.ed25519||{};var a=t.ed25519;a.constants={},a.constants.PUBLIC_KEY_BYTE_LENGTH=32,a.constants.PRIVATE_KEY_BYTE_LENGTH=64,a.constants.SEED_BYTE_LENGTH=32,a.constants.SIGN_BYTE_LENGTH=64,a.constants.HASH_BYTE_LENGTH=64,a.generateKeyPair=function(w){w=w||{};var M=w.seed;if(M===void 0)M=t.random.getBytesSync(a.constants.SEED_BYTE_LENGTH);else if(typeof M==="string"){if(M.length!==a.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+a.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(M instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');M=D({message:M,encoding:"binary"});var L=new o(a.constants.PUBLIC_KEY_BYTE_LENGTH),b=new o(a.constants.PRIVATE_KEY_BYTE_LENGTH);for(var O=0;O<32;++O)b[O]=M[O];return y(L,b),{publicKey:L,privateKey:b}},a.privateKeyFromAsn1=function(w){var M={},L=[],b=t.asn1.validate(w,n,M,L);if(!b){var O=new Error("Invalid Key.");throw O.errors=L,O}var H=t.asn1.derToOid(M.privateKeyOid),j=t.oids.EdDSA25519;if(H!==j)throw new Error('Invalid OID "'+H+'"; OID must be "'+j+'".');var Z=M.privateKey,he=D({message:t.asn1.fromDer(Z).value,encoding:"binary"});return{privateKeyBytes:he}},a.publicKeyFromAsn1=function(w){var M={},L=[],b=t.asn1.validate(w,s,M,L);if(!b){var O=new Error("Invalid Key.");throw O.errors=L,O}var H=t.asn1.derToOid(M.publicKeyOid),j=t.oids.EdDSA25519;if(H!==j)throw new Error('Invalid OID "'+H+'"; OID must be "'+j+'".');var Z=M.ed25519PublicKey;if(Z.length!==a.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return D({message:Z,encoding:"binary"})},a.publicKeyFromPrivateKey=function(w){w=w||{};var M=D({message:w.privateKey,encoding:"binary"});if(M.length!==a.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+a.constants.PRIVATE_KEY_BYTE_LENGTH);var L=new o(a.constants.PUBLIC_KEY_BYTE_LENGTH);for(var b=0;b<L.length;++b)L[b]=M[32+b];return L},a.sign=function(w){w=w||{};var M=D(w),L=D({message:w.privateKey,encoding:"binary"});if(L.length===a.constants.SEED_BYTE_LENGTH){var b=a.generateKeyPair({seed:L});L=b.privateKey}else if(L.length!==a.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+a.constants.SEED_BYTE_LENGTH+" or "+a.constants.PRIVATE_KEY_BYTE_LENGTH);var O=new o(a.constants.SIGN_BYTE_LENGTH+M.length);A(O,M,M.length,L);var H=new o(a.constants.SIGN_BYTE_LENGTH);for(var j=0;j<H.length;++j)H[j]=O[j];return H},a.verify=function(w){w=w||{};var M=D(w);if(w.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var L=D({message:w.signature,encoding:"binary"});if(L.length!==a.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+a.constants.SIGN_BYTE_LENGTH);var b=D({message:w.publicKey,encoding:"binary"});if(b.length!==a.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+a.constants.PUBLIC_KEY_BYTE_LENGTH);var O=new o(a.constants.SIGN_BYTE_LENGTH+M.length),H=new o(a.constants.SIGN_BYTE_LENGTH+M.length),j;for(j=0;j<a.constants.SIGN_BYTE_LENGTH;++j)O[j]=L[j];for(j=0;j<M.length;++j)O[j+a.constants.SIGN_BYTE_LENGTH]=M[j];return T(H,O,O.length,b)>=0};function D(w){var M=w.message;if(M instanceof Uint8Array||M instanceof o)return M;var L=w.encoding;if(M===void 0)if(w.md)M=w.md.digest().getBytes(),L="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof M==="string"&&!L)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof M==="string"){if(typeof Buffer!=="undefined")return Buffer.from(M,L);M=new l(M,L)}else if(!(M instanceof l))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');var b=new o(M.length());for(var O=0;O<b.length;++O)b[O]=M.at(O);return b}var h=J(),d=J([1]),F=J([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),p=J([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=J([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),m=J([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),B=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),C=J([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function c(w,M){var L=t.md.sha512.create(),b=new l(w);L.update(b.getBytes(M),"binary");var O=L.digest().getBytes();if(typeof Buffer!=="undefined")return Buffer.from(O,"binary");var H=new o(a.constants.HASH_BYTE_LENGTH);for(var j=0;j<64;++j)H[j]=O.charCodeAt(j);return H}function y(w,M){var L=[J(),J(),J(),J()],b,O=c(M,32);O[0]&=248,O[31]&=127,O[31]|=64,z(L,O),S(w,L);for(b=0;b<32;++b)M[b+32]=w[b];return 0}function A(w,M,L,b){var O,H,j=new Float64Array(64),Z=[J(),J(),J(),J()],he=c(b,32);he[0]&=248,he[31]&=127,he[31]|=64;var ge=L+64;for(O=0;O<L;++O)w[64+O]=M[O];for(O=0;O<32;++O)w[32+O]=he[32+O];var q=c(w.subarray(32),L+32);v(q),z(Z,q),S(w,Z);for(O=32;O<64;++O)w[O]=b[O];var Ce=c(w,L+64);v(Ce);for(O=32;O<64;++O)j[O]=0;for(O=0;O<32;++O)j[O]=q[O];for(O=0;O<32;++O)for(H=0;H<32;H++)j[O+H]+=Ce[O]*he[H];return I(w.subarray(32),j),ge}function T(w,M,L,b){var O,H,j=new o(32),Z=[J(),J(),J(),J()],he=[J(),J(),J(),J()];if(H=-1,L<64)return-1;if(K(he,b))return-1;for(O=0;O<L;++O)w[O]=M[O];for(O=0;O<32;++O)w[O+32]=b[O];var ge=c(w,L);if(v(ge),Q(Z,he,ge),z(he,M.subarray(32)),g(Z,he),S(j,Z),L-=64,V(M,0,j,0)){for(O=0;O<L;++O)w[O]=0;return-1}for(O=0;O<L;++O)w[O]=M[O+64];return H=L,H}function I(w,M){var L,b,O,H;for(b=63;b>=32;--b){L=0;for(O=b-32,H=b-12;O<H;++O)M[O]+=L-16*M[b]*B[O-(b-32)],L=M[O]+128>>8,M[O]-=L*256;M[O]+=L,M[b]=0}L=0;for(O=0;O<32;++O)M[O]+=L-(M[31]>>4)*B[O],L=M[O]>>8,M[O]&=255;for(O=0;O<32;++O)M[O]-=L*B[O];for(b=0;b<32;++b)M[b+1]+=M[b]>>8,w[b]=M[b]&255}function v(w){var M=new Float64Array(64);for(var L=0;L<64;++L)M[L]=w[L],w[L]=0;I(w,M)}function g(w,M){var L=J(),b=J(),O=J(),H=J(),j=J(),Z=J(),he=J(),ge=J(),q=J();se(L,w[1],w[0]),se(q,M[1],M[0]),ce(L,L,q),ye(b,w[0],w[1]),ye(q,M[0],M[1]),ce(b,b,q),ce(O,w[3],M[3]),ce(O,O,p),ce(H,w[2],M[2]),ye(H,H,H),se(j,b,L),se(Z,H,O),ye(he,H,O),ye(ge,b,L),ce(w[0],j,Z),ce(w[1],ge,he),ce(w[2],he,Z),ce(w[3],j,ge)}function E(w,M,L){for(var b=0;b<4;++b)Fe(w[b],M[b],L)}function S(w,M){var L=J(),b=J(),O=J();ne(O,M[2]),ce(L,M[0],O),ce(b,M[1],O),_(w,b),w[31]^=W(L)<<7}function _(w,M){var L,b,O,H=J(),j=J();for(L=0;L<16;++L)j[L]=M[L];Ee(j),Ee(j),Ee(j);for(b=0;b<2;++b){H[0]=j[0]-65517;for(L=1;L<15;++L)H[L]=j[L]-65535-(H[L-1]>>16&1),H[L-1]&=65535;H[15]=j[15]-32767-(H[14]>>16&1),O=H[15]>>16&1,H[14]&=65535,Fe(j,H,1-O)}for(L=0;L<16;L++)w[2*L]=j[L]&255,w[2*L+1]=j[L]>>8}function K(w,M){var L=J(),b=J(),O=J(),H=J(),j=J(),Z=J(),he=J();if(x(w[2],d),N(w[1],M),Ie(O,w[1]),ce(H,O,F),se(O,O,w[2]),ye(H,w[2],H),Ie(j,H),Ie(Z,j),ce(he,Z,j),ce(L,he,O),ce(L,L,H),$(L,L),ce(L,L,O),ce(L,L,H),ce(L,L,H),ce(w[0],L,H),Ie(b,w[0]),ce(b,b,H),P(b,O))ce(w[0],w[0],C);if(Ie(b,w[0]),ce(b,b,H),P(b,O))return-1;if(W(w[0])===M[31]>>7)se(w[0],h,w[0]);return ce(w[3],w[0],w[1]),0}function N(w,M){var L;for(L=0;L<16;++L)w[L]=M[2*L]+(M[2*L+1]<<8);w[15]&=32767}function $(w,M){var L=J(),b;for(b=0;b<16;++b)L[b]=M[b];for(b=250;b>=0;--b)if(Ie(L,L),b!==1)ce(L,L,M);for(b=0;b<16;++b)w[b]=L[b]}function P(w,M){var L=new o(32),b=new o(32);return _(L,w),_(b,M),V(L,0,b,0)}function V(w,M,L,b){return k(w,M,L,b,32)}function k(w,M,L,b,O){var H,j=0;for(H=0;H<O;++H)j|=w[M+H]^L[b+H];return(1&j-1>>>8)-1}function W(w){var M=new o(32);return _(M,w),M[0]&1}function Q(w,M,L){var b,O;x(w[0],h),x(w[1],d),x(w[2],d),x(w[3],h);for(O=255;O>=0;--O)b=L[O/8|0]>>(O&7)&1,E(w,M,b),g(M,w),g(w,w),E(w,M,b)}function z(w,M){var L=[J(),J(),J(),J()];x(L[0],f),x(L[1],m),x(L[2],d),ce(L[3],f,m),Q(w,L,M)}function x(w,M){var L;for(L=0;L<16;L++)w[L]=M[L]|0}function ne(w,M){var L=J(),b;for(b=0;b<16;++b)L[b]=M[b];for(b=253;b>=0;--b)if(Ie(L,L),b!==2&&b!==4)ce(L,L,M);for(b=0;b<16;++b)w[b]=L[b]}function Ee(w){var M,L,b=1;for(M=0;M<16;++M)L=w[M]+b+65535,b=Math.floor(L/65536),w[M]=L-b*65536;w[0]+=b-1+37*(b-1)}function Fe(w,M,L){var b,O=~(L-1);for(var H=0;H<16;++H)b=O&(w[H]^M[H]),w[H]^=b,M[H]^=b}function J(w){var M,L=new Float64Array(16);if(w)for(M=0;M<w.length;++M)L[M]=w[M];return L}function ye(w,M,L){for(var b=0;b<16;++b)w[b]=M[b]+L[b]}function se(w,M,L){for(var b=0;b<16;++b)w[b]=M[b]-L[b]}function Ie(w,M){ce(w,M,M)}function ce(w,M,L){var b,O,H=0,j=0,Z=0,he=0,ge=0,q=0,Ce=0,we=0,Me=0,Re=0,ct=0,Ft=0,yt=0,Dt=0,at=0,ht=0,St=0,Qt=0,Tt=0,Jt=0,eu=0,su=0,nu=0,pu=0,_u=0,zu=0,dr=0,$r=0,xr=0,Ni=0,Es=0,wt=L[0],It=L[1],Nt=L[2],_t=L[3],$t=L[4],Rt=L[5],Ot=L[6],Lt=L[7],Ut=L[8],Pt=L[9],Mt=L[10],kt=L[11],Vt=L[12],Kt=L[13],ft=L[14],Bt=L[15];b=M[0],H+=b*wt,j+=b*It,Z+=b*Nt,he+=b*_t,ge+=b*$t,q+=b*Rt,Ce+=b*Ot,we+=b*Lt,Me+=b*Ut,Re+=b*Pt,ct+=b*Mt,Ft+=b*kt,yt+=b*Vt,Dt+=b*Kt,at+=b*ft,ht+=b*Bt,b=M[1],j+=b*wt,Z+=b*It,he+=b*Nt,ge+=b*_t,q+=b*$t,Ce+=b*Rt,we+=b*Ot,Me+=b*Lt,Re+=b*Ut,ct+=b*Pt,Ft+=b*Mt,yt+=b*kt,Dt+=b*Vt,at+=b*Kt,ht+=b*ft,St+=b*Bt,b=M[2],Z+=b*wt,he+=b*It,ge+=b*Nt,q+=b*_t,Ce+=b*$t,we+=b*Rt,Me+=b*Ot,Re+=b*Lt,ct+=b*Ut,Ft+=b*Pt,yt+=b*Mt,Dt+=b*kt,at+=b*Vt,ht+=b*Kt,St+=b*ft,Qt+=b*Bt,b=M[3],he+=b*wt,ge+=b*It,q+=b*Nt,Ce+=b*_t,we+=b*$t,Me+=b*Rt,Re+=b*Ot,ct+=b*Lt,Ft+=b*Ut,yt+=b*Pt,Dt+=b*Mt,at+=b*kt,ht+=b*Vt,St+=b*Kt,Qt+=b*ft,Tt+=b*Bt,b=M[4],ge+=b*wt,q+=b*It,Ce+=b*Nt,we+=b*_t,Me+=b*$t,Re+=b*Rt,ct+=b*Ot,Ft+=b*Lt,yt+=b*Ut,Dt+=b*Pt,at+=b*Mt,ht+=b*kt,St+=b*Vt,Qt+=b*Kt,Tt+=b*ft,Jt+=b*Bt,b=M[5],q+=b*wt,Ce+=b*It,we+=b*Nt,Me+=b*_t,Re+=b*$t,ct+=b*Rt,Ft+=b*Ot,yt+=b*Lt,Dt+=b*Ut,at+=b*Pt,ht+=b*Mt,St+=b*kt,Qt+=b*Vt,Tt+=b*Kt,Jt+=b*ft,eu+=b*Bt,b=M[6],Ce+=b*wt,we+=b*It,Me+=b*Nt,Re+=b*_t,ct+=b*$t,Ft+=b*Rt,yt+=b*Ot,Dt+=b*Lt,at+=b*Ut,ht+=b*Pt,St+=b*Mt,Qt+=b*kt,Tt+=b*Vt,Jt+=b*Kt,eu+=b*ft,su+=b*Bt,b=M[7],we+=b*wt,Me+=b*It,Re+=b*Nt,ct+=b*_t,Ft+=b*$t,yt+=b*Rt,Dt+=b*Ot,at+=b*Lt,ht+=b*Ut,St+=b*Pt,Qt+=b*Mt,Tt+=b*kt,Jt+=b*Vt,eu+=b*Kt,su+=b*ft,nu+=b*Bt,b=M[8],Me+=b*wt,Re+=b*It,ct+=b*Nt,Ft+=b*_t,yt+=b*$t,Dt+=b*Rt,at+=b*Ot,ht+=b*Lt,St+=b*Ut,Qt+=b*Pt,Tt+=b*Mt,Jt+=b*kt,eu+=b*Vt,su+=b*Kt,nu+=b*ft,pu+=b*Bt,b=M[9],Re+=b*wt,ct+=b*It,Ft+=b*Nt,yt+=b*_t,Dt+=b*$t,at+=b*Rt,ht+=b*Ot,St+=b*Lt,Qt+=b*Ut,Tt+=b*Pt,Jt+=b*Mt,eu+=b*kt,su+=b*Vt,nu+=b*Kt,pu+=b*ft,_u+=b*Bt,b=M[10],ct+=b*wt,Ft+=b*It,yt+=b*Nt,Dt+=b*_t,at+=b*$t,ht+=b*Rt,St+=b*Ot,Qt+=b*Lt,Tt+=b*Ut,Jt+=b*Pt,eu+=b*Mt,su+=b*kt,nu+=b*Vt,pu+=b*Kt,_u+=b*ft,zu+=b*Bt,b=M[11],Ft+=b*wt,yt+=b*It,Dt+=b*Nt,at+=b*_t,ht+=b*$t,St+=b*Rt,Qt+=b*Ot,Tt+=b*Lt,Jt+=b*Ut,eu+=b*Pt,su+=b*Mt,nu+=b*kt,pu+=b*Vt,_u+=b*Kt,zu+=b*ft,dr+=b*Bt,b=M[12],yt+=b*wt,Dt+=b*It,at+=b*Nt,ht+=b*_t,St+=b*$t,Qt+=b*Rt,Tt+=b*Ot,Jt+=b*Lt,eu+=b*Ut,su+=b*Pt,nu+=b*Mt,pu+=b*kt,_u+=b*Vt,zu+=b*Kt,dr+=b*ft,$r+=b*Bt,b=M[13],Dt+=b*wt,at+=b*It,ht+=b*Nt,St+=b*_t,Qt+=b*$t,Tt+=b*Rt,Jt+=b*Ot,eu+=b*Lt,su+=b*Ut,nu+=b*Pt,pu+=b*Mt,_u+=b*kt,zu+=b*Vt,dr+=b*Kt,$r+=b*ft,xr+=b*Bt,b=M[14],at+=b*wt,ht+=b*It,St+=b*Nt,Qt+=b*_t,Tt+=b*$t,Jt+=b*Rt,eu+=b*Ot,su+=b*Lt,nu+=b*Ut,pu+=b*Pt,_u+=b*Mt,zu+=b*kt,dr+=b*Vt,$r+=b*Kt,xr+=b*ft,Ni+=b*Bt,b=M[15],ht+=b*wt,St+=b*It,Qt+=b*Nt,Tt+=b*_t,Jt+=b*$t,eu+=b*Rt,su+=b*Ot,nu+=b*Lt,pu+=b*Ut,_u+=b*Pt,zu+=b*Mt,dr+=b*kt,$r+=b*Vt,xr+=b*Kt,Ni+=b*ft,Es+=b*Bt,H+=38*St,j+=38*Qt,Z+=38*Tt,he+=38*Jt,ge+=38*eu,q+=38*su,Ce+=38*nu,we+=38*pu,Me+=38*_u,Re+=38*zu,ct+=38*dr,Ft+=38*$r,yt+=38*xr,Dt+=38*Ni,at+=38*Es,O=1,b=H+O+65535,O=Math.floor(b/65536),H=b-O*65536,b=j+O+65535,O=Math.floor(b/65536),j=b-O*65536,b=Z+O+65535,O=Math.floor(b/65536),Z=b-O*65536,b=he+O+65535,O=Math.floor(b/65536),he=b-O*65536,b=ge+O+65535,O=Math.floor(b/65536),ge=b-O*65536,b=q+O+65535,O=Math.floor(b/65536),q=b-O*65536,b=Ce+O+65535,O=Math.floor(b/65536),Ce=b-O*65536,b=we+O+65535,O=Math.floor(b/65536),we=b-O*65536,b=Me+O+65535,O=Math.floor(b/65536),Me=b-O*65536,b=Re+O+65535,O=Math.floor(b/65536),Re=b-O*65536,b=ct+O+65535,O=Math.floor(b/65536),ct=b-O*65536,b=Ft+O+65535,O=Math.floor(b/65536),Ft=b-O*65536,b=yt+O+65535,O=Math.floor(b/65536),yt=b-O*65536,b=Dt+O+65535,O=Math.floor(b/65536),Dt=b-O*65536,b=at+O+65535,O=Math.floor(b/65536),at=b-O*65536,b=ht+O+65535,O=Math.floor(b/65536),ht=b-O*65536,H+=O-1+37*(O-1),O=1,b=H+O+65535,O=Math.floor(b/65536),H=b-O*65536,b=j+O+65535,O=Math.floor(b/65536),j=b-O*65536,b=Z+O+65535,O=Math.floor(b/65536),Z=b-O*65536,b=he+O+65535,O=Math.floor(b/65536),he=b-O*65536,b=ge+O+65535,O=Math.floor(b/65536),ge=b-O*65536,b=q+O+65535,O=Math.floor(b/65536),q=b-O*65536,b=Ce+O+65535,O=Math.floor(b/65536),Ce=b-O*65536,b=we+O+65535,O=Math.floor(b/65536),we=b-O*65536,b=Me+O+65535,O=Math.floor(b/65536),Me=b-O*65536,b=Re+O+65535,O=Math.floor(b/65536),Re=b-O*65536,b=ct+O+65535,O=Math.floor(b/65536),ct=b-O*65536,b=Ft+O+65535,O=Math.floor(b/65536),Ft=b-O*65536,b=yt+O+65535,O=Math.floor(b/65536),yt=b-O*65536,b=Dt+O+65535,O=Math.floor(b/65536),Dt=b-O*65536,b=at+O+65535,O=Math.floor(b/65536),at=b-O*65536,b=ht+O+65535,O=Math.floor(b/65536),ht=b-O*65536,H+=O-1+37*(O-1),w[0]=H,w[1]=j,w[2]=Z,w[3]=he,w[4]=ge,w[5]=q,w[6]=Ce,w[7]=we,w[8]=Me,w[9]=Re,w[10]=ct,w[11]=Ft,w[12]=yt,w[13]=Dt,w[14]=at,w[15]=ht}}),e9=$e((e,u)=>{var t=Ue();Ke(),Nu(),Sn(),u.exports=t.kem=t.kem||{};var r=t.jsbn.BigInteger;t.kem.rsa={},t.kem.rsa.create=function(n,i){i=i||{};var l=i.prng||t.random,o={};return o.encrypt=function(a,D){var h=Math.ceil(a.n.bitLength()/8),d;do d=new r(t.util.bytesToHex(l.getBytesSync(h)),16).mod(a.n);while(d.compareTo(r.ONE)<=0);d=t.util.hexToBytes(d.toString(16));var F=h-d.length;if(F>0)d=t.util.fillString(String.fromCharCode(0),F)+d;var p=a.encrypt(d,"NONE"),f=n.generate(d,D);return{encapsulation:p,key:f}},o.decrypt=function(a,D,h){var d=a.decrypt(D,"NONE");return n.generate(d,h)},o},t.kem.kdf1=function(n,i){s(this,n,0,i||n.digestLength)},t.kem.kdf2=function(n,i){s(this,n,1,i||n.digestLength)};function s(n,i,l,o){n.generate=function(a,D){var h=new t.util.ByteBuffer,d=Math.ceil(D/o)+l,F=new t.util.ByteBuffer;for(var p=l;p<d;++p){F.putInt32(p),i.start(),i.update(a+F.getBytes());var f=i.digest();h.putBytes(f.getBytes(o))}return h.truncate(h.length()-D),h.getBytes()}}}),t9=$e((e,u)=>{var t=Ue();Ke(),u.exports=t.log=t.log||{},t.log.levels=["none","error","warning","info","debug","verbose","max"];var r={},s=[],n=null;t.log.LEVEL_LOCKED=2,t.log.NO_LEVEL_CHECK=4,t.log.INTERPOLATE=8;for(o=0;o<t.log.levels.length;++o)i=t.log.levels[o],r[i]={index:o,name:i.toUpperCase()};var i,o;t.log.logMessage=function(p){var f=r[p.level].index;for(var m=0;m<s.length;++m){var B=s[m];if(B.flags&t.log.NO_LEVEL_CHECK)B.f(p);else{var C=r[B.level].index;if(f<=C)B.f(B,p)}}},t.log.prepareStandard=function(p){if(!("standard"in p))p.standard=r[p.level].name+" ["+p.category+"] "+p.message},t.log.prepareFull=function(p){if(!("full"in p)){var f=[p.message];f=f.concat([]),p.full=t.util.format.apply(this,f)}},t.log.prepareStandardFull=function(p){if(!("standardFull"in p))t.log.prepareStandard(p),p.standardFull=p.standard},l=["error","warning","info","debug","verbose"];for(o=0;o<l.length;++o)(function(p){t.log[p]=function(f,m){var B=Array.prototype.slice.call(arguments).slice(2),C={timestamp:new Date,level:p,category:f,message:m,arguments:B};t.log.logMessage(C)}})(l[o]);var l,o;if(t.log.makeLogger=function(p){var f={flags:0,f:p};return t.log.setLevel(f,"none"),f},t.log.setLevel=function(p,f){var m=!1;if(p&&!(p.flags&t.log.LEVEL_LOCKED))for(var B=0;B<t.log.levels.length;++B){var C=t.log.levels[B];if(f==C){p.level=f,m=!0;break}}return m},t.log.lock=function(p,f){if(typeof f==="undefined"||f)p.flags|=t.log.LEVEL_LOCKED;else p.flags&=~t.log.LEVEL_LOCKED},t.log.addLogger=function(p){s.push(p)},typeof console!=="undefined"&&"log"in console){if(console.error&&console.warn&&console.info&&console.debug)D={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},h=function(p,f){t.log.prepareStandard(f);var m=D[f.level],B=[f.standard];B=B.concat(f.arguments.slice()),m.apply(console,B)},a=t.log.makeLogger(h);else h=function(p,f){t.log.prepareStandardFull(f),console.log(f.standardFull)},a=t.log.makeLogger(h);t.log.setLevel(a,"debug"),t.log.addLogger(a),n=a}else console={log:function(){}};var a,D,h;if(n!==null&&typeof window!=="undefined"&&window.location){if(d=new URL(window.location.href).searchParams,d.has("console.level"))t.log.setLevel(n,d.get("console.level").slice(-1)[0]);if(d.has("console.lock")){if(F=d.get("console.lock").slice(-1)[0],F=="true")t.log.lock(n)}}var d,F;t.log.consoleLogger=n}),u9=$e((e,u)=>{u.exports=or(),S0(),ns(),Of(),Hf()}),r9=$e((e,u)=>{var t=Ue();Hr(),Wu(),bn(),Qr(),Si(),Vf(),Nu(),Ke(),I0();var r=t.asn1,s=u.exports=t.pkcs7=t.pkcs7||{};s.messageFromPem=function(f){var m=t.pem.decode(f)[0];if(m.type!=="PKCS7"){var B=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw B.headerType=m.type,B}if(m.procType&&m.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var C=r.fromDer(m.body);return s.messageFromAsn1(C)},s.messageToPem=function(f,m){var B={type:"PKCS7",body:r.toDer(f.toAsn1()).getBytes()};return t.pem.encode(B,{maxline:m})},s.messageFromAsn1=function(f){var m={},B=[];if(!r.validate(f,s.asn1.contentInfoValidator,m,B)){var C=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw C.errors=B,C}var c=r.derToOid(m.contentType),y;switch(c){case t.pki.oids.envelopedData:y=s.createEnvelopedData();break;case t.pki.oids.encryptedData:y=s.createEncryptedData();break;case t.pki.oids.signedData:y=s.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+c+" is not (yet) supported.")}return y.fromAsn1(m.content.value[0]),y},s.createSignedData=function(){var f=null;return f={type:t.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(C){if(F(f,C,s.asn1.signedDataValidator),f.certificates=[],f.crls=[],f.digestAlgorithmIdentifiers=[],f.contentInfo=null,f.signerInfos=[],f.rawCapture.certificates){var c=f.rawCapture.certificates.value;for(var y=0;y<c.length;++y)f.certificates.push(t.pki.certificateFromAsn1(c[y]))}},toAsn1:function(){if(!f.contentInfo)f.sign();var C=[];for(var c=0;c<f.certificates.length;++c)C.push(t.pki.certificateToAsn1(f.certificates[c]));var y=[],A=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(f.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,f.digestAlgorithmIdentifiers),f.contentInfo])]);if(C.length>0)A.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,C));if(y.length>0)A.value[0].value.push(r.create(r.Class.CONTEXT_SPECIFIC,1,!0,y));return A.value[0].value.push(r.create(r.Class.UNIVERSAL,r.Type.SET,!0,f.signerInfos)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(f.type).getBytes()),A])},addSigner:function(C){var{issuer:c,serialNumber:y}=C;if(C.certificate){var A=C.certificate;if(typeof A==="string")A=t.pki.certificateFromPem(A);c=A.issuer.attributes,y=A.serialNumber}var T=C.key;if(!T)throw new Error("Could not add PKCS#7 signer; no private key specified.");if(typeof T==="string")T=t.pki.privateKeyFromPem(T);var I=C.digestAlgorithm||t.pki.oids.sha1;switch(I){case t.pki.oids.sha1:case t.pki.oids.sha256:case t.pki.oids.sha384:case t.pki.oids.sha512:case t.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+I)}var v=C.authenticatedAttributes||[];if(v.length>0){var g=!1,E=!1;for(var S=0;S<v.length;++S){var _=v[S];if(!g&&_.type===t.pki.oids.contentType){if(g=!0,E)break;continue}if(!E&&_.type===t.pki.oids.messageDigest){if(E=!0,g)break;continue}}if(!g||!E)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}f.signers.push({key:T,version:1,issuer:c,serialNumber:y,digestAlgorithm:I,signatureAlgorithm:t.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:v,unauthenticatedAttributes:[]})},sign:function(C){if(C=C||{},typeof f.content!=="object"||f.contentInfo===null){if(f.contentInfo=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(t.pki.oids.data).getBytes())]),"content"in f){var c;if(f.content instanceof t.util.ByteBuffer)c=f.content.bytes();else if(typeof f.content==="string")c=t.util.encodeUtf8(f.content);if(C.detached)f.detachedContent=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c);else f.contentInfo.value.push(r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,c)]))}}if(f.signers.length===0)return;var y=m();B(y)},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(C){if(typeof C==="string")C=t.pki.certificateFromPem(C);f.certificates.push(C)},addCertificateRevokationList:function(C){throw new Error("PKCS#7 CRL support not yet implemented.")}},f;function m(){var C={};for(var c=0;c<f.signers.length;++c){var y=f.signers[c],A=y.digestAlgorithm;if(!(A in C))C[A]=t.md[t.pki.oids[A]].create();if(y.authenticatedAttributes.length===0)y.md=C[A];else y.md=t.md[t.pki.oids[A]].create()}f.digestAlgorithmIdentifiers=[];for(var A in C)f.digestAlgorithmIdentifiers.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(A).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]));return C}function B(C){var c;if(f.detachedContent)c=f.detachedContent;else c=f.contentInfo.value[1],c=c.value[0];if(!c)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var y=r.derToOid(f.contentInfo.value[0].value),A=r.toDer(c);A.getByte(),r.getBerValueLength(A),A=A.getBytes();for(var T in C)C[T].start().update(A);var I=new Date;for(var v=0;v<f.signers.length;++v){var g=f.signers[v];if(g.authenticatedAttributes.length===0){if(y!==t.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{g.authenticatedAttributesAsn1=r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[]);var E=r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[]);for(var S=0;S<g.authenticatedAttributes.length;++S){var _=g.authenticatedAttributes[S];if(_.type===t.pki.oids.messageDigest)_.value=C[g.digestAlgorithm].digest();else if(_.type===t.pki.oids.signingTime){if(!_.value)_.value=I}E.value.push(h(_)),g.authenticatedAttributesAsn1.value.push(h(_))}A=r.toDer(E).getBytes(),g.md.start().update(A)}g.signature=g.key.sign(g.md,"RSASSA-PKCS1-V1_5")}f.signerInfos=D(f.signers)}},s.createEncryptedData=function(){var f=null;return f={type:t.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:t.pki.oids["aes256-CBC"]},fromAsn1:function(m){F(f,m,s.asn1.encryptedDataValidator)},decrypt:function(m){if(m!==void 0)f.encryptedContent.key=m;p(f)}},f},s.createEnvelopedData=function(){var f=null;return f={type:t.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:t.pki.oids["aes256-CBC"]},fromAsn1:function(m){var B=F(f,m,s.asn1.envelopedDataValidator);f.recipients=l(B.recipientInfos.value)},toAsn1:function(){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(f.type).getBytes()),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(f.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,o(f.recipients)),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,d(f.encryptedContent))])])])},findRecipient:function(m){var B=m.issuer.attributes;for(var C=0;C<f.recipients.length;++C){var c=f.recipients[C],y=c.issuer;if(c.serialNumber!==m.serialNumber)continue;if(y.length!==B.length)continue;var A=!0;for(var T=0;T<B.length;++T)if(y[T].type!==B[T].type||y[T].value!==B[T].value){A=!1;break}if(A)return c}return null},decrypt:function(m,B){if(f.encryptedContent.key===void 0&&m!==void 0&&B!==void 0)switch(m.encryptedContent.algorithm){case t.pki.oids.rsaEncryption:case t.pki.oids.desCBC:var C=B.decrypt(m.encryptedContent.content);f.encryptedContent.key=t.util.createBuffer(C);break;default:throw new Error("Unsupported asymmetric cipher, OID "+m.encryptedContent.algorithm)}p(f)},addRecipient:function(m){f.recipients.push({version:0,issuer:m.issuer.attributes,serialNumber:m.serialNumber,encryptedContent:{algorithm:t.pki.oids.rsaEncryption,key:m.publicKey}})},encrypt:function(m,B){if(f.encryptedContent.content===void 0){B=B||f.encryptedContent.algorithm,m=m||f.encryptedContent.key;var C,c,y;switch(B){case t.pki.oids["aes128-CBC"]:C=16,c=16,y=t.aes.createEncryptionCipher;break;case t.pki.oids["aes192-CBC"]:C=24,c=16,y=t.aes.createEncryptionCipher;break;case t.pki.oids["aes256-CBC"]:C=32,c=16,y=t.aes.createEncryptionCipher;break;case t.pki.oids["des-EDE3-CBC"]:C=24,c=8,y=t.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+B)}if(m===void 0)m=t.util.createBuffer(t.random.getBytes(C));else if(m.length()!=C)throw new Error("Symmetric key has wrong length; got "+m.length()+" bytes, expected "+C+".");f.encryptedContent.algorithm=B,f.encryptedContent.key=m,f.encryptedContent.parameter=t.util.createBuffer(t.random.getBytes(c));var A=y(m);if(A.start(f.encryptedContent.parameter.copy()),A.update(f.content),!A.finish())throw new Error("Symmetric encryption failed.");f.encryptedContent.content=A.output}for(var T=0;T<f.recipients.length;++T){var I=f.recipients[T];if(I.encryptedContent.content!==void 0)continue;switch(I.encryptedContent.algorithm){case t.pki.oids.rsaEncryption:I.encryptedContent.content=I.encryptedContent.key.encrypt(f.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+I.encryptedContent.algorithm)}}}},f};function n(f){var m={},B=[];if(!r.validate(f,s.asn1.recipientInfoValidator,m,B)){var C=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw C.errors=B,C}return{version:m.version.charCodeAt(0),issuer:t.pki.RDNAttributesAsArray(m.issuer),serialNumber:t.util.createBuffer(m.serial).toHex(),encryptedContent:{algorithm:r.derToOid(m.encAlgorithm),parameter:m.encParameter?m.encParameter.value:void 0,content:m.encKey}}}function i(f){return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(f.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[t.pki.distinguishedNameToAsn1({attributes:f.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,t.util.hexToBytes(f.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(f.encryptedContent.algorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")]),r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,f.encryptedContent.content)])}function l(f){var m=[];for(var B=0;B<f.length;++B)m.push(n(f[B]));return m}function o(f){var m=[];for(var B=0;B<f.length;++B)m.push(i(f[B]));return m}function a(f){var m=r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,r.integerToDer(f.version).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[t.pki.distinguishedNameToAsn1({attributes:f.issuer}),r.create(r.Class.UNIVERSAL,r.Type.INTEGER,!1,t.util.hexToBytes(f.serialNumber))]),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(f.digestAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])]);if(f.authenticatedAttributesAsn1)m.value.push(f.authenticatedAttributesAsn1);if(m.value.push(r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(f.signatureAlgorithm).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.NULL,!1,"")])),m.value.push(r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,f.signature)),f.unauthenticatedAttributes.length>0){var B=r.create(r.Class.CONTEXT_SPECIFIC,1,!0,[]);for(var C=0;C<f.unauthenticatedAttributes.length;++C){var c=f.unauthenticatedAttributes[C];B.values.push(h(c))}m.value.push(B)}return m}function D(f){var m=[];for(var B=0;B<f.length;++B)m.push(a(f[B]));return m}function h(f){var m;if(f.type===t.pki.oids.contentType)m=r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(f.value).getBytes());else if(f.type===t.pki.oids.messageDigest)m=r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,f.value.bytes());else if(f.type===t.pki.oids.signingTime){var B=new Date("1950-01-01T00:00:00Z"),C=new Date("2050-01-01T00:00:00Z"),c=f.value;if(typeof c==="string"){var y=Date.parse(c);if(!isNaN(y))c=new Date(y);else if(c.length===13)c=r.utcTimeToDate(c);else c=r.generalizedTimeToDate(c)}if(c>=B&&c<C)m=r.create(r.Class.UNIVERSAL,r.Type.UTCTIME,!1,r.dateToUtcTime(c));else m=r.create(r.Class.UNIVERSAL,r.Type.GENERALIZEDTIME,!1,r.dateToGeneralizedTime(c))}return r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(f.type).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SET,!0,[m])])}function d(f){return[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(t.pki.oids.data).getBytes()),r.create(r.Class.UNIVERSAL,r.Type.SEQUENCE,!0,[r.create(r.Class.UNIVERSAL,r.Type.OID,!1,r.oidToDer(f.algorithm).getBytes()),!f.parameter?void 0:r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,f.parameter.getBytes())]),r.create(r.Class.CONTEXT_SPECIFIC,0,!0,[r.create(r.Class.UNIVERSAL,r.Type.OCTETSTRING,!1,f.content.getBytes())])]}function F(f,m,B){var C={},c=[];if(!r.validate(m,B,C,c)){var y=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw y.errors=y,y}var A=r.derToOid(C.contentType);if(A!==t.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(C.encryptedContent){var T="";if(t.util.isArray(C.encryptedContent))for(var I=0;I<C.encryptedContent.length;++I){if(C.encryptedContent[I].type!==r.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");T+=C.encryptedContent[I].value}else T=C.encryptedContent;f.encryptedContent={algorithm:r.derToOid(C.encAlgorithm),parameter:t.util.createBuffer(C.encParameter.value),content:t.util.createBuffer(T)}}if(C.content){var T="";if(t.util.isArray(C.content))for(var I=0;I<C.content.length;++I){if(C.content[I].type!==r.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");T+=C.content[I].value}else T=C.content;f.content=t.util.createBuffer(T)}return f.version=C.version.charCodeAt(0),f.rawCapture=C,C}function p(f){if(f.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(f.content===void 0){var m;switch(f.encryptedContent.algorithm){case t.pki.oids["aes128-CBC"]:case t.pki.oids["aes192-CBC"]:case t.pki.oids["aes256-CBC"]:m=t.aes.createDecryptionCipher(f.encryptedContent.key);break;case t.pki.oids.desCBC:case t.pki.oids["des-EDE3-CBC"]:m=t.des.createDecryptionCipher(f.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+f.encryptedContent.algorithm)}if(m.start(f.encryptedContent.parameter),m.update(f.encryptedContent.content),!m.finish())throw new Error("Symmetric decryption failed.");f.content=m.output}}}),i9=$e((e,u)=>{var t=Ue();Hr(),ss(),S0(),ns(),Ke();var r=u.exports=t.ssh=t.ssh||{};r.privateKeyToPutty=function(l,o,a){a=a||"",o=o||"";var D="ssh-rsa",h=o===""?"none":"aes256-cbc",d="PuTTY-User-Key-File-2: "+D+`\r
|
|
337
|
-
`;d+="Encryption: "+h+`\r
|
|
338
|
-
`,d+="Comment: "+a+`\r
|
|
339
|
-
`;var F=t.util.createBuffer();n(F,D),s(F,l.e),s(F,l.n);var p=t.util.encode64(F.bytes(),64),f=Math.floor(p.length/66)+1;d+="Public-Lines: "+f+`\r
|
|
340
|
-
`,d+=p;var m=t.util.createBuffer();s(m,l.d),s(m,l.p),s(m,l.q),s(m,l.qInv);var B;if(!o)B=t.util.encode64(m.bytes(),64);else{var C=m.length()+16-1;C-=C%16;var c=i(m.bytes());c.truncate(c.length()-C+m.length()),m.putBuffer(c);var y=t.util.createBuffer();y.putBuffer(i("\x00\x00\x00\x00",o)),y.putBuffer(i("\x00\x00\x00\x01",o));var A=t.aes.createEncryptionCipher(y.truncate(8),"CBC");A.start(t.util.createBuffer().fillWithByte(0,16)),A.update(m.copy()),A.finish();var T=A.output;T.truncate(16),B=t.util.encode64(T.bytes(),64)}f=Math.floor(B.length/66)+1,d+=`\r
|
|
341
|
-
Private-Lines: `+f+`\r
|
|
342
|
-
`,d+=B;var I=i("putty-private-key-file-mac-key",o),v=t.util.createBuffer();n(v,D),n(v,h),n(v,a),v.putInt32(F.length()),v.putBuffer(F),v.putInt32(m.length()),v.putBuffer(m);var g=t.hmac.create();return g.start("sha1",I),g.update(v.bytes()),d+=`\r
|
|
343
|
-
Private-MAC: `+g.digest().toHex()+`\r
|
|
344
|
-
`,d},r.publicKeyToOpenSSH=function(l,o){var a="ssh-rsa";o=o||"";var D=t.util.createBuffer();return n(D,a),s(D,l.e),s(D,l.n),a+" "+t.util.encode64(D.bytes())+" "+o},r.privateKeyToOpenSSH=function(l,o){if(!o)return t.pki.privateKeyToPem(l);return t.pki.encryptRsaPrivateKey(l,o,{legacy:!0,algorithm:"aes128"})},r.getPublicKeyFingerprint=function(l,o){o=o||{};var a=o.md||t.md.md5.create(),D="ssh-rsa",h=t.util.createBuffer();n(h,D),s(h,l.e),s(h,l.n),a.start(),a.update(h.getBytes());var d=a.digest();if(o.encoding==="hex"){var F=d.toHex();if(o.delimiter)return F.match(/.{2}/g).join(o.delimiter);return F}else if(o.encoding==="binary")return d.getBytes();else if(o.encoding)throw new Error('Unknown encoding "'+o.encoding+'".');return d};function s(l,o){var a=o.toString(16);if(a[0]>="8")a="00"+a;var D=t.util.hexToBytes(a);l.putInt32(D.length),l.putBytes(D)}function n(l,o){l.putInt32(o.length),l.putString(o)}function i(){var l=t.md.sha1.create(),o=arguments.length;for(var a=0;a<o;++a)l.update(arguments[a]);return l.digest()}}),Qf=$e((e,u)=>{u.exports=Ue(),Hr(),Zy(),Wu(),b0(),bn(),Jy(),ss(),e9(),t9(),u9(),Kf(),T0(),Si(),Pf(),Gf(),r9(),jf(),Mf(),Lf(),w0(),Nu(),Uf(),i9(),Wf(),Ke()}),{create:F9,getPrototypeOf:A9,defineProperty:l0,getOwnPropertyNames:v9}=Object,B9=Object.prototype.hasOwnProperty,je=(e,u,t)=>{t=e!=null?F9(A9(e)):{};let r=u||!e||!e.__esModule?l0(t,"default",{value:e,enumerable:!0}):t;for(let s of v9(e))if(!B9.call(r,s))l0(r,s,{get:()=>e[s],enumerable:!0});return r},ue=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports),_0=(e,u)=>{for(var t in u)l0(e,t,{get:u[t],enumerable:!0,configurable:!0,set:(r)=>u[t]=()=>r})},wn=(e,u)=>()=>(e&&(u=e(e=0)),u);function ja(e){return e!==null&&typeof e==="object"}function o0(e,u,t=".",r){if(!ja(u))return o0(e,{},t,r);let s=Object.assign({},u);for(let n in e){if(n==="__proto__"||n==="constructor")continue;let i=e[n];if(i===null||i===void 0)continue;if(r&&r(s,n,i,t))continue;if(Array.isArray(i)&&Array.isArray(s[n]))s[n]=[...i,...s[n]];else if(ja(i)&&ja(s[n]))s[n]=o0(i,s[n],(t?`${t}.`:"")+n.toString(),r);else s[n]=i}return s}function b9(e){return(...u)=>u.reduce((t,r)=>o0(t,r,"",e),{})}function S9(e){return Object.prototype.toString.call(e)==="[object Object]"}function T9(e){if(!S9(e))return!1;if(!e.message&&!e.args)return!1;if(e.stack)return!1;return!0}class qt{constructor(e={}){let u=e.types||c0;this.options=xf({...e,defaults:{...e.defaults},level:Wa(e.level,u),reporters:[...e.reporters||[]]},{types:c0,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let t in u){let r={type:t,...this.options.defaults,...u[t]};this[t]=this._wrapLogFn(r),this[t].raw=this._wrapLogFn(r,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(e){this.options.level=Wa(e,this.options.types,this.options.level)}prompt(e,u){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(e,u)}create(e){let u=new qt({...this.options,...e});if(this._mockFn)u.mockTypes(this._mockFn);return u}withDefaults(e){return this.create({...this.options,defaults:{...this.options.defaults,...e}})}withTag(e){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+e:e})}addReporter(e){return this.options.reporters.push(e),this}removeReporter(e){if(e){let u=this.options.reporters.indexOf(e);if(u>=0)return this.options.reporters.splice(u,1)}else this.options.reporters.splice(0);return this}setReporters(e){return this.options.reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let e in this.options.types){if(!console["__"+e])console["__"+e]=console[e];console[e]=this[e].raw}}restoreConsole(){for(let e in this.options.types)if(console["__"+e])console[e]=console["__"+e],delete console["__"+e]}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(e,u){if(!e)return;if(!e.__write)e.__write=e.write;e.write=(t)=>{this[u].raw(String(t).trim())}}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(e){if(!e)return;if(e.__write)e.write=e.__write,delete e.__write}pauseLogs(){Ha=!0}resumeLogs(){Ha=!1;let e=D0.splice(0);for(let u of e)u[0]._logFn(u[1],u[2])}mockTypes(e){let u=e||this.options.mockFn;if(this._mockFn=u,typeof u!=="function")return;for(let t in this.options.types)this[t]=u(t,this.options.types[t])||this[t],this[t].raw=this[t]}_wrapLogFn(e,u){return(...t)=>{if(Ha){D0.push([this,e,t,u]);return}return this._logFn(e,t,u)}}_logFn(e,u,t){if((e.level||0)>this.level)return!1;let r={date:new Date,args:[],...e,level:Wa(e.level,this.options.types)};if(!t&&u.length===1&&T9(u[0]))Object.assign(r,u[0]);else r.args=[...u];if(r.message)r.args.unshift(r.message),delete r.message;if(r.additional){if(!Array.isArray(r.additional))r.additional=r.additional.split(`
|
|
345
|
-
`);r.args.push(`
|
|
346
|
-
`+r.additional.join(`
|
|
347
|
-
`)),delete r.additional}r.type=typeof r.type==="string"?r.type.toLowerCase():"log",r.tag=typeof r.tag==="string"?r.tag:"";let s=(i=!1)=>{let l=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&l>0){let o=[...this._lastLog.object.args];if(l>1)o.push(`(repeated ${l} times)`);this._log({...this._lastLog.object,args:o}),this._lastLog.count=1}if(i)this._lastLog.object=r,this._log(r)};clearTimeout(this._lastLog.timeout);let n=this._lastLog.time&&r.date?r.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=r.date,n<this.options.throttle)try{let i=JSON.stringify([r.type,r.tag,r.args]),l=this._lastLog.serialized===i;if(this._lastLog.serialized=i,l){if(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin){this._lastLog.timeout=setTimeout(s,this.options.throttle);return}}}catch{}s(!0)}_log(e){for(let u of this.options.reporters)u.log(e,{options:this.options})}}function Wa(e,u={},t=3){if(e===void 0)return t;if(typeof e==="number")return e;if(u[e]&&u[e].level!==void 0)return u[e].level;return t}function w9(e={}){return new qt(e)}var xt,c0,xf,Ha=!1,D0,$0=wn(()=>{xt={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},c0={silent:{level:-1},fatal:{level:xt.fatal},error:{level:xt.error},warn:{level:xt.warn},log:{level:xt.log},info:{level:xt.info},success:{level:xt.success},fail:{level:xt.fail},ready:{level:xt.info},start:{level:xt.info},box:{level:xt.info},debug:{level:xt.debug},trace:{level:xt.trace},verbose:{level:xt.verbose}},xf=b9(),D0=[],qt.prototype.add=qt.prototype.addReporter,qt.prototype.remove=qt.prototype.removeReporter,qt.prototype.clear=qt.prototype.removeReporter,qt.prototype.withScope=qt.prototype.withTag,qt.prototype.mock=qt.prototype.mockTypes,qt.prototype.pause=qt.prototype.pauseLogs,qt.prototype.resume=qt.prototype.resumeLogs});function Zf(e){let u=process.cwd()+n9;return e.split(`
|
|
348
|
-
`).splice(1).map((t)=>t.trim().replace("file://","").replace(u,""))}function I9(e,u){return(u.__write||u.write).call(u,e)}class R0{formatStack(e,u){return" "+Zf(e).join(`
|
|
349
|
-
`)}formatArgs(e,u){let t=e.map((r)=>{if(r&&typeof r.stack==="string")return r.message+`
|
|
350
|
-
`+this.formatStack(r.stack,u);return r});return s9(u,...t)}formatDate(e,u){return u.date?e.toLocaleTimeString():""}filterAndJoin(e){return e.filter(Boolean).join(" ")}formatLogObj(e,u){let t=this.formatArgs(e.args,u);if(e.type==="box")return`
|
|
351
|
-
`+[Qa(e.tag),e.title&&e.title,...t.split(`
|
|
352
|
-
`)].filter(Boolean).map((r)=>" > "+r).join(`
|
|
353
|
-
`)+`
|
|
354
|
-
`;return this.filterAndJoin([Qa(e.type),Qa(e.tag),t])}log(e,u){let t=this.formatLogObj(e,{columns:u.options.stdout.columns||0,...u.options.formatOptions});return I9(t+`
|
|
355
|
-
`,e.level<2?u.options.stderr||process.stderr:u.options.stdout||process.stdout)}}var Qa=(e)=>e?`[${e}]`:"",O0=()=>{};function Xf(e,u,t,r,s=u.slice(0,Math.max(0,e))+r,n=u.slice(Math.max(0,e+t.length)),i=n.indexOf(t)){return s+(i<0?n:Xf(i,n,t,r))}function N9(e,u,t,r,s){return e<0?t+u+r:t+Xf(e,u,r,s)+r}function _9(e,u,t=e,r=e.length+1){return(s)=>s||!(s===""||s===void 0)?N9((""+s).indexOf(u,r),s,e,u,t):""}function Le(e,u,t){return _9(`\x1B[${e}m`,`\x1B[${u}m`,t)}function $9(e=Jf){return e?f0:Object.fromEntries(Object.keys(f0).map((u)=>[u,String]))}function R9(e,u="reset"){return ie[e]||ie[u]}function Iu(e){return e.replace(new RegExp(e1,"g"),"")}function O9(e,u={}){let t={...u,style:{...t1,...u.style}},r=e.split(`
|
|
356
|
-
`),s=[],n=R9(t.style.borderColor),i={...typeof t.style.borderStyle==="string"?d0[t.style.borderStyle]||d0.solid:t.style.borderStyle};if(n)for(let F in i)i[F]=n(i[F]);let l=t.style.padding%2===0?t.style.padding:t.style.padding+1,o=r.length+l,a=Math.max(...r.map((F)=>F.length))+l,D=a+l,h=t.style.marginLeft>0?" ".repeat(t.style.marginLeft):"";if(t.style.marginTop>0)s.push("".repeat(t.style.marginTop));if(t.title){let F=i.h.repeat(Math.floor((a-Iu(t.title).length)/2)),p=i.h.repeat(a-Iu(t.title).length-Iu(F).length+l);s.push(`${h}${i.tl}${F}${t.title}${p}${i.tr}`)}else s.push(`${h}${i.tl}${i.h.repeat(D)}${i.tr}`);let d=t.style.valign==="center"?Math.floor((o-r.length)/2):t.style.valign==="top"?o-r.length-l:o-r.length;for(let F=0;F<o;F++)if(F<d||F>=d+r.length)s.push(`${h}${i.v}${" ".repeat(D)}${i.v}`);else{let p=r[F-d],f=" ".repeat(l),m=" ".repeat(a-Iu(p).length);s.push(`${h}${i.v}${f}${p}${m}${i.v}`)}if(s.push(`${h}${i.bl}${i.h.repeat(D)}${i.br}`),t.style.marginBottom>0)s.push("".repeat(t.style.marginBottom));return s.join(`
|
|
357
|
-
`)}var ir,Ya,vc,Bc,bc,Sc,za,Tc,wc,Jf,f0,ie,e1,d0,t1,In=wn(()=>{({env:ir={},argv:Ya=[],platform:vc=""}=typeof process==="undefined"?{}:process),Bc="NO_COLOR"in ir||Ya.includes("--no-color"),bc="FORCE_COLOR"in ir||Ya.includes("--color"),Sc=vc==="win32",za=ir.TERM==="dumb",Tc=Cn&&Cn.isatty&&Cn.isatty(1)&&ir.TERM&&!za,wc="CI"in ir&&(("GITHUB_ACTIONS"in ir)||("GITLAB_CI"in ir)||("CIRCLECI"in ir)),Jf=!Bc&&(bc||Sc&&!za||Tc||wc),f0={reset:Le(0,0),bold:Le(1,22,"\x1B[22m\x1B[1m"),dim:Le(2,22,"\x1B[22m\x1B[2m"),italic:Le(3,23),underline:Le(4,24),inverse:Le(7,27),hidden:Le(8,28),strikethrough:Le(9,29),black:Le(30,39),red:Le(31,39),green:Le(32,39),yellow:Le(33,39),blue:Le(34,39),magenta:Le(35,39),cyan:Le(36,39),white:Le(37,39),gray:Le(90,39),bgBlack:Le(40,49),bgRed:Le(41,49),bgGreen:Le(42,49),bgYellow:Le(43,49),bgBlue:Le(44,49),bgMagenta:Le(45,49),bgCyan:Le(46,49),bgWhite:Le(47,49),blackBright:Le(90,39),redBright:Le(91,39),greenBright:Le(92,39),yellowBright:Le(93,39),blueBright:Le(94,39),magentaBright:Le(95,39),cyanBright:Le(96,39),whiteBright:Le(97,39),bgBlackBright:Le(100,49),bgRedBright:Le(101,49),bgGreenBright:Le(102,49),bgYellowBright:Le(103,49),bgBlueBright:Le(104,49),bgMagentaBright:Le(105,49),bgCyanBright:Le(106,49),bgWhiteBright:Le(107,49)},ie=$9(),e1=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),d0={solid:{tl:"┌",tr:"┐",bl:"└",br:"┘",h:"─",v:"│"},double:{tl:"╔",tr:"╗",bl:"╚",br:"╝",h:"═",v:"║"},doubleSingle:{tl:"╓",tr:"╖",bl:"╙",br:"╜",h:"─",v:"║"},doubleSingleRounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"─",v:"║"},singleThick:{tl:"┏",tr:"┓",bl:"┗",br:"┛",h:"━",v:"┃"},singleDouble:{tl:"╒",tr:"╕",bl:"╘",br:"╛",h:"═",v:"│"},singleDoubleRounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"═",v:"│"},rounded:{tl:"╭",tr:"╮",bl:"╰",br:"╯",h:"─",v:"│"}},t1={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1}}),u1={};_0(u1,{prompt:()=>M9});function L9({onlyFirst:e=!1}={}){let u=["[\\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(u,e?void 0:"g")}function r1(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(L9(),"")}function us(e,u={}){if(typeof e!="string"||e.length===0||(u={ambiguousIsNarrow:!0,...u},e=r1(e),e.length===0))return 0;e=e.replace(V9()," ");let t=u.ambiguousIsNarrow?1:2,r=0;for(let s of e){let n=s.codePointAt(0);if(n<=31||n>=127&&n<=159||n>=768&&n<=879)continue;switch(n1.eastAsianWidth(s)){case"F":case"W":r+=2;break;case"A":r+=t;break;default:r+=1}}return r}function U9(){let e=new Map;for(let[u,t]of Object.entries(Ze)){for(let[r,s]of Object.entries(t))Ze[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},t[r]=Ze[r],e.set(s[0],s[1]);Object.defineProperty(Ze,u,{value:t,enumerable:!1})}return Object.defineProperty(Ze,"codes",{value:e,enumerable:!1}),Ze.color.close="\x1B[39m",Ze.bgColor.close="\x1B[49m",Ze.color.ansi=Uc(),Ze.color.ansi256=Pc(),Ze.color.ansi16m=Mc(),Ze.bgColor.ansi=Uc(xa),Ze.bgColor.ansi256=Pc(xa),Ze.bgColor.ansi16m=Mc(xa),Object.defineProperties(Ze,{rgbToAnsi256:{value:(u,t,r)=>u===t&&t===r?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:(u)=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[r]=t;r.length===3&&(r=[...r].map((n)=>n+n).join(""));let s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:(u)=>Ze.rgbToAnsi256(...Ze.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:(u)=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,r,s;if(u>=232)t=((u-232)*10+8)/255,r=t,s=t;else{u-=16;let l=u%36;t=Math.floor(u/36)/5,r=Math.floor(l/6)/5,s=l%6/5}let n=Math.max(t,r,s)*2;if(n===0)return 30;let i=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(t));return n===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(u,t,r)=>Ze.ansi256ToAnsi(Ze.rgbToAnsi256(u,t,r)),enumerable:!1},hexToAnsi:{value:(u)=>Ze.ansi256ToAnsi(Ze.hexToAnsi256(u)),enumerable:!1}}),Ze}function Ic(e,u,t){return String(e).normalize().replace(/\r\n/g,`
|
|
358
|
-
`).split(`
|
|
359
|
-
`).map((r)=>Q9(r,u,t)).join(`
|
|
360
|
-
`)}function P9(e,u){if(e===u)return;let t=e.split(`
|
|
361
|
-
`),r=u.split(`
|
|
362
|
-
`),s=[];for(let n=0;n<Math.max(t.length,r.length);n++)t[n]!==r[n]&&s.push(n);return s}function un(e,u){e.isTTY&&e.setRawMode(u)}class es{constructor({render:e,input:u=a9,output:t=h9,...r},s=!0){this._track=!1,this._cursor=0,this.state="initial",this.error="",this.subscribers=new Map,this._prevFrame="",this.opts=r,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=e.bind(this),this._track=s,this.input=u,this.output=t}prompt(){let e=new l9(0);return e._write=(u,t,r)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),r()},this.input.pipe(e),this.rl=gc.createInterface({input:this.input,output:e,tabSize:2,prompt:"",escapeCodeTimeout:50}),gc.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),un(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((u,t)=>{this.once("submit",()=>{this.output.write(du.cursor.show),this.output.off("resize",this.render),un(this.input,!1),u(this.value)}),this.once("cancel",()=>{this.output.write(du.cursor.show),this.output.off("resize",this.render),un(this.input,!1),u(o1)})})}on(e,u){let t=this.subscribers.get(e)??[];t.push({cb:u}),this.subscribers.set(e,t)}once(e,u){let t=this.subscribers.get(e)??[];t.push({cb:u,once:!0}),this.subscribers.set(e,t)}emit(e,...u){let t=this.subscribers.get(e)??[],r=[];for(let s of t)s.cb(...u),s.once&&r.push(()=>t.splice(t.indexOf(s),1));for(let s of r)s()}unsubscribe(){this.subscribers.clear()}onKeypress(e,u){if(this.state==="error"&&(this.state="active"),u?.name&&!this._track&&E0.has(u.name)&&this.emit("cursor",E0.get(u.name)),u?.name&&c1.has(u.name)&&this.emit("cursor",u.name),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),e&&this.emit("key",e.toLowerCase()),u?.name==="return"){if(this.opts.validate){let t=this.opts.validate(this.value);t&&(this.error=t,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}e==="\x03"&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
363
|
-
`),un(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=Ic(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
364
|
-
`).length-1;this.output.write(du.cursor.move(-999,e*-1))}render(){let e=Ic(this._render(this)??"",process.stdout.columns,{hard:!0});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(du.cursor.hide);else{let u=P9(this._prevFrame,e);if(this.restoreCursor(),u&&u?.length===1){let t=u[0];this.output.write(du.cursor.move(0,t)),this.output.write(du.erase.lines(1));let r=e.split(`
|
|
365
|
-
`);this.output.write(r[t]),this._prevFrame=e,this.output.write(du.cursor.move(0,r.length-t-1));return}else if(u&&u?.length>1){let t=u[0];this.output.write(du.cursor.move(0,t)),this.output.write(du.erase.down());let r=e.split(`
|
|
366
|
-
`).slice(t);this.output.write(r.join(`
|
|
367
|
-
`)),this._prevFrame=e;return}this.output.write(du.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}}async function M9(e,u={}){if(!u.type||u.type==="text")return await Y9({message:e,defaultValue:u.default,placeholder:u.placeholder,initialValue:u.initial});if(u.type==="confirm")return await z9({message:e,initialValue:u.initial});if(u.type==="select")return await q9({message:e,options:u.options.map((t)=>typeof t==="string"?{value:t,label:t}:t)});if(u.type==="multiselect")return await x9({message:e,options:u.options.map((t)=>typeof t==="string"?{value:t,label:t}:t),required:u.required});throw new Error(`Unknown prompt type: ${u.type}`)}var qa="\x1B",rt,k9="\x07",rn,Nc,_c,du,sn,$c,i1,it=(e,u,t=e)=>(r)=>{let s=""+r,n=s.indexOf(u,e.length);return~n?e+s1(s,u,t,n)+u:e+s+u},s1=(e,u,t,r)=>{let s=e.substring(0,r)+t,n=e.substring(r+u.length),i=n.indexOf(u);return~i?s+s1(n,u,t,i):s+n},Rc=(e=i1)=>({isColorSupported:e,reset:e?(u)=>`\x1B[0m${u}\x1B[0m`:String,bold:e?it("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:e?it("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:e?it("\x1B[3m","\x1B[23m"):String,underline:e?it("\x1B[4m","\x1B[24m"):String,inverse:e?it("\x1B[7m","\x1B[27m"):String,hidden:e?it("\x1B[8m","\x1B[28m"):String,strikethrough:e?it("\x1B[9m","\x1B[29m"):String,black:e?it("\x1B[30m","\x1B[39m"):String,red:e?it("\x1B[31m","\x1B[39m"):String,green:e?it("\x1B[32m","\x1B[39m"):String,yellow:e?it("\x1B[33m","\x1B[39m"):String,blue:e?it("\x1B[34m","\x1B[39m"):String,magenta:e?it("\x1B[35m","\x1B[39m"):String,cyan:e?it("\x1B[36m","\x1B[39m"):String,white:e?it("\x1B[37m","\x1B[39m"):String,gray:e?it("\x1B[90m","\x1B[39m"):String,bgBlack:e?it("\x1B[40m","\x1B[49m"):String,bgRed:e?it("\x1B[41m","\x1B[49m"):String,bgGreen:e?it("\x1B[42m","\x1B[49m"):String,bgYellow:e?it("\x1B[43m","\x1B[49m"):String,bgBlue:e?it("\x1B[44m","\x1B[49m"):String,bgMagenta:e?it("\x1B[45m","\x1B[49m"):String,bgCyan:e?it("\x1B[46m","\x1B[49m"):String,bgWhite:e?it("\x1B[47m","\x1B[49m"):String}),Oc,nn,an,Lc,n1,V9=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},xa=10,Uc=(e=0)=>(u)=>`\x1B[${u+e}m`,Pc=(e=0)=>(u)=>`\x1B[${38+e};5;${u}m`,Mc=(e=0)=>(u,t,r)=>`\x1B[${38+e};2;${u};${t};${r}m`,Ze,kc,K9,a1,as,G9=39,L0="\x07",h1="[",j9="]",l1="m",Nn,Vc=(e)=>`${as.values().next().value}${h1}${e}${l1}`,Kc=(e)=>`${as.values().next().value}${Nn}${e}${L0}`,W9=(e)=>e.split(" ").map((u)=>us(u)),Za=(e,u,t)=>{let r=[...u],s=!1,n=!1,i=us(r1(e[e.length-1]));for(let[l,o]of r.entries()){let a=us(o);if(i+a<=t?e[e.length-1]+=o:(e.push(o),i=0),as.has(o)&&(s=!0,n=r.slice(l+1).join("").startsWith(Nn)),s){n?o===L0&&(s=!1,n=!1):o===l1&&(s=!1);continue}i+=a,i===t&&l<r.length-1&&(e.push(""),i=0)}!i&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},H9=(e)=>{let u=e.split(" "),t=u.length;for(;t>0&&!(us(u[t-1])>0);)t--;return t===u.length?e:u.slice(0,t).join(" ")+u.slice(t).join("")},Q9=(e,u,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let r="",s,n,i=W9(e),l=[""];for(let[a,D]of e.split(" ").entries()){t.trim!==!1&&(l[l.length-1]=l[l.length-1].trimStart());let h=us(l[l.length-1]);if(a!==0&&(h>=u&&(t.wordWrap===!1||t.trim===!1)&&(l.push(""),h=0),(h>0||t.trim===!1)&&(l[l.length-1]+=" ",h++)),t.hard&&i[a]>u){let d=u-h,F=1+Math.floor((i[a]-d-1)/u);Math.floor((i[a]-1)/u)<F&&l.push(""),Za(l,D,u);continue}if(h+i[a]>u&&h>0&&i[a]>0){if(t.wordWrap===!1&&h<u){Za(l,D,u);continue}l.push("")}if(h+i[a]>u&&t.wordWrap===!1){Za(l,D,u);continue}l[l.length-1]+=D}t.trim!==!1&&(l=l.map((a)=>H9(a)));let o=[...l.join(`
|
|
368
|
-
`)];for(let[a,D]of o.entries()){if(r+=D,as.has(D)){let{groups:d}=new RegExp(`(?:\\${h1}(?<code>\\d+)m|\\${Nn}(?<uri>.*)${L0})`).exec(o.slice(a).join(""))||{groups:{}};if(d.code!==void 0){let F=Number.parseFloat(d.code);s=F===G9?void 0:F}else d.uri!==void 0&&(n=d.uri.length===0?void 0:d.uri)}let h=a1.codes.get(Number(s));o[a+1]===`
|
|
369
|
-
`?(n&&(r+=Kc("")),s&&h&&(r+=Vc(h))):D===`
|
|
370
|
-
`&&(s&&h&&(r+=Vc(s)),n&&(r+=Kc(n)))}return r},o1,E0,c1,D1,f1,d1,E1,C1,sr=(e,u)=>C1?e:u,p1,g1,m1,y1,Xe="",Ai="",pn,gn,F1,C0,A1,_n=(e)=>{switch(e){case"initial":case"active":return ie.cyan(p1);case"cancel":return ie.red(g1);case"error":return ie.yellow(m1);case"submit":return ie.green(y1)}},Y9=(e)=>{return new E1({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){let u=`${ie.gray(Xe)}
|
|
371
|
-
${_n(this.state)} ${e.message}
|
|
372
|
-
`,t=e.placeholder?ie.inverse(e.placeholder[0])+ie.dim(e.placeholder.slice(1)):ie.inverse(ie.hidden("_")),r=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${u.trim()}
|
|
373
|
-
${ie.yellow(Xe)} ${r}
|
|
374
|
-
${ie.yellow(Ai)} ${ie.yellow(this.error)}
|
|
375
|
-
`;case"submit":return`${u}${ie.gray(Xe)} ${ie.dim(this.value||e.placeholder)}`;case"cancel":return`${u}${ie.gray(Xe)} ${ie.strikethrough(ie.dim(this.value??""))}${this.value?.trim()?`
|
|
376
|
-
`+ie.gray(Xe):""}`;default:return`${u}${ie.cyan(Xe)} ${r}
|
|
377
|
-
${ie.cyan(Ai)}
|
|
378
|
-
`}}}).prompt()},z9=(e)=>{let u=e.active??"Yes",t=e.inactive??"No";return new D1({active:u,inactive:t,initialValue:e.initialValue??!0,render(){let r=`${ie.gray(Xe)}
|
|
379
|
-
${_n(this.state)} ${e.message}
|
|
380
|
-
`,s=this.value?u:t;switch(this.state){case"submit":return`${r}${ie.gray(Xe)} ${ie.dim(s)}`;case"cancel":return`${r}${ie.gray(Xe)} ${ie.strikethrough(ie.dim(s))}
|
|
381
|
-
${ie.gray(Xe)}`;default:return`${r}${ie.cyan(Xe)} ${this.value?`${ie.green(pn)} ${u}`:`${ie.dim(gn)} ${ie.dim(u)}`} ${ie.dim("/")} ${this.value?`${ie.dim(gn)} ${ie.dim(t)}`:`${ie.green(pn)} ${t}`}
|
|
382
|
-
${ie.cyan(Ai)}
|
|
383
|
-
`}}}).prompt()},q9=(e)=>{let u=(t,r)=>{let s=t.label??String(t.value);switch(r){case"active":return`${ie.green(pn)} ${s} ${t.hint?ie.dim(`(${t.hint})`):""}`;case"selected":return`${ie.dim(s)}`;case"cancelled":return`${ie.strikethrough(ie.dim(s))}`}return`${ie.dim(gn)} ${ie.dim(s)}`};return new d1({options:e.options,initialValue:e.initialValue,render(){let t=`${ie.gray(Xe)}
|
|
384
|
-
${_n(this.state)} ${e.message}
|
|
385
|
-
`;switch(this.state){case"submit":return`${t}${ie.gray(Xe)} ${u(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${ie.gray(Xe)} ${u(this.options[this.cursor],"cancelled")}
|
|
386
|
-
${ie.gray(Xe)}`;default:return`${t}${ie.cyan(Xe)} ${this.options.map((r,s)=>u(r,s===this.cursor?"active":"inactive")).join(`
|
|
387
|
-
${ie.cyan(Xe)} `)}
|
|
388
|
-
${ie.cyan(Ai)}
|
|
389
|
-
`}}}).prompt()},x9=(e)=>{let u=(t,r)=>{let s=t.label??String(t.value);switch(r){case"active":return`${ie.cyan(F1)} ${s} ${t.hint?ie.dim(`(${t.hint})`):""}`;case"selected":return`${ie.green(C0)} ${ie.dim(s)}`;case"cancelled":return`${ie.strikethrough(ie.dim(s))}`;case"active-selected":return`${ie.green(C0)} ${s} ${t.hint?ie.dim(`(${t.hint})`):""}`;case"submitted":return`${ie.dim(s)}`}return`${ie.dim(A1)} ${ie.dim(s)}`};return new f1({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(t){if(this.required&&t.length===0)return`Please select at least one option.
|
|
390
|
-
${ie.reset(ie.dim(`Press ${ie.gray(ie.bgWhite(ie.inverse(" space ")))} to select, ${ie.gray(ie.bgWhite(ie.inverse(" enter ")))} to submit`))}`},render(){let t=`${ie.gray(Xe)}
|
|
391
|
-
${_n(this.state)} ${e.message}
|
|
392
|
-
`;switch(this.state){case"submit":return`${t}${ie.gray(Xe)} ${this.options.filter(({value:r})=>this.value.includes(r)).map((r)=>u(r,"submitted")).join(ie.dim(", "))||ie.dim("none")}`;case"cancel":{let r=this.options.filter(({value:s})=>this.value.includes(s)).map((s)=>u(s,"cancelled")).join(ie.dim(", "));return`${t}${ie.gray(Xe)} ${r.trim()?`${r}
|
|
393
|
-
${ie.gray(Xe)}`:""}`}case"error":{let r=this.error.split(`
|
|
394
|
-
`).map((s,n)=>n===0?`${ie.yellow(Ai)} ${ie.yellow(s)}`:` ${s}`).join(`
|
|
395
|
-
`);return t+ie.yellow(Xe)+" "+this.options.map((s,n)=>{let i=this.value.includes(s.value),l=n===this.cursor;if(l&&i)return u(s,"active-selected");if(i)return u(s,"selected");return u(s,l?"active":"inactive")}).join(`
|
|
396
|
-
${ie.yellow(Xe)} `)+`
|
|
397
|
-
`+r+`
|
|
398
|
-
`}default:return`${t}${ie.cyan(Xe)} ${this.options.map((r,s)=>{let n=this.value.includes(r.value),i=s===this.cursor;if(i&&n)return u(r,"active-selected");if(n)return u(r,"selected");return u(r,i?"active":"inactive")}).join(`
|
|
399
|
-
${ie.cyan(Xe)} `)}
|
|
400
|
-
${ie.cyan(Ai)}
|
|
401
|
-
`}}}).prompt()},Z9=wn(()=>{R1(),In(),$0(),O0(),rt=`${qa}[`,rn={to(e,u){if(!u)return`${rt}${e+1}G`;return`${rt}${u+1};${e+1}H`},move(e,u){let t="";if(e<0)t+=`${rt}${-e}D`;else if(e>0)t+=`${rt}${e}C`;if(u<0)t+=`${rt}${-u}A`;else if(u>0)t+=`${rt}${u}B`;return t},up:(e=1)=>`${rt}${e}A`,down:(e=1)=>`${rt}${e}B`,forward:(e=1)=>`${rt}${e}C`,backward:(e=1)=>`${rt}${e}D`,nextLine:(e=1)=>`${rt}E`.repeat(e),prevLine:(e=1)=>`${rt}F`.repeat(e),left:`${rt}G`,hide:`${rt}?25l`,show:`${rt}?25h`,save:`${qa}7`,restore:`${qa}8`},Nc={up:(e=1)=>`${rt}S`.repeat(e),down:(e=1)=>`${rt}T`.repeat(e)},_c={screen:`${rt}2J`,up:(e=1)=>`${rt}1J`.repeat(e),down:(e=1)=>`${rt}J`.repeat(e),line:`${rt}2K`,lineEnd:`${rt}K`,lineStart:`${rt}1K`,lines(e){let u="";for(let t=0;t<e;t++)u+=this.line+(t<e-1?rn.up():"");if(e)u+=rn.left;return u}},du={cursor:rn,scroll:Nc,erase:_c,beep:k9},sn={exports:{}},$c=o9,i1=!(("NO_COLOR"in process.env)||process.argv.includes("--no-color"))&&(("FORCE_COLOR"in process.env)||process.argv.includes("--color")||process.platform==="win32"||$c.isatty(1)&&!0||("CI"in process.env)),sn.exports=Rc(),sn.exports.createColors=Rc,Oc=sn.exports,nn=v1(Oc),an={},Lc={get exports(){return an},set exports(e){an=e}},function(e){var u={};e.exports=u,u.eastAsianWidth=function(r){var s=r.charCodeAt(0),n=r.length==2?r.charCodeAt(1):0,i=s;return 55296<=s&&s<=56319&&56320<=n&&n<=57343&&(s&=1023,n&=1023,i=s<<10|n,i+=65536),i==12288||65281<=i&&i<=65376||65504<=i&&i<=65510?"F":i==8361||65377<=i&&i<=65470||65474<=i&&i<=65479||65482<=i&&i<=65487||65490<=i&&i<=65495||65498<=i&&i<=65500||65512<=i&&i<=65518?"H":4352<=i&&i<=4447||4515<=i&&i<=4519||4602<=i&&i<=4607||9001<=i&&i<=9002||11904<=i&&i<=11929||11931<=i&&i<=12019||12032<=i&&i<=12245||12272<=i&&i<=12283||12289<=i&&i<=12350||12353<=i&&i<=12438||12441<=i&&i<=12543||12549<=i&&i<=12589||12593<=i&&i<=12686||12688<=i&&i<=12730||12736<=i&&i<=12771||12784<=i&&i<=12830||12832<=i&&i<=12871||12880<=i&&i<=13054||13056<=i&&i<=19903||19968<=i&&i<=42124||42128<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||55216<=i&&i<=55238||55243<=i&&i<=55291||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65106||65108<=i&&i<=65126||65128<=i&&i<=65131||110592<=i&&i<=110593||127488<=i&&i<=127490||127504<=i&&i<=127546||127552<=i&&i<=127560||127568<=i&&i<=127569||131072<=i&&i<=194367||177984<=i&&i<=196605||196608<=i&&i<=262141?"W":32<=i&&i<=126||162<=i&&i<=163||165<=i&&i<=166||i==172||i==175||10214<=i&&i<=10221||10629<=i&&i<=10630?"Na":i==161||i==164||167<=i&&i<=168||i==170||173<=i&&i<=174||176<=i&&i<=180||182<=i&&i<=186||188<=i&&i<=191||i==198||i==208||215<=i&&i<=216||222<=i&&i<=225||i==230||232<=i&&i<=234||236<=i&&i<=237||i==240||242<=i&&i<=243||247<=i&&i<=250||i==252||i==254||i==257||i==273||i==275||i==283||294<=i&&i<=295||i==299||305<=i&&i<=307||i==312||319<=i&&i<=322||i==324||328<=i&&i<=331||i==333||338<=i&&i<=339||358<=i&&i<=359||i==363||i==462||i==464||i==466||i==468||i==470||i==472||i==474||i==476||i==593||i==609||i==708||i==711||713<=i&&i<=715||i==717||i==720||728<=i&&i<=731||i==733||i==735||768<=i&&i<=879||913<=i&&i<=929||931<=i&&i<=937||945<=i&&i<=961||963<=i&&i<=969||i==1025||1040<=i&&i<=1103||i==1105||i==8208||8211<=i&&i<=8214||8216<=i&&i<=8217||8220<=i&&i<=8221||8224<=i&&i<=8226||8228<=i&&i<=8231||i==8240||8242<=i&&i<=8243||i==8245||i==8251||i==8254||i==8308||i==8319||8321<=i&&i<=8324||i==8364||i==8451||i==8453||i==8457||i==8467||i==8470||8481<=i&&i<=8482||i==8486||i==8491||8531<=i&&i<=8532||8539<=i&&i<=8542||8544<=i&&i<=8555||8560<=i&&i<=8569||i==8585||8592<=i&&i<=8601||8632<=i&&i<=8633||i==8658||i==8660||i==8679||i==8704||8706<=i&&i<=8707||8711<=i&&i<=8712||i==8715||i==8719||i==8721||i==8725||i==8730||8733<=i&&i<=8736||i==8739||i==8741||8743<=i&&i<=8748||i==8750||8756<=i&&i<=8759||8764<=i&&i<=8765||i==8776||i==8780||i==8786||8800<=i&&i<=8801||8804<=i&&i<=8807||8810<=i&&i<=8811||8814<=i&&i<=8815||8834<=i&&i<=8835||8838<=i&&i<=8839||i==8853||i==8857||i==8869||i==8895||i==8978||9312<=i&&i<=9449||9451<=i&&i<=9547||9552<=i&&i<=9587||9600<=i&&i<=9615||9618<=i&&i<=9621||9632<=i&&i<=9633||9635<=i&&i<=9641||9650<=i&&i<=9651||9654<=i&&i<=9655||9660<=i&&i<=9661||9664<=i&&i<=9665||9670<=i&&i<=9672||i==9675||9678<=i&&i<=9681||9698<=i&&i<=9701||i==9711||9733<=i&&i<=9734||i==9737||9742<=i&&i<=9743||9748<=i&&i<=9749||i==9756||i==9758||i==9792||i==9794||9824<=i&&i<=9825||9827<=i&&i<=9829||9831<=i&&i<=9834||9836<=i&&i<=9837||i==9839||9886<=i&&i<=9887||9918<=i&&i<=9919||9924<=i&&i<=9933||9935<=i&&i<=9953||i==9955||9960<=i&&i<=9983||i==10045||i==10071||10102<=i&&i<=10111||11093<=i&&i<=11097||12872<=i&&i<=12879||57344<=i&&i<=63743||65024<=i&&i<=65039||i==65533||127232<=i&&i<=127242||127248<=i&&i<=127277||127280<=i&&i<=127337||127344<=i&&i<=127386||917760<=i&&i<=917999||983040<=i&&i<=1048573||1048576<=i&&i<=1114109?"A":"N"},u.characterLength=function(r){var s=this.eastAsianWidth(r);return s=="F"||s=="W"||s=="A"?2:1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(r){for(var s=t(r),n=0,i=0;i<s.length;i++)n=n+this.characterLength(s[i]);return n},u.slice=function(r,s,n){textLen=u.length(r),s=s||0,n=n||1,s<0&&(s=textLen+s),n<0&&(n=textLen+n);for(var i="",l=0,o=t(r),a=0;a<o.length;a++){var D=o[a],h=u.length(D);if(l>=s-(h==2?1:0))if(l+h<=n)i+=D;else break;l+=h}return i}}(Lc),n1=an,Ze={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Object.keys(Ze.modifier),kc=Object.keys(Ze.color),K9=Object.keys(Ze.bgColor),[...kc],a1=U9(),as=new Set(["\x1B",""]),Nn=`${j9}8;;`,o1=Symbol("clack:cancel"),E0=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),c1=new Set(["up","down","left","right","space","enter"]),D1=class e extends es{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(u){super(u,!1),this.value=!!u.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(t)=>{this.output.write(du.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}},f1=class e extends es{constructor(u){super(u,!1),this.cursor=0,this.options=u.options,this.value=[...u.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===u.cursorAt),0),this.on("key",(t)=>{t==="a"&&this.toggleAll()}),this.on("cursor",(t)=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let u=this.value.length===this.options.length;this.value=u?[]:this.options.map((t)=>t.value)}toggleValue(){let u=this.value.includes(this._value);this.value=u?this.value.filter((t)=>t!==this._value):[...this.value,this._value]}},d1=class e extends es{constructor(u){super(u,!1),this.cursor=0,this.options=u.options,this.cursor=this.options.findIndex(({value:t})=>t===u.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(t)=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}},E1=class e extends es{constructor(u){super(u),this.valueWithCursor="",this.on("finalize",()=>{this.value||(this.value=u.defaultValue),this.valueWithCursor=this.value}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.value}${nn.inverse(nn.hidden("_"))}`;else{let t=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.valueWithCursor=`${t}${nn.inverse(r[0])}${r.slice(1)}`}})}get cursor(){return this._cursor}},C1=B1(),p1=sr("❯",">"),g1=sr("■","x"),m1=sr("▲","x"),y1=sr("✔","√"),pn=sr("●",">"),gn=sr("○"," "),F1=sr("◻","[•]"),C0=sr("◼","[+]"),A1=sr("◻","[ ]")});function X9(e){for(let u of S1){let t=u[1]||u[0];if(e[t])return{name:u[0].toLowerCase(),...u[2]}}if(e.SHELL&&e.SHELL==="/bin/jsh")return{name:"stackblitz",ci:!1};return{name:"",ci:!1}}function xi(e){return e?e!=="false":!1}function J9({onlyFirst:e=!1}={}){let u=["[\\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(u,e?void 0:"g")}function eF(e){if(typeof e!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(I1,"")}function v1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function tF(e,u){if(typeof e!=="string"||e.length===0)return 0;if(u={ambiguousIsNarrow:!0,countAnsiEscapeCodes:!1,...u},!u.countAnsiEscapeCodes)e=eF(e);if(e.length===0)return 0;let t=u.ambiguousIsNarrow?1:2,r=0;for(let{segment:s}of new Intl.Segmenter().segment(e)){let n=s.codePointAt(0);if(n<=31||n>=127&&n<=159)continue;if(n>=768&&n<=879)continue;if(nF().test(s)){r+=2;continue}switch(N1.eastAsianWidth(s)){case"F":case"W":{r+=2;break}case"A":{r+=t;break}default:r+=1}}return r}function B1(){if(bu.platform!=="win32")return bu.env.TERM!=="linux";return Boolean(bu.env.CI)||Boolean(bu.env.WT_SESSION)||Boolean(bu.env.TERMINUS_SUBLIME)||bu.env.ConEmuTask==="{cmd::Cmder}"||bu.env.TERM_PROGRAM==="Terminus-Sublime"||bu.env.TERM_PROGRAM==="vscode"||bu.env.TERM==="xterm-256color"||bu.env.TERM==="alacritty"||bu.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function Gc(e){if(!Intl.Segmenter)return Iu(e).length;return tF(e)}function hn(e){return e.replace(/`([^`]+)`/gm,(u,t)=>ie.cyan(t)).replace(/\s+_([^_]+)_\s+/gm,(u,t)=>` ${ie.underline(t)} `)}function uF(e="white"){return ie[e]||ie.white}function rF(e="bgWhite"){return ie[`bg${e[0].toUpperCase()}${e.slice(1)}`]||ie.bgWhite}function b1(e={}){let u=iF();if(process.env.CONSOLA_LEVEL)u=Number.parseInt(process.env.CONSOLA_LEVEL)??u;return w9({level:u,defaults:{level:u},stdout:process.stdout,stderr:process.stderr,prompt:(...t)=>Promise.resolve().then(()=>(Z9(),u1)).then((r)=>r.prompt(...t)),reporters:e.reporters||[e.fancy??!(T1||U0)?new $1:new R0],...e})}function iF(){if(w1)return xt.debug;if(U0)return xt.warn;return xt.info}var S1,Zi,Di,Xa,jc,T1,sF,w1,U0,I1,Ja,Wc,N1,nF=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g},Hc,Qc,_1,Vu=(e,u)=>_1?e:u,e0,$1,aF,R1=wn(()=>{$0(),O0(),In(),S1=[["APPVEYOR"],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"]],Zi=typeof process!=="undefined"?process:{},Di=Zi.env||{},Xa=X9(Di),jc=typeof process!=="undefined"&&process.env&&"development"||"",Zi.platform,Xa.name,T1=xi(Di.CI)||Xa.ci!==!1,sF=xi(Zi.stdout&&Zi.stdout.isTTY),w1=xi(Di.DEBUG),U0=jc==="test"||xi(Di.TEST),xi(Di.MINIMAL),I1=J9(),Ja={exports:{}},function(e){var u={};e.exports=u,u.eastAsianWidth=function(r){var s=r.charCodeAt(0),n=r.length==2?r.charCodeAt(1):0,i=s;if(55296<=s&&s<=56319&&(56320<=n&&n<=57343))s&=1023,n&=1023,i=s<<10|n,i+=65536;if(i==12288||65281<=i&&i<=65376||65504<=i&&i<=65510)return"F";if(i==8361||65377<=i&&i<=65470||65474<=i&&i<=65479||65482<=i&&i<=65487||65490<=i&&i<=65495||65498<=i&&i<=65500||65512<=i&&i<=65518)return"H";if(4352<=i&&i<=4447||4515<=i&&i<=4519||4602<=i&&i<=4607||9001<=i&&i<=9002||11904<=i&&i<=11929||11931<=i&&i<=12019||12032<=i&&i<=12245||12272<=i&&i<=12283||12289<=i&&i<=12350||12353<=i&&i<=12438||12441<=i&&i<=12543||12549<=i&&i<=12589||12593<=i&&i<=12686||12688<=i&&i<=12730||12736<=i&&i<=12771||12784<=i&&i<=12830||12832<=i&&i<=12871||12880<=i&&i<=13054||13056<=i&&i<=19903||19968<=i&&i<=42124||42128<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||55216<=i&&i<=55238||55243<=i&&i<=55291||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65106||65108<=i&&i<=65126||65128<=i&&i<=65131||110592<=i&&i<=110593||127488<=i&&i<=127490||127504<=i&&i<=127546||127552<=i&&i<=127560||127568<=i&&i<=127569||131072<=i&&i<=194367||177984<=i&&i<=196605||196608<=i&&i<=262141)return"W";if(32<=i&&i<=126||162<=i&&i<=163||165<=i&&i<=166||i==172||i==175||10214<=i&&i<=10221||10629<=i&&i<=10630)return"Na";if(i==161||i==164||167<=i&&i<=168||i==170||173<=i&&i<=174||176<=i&&i<=180||182<=i&&i<=186||188<=i&&i<=191||i==198||i==208||215<=i&&i<=216||222<=i&&i<=225||i==230||232<=i&&i<=234||236<=i&&i<=237||i==240||242<=i&&i<=243||247<=i&&i<=250||i==252||i==254||i==257||i==273||i==275||i==283||294<=i&&i<=295||i==299||305<=i&&i<=307||i==312||319<=i&&i<=322||i==324||328<=i&&i<=331||i==333||338<=i&&i<=339||358<=i&&i<=359||i==363||i==462||i==464||i==466||i==468||i==470||i==472||i==474||i==476||i==593||i==609||i==708||i==711||713<=i&&i<=715||i==717||i==720||728<=i&&i<=731||i==733||i==735||768<=i&&i<=879||913<=i&&i<=929||931<=i&&i<=937||945<=i&&i<=961||963<=i&&i<=969||i==1025||1040<=i&&i<=1103||i==1105||i==8208||8211<=i&&i<=8214||8216<=i&&i<=8217||8220<=i&&i<=8221||8224<=i&&i<=8226||8228<=i&&i<=8231||i==8240||8242<=i&&i<=8243||i==8245||i==8251||i==8254||i==8308||i==8319||8321<=i&&i<=8324||i==8364||i==8451||i==8453||i==8457||i==8467||i==8470||8481<=i&&i<=8482||i==8486||i==8491||8531<=i&&i<=8532||8539<=i&&i<=8542||8544<=i&&i<=8555||8560<=i&&i<=8569||i==8585||8592<=i&&i<=8601||8632<=i&&i<=8633||i==8658||i==8660||i==8679||i==8704||8706<=i&&i<=8707||8711<=i&&i<=8712||i==8715||i==8719||i==8721||i==8725||i==8730||8733<=i&&i<=8736||i==8739||i==8741||8743<=i&&i<=8748||i==8750||8756<=i&&i<=8759||8764<=i&&i<=8765||i==8776||i==8780||i==8786||8800<=i&&i<=8801||8804<=i&&i<=8807||8810<=i&&i<=8811||8814<=i&&i<=8815||8834<=i&&i<=8835||8838<=i&&i<=8839||i==8853||i==8857||i==8869||i==8895||i==8978||9312<=i&&i<=9449||9451<=i&&i<=9547||9552<=i&&i<=9587||9600<=i&&i<=9615||9618<=i&&i<=9621||9632<=i&&i<=9633||9635<=i&&i<=9641||9650<=i&&i<=9651||9654<=i&&i<=9655||9660<=i&&i<=9661||9664<=i&&i<=9665||9670<=i&&i<=9672||i==9675||9678<=i&&i<=9681||9698<=i&&i<=9701||i==9711||9733<=i&&i<=9734||i==9737||9742<=i&&i<=9743||9748<=i&&i<=9749||i==9756||i==9758||i==9792||i==9794||9824<=i&&i<=9825||9827<=i&&i<=9829||9831<=i&&i<=9834||9836<=i&&i<=9837||i==9839||9886<=i&&i<=9887||9918<=i&&i<=9919||9924<=i&&i<=9933||9935<=i&&i<=9953||i==9955||9960<=i&&i<=9983||i==10045||i==10071||10102<=i&&i<=10111||11093<=i&&i<=11097||12872<=i&&i<=12879||57344<=i&&i<=63743||65024<=i&&i<=65039||i==65533||127232<=i&&i<=127242||127248<=i&&i<=127277||127280<=i&&i<=127337||127344<=i&&i<=127386||917760<=i&&i<=917999||983040<=i&&i<=1048573||1048576<=i&&i<=1114109)return"A";return"N"},u.characterLength=function(r){var s=this.eastAsianWidth(r);if(s=="F"||s=="W"||s=="A")return 2;else return 1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(r){var s=t(r),n=0;for(var i=0;i<s.length;i++)n=n+this.characterLength(s[i]);return n},u.slice=function(r,s,n){if(textLen=u.length(r),s=s?s:0,n=n?n:1,s<0)s=textLen+s;if(n<0)n=textLen+n;var i="",l=0,o=t(r);for(var a=0;a<o.length;a++){var D=o[a],h=u.length(D);if(l>=s-(h==2?1:0))if(l+h<=n)i+=D;else break;l+=h}return i}}(Ja),Wc=Ja.exports,N1=v1(Wc),Hc={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},Qc={0:"red",1:"yellow"},_1=B1(),e0={error:Vu("✖","×"),fatal:Vu("✖","×"),ready:Vu("✔","√"),warn:Vu("⚠","‼"),info:Vu("ℹ","i"),success:Vu("✔","√"),debug:Vu("⚙","D"),trace:Vu("→","→"),fail:Vu("✖","×"),start:Vu("◐","o"),log:""},$1=class e extends R0{formatStack(u){return`
|
|
402
|
-
`+Zf(u).map((t)=>" "+t.replace(/^at +/,(r)=>ie.gray(r)).replace(/\((.+)\)/,(r,s)=>`(${ie.cyan(s)})`)).join(`
|
|
403
|
-
`)}formatType(u,t,r){let s=Hc[u.type]||Qc[u.level]||"gray";if(t)return rF(s)(ie.black(` ${u.type.toUpperCase()} `));let n=typeof e0[u.type]==="string"?e0[u.type]:u.icon||u.type;return n?uF(s)(n):""}formatLogObj(u,t){let[r,...s]=this.formatArgs(u.args,t).split(`
|
|
404
|
-
`);if(u.type==="box")return O9(hn(r+(s.length>0?`
|
|
405
|
-
`+s.join(`
|
|
406
|
-
`):"")),{title:u.title?hn(u.title):void 0,style:u.style});let n=this.formatDate(u.date,t),i=n&&ie.gray(n),l=u.badge??u.level<2,o=this.formatType(u,l,t),a=u.tag?ie.gray(u.tag):"",D,h=this.filterAndJoin([o,hn(r)]),d=this.filterAndJoin(t.columns?[a,i]:[a]),F=(t.columns||0)-Gc(h)-Gc(d)-2;if(D=F>0&&(t.columns||0)>=80?h+" ".repeat(F)+d:(d?`${ie.gray(`[${d}]`)} `:"")+h,D+=hn(s.length>0?`
|
|
407
|
-
`+s.join(`
|
|
408
|
-
`):""),u.type==="trace"){let p=new Error("Trace: "+u.message);D+=this.formatStack(p.stack||"")}return l?`
|
|
409
|
-
`+D+`
|
|
410
|
-
`:D}},aF=b1()}),pt=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;function t(s){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t(s)}function r(s){var n=typeof s==="string"||s instanceof String;if(!n){var i=t(s);if(s===null)i="null";else if(i==="object")i=s.constructor.name;throw new TypeError("Expected a string but received a ".concat(i))}}u.exports=e.default,u.exports.default=e.default}),P0=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var t=r(pt());function r(D){return D&&D.__esModule?D:{default:D}}var s="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",n="(".concat(s,"[.]){3}").concat(s),i=new RegExp("^".concat(n,"$")),l="(?:[0-9a-fA-F]{1,4})",o=new RegExp("^("+"(?:".concat(l,":){7}(?:").concat(l,"|:)|")+"(?:".concat(l,":){6}(?:").concat(n,"|:").concat(l,"|:)|")+"(?:".concat(l,":){5}(?::").concat(n,"|(:").concat(l,"){1,2}|:)|")+"(?:".concat(l,":){4}(?:(:").concat(l,"){0,1}:").concat(n,"|(:").concat(l,"){1,3}|:)|")+"(?:".concat(l,":){3}(?:(:").concat(l,"){0,2}:").concat(n,"|(:").concat(l,"){1,4}|:)|")+"(?:".concat(l,":){2}(?:(:").concat(l,"){0,3}:").concat(n,"|(:").concat(l,"){1,5}|:)|")+"(?:".concat(l,":){1}(?:(:").concat(l,"){0,4}:").concat(n,"|(:").concat(l,"){1,6}|:)|")+"(?::((?::".concat(l,"){0,5}:").concat(n,"|(?::").concat(l,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function a(D){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.default(D),h=String(h),!h)return a(D,4)||a(D,6);if(h==="4")return i.test(D);if(h==="6")return o.test(D);return!1}u.exports=e.default,u.exports.default=e.default}),Yr=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;for(var n in s)if(typeof r[n]==="undefined")r[n]=s[n];return r}u.exports=e.default,u.exports.default=e.default}),hF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var t=s(pt()),r=s(Yr());function s(a){return a&&a.__esModule?a:{default:a}}var n=/[^A-Z0-9+\/=]/i,i=/^[A-Z0-9_\-]*$/i,l={urlSafe:!1};function o(a,D){t.default(a),D=r.default(D,l);var h=a.length;if(D.urlSafe)return i.test(a);if(h%4!==0||n.test(a))return!1;var d=a.indexOf("=");return d===-1||d===h-1||d===h-2&&a[h-1]==="="}u.exports=e.default,u.exports.default=e.default}),lF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=s(pt()),r=s(hF());function s(i){return i&&i.__esModule?i:{default:i}}function n(i){t.default(i);var l=i.split("."),o=l.length;if(o!==3)return!1;return l.reduce(function(a,D){return a&&r.default(D,{urlSafe:!0})},!0)}u.exports=e.default,u.exports.default=e.default}),O1=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var t=s(pt()),r=s(Yr());function s(l){return l&&l.__esModule?l:{default:l}}var n={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function i(l,o){if(t.default(l),o=r.default(o,n),o.allow_trailing_dot&&l[l.length-1]===".")l=l.substring(0,l.length-1);if(o.allow_wildcard===!0&&l.indexOf("*.")===0)l=l.substring(2);var a=l.split("."),D=a[a.length-1];if(o.require_tld){if(a.length<2)return!1;if(!o.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(D))return!1;if(/\s/.test(D))return!1}if(!o.allow_numeric_tld&&/^\d+$/.test(D))return!1;return a.every(function(h){if(h.length>63&&!o.ignore_max_length)return!1;if(!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(h))return!1;if(/[\uff01-\uff5e]/.test(h))return!1;if(/^-|-$/.test(h))return!1;if(!o.allow_underscores&&/_/.test(h))return!1;return!0})}u.exports=e.default,u.exports.default=e.default}),oF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=B;var t=i(pt()),r=i(O1()),s=i(P0()),n=i(Yr());function i(C){return C&&C.__esModule?C:{default:C}}function l(C,c){return d(C)||h(C,c)||a(C,c)||o()}function o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
411
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(C,c){if(!C)return;if(typeof C==="string")return D(C,c);var y=Object.prototype.toString.call(C).slice(8,-1);if(y==="Object"&&C.constructor)y=C.constructor.name;if(y==="Map"||y==="Set")return Array.from(C);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return D(C,c)}function D(C,c){if(c==null||c>C.length)c=C.length;for(var y=0,A=new Array(c);y<c;y++)A[y]=C[y];return A}function h(C,c){var y=C==null?null:typeof Symbol!="undefined"&&C[Symbol.iterator]||C["@@iterator"];if(y!=null){var A,T,I,v,g=[],E=!0,S=!1;try{if(I=(y=y.call(C)).next,c===0){if(Object(y)!==y)return;E=!1}else for(;!(E=(A=I.call(y)).done)&&(g.push(A.value),g.length!==c);E=!0);}catch(_){S=!0,T=_}finally{try{if(!E&&y.return!=null&&(v=y.return(),Object(v)!==v))return}finally{if(S)throw T}}return g}}function d(C){if(Array.isArray(C))return C}var F={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},p=/^\[([^\]]+)\](?::([0-9]+))?$/;function f(C){return Object.prototype.toString.call(C)==="[object RegExp]"}function m(C,c){for(var y=0;y<c.length;y++){var A=c[y];if(C===A||f(A)&&A.test(C))return!0}return!1}function B(C,c){if(t.default(C),!C||/[\s<>]/.test(C))return!1;if(C.indexOf("mailto:")===0)return!1;if(c=n.default(c,F),c.validate_length&&C.length>=2083)return!1;if(!c.allow_fragments&&C.includes("#"))return!1;if(!c.allow_query_components&&(C.includes("?")||C.includes("&")))return!1;var y,A,T,I,v,g,E,S;if(E=C.split("#"),C=E.shift(),E=C.split("?"),C=E.shift(),E=C.split("://"),E.length>1){if(y=E.shift().toLowerCase(),c.require_valid_protocol&&c.protocols.indexOf(y)===-1)return!1}else if(c.require_protocol)return!1;else if(C.slice(0,2)==="//"){if(!c.allow_protocol_relative_urls)return!1;E[0]=C.slice(2)}if(C=E.join("://"),C==="")return!1;if(E=C.split("/"),C=E.shift(),C===""&&!c.require_host)return!0;if(E=C.split("@"),E.length>1){if(c.disallow_auth)return!1;if(E[0]==="")return!1;if(A=E.shift(),A.indexOf(":")>=0&&A.split(":").length>2)return!1;var _=A.split(":"),K=l(_,2),N=K[0],$=K[1];if(N===""&&$==="")return!1}I=E.join("@"),g=null,S=null;var P=I.match(p);if(P)T="",S=P[1],g=P[2]||null;else if(E=I.split(":"),T=E.shift(),E.length)g=E.join(":");if(g!==null&&g.length>0){if(v=parseInt(g,10),!/^[0-9]+$/.test(g)||v<=0||v>65535)return!1}else if(c.require_port)return!1;if(c.host_whitelist)return m(T,c.host_whitelist);if(T===""&&!c.require_host)return!0;if(!s.default(T)&&!r.default(T,c)&&(!S||!s.default(S,6)))return!1;if(T=T||S,c.host_blacklist&&m(T,c.host_blacklist))return!1;return!0}u.exports=e.default,u.exports.default=e.default}),cF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(pt());function r(i){return i&&i.__esModule?i:{default:i}}var s=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;function n(i){return t.default(i),s.test(i)}u.exports=e.default,u.exports.default=e.default}),DF=ue((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=l,e.locales=void 0;var u=t(pt());function t(a){return a&&a.__esModule?a:{default:a}}var r={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};function s(a){var D=a.filter(function(h){return!(h in r)});if(D.length>0)return!1;return!0}function n(a,D){var h=a.replace(/[\s\-]+/gi,"").toUpperCase(),d=h.slice(0,2).toUpperCase(),F=d in r;if(D.whitelist){if(!s(D.whitelist))return!1;var p=D.whitelist.includes(d);if(!p)return!1}if(D.blacklist){var f=D.blacklist.includes(d);if(f)return!1}return F&&r[d].test(h)}function i(a){var D=a.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),h=D.slice(4)+D.slice(0,4),d=h.replace(/[A-Z]/g,function(p){return p.charCodeAt(0)-55}),F=d.match(/\d{1,7}/g).reduce(function(p,f){return Number(p+f)%97},"");return F===1}function l(a){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return u.default(a),n(a,D)&&i(a)}var o=e.locales=Object.keys(r)}),fF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(pt());function r(i){return i&&i.__esModule?i:{default:i}}var s={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function n(i,l){t.default(i);var o=s[![void 0,null].includes(l)?l:"all"];return!!o&&o.test(i)}u.exports=e.default,u.exports.default=e.default}),dF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(pt());function r(i){return i&&i.__esModule?i:{default:i}}var s=/^[\x00-\x7F]+$/;function n(i){return t.default(i),s.test(i)}u.exports=e.default,u.exports.default=e.default}),EF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(pt());function r(i){return i&&i.__esModule?i:{default:i}}function s(i){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},s(i)}function n(i,l){t.default(i);var o,a;if(s(l)==="object")o=l.min||0,a=l.max;else o=arguments[1],a=arguments[2];var D=encodeURI(i).split(/%..|./).length-1;return D>=o&&(typeof a==="undefined"||D<=a)}u.exports=e.default,u.exports.default=e.default}),CF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=B;var t=l(pt()),r=l(EF()),s=l(O1()),n=l(P0()),i=l(Yr());function l(C){return C&&C.__esModule?C:{default:C}}var o={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},a=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,D=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,h=/^[a-z\d]+$/,d=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,F=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,p=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,f=254;function m(C){var c=C.replace(/^"(.+)"$/,"$1");if(!c.trim())return!1;var y=/[\.";<>]/.test(c);if(y){if(c===C)return!1;var A=c.split('"').length===c.split("\\\"").length;if(!A)return!1}return!0}function B(C,c){if(t.default(C),c=i.default(c,o),c.require_display_name||c.allow_display_name){var y=C.match(a);if(y){var A=y[1];if(C=C.replace(A,"").replace(/(^<|>$)/g,""),A.endsWith(" "))A=A.slice(0,-1);if(!m(A))return!1}else if(c.require_display_name)return!1}if(!c.ignore_max_length&&C.length>f)return!1;var T=C.split("@"),I=T.pop(),v=I.toLowerCase();if(c.host_blacklist.includes(v))return!1;if(c.host_whitelist.length>0&&!c.host_whitelist.includes(v))return!1;var g=T.join("@");if(c.domain_specific_validation&&(v==="gmail.com"||v==="googlemail.com")){g=g.toLowerCase();var E=g.split("+")[0];if(!r.default(E.replace(/\./g,""),{min:6,max:30}))return!1;var S=E.split(".");for(var _=0;_<S.length;_++)if(!h.test(S[_]))return!1}if(c.ignore_max_length===!1&&(!r.default(g,{max:64})||!r.default(I,{max:254})))return!1;if(!s.default(I,{require_tld:c.require_tld,ignore_max_length:c.ignore_max_length,allow_underscores:c.allow_underscores})){if(!c.allow_ip_domain)return!1;if(!n.default(I)){if(!I.startsWith("[")||!I.endsWith("]"))return!1;var K=I.slice(1,-1);if(K.length===0||!n.default(K))return!1}}if(g[0]==='"')return g=g.slice(1,g.length-1),c.allow_utf8_local_part?p.test(g):d.test(g);var N=c.allow_utf8_local_part?F:D,$=g.split(".");for(var P=0;P<$.length;P++)if(!N.test($[P]))return!1;if(c.blacklisted_chars){if(g.search(new RegExp("[".concat(c.blacklisted_chars,"]+"),"g"))!==-1)return!1}return!0}u.exports=e.default,u.exports.default=e.default}),M0=ue((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.farsiLocales=e.englishLocales=e.dotDecimal=e.decimal=e.commaDecimal=e.bengaliLocales=e.arabicLocales=e.alphanumeric=e.alpha=void 0;var u=e.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZ\u00C7\u018F\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"bg-BG":/^[\u0410-\u042F]+$/i,"cs-CZ":/^[A-Z\u00C1\u010C\u010E\u00C9\u011A\u00CD\u0147\u00D3\u0158\u0160\u0164\u00DA\u016E\u00DD\u017D]+$/i,"da-DK":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"de-DE":/^[A-Z\u00C4\u00D6\u00DC\u00DF]+$/i,"el-GR":/^[\u0391-\u03CE]+$/i,"es-ES":/^[A-Z\u00C1\u00C9\u00CD\u00D1\u00D3\u00DA\u00DC]+$/i,"fa-IR":/^[\u0627\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u06CC]+$/i,"fi-FI":/^[A-Z\u00C5\u00C4\u00D6]+$/i,"fr-FR":/^[A-Z\u00C0\u00C2\u00C6\u00C7\u00C9\u00C8\u00CA\u00CB\u00CF\u00CE\u00D4\u0152\u00D9\u00DB\u00DC\u0178]+$/i,"it-IT":/^[A-Z\u00C0\u00C9\u00C8\u00CC\u00CE\u00D3\u00D2\u00D9]+$/i,"ja-JP":/^[\u3041-\u3093\u30A1-\u30F6\uFF66-\uFF9F\u4E00-\u9FA0\u30FC\u30FB\u3002\u3001]+$/i,"nb-NO":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"nl-NL":/^[A-Z\u00C1\u00C9\u00CB\u00CF\u00D3\u00D6\u00DC\u00DA]+$/i,"nn-NO":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"hu-HU":/^[A-Z\u00C1\u00C9\u00CD\u00D3\u00D6\u0150\u00DA\u00DC\u0170]+$/i,"pl-PL":/^[A-Z\u0104\u0106\u0118\u015A\u0141\u0143\u00D3\u017B\u0179]+$/i,"pt-PT":/^[A-Z\u00C3\u00C1\u00C0\u00C2\u00C4\u00C7\u00C9\u00CA\u00CB\u00CD\u00CF\u00D5\u00D3\u00D4\u00D6\u00DA\u00DC]+$/i,"ru-RU":/^[\u0410-\u042F\u0401]+$/i,"kk-KZ":/^[\u0410-\u042F\u0401\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-Z\u010C\u0106\u0110\u0160\u017D]+$/i,"sk-SK":/^[A-Z\u00C1\u010C\u010E\u00C9\u00CD\u0147\u00D3\u0160\u0164\u00DA\u00DD\u017D\u0139\u0154\u013D\u00C4\u00D4]+$/i,"sr-RS@latin":/^[A-Z\u010C\u0106\u017D\u0160\u0110]+$/i,"sr-RS":/^[\u0410-\u042F\u0402\u0408\u0409\u040A\u040B\u040F]+$/i,"sv-SE":/^[A-Z\u00C5\u00C4\u00D6]+$/i,"th-TH":/^[\u0E01-\u0E50\s]+$/i,"tr-TR":/^[A-Z\u00C7\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"uk-UA":/^[\u0410-\u0429\u042C\u042E\u042F\u0404I\u0407\u0490\u0456]+$/i,"vi-VN":/^[A-Z\u00C0\u00C1\u1EA0\u1EA2\u00C3\u00C2\u1EA6\u1EA4\u1EAC\u1EA8\u1EAA\u0102\u1EB0\u1EAE\u1EB6\u1EB2\u1EB4\u0110\u00C8\u00C9\u1EB8\u1EBA\u1EBC\u00CA\u1EC0\u1EBE\u1EC6\u1EC2\u1EC4\u00CC\u00CD\u1ECA\u1EC8\u0128\u00D2\u00D3\u1ECC\u1ECE\u00D5\u00D4\u1ED2\u1ED0\u1ED8\u1ED4\u1ED6\u01A0\u1EDC\u1EDA\u1EE2\u1EDE\u1EE0\u00D9\u00DA\u1EE4\u1EE6\u0168\u01AF\u1EEA\u1EE8\u1EF0\u1EEC\u1EEE\u1EF2\u00DD\u1EF4\u1EF6\u1EF8]+$/i,"ko-KR":/^[\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]*$/,"ku-IQ":/^[\u0626\u0627\u0628\u067E\u062A\u062C\u0686\u062D\u062E\u062F\u0631\u0695\u0632\u0698\u0633\u0634\u0639\u063A\u0641\u06A4\u0642\u06A9\u06AF\u0644\u06B5\u0645\u0646\u0648\u06C6\u06BE\u06D5\u06CC\u06CE\u064A\u0637\u0624\u062B\u0622\u0625\u0623\u0643\u0636\u0635\u0629\u0638\u0630]+$/i,ar:/^[\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\u0670]+$/,he:/^[\u05D0-\u05EA]+$/,fa:/^['\u0622\u0627\u0621\u0623\u0624\u0626\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u0629\u06CC']+$/i,bn:/^['\u0980\u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098A\u098B\u098C\u098F\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099A\u099B\u099C\u099D\u099E\u099F\u09A0\u09A1\u09A2\u09A3\u09A4\u09A5\u09A6\u09A7\u09A8\u09AA\u09AB\u09AC\u09AD\u09AE\u09AF\u09B0\u09B2\u09B6\u09B7\u09B8\u09B9\u09BC\u09BD\u09BE\u09BF\u09C0\u09C1\u09C2\u09C3\u09C4\u09C7\u09C8\u09CB\u09CC\u09CD\u09CE\u09D7\u09DC\u09DD\u09DF\u09E0\u09E1\u09E2\u09E3\u09F0\u09F1\u09F2\u09F3\u09F4\u09F5\u09F6\u09F7\u09F8\u09F9\u09FA\u09FB']+$/,eo:/^[ABC\u0108D-G\u011CH\u0124IJ\u0134K-PRS\u015CTU\u016CVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/},t=e.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZ\u00C7\u018F\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"bg-BG":/^[0-9\u0410-\u042F]+$/i,"cs-CZ":/^[0-9A-Z\u00C1\u010C\u010E\u00C9\u011A\u00CD\u0147\u00D3\u0158\u0160\u0164\u00DA\u016E\u00DD\u017D]+$/i,"da-DK":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"de-DE":/^[0-9A-Z\u00C4\u00D6\u00DC\u00DF]+$/i,"el-GR":/^[0-9\u0391-\u03C9]+$/i,"es-ES":/^[0-9A-Z\u00C1\u00C9\u00CD\u00D1\u00D3\u00DA\u00DC]+$/i,"fi-FI":/^[0-9A-Z\u00C5\u00C4\u00D6]+$/i,"fr-FR":/^[0-9A-Z\u00C0\u00C2\u00C6\u00C7\u00C9\u00C8\u00CA\u00CB\u00CF\u00CE\u00D4\u0152\u00D9\u00DB\u00DC\u0178]+$/i,"it-IT":/^[0-9A-Z\u00C0\u00C9\u00C8\u00CC\u00CE\u00D3\u00D2\u00D9]+$/i,"ja-JP":/^[0-9\uFF10-\uFF19\u3041-\u3093\u30A1-\u30F6\uFF66-\uFF9F\u4E00-\u9FA0\u30FC\u30FB\u3002\u3001]+$/i,"hu-HU":/^[0-9A-Z\u00C1\u00C9\u00CD\u00D3\u00D6\u0150\u00DA\u00DC\u0170]+$/i,"nb-NO":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"nl-NL":/^[0-9A-Z\u00C1\u00C9\u00CB\u00CF\u00D3\u00D6\u00DC\u00DA]+$/i,"nn-NO":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"pl-PL":/^[0-9A-Z\u0104\u0106\u0118\u015A\u0141\u0143\u00D3\u017B\u0179]+$/i,"pt-PT":/^[0-9A-Z\u00C3\u00C1\u00C0\u00C2\u00C4\u00C7\u00C9\u00CA\u00CB\u00CD\u00CF\u00D5\u00D3\u00D4\u00D6\u00DA\u00DC]+$/i,"ru-RU":/^[0-9\u0410-\u042F\u0401]+$/i,"kk-KZ":/^[0-9\u0410-\u042F\u0401\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-Z\u010C\u0106\u0110\u0160\u017D]+$/i,"sk-SK":/^[0-9A-Z\u00C1\u010C\u010E\u00C9\u00CD\u0147\u00D3\u0160\u0164\u00DA\u00DD\u017D\u0139\u0154\u013D\u00C4\u00D4]+$/i,"sr-RS@latin":/^[0-9A-Z\u010C\u0106\u017D\u0160\u0110]+$/i,"sr-RS":/^[0-9\u0410-\u042F\u0402\u0408\u0409\u040A\u040B\u040F]+$/i,"sv-SE":/^[0-9A-Z\u00C5\u00C4\u00D6]+$/i,"th-TH":/^[\u0E01-\u0E59\s]+$/i,"tr-TR":/^[0-9A-Z\u00C7\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"uk-UA":/^[0-9\u0410-\u0429\u042C\u042E\u042F\u0404I\u0407\u0490\u0456]+$/i,"ko-KR":/^[0-9\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]*$/,"ku-IQ":/^[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u06690-9\u0626\u0627\u0628\u067E\u062A\u062C\u0686\u062D\u062E\u062F\u0631\u0695\u0632\u0698\u0633\u0634\u0639\u063A\u0641\u06A4\u0642\u06A9\u06AF\u0644\u06B5\u0645\u0646\u0648\u06C6\u06BE\u06D5\u06CC\u06CE\u064A\u0637\u0624\u062B\u0622\u0625\u0623\u0643\u0636\u0635\u0629\u0638\u0630]+$/i,"vi-VN":/^[0-9A-Z\u00C0\u00C1\u1EA0\u1EA2\u00C3\u00C2\u1EA6\u1EA4\u1EAC\u1EA8\u1EAA\u0102\u1EB0\u1EAE\u1EB6\u1EB2\u1EB4\u0110\u00C8\u00C9\u1EB8\u1EBA\u1EBC\u00CA\u1EC0\u1EBE\u1EC6\u1EC2\u1EC4\u00CC\u00CD\u1ECA\u1EC8\u0128\u00D2\u00D3\u1ECC\u1ECE\u00D5\u00D4\u1ED2\u1ED0\u1ED8\u1ED4\u1ED6\u01A0\u1EDC\u1EDA\u1EE2\u1EDE\u1EE0\u00D9\u00DA\u1EE4\u1EE6\u0168\u01AF\u1EEA\u1EE8\u1EF0\u1EEC\u1EEE\u1EF2\u00DD\u1EF4\u1EF6\u1EF8]+$/i,ar:/^[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u06690-9\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\u0670]+$/,he:/^[0-9\u05D0-\u05EA]+$/,fa:/^['0-9\u0622\u0627\u0621\u0623\u0624\u0626\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u0629\u06CC\u06F1\u06F2\u06F3\u06F4\u06F5\u06F6\u06F7\u06F8\u06F9\u06F0']+$/i,bn:/^['\u0980\u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098A\u098B\u098C\u098F\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099A\u099B\u099C\u099D\u099E\u099F\u09A0\u09A1\u09A2\u09A3\u09A4\u09A5\u09A6\u09A7\u09A8\u09AA\u09AB\u09AC\u09AD\u09AE\u09AF\u09B0\u09B2\u09B6\u09B7\u09B8\u09B9\u09BC\u09BD\u09BE\u09BF\u09C0\u09C1\u09C2\u09C3\u09C4\u09C7\u09C8\u09CB\u09CC\u09CD\u09CE\u09D7\u09DC\u09DD\u09DF\u09E0\u09E1\u09E2\u09E3\u09E6\u09E7\u09E8\u09E9\u09EA\u09EB\u09EC\u09ED\u09EE\u09EF\u09F0\u09F1\u09F2\u09F3\u09F4\u09F5\u09F6\u09F7\u09F8\u09F9\u09FA\u09FB']+$/,eo:/^[0-9ABC\u0108D-G\u011CH\u0124IJ\u0134K-PRS\u015CTU\u016CVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/},r=e.decimal={"en-US":".",ar:"٫"},s=e.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"];for(i=0;i<s.length;i++)n="en-".concat(s[i]),u[n]=u["en-US"],t[n]=t["en-US"],r[n]=r["en-US"];var n,i,l=e.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"];for(a=0;a<l.length;a++)o="ar-".concat(l[a]),u[o]=u.ar,t[o]=t.ar,r[o]=r.ar;var o,a,D=e.farsiLocales=["IR","AF"];for(d=0;d<D.length;d++)h="fa-".concat(D[d]),t[h]=t.fa,r[h]=r.ar;var h,d,F=e.bengaliLocales=["BD","IN"];for(f=0;f<F.length;f++)p="bn-".concat(F[f]),u[p]=u.bn,t[p]=t.bn,r[p]=r["en-US"];var p,f,m=e.dotDecimal=["ar-EG","ar-LB","ar-LY"],B=e.commaDecimal=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","eo","es-ES","fr-CA","fr-FR","id-ID","it-IT","ku-IQ","hi-IN","hu-HU","nb-NO","nn-NO","nl-NL","pl-PL","pt-PT","ru-RU","kk-KZ","si-LK","sl-SI","sr-RS@latin","sr-RS","sv-SE","tr-TR","uk-UA","vi-VN"];for(C=0;C<m.length;C++)r[m[C]]=r["en-US"];var C;for(c=0;c<B.length;c++)r[B[c]]=",";var c;u["fr-CA"]=u["fr-FR"],t["fr-CA"]=t["fr-FR"],u["pt-BR"]=u["pt-PT"],t["pt-BR"]=t["pt-PT"],r["pt-BR"]=r["pt-PT"],u["pl-Pl"]=u["pl-PL"],t["pl-Pl"]=t["pl-PL"],r["pl-Pl"]=r["pl-PL"],u["fa-AF"]=u.fa}),pF=ue((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s,e.locales=void 0;var u=r(pt()),t=M0();function r(i){return i&&i.__esModule?i:{default:i}}function s(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};u.default(i);var a=i,D=o.ignore;if(D)if(D instanceof RegExp)a=a.replace(D,"");else if(typeof D==="string")a=a.replace(new RegExp("[".concat(D.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(l in t.alpha)return t.alpha[l].test(a);throw new Error("Invalid locale '".concat(l,"'"))}var n=e.locales=Object.keys(t.alpha)}),gF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=D;var t=s(pt()),r=s(Yr());function s(h){return h&&h.__esModule?h:{default:h}}var n=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,i=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,l=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,o=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,a={checkDMS:!1};function D(h,d){if(t.default(h),d=r.default(d,a),!h.includes(","))return!1;var F=h.split(",");if(F[0].startsWith("(")&&!F[1].endsWith(")")||F[1].endsWith(")")&&!F[0].startsWith("("))return!1;if(d.checkDMS)return l.test(F[0])&&o.test(F[1]);return n.test(F[0])&&i.test(F[1])}u.exports=e.default,u.exports.default=e.default}),mF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=function s(n,i){return n.some(function(l){return i===l})},r=e.default=t;u.exports=e.default,u.exports.default=e.default}),yF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=D;var t=i(Yr()),r=i(pt()),s=i(mF()),n=M0();function i(h){return h&&h.__esModule?h:{default:h}}function l(h){var d=new RegExp("^[-+]?([0-9]+)?(\\".concat(n.decimal[h.locale],"[0-9]{").concat(h.decimal_digits,"})").concat(h.force_decimal?"":"?","$"));return d}var o={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},a=["","-","+"];function D(h,d){if(r.default(h),d=t.default(d,o),d.locale in n.decimal)return!s.default(a,h.replace(/ /g,""))&&l(d).test(h);throw new Error("Invalid locale '".concat(d.locale,"'"))}u.exports=e.default,u.exports.default=e.default}),FF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(pt());function r(i){return i&&i.__esModule?i:{default:i}}var s=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;function n(i){return t.default(i),s.test(i)}u.exports=e.default,u.exports.default=e.default}),AF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var t=r(pt());function r(n){return n&&n.__esModule?n:{default:n}}function s(n){t.default(n);var i=n.replace(/[- ]+/g,""),l=0,o,a,D;for(var h=i.length-1;h>=0;h--){if(o=i.substring(h,h+1),a=parseInt(o,10),D)if(a*=2,a>=10)l+=a%10+1;else l+=a;else l+=a;D=!D}return!!(l%10===0?i:!1)}u.exports=e.default,u.exports.default=e.default}),vF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var t=s(pt()),r=s(AF());function s(o){return o&&o.__esModule?o:{default:o}}var n={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},i=function(){var o=[];for(var a in n)if(n.hasOwnProperty(a))o.push(n[a]);return o}();function l(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};t.default(o);var D=a.provider,h=o.replace(/[- ]+/g,"");if(D&&D.toLowerCase()in n){if(!n[D.toLowerCase()].test(h))return!1}else if(D&&!(D.toLowerCase()in n))throw new Error("".concat(D," is not a valid credit card provider."));else if(!i.some(function(d){return d.test(h)}))return!1;return r.default(o)}u.exports=e.default,u.exports.default=e.default}),BF=ue((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s,e.locales=void 0;var u=r(pt()),t=M0();function r(i){return i&&i.__esModule?i:{default:i}}function s(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};u.default(i);var a=i,D=o.ignore;if(D)if(D instanceof RegExp)a=a.replace(D,"");else if(typeof D==="string")a=a.replace(new RegExp("[".concat(D.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(l in t.alphanumeric)return t.alphanumeric[l].test(a);throw new Error("Invalid locale '".concat(l,"'"))}var n=e.locales=Object.keys(t.alphanumeric)}),bF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;var t=r(pt());function r(i){return i&&i.__esModule?i:{default:i}}var s={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$/,ZA:/^[TAMD]\d{8}$/};function n(i,l){t.default(i);var o=i.replace(/\s/g,"").toUpperCase();return l.toUpperCase()in s&&s[l].test(o)}u.exports=e.default,u.exports.default=e.default}),L1=ue((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a,e.locales=void 0;var u=t(pt());function t(D){return D&&D.__esModule?D:{default:D}}var r=/^\d{3}$/,s=/^\d{4}$/,n=/^\d{5}$/,i=/^\d{6}$/,l={AD:/^AD\d{3}$/,AT:s,AU:s,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:s,BG:s,BR:/^\d{5}-\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:s,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CZ:/^\d{3}\s?\d{2}$/,DE:n,DK:s,DO:n,DZ:n,EE:n,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:n,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:s,ID:n,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:r,IT:n,JP:/^\d{3}\-\d{4}$/,KE:n,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:s,LV:/^LV\-\d{4}$/,LK:n,MG:r,MX:n,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:n,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:s,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:s,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:i,RU:i,SA:n,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:i,SI:s,SK:/^\d{3}\s?\d{2}$/,TH:n,TN:s,TW:/^\d{3}(\d{2})?$/,UA:n,US:/^\d{5}(-\d{4})?$/,ZA:s,ZM:n},o=e.locales=Object.keys(l);function a(D,h){if(u.default(D),h in l)return l[h].test(D);else if(h==="any"){for(var d in l)if(l.hasOwnProperty(d)){var F=l[d];if(F.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(h,"'"))}}),U1=ue((e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s,e.locales=void 0;var u=t(pt());function t(i){return i&&i.__esModule?i:{default:i}}var r={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?(9[1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|6)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+244)\d{9}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[789]\d{6}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/};r["en-CA"]=r["en-US"],r["fr-CA"]=r["en-CA"],r["fr-BE"]=r["nl-BE"],r["zh-HK"]=r["en-HK"],r["zh-MO"]=r["en-MO"],r["ga-IE"]=r["en-IE"],r["fr-CH"]=r["de-CH"],r["it-CH"]=r["fr-CH"];function s(i,l,o){if(u.default(i),o&&o.strictMode&&!i.startsWith("+"))return!1;if(Array.isArray(l))return l.some(function(h){if(r.hasOwnProperty(h)){var d=r[h];if(d.test(i))return!0}return!1});else if(l in r)return r[l].test(i);else if(!l||l==="any"){for(var a in r)if(r.hasOwnProperty(a)){var D=r[a];if(D.test(i))return!0}return!1}throw new Error("Invalid locale '".concat(l,"'"))}var n=e.locales=Object.keys(r)}),P1=ue((e,u)=>{(function(t,r){typeof e=="object"&&typeof u!="undefined"?u.exports=r():typeof define=="function"&&define.amd?define(r):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs=r()})(e,function(){var t=1000,r=60000,s=3600000,n="millisecond",i="second",l="minute",o="hour",a="day",D="week",h="month",d="quarter",F="year",p="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,B=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var $=["th","st","nd","rd"],P=N%100;return"["+N+($[(P-20)%10]||$[P]||$[0])+"]"}},c=function(N,$,P){var V=String(N);return!V||V.length>=$?N:""+Array($+1-V.length).join(P)+N},y={s:c,z:function(N){var $=-N.utcOffset(),P=Math.abs($),V=Math.floor(P/60),k=P%60;return($<=0?"+":"-")+c(V,2,"0")+":"+c(k,2,"0")},m:function N($,P){if($.date()<P.date())return-N(P,$);var V=12*(P.year()-$.year())+(P.month()-$.month()),k=$.clone().add(V,h),W=P-k<0,Q=$.clone().add(V+(W?-1:1),h);return+(-(V+(P-k)/(W?k-Q:Q-k))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:h,y:F,w:D,d:a,D:p,h:o,m:l,s:i,ms:n,Q:d}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},A="en",T={};T[A]=C;var I="$isDayjsObject",v=function(N){return N instanceof _||!(!N||!N[I])},g=function N($,P,V){var k;if(!$)return A;if(typeof $=="string"){var W=$.toLowerCase();T[W]&&(k=W),P&&(T[W]=P,k=W);var Q=$.split("-");if(!k&&Q.length>1)return N(Q[0])}else{var z=$.name;T[z]=$,k=z}return!V&&k&&(A=k),k||!V&&A},E=function(N,$){if(v(N))return N.clone();var P=typeof $=="object"?$:{};return P.date=N,P.args=arguments,new _(P)},S=y;S.l=g,S.i=v,S.w=function(N,$){return E(N,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var _=function(){function N(P){this.$L=g(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[I]=!0}var $=N.prototype;return $.parse=function(P){this.$d=function(V){var{date:k,utc:W}=V;if(k===null)return new Date(NaN);if(S.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var Q=k.match(m);if(Q){var z=Q[2]-1||0,x=(Q[7]||"0").substring(0,3);return W?new Date(Date.UTC(Q[1],z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,x)):new Date(Q[1],z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,x)}}return new Date(k)}(P),this.init()},$.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},$.$utils=function(){return S},$.isValid=function(){return this.$d.toString()!==f},$.isSame=function(P,V){var k=E(P);return this.startOf(V)<=k&&k<=this.endOf(V)},$.isAfter=function(P,V){return E(P)<this.startOf(V)},$.isBefore=function(P,V){return this.endOf(V)<E(P)},$.$g=function(P,V,k){return S.u(P)?this[V]:this.set(k,P)},$.unix=function(){return Math.floor(this.valueOf()/1000)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(P,V){var k=this,W=!!S.u(V)||V,Q=S.p(P),z=function(Ie,ce){var w=S.w(k.$u?Date.UTC(k.$y,ce,Ie):new Date(k.$y,ce,Ie),k);return W?w:w.endOf(a)},x=function(Ie,ce){return S.w(k.toDate()[Ie].apply(k.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(ce)),k)},ne=this.$W,Ee=this.$M,Fe=this.$D,J="set"+(this.$u?"UTC":"");switch(Q){case F:return W?z(1,0):z(31,11);case h:return W?z(1,Ee):z(0,Ee+1);case D:var ye=this.$locale().weekStart||0,se=(ne<ye?ne+7:ne)-ye;return z(W?Fe-se:Fe+(6-se),Ee);case a:case p:return x(J+"Hours",0);case o:return x(J+"Minutes",1);case l:return x(J+"Seconds",2);case i:return x(J+"Milliseconds",3);default:return this.clone()}},$.endOf=function(P){return this.startOf(P,!1)},$.$set=function(P,V){var k,W=S.p(P),Q="set"+(this.$u?"UTC":""),z=(k={},k[a]=Q+"Date",k[p]=Q+"Date",k[h]=Q+"Month",k[F]=Q+"FullYear",k[o]=Q+"Hours",k[l]=Q+"Minutes",k[i]=Q+"Seconds",k[n]=Q+"Milliseconds",k)[W],x=W===a?this.$D+(V-this.$W):V;if(W===h||W===F){var ne=this.clone().set(p,1);ne.$d[z](x),ne.init(),this.$d=ne.set(p,Math.min(this.$D,ne.daysInMonth())).$d}else z&&this.$d[z](x);return this.init(),this},$.set=function(P,V){return this.clone().$set(P,V)},$.get=function(P){return this[S.p(P)]()},$.add=function(P,V){var k,W=this;P=Number(P);var Q=S.p(V),z=function(Ee){var Fe=E(W);return S.w(Fe.date(Fe.date()+Math.round(Ee*P)),W)};if(Q===h)return this.set(h,this.$M+P);if(Q===F)return this.set(F,this.$y+P);if(Q===a)return z(1);if(Q===D)return z(7);var x=(k={},k[l]=r,k[o]=s,k[i]=t,k)[Q]||1,ne=this.$d.getTime()+P*x;return S.w(ne,this)},$.subtract=function(P,V){return this.add(-1*P,V)},$.format=function(P){var V=this,k=this.$locale();if(!this.isValid())return k.invalidDate||f;var W=P||"YYYY-MM-DDTHH:mm:ssZ",Q=S.z(this),z=this.$H,x=this.$m,ne=this.$M,Ee=k.weekdays,Fe=k.months,J=k.meridiem,ye=function(ce,w,M,L){return ce&&(ce[w]||ce(V,W))||M[w].slice(0,L)},se=function(ce){return S.s(z%12||12,ce,"0")},Ie=J||function(ce,w,M){var L=ce<12?"AM":"PM";return M?L.toLowerCase():L};return W.replace(B,function(ce,w){return w||function(M){switch(M){case"YY":return String(V.$y).slice(-2);case"YYYY":return S.s(V.$y,4,"0");case"M":return ne+1;case"MM":return S.s(ne+1,2,"0");case"MMM":return ye(k.monthsShort,ne,Fe,3);case"MMMM":return ye(Fe,ne);case"D":return V.$D;case"DD":return S.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return ye(k.weekdaysMin,V.$W,Ee,2);case"ddd":return ye(k.weekdaysShort,V.$W,Ee,3);case"dddd":return Ee[V.$W];case"H":return String(z);case"HH":return S.s(z,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return Ie(z,x,!0);case"A":return Ie(z,x,!1);case"m":return String(x);case"mm":return S.s(x,2,"0");case"s":return String(V.$s);case"ss":return S.s(V.$s,2,"0");case"SSS":return S.s(V.$ms,3,"0");case"Z":return Q}return null}(ce)||Q.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(P,V,k){var W,Q=this,z=S.p(V),x=E(P),ne=(x.utcOffset()-this.utcOffset())*r,Ee=this-x,Fe=function(){return S.m(Q,x)};switch(z){case F:W=Fe()/12;break;case h:W=Fe();break;case d:W=Fe()/3;break;case D:W=(Ee-ne)/604800000;break;case a:W=(Ee-ne)/86400000;break;case o:W=Ee/s;break;case l:W=Ee/r;break;case i:W=Ee/t;break;default:W=Ee}return k?W:S.a(W)},$.daysInMonth=function(){return this.endOf(h).$D},$.$locale=function(){return T[this.$L]},$.locale=function(P,V){if(!P)return this.$L;var k=this.clone(),W=g(P,V,!0);return W&&(k.$L=W),k},$.clone=function(){return S.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},N}(),K=_.prototype;return E.prototype=K,[["$ms",n],["$s",i],["$m",l],["$H",o],["$W",a],["$M",h],["$y",F],["$D",p]].forEach(function(N){K[N[1]]=function($){return this.$g($,N[0],N[1])}}),E.extend=function(N,$){return N.$i||(N($,_,E),N.$i=!0),E},E.locale=g,E.isDayjs=v,E.unix=function(N){return E(1000*N)},E.en=T[A],E.Ls=T,E.p={},E})}),SF=ue((e,u)=>{(function(t,r){typeof e=="object"&&typeof u!="undefined"?u.exports=r():typeof define=="function"&&define.amd?define(r):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs_plugin_isSameOrAfter=r()})(e,function(){return function(t,r){r.prototype.isSameOrAfter=function(s,n){return this.isSame(s,n)||this.isAfter(s,n)}}})}),TF=ue((e,u)=>{(function(t,r){typeof e=="object"&&typeof u!="undefined"?u.exports=r():typeof define=="function"&&define.amd?define(r):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs_plugin_isSameOrBefore=r()})(e,function(){return function(t,r){r.prototype.isSameOrBefore=function(s,n){return this.isSame(s,n)||this.isBefore(s,n)}}})}),wF=ue((e,u)=>{(function(t,r){typeof e=="object"&&typeof u!="undefined"?u.exports=r():typeof define=="function"&&define.amd?define(r):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs_plugin_customParseFormat=r()})(e,function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,n=/\d\d/,i=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,o={},a=function(m){return(m=+m)+(m>68?1900:2000)},D=function(m){return function(B){this[m]=+B}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(B){if(!B)return 0;if(B==="Z")return 0;var C=B.match(/([+-]|\d\d)/g),c=60*C[1]+(+C[2]||0);return c===0?0:C[0]==="+"?-c:c}(m)}],d=function(m){var B=o[m];return B&&(B.indexOf?B:B.s.concat(B.f))},F=function(m,B){var C,c=o.meridiem;if(c){for(var y=1;y<=24;y+=1)if(m.indexOf(c(y,0,B))>-1){C=y>12;break}}else C=m===(B?"pm":"PM");return C},p={A:[l,function(m){this.afternoon=F(m,!1)}],a:[l,function(m){this.afternoon=F(m,!0)}],Q:[s,function(m){this.month=3*(m-1)+1}],S:[s,function(m){this.milliseconds=100*+m}],SS:[n,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[i,D("seconds")],ss:[i,D("seconds")],m:[i,D("minutes")],mm:[i,D("minutes")],H:[i,D("hours")],h:[i,D("hours")],HH:[i,D("hours")],hh:[i,D("hours")],D:[i,D("day")],DD:[n,D("day")],Do:[l,function(m){var B=o.ordinal,C=m.match(/\d+/);if(this.day=C[0],B)for(var c=1;c<=31;c+=1)B(c).replace(/\[|\]/g,"")===m&&(this.day=c)}],w:[i,D("week")],ww:[n,D("week")],M:[i,D("month")],MM:[n,D("month")],MMM:[l,function(m){var B=d("months"),C=(d("monthsShort")||B.map(function(c){return c.slice(0,3)})).indexOf(m)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[l,function(m){var B=d("months").indexOf(m)+1;if(B<1)throw new Error;this.month=B%12||B}],Y:[/[+-]?\d+/,D("year")],YY:[n,function(m){this.year=a(m)}],YYYY:[/\d{4}/,D("year")],Z:h,ZZ:h};function f(m){var B,C;B=m,C=o&&o.formats;for(var c=(m=B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(E,S,_){var K=_&&_.toUpperCase();return S||C[_]||t[_]||C[K].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(N,$,P){return $||P.slice(1)})})).match(r),y=c.length,A=0;A<y;A+=1){var T=c[A],I=p[T],v=I&&I[0],g=I&&I[1];c[A]=g?{regex:v,parser:g}:T.replace(/^\[|\]$/g,"")}return function(E){for(var S={},_=0,K=0;_<y;_+=1){var N=c[_];if(typeof N=="string")K+=N.length;else{var{regex:$,parser:P}=N,V=E.slice(K),k=$.exec(V)[0];P.call(S,k),E=E.replace(k,"")}}return function(W){var Q=W.afternoon;if(Q!==void 0){var z=W.hours;Q?z<12&&(W.hours+=12):z===12&&(W.hours=0),delete W.afternoon}}(S),S}}return function(m,B,C){C.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(a=m.parseTwoDigitYear);var c=B.prototype,y=c.parse;c.parse=function(A){var{date:T,utc:I,args:v}=A;this.$u=I;var g=v[1];if(typeof g=="string"){var E=v[2]===!0,S=v[3]===!0,_=E||S,K=v[2];S&&(K=v[2]),o=this.$locale(),!E&&K&&(o=C.Ls[K]),this.$d=function(V,k,W,Q){try{if(["x","X"].indexOf(k)>-1)return new Date((k==="X"?1000:1)*V);var z=f(k)(V),x=z.year,ne=z.month,Ee=z.day,Fe=z.hours,J=z.minutes,ye=z.seconds,se=z.milliseconds,Ie=z.zone,ce=z.week,w=new Date,M=Ee||(x||ne?1:w.getDate()),L=x||w.getFullYear(),b=0;x&&!ne||(b=ne>0?ne-1:w.getMonth());var O,H=Fe||0,j=J||0,Z=ye||0,he=se||0;return Ie?new Date(Date.UTC(L,b,M,H,j,Z,he+60*Ie.offset*1000)):W?new Date(Date.UTC(L,b,M,H,j,Z,he)):(O=new Date(L,b,M,H,j,Z,he),ce&&(O=Q(O).week(ce).toDate()),O)}catch(ge){return new Date("")}}(T,g,I,C),this.init(),K&&K!==!0&&(this.$L=this.locale(K).$L),_&&T!=this.format(g)&&(this.$d=new Date("")),o={}}else if(g instanceof Array)for(var N=g.length,$=1;$<=N;$+=1){v[1]=g[$-1];var P=C.apply(this,v);if(P.isValid()){this.$d=P.$d,this.$L=P.$L,this.init();break}$===N&&(this.$d=new Date(""))}else y.call(this,A)}}})}),IF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var t=r(pt());function r(n){return n&&n.__esModule?n:{default:n}}function s(n){return t.default(n),n.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")}u.exports=e.default,u.exports.default=e.default}),NF=ue((e,u)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=D;var t=r(Yr());function r(h){return h&&h.__esModule?h:{default:h}}var s={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},n=["icloud.com","me.com"],i=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],l=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],o=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function a(h){if(h.length>1)return h;return""}function D(h,d){d=t.default(d,s);var F=h.split("@"),p=F.pop(),f=F.join("@"),m=[f,p];if(m[1]=m[1].toLowerCase(),m[1]==="gmail.com"||m[1]==="googlemail.com"){if(d.gmail_remove_subaddress)m[0]=m[0].split("+")[0];if(d.gmail_remove_dots)m[0]=m[0].replace(/\.+/g,a);if(!m[0].length)return!1;if(d.all_lowercase||d.gmail_lowercase)m[0]=m[0].toLowerCase();m[1]=d.gmail_convert_googlemaildotcom?"gmail.com":m[1]}else if(n.indexOf(m[1])>=0){if(d.icloud_remove_subaddress)m[0]=m[0].split("+")[0];if(!m[0].length)return!1;if(d.all_lowercase||d.icloud_lowercase)m[0]=m[0].toLowerCase()}else if(i.indexOf(m[1])>=0){if(d.outlookdotcom_remove_subaddress)m[0]=m[0].split("+")[0];if(!m[0].length)return!1;if(d.all_lowercase||d.outlookdotcom_lowercase)m[0]=m[0].toLowerCase()}else if(l.indexOf(m[1])>=0){if(d.yahoo_remove_subaddress){var B=m[0].split("-");m[0]=B.length>1?B.slice(0,-1).join("-"):B[0]}if(!m[0].length)return!1;if(d.all_lowercase||d.yahoo_lowercase)m[0]=m[0].toLowerCase()}else if(o.indexOf(m[1])>=0){if(d.all_lowercase||d.yandex_lowercase)m[0]=m[0].toLowerCase();m[1]="yandex.ru"}else if(d.all_lowercase)m[0]=m[0].toLowerCase();return m.join("@")}u.exports=e.default,u.exports.default=e.default}),gt=ue((e,u)=>{var{FORCE_COLOR:t,NODE_DISABLE_COLORS:r,TERM:s}=process.env,n={enabled:!r&&s!=="dumb"&&t!=="0",reset:o(0,0),bold:o(1,22),dim:o(2,22),italic:o(3,23),underline:o(4,24),inverse:o(7,27),hidden:o(8,28),strikethrough:o(9,29),black:o(30,39),red:o(31,39),green:o(32,39),yellow:o(33,39),blue:o(34,39),magenta:o(35,39),cyan:o(36,39),white:o(37,39),gray:o(90,39),grey:o(90,39),bgBlack:o(40,49),bgRed:o(41,49),bgGreen:o(42,49),bgYellow:o(43,49),bgBlue:o(44,49),bgMagenta:o(45,49),bgCyan:o(46,49),bgWhite:o(47,49)};function i(a,D){let h=0,d,F="",p="";for(;h<a.length;h++)if(d=a[h],F+=d.open,p+=d.close,D.includes(d.close))D=D.replace(d.rgx,d.close+d.open);return F+D+p}function l(a,D){let h={has:a,keys:D};return h.reset=n.reset.bind(h),h.bold=n.bold.bind(h),h.dim=n.dim.bind(h),h.italic=n.italic.bind(h),h.underline=n.underline.bind(h),h.inverse=n.inverse.bind(h),h.hidden=n.hidden.bind(h),h.strikethrough=n.strikethrough.bind(h),h.black=n.black.bind(h),h.red=n.red.bind(h),h.green=n.green.bind(h),h.yellow=n.yellow.bind(h),h.blue=n.blue.bind(h),h.magenta=n.magenta.bind(h),h.cyan=n.cyan.bind(h),h.white=n.white.bind(h),h.gray=n.gray.bind(h),h.grey=n.grey.bind(h),h.bgBlack=n.bgBlack.bind(h),h.bgRed=n.bgRed.bind(h),h.bgGreen=n.bgGreen.bind(h),h.bgYellow=n.bgYellow.bind(h),h.bgBlue=n.bgBlue.bind(h),h.bgMagenta=n.bgMagenta.bind(h),h.bgCyan=n.bgCyan.bind(h),h.bgWhite=n.bgWhite.bind(h),h}function o(a,D){let h={open:`\x1B[${a}m`,close:`\x1B[${D}m`,rgx:new RegExp(`\\x1b\\[${D}m`,"g")};return function(d){if(this!==void 0&&this.has!==void 0)return this.has.includes(a)||(this.has.push(a),this.keys.push(h)),d===void 0?this:n.enabled?i(this.keys,d+""):d+"";return d===void 0?l([a],[h]):n.enabled?i([h],d+""):d+""}}u.exports=n}),_F=ue((e,u)=>{u.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return!1}}),k0=ue((e,u)=>{u.exports=(t)=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),s=new RegExp(r,"g");return typeof t==="string"?t.replace(s,""):t}}),mt=ue((e,u)=>{var t="\x1B",r=`${t}[`,s="\x07",n={to(o,a){if(!a)return`${r}${o+1}G`;return`${r}${a+1};${o+1}H`},move(o,a){let D="";if(o<0)D+=`${r}${-o}D`;else if(o>0)D+=`${r}${o}C`;if(a<0)D+=`${r}${-a}A`;else if(a>0)D+=`${r}${a}B`;return D},up:(o=1)=>`${r}${o}A`,down:(o=1)=>`${r}${o}B`,forward:(o=1)=>`${r}${o}C`,backward:(o=1)=>`${r}${o}D`,nextLine:(o=1)=>`${r}E`.repeat(o),prevLine:(o=1)=>`${r}F`.repeat(o),left:`${r}G`,hide:`${r}?25l`,show:`${r}?25h`,save:`${t}7`,restore:`${t}8`},i={up:(o=1)=>`${r}S`.repeat(o),down:(o=1)=>`${r}T`.repeat(o)},l={screen:`${r}2J`,up:(o=1)=>`${r}1J`.repeat(o),down:(o=1)=>`${r}J`.repeat(o),line:`${r}2K`,lineEnd:`${r}K`,lineStart:`${r}1K`,lines(o){let a="";for(let D=0;D<o;D++)a+=this.line+(D<o-1?n.up():"");if(o)a+=n.left;return a}};u.exports={cursor:n,scroll:i,erase:l,beep:s}}),$F=ue((e,u)=>{function t(D,h){var d=typeof Symbol!=="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(!d){if(Array.isArray(D)||(d=r(D))||h&&D&&typeof D.length==="number"){if(d)D=d;var F=0,p=function C(){};return{s:p,n:function C(){if(F>=D.length)return{done:!0};return{done:!1,value:D[F++]}},e:function C(c){throw c},f:p}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
412
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f=!0,m=!1,B;return{s:function C(){d=d.call(D)},n:function C(){var c=d.next();return f=c.done,c},e:function C(c){m=!0,B=c},f:function C(){try{if(!f&&d.return!=null)d.return()}finally{if(m)throw B}}}}function r(D,h){if(!D)return;if(typeof D==="string")return s(D,h);var d=Object.prototype.toString.call(D).slice(8,-1);if(d==="Object"&&D.constructor)d=D.constructor.name;if(d==="Map"||d==="Set")return Array.from(D);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return s(D,h)}function s(D,h){if(h==null||h>D.length)h=D.length;for(var d=0,F=new Array(h);d<h;d++)F[d]=D[d];return F}var n=k0(),i=mt(),l=i.erase,o=i.cursor,a=(D)=>[...n(D)].length;u.exports=function(D,h){if(!h)return l.line+o.to(0);let d=0,F=D.split(/\r?\n/);var p=t(F),f;try{for(p.s();!(f=p.n()).done;){let m=f.value;d+=1+Math.floor(Math.max(a(m)-1,0)/h)}}catch(m){p.e(m)}finally{p.f()}return l.lines(d)}}),M1=ue((e,u)=>{var t={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"},s=process.platform==="win32"?r:t;u.exports=s}),RF=ue((e,u)=>{var t=gt(),r=M1(),s=Object.freeze({password:{scale:1,render:(D)=>"*".repeat(D.length)},emoji:{scale:2,render:(D)=>"\uD83D\uDE03".repeat(D.length)},invisible:{scale:0,render:(D)=>""},default:{scale:1,render:(D)=>`${D}`}}),n=(D)=>s[D]||s.default,i=Object.freeze({aborted:t.red(r.cross),done:t.green(r.tick),exited:t.yellow(r.cross),default:t.cyan("?")}),l=(D,h,d)=>h?i.aborted:d?i.exited:D?i.done:i.default,o=(D)=>t.gray(D?r.ellipsis:r.pointerSmall),a=(D,h)=>t.gray(D?h?r.pointerSmall:"+":r.line);u.exports={styles:s,render:n,symbols:i,symbol:l,delimiter:o,item:a}}),OF=ue((e,u)=>{var t=k0();u.exports=function(r,s){let n=String(t(r)||"").split(/\r?\n/);if(!s)return n.length;return n.map((i)=>Math.ceil(i.length/s)).reduce((i,l)=>i+l)}}),LF=ue((e,u)=>{u.exports=(t,r={})=>{let s=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"",n=r.width;return(t||"").split(/\r?\n/g).map((i)=>i.split(/\s+/g).reduce((l,o)=>{if(o.length+s.length>=n||l[l.length-1].length+o.length+1<n)l[l.length-1]+=` ${o}`;else l.push(`${s}${o}`);return l},[s]).join(`
|
|
413
|
-
`)).join(`
|
|
414
|
-
`)}}),UF=ue((e,u)=>{u.exports=(t,r,s)=>{s=s||r;let n=Math.min(r-s,t-Math.floor(s/2));if(n<0)n=0;let i=Math.min(n+s,r);return{startIndex:n,endIndex:i}}}),Hu=ue((e,u)=>{u.exports={action:_F(),clear:$F(),style:RF(),strip:k0(),figures:M1(),lines:OF(),wrap:LF(),entriesToDisplay:UF()}}),Tr=ue((e,u)=>{var t=import.meta.require("readline"),r=Hu(),s=r.action,n=import.meta.require("events"),i=mt(),l=i.beep,o=i.cursor,a=gt();class D extends n{constructor(h={}){super();this.firstRender=!0,this.in=h.stdin||process.stdin,this.out=h.stdout||process.stdout,this.onRender=(h.onRender||(()=>{return})).bind(this);let d=t.createInterface({input:this.in,escapeCodeTimeout:50});if(t.emitKeypressEvents(this.in,d),this.in.isTTY)this.in.setRawMode(!0);let F=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,p=(f,m)=>{let B=s(m,F);if(B===!1)this._&&this._(f,m);else if(typeof this[B]==="function")this[B](m);else this.bell()};this.close=()=>{if(this.out.write(o.show),this.in.removeListener("keypress",p),this.in.isTTY)this.in.setRawMode(!1);d.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",p)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(l)}render(){if(this.onRender(a),this.firstRender)this.firstRender=!1}}u.exports=D}),PF=ue((e,u)=>{function t(f,m,B,C,c,y,A){try{var T=f[y](A),I=T.value}catch(v){B(v);return}if(T.done)m(I);else Promise.resolve(I).then(C,c)}function r(f){return function(){var m=this,B=arguments;return new Promise(function(C,c){var y=f.apply(m,B);function A(I){t(y,C,c,A,T,"next",I)}function T(I){t(y,C,c,A,T,"throw",I)}A(void 0)})}}var s=gt(),n=Tr(),i=mt(),l=i.erase,o=i.cursor,a=Hu(),D=a.style,h=a.clear,d=a.lines,F=a.figures;class p extends n{constructor(f={}){super(f);this.transform=D.render(f.style),this.scale=this.transform.scale,this.msg=f.message,this.initial=f.initial||"",this.validator=f.validate||(()=>!0),this.value="",this.errorMsg=f.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=h("",this.out.columns),this.render()}set value(f){if(!f&&this.initial)this.placeholder=!0,this.rendered=s.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(f);this._value=f,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
|
|
415
|
-
`),this.close()}validate(){var f=this;return r(function*(){let m=yield f.validator(f.value);if(typeof m==="string")f.errorMsg=m,m=!1;f.error=!m})()}submit(){var f=this;return r(function*(){if(f.value=f.value||f.initial,f.cursorOffset=0,f.cursor=f.rendered.length,yield f.validate(),f.error){f.red=!0,f.fire(),f.render();return}f.done=!0,f.aborted=!1,f.fire(),f.render(),f.out.write(`
|
|
416
|
-
`),f.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(f){if(this.placeholder)return;this.cursor=this.cursor+f,this.cursorOffset+=f}_(f,m){let B=this.value.slice(0,this.cursor),C=this.value.slice(this.cursor);this.value=`${B}${f}${C}`,this.red=!1,this.cursor=this.placeholder?0:B.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let f=this.value.slice(0,this.cursor-1),m=this.value.slice(this.cursor);if(this.value=`${f}${m}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let f=this.value.slice(0,this.cursor),m=this.value.slice(this.cursor+1);if(this.value=`${f}${m}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else this.cursorOffset++;this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(o.down(d(this.outputError,this.out.columns)-1)+h(this.outputError,this.out.columns));this.out.write(h(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[D.symbol(this.done,this.aborted),s.bold(this.msg),D.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split(`
|
|
417
|
-
`).reduce((f,m,B)=>f+`
|
|
418
|
-
${B?" ":F.pointerSmall} ${s.red().italic(m)}`,"");this.out.write(l.line+o.to(0)+this.outputText+o.save+this.outputError+o.restore+o.move(this.cursorOffset,0))}}u.exports=p}),MF=ue((e,u)=>{var t=gt(),r=Tr(),s=Hu(),n=s.style,i=s.clear,l=s.figures,o=s.wrap,a=s.entriesToDisplay,D=mt(),h=D.cursor;class d extends r{constructor(F={}){super(F);this.msg=F.message,this.hint=F.hint||"- Use arrow-keys. Return to submit.",this.warn=F.warn||"- This option is disabled",this.cursor=F.initial||0,this.choices=F.choices.map((p,f)=>{if(typeof p==="string")p={title:p,value:f};return{title:p&&(p.title||p.value||p),value:p&&(p.value===void 0?f:p.value),description:p&&p.description,selected:p&&p.selected,disabled:p&&p.disabled}}),this.optionsPerPage=F.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=i("",this.out.columns),this.render()}moveCursor(F){this.cursor=F,this.value=this.choices[F].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
419
|
-
`),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
420
|
-
`),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(F,p){if(F===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(i(this.outputText,this.out.columns));super.render();let F=a(this.cursor,this.choices.length,this.optionsPerPage),p=F.startIndex,f=F.endIndex;if(this.outputText=[n.symbol(this.done,this.aborted),t.bold(this.msg),n.delimiter(!1),this.done?this.selection.title:this.selection.disabled?t.yellow(this.warn):t.gray(this.hint)].join(" "),!this.done){this.outputText+=`
|
|
421
|
-
`;for(let m=p;m<f;m++){let B,C,c="",y=this.choices[m];if(m===p&&p>0)C=l.arrowUp;else if(m===f-1&&f<this.choices.length)C=l.arrowDown;else C=" ";if(y.disabled)B=this.cursor===m?t.gray().underline(y.title):t.strikethrough().gray(y.title),C=(this.cursor===m?t.bold().gray(l.pointer)+" ":" ")+C;else if(B=this.cursor===m?t.cyan().underline(y.title):y.title,C=(this.cursor===m?t.cyan(l.pointer)+" ":" ")+C,y.description&&this.cursor===m){if(c=` - ${y.description}`,C.length+B.length+c.length>=this.out.columns||y.description.split(/\r?\n/).length>1)c=`
|
|
422
|
-
`+o(y.description,{margin:3,width:this.out.columns})}this.outputText+=`${C} ${B}${t.gray(c)}
|
|
423
|
-
`}}this.out.write(this.outputText)}}u.exports=d}),kF=ue((e,u)=>{var t=gt(),r=Tr(),s=Hu(),n=s.style,i=s.clear,l=mt(),o=l.cursor,a=l.erase;class D extends r{constructor(h={}){super(h);this.msg=h.message,this.value=!!h.initial,this.active=h.active||"on",this.inactive=h.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
424
|
-
`),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
425
|
-
`),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(h,d){if(h===" ")this.value=!this.value;else if(h==="1")this.value=!0;else if(h==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(o.hide);else this.out.write(i(this.outputText,this.out.columns));super.render(),this.outputText=[n.symbol(this.done,this.aborted),t.bold(this.msg),n.delimiter(this.done),this.value?this.inactive:t.cyan().underline(this.inactive),t.gray("/"),this.value?t.cyan().underline(this.active):this.active].join(" "),this.out.write(a.line+o.to(0)+this.outputText)}}u.exports=D}),cr=ue((e,u)=>{class t{constructor({token:r,date:s,parts:n,locales:i}){this.token=r,this.date=s||new Date,this.parts=n||[this],this.locales=i||{}}up(){}down(){}next(){let r=this.parts.indexOf(this);return this.parts.find((s,n)=>n>r&&s instanceof t)}setTo(r){}prev(){let r=[].concat(this.parts).reverse(),s=r.indexOf(this);return r.find((n,i)=>i>s&&n instanceof t)}toString(){return String(this.date)}}u.exports=t}),VF=ue((e,u)=>{var t=cr();class r extends t{constructor(s={}){super(s)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let s=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?s.toUpperCase():s}}u.exports=r}),KF=ue((e,u)=>{var t=cr(),r=(n)=>{return n=n%10,n===1?"st":n===2?"nd":n===3?"rd":"th"};class s extends t{constructor(n={}){super(n)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(n){this.date.setDate(parseInt(n.substr(-2)))}toString(){let n=this.date.getDate(),i=this.date.getDay();return this.token==="DD"?String(n).padStart(2,"0"):this.token==="Do"?n+r(n):this.token==="d"?i+1:this.token==="ddd"?this.locales.weekdaysShort[i]:this.token==="dddd"?this.locales.weekdays[i]:n}}u.exports=s}),GF=ue((e,u)=>{var t=cr();class r extends t{constructor(s={}){super(s)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(s){this.date.setHours(parseInt(s.substr(-2)))}toString(){let s=this.date.getHours();if(/h/.test(this.token))s=s%12||12;return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),jF=ue((e,u)=>{var t=cr();class r extends t{constructor(s={}){super(s)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(s){this.date.setMilliseconds(parseInt(s.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}u.exports=r}),WF=ue((e,u)=>{var t=cr();class r extends t{constructor(s={}){super(s)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(s){this.date.setMinutes(parseInt(s.substr(-2)))}toString(){let s=this.date.getMinutes();return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),HF=ue((e,u)=>{var t=cr();class r extends t{constructor(s={}){super(s)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(s){s=parseInt(s.substr(-2))-1,this.date.setMonth(s<0?0:s)}toString(){let s=this.date.getMonth(),n=this.token.length;return n===2?String(s+1).padStart(2,"0"):n===3?this.locales.monthsShort[s]:n===4?this.locales.months[s]:String(s+1)}}u.exports=r}),QF=ue((e,u)=>{var t=cr();class r extends t{constructor(s={}){super(s)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(s){this.date.setSeconds(parseInt(s.substr(-2)))}toString(){let s=this.date.getSeconds();return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),YF=ue((e,u)=>{var t=cr();class r extends t{constructor(s={}){super(s)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(s){this.date.setFullYear(s.substr(-4))}toString(){let s=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?s.substr(-2):s}}u.exports=r}),zF=ue((e,u)=>{u.exports={DatePart:cr(),Meridiem:VF(),Day:KF(),Hours:GF(),Milliseconds:jF(),Minutes:WF(),Month:HF(),Seconds:QF(),Year:YF()}}),qF=ue((e,u)=>{function t(S,_,K,N,$,P,V){try{var k=S[P](V),W=k.value}catch(Q){K(Q);return}if(k.done)_(W);else Promise.resolve(W).then(N,$)}function r(S){return function(){var _=this,K=arguments;return new Promise(function(N,$){var P=S.apply(_,K);function V(W){t(P,N,$,V,k,"next",W)}function k(W){t(P,N,$,V,k,"throw",W)}V(void 0)})}}var s=gt(),n=Tr(),i=Hu(),l=i.style,o=i.clear,a=i.figures,D=mt(),h=D.erase,d=D.cursor,F=zF(),p=F.DatePart,f=F.Meridiem,m=F.Day,B=F.Hours,C=F.Milliseconds,c=F.Minutes,y=F.Month,A=F.Seconds,T=F.Year,I=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,v={1:({token:S})=>S.replace(/\\(.)/g,"$1"),2:(S)=>new m(S),3:(S)=>new y(S),4:(S)=>new T(S),5:(S)=>new f(S),6:(S)=>new B(S),7:(S)=>new c(S),8:(S)=>new A(S),9:(S)=>new C(S)},g={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class E extends n{constructor(S={}){super(S);this.msg=S.message,this.cursor=0,this.typed="",this.locales=Object.assign(g,S.locales),this._date=S.initial||new Date,this.errorMsg=S.error||"Please Enter A Valid Value",this.validator=S.validate||(()=>!0),this.mask=S.mask||"YYYY-MM-DD HH:mm:ss",this.clear=o("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(S){if(S)this._date.setTime(S.getTime())}set mask(S){let _;this.parts=[];while(_=I.exec(S)){let N=_.shift(),$=_.findIndex((P)=>P!=null);this.parts.push($ in v?v[$]({token:_[$]||N,date:this.date,parts:this.parts,locales:this.locales}):_[$]||N)}let K=this.parts.reduce((N,$)=>{if(typeof $==="string"&&typeof N[N.length-1]==="string")N[N.length-1]+=$;else N.push($);return N},[]);this.parts.splice(0),this.parts.push(...K),this.reset()}moveCursor(S){this.typed="",this.cursor=S,this.fire()}reset(){this.moveCursor(this.parts.findIndex((S)=>S instanceof p)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
426
|
-
`),this.close()}validate(){var S=this;return r(function*(){let _=yield S.validator(S.value);if(typeof _==="string")S.errorMsg=_,_=!1;S.error=!_})()}submit(){var S=this;return r(function*(){if(yield S.validate(),S.error){S.color="red",S.fire(),S.render();return}S.done=!0,S.aborted=!1,S.fire(),S.render(),S.out.write(`
|
|
427
|
-
`),S.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let S=this.parts[this.cursor].prev();if(S==null)return this.bell();this.moveCursor(this.parts.indexOf(S)),this.render()}right(){let S=this.parts[this.cursor].next();if(S==null)return this.bell();this.moveCursor(this.parts.indexOf(S)),this.render()}next(){let S=this.parts[this.cursor].next();this.moveCursor(S?this.parts.indexOf(S):this.parts.findIndex((_)=>_ instanceof p)),this.render()}_(S){if(/\d/.test(S))this.typed+=S,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(o(this.outputText,this.out.columns));if(super.render(),this.outputText=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(!1),this.parts.reduce((S,_,K)=>S.concat(K===this.cursor&&!this.done?s.cyan().underline(_.toString()):_),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split(`
|
|
428
|
-
`).reduce((S,_,K)=>S+`
|
|
429
|
-
${K?" ":a.pointerSmall} ${s.red().italic(_)}`,"");this.out.write(h.line+d.to(0)+this.outputText)}}u.exports=E}),xF=ue((e,u)=>{function t(C,c,y,A,T,I,v){try{var g=C[I](v),E=g.value}catch(S){y(S);return}if(g.done)c(E);else Promise.resolve(E).then(A,T)}function r(C){return function(){var c=this,y=arguments;return new Promise(function(A,T){var I=C.apply(c,y);function v(E){t(I,A,T,v,g,"next",E)}function g(E){t(I,A,T,v,g,"throw",E)}v(void 0)})}}var s=gt(),n=Tr(),i=mt(),l=i.cursor,o=i.erase,a=Hu(),D=a.style,h=a.figures,d=a.clear,F=a.lines,p=/[0-9]/,f=(C)=>C!==void 0,m=(C,c)=>{let y=Math.pow(10,c);return Math.round(C*y)/y};class B extends n{constructor(C={}){super(C);this.transform=D.render(C.style),this.msg=C.message,this.initial=f(C.initial)?C.initial:"",this.float=!!C.float,this.round=C.round||2,this.inc=C.increment||1,this.min=f(C.min)?C.min:-1/0,this.max=f(C.max)?C.max:1/0,this.errorMsg=C.error||"Please Enter A Valid Value",this.validator=C.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(C){if(!C&&C!==0)this.placeholder=!0,this.rendered=s.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${m(C,this.round)}`),this._value=m(C,this.round);this.fire()}get value(){return this._value}parse(C){return this.float?parseFloat(C):parseInt(C)}valid(C){return C==="-"||C==="."&&this.float||p.test(C)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let C=this.value;this.value=C!==""?C:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
430
|
-
`),this.close()}validate(){var C=this;return r(function*(){let c=yield C.validator(C.value);if(typeof c==="string")C.errorMsg=c,c=!1;C.error=!c})()}submit(){var C=this;return r(function*(){if(yield C.validate(),C.error){C.color="red",C.fire(),C.render();return}let c=C.value;C.value=c!==""?c:C.initial,C.done=!0,C.aborted=!1,C.error=!1,C.fire(),C.render(),C.out.write(`
|
|
431
|
-
`),C.close()})()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value==="")this.value=this.min+this.inc;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let C=this.value.toString();if(C.length===0)return this.bell();if(this.value=this.parse(C=C.slice(0,-1))||"",this.value!==""&&this.value<this.min)this.value=this.min;this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(C,c){if(!this.valid(C))return this.bell();let y=Date.now();if(y-this.lastHit>1000)this.typed="";if(this.typed+=C,this.lastHit=y,this.color="cyan",C===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(l.down(F(this.outputError,this.out.columns)-1)+d(this.outputError,this.out.columns));this.out.write(d(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[D.symbol(this.done,this.aborted),s.bold(this.msg),D.delimiter(this.done),!this.done||!this.done&&!this.placeholder?s[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split(`
|
|
432
|
-
`).reduce((C,c,y)=>C+`
|
|
433
|
-
${y?" ":h.pointerSmall} ${s.red().italic(c)}`,"");this.out.write(o.line+l.to(0)+this.outputText+l.save+this.outputError+l.restore)}}u.exports=B}),k1=ue((e,u)=>{var t=gt(),r=mt(),s=r.cursor,n=Tr(),i=Hu(),l=i.clear,o=i.figures,a=i.style,D=i.wrap,h=i.entriesToDisplay;class d extends n{constructor(F={}){super(F);if(this.msg=F.message,this.cursor=F.cursor||0,this.scrollIndex=F.cursor||0,this.hint=F.hint||"",this.warn=F.warn||"- This option is disabled -",this.minSelected=F.min,this.showMinError=!1,this.maxChoices=F.max,this.instructions=F.instructions,this.optionsPerPage=F.optionsPerPage||10,this.value=F.choices.map((p,f)=>{if(typeof p==="string")p={title:p,value:f};return{title:p&&(p.title||p.value||p),description:p&&p.description,value:p&&(p.value===void 0?f:p.value),selected:p&&p.selected,disabled:p&&p.disabled}}),this.clear=l("",this.out.columns),!F.overrideRender)this.render()}reset(){this.value.map((F)=>!F.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((F)=>F.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
434
|
-
`),this.close()}submit(){let F=this.value.filter((p)=>p.selected);if(this.minSelected&&F.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
435
|
-
`),this.close()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((F)=>F.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let F=this.value[this.cursor];if(F.selected)F.selected=!1,this.render();else if(F.disabled||this.value.filter((p)=>p.selected).length>=this.maxChoices)return this.bell();else F.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let F=!this.value[this.cursor].selected;this.value.filter((p)=>!p.disabled).forEach((p)=>p.selected=F),this.render()}_(F,p){if(F===" ")this.handleSpaceToggle();else if(F==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
436
|
-
Instructions:
|
|
437
|
-
${o.arrowUp}/${o.arrowDown}: Highlight option
|
|
438
|
-
${o.arrowLeft}/${o.arrowRight}/[space]: Toggle selection
|
|
439
|
-
`+(this.maxChoices===void 0?` a: Toggle all
|
|
440
|
-
`:"")+" enter/return: Complete answer"}return""}renderOption(F,p,f,m){let B=(p.selected?t.green(o.radioOn):o.radioOff)+" "+m+" ",C,c;if(p.disabled)C=F===f?t.gray().underline(p.title):t.strikethrough().gray(p.title);else if(C=F===f?t.cyan().underline(p.title):p.title,F===f&&p.description){if(c=` - ${p.description}`,B.length+C.length+c.length>=this.out.columns||p.description.split(/\r?\n/).length>1)c=`
|
|
441
|
-
`+D(p.description,{margin:B.length,width:this.out.columns})}return B+C+t.gray(c||"")}paginateOptions(F){if(F.length===0)return t.red("No matches for this query.");let p=h(this.cursor,F.length,this.optionsPerPage),f=p.startIndex,m=p.endIndex,B,C=[];for(let c=f;c<m;c++){if(c===f&&f>0)B=o.arrowUp;else if(c===m-1&&m<F.length)B=o.arrowDown;else B=" ";C.push(this.renderOption(this.cursor,F[c],c,B))}return`
|
|
442
|
-
`+C.join(`
|
|
443
|
-
`)}renderOptions(F){if(!this.done)return this.paginateOptions(F);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((p)=>p.selected).map((p)=>p.title).join(", ");let F=[t.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)F.push(t.yellow(this.warn));return F.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(s.hide);super.render();let F=[a.symbol(this.done,this.aborted),t.bold(this.msg),a.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)F+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;F+=this.renderOptions(this.value),this.out.write(this.clear+F),this.clear=l(F,this.out.columns)}}u.exports=d}),ZF=ue((e,u)=>{function t(c,y,A,T,I,v,g){try{var E=c[v](g),S=E.value}catch(_){A(_);return}if(E.done)y(S);else Promise.resolve(S).then(T,I)}function r(c){return function(){var y=this,A=arguments;return new Promise(function(T,I){var v=c.apply(y,A);function g(S){t(v,T,I,g,E,"next",S)}function E(S){t(v,T,I,g,E,"throw",S)}g(void 0)})}}var s=gt(),n=Tr(),i=mt(),l=i.erase,o=i.cursor,a=Hu(),D=a.style,h=a.clear,d=a.figures,F=a.wrap,p=a.entriesToDisplay,f=(c,y)=>c[y]&&(c[y].value||c[y].title||c[y]),m=(c,y)=>c[y]&&(c[y].title||c[y].value||c[y]),B=(c,y)=>{let A=c.findIndex((T)=>T.value===y||T.title===y);return A>-1?A:void 0};class C extends n{constructor(c={}){super(c);this.msg=c.message,this.suggest=c.suggest,this.choices=c.choices,this.initial=typeof c.initial==="number"?c.initial:B(c.choices,c.initial),this.select=this.initial||c.cursor||0,this.i18n={noMatches:c.noMatches||"no matches found"},this.fallback=c.fallback||this.initial,this.clearFirst=c.clearFirst||!1,this.suggestions=[],this.input="",this.limit=c.limit||10,this.cursor=0,this.transform=D.render(c.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=h("",this.out.columns),this.complete(this.render),this.render()}set fallback(c){this._fb=Number.isSafeInteger(parseInt(c))?parseInt(c):c}get fallback(){let c;if(typeof this._fb==="number")c=this.choices[this._fb];else if(typeof this._fb==="string")c={title:this._fb};return c||this._fb||{title:this.i18n.noMatches}}moveSelect(c){if(this.select=c,this.suggestions.length>0)this.value=f(this.suggestions,c);else this.value=this.fallback.value;this.fire()}complete(c){var y=this;return r(function*(){let A=y.completing=y.suggest(y.input,y.choices),T=yield A;if(y.completing!==A)return;y.suggestions=T.map((v,g,E)=>({title:m(E,g),value:f(E,g),description:v.description})),y.completing=!1;let I=Math.max(T.length-1,0);y.moveSelect(Math.min(I,y.select)),c&&c()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
444
|
-
`),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
445
|
-
`),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
446
|
-
`),this.close()}_(c,y){let A=this.input.slice(0,this.cursor),T=this.input.slice(this.cursor);this.input=`${A}${c}${T}`,this.cursor=A.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let c=this.input.slice(0,this.cursor-1),y=this.input.slice(this.cursor);this.input=`${c}${y}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let c=this.input.slice(0,this.cursor),y=this.input.slice(this.cursor+1);this.input=`${c}${y}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(c,y,A,T){let I,v=A?d.arrowUp:T?d.arrowDown:" ",g=y?s.cyan().underline(c.title):c.title;if(v=(y?s.cyan(d.pointer)+" ":" ")+v,c.description){if(I=` - ${c.description}`,v.length+g.length+I.length>=this.out.columns||c.description.split(/\r?\n/).length>1)I=`
|
|
447
|
-
`+F(c.description,{margin:3,width:this.out.columns})}return v+" "+g+s.gray(I||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(o.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();let c=p(this.select,this.choices.length,this.limit),y=c.startIndex,A=c.endIndex;if(this.outputText=[D.symbol(this.done,this.aborted,this.exited),s.bold(this.msg),D.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let T=this.suggestions.slice(y,A).map((I,v)=>this.renderOption(I,this.select===v+y,v===0&&y>0,v+y===A-1&&A<this.choices.length)).join(`
|
|
448
|
-
`);this.outputText+=`
|
|
449
|
-
`+(T||s.gray(this.fallback.title))}this.out.write(l.line+o.to(0)+this.outputText)}}u.exports=C}),XF=ue((e,u)=>{var t=gt(),r=mt(),s=r.cursor,n=k1(),i=Hu(),l=i.clear,o=i.style,a=i.figures;class D extends n{constructor(h={}){h.overrideRender=!0;super(h);this.inputValue="",this.clear=l("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((h)=>h.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){let h=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((F)=>{if(this.inputValue){if(typeof F.title==="string"){if(F.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof F.value==="string"){if(F.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});let d=this.filteredOptions.findIndex((F)=>F===h);this.cursor=d<0?0:d,this.render()}handleSpaceToggle(){let h=this.filteredOptions[this.cursor];if(h.selected)h.selected=!1,this.render();else if(h.disabled||this.value.filter((d)=>d.selected).length>=this.maxChoices)return this.bell();else h.selected=!0,this.render()}handleInputChange(h){this.inputValue=this.inputValue+h,this.updateFilteredOptions()}_(h,d){if(h===" ")this.handleSpaceToggle();else this.handleInputChange(h)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
450
|
-
Instructions:
|
|
451
|
-
${a.arrowUp}/${a.arrowDown}: Highlight option
|
|
452
|
-
${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection
|
|
453
|
-
[a,b,c]/delete: Filter choices
|
|
454
|
-
enter/return: Complete answer
|
|
455
|
-
`}return""}renderCurrentInput(){return`
|
|
456
|
-
Filtered results for: ${this.inputValue?this.inputValue:t.gray("Enter something to filter")}
|
|
457
|
-
`}renderOption(h,d,F){let p;if(d.disabled)p=h===F?t.gray().underline(d.title):t.strikethrough().gray(d.title);else p=h===F?t.cyan().underline(d.title):d.title;return(d.selected?t.green(a.radioOn):a.radioOff)+" "+p}renderDoneOrInstructions(){if(this.done)return this.value.filter((d)=>d.selected).map((d)=>d.title).join(", ");let h=[t.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)h.push(t.yellow(this.warn));return h.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(s.hide);super.render();let h=[o.symbol(this.done,this.aborted),t.bold(this.msg),o.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)h+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;h+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+h),this.clear=l(h,this.out.columns)}}u.exports=D}),JF=ue((e,u)=>{var t=gt(),r=Tr(),s=Hu(),n=s.style,i=s.clear,l=mt(),o=l.erase,a=l.cursor;class D extends r{constructor(h={}){super(h);this.msg=h.message,this.value=h.initial,this.initialValue=!!h.initial,this.yesMsg=h.yes||"yes",this.yesOption=h.yesOption||"(Y/n)",this.noMsg=h.no||"no",this.noOption=h.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
458
|
-
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
459
|
-
`),this.close()}_(h,d){if(h.toLowerCase()==="y")return this.value=!0,this.submit();if(h.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);else this.out.write(i(this.outputText,this.out.columns));super.render(),this.outputText=[n.symbol(this.done,this.aborted),t.bold(this.msg),n.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:t.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(o.line+a.to(0)+this.outputText)}}u.exports=D}),eA=ue((e,u)=>{u.exports={TextPrompt:PF(),SelectPrompt:MF(),TogglePrompt:kF(),DatePrompt:qF(),NumberPrompt:xF(),MultiselectPrompt:k1(),AutocompletePrompt:ZF(),AutocompleteMultiselectPrompt:XF(),ConfirmPrompt:JF()}}),tA=ue((e)=>{var u=e,t=eA(),r=(i)=>i;function s(i,l,o={}){return new Promise((a,D)=>{let h=new t[i](l),d=o.onAbort||r,F=o.onSubmit||r,p=o.onExit||r;h.on("state",l.onState||r),h.on("submit",(f)=>a(F(f))),h.on("exit",(f)=>a(p(f))),h.on("abort",(f)=>D(d(f)))})}u.text=(i)=>s("TextPrompt",i),u.password=(i)=>{return i.style="password",u.text(i)},u.invisible=(i)=>{return i.style="invisible",u.text(i)},u.number=(i)=>s("NumberPrompt",i),u.date=(i)=>s("DatePrompt",i),u.confirm=(i)=>s("ConfirmPrompt",i),u.list=(i)=>{let l=i.separator||",";return s("TextPrompt",i,{onSubmit:(o)=>o.split(l).map((a)=>a.trim())})},u.toggle=(i)=>s("TogglePrompt",i),u.select=(i)=>s("SelectPrompt",i),u.multiselect=(i)=>{i.choices=[].concat(i.choices||[]);let l=(o)=>o.filter((a)=>a.selected).map((a)=>a.value);return s("MultiselectPrompt",i,{onAbort:l,onSubmit:l})},u.autocompleteMultiselect=(i)=>{i.choices=[].concat(i.choices||[]);let l=(o)=>o.filter((a)=>a.selected).map((a)=>a.value);return s("AutocompleteMultiselectPrompt",i,{onAbort:l,onSubmit:l})};var n=(i,l)=>Promise.resolve(l.filter((o)=>o.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));u.autocomplete=(i)=>{return i.suggest=i.suggest||n,i.choices=[].concat(i.choices||[]),s("AutocompletePrompt",i)}}),uA=ue((e,u)=>{function t(C,c){var y=Object.keys(C);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(C);if(c)A=A.filter(function(T){return Object.getOwnPropertyDescriptor(C,T).enumerable});y.push.apply(y,A)}return y}function r(C){for(var c=1;c<arguments.length;c++){var y=arguments[c]!=null?arguments[c]:{};if(c%2)t(Object(y),!0).forEach(function(A){s(C,A,y[A])});else if(Object.getOwnPropertyDescriptors)Object.defineProperties(C,Object.getOwnPropertyDescriptors(y));else t(Object(y)).forEach(function(A){Object.defineProperty(C,A,Object.getOwnPropertyDescriptor(y,A))})}return C}function s(C,c,y){if(c in C)Object.defineProperty(C,c,{value:y,enumerable:!0,configurable:!0,writable:!0});else C[c]=y;return C}function n(C,c){var y=typeof Symbol!=="undefined"&&C[Symbol.iterator]||C["@@iterator"];if(!y){if(Array.isArray(C)||(y=i(C))||c&&C&&typeof C.length==="number"){if(y)C=y;var A=0,T=function E(){};return{s:T,n:function E(){if(A>=C.length)return{done:!0};return{done:!1,value:C[A++]}},e:function E(S){throw S},f:T}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
460
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I=!0,v=!1,g;return{s:function E(){y=y.call(C)},n:function E(){var S=y.next();return I=S.done,S},e:function E(S){v=!0,g=S},f:function E(){try{if(!I&&y.return!=null)y.return()}finally{if(v)throw g}}}}function i(C,c){if(!C)return;if(typeof C==="string")return l(C,c);var y=Object.prototype.toString.call(C).slice(8,-1);if(y==="Object"&&C.constructor)y=C.constructor.name;if(y==="Map"||y==="Set")return Array.from(C);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return l(C,c)}function l(C,c){if(c==null||c>C.length)c=C.length;for(var y=0,A=new Array(c);y<c;y++)A[y]=C[y];return A}function o(C,c,y,A,T,I,v){try{var g=C[I](v),E=g.value}catch(S){y(S);return}if(g.done)c(E);else Promise.resolve(E).then(A,T)}function a(C){return function(){var c=this,y=arguments;return new Promise(function(A,T){var I=C.apply(c,y);function v(E){o(I,A,T,v,g,"next",E)}function g(E){o(I,A,T,v,g,"throw",E)}v(void 0)})}}var D=tA(),h=["suggest","format","onState","validate","onRender","type"],d=()=>{};function F(){return p.apply(this,arguments)}function p(){return p=a(function*(C=[],{onSubmit:c=d,onCancel:y=d}={}){let A={},T=F._override||{};C=[].concat(C);let I,v,g,E,S,_,K=function(){var k=a(function*(W,Q,z=!1){if(!z&&W.validate&&W.validate(Q)!==!0)return;return W.format?yield W.format(Q,A):Q});return function W(Q,z){return k.apply(this,arguments)}}();var N=n(C),$;try{for(N.s();!($=N.n()).done;){v=$.value;var P=v;if(E=P.name,S=P.type,typeof S==="function")S=yield S(I,r({},A),v),v.type=S;if(!S)continue;for(let k in v){if(h.includes(k))continue;let W=v[k];v[k]=typeof W==="function"?yield W(I,r({},A),_):W}if(_=v,typeof v.message!=="string")throw new Error("prompt message is required");var V=v;if(E=V.name,S=V.type,D[S]===void 0)throw new Error(`prompt type (${S}) is not defined`);if(T[v.name]!==void 0){if(I=yield K(v,T[v.name]),I!==void 0){A[E]=I;continue}}try{I=F._injected?f(F._injected,v.initial):yield D[S](v),A[E]=I=yield K(v,I,!0),g=yield c(v,I,A)}catch(k){g=!(yield y(v,A))}if(g)return A}}catch(k){N.e(k)}finally{N.f()}return A}),p.apply(this,arguments)}function f(C,c){let y=C.shift();if(y instanceof Error)throw y;return y===void 0?c:y}function m(C){F._injected=(F._injected||[]).concat(C)}function B(C){F._override=Object.assign({},C)}u.exports=Object.assign(F,{prompt:F,prompts:D,inject:m,override:B})}),rA=ue((e,u)=>{u.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return!1}}),V0=ue((e,u)=>{u.exports=(t)=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),s=new RegExp(r,"g");return typeof t==="string"?t.replace(s,""):t}}),iA=ue((e,u)=>{var t=V0(),{erase:r,cursor:s}=mt(),n=(i)=>[...t(i)].length;u.exports=function(i,l){if(!l)return r.line+s.to(0);let o=0,a=i.split(/\r?\n/);for(let D of a)o+=1+Math.floor(Math.max(n(D)-1,0)/l);return r.lines(o)}}),V1=ue((e,u)=>{var t={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},r={arrowUp:t.arrowUp,arrowDown:t.arrowDown,arrowLeft:t.arrowLeft,arrowRight:t.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"},s=process.platform==="win32"?r:t;u.exports=s}),sA=ue((e,u)=>{var t=gt(),r=V1(),s=Object.freeze({password:{scale:1,render:(D)=>"*".repeat(D.length)},emoji:{scale:2,render:(D)=>"\uD83D\uDE03".repeat(D.length)},invisible:{scale:0,render:(D)=>""},default:{scale:1,render:(D)=>`${D}`}}),n=(D)=>s[D]||s.default,i=Object.freeze({aborted:t.red(r.cross),done:t.green(r.tick),exited:t.yellow(r.cross),default:t.cyan("?")}),l=(D,h,d)=>h?i.aborted:d?i.exited:D?i.done:i.default,o=(D)=>t.gray(D?r.ellipsis:r.pointerSmall),a=(D,h)=>t.gray(D?h?r.pointerSmall:"+":r.line);u.exports={styles:s,render:n,symbols:i,symbol:l,delimiter:o,item:a}}),nA=ue((e,u)=>{var t=V0();u.exports=function(r,s){let n=String(t(r)||"").split(/\r?\n/);if(!s)return n.length;return n.map((i)=>Math.ceil(i.length/s)).reduce((i,l)=>i+l)}}),aA=ue((e,u)=>{u.exports=(t,r={})=>{let s=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"",n=r.width;return(t||"").split(/\r?\n/g).map((i)=>i.split(/\s+/g).reduce((l,o)=>{if(o.length+s.length>=n||l[l.length-1].length+o.length+1<n)l[l.length-1]+=` ${o}`;else l.push(`${s}${o}`);return l},[s]).join(`
|
|
461
|
-
`)).join(`
|
|
462
|
-
`)}}),hA=ue((e,u)=>{u.exports=(t,r,s)=>{s=s||r;let n=Math.min(r-s,t-Math.floor(s/2));if(n<0)n=0;let i=Math.min(n+s,r);return{startIndex:n,endIndex:i}}}),Qu=ue((e,u)=>{u.exports={action:rA(),clear:iA(),style:sA(),strip:V0(),figures:V1(),lines:nA(),wrap:aA(),entriesToDisplay:hA()}}),wr=ue((e,u)=>{var t=import.meta.require("readline"),{action:r}=Qu(),s=import.meta.require("events"),{beep:n,cursor:i}=mt(),l=gt();class o extends s{constructor(a={}){super();this.firstRender=!0,this.in=a.stdin||process.stdin,this.out=a.stdout||process.stdout,this.onRender=(a.onRender||(()=>{return})).bind(this);let D=t.createInterface({input:this.in,escapeCodeTimeout:50});if(t.emitKeypressEvents(this.in,D),this.in.isTTY)this.in.setRawMode(!0);let h=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,d=(F,p)=>{let f=r(p,h);if(f===!1)this._&&this._(F,p);else if(typeof this[f]==="function")this[f](p);else this.bell()};this.close=()=>{if(this.out.write(i.show),this.in.removeListener("keypress",d),this.in.isTTY)this.in.setRawMode(!1);D.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",d)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(n)}render(){if(this.onRender(l),this.firstRender)this.firstRender=!1}}u.exports=o}),lA=ue((e,u)=>{var t=gt(),r=wr(),{erase:s,cursor:n}=mt(),{style:i,clear:l,lines:o,figures:a}=Qu();class D extends r{constructor(h={}){super(h);this.transform=i.render(h.style),this.scale=this.transform.scale,this.msg=h.message,this.initial=h.initial||"",this.validator=h.validate||(()=>!0),this.value="",this.errorMsg=h.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=l("",this.out.columns),this.render()}set value(h){if(!h&&this.initial)this.placeholder=!0,this.rendered=t.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(h);this._value=h,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
|
|
463
|
-
`),this.close()}async validate(){let h=await this.validator(this.value);if(typeof h==="string")this.errorMsg=h,h=!1;this.error=!h}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
464
|
-
`),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(h){if(this.placeholder)return;this.cursor=this.cursor+h,this.cursorOffset+=h}_(h,d){let F=this.value.slice(0,this.cursor),p=this.value.slice(this.cursor);this.value=`${F}${h}${p}`,this.red=!1,this.cursor=this.placeholder?0:F.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let h=this.value.slice(0,this.cursor-1),d=this.value.slice(this.cursor);if(this.value=`${h}${d}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let h=this.value.slice(0,this.cursor),d=this.value.slice(this.cursor+1);if(this.value=`${h}${d}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else this.cursorOffset++;this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(n.down(o(this.outputError,this.out.columns)-1)+l(this.outputError,this.out.columns));this.out.write(l(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(this.done),this.red?t.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split(`
|
|
465
|
-
`).reduce((h,d,F)=>h+`
|
|
466
|
-
${F?" ":a.pointerSmall} ${t.red().italic(d)}`,"");this.out.write(s.line+n.to(0)+this.outputText+n.save+this.outputError+n.restore+n.move(this.cursorOffset,0))}}u.exports=D}),oA=ue((e,u)=>{var t=gt(),r=wr(),{style:s,clear:n,figures:i,wrap:l,entriesToDisplay:o}=Qu(),{cursor:a}=mt();class D extends r{constructor(h={}){super(h);this.msg=h.message,this.hint=h.hint||"- Use arrow-keys. Return to submit.",this.warn=h.warn||"- This option is disabled",this.cursor=h.initial||0,this.choices=h.choices.map((d,F)=>{if(typeof d==="string")d={title:d,value:F};return{title:d&&(d.title||d.value||d),value:d&&(d.value===void 0?F:d.value),description:d&&d.description,selected:d&&d.selected,disabled:d&&d.disabled}}),this.optionsPerPage=h.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=n("",this.out.columns),this.render()}moveCursor(h){this.cursor=h,this.value=this.choices[h].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
467
|
-
`),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
468
|
-
`),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(h,d){if(h===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);else this.out.write(n(this.outputText,this.out.columns));super.render();let{startIndex:h,endIndex:d}=o(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[s.symbol(this.done,this.aborted),t.bold(this.msg),s.delimiter(!1),this.done?this.selection.title:this.selection.disabled?t.yellow(this.warn):t.gray(this.hint)].join(" "),!this.done){this.outputText+=`
|
|
469
|
-
`;for(let F=h;F<d;F++){let p,f,m="",B=this.choices[F];if(F===h&&h>0)f=i.arrowUp;else if(F===d-1&&d<this.choices.length)f=i.arrowDown;else f=" ";if(B.disabled)p=this.cursor===F?t.gray().underline(B.title):t.strikethrough().gray(B.title),f=(this.cursor===F?t.bold().gray(i.pointer)+" ":" ")+f;else if(p=this.cursor===F?t.cyan().underline(B.title):B.title,f=(this.cursor===F?t.cyan(i.pointer)+" ":" ")+f,B.description&&this.cursor===F){if(m=` - ${B.description}`,f.length+p.length+m.length>=this.out.columns||B.description.split(/\r?\n/).length>1)m=`
|
|
470
|
-
`+l(B.description,{margin:3,width:this.out.columns})}this.outputText+=`${f} ${p}${t.gray(m)}
|
|
471
|
-
`}}this.out.write(this.outputText)}}u.exports=D}),cA=ue((e,u)=>{var t=gt(),r=wr(),{style:s,clear:n}=Qu(),{cursor:i,erase:l}=mt();class o extends r{constructor(a={}){super(a);this.msg=a.message,this.value=!!a.initial,this.active=a.active||"on",this.inactive=a.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
472
|
-
`),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
473
|
-
`),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(a,D){if(a===" ")this.value=!this.value;else if(a==="1")this.value=!0;else if(a==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);else this.out.write(n(this.outputText,this.out.columns));super.render(),this.outputText=[s.symbol(this.done,this.aborted),t.bold(this.msg),s.delimiter(this.done),this.value?this.inactive:t.cyan().underline(this.inactive),t.gray("/"),this.value?t.cyan().underline(this.active):this.active].join(" "),this.out.write(l.line+i.to(0)+this.outputText)}}u.exports=o}),Dr=ue((e,u)=>{class t{constructor({token:r,date:s,parts:n,locales:i}){this.token=r,this.date=s||new Date,this.parts=n||[this],this.locales=i||{}}up(){}down(){}next(){let r=this.parts.indexOf(this);return this.parts.find((s,n)=>n>r&&s instanceof t)}setTo(r){}prev(){let r=[].concat(this.parts).reverse(),s=r.indexOf(this);return r.find((n,i)=>i>s&&n instanceof t)}toString(){return String(this.date)}}u.exports=t}),DA=ue((e,u)=>{var t=Dr();class r extends t{constructor(s={}){super(s)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let s=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?s.toUpperCase():s}}u.exports=r}),fA=ue((e,u)=>{var t=Dr(),r=(n)=>{return n=n%10,n===1?"st":n===2?"nd":n===3?"rd":"th"};class s extends t{constructor(n={}){super(n)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(n){this.date.setDate(parseInt(n.substr(-2)))}toString(){let n=this.date.getDate(),i=this.date.getDay();return this.token==="DD"?String(n).padStart(2,"0"):this.token==="Do"?n+r(n):this.token==="d"?i+1:this.token==="ddd"?this.locales.weekdaysShort[i]:this.token==="dddd"?this.locales.weekdays[i]:n}}u.exports=s}),dA=ue((e,u)=>{var t=Dr();class r extends t{constructor(s={}){super(s)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(s){this.date.setHours(parseInt(s.substr(-2)))}toString(){let s=this.date.getHours();if(/h/.test(this.token))s=s%12||12;return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),EA=ue((e,u)=>{var t=Dr();class r extends t{constructor(s={}){super(s)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(s){this.date.setMilliseconds(parseInt(s.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}u.exports=r}),CA=ue((e,u)=>{var t=Dr();class r extends t{constructor(s={}){super(s)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(s){this.date.setMinutes(parseInt(s.substr(-2)))}toString(){let s=this.date.getMinutes();return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),pA=ue((e,u)=>{var t=Dr();class r extends t{constructor(s={}){super(s)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(s){s=parseInt(s.substr(-2))-1,this.date.setMonth(s<0?0:s)}toString(){let s=this.date.getMonth(),n=this.token.length;return n===2?String(s+1).padStart(2,"0"):n===3?this.locales.monthsShort[s]:n===4?this.locales.months[s]:String(s+1)}}u.exports=r}),gA=ue((e,u)=>{var t=Dr();class r extends t{constructor(s={}){super(s)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(s){this.date.setSeconds(parseInt(s.substr(-2)))}toString(){let s=this.date.getSeconds();return this.token.length>1?String(s).padStart(2,"0"):s}}u.exports=r}),mA=ue((e,u)=>{var t=Dr();class r extends t{constructor(s={}){super(s)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(s){this.date.setFullYear(s.substr(-4))}toString(){let s=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?s.substr(-2):s}}u.exports=r}),yA=ue((e,u)=>{u.exports={DatePart:Dr(),Meridiem:DA(),Day:fA(),Hours:dA(),Milliseconds:EA(),Minutes:CA(),Month:pA(),Seconds:gA(),Year:mA()}}),FA=ue((e,u)=>{var t=gt(),r=wr(),{style:s,clear:n,figures:i}=Qu(),{erase:l,cursor:o}=mt(),{DatePart:a,Meridiem:D,Day:h,Hours:d,Milliseconds:F,Minutes:p,Month:f,Seconds:m,Year:B}=yA(),C=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,c={1:({token:T})=>T.replace(/\\(.)/g,"$1"),2:(T)=>new h(T),3:(T)=>new f(T),4:(T)=>new B(T),5:(T)=>new D(T),6:(T)=>new d(T),7:(T)=>new p(T),8:(T)=>new m(T),9:(T)=>new F(T)},y={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class A extends r{constructor(T={}){super(T);this.msg=T.message,this.cursor=0,this.typed="",this.locales=Object.assign(y,T.locales),this._date=T.initial||new Date,this.errorMsg=T.error||"Please Enter A Valid Value",this.validator=T.validate||(()=>!0),this.mask=T.mask||"YYYY-MM-DD HH:mm:ss",this.clear=n("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(T){if(T)this._date.setTime(T.getTime())}set mask(T){let I;this.parts=[];while(I=C.exec(T)){let g=I.shift(),E=I.findIndex((S)=>S!=null);this.parts.push(E in c?c[E]({token:I[E]||g,date:this.date,parts:this.parts,locales:this.locales}):I[E]||g)}let v=this.parts.reduce((g,E)=>{if(typeof E==="string"&&typeof g[g.length-1]==="string")g[g.length-1]+=E;else g.push(E);return g},[]);this.parts.splice(0),this.parts.push(...v),this.reset()}moveCursor(T){this.typed="",this.cursor=T,this.fire()}reset(){this.moveCursor(this.parts.findIndex((T)=>T instanceof a)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
474
|
-
`),this.close()}async validate(){let T=await this.validator(this.value);if(typeof T==="string")this.errorMsg=T,T=!1;this.error=!T}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
475
|
-
`),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let T=this.parts[this.cursor].prev();if(T==null)return this.bell();this.moveCursor(this.parts.indexOf(T)),this.render()}right(){let T=this.parts[this.cursor].next();if(T==null)return this.bell();this.moveCursor(this.parts.indexOf(T)),this.render()}next(){let T=this.parts[this.cursor].next();this.moveCursor(T?this.parts.indexOf(T):this.parts.findIndex((I)=>I instanceof a)),this.render()}_(T){if(/\d/.test(T))this.typed+=T,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(o.hide);else this.out.write(n(this.outputText,this.out.columns));if(super.render(),this.outputText=[s.symbol(this.done,this.aborted),t.bold(this.msg),s.delimiter(!1),this.parts.reduce((T,I,v)=>T.concat(v===this.cursor&&!this.done?t.cyan().underline(I.toString()):I),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split(`
|
|
476
|
-
`).reduce((T,I,v)=>T+`
|
|
477
|
-
${v?" ":i.pointerSmall} ${t.red().italic(I)}`,"");this.out.write(l.line+o.to(0)+this.outputText)}}u.exports=A}),AA=ue((e,u)=>{var t=gt(),r=wr(),{cursor:s,erase:n}=mt(),{style:i,figures:l,clear:o,lines:a}=Qu(),D=/[0-9]/,h=(p)=>p!==void 0,d=(p,f)=>{let m=Math.pow(10,f);return Math.round(p*m)/m};class F extends r{constructor(p={}){super(p);this.transform=i.render(p.style),this.msg=p.message,this.initial=h(p.initial)?p.initial:"",this.float=!!p.float,this.round=p.round||2,this.inc=p.increment||1,this.min=h(p.min)?p.min:-1/0,this.max=h(p.max)?p.max:1/0,this.errorMsg=p.error||"Please Enter A Valid Value",this.validator=p.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(p){if(!p&&p!==0)this.placeholder=!0,this.rendered=t.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${d(p,this.round)}`),this._value=d(p,this.round);this.fire()}get value(){return this._value}parse(p){return this.float?parseFloat(p):parseInt(p)}valid(p){return p==="-"||p==="."&&this.float||D.test(p)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let p=this.value;this.value=p!==""?p:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
478
|
-
`),this.close()}async validate(){let p=await this.validator(this.value);if(typeof p==="string")this.errorMsg=p,p=!1;this.error=!p}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let p=this.value;this.value=p!==""?p:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
479
|
-
`),this.close()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value==="")this.value=this.min+this.inc;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let p=this.value.toString();if(p.length===0)return this.bell();if(this.value=this.parse(p=p.slice(0,-1))||"",this.value!==""&&this.value<this.min)this.value=this.min;this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(p,f){if(!this.valid(p))return this.bell();let m=Date.now();if(m-this.lastHit>1000)this.typed="";if(this.typed+=p,this.lastHit=m,this.color="cyan",p===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(s.down(a(this.outputError,this.out.columns)-1)+o(this.outputError,this.out.columns));this.out.write(o(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(this.done),!this.done||!this.done&&!this.placeholder?t[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split(`
|
|
480
|
-
`).reduce((p,f,m)=>p+`
|
|
481
|
-
${m?" ":l.pointerSmall} ${t.red().italic(f)}`,"");this.out.write(n.line+s.to(0)+this.outputText+s.save+this.outputError+s.restore)}}u.exports=F}),K1=ue((e,u)=>{var t=gt(),{cursor:r}=mt(),s=wr(),{clear:n,figures:i,style:l,wrap:o,entriesToDisplay:a}=Qu();class D extends s{constructor(h={}){super(h);if(this.msg=h.message,this.cursor=h.cursor||0,this.scrollIndex=h.cursor||0,this.hint=h.hint||"",this.warn=h.warn||"- This option is disabled -",this.minSelected=h.min,this.showMinError=!1,this.maxChoices=h.max,this.instructions=h.instructions,this.optionsPerPage=h.optionsPerPage||10,this.value=h.choices.map((d,F)=>{if(typeof d==="string")d={title:d,value:F};return{title:d&&(d.title||d.value||d),description:d&&d.description,value:d&&(d.value===void 0?F:d.value),selected:d&&d.selected,disabled:d&&d.disabled}}),this.clear=n("",this.out.columns),!h.overrideRender)this.render()}reset(){this.value.map((h)=>!h.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((h)=>h.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
482
|
-
`),this.close()}submit(){let h=this.value.filter((d)=>d.selected);if(this.minSelected&&h.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
483
|
-
`),this.close()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((h)=>h.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let h=this.value[this.cursor];if(h.selected)h.selected=!1,this.render();else if(h.disabled||this.value.filter((d)=>d.selected).length>=this.maxChoices)return this.bell();else h.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let h=!this.value[this.cursor].selected;this.value.filter((d)=>!d.disabled).forEach((d)=>d.selected=h),this.render()}_(h,d){if(h===" ")this.handleSpaceToggle();else if(h==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
484
|
-
Instructions:
|
|
485
|
-
${i.arrowUp}/${i.arrowDown}: Highlight option
|
|
486
|
-
${i.arrowLeft}/${i.arrowRight}/[space]: Toggle selection
|
|
487
|
-
`+(this.maxChoices===void 0?` a: Toggle all
|
|
488
|
-
`:"")+" enter/return: Complete answer"}return""}renderOption(h,d,F,p){let f=(d.selected?t.green(i.radioOn):i.radioOff)+" "+p+" ",m,B;if(d.disabled)m=h===F?t.gray().underline(d.title):t.strikethrough().gray(d.title);else if(m=h===F?t.cyan().underline(d.title):d.title,h===F&&d.description){if(B=` - ${d.description}`,f.length+m.length+B.length>=this.out.columns||d.description.split(/\r?\n/).length>1)B=`
|
|
489
|
-
`+o(d.description,{margin:f.length,width:this.out.columns})}return f+m+t.gray(B||"")}paginateOptions(h){if(h.length===0)return t.red("No matches for this query.");let{startIndex:d,endIndex:F}=a(this.cursor,h.length,this.optionsPerPage),p,f=[];for(let m=d;m<F;m++){if(m===d&&d>0)p=i.arrowUp;else if(m===F-1&&F<h.length)p=i.arrowDown;else p=" ";f.push(this.renderOption(this.cursor,h[m],m,p))}return`
|
|
490
|
-
`+f.join(`
|
|
491
|
-
`)}renderOptions(h){if(!this.done)return this.paginateOptions(h);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((d)=>d.selected).map((d)=>d.title).join(", ");let h=[t.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)h.push(t.yellow(this.warn));return h.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(r.hide);super.render();let h=[l.symbol(this.done,this.aborted),t.bold(this.msg),l.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)h+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;h+=this.renderOptions(this.value),this.out.write(this.clear+h),this.clear=n(h,this.out.columns)}}u.exports=D}),vA=ue((e,u)=>{var t=gt(),r=wr(),{erase:s,cursor:n}=mt(),{style:i,clear:l,figures:o,wrap:a,entriesToDisplay:D}=Qu(),h=(f,m)=>f[m]&&(f[m].value||f[m].title||f[m]),d=(f,m)=>f[m]&&(f[m].title||f[m].value||f[m]),F=(f,m)=>{let B=f.findIndex((C)=>C.value===m||C.title===m);return B>-1?B:void 0};class p extends r{constructor(f={}){super(f);this.msg=f.message,this.suggest=f.suggest,this.choices=f.choices,this.initial=typeof f.initial==="number"?f.initial:F(f.choices,f.initial),this.select=this.initial||f.cursor||0,this.i18n={noMatches:f.noMatches||"no matches found"},this.fallback=f.fallback||this.initial,this.clearFirst=f.clearFirst||!1,this.suggestions=[],this.input="",this.limit=f.limit||10,this.cursor=0,this.transform=i.render(f.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=l("",this.out.columns),this.complete(this.render),this.render()}set fallback(f){this._fb=Number.isSafeInteger(parseInt(f))?parseInt(f):f}get fallback(){let f;if(typeof this._fb==="number")f=this.choices[this._fb];else if(typeof this._fb==="string")f={title:this._fb};return f||this._fb||{title:this.i18n.noMatches}}moveSelect(f){if(this.select=f,this.suggestions.length>0)this.value=h(this.suggestions,f);else this.value=this.fallback.value;this.fire()}async complete(f){let m=this.completing=this.suggest(this.input,this.choices),B=await m;if(this.completing!==m)return;this.suggestions=B.map((c,y,A)=>({title:d(A,y),value:h(A,y),description:c.description})),this.completing=!1;let C=Math.max(B.length-1,0);this.moveSelect(Math.min(C,this.select)),f&&f()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
492
|
-
`),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
493
|
-
`),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
494
|
-
`),this.close()}_(f,m){let B=this.input.slice(0,this.cursor),C=this.input.slice(this.cursor);this.input=`${B}${f}${C}`,this.cursor=B.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let f=this.input.slice(0,this.cursor-1),m=this.input.slice(this.cursor);this.input=`${f}${m}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let f=this.input.slice(0,this.cursor),m=this.input.slice(this.cursor+1);this.input=`${f}${m}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(f,m,B,C){let c,y=B?o.arrowUp:C?o.arrowDown:" ",A=m?t.cyan().underline(f.title):f.title;if(y=(m?t.cyan(o.pointer)+" ":" ")+y,f.description){if(c=` - ${f.description}`,y.length+A.length+c.length>=this.out.columns||f.description.split(/\r?\n/).length>1)c=`
|
|
495
|
-
`+a(f.description,{margin:3,width:this.out.columns})}return y+" "+A+t.gray(c||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);else this.out.write(l(this.outputText,this.out.columns));super.render();let{startIndex:f,endIndex:m}=D(this.select,this.choices.length,this.limit);if(this.outputText=[i.symbol(this.done,this.aborted,this.exited),t.bold(this.msg),i.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let B=this.suggestions.slice(f,m).map((C,c)=>this.renderOption(C,this.select===c+f,c===0&&f>0,c+f===m-1&&m<this.choices.length)).join(`
|
|
496
|
-
`);this.outputText+=`
|
|
497
|
-
`+(B||t.gray(this.fallback.title))}this.out.write(s.line+n.to(0)+this.outputText)}}u.exports=p}),BA=ue((e,u)=>{var t=gt(),{cursor:r}=mt(),s=K1(),{clear:n,style:i,figures:l}=Qu();class o extends s{constructor(a={}){a.overrideRender=!0;super(a);this.inputValue="",this.clear=n("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((a)=>a.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){let a=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((h)=>{if(this.inputValue){if(typeof h.title==="string"){if(h.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof h.value==="string"){if(h.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});let D=this.filteredOptions.findIndex((h)=>h===a);this.cursor=D<0?0:D,this.render()}handleSpaceToggle(){let a=this.filteredOptions[this.cursor];if(a.selected)a.selected=!1,this.render();else if(a.disabled||this.value.filter((D)=>D.selected).length>=this.maxChoices)return this.bell();else a.selected=!0,this.render()}handleInputChange(a){this.inputValue=this.inputValue+a,this.updateFilteredOptions()}_(a,D){if(a===" ")this.handleSpaceToggle();else this.handleInputChange(a)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
|
|
498
|
-
Instructions:
|
|
499
|
-
${l.arrowUp}/${l.arrowDown}: Highlight option
|
|
500
|
-
${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection
|
|
501
|
-
[a,b,c]/delete: Filter choices
|
|
502
|
-
enter/return: Complete answer
|
|
503
|
-
`}return""}renderCurrentInput(){return`
|
|
504
|
-
Filtered results for: ${this.inputValue?this.inputValue:t.gray("Enter something to filter")}
|
|
505
|
-
`}renderOption(a,D,h){let d;if(D.disabled)d=a===h?t.gray().underline(D.title):t.strikethrough().gray(D.title);else d=a===h?t.cyan().underline(D.title):D.title;return(D.selected?t.green(l.radioOn):l.radioOff)+" "+d}renderDoneOrInstructions(){if(this.done)return this.value.filter((D)=>D.selected).map((D)=>D.title).join(", ");let a=[t.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)a.push(t.yellow(this.warn));return a.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(r.hide);super.render();let a=[i.symbol(this.done,this.aborted),t.bold(this.msg),i.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)a+=t.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;a+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+a),this.clear=n(a,this.out.columns)}}u.exports=o}),bA=ue((e,u)=>{var t=gt(),r=wr(),{style:s,clear:n}=Qu(),{erase:i,cursor:l}=mt();class o extends r{constructor(a={}){super(a);this.msg=a.message,this.value=a.initial,this.initialValue=!!a.initial,this.yesMsg=a.yes||"yes",this.yesOption=a.yesOption||"(Y/n)",this.noMsg=a.no||"no",this.noOption=a.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
506
|
-
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
507
|
-
`),this.close()}_(a,D){if(a.toLowerCase()==="y")return this.value=!0,this.submit();if(a.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);else this.out.write(n(this.outputText,this.out.columns));super.render(),this.outputText=[s.symbol(this.done,this.aborted),t.bold(this.msg),s.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:t.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(i.line+l.to(0)+this.outputText)}}u.exports=o}),SA=ue((e,u)=>{u.exports={TextPrompt:lA(),SelectPrompt:oA(),TogglePrompt:cA(),DatePrompt:FA(),NumberPrompt:AA(),MultiselectPrompt:K1(),AutocompletePrompt:vA(),AutocompleteMultiselectPrompt:BA(),ConfirmPrompt:bA()}}),TA=ue((e)=>{var u=e,t=SA(),r=(i)=>i;function s(i,l,o={}){return new Promise((a,D)=>{let h=new t[i](l),d=o.onAbort||r,F=o.onSubmit||r,p=o.onExit||r;h.on("state",l.onState||r),h.on("submit",(f)=>a(F(f))),h.on("exit",(f)=>a(p(f))),h.on("abort",(f)=>D(d(f)))})}u.text=(i)=>s("TextPrompt",i),u.password=(i)=>{return i.style="password",u.text(i)},u.invisible=(i)=>{return i.style="invisible",u.text(i)},u.number=(i)=>s("NumberPrompt",i),u.date=(i)=>s("DatePrompt",i),u.confirm=(i)=>s("ConfirmPrompt",i),u.list=(i)=>{let l=i.separator||",";return s("TextPrompt",i,{onSubmit:(o)=>o.split(l).map((a)=>a.trim())})},u.toggle=(i)=>s("TogglePrompt",i),u.select=(i)=>s("SelectPrompt",i),u.multiselect=(i)=>{i.choices=[].concat(i.choices||[]);let l=(o)=>o.filter((a)=>a.selected).map((a)=>a.value);return s("MultiselectPrompt",i,{onAbort:l,onSubmit:l})},u.autocompleteMultiselect=(i)=>{i.choices=[].concat(i.choices||[]);let l=(o)=>o.filter((a)=>a.selected).map((a)=>a.value);return s("AutocompleteMultiselectPrompt",i,{onAbort:l,onSubmit:l})};var n=(i,l)=>Promise.resolve(l.filter((o)=>o.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));u.autocomplete=(i)=>{return i.suggest=i.suggest||n,i.choices=[].concat(i.choices||[]),s("AutocompletePrompt",i)}}),wA=ue((e,u)=>{var t=TA(),r=["suggest","format","onState","validate","onRender","type"],s=()=>{};async function n(a=[],{onSubmit:D=s,onCancel:h=s}={}){let d={},F=n._override||{};a=[].concat(a);let p,f,m,B,C,c,y=async(A,T,I=!1)=>{if(!I&&A.validate&&A.validate(T)!==!0)return;return A.format?await A.format(T,d):T};for(f of a){if({name:B,type:C}=f,typeof C==="function")C=await C(p,{...d},f),f.type=C;if(!C)continue;for(let A in f){if(r.includes(A))continue;let T=f[A];f[A]=typeof T==="function"?await T(p,{...d},c):T}if(c=f,typeof f.message!=="string")throw new Error("prompt message is required");if({name:B,type:C}=f,t[C]===void 0)throw new Error(`prompt type (${C}) is not defined`);if(F[f.name]!==void 0){if(p=await y(f,F[f.name]),p!==void 0){d[B]=p;continue}}try{p=n._injected?i(n._injected,f.initial):await t[C](f),d[B]=p=await y(f,p,!0),m=await D(f,p,d)}catch(A){m=!await h(f,d)}if(m)return d}return d}function i(a,D){let h=a.shift();if(h instanceof Error)throw h;return h===void 0?D:h}function l(a){n._injected=(n._injected||[]).concat(a)}function o(a){n._override=Object.assign({},a)}u.exports=Object.assign(n,{prompt:n,prompts:t,inject:l,override:o})}),IA=ue((e,u)=>{function t(r){r=(Array.isArray(r)?r:r.split(".")).map(Number);let s=0,n=process.versions.node.split(".").map(Number);for(;s<r.length;s++){if(n[s]>r[s])return!1;if(r[s]>n[s])return!0}return!1}u.exports=t("8.6.0")?uA():wA()}),NA=ue((e,u)=>{u.exports={dots:{interval:80,frames:["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},dots2:{interval:80,frames:["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},dots3:{interval:80,frames:["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},dots4:{interval:80,frames:["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},dots5:{interval:80,frames:["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},dots6:{interval:80,frames:["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},dots7:{interval:80,frames:["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},dots8:{interval:80,frames:["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},dots9:{interval:80,frames:["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},dots10:{interval:80,frames:["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},dots11:{interval:100,frames:["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},dots12:{interval:80,frames:["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},dots13:{interval:80,frames:["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},dots8Bit:{interval:80,frames:["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},sand:{interval:80,frames:["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["⠂","-","–","—","–","-"]},pipe:{interval:100,frames:["┤","┘","┴","└","├","┌","┬","┐"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["✶","✸","✹","✺","✹","✷"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","´","-","_","_","_"]},hamburger:{interval:100,frames:["☱","☲","☴"]},growVertical:{interval:120,frames:["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},growHorizontal:{interval:120,frames:["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","°","O","o","."]},noise:{interval:100,frames:["▓","▒","░"]},bounce:{interval:120,frames:["⠁","⠂","⠄","⠂"]},boxBounce:{interval:120,frames:["▖","▘","▝","▗"]},boxBounce2:{interval:100,frames:["▌","▀","▐","▄"]},triangle:{interval:50,frames:["◢","◣","◤","◥"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["◜","◠","◝","◞","◡","◟"]},circle:{interval:120,frames:["◡","⊙","◠"]},squareCorners:{interval:180,frames:["◰","◳","◲","◱"]},circleQuarters:{interval:120,frames:["◴","◷","◶","◵"]},circleHalves:{interval:50,frames:["◐","◓","◑","◒"]},squish:{interval:100,frames:["╫","╪"]},toggle:{interval:250,frames:["⊶","⊷"]},toggle2:{interval:80,frames:["▫","▪"]},toggle3:{interval:120,frames:["□","■"]},toggle4:{interval:100,frames:["■","□","▪","▫"]},toggle5:{interval:100,frames:["▮","▯"]},toggle6:{interval:300,frames:["ဝ","၀"]},toggle7:{interval:80,frames:["⦾","⦿"]},toggle8:{interval:100,frames:["◍","◌"]},toggle9:{interval:100,frames:["◉","◎"]},toggle10:{interval:100,frames:["㊂","㊀","㊁"]},toggle11:{interval:50,frames:["⧇","⧆"]},toggle12:{interval:120,frames:["☗","☖"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["←","↖","↑","↗","→","↘","↓","↙"]},arrow2:{interval:80,frames:["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},arrow3:{interval:120,frames:["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},smiley:{interval:200,frames:["\uD83D\uDE04 ","\uD83D\uDE1D "]},monkey:{interval:300,frames:["\uD83D\uDE48 ","\uD83D\uDE48 ","\uD83D\uDE49 ","\uD83D\uDE4A "]},hearts:{interval:100,frames:["\uD83D\uDC9B ","\uD83D\uDC99 ","\uD83D\uDC9C ","\uD83D\uDC9A ","❤️ "]},clock:{interval:100,frames:["\uD83D\uDD5B ","\uD83D\uDD50 ","\uD83D\uDD51 ","\uD83D\uDD52 ","\uD83D\uDD53 ","\uD83D\uDD54 ","\uD83D\uDD55 ","\uD83D\uDD56 ","\uD83D\uDD57 ","\uD83D\uDD58 ","\uD83D\uDD59 ","\uD83D\uDD5A "]},earth:{interval:180,frames:["\uD83C\uDF0D ","\uD83C\uDF0E ","\uD83C\uDF0F "]},material:{interval:17,frames:["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},moon:{interval:80,frames:["\uD83C\uDF11 ","\uD83C\uDF12 ","\uD83C\uDF13 ","\uD83C\uDF14 ","\uD83C\uDF15 ","\uD83C\uDF16 ","\uD83C\uDF17 ","\uD83C\uDF18 "]},runner:{interval:140,frames:["\uD83D\uDEB6 ","\uD83C\uDFC3 "]},pong:{interval:80,frames:["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},shark:{interval:120,frames:["▐|\\____________▌","▐_|\\___________▌","▐__|\\__________▌","▐___|\\_________▌","▐____|\\________▌","▐_____|\\_______▌","▐______|\\______▌","▐_______|\\_____▌","▐________|\\____▌","▐_________|\\___▌","▐__________|\\__▌","▐___________|\\_▌","▐____________|\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["☀️ ","☀️ ","☀️ ","\uD83C\uDF24 ","⛅️ ","\uD83C\uDF25 ","☁️ ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","⛈ ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","☁️ ","\uD83C\uDF25 ","⛅️ ","\uD83C\uDF24 ","☀️ ","☀️ "]},christmas:{interval:400,frames:["\uD83C\uDF32","\uD83C\uDF84"]},grenade:{interval:80,frames:["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},point:{interval:125,frames:["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},layer:{interval:150,frames:["-","=","≡"]},betaWave:{interval:80,frames:["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},fingerDance:{interval:160,frames:["\uD83E\uDD18 ","\uD83E\uDD1F ","\uD83D\uDD96 ","✋ ","\uD83E\uDD1A ","\uD83D\uDC46 "]},fistBump:{interval:80,frames:["\uD83E\uDD1C \uD83E\uDD1B ","\uD83E\uDD1C \uD83E\uDD1B ","\uD83E\uDD1C \uD83E\uDD1B "," \uD83E\uDD1C \uD83E\uDD1B "," \uD83E\uDD1C\uD83E\uDD1B "," \uD83E\uDD1C✨\uD83E\uDD1B ","\uD83E\uDD1C ✨ \uD83E\uDD1B "]},soccerHeader:{interval:80,frames:[" \uD83E\uDDD1⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️\uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 ","\uD83E\uDDD1 ⚽️ \uD83E\uDDD1 "]},mindblown:{interval:160,frames:["\uD83D\uDE10 ","\uD83D\uDE10 ","\uD83D\uDE2E ","\uD83D\uDE2E ","\uD83D\uDE26 ","\uD83D\uDE26 ","\uD83D\uDE27 ","\uD83D\uDE27 ","\uD83E\uDD2F ","\uD83D\uDCA5 ","✨ "," "," "," "]},speaker:{interval:160,frames:["\uD83D\uDD08 ","\uD83D\uDD09 ","\uD83D\uDD0A ","\uD83D\uDD09 "]},orangePulse:{interval:100,frames:["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 "]},bluePulse:{interval:100,frames:["\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},orangeBluePulse:{interval:100,frames:["\uD83D\uDD38 ","\uD83D\uDD36 ","\uD83D\uDFE0 ","\uD83D\uDFE0 ","\uD83D\uDD36 ","\uD83D\uDD39 ","\uD83D\uDD37 ","\uD83D\uDD35 ","\uD83D\uDD35 ","\uD83D\uDD37 "]},timeTravel:{interval:100,frames:["\uD83D\uDD5B ","\uD83D\uDD5A ","\uD83D\uDD59 ","\uD83D\uDD58 ","\uD83D\uDD57 ","\uD83D\uDD56 ","\uD83D\uDD55 ","\uD83D\uDD54 ","\uD83D\uDD53 ","\uD83D\uDD52 ","\uD83D\uDD51 ","\uD83D\uDD50 "]},aesthetic:{interval:80,frames:["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},dwarfFortress:{interval:80,frames:[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]}}}),G1=ue((e,u)=>{var t=Object.assign({},NA()),r=Object.keys(t);Object.defineProperty(t,"random",{get(){let s=Math.floor(Math.random()*r.length),n=r[s];return t[n]}}),u.exports=t}),fi=c9(import.meta.url),_A=Object.create,j1=Object.defineProperty,$A=Object.getOwnPropertyDescriptor,RA=Object.getOwnPropertyNames,OA=Object.getPrototypeOf,LA=Object.prototype.hasOwnProperty,Ir=((e)=>typeof fi<"u"?fi:typeof Proxy<"u"?new Proxy(e,{get:(u,t)=>(typeof fi<"u"?fi:u)[t]}):e)(function(e){if(typeof fi<"u")return fi.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),lu=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports),UA=(e,u,t,r)=>{if(u&&typeof u=="object"||typeof u=="function")for(let s of RA(u))!LA.call(e,s)&&s!==t&&j1(e,s,{get:()=>u[s],enumerable:!(r=$A(u,s))||r.enumerable});return e},PA=(e,u,t)=>(t=e!=null?_A(OA(e)):{},UA(u||!e||!e.__esModule?j1(t,"default",{value:e,enumerable:!0}):t,e)),MA=lu((e,u)=>{u.exports=n,n.sync=i;var t=Ir("fs");function r(l,o){var a=o.pathExt!==void 0?o.pathExt:process.env.PATHEXT;if(!a||(a=a.split(";"),a.indexOf("")!==-1))return!0;for(var D=0;D<a.length;D++){var h=a[D].toLowerCase();if(h&&l.substr(-h.length).toLowerCase()===h)return!0}return!1}function s(l,o,a){return!l.isSymbolicLink()&&!l.isFile()?!1:r(o,a)}function n(l,o,a){t.stat(l,function(D,h){a(D,D?!1:s(h,l,o))})}function i(l,o){return s(t.statSync(l),l,o)}}),kA=lu((e,u)=>{u.exports=r,r.sync=s;var t=Ir("fs");function r(l,o,a){t.stat(l,function(D,h){a(D,D?!1:n(h,o))})}function s(l,o){return n(t.statSync(l),o)}function n(l,o){return l.isFile()&&i(l,o)}function i(l,o){var{mode:a,uid:D,gid:h}=l,d=o.uid!==void 0?o.uid:process.getuid&&process.getuid(),F=o.gid!==void 0?o.gid:process.getgid&&process.getgid(),p=parseInt("100",8),f=parseInt("010",8),m=parseInt("001",8),B=p|f,C=a&m||a&f&&h===F||a&p&&D===d||a&B&&d===0;return C}}),VA=lu((e,u)=>{var t=Ir("fs"),r;process.platform==="win32"||global.TESTING_WINDOWS?r=MA():r=kA(),u.exports=s,s.sync=n;function s(i,l,o){if(typeof l=="function"&&(o=l,l={}),!o){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(a,D){s(i,l||{},function(h,d){h?D(h):a(d)})})}r(i,l||{},function(a,D){a&&(a.code==="EACCES"||l&&l.ignoreErrors)&&(a=null,D=!1),o(a,D)})}function n(i,l){try{return r.sync(i,l||{})}catch(o){if(l&&l.ignoreErrors||o.code==="EACCES")return!1;throw o}}}),KA=lu((e,u)=>{var t=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",r=Ir("path"),s=t?";":":",n=VA(),i=(D)=>Object.assign(new Error(`not found: ${D}`),{code:"ENOENT"}),l=(D,h)=>{let d=h.colon||s,F=D.match(/\//)||t&&D.match(/\\/)?[""]:[...t?[process.cwd()]:[],...(h.path||"/Users/chrisbreuer/Code/stacks/storage/framework/core/cli/node_modules/.bin:/Users/chrisbreuer/Code/stacks/storage/framework/core/cli/node_modules/.bin:/Users/chrisbreuer/Code/stacks/storage/framework/core/node_modules/.bin:/Users/chrisbreuer/Code/stacks/storage/framework/node_modules/.bin:/Users/chrisbreuer/Code/stacks/storage/node_modules/.bin:/Users/chrisbreuer/Code/stacks/node_modules/.bin:/Users/chrisbreuer/Code/node_modules/.bin:/Users/chrisbreuer/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/Users/chrisbreuer/.bun/bin:/Users/chrisbreuer/.pkgx/libpng.org/v1.6.43/bin:/Users/chrisbreuer/.pkgx/freedesktop.org/pkg-config/v0.29.2/bin:/Users/chrisbreuer/.pkgx/sourceware.org/bzip2/v1.0.8/bin:/Users/chrisbreuer/.pkgx/libexpat.github.io/v2.6.2/bin:/Users/chrisbreuer/.pkgx/tukaani.org/xz/v5.6.1/bin:/Users/chrisbreuer/.pkgx/sqlite.org/v3.45.2/bin:/Users/chrisbreuer/.pkgx/gnu.org/readline/v8.2.0/bin:/Users/chrisbreuer/.pkgx/invisible-island.net/ncurses/v6.4.0/bin:/Users/chrisbreuer/.pkgx/tcl-lang.org/v8.6.14/bin:/Users/chrisbreuer/.pkgx/gnome.org/libxml2/v2.12.6/bin:/Users/chrisbreuer/.pkgx/pkgx.sh/v1.1.6/bin:/Users/chrisbreuer/.pkgx/openssl.org/v1.1.1w/bin:/Users/chrisbreuer/.pkgx/python.org/v3.11.9/bin:/Users/chrisbreuer/.pkgx/gnu.org/gettext/v0.21.1/bin:/Users/chrisbreuer/.pkgx/curl.se/v8.6.0/bin:/Users/chrisbreuer/.pkgx/perl.org/v5.38.2/bin:/Users/chrisbreuer/.pkgx/aws.amazon.com/cli/v2.17.13/bin:/Users/chrisbreuer/.pkgx/bun.sh/v1.1.33/bin:/Users/chrisbreuer/.pkgx/dns.lookup.dog/v0.1.0/bin:/Users/chrisbreuer/.pkgx/httpie.io/v3.2.2/bin:/Users/chrisbreuer/.pkgx/info-zip.org/zip/v3.0.0/bin:/Users/chrisbreuer/.pkgx/info-zip.org/unzip/v6.0.0/bin:/Users/chrisbreuer/.pkgx/mailpit.axllent.org/v1.15.0/bin:/Users/chrisbreuer/.pkgx/redis.io/v7.4.0/bin:/Users/chrisbreuer/.pkgx/git-scm.org/v2.44.0/bin:.:node_modules/.bin:vendor/bin:/opt/homebrew/bin:/Users/chrisbreuer/.composer/vendor/bin:/Users/chrisbreuer/.dotfiles/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/share/cputil-osx-x64_v112/cputil-osx-x64:/Users/chrisbreuer/.bun/bin:.:node_modules/.bin:vendor/bin:/Users/chrisbreuer/.composer/vendor/bin:/Users/chrisbreuer/.dotfiles/bin:/Users/chrisbreuer/.local/bin:/Users/chrisbreuer/Library/Application Support/JetBrains/Toolbox/scripts:/Users/chrisbreuer/Library/Application Support/JetBrains/Toolbox/scripts").split(d)],p=t?h.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",f=t?p.split(d):[""];return t&&D.indexOf(".")!==-1&&f[0]!==""&&f.unshift(""),{pathEnv:F,pathExt:f,pathExtExe:p}},o=(D,h,d)=>{typeof h=="function"&&(d=h,h={}),h||(h={});let{pathEnv:F,pathExt:p,pathExtExe:f}=l(D,h),m=[],B=(c)=>new Promise((y,A)=>{if(c===F.length)return h.all&&m.length?y(m):A(i(D));let T=F[c],I=/^".*"$/.test(T)?T.slice(1,-1):T,v=r.join(I,D),g=!I&&/^\.[\\\/]/.test(D)?D.slice(0,2)+v:v;y(C(g,c,0))}),C=(c,y,A)=>new Promise((T,I)=>{if(A===p.length)return T(B(y+1));let v=p[A];n(c+v,{pathExt:f},(g,E)=>{if(!g&&E)if(h.all)m.push(c+v);else return T(c+v);return T(C(c,y,A+1))})});return d?B(0).then((c)=>d(null,c),d):B(0)},a=(D,h)=>{h=h||{};let{pathEnv:d,pathExt:F,pathExtExe:p}=l(D,h),f=[];for(let m=0;m<d.length;m++){let B=d[m],C=/^".*"$/.test(B)?B.slice(1,-1):B,c=r.join(C,D),y=!C&&/^\.[\\\/]/.test(D)?D.slice(0,2)+c:c;for(let A=0;A<F.length;A++){let T=y+F[A];try{if(n.sync(T,{pathExt:p}))if(h.all)f.push(T);else return T}catch{}}}if(h.all&&f.length)return f;if(h.nothrow)return null;throw i(D)};u.exports=o,o.sync=a}),GA=lu((e,u)=>{var t=(r={})=>{let s=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(s).reverse().find((n)=>n.toUpperCase()==="PATH")||"Path"};u.exports=t,u.exports.default=t}),jA=lu((e,u)=>{var t=Ir("path"),r=KA(),s=GA();function n(l,o){let a=l.options.env||process.env,D=process.cwd(),h=l.options.cwd!=null,d=h&&process.chdir!==void 0&&!process.chdir.disabled;if(d)try{process.chdir(l.options.cwd)}catch{}let F;try{F=r.sync(l.command,{path:a[s({env:a})],pathExt:o?t.delimiter:void 0})}catch{}finally{d&&process.chdir(D)}return F&&(F=t.resolve(h?l.options.cwd:"",F)),F}function i(l){return n(l)||n(l,!0)}u.exports=i}),WA=lu((e,u)=>{var t=/([()\][%!^"`<>&|;, *?])/g;function r(n){return n=n.replace(t,"^$1"),n}function s(n,i){return n=`${n}`,n=n.replace(/(\\*)"/g,"$1$1\\\""),n=n.replace(/(\\*)$/,"$1$1"),n=`"${n}"`,n=n.replace(t,"^$1"),i&&(n=n.replace(t,"^$1")),n}u.exports.command=r,u.exports.argument=s}),HA=lu((e,u)=>{u.exports=/^#!(.*)/}),QA=lu((e,u)=>{var t=HA();u.exports=(r="")=>{let s=r.match(t);if(!s)return null;let[n,i]=s[0].replace(/#! ?/,"").split(" "),l=n.split("/").pop();return l==="env"?i:i?`${l} ${i}`:l}}),YA=lu((e,u)=>{var t=Ir("fs"),r=QA();function s(n){let i=Buffer.alloc(150),l;try{l=t.openSync(n,"r"),t.readSync(l,i,0,150,0),t.closeSync(l)}catch{}return r(i.toString())}u.exports=s}),zA=lu((e,u)=>{var t=Ir("path"),r=jA(),s=WA(),n=YA(),i=process.platform==="win32",l=/\.(?:com|exe)$/i,o=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function a(d){d.file=r(d);let F=d.file&&n(d.file);return F?(d.args.unshift(d.file),d.command=F,r(d)):d.file}function D(d){if(!i)return d;let F=a(d),p=!l.test(F);if(d.options.forceShell||p){let f=o.test(F);d.command=t.normalize(d.command),d.command=s.command(d.command),d.args=d.args.map((B)=>s.argument(B,f));let m=[d.command].concat(d.args).join(" ");d.args=["/d","/s","/c",`"${m}"`],d.command=process.env.comspec||"cmd.exe",d.options.windowsVerbatimArguments=!0}return d}function h(d,F,p){F&&!Array.isArray(F)&&(p=F,F=null),F=F?F.slice(0):[],p=Object.assign({},p);let f={command:d,args:F,options:p,file:void 0,original:{command:d,args:F}};return p.shell?f:D(f)}u.exports=h}),qA=lu((e,u)=>{var t=process.platform==="win32";function r(l,o){return Object.assign(new Error(`${o} ${l.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${o} ${l.command}`,path:l.command,spawnargs:l.args})}function s(l,o){if(!t)return;let a=l.emit;l.emit=function(D,h){if(D==="exit"){let d=n(h,o,"spawn");if(d)return a.call(l,"error",d)}return a.apply(l,arguments)}}function n(l,o){return t&&l===1&&!o.file?r(o.original,"spawn"):null}function i(l,o){return t&&l===1&&!o.file?r(o.original,"spawnSync"):null}u.exports={hookChildProcess:s,verifyENOENT:n,verifyENOENTSync:i,notFoundError:r}}),xA=lu((e,u)=>{var t=Ir("child_process"),r=zA(),s=qA();function n(l,o,a){let D=r(l,o,a),h=t.spawn(D.command,D.args,D.options);return s.hookChildProcess(h,D),h}function i(l,o,a){let D=r(l,o,a),h=t.spawnSync(D.command,D.args,D.options);return h.error=h.error||s.verifyENOENTSync(h.status,D),h}u.exports=n,u.exports.spawn=n,u.exports.sync=i,u.exports._parse=r,u.exports._enoent=s}),o3=PA(xA(),1);var c3=process.argv,D3=`${process.platform}-${process.arch} node-${process.version}`;var vt={};_0(vt,{ui:()=>w7,team:()=>T7,storage:()=>S7,services:()=>b7,security:()=>A7,searchEngine:()=>B7,saas:()=>v7,queue:()=>F7,ports:()=>y7,payment:()=>m7,overrides:()=>D8,notification:()=>g7,logging:()=>p7,localUrl:()=>NB,library:()=>C7,hashing:()=>E7,git:()=>d7,errors:()=>f7,email:()=>D7,docs:()=>c7,dns:()=>o7,determineAppEnv:()=>I7,defineUi:()=>t7,defineStorage:()=>e7,defineStacksConfig:()=>_B,defineSms:()=>JB,defineServices:()=>XB,defineSecurity:()=>ZB,defineSearchEngine:()=>xB,defineQueue:()=>qB,definePayment:()=>zB,defineNotification:()=>YB,defineModel:()=>u7,defineLibrary:()=>QB,defineJob:()=>PB,defineHashing:()=>HB,defineGit:()=>WB,defineEvents:()=>r7,defineEmailConfig:()=>GB,defineEmail:()=>jB,defineDns:()=>KB,defineDependencies:()=>VB,defineDatabase:()=>kB,defineCronJob:()=>MB,defineCli:()=>UB,defineChat:()=>LB,defineCdn:()=>OB,defineCache:()=>RB,defineApp:()=>$B,defaults:()=>q1,database:()=>l7,config:()=>ze,cloud:()=>a7,cli:()=>h7,cache:()=>n7,app:()=>Kr,analytics:()=>s7,ai:()=>i7});var ZA=new Set([".","!","?"]),f3=new Set([...ZA,":",'"',"'","”"]),K0=[],G0=[],W1={},hs={},ls={};function H1(e){return typeof e==="string"?new RegExp(`^${e}$`,"i"):e}function mn(e,u){if(e===u)return u;if(e===e.toLowerCase())return u.toLowerCase();if(e===e.toUpperCase())return u.toUpperCase();if(e[0]===e[0].toUpperCase())return u.charAt(0).toUpperCase()+u.slice(1).toLowerCase();return u.toLowerCase()}function XA(e,...u){return e.replace(/\$(\d{1,2})/g,(t,r)=>u[Number(r)]||"")}function JA(e,u){return e.replace(u[0],(...t)=>{let r=XA(u[1],...t);if(t[0]==="")return mn(e[t[t.length-2]-1],r);return mn(t[0],r)})}function Q1(e,u,t){if(!e.length||W1[e])return u;for(let r=t.length-1;r>=0;r--){let s=t[r];if(s[0].test(u))return JA(u,s)}return u}function Y1(e,u,t){return(r)=>{let s=r.toLowerCase();if(u[s])return mn(r,s);if(e[s])return mn(r,e[s]);return Q1(s,r,t)}}function z1(e,u,t){return(r)=>{let s=r.toLowerCase();if(u[s])return!0;if(e[s])return!1;return Q1(s,s,t)===s}}var Xt=(e,u={})=>{let{count:t=2,inclusive:r=!1}=u;if(typeof e!=="string")throw new TypeError("Word must be a string");let s=t===1?Xt.singular(e):Xt.plural(e);return r?`${t} ${s}`:s};Xt.plural=Y1(ls,hs,K0);Xt.isPlural=z1(ls,hs,K0);Xt.singular=Y1(hs,ls,G0);Xt.isSingular=z1(hs,ls,G0);Xt.addPluralRule=(e,u)=>{K0.push([H1(e),u])};Xt.addSingularRule=(e,u)=>{G0.push([H1(e),u])};Xt.addUncountableRule=(e)=>{if(typeof e==="string"){W1[e.toLowerCase()]=!0;return}Xt.addPluralRule(e,"$0"),Xt.addSingularRule(e,"$0")};Xt.addIrregularRule=(e,u)=>{let t=u.toLowerCase(),r=e.toLowerCase();ls[r]=t,hs[t]=r};[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["my","our"],["its","their"],["his","their"],["her","their"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"],["canvas","canvases"]].forEach(([e,u])=>Xt.addIrregularRule(e,u));[[/s?$/i,"s"],[/[^\x20-\x7F]$/,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(([e,u])=>Xt.addPluralRule(e,u));[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|\W|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/(dg|ss|ois|lk|ok|wn|mb|th|ch|ec|oal|is|ck|ix|sser|ts|wb)ies$/i,"$1ie"],[/\b(l|(?:neck|cross|hog|aun)?t|coll|faer|food|gen|goon|group|hipp|junk|vegg|(?:pork)?p|charl|calor|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(([e,u])=>Xt.addSingularRule(e,u));["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\u00E9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(Xt.addUncountableRule);var d3=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}'),E3=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');R1();$0();O0();In();function ev(){let e=/--verbose(?!\s*=\s*false|\s+false)(?:\s+|=true)?(?:$|\s)/,u=y8();if(e.test(u))return 4;return 3}var Xi={...b1({level:ev()}),warning:(e)=>console.warn(e),dump:(...e)=>console.log(...e),dd:(...e)=>{console.log(...e),fn.exit(1)},echo:(e)=>console.log(e)},hr={info:async(e,u)=>{if(u?.styled===!1)console.log(e);else Xi.info(e);await Gr(`INFO: ${Iu(e)}`)},success:async(e,u)=>{if(u?.styled===!1)console.log(e);else Xi.success(e);await Gr(`SUCCESS: ${Iu(e)}`)},warn:async(e,u)=>{if(u?.styled===!1)console.log(e);else Xi.warn(e);await Gr(`WARN: ${Iu(e)}`)},warning:async(e,u)=>{if(u?.styled===!1)console.log(e);else Xi.warn(e);await Gr(`WARN: ${Iu(e)}`)},error:async(e,u)=>{g0(e,u)},debug:async(...e)=>{let u=`DEBUG: ${e.map((t)=>typeof t==="object"?JSON.stringify(t,null,2):t).join(" ")}`;if(fn.env.APP_ENV==="production"||fn.env.APP_ENV==="prod")return Gr(u);Xi.debug(u),await Gr(Iu(u))},dump:(...e)=>e.forEach((u)=>console.log(u)),dd:(...e)=>{e.forEach((u)=>console.log(u)),fn.exit(1)},echo:(...e)=>console.log(...e)};function tv(e){return j0(`database/${e||""}`)}function uv(e){return j0(`app/${e||""}`)}function rv(e){return uv(`Commands/${e||""}`)}function Yc(e){return p0(`logs/${e||""}`)}function j0(e="",u){let t=yc.cwd();while(t.includes("storage"))t=mc(t,"..");let r=mc(t,e);if(u?.relative)return C9(yc.cwd(),r);return r}function p0(e){return j0(`storage/${e||""}`)}var iv={ai:{deploy:!1,models:["amazon.titan-embed-text-v1","amazon.titan-text-express-v1","amazon.titan-embed-image-v1","amazon.titan-image-generator-v1","anthropic.claude-v1","anthropic.claude-v2","anthropic.claude-v2:1","anthropic.claude-instant-v1","meta.llama2-13b-chat-v1","meta.llama2-70b-chat-v1"]},analytics:{driver:void 0},app:{name:"Stacks",description:"A Stacks application.",env:"local",url:"stacks.localhost",debug:!0,key:"",timezone:"UTC",locale:"en",fallbackLocale:"en",cipher:"AES-256-CBC",docMode:!1,redirectUrls:[],maintenanceMode:!1},cli:{name:"My Custom CLI",command:"my-custom-cli",description:"Stacks is a full-stack framework for TypeScript.",source:rv(),deploy:!1},cache:{driver:"redis",prefix:"stx",ttl:3600,drivers:{redis:{connection:"default",host:"localhost",port:6379,username:"",password:""}}},cloud:{type:"serverless",driver:"aws",storage:{},environments:["production","staging","development"],firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0},cdn:{allowedMethods:"GET_HEAD",cachedMethods:"GET_HEAD",minTtl:0,defaultTtl:86400,maxTtl:31536000,compress:!0,priceClass:"PriceClass_All",originShieldRegion:"us-east-1",cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:2}},fileSystem:!1},database:{default:"sqlite",connections:{sqlite:{database:tv("stacks.sqlite"),prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"},dns:{driver:"aws",a:[],aaaa:[],cname:[],mx:[],txt:[]},docs:{lang:"en-US",title:"Stacks",description:"Rapid application, cloud & library framework.",lastUpdated:!0,deploy:!1,themeConfig:{editLink:{pattern:"https://github.com/stacksjs/stacks/edit/main/docs/docs/:path",text:"Edit this page on GitHub"},footer:{message:"Released under the MIT License.",copyright:"Copyright © 2024-present Stacks.js, Inc."}}},email:{from:{name:"Stacks",address:"no-reply@stacksjs.org"},mailboxes:[],server:{scan:!0}},errors:{messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}},git:{hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you’re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:`Write a SHORT, IMPERATIVE tense description of the change:
|
|
508
|
-
`,body:`Provide a LONGER description of the change (optional). Use "|" to break new line:
|
|
509
|
-
`,breaking:`List any BREAKING CHANGES (optional). Use "|" to break new line:
|
|
510
|
-
`,footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:`List any ISSUES by this change. E.g.: #31, #34:
|
|
511
|
-
`,confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: ✨ A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: ♻️ A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: ⚡️ A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: ✅ Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6️ Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don’t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: ⏪️ Reverts a previous commit",emoji:":rewind:"}]},hashing:{driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,time:1}},library:{name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}},logging:{logsPath:"storage/logs/stacks.log",deploymentsPath:"storage/logs/deployments.log"},notification:{default:"email"},payment:{driver:"stripe"},ports:{frontend:3000,backend:3001,admin:3002,library:3003,desktop:3004,email:3005,docs:3006,inspect:3007,api:3008,systemTray:3009,database:3010},queue:{default:"sync",connections:{sync:{driver:"sync"},database:{driver:"database",table:"jobs",queue:"default",retry_after:90},redis:{driver:"redis",connection:"default",queue:"default",retry_after:90},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}},saas:{plans:[{productName:"Stacks Hobby",description:"All the Stacks features.",pricing:[{key:"stacks_hobby_monthly",price:3900,interval:"month",currency:"usd"},{key:"stacks_hobby_yearly",price:37900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}},{productName:"Stacks Pro",description:"All the Stacks features, including being able to invite team members.",pricing:[{key:"stacks_pro_monthly",price:5900,interval:"month",currency:"usd"},{key:"stacks_pro_yearly",price:57900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}}],webhook:{endpoint:"/webhooks/stripe",secret:""},currencies:["usd"],coupons:[{code:"SUMMER2024",amountOff:500,duration:"once"}],products:[{name:"Stacks Pro",description:"All the Stacks features.",images:["url_to_image"]}]},searchEngine:{driver:"opensearch"},security:{firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0}},services:{aws:{accountId:"",appId:"",apiKey:"",region:"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}},storage:{driver:"s3"},team:{name:"Stacks",members:{"Chris Breuer":"chris@stacksjs.org"}},ui:{shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}}}},q1=iv,sv={default:"meta.llama2-70b-chat-v1",models:["amazon.titan-text-express-v1","amazon.titan-text-lite-v1","meta.llama2-70b-chat-v1"],deploy:!0},nv={driver:"fathom",drivers:{googleAnalytics:{trackingId:"UA-XXXXXXXXX-X"},fathom:{siteId:"WOLZMJDL"}}};function av(e){return typeof e==="string"}var oe={required:"The {{ field }} field must be defined",string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",mobile:"The {{ field }} field must be a valid mobile phone number",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",regex:"The {{ field }} field format is invalid",ascii:"The {{ field }} field must only contain ASCII characters",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",hexCode:"The {{ field }} field must be a valid hex color code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number","number.in":"The selected {{ field }} is not in {{ values }}",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must be an integer",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}","date.afterOrSameAs":"The {{ field }} field must be a date after or same as {{ otherField }}","date.beforeField":"The {{ field }} field must be a date before {{ otherField }}","date.beforeOrSameAs":"The {{ field }} field must be a date before or same as {{ otherField }}","date.weekend":"The {{ field }} field is not a weekend","date.weekday":"The {{ field }} field is not a weekday"},hv={"":"data"},lv=Object.defineProperty,x1=(e,u)=>{for(var t in u)lv(e,t,{get:u[t],enumerable:!0})};function ov(e,u,t,r,s){for(u=u.split?u.split("."):u,r=0;r<u.length;r++)e=e?e[u[r]]:s;return e===s?t:e}var cv=je(P0(),1),Dv=je(lF(),1),fv=je(oF(),1),dv=je(cF(),1),Ev=je(DF(),1),Cv=je(fF(),1),pv=je(dF(),1),gv=je(CF(),1),mv=je(pF(),1),yv=je(gF(),1),Fv=je(yF(),1),Av=je(FF(),1),vv=je(vF(),1),Bv=je(BF(),1),bv=je(bF(),1),Sv=je(L1(),1),Tv=je(U1(),1),wv=je(U1(),1),Iv=je(L1(),1),Nv=class{#e;#t;constructor(e,u){this.#e=e,this.#t=u||{}}#u(e,u){if(!e.includes("{{"))return e;return e.replace(/(\\)?{{(.*?)}}/g,(t,r,s)=>{let n=s.trim().split("."),i=u;while(n.length){if(i===null||typeof i!=="object")return;let l=n.shift();i=Object.hasOwn(i,l)?i[l]:void 0}return i})}getMessage(e,u,t,r){let s=this.#t[t.name]||t.name,n=this.#e[`${t.getFieldPath()}.${u}`];if(n)return this.#u(n,{field:s,...r});let i=this.#e[`${t.wildCardPath}.${u}`];if(i)return this.#u(i,{field:s,...r});let l=this.#e[u];if(l)return this.#u(l,{field:s,...r});return this.#u(e,{field:s,...r})}toJSON(){return{messages:this.#e,fields:this.#t}}},_v={};x1(_v,{E_VALIDATION_ERROR:()=>X1});var Z1=class extends Error{constructor(e,u){super("Validation failure",u);this.messages=e;let t=this.constructor;Error.captureStackTrace(this,t)}status=422;code="E_VALIDATION_ERROR";get[Symbol.toStringTag](){return this.constructor.name}toString(){return`${this.name} [${this.code}]: ${this.message}`}},X1=Z1,$v=class{hasErrors=!1;errors=[];report(e,u,t,r){let s={message:e,rule:u,field:t.getFieldPath()};if(r)s.meta=r;if(t.isArrayMember)s.index=t.name;this.hasErrors=!0,this.errors.push(s)}createError(){return new X1(this.errors)}},Rv=["1",1,"true",!0,"on"],Ov=["0",0,"false",!1],be={exists(e){return e!==null&&e!==void 0},isMissing(e){return!this.exists(e)},isTrue(e){return Rv.includes(e)},isFalse(e){return Ov.includes(e)},isString(e){return typeof e==="string"},isObject(e){return!!(e&&typeof e==="object"&&!Array.isArray(e))},hasKeys(e,u){for(let t of u)if(t in e===!1)return!1;return!0},isArray(e){return Array.isArray(e)},isNumeric(e){return!Number.isNaN(Number(e))},asNumber(e){return e===null?Number.NaN:Number(e)},asBoolean(e){if(this.isTrue(e))return!0;if(this.isFalse(e))return!1;return null},isEmail:gv.default.default,isURL:fv.default.default,isAlpha:mv.default.default,isAlphaNumeric:Bv.default.default,isIP:cv.default.default,isUUID:Cv.default.default,isAscii:pv.default.default,isCreditCard:vv.default.default,isIBAN:Ev.default.default,isJWT:Dv.default.default,isLatLong:yv.default.default,isMobilePhone:Tv.default.default,isPassportNumber:bv.default.default,isPostalCode:Sv.default.default,isSlug:dv.default.default,isDecimal:Fv.default.default,mobileLocales:wv.locales,postalCountryCodes:Iv.locales,passportCountryCodes:["AM","AR","AT","AU","AZ","BE","BG","BR","BY","CA","CH","CY","CZ","DE","DK","DZ","ES","FI","FR","GB","GR","HR","HU","IE","IN","ID","IR","IS","IT","JM","JP","KR","KZ","LI","LT","LU","LV","LY","MT","MZ","MY","MX","NL","NZ","PH","PK","PL","PT","RO","RU","SE","SL","SK","TH","TR","UA","US"],isHexColor:(e)=>{if(!e.startsWith("#"))return!1;return Av.default.default(e)},isActiveURL:async(e)=>{let{resolve4:u,resolve6:t}=await import("dns/promises");try{let{hostname:r}=new URL(e);if((await t(r)).length)return!0;else return(await u(r)).length>0}catch{return!1}},isDistinct:(e,u)=>{let t=new Set;if(!u){for(let s of e)if(be.exists(s))if(t.has(s))return!1;else t.add(s);return!0}let r=Array.isArray(u)?u:[u];for(let s of e)if(be.isObject(s)&&be.hasKeys(s,r)){let n=r.map((i)=>s[i]).join("_");if(t.has(n))return!1;else t.add(n)}return!0},getNestedValue(e,u){if(e.indexOf(".")>-1)return ov(u.data,e);return u.parent[e]}},W0=class{static macro(e,u){this.prototype[e]=u}static getter(e,u,t=!1){Object.defineProperty(this.prototype,e,{get(){let r=u.call(this);if(t)Object.defineProperty(this,e,{configurable:!1,enumerable:!1,value:r,writable:!1});return r},configurable:!0,enumerable:!1})}},Lv=/[\p{Lu}]/u,Uv=/[\p{Ll}]/u,zc=/^[\p{Lu}](?![\p{Lu}])/gu,J1=/([\p{Alpha}\p{N}_]|$)/u,H0=/[_.\- ]+/,Pv=new RegExp("^"+H0.source),qc=new RegExp(H0.source+J1.source,"gu"),xc=new RegExp("\\d+"+J1.source,"gu"),Mv=(e,u,t,r)=>{let s=!1,n=!1,i=!1,l=!1;for(let o=0;o<e.length;o++){let a=e[o];if(l=o>2?e[o-3]==="-":!0,s&&Lv.test(a))e=e.slice(0,o)+"-"+e.slice(o),s=!1,i=n,n=!0,o++;else if(n&&i&&Uv.test(a)&&(!l||r))e=e.slice(0,o-1)+"-"+e.slice(o-1),i=n,n=!1,s=!0;else s=u(a)===a&&t(a)!==a,i=n,n=t(a)===a&&u(a)!==a}return e},kv=(e,u)=>{return zc.lastIndex=0,e.replaceAll(zc,(t)=>u(t))},Vv=(e,u)=>{return qc.lastIndex=0,xc.lastIndex=0,e.replaceAll(xc,(t,r,s)=>["_","-"].includes(e.charAt(s+t.length))?t:u(t)).replaceAll(qc,(t,r)=>u(r))};function Nr(e,u){if(!(typeof e==="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(u={pascalCase:!1,preserveConsecutiveUppercase:!1,...u},Array.isArray(e))e=e.map((s)=>s.trim()).filter((s)=>s.length).join("-");else e=e.trim();if(e.length===0)return"";let t=u.locale===!1?(s)=>s.toLowerCase():(s)=>s.toLocaleLowerCase(u.locale),r=u.locale===!1?(s)=>s.toUpperCase():(s)=>s.toLocaleUpperCase(u.locale);if(e.length===1){if(H0.test(e))return"";return u.pascalCase?r(e):t(e)}if(e!==t(e))e=Mv(e,t,r,u.preserveConsecutiveUppercase);if(e=e.replace(Pv,""),e=u.preserveConsecutiveUppercase?kv(e,t):t(e),u.pascalCase)e=r(e.charAt(0))+e.slice(1);return Vv(e,r)}var Kv=je(P1(),1),nt=je(P1(),1),Gv=je(SF(),1),jv=je(TF(),1),Wv=je(wF(),1),Hv="text/plain",Qv="us-ascii",t0=(e,u)=>u.some((t)=>t instanceof RegExp?t.test(e):t===e),Yv=new Set(["https:","http:","file:"]),zv=(e)=>{try{let{protocol:u}=new URL(e);return u.endsWith(":")&&!u.includes(".")&&!Yv.has(u)}catch{return!1}},qv=(e,{stripHash:u})=>{let t=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!t)throw new Error(`Invalid URL: ${e}`);let{type:r,data:s,hash:n}=t.groups,i=r.split(";");n=u?"":n;let l=!1;if(i[i.length-1]==="base64")i.pop(),l=!0;let o=i.shift()?.toLowerCase()??"",a=[...i.map((D)=>{let[h,d=""]=D.split("=").map((F)=>F.trim());if(h==="charset"){if(d=d.toLowerCase(),d===Qv)return""}return`${h}${d?`=${d}`:""}`}).filter(Boolean)];if(l)a.push("base64");if(a.length>0||o&&o!==Hv)a.unshift(o);return`data:${a.join(";")},${l?s.trim():s}${n?`#${n}`:""}`};function xv(e,u){if(u={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,removeExplicitPort:!1,sortQueryParameters:!0,...u},typeof u.defaultProtocol==="string"&&!u.defaultProtocol.endsWith(":"))u.defaultProtocol=`${u.defaultProtocol}:`;if(e=e.trim(),/^data:/i.test(e))return qv(e,u);if(zv(e))return e;let t=e.startsWith("//");if(!(!t&&/^\.*\//.test(e)))e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,u.defaultProtocol);let r=new URL(e);if(u.forceHttp&&u.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(u.forceHttp&&r.protocol==="https:")r.protocol="http:";if(u.forceHttps&&r.protocol==="http:")r.protocol="https:";if(u.stripAuthentication)r.username="",r.password="";if(u.stripHash)r.hash="";else if(u.stripTextFragment)r.hash=r.hash.replace(/#?:~:text.*?$/i,"");if(r.pathname){let n=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,i=0,l="";for(;;){let a=n.exec(r.pathname);if(!a)break;let D=a[0],h=a.index,d=r.pathname.slice(i,h);l+=d.replace(/\/{2,}/g,"/"),l+=D,i=h+D.length}let o=r.pathname.slice(i,r.pathname.length);l+=o.replace(/\/{2,}/g,"/"),r.pathname=l}if(r.pathname)try{r.pathname=decodeURI(r.pathname)}catch{}if(u.removeDirectoryIndex===!0)u.removeDirectoryIndex=[/^index\.[a-z]+$/];if(Array.isArray(u.removeDirectoryIndex)&&u.removeDirectoryIndex.length>0){let n=r.pathname.split("/"),i=n[n.length-1];if(t0(i,u.removeDirectoryIndex))n=n.slice(0,-1),r.pathname=n.slice(1).join("/")+"/"}if(r.hostname){if(r.hostname=r.hostname.replace(/\.$/,""),u.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(r.hostname))r.hostname=r.hostname.replace(/^www\./,"")}if(Array.isArray(u.removeQueryParameters)){for(let n of[...r.searchParams.keys()])if(t0(n,u.removeQueryParameters))r.searchParams.delete(n)}if(!Array.isArray(u.keepQueryParameters)&&u.removeQueryParameters===!0)r.search="";if(Array.isArray(u.keepQueryParameters)&&u.keepQueryParameters.length>0){for(let n of[...r.searchParams.keys()])if(!t0(n,u.keepQueryParameters))r.searchParams.delete(n)}if(u.sortQueryParameters){r.searchParams.sort();try{r.search=decodeURIComponent(r.search)}catch{}}if(u.removeTrailingSlash)r.pathname=r.pathname.replace(/\/$/,"");if(u.removeExplicitPort&&r.port)r.port="";let s=e;if(e=r.toString(),!u.removeSingleSlash&&r.pathname==="/"&&!s.endsWith("/")&&r.hash==="")e=e.replace(/\/$/,"");if((u.removeTrailingSlash||r.pathname==="/")&&r.hash===""&&u.removeSingleSlash)e=e.replace(/\/$/,"");if(t&&!u.normalizeProtocol)e=e.replace(/^http:\/\//,"//");if(u.stripProtocol)e=e.replace(/^(?:https?:)?\/\//,"");return e}var Zv=je(IF(),1),Xv=je(NF(),1),Jv=class e{#e="";newLine=`
|
|
512
|
-
`;writeStatement(u){this.#e=`${this.#e}${this.newLine}${u}`}child(){return new e}toString(){return this.#e}flush(){this.#e=""}};function e4({parseFnRefId:e,variableName:u,wildCardPath:t,isArrayMember:r,valueExpression:s,parentExpression:n,fieldNameExpression:i,parentValueExpression:l}){let o=e?`refs['${e}'](${s}, {
|
|
513
|
-
data: root,
|
|
514
|
-
meta: meta,
|
|
515
|
-
parent: ${l}
|
|
516
|
-
})`:s,a="";if(n==="root"||n==="root_item")a=i;else if(i!=="''")a=`${n}.getFieldPath() + '.' + ${i}`;return`const ${u} = defineValue(${o}, {
|
|
517
|
-
data: root,
|
|
518
|
-
meta: meta,
|
|
519
|
-
name: ${i},
|
|
520
|
-
wildCardPath: '${t}',
|
|
521
|
-
getFieldPath() {
|
|
522
|
-
return ${a};
|
|
523
|
-
},
|
|
524
|
-
mutate: defineValue,
|
|
525
|
-
report: report,
|
|
526
|
-
isValid: true,
|
|
527
|
-
parent: ${l},
|
|
528
|
-
isArrayMember: ${r},
|
|
529
|
-
});`}var Ti=class{#e;#t;field;constructor(e,u,t,r){if(this.#t=r,this.#e=e,this.#t)this.field=this.#t;else u.variablesCounter++,this.field=u.createFieldFor(e,t)}defineField(e){if(!this.#t)e.writeStatement(e4({fieldNameExpression:this.field.fieldNameExpression,isArrayMember:this.field.isArrayMember,parentExpression:this.field.parentExpression,parentValueExpression:this.field.parentValueExpression,valueExpression:this.field.valueExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath,parseFnRefId:"parseFnId"in this.#e?this.#e.parseFnId:void 0}))}};function e8({variableName:e,guardedCodeSnippet:u}){return`if (ensureIsArray(${e})) {
|
|
530
|
-
${u}
|
|
531
|
-
}`}function $n({variableName:e,bail:u,guardedCodeSnippet:t}){if(!u)return t;return`if (${e}.isValid) {
|
|
532
|
-
${t}
|
|
533
|
-
}`}function os({allowNull:e,conditional:u,variableName:t,outputExpression:r,transformFnRefId:s}){if(!e)return"";return`${u||"if"}(${t}.value === null) {
|
|
534
|
-
${r} = ${s?`refs['${s}'](null, ${t});`:"null;"}
|
|
535
|
-
}`}function t4(e,u){let[t,r]=e;if(t&&r)return`if (${t} && ${r}) {
|
|
536
|
-
${u}
|
|
537
|
-
}`;if(t)return`if (${t}) {
|
|
538
|
-
${u}
|
|
539
|
-
}`;if(r)return`if (${r}) {
|
|
540
|
-
${u}
|
|
541
|
-
}`;return u}function u4({isAsync:e,implicit:u,ruleFnId:t},r,s,n){let i=`refs['${t}']`,l=`${i}.validator(${r}.value, ${i}.options, ${r});`,o=s?`${r}.isValid`:"",a=u||n?"":`${r}.isDefined`;return t4([o,a],e?`await ${l}`:`${l}`)}function cs({bail:e,validations:u,variableName:t,dropMissingCheck:r}){return`${u.map((s)=>u4(s,t,e,r)).join(`
|
|
542
|
-
`)}`}function t8({variableName:e,outputExpression:u,outputValueExpression:t}){return`const ${e}_out = ${t};
|
|
543
|
-
${u} = ${e}_out;`}function Ds({allowNull:e,isOptional:u,variableName:t}){if(u===!1)if(e===!1)return`ensureExists(${t});`;else return`ensureIsDefined(${t});`;return""}var r4=class extends Ti{#e;#t;#u;constructor(e,u,t,r,s){super(e,t,r,s);this.#e=e,this.#t=u,this.#u=t}#r(){let e=this.#t.child(),u={type:"tuple",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#e.properties.forEach((t)=>{this.#u.compileNode(t,e,u)}),e.toString()}compile(){this.defineField(this.#t),this.#t.writeStatement(Ds({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName}));let e=$n({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${t8({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:this.#e.allowUnknownProperties?`copyProperties(${this.field.variableName}.value)`:"[]"})}${this.#r()}`}),u=e8({variableName:this.field.variableName,guardedCodeSnippet:`${cs({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!0})}${this.#t.newLine}${e}`});this.#t.writeStatement(`${u}${this.#t.newLine}${os({allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function i4({variableName:e,loopCodeSnippet:u,startingIndex:t}){return t=t||0,`const ${e}_items_size = ${e}.value.length;
|
|
544
|
-
for (let ${e}_i = ${t}; ${e}_i < ${e}_items_size; ${e}_i++) {
|
|
545
|
-
${u}
|
|
546
|
-
}`}var s4=class extends Ti{#e;#t;#u;constructor(e,u,t,r,s){super(e,t,r,s);this.#e=e,this.#t=u,this.#u=t}#r(){let e=this.#t.child();this.#u.compileNode(this.#e.each,e,{type:"array",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath});let u=this.#t.child();return u.writeStatement(i4({variableName:this.field.variableName,startingIndex:0,loopCodeSnippet:e.toString()})),e.flush(),u.toString()}compile(){this.defineField(this.#t),this.#t.writeStatement(Ds({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName}));let e=$n({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${t8({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"[]"})}${this.#t.newLine}${this.#r()}`}),u=e8({variableName:this.field.variableName,guardedCodeSnippet:`${cs({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!0})}${this.#t.newLine}${e}`});this.#t.writeStatement(`${u}${this.#t.newLine}${os({allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function n4({parseFnRefId:e,variableName:u}){if(e)return`${u}.value = refs['${e}'](${u}.value);`;return""}function u8({variableName:e,conditionalFnRefId:u}){return`else {
|
|
547
|
-
refs['${u}'](${e}.value, ${e});
|
|
548
|
-
}`}function r8({conditional:e,variableName:u,conditionalFnRefId:t,guardedCodeSnippet:r}){return`${e}(refs['${t}'](${u}.value, ${u})) {
|
|
549
|
-
${r}
|
|
550
|
-
}`}var a4=class extends Ti{#e;#t;#u;#r;constructor(e,u,t,r,s){super(e,t,r,s);this.#t=e,this.#u=u,this.#r=r,this.#e=t}#i(){let e=this.#u.child();if(this.#t.conditions.forEach((u,t)=>{let r=this.#u.child();if("parseFnId"in u.schema)r.writeStatement(n4({parseFnRefId:u.schema.parseFnId,variableName:this.field.variableName}));this.#e.compileNode(u.schema,r,this.#r,this.field),e.writeStatement(r8({conditional:t===0?"if":"else if",variableName:this.field.variableName,conditionalFnRefId:u.conditionalFnRefId,guardedCodeSnippet:r.toString()})),r.flush()}),this.#t.elseConditionalFnRefId&&this.#t.conditions.length)e.writeStatement(u8({variableName:this.field.variableName,conditionalFnRefId:this.#t.elseConditionalFnRefId}));return e.toString()}compile(){this.defineField(this.#u),this.#u.writeStatement(this.#i())}};function h4({variableName:e,loopCodeSnippet:u}){return`const ${e}_keys = Object.keys(${e}.value);
|
|
551
|
-
const ${e}_keys_size = ${e}_keys.length;
|
|
552
|
-
for (let ${e}_key_i = 0; ${e}_key_i < ${e}_keys_size; ${e}_key_i++) {
|
|
553
|
-
const ${e}_i = ${e}_keys[${e}_key_i];
|
|
554
|
-
${u}
|
|
555
|
-
}`}function i8({variableName:e,guardedCodeSnippet:u}){return`if (ensureIsObject(${e})) {
|
|
556
|
-
${u}
|
|
557
|
-
}`}function s8({variableName:e,outputExpression:u,outputValueExpression:t}){return`const ${e}_out = ${t};
|
|
558
|
-
${u} = ${e}_out;`}var l4=class extends Ti{#e;#t;#u;constructor(e,u,t,r,s){super(e,t,r,s);this.#e=e,this.#t=u,this.#u=t}#r(){let e=this.#t.child(),u=this.#t.child();return this.#u.compileNode(this.#e.each,u,{type:"record",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath}),e.writeStatement(h4({variableName:this.field.variableName,loopCodeSnippet:u.toString()})),u.flush(),e.toString()}compile(){this.defineField(this.#t),this.#t.writeStatement(Ds({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName}));let e=$n({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${s8({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#r()}`}),u=i8({variableName:this.field.variableName,guardedCodeSnippet:`${cs({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!0})}${this.#t.newLine}${e}`});this.#t.writeStatement(`${u}${this.#t.newLine}${os({allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function o4(e){return`[${e.map((u)=>`"${u}"`).join(", ")}]`}function c4({variableName:e,fieldsToIgnore:u,allowUnknownProperties:t}){if(!t)return"";let r=o4(u);return`moveProperties(${e}.value, ${e}_out, ${r});`}var D4=class extends Ti{#e;#t;#u;constructor(e,u,t,r,s){super(e,t,r,s);this.#e=e,this.#t=u,this.#u=t}#r(e){let u=e.properties.map((r)=>r.fieldName),t=e.groups.flatMap((r)=>this.#i(r));return u.concat(t)}#i(e){return e.conditions.flatMap((u)=>{return this.#r(u.schema)})}#n(){let e=this.#t.child(),u={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#e.properties.forEach((t)=>this.#u.compileNode(t,e,u)),e.toString()}#s(){let e=this.#t.child(),u={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#e.groups.forEach((t)=>this.#a(t,e,u)),e.toString()}#a(e,u,t){if(e.conditions.forEach((r,s)=>{let n=u.child();r.schema.properties.forEach((i)=>{this.#u.compileNode(i,n,t)}),r.schema.groups.forEach((i)=>{this.#a(i,n,t)}),u.writeStatement(r8({variableName:this.field.variableName,conditional:s===0?"if":"else if",conditionalFnRefId:r.conditionalFnRefId,guardedCodeSnippet:n.toString()}))}),e.elseConditionalFnRefId&&e.conditions.length)u.writeStatement(u8({variableName:this.field.variableName,conditionalFnRefId:e.elseConditionalFnRefId}))}compile(){this.defineField(this.#t),this.#t.writeStatement(Ds({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName}));let e=$n({variableName:this.field.variableName,bail:this.#e.bail,guardedCodeSnippet:`${s8({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#t.newLine}${this.#n()}${this.#t.newLine}${this.#s()}${this.#t.newLine}${c4({variableName:this.field.variableName,allowUnknownProperties:this.#e.allowUnknownProperties,fieldsToIgnore:this.#e.allowUnknownProperties?this.#r(this.#e):[]})}`}),u=i8({variableName:this.field.variableName,guardedCodeSnippet:`${cs({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!0})}${e}`});this.#t.writeStatement(`${u}${this.#t.newLine}${os({variableName:this.field.variableName,allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,conditional:"else if"})}`)}};function f4(e){return{parentExpression:e.variableName,parentValueExpression:e.variableName,fieldNameExpression:"''",fieldPathExpression:"''",wildCardPath:"",variableName:`${e.variableName}_item`,valueExpression:"root",outputExpression:e.outputExpression,isArrayMember:!1}}function d4({variableName:e,outputExpression:u,transformFnRefId:t}){let r=t?`refs['${t}'](${e}.value, ${e})`:`${e}.value`;return`if (${e}.isDefined && ${e}.isValid) {
|
|
559
|
-
${u} = ${r};
|
|
560
|
-
}`}var E4=class extends Ti{#e;#t;constructor(e,u,t,r,s){super(e,t,r,s);this.#e=e,this.#t=u}compile(){this.defineField(this.#t),this.#t.writeStatement(Ds({allowNull:this.#e.allowNull,isOptional:this.#e.isOptional,variableName:this.field.variableName})),this.#t.writeStatement(cs({variableName:this.field.variableName,validations:this.#e.validations,bail:this.#e.bail,dropMissingCheck:!1})),this.#t.writeStatement(`${d4({variableName:this.field.variableName,outputExpression:this.field.outputExpression,transformFnRefId:this.#e.transformFnId})}${this.#t.newLine}${os({variableName:this.field.variableName,allowNull:this.#e.allowNull,outputExpression:this.field.outputExpression,transformFnRefId:this.#e.transformFnId,conditional:"else if"})}`)}};function C4(e){let u=e.wildCardPath!==""?`${e.wildCardPath}.*`:"*";return{parentExpression:e.variableName,parentValueExpression:`${e.variableName}.value`,fieldNameExpression:`${e.variableName}_i`,fieldPathExpression:u,wildCardPath:u,variableName:`${e.variableName}_item`,valueExpression:`${e.variableName}.value[${e.variableName}_i]`,outputExpression:`${e.variableName}_out[${e.variableName}_i]`,isArrayMember:!0}}function p4(e,u){let t=u.wildCardPath!==""?`${u.wildCardPath}.${e.fieldName}`:e.fieldName;return{parentExpression:u.variableName,parentValueExpression:`${u.variableName}.value`,fieldNameExpression:`${e.fieldName}`,fieldPathExpression:t,wildCardPath:t,variableName:`${u.variableName}_item_${e.fieldName}`,valueExpression:`${u.variableName}.value[${e.fieldName}]`,outputExpression:`${u.variableName}_out[${e.propertyName}]`,isArrayMember:!0}}function g4(){return`if(errorReporter.hasErrors) {
|
|
561
|
-
throw errorReporter.createError();
|
|
562
|
-
}`}function m4(e,u,t){let r=t.wildCardPath!==""?`${t.wildCardPath}.${e.fieldName}`:e.fieldName;return{parentExpression:t.variableName,parentValueExpression:`${t.variableName}.value`,fieldNameExpression:`'${e.fieldName}'`,fieldPathExpression:r,wildCardPath:r,variableName:`${e.propertyName}_${u}`,valueExpression:`${t.variableName}.value['${e.fieldName}']`,outputExpression:`${t.variableName}_out['${e.propertyName}']`,isArrayMember:!1}}function y4(e){let u=e.wildCardPath!==""?`${e.wildCardPath}.*`:"*";return{parentExpression:e.variableName,parentValueExpression:`${e.variableName}.value`,fieldNameExpression:`${e.variableName}_i`,fieldPathExpression:u,wildCardPath:u,variableName:`${e.variableName}_item`,valueExpression:`${e.variableName}.value[${e.variableName}_i]`,outputExpression:`${e.variableName}_out[${e.variableName}_i]`,isArrayMember:!1}}function F4(e){return`function report(message, rule, field, args) {
|
|
563
|
-
field.isValid = false;
|
|
564
|
-
errorReporter.report(messagesProvider.getMessage(message, rule, field, args), rule, field, args);
|
|
565
|
-
};
|
|
566
|
-
function defineValue(value, field) {
|
|
567
|
-
${e.convertEmptyStringsToNull?"if (value === '') { value = null; }":""}
|
|
568
|
-
field.value = value;
|
|
569
|
-
field.isDefined = value !== undefined && value !== null;
|
|
570
|
-
return field;
|
|
571
|
-
};
|
|
572
|
-
function ensureExists(field) {
|
|
573
|
-
if (field.value === undefined || field.value === null) {
|
|
574
|
-
field.report(REQUIRED, 'required', field);
|
|
575
|
-
return false;
|
|
576
|
-
}
|
|
577
|
-
return true;
|
|
578
|
-
};
|
|
579
|
-
function ensureIsDefined(field) {
|
|
580
|
-
if (field.value === undefined) {
|
|
581
|
-
field.report(REQUIRED, 'required', field);
|
|
582
|
-
return false;
|
|
583
|
-
}
|
|
584
|
-
return true;
|
|
585
|
-
};
|
|
586
|
-
function ensureIsObject(field) {
|
|
587
|
-
if (!field.isDefined) {
|
|
588
|
-
return false;
|
|
589
|
-
}
|
|
590
|
-
if (typeof field.value == 'object' && !Array.isArray(field.value)) {
|
|
591
|
-
return true;
|
|
592
|
-
}
|
|
593
|
-
field.report(NOT_AN_OBJECT, 'object', field);
|
|
594
|
-
return false;
|
|
595
|
-
};
|
|
596
|
-
function ensureIsArray(field) {
|
|
597
|
-
if (!field.isDefined) {
|
|
598
|
-
return false;
|
|
599
|
-
}
|
|
600
|
-
if (Array.isArray(field.value)) {
|
|
601
|
-
return true;
|
|
602
|
-
}
|
|
603
|
-
field.report(NOT_AN_ARRAY, 'array', field);
|
|
604
|
-
return false;
|
|
605
|
-
};
|
|
606
|
-
function copyProperties(val) {
|
|
607
|
-
let k, out, tmp;
|
|
608
|
-
|
|
609
|
-
if (Array.isArray(val)) {
|
|
610
|
-
out = Array((k = val.length))
|
|
611
|
-
while (k--) out[k] = (tmp = val[k]) && typeof tmp == 'object' ? copyProperties(tmp) : tmp
|
|
612
|
-
return out
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
if (Object.prototype.toString.call(val) === '[object Object]') {
|
|
616
|
-
out = {} // null
|
|
617
|
-
for (k in val) {
|
|
618
|
-
out[k] = (tmp = val[k]) && typeof tmp == 'object' ? copyProperties(tmp) : tmp
|
|
619
|
-
}
|
|
620
|
-
return out
|
|
621
|
-
}
|
|
622
|
-
return val
|
|
623
|
-
};
|
|
624
|
-
function moveProperties(source, destination, ignoreKeys) {
|
|
625
|
-
for (let key in source) {
|
|
626
|
-
if (!ignoreKeys.includes(key)) {
|
|
627
|
-
const value = source[key]
|
|
628
|
-
destination[key] = copyProperties(value)
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
};`}function A4(e){return`const REQUIRED = '${e.required}';
|
|
632
|
-
const NOT_AN_OBJECT = '${e.object}';
|
|
633
|
-
const NOT_AN_ARRAY = '${e.array}';`}var v4=Object.getPrototypeOf(async function(){}).constructor,B4=class{variablesCounter=0;#e;#t;#u=new Jv;constructor(e,u){this.#e=e,this.#t=u||{convertEmptyStringsToNull:!1}}#r(){this.#u.writeStatement(A4({required:"value is required",object:"value is not a valid object",array:"value is not a valid array",...this.#t.messages})),this.#u.writeStatement(F4(this.#t)),this.#u.writeStatement("let out;")}#i(){this.#u.writeStatement(g4()),this.#u.writeStatement("return out;")}#n(){this.compileNode(this.#e.schema,this.#u,{type:"root",variableName:"root",outputExpression:"out",fieldPathExpression:"out",wildCardPath:""})}#s(){return new v4("root","meta","refs","messagesProvider","errorReporter",this.#u.toString())}createFieldFor(e,u){switch(u.type){case"array":return C4(u);case"root":return f4(u);case"object":return m4(e,this.variablesCounter,u);case"tuple":return p4(e,u);case"record":return y4(u)}}compileNode(e,u,t,r){switch(e.type){case"literal":return new E4(e,u,this,t,r).compile();case"array":return new s4(e,u,this,t,r).compile();case"record":return new l4(e,u,this,t,r).compile();case"object":return new D4(e,u,this,t,r).compile();case"tuple":return new r4(e,u,this,t,r).compile();case"union":return new a4(e,u,this,t,r).compile()}}compile(){this.#r(),this.#n(),this.#i();let e=this.#s();return this.variablesCounter=0,this.#u.flush(),e}};function b4(){let e=0,u={};return{toJSON(){return u},track(t){e++;let r=`ref://${e}`;return u[r]=t,r},trackValidation(t){return this.track(t)},trackParser(t){return this.track(t)},trackTransformer(t){return this.track(t)},trackConditional(t){return this.track(t)}}}function de(e,u){let t={validator:e,isAsync:u?.isAsync||e.constructor.name==="AsyncFunction",implicit:u?.implicit??!1};return function(...r){return{rule:t,options:r[0]}}}var S4={};x1(S4,{COTYPE:()=>I4,IS_OF_TYPE:()=>Cu,ITYPE:()=>T4,OTYPE:()=>w4,PARSE:()=>Ve,UNIQUE_NAME:()=>iu,VALIDATION:()=>Wr});var iu=Symbol.for("schema_name"),Cu=Symbol.for("is_of_type"),Ve=Symbol.for("parse"),T4=Symbol.for("opaque_input_type"),w4=Symbol.for("opaque_type"),I4=Symbol.for("camelcase_opaque_type"),Wr=Symbol.for("to_validation"),di=de((e,u,t)=>{let r=u(t);if(!t.isDefined&&r)t.report(oe.required,"required",t)},{implicit:!0}),Rn=class extends W0{optional(e){return new _4(this,e)}nullable(){return new N4(this)}transform(e){return new $4(e,this)}},N4=class e extends Rn{#e;constructor(u){super();this.#e=u}clone(){return new e(this.#e.clone())}[Ve](u,t,r){let s=this.#e[Ve](u,t,r);return s.allowNull=!0,s}},_4=class e extends Rn{#e;validations;constructor(u,t){super();this.#e=u,this.validations=t||[]}cloneValidations(){return this.validations.map((u)=>{return{options:u.options,rule:u.rule}})}compileValidations(u){return this.validations.map((t)=>{return{ruleFnId:u.track({validator:t.rule.validator,options:t.options}),implicit:t.rule.implicit,isAsync:t.rule.isAsync}})}use(u){return this.validations.push(Wr in u?u[Wr]():u),this}requiredWhen(u,t,r){if(typeof u==="function")return this.use(di(u));let s;switch(t){case"=":s=(n)=>n===r;break;case"!=":s=(n)=>n!==r;break;case"in":s=(n)=>r.includes(n);break;case"notIn":s=(n)=>!r.includes(n);break;case">":s=(n)=>n>r;break;case"<":s=(n)=>n<r;break;case">=":s=(n)=>n>=r;break;case"<=":s=(n)=>n<=r}return this.use(di((n)=>{let i=be.getNestedValue(u,n);return s(i)}))}requiredIfExists(u){let t=Array.isArray(u)?u:[u];return this.use(di((r)=>{return t.every((s)=>be.exists(be.getNestedValue(s,r)))}))}requiredIfAnyExists(u){return this.use(di((t)=>{return u.some((r)=>be.exists(be.getNestedValue(r,t)))}))}requiredIfMissing(u){let t=Array.isArray(u)?u:[u];return this.use(di((r)=>{return t.every((s)=>be.isMissing(be.getNestedValue(s,r)))}))}requiredIfAnyMissing(u){return this.use(di((t)=>{return u.some((r)=>be.isMissing(be.getNestedValue(r,t)))}))}clone(){return new e(this.#e.clone(),this.cloneValidations())}[Ve](u,t,r){let s=this.#e[Ve](u,t,r);return s.isOptional=!0,s.validations=s.validations.concat(this.compileValidations(t)),s}},$4=class e extends Rn{#e;#t;constructor(u,t){super();this.#t=u,this.#e=t}clone(){return new e(this.#t,this.#e.clone())}[Ve](u,t,r){let s=this.#e[Ve](u,t,r);return s.transformFnId=t.trackTransformer(this.#t),s}},fr=class extends Rn{options;validations;constructor(e,u){super();this.options={bail:!0,allowNull:!1,isOptional:!1,...e},this.validations=u||[]}cloneValidations(){return this.validations.map((e)=>{return{options:e.options,rule:e.rule}})}cloneOptions(){return{...this.options}}compileValidations(e){return this.validations.map((u)=>{return{ruleFnId:e.track({validator:u.rule.validator,options:u.options}),implicit:u.rule.implicit,isAsync:u.rule.isAsync}})}parse(e){return this.options.parse=e,this}use(e){return this.validations.push(Wr in e?e[Wr]():e),this}bail(e){return this.options.bail=e,this}[Ve](e,u,t){return{type:"literal",fieldName:e,propertyName:t.toCamelCase?Nr(e):e,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?u.trackParser(this.options.parse):void 0,validations:this.compileValidations(u)}}},R4=class e extends fr{constructor(u,t){super(u,t)}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},yn=de((e,u,t)=>{let r=typeof u.choices==="function"?u.choices(t):u.choices;if(!r.includes(e))t.report(oe.enum,"enum",t,{choices:r})}),n8=class e extends fr{static rules={enum:yn};#e;getChoices(){return this.#e}constructor(u,t,r){super(t,r||[yn({choices:u})]);this.#e=u}clone(){return new e(this.#e,this.cloneOptions(),this.cloneValidations())}},zr=["YYYY-MM-DD","YYYY-MM-DD HH:mm:ss"];nt.default.extend(Wv.default);nt.default.extend(Gv.default);nt.default.extend(jv.default);var O4=de((e,u,t)=>{if(typeof e!=="string"&&typeof e!=="number"){t.report(oe.date,"date",t);return}let r=!1,s=u.formats||zr;if(Array.isArray(s))s=[...s],r=s.includes("x");else if(typeof s!=="string")s={...s},r=s.format==="x";let n=r?be.asNumber(e):e,i=r&&!Number.isNaN(n)?nt.default(n):nt.default(e,s,!0);if(!i.isValid()){t.report(oe.date,"date",t);return}t.meta.$value=i,t.meta.$formats=s,t.mutate(i.toDate(),t)}),Zc=de((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=u.format||zr,n=t.meta.$value,i=typeof u.expectedValue==="function"?u.expectedValue(t):u.expectedValue,l=nt.default(i,s,!0);if(!l.isValid())throw new Error(`Invalid datetime value "${i}" value provided to the equals rule`);if(!n.isSame(l,r))t.report(oe["date.equals"],"date.equals",t,{expectedValue:i,compare:r})}),Xc=de((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=u.format||zr,n=t.meta.$value,i=typeof u.expectedValue==="function"?u.expectedValue(t):u.expectedValue,l=i==="today"?nt.default():i==="tomorrow"?nt.default().add(1,"day"):nt.default(i,s,!0);if(!l.isValid())throw new Error(`Invalid datetime value "${i}" value provided to the after rule`);if(!n.isAfter(l,r))t.report(oe["date.after"],"date.after",t,{expectedValue:i,compare:r})}),Jc=de((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=u.format||zr,n=t.meta.$value,i=typeof u.expectedValue==="function"?u.expectedValue(t):u.expectedValue,l=i==="today"?nt.default():i==="tomorrow"?nt.default().add(1,"day"):nt.default(i,s,!0);if(!l.isValid())throw new Error(`Invalid datetime value "${i}" value provided to the afterOrEqual rule`);if(!n.isSameOrAfter(l,r))t.report(oe["date.afterOrEqual"],"date.afterOrEqual",t,{expectedValue:i,compare:r})}),eD=de((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=u.format||zr,n=t.meta.$value,i=typeof u.expectedValue==="function"?u.expectedValue(t):u.expectedValue,l=i==="today"?nt.default():i==="yesterday"?nt.default().subtract(1,"day"):nt.default(i,s,!0);if(!l.isValid())throw new Error(`Invalid datetime value "${i}" value provided to the before rule`);if(!n.isBefore(l,r))t.report(oe["date.before"],"date.before",t,{expectedValue:i,compare:r})}),tD=de((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=u.format||zr,n=t.meta.$value,i=typeof u.expectedValue==="function"?u.expectedValue(t):u.expectedValue,l=i==="today"?nt.default():i==="yesterday"?nt.default().subtract(1,"day"):nt.default(i,s,!0);if(!l.isValid())throw new Error(`Invalid datetime value "${i}" value provided to the beforeOrEqual rule`);if(!n.isSameOrBefore(l,r))t.report(oe["date.beforeOrEqual"],"date.beforeOrEqual",t,{expectedValue:i,compare:r})}),uD=de((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=be.getNestedValue(u.otherField,t),l=nt.default(i,n,!0);if(!l.isValid())return;if(!s.isSame(l,r))t.report(oe["date.sameAs"],"date.sameAs",t,{otherField:u.otherField,expectedValue:i,compare:r})}),rD=de((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=be.getNestedValue(u.otherField,t),l=nt.default(i,n,!0);if(!l.isValid())return;if(s.isSame(l,r))t.report(oe["date.notSameAs"],"date.notSameAs",t,{otherField:u.otherField,expectedValue:i,compare:r})}),iD=de((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=be.getNestedValue(u.otherField,t),l=nt.default(i,n,!0);if(!l.isValid())return;if(!s.isAfter(l,r))t.report(oe["date.afterField"],"date.afterField",t,{otherField:u.otherField,expectedValue:i,compare:r})}),sD=de((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=be.getNestedValue(u.otherField,t),l=nt.default(i,n,!0);if(!l.isValid())return;if(!s.isSameOrAfter(l,r))t.report(oe["date.afterOrSameAs"],"date.afterOrSameAs",t,{otherField:u.otherField,expectedValue:i,compare:r})}),nD=de((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=be.getNestedValue(u.otherField,t),l=nt.default(i,n,!0);if(!l.isValid())return;if(!s.isBefore(l,r))t.report(oe["date.beforeField"],"date.beforeField",t,{otherField:u.otherField,expectedValue:i,compare:r})}),aD=de((e,u,t)=>{if(!t.meta.$value)return;let r=u.compare||"day",s=t.meta.$value,n=u.format||t.meta.$formats,i=be.getNestedValue(u.otherField,t),l=nt.default(i,n,!0);if(!l.isValid())return;if(!s.isSameOrBefore(l,r))t.report(oe["date.beforeOrSameAs"],"date.beforeOrSameAs",t,{otherField:u.otherField,expectedValue:i,compare:r})}),hD=de((e,u,t)=>{if(!t.meta.$value)return;let r=t.meta.$value.day();if(r!==0&&r!==6)t.report(oe["date.weekend"],"date.weekend",t)}),lD=de((e,u,t)=>{if(!t.meta.$value)return;let r=t.meta.$value.day();if(r===0||r===6)t.report(oe["date.weekday"],"date.weekday",t)}),L4=class e extends fr{static rules={equals:Zc,after:Xc,afterOrEqual:Jc,before:eD,beforeOrEqual:tD,sameAs:uD,notSameAs:rD,afterField:iD,afterOrSameAs:sD,beforeField:nD,beforeOrSameAs:aD,weekend:hD,weekday:lD};[iu]="vine.date";[Cu]=(u)=>{if(typeof u!=="string")return!1;return Kv.default(u,this.options.formats||zr,!0).isValid()};constructor(u,t){super(u,t||[O4(u||{})])}equals(u,t){return this.use(Zc({expectedValue:u,...t}))}after(u,t){return this.use(Xc({expectedValue:u,...t}))}afterOrEqual(u,t){return this.use(Jc({expectedValue:u,...t}))}before(u,t){return this.use(eD({expectedValue:u,...t}))}beforeOrEqual(u,t){return this.use(tD({expectedValue:u,...t}))}sameAs(u,t){return this.use(uD({otherField:u,...t}))}notSameAs(u,t){return this.use(rD({otherField:u,...t}))}afterField(u,t){return this.use(iD({otherField:u,...t}))}afterOrSameAs(u,t){return this.use(sD({otherField:u,...t}))}beforeField(u,t){return this.use(nD({otherField:u,...t}))}beforeOrSameAs(u,t){return this.use(aD({otherField:u,...t}))}weekend(){return this.use(hD())}weekday(){return this.use(lD())}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},U4=class e{#e;#t=(u,t)=>{t.report(oe.union,"union",t)};constructor(u){this.#e=u}otherwise(u){return this.#t=u,this}clone(){let u=new e(this.#e);return u.otherwise(this.#t),u}[Ve](u,t,r){return{type:"union",fieldName:u,propertyName:r.toCamelCase?Nr(u):u,elseConditionalFnRefId:t.trackConditional(this.#t),conditions:this.#e.map((s)=>s[Ve](u,t,r))}}},a8=class{#e;#t;constructor(e,u){this.#e=u,this.#t=e}[Ve](e,u,t){return{conditionalFnRefId:u.trackConditional(this.#t),schema:this.#e[Ve](e,u,t)}}};function Q0(e){return new U4(e)}Q0.if=function e(u,t){return new a8(u,t)};Q0.else=function e(u){return new a8(()=>!0,u)};var On=class extends W0{optional(){return new M4(this)}nullable(){return new P4(this)}},P4=class e extends On{#e;constructor(u){super();this.#e=u}clone(){return new e(this.#e.clone())}[Ve](u,t,r){let s=this.#e[Ve](u,t,r);if(s.type!=="union")s.allowNull=!0;return s}},M4=class e extends On{#e;constructor(u){super();this.#e=u}clone(){return new e(this.#e.clone())}[Ve](u,t,r){let s=this.#e[Ve](u,t,r);if(s.type!=="union")s.isOptional=!0;return s}},Ln=class extends On{options;validations;constructor(e,u){super();this.options=e||{bail:!0,allowNull:!1,isOptional:!1},this.validations=u||[]}cloneValidations(){return this.validations.map((e)=>{return{options:e.options,rule:e.rule}})}cloneOptions(){return{...this.options}}compileValidations(e){return this.validations.map((u)=>{return{ruleFnId:e.track({validator:u.rule.validator,options:u.options}),implicit:u.rule.implicit,isAsync:u.rule.isAsync}})}parse(e){return this.options.parse=e,this}use(e){return this.validations.push(Wr in e?e[Wr]():e),this}bail(e){return this.options.bail=e,this}},k4=class e extends Ln{#e;#t=!1;[iu]="vine.array";[Cu]=(u)=>{return Array.isArray(u)};constructor(u,t,r){super(t,r);this.#e=u}allowUnknownProperties(){return this.#t=!0,this}clone(){let u=new e(this.#e.map((t)=>t.clone()),this.cloneOptions(),this.cloneValidations());if(this.#t)u.allowUnknownProperties();return u}[Ve](u,t,r){return{type:"tuple",fieldName:u,propertyName:r.toCamelCase?Nr(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,allowUnknownProperties:this.#t,parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:this.compileValidations(t),properties:this.#e.map((s,n)=>s[Ve](String(n),t,r))}}},oD=de((e,u,t)=>{if(!t.isValid)return;if(e.length<u.min)t.report(oe["array.minLength"],"array.minLength",t,u)}),cD=de((e,u,t)=>{if(!t.isValid)return;if(e.length>u.max)t.report(oe["array.maxLength"],"array.maxLength",t,u)}),DD=de((e,u,t)=>{if(!t.isValid)return;if(e.length!==u.size)t.report(oe["array.fixedLength"],"array.fixedLength",t,u)}),fD=de((e,u,t)=>{if(!t.isValid)return;if(e.length<=0)t.report(oe.notEmpty,"notEmpty",t)}),dD=de((e,u,t)=>{if(!t.isValid)return;if(!be.isDistinct(e,u.fields))t.report(oe.distinct,"distinct",t,u)}),ED=de((e,u,t)=>{if(!t.isValid)return;t.mutate(e.filter((r)=>be.exists(r)&&r!==""),t)}),V4=class e extends Ln{static rules={compact:ED,notEmpty:fD,distinct:dD,minLength:oD,maxLength:cD,fixedLength:DD};#e;[iu]="vine.array";[Cu]=(u)=>{return Array.isArray(u)};constructor(u,t,r){super(t,r);this.#e=u}minLength(u){return this.use(oD({min:u}))}maxLength(u){return this.use(cD({max:u}))}fixedLength(u){return this.use(DD({size:u}))}notEmpty(){return this.use(fD())}distinct(u){return this.use(dD({fields:u}))}compact(){return this.use(ED())}clone(){return new e(this.#e.clone(),this.cloneOptions(),this.cloneValidations())}[Ve](u,t,r){return{type:"array",fieldName:u,propertyName:r.toCamelCase?Nr(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#e[Ve]("*",t,r),parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:this.compileValidations(t)}}},K4=class e extends On{#e;[iu]="types.object";[Cu]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u){super();this.#e=u}clone(){return new e(this.#e.clone())}[Ve](u,t,r){return r.toCamelCase=!0,this.#e[Ve](u,t,r)}},G4=class e extends Ln{#e;#t=[];#u=!1;[iu]="vine.object";[Cu]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,t,r){super(t,r);this.#e=u}getProperties(){return Object.keys(this.#e).reduce((u,t)=>{return u[t]=this.#e[t].clone(),u},{})}allowUnknownProperties(){return this.#u=!0,this}merge(u){return this.#t.push(u),this}clone(){let u=new e(this.getProperties(),this.cloneOptions(),this.cloneValidations());if(this.#t.forEach((t)=>u.merge(t)),this.#u)u.allowUnknownProperties();return u}toCamelCase(){return new K4(this)}[Ve](u,t,r){return{type:"object",fieldName:u,propertyName:r.toCamelCase?Nr(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,allowUnknownProperties:this.#u,validations:this.compileValidations(t),properties:Object.keys(this.#e).map((s)=>{return this.#e[s][Ve](s,t,r)}),groups:this.#t.map((s)=>{return s[Ve](t,r)})}}},CD=de((e,u,t)=>{if(!t.isValid)return;if(Object.keys(e).length<u.min)t.report(oe["record.minLength"],"record.minLength",t,u)}),pD=de((e,u,t)=>{if(!t.isValid)return;if(Object.keys(e).length>u.max)t.report(oe["record.maxLength"],"record.maxLength",t,u)}),gD=de((e,u,t)=>{if(!t.isValid)return;if(Object.keys(e).length!==u.size)t.report(oe["record.fixedLength"],"record.fixedLength",t,u)}),mD=de((e,u,t)=>{if(!t.isValid)return;u(Object.keys(e),t)}),j4=class e extends Ln{static rules={maxLength:pD,minLength:CD,fixedLength:gD,validateKeys:mD};#e;[iu]="vine.object";[Cu]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,t,r){super(t,r);this.#e=u}minLength(u){return this.use(CD({min:u}))}maxLength(u){return this.use(pD({max:u}))}fixedLength(u){return this.use(gD({size:u}))}validateKeys(...u){return this.use(mD(...u))}clone(){return new e(this.#e.clone(),this.cloneOptions(),this.cloneValidations())}[Ve](u,t,r){return{type:"record",fieldName:u,propertyName:r.toCamelCase?Nr(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#e[Ve]("*",t,r),parseFnId:this.options.parse?t.trackParser(this.options.parse):void 0,validations:this.compileValidations(t)}}},yD=de((e,u,t)=>{if(typeof e!=="string")t.report(oe.string,"string",t)}),FD=de((e,u,t)=>{if(!t.isValid)return;if(!be.isEmail(e,u))t.report(oe.email,"email",t)}),AD=de((e,u,t)=>{if(!t.isValid)return;let r=u&&typeof u==="function"?u(t):u,s=r?.locale||"any";if(!be.isMobilePhone(e,s,r))t.report(oe.mobile,"mobile",t)}),vD=de((e,u,t)=>{if(!t.isValid)return;if(!be.isIP(e,u?.version))t.report(oe.ipAddress,"ipAddress",t)}),BD=de((e,u,t)=>{if(!t.isValid)return;if(!u.test(e))t.report(oe.regex,"regex",t)}),bD=de((e,u,t)=>{if(!t.isValid)return;if(!be.isHexColor(e))t.report(oe.hexCode,"hexCode",t)}),SD=de((e,u,t)=>{if(!t.isValid)return;if(!be.isURL(e,u))t.report(oe.url,"url",t)}),TD=de(async(e,u,t)=>{if(!t.isValid)return;if(!await be.isActiveURL(e))t.report(oe.activeUrl,"activeUrl",t)}),wD=de((e,u,t)=>{if(!t.isValid)return;let r="a-zA-Z";if(u){if(u.allowSpaces)r+="\\s";if(u.allowDashes)r+="-";if(u.allowUnderscores)r+="_"}if(!new RegExp(`^[${r}]+$`).test(e))t.report(oe.alpha,"alpha",t)}),ID=de((e,u,t)=>{if(!t.isValid)return;let r="a-zA-Z0-9";if(u){if(u.allowSpaces)r+="\\s";if(u.allowDashes)r+="-";if(u.allowUnderscores)r+="_"}if(!new RegExp(`^[${r}]+$`).test(e))t.report(oe.alphaNumeric,"alphaNumeric",t)}),ND=de((e,u,t)=>{if(!t.isValid)return;if(e.length<u.min)t.report(oe.minLength,"minLength",t,u)}),_D=de((e,u,t)=>{if(!t.isValid)return;if(e.length>u.max)t.report(oe.maxLength,"maxLength",t,u)}),$D=de((e,u,t)=>{if(!t.isValid)return;if(e.length!==u.size)t.report(oe.fixedLength,"fixedLength",t,u)}),RD=de((e,u,t)=>{if(!t.isValid)return;if(!e.endsWith(u.substring))t.report(oe.endsWith,"endsWith",t,u)}),OD=de((e,u,t)=>{if(!t.isValid)return;if(!e.startsWith(u.substring))t.report(oe.startsWith,"startsWith",t,u)}),LD=de((e,u,t)=>{if(!t.isValid)return;if(be.getNestedValue(u.otherField,t)!==e){t.report(oe.sameAs,"sameAs",t,u);return}}),UD=de((e,u,t)=>{if(!t.isValid)return;if(be.getNestedValue(u.otherField,t)===e){t.report(oe.notSameAs,"notSameAs",t,u);return}}),PD=de((e,u,t)=>{if(!t.isValid)return;let r=u?.confirmationField||`${t.name}_confirmation`;if(t.parent[r]!==e){t.report(oe.confirmed,"confirmed",t,{otherField:r});return}}),MD=de((e,u,t)=>{if(!t.isValid)return;t.mutate(e.trim(),t)}),kD=de((e,u,t)=>{if(!t.isValid)return;t.mutate(Xv.default.default(e,u),t)}),VD=de((e,u,t)=>{if(!t.isValid)return;t.mutate(e.toLocaleUpperCase(u),t)}),KD=de((e,u,t)=>{if(!t.isValid)return;t.mutate(e.toLocaleLowerCase(u),t)}),GD=de((e,u,t)=>{if(!t.isValid)return;t.mutate(Nr(e),t)}),jD=de((e,u,t)=>{if(!t.isValid)return;t.mutate(Zv.default.default(e),t)}),WD=de((e,u,t)=>{if(!t.isValid)return;t.mutate(xv(e,u),t)}),HD=de((e,u,t)=>{if(!t.isValid)return;if(!(typeof u.choices==="function"?u.choices(t):u.choices).includes(e)){t.report(oe.in,"in",t,u);return}}),QD=de((e,u,t)=>{if(!t.isValid)return;if((typeof u.list==="function"?u.list(t):u.list).includes(e)){t.report(oe.notIn,"notIn",t,u);return}}),YD=de((e,u,t)=>{if(!t.isValid)return;let r=u?typeof u==="function"?u(t)?.provider||[]:u.provider:[];if(!r.length){if(!be.isCreditCard(e))t.report(oe.creditCard,"creditCard",t,{providersList:"credit"})}else if(!r.find((s)=>be.isCreditCard(e,{provider:s})))t.report(oe.creditCard,"creditCard",t,{providers:r,providersList:r.join("/")})}),zD=de((e,u,t)=>{if(!t.isValid)return;let r=typeof u==="function"?u(t).countryCode:u.countryCode;if(!r.find((s)=>be.isPassportNumber(e,s)))t.report(oe.passport,"passport",t,{countryCodes:r})}),qD=de((e,u,t)=>{if(!t.isValid)return;let r=u?typeof u==="function"?u(t)?.countryCode||[]:u.countryCode:[];if(!r.length){if(!be.isPostalCode(e,"any"))t.report(oe.postalCode,"postalCode",t)}else if(!r.find((s)=>be.isPostalCode(e,s)))t.report(oe.postalCode,"postalCode",t,{countryCodes:r})}),xD=de((e,u,t)=>{if(!t.isValid)return;if(!u||!u.version){if(!be.isUUID(e))t.report(oe.uuid,"uuid",t)}else if(!u.version.find((r)=>be.isUUID(e,r)))t.report(oe.uuid,"uuid",t,u)}),ZD=de((e,u,t)=>{if(!t.isValid)return;if(!be.isAscii(e))t.report(oe.ascii,"ascii",t)}),XD=de((e,u,t)=>{if(!t.isValid)return;if(!be.isIBAN(e))t.report(oe.iban,"iban",t)}),JD=de((e,u,t)=>{if(!t.isValid)return;if(!be.isJWT(e))t.report(oe.jwt,"jwt",t)}),ef=de((e,u,t)=>{if(!t.isValid)return;if(!be.isLatLong(e))t.report(oe.coordinates,"coordinates",t)}),W4=class e extends fr{static rules={in:HD,jwt:JD,url:SD,iban:XD,uuid:xD,trim:MD,email:FD,alpha:wD,ascii:ZD,notIn:QD,regex:BD,escape:jD,sameAs:LD,mobile:AD,string:yD,hexCode:bD,passport:zD,endsWith:RD,confirmed:PD,activeUrl:TD,minLength:ND,notSameAs:UD,maxLength:_D,ipAddress:vD,creditCard:YD,postalCode:qD,startsWith:OD,toUpperCase:VD,toLowerCase:KD,toCamelCase:GD,fixedLength:$D,coordinates:ef,normalizeUrl:WD,alphaNumeric:ID,normalizeEmail:kD};[iu]="vine.string";[Cu]=(u)=>{return typeof u==="string"};constructor(u,t){super(u,t||[yD()])}url(...u){return this.use(SD(...u))}activeUrl(){return this.use(TD())}email(...u){return this.use(FD(...u))}mobile(...u){return this.use(AD(...u))}ipAddress(u){return this.use(vD(u?{version:u}:void 0))}hexCode(){return this.use(bD())}regex(u){return this.use(BD(u))}alpha(u){return this.use(wD(u))}alphaNumeric(u){return this.use(ID(u))}minLength(u){return this.use(ND({min:u}))}maxLength(u){return this.use(_D({max:u}))}fixedLength(u){return this.use($D({size:u}))}confirmed(u){return this.use(PD(u))}trim(){return this.use(MD())}normalizeEmail(u){return this.use(kD(u))}toUpperCase(){return this.use(VD())}toLowerCase(){return this.use(KD())}toCamelCase(){return this.use(GD())}escape(){return this.use(jD())}normalizeUrl(...u){return this.use(WD(...u))}startsWith(u){return this.use(OD({substring:u}))}endsWith(u){return this.use(RD({substring:u}))}sameAs(u){return this.use(LD({otherField:u}))}notSameAs(u){return this.use(UD({otherField:u}))}in(u){return this.use(HD({choices:u}))}notIn(u){return this.use(QD({list:u}))}creditCard(...u){return this.use(YD(...u))}passport(...u){return this.use(zD(...u))}postalCode(...u){return this.use(qD(...u))}uuid(...u){return this.use(xD(...u))}ascii(){return this.use(ZD())}iban(){return this.use(XD())}jwt(){return this.use(JD())}coordinates(){return this.use(ef())}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},tf=de((e,u,t)=>{let r=u.strict?e:be.asNumber(e);if(typeof r!=="number"||Number.isNaN(r)||r===Number.POSITIVE_INFINITY||r===Number.NEGATIVE_INFINITY){t.report(oe.number,"number",t);return}t.mutate(r,t)}),uf=de((e,u,t)=>{if(!t.isValid)return;if(e<u.min)t.report(oe.min,"min",t,u)}),rf=de((e,u,t)=>{if(!t.isValid)return;if(e>u.max)t.report(oe.max,"max",t,u)}),sf=de((e,u,t)=>{if(!t.isValid)return;if(e<u.min||e>u.max)t.report(oe.range,"range",t,u)}),nf=de((e,u,t)=>{if(!t.isValid)return;if(e<0)t.report(oe.positive,"positive",t)}),af=de((e,u,t)=>{if(!t.isValid)return;if(e>=0)t.report(oe.negative,"negative",t)}),hf=de((e,u,t)=>{if(!t.isValid)return;if(!be.isDecimal(String(e),{force_decimal:u.range[0]!==0,decimal_digits:u.range.join(",")}))t.report(oe.decimal,"decimal",t,{digits:u.range.join("-")})}),lf=de((e,u,t)=>{if(!t.isValid)return;if(!Number.isInteger(e))t.report(oe.withoutDecimals,"withoutDecimals",t)}),of=de((e,u,t)=>{if(!t.isValid)return;if(!u.values.includes(e))t.report(oe["number.in"],"in",t,u)}),h8=class e extends fr{static rules={in:of,max:rf,min:uf,range:sf,number:tf,decimal:hf,negative:af,positive:nf,withoutDecimals:lf};[iu]="vine.number";[Cu]=(u)=>{let t=be.asNumber(u);return!Number.isNaN(t)};constructor(u,t){super(u,t||[tf(u||{})])}min(u){return this.use(uf({min:u}))}max(u){return this.use(rf({max:u}))}range(u){return this.use(sf({min:u[0],max:u[1]}))}positive(){return this.use(nf())}negative(){return this.use(af())}decimal(u){return this.use(hf({range:Array.isArray(u)?u:[u]}))}withoutDecimals(){return this.use(lf())}clone(){return new e(this.cloneOptions(),this.cloneValidations())}in(u){return this.use(of({values:u}))}},cf=de((e,u,t)=>{let r=u.strict===!0?e:be.asBoolean(e);if(typeof r!=="boolean"){t.report(oe.boolean,"boolean",t);return}t.mutate(r,t)}),l8=class e extends fr{static rules={boolean:cf};[iu]="vine.boolean";[Cu]=(u)=>{return typeof(this.options.strict===!0?u:be.asBoolean(u))==="boolean"};constructor(u,t){super(u,t||[cf(u||{})])}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},Df=de((e,u,t)=>{let r=e;if(typeof u.expectedValue==="boolean")r=be.asBoolean(e);else if(typeof u.expectedValue==="number")r=be.asNumber(e);if(r!==u.expectedValue){t.report(oe.literal,"literal",t,u);return}t.mutate(r,t)}),H4=class e extends fr{static rules={equals:Df};#e;constructor(u,t,r){super(t,r||[Df({expectedValue:u})]);this.#e=u}clone(){return new e(this.#e,this.cloneOptions(),this.cloneValidations())}},Q4=["on","1","yes","true",!0,1],ff=de((e,u,t)=>{if(!Q4.includes(e))t.report(oe.accepted,"accepted",t)}),Y4=class e extends fr{static rules={accepted:ff};constructor(u,t){super(u,t||[ff()])}clone(){return new e(this.cloneOptions(),this.cloneValidations())}},z4=class e{#e;#t=(u,t)=>{t.report(oe.unionGroup,"unionGroup",t)};constructor(u){this.#e=u}clone(){let u=new e(this.#e);return u.otherwise(this.#t),u}otherwise(u){return this.#t=u,this}[Ve](u,t){return{type:"group",elseConditionalFnRefId:u.trackConditional(this.#t),conditions:this.#e.map((r)=>r[Ve](u,t))}}},o8=class{#e;#t;constructor(e,u){this.#e=u,this.#t=e}[Ve](e,u){return{schema:{type:"sub_object",properties:Object.keys(this.#e).map((t)=>{return this.#e[t][Ve](t,e,u)}),groups:[]},conditionalFnRefId:e.trackConditional(this.#t)}}};function Y0(e){return new z4(e)}Y0.if=function e(u,t){return new o8(u,t)};Y0.else=function e(u){return new o8(()=>!0,u)};var q4=class e extends fr{static rules={enum:yn};#e;constructor(u,t,r){super(t,r||[yn({choices:Object.values(u)})]);this.#e=u}clone(){return new e(this.#e,this.cloneOptions(),this.cloneValidations())}},x4=class e{#e;#t=(u,t)=>{t.report(oe.unionOfTypes,"unionOfTypes",t)};constructor(u){this.#e=u}otherwise(u){return this.#t=u,this}clone(){let u=new e(this.#e);return u.otherwise(this.#t),u}[Ve](u,t,r){return{type:"union",fieldName:u,propertyName:r.toCamelCase?Nr(u):u,elseConditionalFnRefId:t.trackConditional(this.#t),conditions:this.#e.map((s)=>{return{conditionalFnRefId:t.trackConditional((n,i)=>{return s[Cu](n,i)}),schema:s[Ve](u,t,r)}})}}},Z4=class extends W0{group=Y0;union=Q0;string(){return new W4}boolean(e){return new l8(e)}accepted(){return new Y4}number(e){return new h8(e)}date(e){return new L4(e)}literal(e){return new H4(e)}object(e){return new G4(e)}array(e){return new V4(e)}tuple(e){return new k4(e)}record(e){return new j4(e)}enum(e){if(Array.isArray(e)||typeof e==="function")return new n8(e);return new q4(e)}any(){return new R4}unionOfTypes(e){let u=new Set;return e.forEach((t)=>{if(!t[Cu]||!t[iu])throw new Error(`Cannot use "${t.constructor.name}". The schema type is not compatible for use with "vine.unionOfTypes"`);if(u.has(t[iu]))throw new Error(`Cannot use duplicate schema "${t[iu]}". "vine.unionOfTypes" needs distinct schema types only`);u.add(t[iu])}),u.clear(),new x4(e)}},X4={required:oe.required,array:oe.array,object:oe.object},df=class{#e;messagesProvider;errorReporter;#t(e){let u=b4();return{compilerNode:{type:"root",schema:e[Ve]("",u,{toCamelCase:!1})},refs:u.toJSON()}}constructor(e,u){let{compilerNode:t,refs:r}=this.#t(e);this.#e={schema:t,refs:r};let s=u.metaDataValidator,n=new B4(t,{convertEmptyStringsToNull:u.convertEmptyStringsToNull,messages:X4}).compile();if(this.errorReporter=u.errorReporter,this.messagesProvider=u.messagesProvider,s)this.validate=(i,l)=>{let o=l??{},a=o.meta??{},D=o.errorReporter??this.errorReporter,h=o.messagesProvider??this.messagesProvider;return s(a),n(i,a,r,h,D())};else this.validate=(i,l)=>{let o=l??{},a=o.meta??{},D=o.errorReporter??this.errorReporter,h=o.messagesProvider??this.messagesProvider;return n(i,a,r,h,D())}}async tryValidate(e,...[u]){try{return[null,await this.validate(e,u)]}catch(t){if(t instanceof Z1)return[t,null];throw t}}toJSON(){let{schema:e,refs:u}=this.#e;return{schema:structuredClone(e),refs:u}}},J4=class extends Z4{messagesProvider=new Nv(oe,hv);errorReporter=()=>new $v;convertEmptyStringsToNull=!1;helpers=be;createRule=de;compile(e){return new df(e,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter})}withMetaData(e){return{compile:(u)=>{return new df(u,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter,metaDataValidator:e})}}}validate(e){return this.compile(e.schema).validate(e.data,e)}tryValidate(e){return this.compile(e.schema).tryValidate(e.data,e)}},eB=new J4,ve=eB,tB={APP_NAME:ve.string(),APP_ENV:ve.enum(["local","dev","stage","prod"]),APP_KEY:ve.string(),APP_URL:ve.string(),PORT:ve.number(),PORT_BACKEND:ve.number(),PORT_ADMIN:ve.number(),PORT_LIBRARY:ve.number(),PORT_DESKTOP:ve.number(),PORT_EMAIL:ve.number(),PORT_DOCS:ve.number(),PORT_INSPECT:ve.number(),PORT_API:ve.number(),PORT_SYSTEM_TRAY:ve.number(),APP_MAINTENANCE:ve.boolean(),DEBUG:ve.boolean(),API_PREFIX:ve.string(),DOCS_PREFIX:ve.string(),DB_CONNECTION:ve.enum(["mysql","sqlite","postgres"]),DB_HOST:ve.string(),DB_PORT:ve.number(),DB_DATABASE:ve.string(),DB_USERNAME:ve.string(),DB_PASSWORD:ve.string(),AWS_ACCOUNT_ID:ve.string(),AWS_ACCESS_KEY_ID:ve.string(),AWS_SECRET_ACCESS_KEY:ve.string(),AWS_DEFAULT_REGION:ve.string(),AWS_DEFAULT_PASSWORD:ve.string(),MAIL_MAILER:ve.enum(["ses","sendmail","log","smtp"]),MAIL_HOST:ve.string(),MAIL_PORT:ve.number(),MAIL_USERNAME:ve.string(),MAIL_PASSWORD:ve.string(),MAIL_ENCRYPTION:ve.string(),MAIL_FROM_NAME:ve.string(),MAIL_FROM_ADDRESS:ve.string(),SEARCH_ENGINE_DRIVER:ve.enum(["meilisearch","algolia","typesense"]),MEILISEARCH_HOST:ve.string(),MEILISEARCH_KEY:ve.string(),FRONTEND_APP_ENV:ve.enum(["development","staging","production"]),FRONTEND_APP_URL:ve.string()},uB={APP_ENV:["local","dev","development","staging","prod","production"],DB_CONNECTION:["mysql","sqlite","postgres","dynamodb"],MAIL_MAILER:["smtp","mailgun","ses","postmark","sendmail","log"],SEARCH_ENGINE_DRIVER:["opensearch"],FRONTEND_APP_ENV:["development","staging","production"]},rB=Object.entries(tB).reduce((e,[u,t])=>{let r;switch(typeof t){case"string":r=ve.string();break;case"number":r=ve.number();break;case"boolean":r=ve.boolean();break;default:if(Array.isArray(t)){r=ve.enum(t);break}if(typeof t==="object"){let n=Symbol.for("schema_name"),i=t[n];if(i==="vine.string"){r=ve.string();break}if(i==="vine.number"){r=ve.number();break}if(i==="vine.boolean"){r=ve.boolean();break}if(!i){r=ve.enum(uB.APP_ENV);break}console.error("Unknown env value type",typeof t)}throw new Error(`Invalid env value for ${u}`)}let s=u;return e[s]=r,e},{}),C3=ve.object(rB),iB={get:(e,u)=>{let t=e[u];if(typeof t==="string"&&/^\d+$/.test(t)&&u!=="AWS_ACCOUNT_ID")return Number(t);if(typeof t==="string"&&/^true|false$/.test(t))return t==="true";if(t instanceof n8)return e[u];if(t instanceof l8)return!!e[u];if(t instanceof h8)return Number(e[u]);return t}};function sB(){return typeof Bun!=="undefined"?Bun.env:p9.env}var Te=new Proxy(sB(),iB),nB={name:Te.APP_NAME??"Stacks",description:"Stacks is a full-stack framework for building modern web applications.",env:Te.APP_ENV??"local",url:Te.APP_URL??"stacks.localhost",redirectUrls:["stacksjs.com"],debug:Te.DEBUG??!1,key:Te.APP_KEY,maintenanceMode:Te.APP_MAINTENANCE??!1,docMode:!1,timezone:"America/Los_Angeles",locale:"en",fallbackLocale:"en",cipher:"aes-256-cbc"},aB={driver:"dynamodb",prefix:"stacks",ttl:3600,drivers:{dynamodb:{key:Te.AWS_ACCESS_KEY_ID||"",secret:Te.AWS_SECRET_ACCESS_KEY||"",region:Te.AWS_DEFAULT_REGION||"us-east-1",table:"cache",endpoint:""},memcached:{persistent_id:"",sasl:["",""],options:{},servers:[{host:"127.0.0.1",port:11211,weight:100}]},redis:{connection:"cache",host:"127.0.0.1",port:6379,password:"",username:"stacks"}}},hB={name:"My Custom CLI",command:"custom-cli",description:"This is an example command to illustrate how to create your own commands. Check out `../app/commands` for more.",deploy:!0},c8={firewall:{enabled:!0,countryCodes:["RU","IR"],ipAddresses:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0,queryString:[],httpHeaders:[]}},lB={sites:{root:"stacksjs.org",path:"dist",modals:{domain:"modals.stacksjs.org",path:"dist"},stepper:{domain:"stepper.stacksjs.org",path:"dist"},notification:{domain:"notification.stacksjs.org",path:"dist"},docs:{domain:"docs.stacksjs.org",path:"dist"},tlsx:{domain:"tlsx.stacksjs.org",path:"dist"},dtsx:{domain:"dtsx.stacksjs.org",path:"dist"},spreadsheet:{domain:"spreadsheet.stacksjs.org",path:"dist"}},infrastructure:{type:"serverless",driver:"aws",firewall:c8.firewall,environments:["production","staging","development"],storage:{},api:{prefix:Te.API_PREFIX||"api",description:"My awesome Stacks API",deploy:!0,memorySize:512,prewarm:10,timeout:30},cdn:{compress:!0,allowedMethods:"ALL",cachedMethods:"GET_HEAD",originShieldRegion:"us-east-1",minTtl:0,defaultTtl:86400,maxTtl:31536000,cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:1}},fileSystem:!0}},oB={default:Te.DB_CONNECTION||"sqlite",connections:{sqlite:{database:Te.DB_DATABASE||"database/stacks.sqlite",prefix:""},dynamodb:{key:Te.AWS_ACCESS_KEY_ID||"",secret:Te.AWS_SECRET_ACCESS_KEY||"",region:Te.AWS_DEFAULT_REGION||"us-east-1",prefix:Te.DB_DATABASE||"stacks",endpoint:"http://localhost",port:Te.DB_PORT||8000},mysql:{name:Te.DB_DATABASE||"stacks",host:Te.DB_HOST||"127.0.0.1",port:Te.DB_PORT||3306,username:Te.DB_USERNAME||"root",password:Te.DB_PASSWORD||"",prefix:""},postgres:{name:Te.DB_DATABASE||"stacks",host:Te.DB_HOST||"127.0.0.1",port:Te.DB_PORT||3306,username:Te.DB_USERNAME||"",password:Te.DB_PASSWORD||"",prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"},cB={a:[{name:Te.APP_URL||"",address:"10.0.0.1",ttl:300},{name:"www",address:"@",ttl:300}],aaaa:[],cname:[],mx:[],txt:[],nameservers:[]},DB={from:{name:Te.MAIL_FROM_NAME||"Stacks",address:Te.MAIL_FROM_ADDRESS||"no-reply@stacksjs.org"},mailboxes:["chris@stacksjs.org","blake@stacksjs.org","glenn@stacksjs.org"],url:Te.APP_URL||"http://localhost:3000",charset:"UTF-8",server:{scan:!0}},fB={messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}},dB={hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you’re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:`Write a SHORT, IMPERATIVE tense description of the change:
|
|
634
|
-
`,body:`Provide a LONGER description of the change (optional). Use "|" to break new line:
|
|
635
|
-
`,breaking:`List any BREAKING CHANGES (optional). Use "|" to break new line:
|
|
636
|
-
`,footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:`List any ISSUES by this change. E.g.: #31, #34:
|
|
637
|
-
`,confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: ✨ A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: ♻️ A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: ⚡️ A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: ✅ Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6️ Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don’t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: ⏪️ Reverts a previous commit",emoji:":rewind:"}]},EB={driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,threads:1,time:1}},CB={name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",releaseable:!0,vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}},pB={logsPath:p0("logs/stacks.log"),deploymentsPath:p0("logs/deployments.log")},gB={default:"email"},mB={driver:"stripe",stripe:{publishableKey:Te.STRIPE_PUBLISHABLE_KEY||"",secretKey:Te.STRIPE_SECRET_KEY||""}},yB={frontend:Te.PORT??3000,backend:Te.PORT_BACKEND??3001,admin:Te.PORT_ADMIN??3002,library:Te.PORT_LIBRARY??3003,desktop:Te.PORT_DESKTOP??3004,email:Te.PORT_EMAIL??3005,docs:Te.PORT_DOCS??3006,inspect:Te.PORT_INSPECT??3007,api:Te.PORT_API??3008,systemTray:Te.PORT_SYSTEM_TRAY??3009,database:3010},FB={default:"sync",connections:{sync:{driver:"sync"},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}},AB={plans:[{productName:"Stacks Hobby",description:"All the Stacks features.",pricing:[{key:"stacks_hobby_monthly",price:3900,interval:"month",currency:"usd"},{key:"stacks_hobby_yearly",price:37900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}},{productName:"Stacks Pro",description:"All the Stacks features, including being able to invite team members.",pricing:[{key:"stacks_pro_monthly",price:5900,interval:"month",currency:"usd"},{key:"stacks_pro_yearly",price:57900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}}],webhook:{endpoint:"/webhooks/stripe",secret:""},currencies:["usd"],coupons:[{code:"SUMMER2024",amountOff:500,duration:"once"}],products:[{name:"Stacks Pro",description:"All the Stacks features.",images:["url_to_image"]}]},vB={driver:"opensearch"},BB={aws:{accountId:Te.AWS_ACCOUNT_ID||"",appId:Te.AWS_ACCESS_KEY_ID||"",apiKey:Te.AWS_SECRET_ACCESS_KEY||"",region:Te.AWS_DEFAULT_REGION||"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},lemonSqueezy:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}},bB={driver:"s3"},SB={name:"Stacks",members:{chris:"chris@stacksjs.org",blake:"blake@stacksjs.org",zoltan:"zoltan@stacksjs.org",freddy:"freddy@stacksjs.org",glenn:"glenn@stacksjs.org",dorell:"dorell@stacksjs.org",avery:"avery@stacksjs.org",adelino:"adelino@stacksjs.org"}},TB={shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}},theme:{colors:{veryCool:"#0000ff",brand:{primary:"hsl(var(--hue, 217) 78% 51%)"}}}},wB={ai:sv,analytics:nv,app:nB,cache:aB,cli:hB,cloud:lB,database:oB,dns:cB,email:DB,errors:fB,git:dB,hashing:EB,library:CB,logging:pB,notification:gB,queue:FB,payment:mB,ports:yB,saas:AB,searchEngine:vB,security:c8,services:BB,storage:bB,team:SB,ui:TB},D8=wB;async function IB(e){if(!e?.port)e={port:3000};return console.log("Creating local tunnel",e.port),"localTunnel"}async function Br(e){return await IB({port:e})}async function NB({domain:e=vt.app.url||"stacks",type:u="frontend",localhost:t=!1,https:r=void 0,network:s=void 0}={}){let n=e.replace(/\.[^.]+$/,".localhost");switch(u){case"frontend":if(s)return await Br(vt.ports?.frontend||3000);if(t)return`http://localhost:${vt.ports?.frontend}`;break;case"backend":if(s)return await Br(vt.ports?.backend||3001);if(t)return`http://localhost:${vt.ports?.backend}`;n=`api.${n}`;break;case"admin":if(s)return await Br(vt.ports?.admin||3002);if(t)return`http://localhost:${vt.ports?.admin}`;n=`admin.${n}`;break;case"library":if(s)return await Br(vt.ports?.library||3003);if(t)return`http://localhost:${vt.ports?.library}`;n=`libs.${n}`;break;case"email":if(s)return await Br(vt.ports?.email||3005);if(t)return`http://localhost:${vt.ports?.email}`;n=`email.${n}`;break;case"desktop":if(s)return await Br(vt.ports?.desktop||3004);if(t)return`http://localhost:${vt.ports?.desktop}`;n=`desktop.${n}`;break;case"docs":if(s)return await Br(vt.ports?.docs||3006);if(t)return`http://localhost:${vt.ports?.docs}`;n=`docs.${n}`;break;case"inspect":if(s)return await Br(vt.ports?.inspect||3007);if(t)return`http://localhost:${vt.ports?.inspect}`;n=`inspect.${n}`;break;default:if(t)return`http://localhost:${vt.ports?.frontend}`}if(r)return`https://${n}`;return`http://${n}`}function _B(e){return e}function $B(e){return e}function RB(e){return e}function OB(e){return e}function LB(e){return e}function UB(e){return e}function PB(e){return e}function MB(e){return e}function kB(e){return e}function VB(e){return e}function KB(e){return e}function GB(e){return e}function jB(e){return e}function WB(e){return e}function HB(e){return e}function QB(e){return e}function YB(e){return e}function zB(e){return e}function qB(e){return e}function xB(e){return e}function ZB(e){return e}function XB(e){return e}function JB(e){return e}function e7(e){return e}function t7(e){return e}function u7(e){return e}function r7(e){return e}var ze={...q1,...D8},i7=ze.ai,s7=ze.analytics,Kr=ze.app,n7=ze.cache,a7=ze.cloud,h7=ze.cli,l7=ze.database,o7=ze.dns,c7=ze.docs,D7=ze.email,f7=ze.errors,d7=ze.git,E7=ze.hashing,C7=ze.library,p7=ze.logging,g7=ze.notification,m7=ze.payment,y7=ze.ports,F7=ze.queue,A7=ze.security,v7=ze.saas,B7=ze.searchEngine,b7=ze.services,S7=ze.storage,T7=ze.team,w7=ze.ui;function I7(){if(Kr.env==="local")return"dev";if(Kr.env==="development")return"dev";if(Kr.env==="staging")return"stage";if(Kr.env==="production")return"prod";if(!Kr.env)throw new Error("Couldn't determine app environment");return Kr.env}class f8{static isTestEnvironment=!1;static shouldExitProcess=!0;static handle(e,u){if(this.shouldExitProcess=u?.shouldExit!==!1,u?.silent!==!0)this.writeErrorToConsole(e);let t;if(u?.message)t=u.message;else if(e instanceof Error)t=e.message;else if(typeof e==="string")t=e;else t=JSON.stringify(e);let r=new Error(t);if(e instanceof Error)Object.assign(r,e);return this.writeErrorToFile(r).catch((s)=>console.error(s)),r}static handleError(e,u){return this.handle(e,u),e}static async writeErrorToFile(e){if(!(e instanceof Error)){console.error("Error is not an instance of Error:",e);return}let u=`[${new Date().toISOString()}] ${e.name}: ${e.message}
|
|
638
|
-
`,t=Yc("stacks.log")??Yc("errors.log");try{await zf(E9(t),{recursive:!0}),await Yf(t,u)}catch(r){console.error("Failed to write to error file:",r)}}static writeErrorToConsole(e){console.error(e);let u=typeof e==="string"?e:e instanceof Error?e.message:JSON.stringify(e);if(u.includes("bunx --bun cdk destroy")||u===`Failed to execute command: ${rs("bunx --bun eslint . --fix")}`||u===`Failed to execute command: ${rs("bun storage/framework/core/actions/src/lint/fix.ts")}`){if(!this.isTestEnvironment)console.log("No need to worry. The edge function is currently being destroyed. Please run `buddy undeploy` shortly again, and continue doing so until it succeeds running."),console.log("Hoping to see you back soon!")}if(this.shouldExitProcess)d9.exit(1)}}function g0(e,u){let t;if(av(e))t=e;else if(e instanceof Error)t=e.message;else if(u instanceof Error)t=u.message;else t=String(e);return Gr(`ERROR: ${Iu(t)}`),f8.handle(e,u)}async function Gr(e,u){let t=`[${new Date().toISOString()}] ${e}
|
|
639
|
-
`;try{let r=u?.logFile??vt.logging.logsPath??"storage/logs/stacks.log";try{await D9(r)}catch{await zf(f9(r),{recursive:!0})}await Yf(r,t)}catch(r){console.error("Failed to write to log file:",r)}}var N7={withStackTrace:!1},d8=(e,u,t=N7)=>{let r=u.isOk()?{type:"Ok",value:u.value}:{type:"Err",value:u.error},s=t.withStackTrace?new Error().stack:void 0;return{data:r,message:e,stack:s}};function Ei(e,u,t,r){function s(n){return n instanceof t?n:new t(function(i){i(n)})}return new(t||(t=Promise))(function(n,i){function l(D){try{a(r.next(D))}catch(h){i(h)}}function o(D){try{a(r.throw(D))}catch(h){i(h)}}function a(D){D.done?n(D.value):s(D.value).then(l,o)}a((r=r.apply(e,u||[])).next())})}function Ef(e){var u=typeof Symbol==="function"&&Symbol.iterator,t=u&&e[u],r=0;if(t)return t.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&r>=e.length)e=void 0;return{value:e&&e[r++],done:!e}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")}function ju(e){return this instanceof ju?(this.v=e,this):new ju(e)}function Cf(e,u,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t.apply(e,u||[]),s,n=[];return s=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",i),s[Symbol.asyncIterator]=function(){return this},s;function i(F){return function(p){return Promise.resolve(p).then(F,h)}}function l(F,p){if(r[F]){if(s[F]=function(f){return new Promise(function(m,B){n.push([F,f,m,B])>1||o(F,f)})},p)s[F]=p(s[F])}}function o(F,p){try{a(r[F](p))}catch(f){d(n[0][3],f)}}function a(F){F.value instanceof ju?Promise.resolve(F.value.v).then(D,h):d(n[0][2],F)}function D(F){o("next",F)}function h(F){o("throw",F)}function d(F,p){if(F(p),n.shift(),n.length)o(n[0][0],n[0][1])}}function _7(e){var u,t;return u={},r("next"),r("throw",function(s){throw s}),r("return"),u[Symbol.iterator]=function(){return this},u;function r(s,n){u[s]=e[s]?function(i){return(t=!t)?{value:ju(e[s](i)),done:!1}:n?n(i):i}:n}}function $7(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u=e[Symbol.asyncIterator],t;return u?u.call(e):(e=typeof Ef==="function"?Ef(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(i){return new Promise(function(l,o){i=e[n](i),s(l,o,i.done,i.value)})}}function s(n,i,l,o){Promise.resolve(o).then(function(a){n({value:a,done:l})},i)}}class Wt{constructor(e){this._promise=e}static fromSafePromise(e){let u=e.then((t)=>new Ku(t));return new Wt(u)}static fromPromise(e,u){let t=e.then((r)=>new Ku(r)).catch((r)=>new Tu(u(r)));return new Wt(t)}static fromThrowable(e,u){return(...t)=>{return new Wt((()=>Ei(this,void 0,void 0,function*(){try{return new Ku(yield e(...t))}catch(r){return new Tu(u?u(r):r)}}))())}}static combine(e){return R7(e)}static combineWithAllErrors(e){return O7(e)}map(e){return new Wt(this._promise.then((u)=>Ei(this,void 0,void 0,function*(){if(u.isErr())return new Tu(u.error);return new Ku(yield e(u.value))})))}andThrough(e){return new Wt(this._promise.then((u)=>Ei(this,void 0,void 0,function*(){if(u.isErr())return new Tu(u.error);let t=yield e(u.value);if(t.isErr())return new Tu(t.error);return new Ku(u.value)})))}andTee(e){return new Wt(this._promise.then((u)=>Ei(this,void 0,void 0,function*(){if(u.isErr())return new Tu(u.error);try{yield e(u.value)}catch(t){}return new Ku(u.value)})))}mapErr(e){return new Wt(this._promise.then((u)=>Ei(this,void 0,void 0,function*(){if(u.isOk())return new Ku(u.value);return new Tu(yield e(u.error))})))}andThen(e){return new Wt(this._promise.then((u)=>{if(u.isErr())return new Tu(u.error);let t=e(u.value);return t instanceof Wt?t._promise:t}))}orElse(e){return new Wt(this._promise.then((u)=>Ei(this,void 0,void 0,function*(){if(u.isErr())return e(u.error);return new Ku(u.value)})))}match(e,u){return this._promise.then((t)=>t.match(e,u))}unwrapOr(e){return this._promise.then((u)=>u.unwrapOr(e))}safeUnwrap(){return Cf(this,arguments,function*e(){return yield ju(yield ju(yield*_7($7(yield ju(this._promise.then((u)=>u.safeUnwrap()))))))})}then(e,u){return this._promise.then(e,u)}[Symbol.asyncIterator](){return Cf(this,arguments,function*e(){let u=yield ju(this._promise);if(u.isErr())yield yield ju(dn(u.error));return yield ju(u.value)})}}var dn=(e)=>new Wt(Promise.resolve(new Tu(e))),p3=Wt.fromPromise,g3=Wt.fromSafePromise,m3=Wt.fromThrowable,E8=(e)=>{let u=Sr([]);for(let t of e)if(t.isErr()){u=wu(t.error);break}else u.map((r)=>r.push(t.value));return u},R7=(e)=>Wt.fromSafePromise(Promise.all(e)).andThen(E8),C8=(e)=>{let u=Sr([]);for(let t of e)if(t.isErr()&&u.isErr())u.error.push(t.error);else if(t.isErr()&&u.isOk())u=wu([t.error]);else if(t.isOk()&&u.isOk())u.value.push(t.value);return u},O7=(e)=>Wt.fromSafePromise(Promise.all(e)).andThen(C8),m0;(function(e){function u(s,n){return(...i)=>{try{let l=s(...i);return Sr(l)}catch(l){return wu(n?n(l):l)}}}e.fromThrowable=u;function t(s){return E8(s)}e.combine=t;function r(s){return C8(s)}e.combineWithAllErrors=r})(m0||(m0={}));var Sr=(e)=>new Ku(e);function wu(e){return new Tu(e)}class Ku{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return Sr(e(this.value))}mapErr(e){return Sr(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map((u)=>this.value)}andTee(e){try{e(this.value)}catch(u){}return Sr(this.value)}orElse(e){return Sr(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return Wt.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,u){return e(this.value)}safeUnwrap(){let e=this.value;return function*(){return e}()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw d8("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}}class Tu{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return wu(this.error)}mapErr(e){return wu(e(this.error))}andThrough(e){return wu(this.error)}andTee(e){return wu(this.error)}andThen(e){return wu(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return dn(this.error)}asyncAndThrough(e){return dn(this.error)}asyncMap(e){return dn(this.error)}unwrapOr(e){return e}match(e,u){return u(this.error)}safeUnwrap(){let e=this.error;return function*(){throw yield wu(e),new Error("Do not use this generator out of `safeTry`")}()}_unsafeUnwrap(e){throw d8("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){let e=this;return yield e,e}}var y3=m0.fromThrowable,L7=je(IA(),1);async function U7(e,u){let t=Array.isArray(e)?e:e.match(/(?:[^\s"]|"[^"]*")+/g);if(hr.debug("exec:",Array.isArray(e)?e.join(" "):e,u),hr.debug("cmd:",t),!t)return wu(g0(`Failed to parse command: ${t}`,u));let r=u?.cwd??h0.cwd(),s=Bun.spawn(t,{stdin:u?.stdin??"inherit",stdout:u?.silent||u?.quiet?"ignore":u?.stdin?u.stdin:u?.stdout||"inherit",stderr:u?.silent||u?.quiet?"ignore":u?.stderr||"inherit",cwd:r,onExit(n,i,l,o){P7("spawn",n,i,l,o)}});if(u?.stdin==="pipe"&&u.input){if(s.stdin)s.stdin.write(u.input),s.stdin.end()}if(await s.exited===0)return Sr(s);return wu(g0(`Failed to execute command: ${rs(t.join(" "))} in ${rs(r)}`,u))}function P7(e,u,t,r,s){if(hr.debug(`exitHandler: ${e}`),hr.debug("subprocess",u),hr.debug("exitCode",t),hr.debug("signalCode",r),s)hr.error(s),h0.exit(1);if(t!==0&&t)h0.exit(t)}async function ln(e,u){hr.debug("runCommand:",e,u);let t={...u,stdio:u?.stdio??[u?.stdin??"inherit","pipe","pipe"],verbose:u?.verbose??!1};return await U7(e,t)}var M7={};_0(M7,{yellow:()=>x7,white:()=>eb,underline:()=>j7,trueColorBg:()=>Sb,trueColor:()=>bb,stripColors:()=>k7,strikethrough:()=>Q7,reset:()=>V7,red:()=>z7,options:()=>vi,magenta:()=>X7,link:()=>Tb,lightYellow:()=>sb,lightRed:()=>rb,lightMagenta:()=>ab,lightGreen:()=>ib,lightGray:()=>ub,lightCyan:()=>hb,lightBlue:()=>nb,italic:()=>rs,inverse:()=>W7,hidden:()=>H7,green:()=>q7,gray:()=>tb,dim:()=>G7,cyan:()=>J7,bold:()=>K7,blue:()=>Z7,black:()=>Y7,bgYellow:()=>Db,bgWhite:()=>Cb,bgRed:()=>ob,bgMagenta:()=>db,bgLightYellow:()=>yb,bgLightRed:()=>gb,bgLightMagenta:()=>Ab,bgLightGreen:()=>mb,bgLightGray:()=>Bb,bgLightCyan:()=>vb,bgLightBlue:()=>Fb,bgGreen:()=>cb,bgGray:()=>pb,bgCyan:()=>Eb,bgBlue:()=>fb,bgBlack:()=>lb,ansi256Bg:()=>m8,ansi256:()=>g8});var jr=!0,Ci=typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:{},ts=0;if(Ci.process&&Ci.process.env&&Ci.process.stdout){let{FORCE_COLOR:e,NODE_DISABLE_COLORS:u,NO_COLOR:t,TERM:r,COLORTERM:s}=Ci.process.env;if(u||t||e==="0")jr=!1;else if(e==="1"||e==="2"||e==="3")jr=!0;else if(r==="dumb")jr=!1;else if("CI"in Ci.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((n)=>(n in Ci.process.env)))jr=!0;else jr=process.stdout.isTTY;if(jr)if(process.platform==="win32")ts=3;else if(s&&(s==="truecolor"||s==="24bit"))ts=3;else if(r&&(r.endsWith("-256color")||r.endsWith("256")))ts=2;else ts=1}var vi={enabled:jr,supportLevel:ts};function _e(e,u,t=1){let r=`\x1B[${e}m`,s=`\x1B[${u}m`,n=new RegExp(`\\x1b\\[${u}m`,"g");return(i)=>{return vi.enabled&&vi.supportLevel>=t?r+(""+i).replace(n,r)+s:""+i}}function p8(e,u,t){if(e>>4===u>>4&&u>>4===t>>4){if(e<8)return 16;if(e>248)return 231;return Math.round((e-8)/247*24)+232}return 16+36*Math.round(e/255*5)+6*Math.round(u/255*5)+Math.round(t/255*5)}function k7(e){return(""+e).replace(/\x1b\[[0-9;]+m/g,"").replace(/\x1b\]8;;.*?\x07(.*?)\x1b\]8;;\x07/g,(u,t)=>t)}var V7=_e(0,0),K7=_e(1,22),G7=_e(2,22),rs=_e(3,23),j7=_e(4,24),W7=_e(7,27),H7=_e(8,28),Q7=_e(9,29),Y7=_e(30,39),z7=_e(31,39),q7=_e(32,39),x7=_e(33,39),Z7=_e(34,39),X7=_e(35,39),J7=_e(36,39),eb=_e(97,39),tb=_e(90,39),ub=_e(37,39),rb=_e(91,39),ib=_e(92,39),sb=_e(93,39),nb=_e(94,39),ab=_e(95,39),hb=_e(96,39),lb=_e(40,49),ob=_e(41,49),cb=_e(42,49),Db=_e(43,49),fb=_e(44,49),db=_e(45,49),Eb=_e(46,49),Cb=_e(107,49),pb=_e(100,49),gb=_e(101,49),mb=_e(102,49),yb=_e(103,49),Fb=_e(104,49),Ab=_e(105,49),vb=_e(106,49),Bb=_e(47,49),g8=(e)=>_e("38;5;"+e,0,2),m8=(e)=>_e("48;5;"+e,0,2),bb=(e,u,t)=>{return vi.supportLevel===2?g8(p8(e,u,t)):_e(`38;2;${e};${u};${t}`,0,3)},Sb=(e,u,t)=>{return vi.supportLevel===2?m8(p8(e,u,t)):_e(`48;2;${e};${u};${t}`,0,3)},pf="\x1B]",gf="\x07",on=";";function Tb(e,u){return vi.enabled?pf+"8"+on+on+u+gf+e+pf+"8"+on+on+gf:`${e} (${u})`}function y8(e){if(Array.isArray(e)){if(e=Array.from(new Set(e)),Array.isArray(e)&&e[0]&&!e[0].startsWith("-"))e.shift();return e.join(" ")}if(typeof e==="object"&&e!==null)return Object.entries(e).map(([u,t])=>{if(t===!0)return`--${u}`;return`--${u} ${t}`}).join(" ");return y8(g9.argv.slice(2))}var u0=10,mf=(e=0)=>(u)=>`\x1B[${u+e}m`,yf=(e=0)=>(u)=>`\x1B[${38+e};5;${u}m`,Ff=(e=0)=>(u,t,r)=>`\x1B[${38+e};2;${u};${t};${r}m`,st={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},F3=Object.keys(st.modifier),wb=Object.keys(st.color),Ib=Object.keys(st.bgColor),A3=[...wb,...Ib];function Nb(){let e=new Map;for(let[u,t]of Object.entries(st)){for(let[r,s]of Object.entries(t))st[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},t[r]=st[r],e.set(s[0],s[1]);Object.defineProperty(st,u,{value:t,enumerable:!1})}return Object.defineProperty(st,"codes",{value:e,enumerable:!1}),st.color.close="\x1B[39m",st.bgColor.close="\x1B[49m",st.color.ansi=mf(),st.color.ansi256=yf(),st.color.ansi16m=Ff(),st.bgColor.ansi=mf(u0),st.bgColor.ansi256=yf(u0),st.bgColor.ansi16m=Ff(u0),Object.defineProperties(st,{rgbToAnsi256:{value(u,t,r){if(u===t&&t===r){if(u<8)return 16;if(u>248)return 231;return Math.round((u-8)/247*24)+232}return 16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(u){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[r]=t;if(r.length===3)r=[...r].map((n)=>n+n).join("");let s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:(u)=>st.rgbToAnsi256(...st.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value(u){if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,r,s;if(u>=232)t=((u-232)*10+8)/255,r=t,s=t;else{u-=16;let l=u%36;t=Math.floor(u/36)/5,r=Math.floor(l/6)/5,s=l%6/5}let n=Math.max(t,r,s)*2;if(n===0)return 30;let i=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(t));if(n===2)i+=60;return i},enumerable:!1},rgbToAnsi:{value:(u,t,r)=>st.ansi256ToAnsi(st.rgbToAnsi256(u,t,r)),enumerable:!1},hexToAnsi:{value:(u)=>st.ansi256ToAnsi(st.hexToAnsi256(u)),enumerable:!1}}),st}var _b=Nb(),Gu=_b;function Eu(e,u=globalThis.Deno?globalThis.Deno.args:N0.argv){let t=e.startsWith("-")?"":e.length===1?"-":"--",r=u.indexOf(t+e),s=u.indexOf("--");return r!==-1&&(s===-1||r<s)}var{env:ot}=N0,Fn;if(Eu("no-color")||Eu("no-colors")||Eu("color=false")||Eu("color=never"))Fn=0;else if(Eu("color")||Eu("colors")||Eu("color=true")||Eu("color=always"))Fn=1;function $b(){if("FORCE_COLOR"in ot){if(ot.FORCE_COLOR==="true")return 1;if(ot.FORCE_COLOR==="false")return 0;return ot.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ot.FORCE_COLOR,10),3)}}function Rb(e){if(e===0)return!1;return{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Ob(e,{streamIsTTY:u,sniffFlags:t=!0}={}){let r=$b();if(r!==void 0)Fn=r;let s=t?Fn:r;if(s===0)return 0;if(t){if(Eu("color=16m")||Eu("color=full")||Eu("color=truecolor"))return 3;if(Eu("color=256"))return 2}if("TF_BUILD"in ot&&"AGENT_NAME"in ot)return 1;if(e&&!u&&s===void 0)return 0;let n=s||0;if(ot.TERM==="dumb")return n;if(N0.platform==="win32"){let i=m9.release().split(".");if(Number(i[0])>=10&&Number(i[2])>=10586)return Number(i[2])>=14931?3:2;return 1}if("CI"in ot){if("GITHUB_ACTIONS"in ot||"GITEA_ACTIONS"in ot)return 3;if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((i)=>(i in ot))||ot.CI_NAME==="codeship")return 1;return n}if("TEAMCITY_VERSION"in ot)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ot.TEAMCITY_VERSION)?1:0;if(ot.COLORTERM==="truecolor")return 3;if(ot.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in ot){let i=Number.parseInt((ot.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ot.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(ot.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ot.TERM))return 1;if("COLORTERM"in ot)return 1;return n}function Af(e,u={}){let t=Ob(e,{streamIsTTY:e&&e.isTTY,...u});return Rb(t)}var Lb={stdout:Af({isTTY:Fc.isatty(1)}),stderr:Af({isTTY:Fc.isatty(2)})},Ub=Lb;function Pb(e,u,t){let r=e.indexOf(u);if(r===-1)return e;let s=u.length,n=0,i="";do i+=e.slice(n,r)+u+t,n=r+s,r=e.indexOf(u,n);while(r!==-1);return i+=e.slice(n),i}function Mb(e,u,t,r){let s=0,n="";do{let i=e[r-1]==="\r";n+=e.slice(s,i?r-1:r)+u+(i?`\r
|
|
640
|
-
`:`
|
|
641
|
-
`)+t,s=r+1,r=e.indexOf(`
|
|
642
|
-
`,s)}while(r!==-1);return n+=e.slice(s),n}var{stdout:vf,stderr:Bf}=Ub,y0=Symbol("GENERATOR"),Bi=Symbol("STYLER"),is=Symbol("IS_EMPTY"),bf=["ansi","ansi","ansi256","ansi16m"],bi=Object.create(null),kb=(e,u={})=>{if(u.level&&!(Number.isInteger(u.level)&&u.level>=0&&u.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=vf?vf.level:0;e.level=u.level===void 0?t:u.level},Vb=(e)=>{let u=(...t)=>t.join(" ");return kb(u,e),Object.setPrototypeOf(u,fs.prototype),u};function fs(e){return Vb(e)}Object.setPrototypeOf(fs.prototype,Function.prototype);for(let[e,u]of Object.entries(Gu))bi[e]={get(){let t=An(this,A0(u.open,u.close,this[Bi]),this[is]);return Object.defineProperty(this,e,{value:t}),t}};bi.visible={get(){let e=An(this,this[Bi],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var F0=(e,u,t,...r)=>{if(e==="rgb"){if(u==="ansi16m")return Gu[t].ansi16m(...r);if(u==="ansi256")return Gu[t].ansi256(Gu.rgbToAnsi256(...r));return Gu[t].ansi(Gu.rgbToAnsi(...r))}if(e==="hex")return F0("rgb",u,t,...Gu.hexToRgb(...r));return Gu[t][e](...r)},Kb=["rgb","hex","ansi256"];for(let e of Kb){bi[e]={get(){let{level:t}=this;return function(...r){let s=A0(F0(e,bf[t],"color",...r),Gu.color.close,this[Bi]);return An(this,s,this[is])}}};let u="bg"+e[0].toUpperCase()+e.slice(1);bi[u]={get(){let{level:t}=this;return function(...r){let s=A0(F0(e,bf[t],"bgColor",...r),Gu.bgColor.close,this[Bi]);return An(this,s,this[is])}}}}var Gb=Object.defineProperties(()=>{},{...bi,level:{enumerable:!0,get(){return this[y0].level},set(e){this[y0].level=e}}}),A0=(e,u,t)=>{let r,s;if(t===void 0)r=e,s=u;else r=t.openAll+e,s=u+t.closeAll;return{open:e,close:u,openAll:r,closeAll:s,parent:t}},An=(e,u,t)=>{let r=(...s)=>jb(r,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(r,Gb),r[y0]=e,r[Bi]=u,r[is]=t,r},jb=(e,u)=>{if(e.level<=0||!u)return e[is]?"":u;let t=e[Bi];if(t===void 0)return u;let{openAll:r,closeAll:s}=t;if(u.includes("\x1B"))while(t!==void 0)u=Pb(u,t.close,t.open),t=t.parent;let n=u.indexOf(`
|
|
643
|
-
`);if(n!==-1)u=Mb(u,s,r,n);return r+u+s};Object.defineProperties(fs.prototype,bi);var Wb=fs(),v3=fs({level:Bf?Bf.level:0}),lr=Wb,Hb=(e,u,t,r)=>{if(t==="length"||t==="prototype")return;if(t==="arguments"||t==="caller")return;let s=Object.getOwnPropertyDescriptor(e,t),n=Object.getOwnPropertyDescriptor(u,t);if(!Qb(s,n)&&r)return;Object.defineProperty(e,t,n)},Qb=function(e,u){return e===void 0||e.configurable||e.writable===u.writable&&e.enumerable===u.enumerable&&e.configurable===u.configurable&&(e.writable||e.value===u.value)},Yb=(e,u)=>{let t=Object.getPrototypeOf(u);if(t===Object.getPrototypeOf(e))return;Object.setPrototypeOf(e,t)},zb=(e,u)=>`/* Wrapped ${e}*/
|
|
644
|
-
${u}`,qb=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),xb=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Zb=(e,u,t)=>{let r=t===""?"":`with ${t.trim()}() `,s=zb.bind(null,r,u.toString());Object.defineProperty(s,"name",xb);let{writable:n,enumerable:i,configurable:l}=qb;Object.defineProperty(e,"toString",{value:s,writable:n,enumerable:i,configurable:l})};function Xb(e,u,{ignoreNonConfigurable:t=!1}={}){let{name:r}=e;for(let s of Reflect.ownKeys(u))Hb(e,u,s,t);return Yb(e,u),Zb(e,u,r),e}var vn=new WeakMap,F8=(e,u={})=>{if(typeof e!=="function")throw new TypeError("Expected a function");let t,r=0,s=e.displayName||e.name||"<anonymous>",n=function(...i){if(vn.set(n,++r),r===1)t=e.apply(this,i),e=void 0;else if(u.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return t};return Xb(n,e),vn.set(n,r),n};F8.callCount=(e)=>{if(!vn.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return vn.get(e)};var Jb=F8,yi=[];yi.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")yi.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")yi.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var En=(e)=>!!e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function",r0=Symbol.for("signal-exit emitter"),i0=globalThis,eS=Object.defineProperty.bind(Object);class A8{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(i0[r0])return i0[r0];eS(i0,r0,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,u){this.listeners[e].push(u)}removeListener(e,u){let t=this.listeners[e],r=t.indexOf(u);if(r===-1)return;if(r===0&&t.length===1)t.length=0;else t.splice(r,1)}emit(e,u,t){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let s of this.listeners[e])r=s(u,t)===!0||r;if(e==="exit")r=this.emit("afterExit",u,t)||r;return r}}class z0{}var tS=(e)=>{return{onExit(u,t){return e.onExit(u,t)},load(){return e.load()},unload(){return e.unload()}}};class v8 extends z0{onExit(){return()=>{}}load(){}unload(){}}class B8 extends z0{#e=v0.platform==="win32"?"SIGINT":"SIGHUP";#t=new A8;#u;#r;#i;#n={};#s=!1;constructor(e){super();this.#u=e,this.#n={};for(let u of yi)this.#n[u]=()=>{let t=this.#u.listeners(u),{count:r}=this.#t,s=e;if(typeof s.__signal_exit_emitter__==="object"&&typeof s.__signal_exit_emitter__.count==="number")r+=s.__signal_exit_emitter__.count;if(t.length===r){this.unload();let n=this.#t.emit("exit",null,u),i=u==="SIGHUP"?this.#e:u;if(!n)e.kill(e.pid,i)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,u){if(!En(this.#u))return()=>{};if(this.#s===!1)this.load();let t=u?.alwaysLast?"afterExit":"exit";return this.#t.on(t,e),()=>{if(this.#t.removeListener(t,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0)this.unload()}}load(){if(this.#s)return;this.#s=!0,this.#t.count+=1;for(let e of yi)try{let u=this.#n[e];if(u)this.#u.on(e,u)}catch(u){}this.#u.emit=(e,...u)=>{return this.#f(e,...u)},this.#u.reallyExit=(e)=>{return this.#a(e)}}unload(){if(!this.#s)return;this.#s=!1,yi.forEach((e)=>{let u=this.#n[e];if(!u)throw new Error("Listener not defined for signal: "+e);try{this.#u.removeListener(e,u)}catch(t){}}),this.#u.emit=this.#r,this.#u.reallyExit=this.#i,this.#t.count-=1}#a(e){if(!En(this.#u))return 0;return this.#u.exitCode=e||0,this.#t.emit("exit",this.#u.exitCode,null),this.#i.call(this.#u,this.#u.exitCode)}#f(e,...u){let t=this.#r;if(e==="exit"&&En(this.#u)){if(typeof u[0]==="number")this.#u.exitCode=u[0];let r=t.call(this.#u,e,...u);return this.#t.emit("exit",this.#u.exitCode,null),r}else return t.call(this.#u,e,...u)}}var v0=globalThis.process,{onExit:uS,load:B3,unload:b3}=tS(En(v0)?new B8(v0):new v8),Sf=tn.stderr.isTTY?tn.stderr:tn.stdout.isTTY?tn.stdout:void 0,rS=Sf?Jb(()=>{uS(()=>{Sf.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},iS=rS,Bn=!1,Fi={};Fi.show=(e=qf.stderr)=>{if(!e.isTTY)return;Bn=!1,e.write("\x1B[?25h")};Fi.hide=(e=qf.stderr)=>{if(!e.isTTY)return;iS(),Bn=!0,e.write("\x1B[?25l")};Fi.toggle=(e,u)=>{if(e!==void 0)Bn=e;if(Bn)Fi.show(u);else Fi.hide(u)};var Tf=Fi,cn=je(G1(),1);function sS(){if(Su.platform!=="win32")return Su.env.TERM!=="linux";return Boolean(Su.env.CI)||Boolean(Su.env.WT_SESSION)||Boolean(Su.env.TERMINUS_SUBLIME)||Su.env.ConEmuTask==="{cmd::Cmder}"||Su.env.TERM_PROGRAM==="Terminus-Sublime"||Su.env.TERM_PROGRAM==="vscode"||Su.env.TERM==="xterm-256color"||Su.env.TERM==="alacritty"||Su.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var nS={info:lr.blue("ℹ"),success:lr.green("✔"),warning:lr.yellow("⚠"),error:lr.red("✖")},aS={info:lr.blue("i"),success:lr.green("√"),warning:lr.yellow("‼"),error:lr.red("×")},hS=sS()?nS:aS,Dn=hS;function lS({onlyFirst:e=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(u,e?void 0:"g")}var oS=lS();function b8(e){if(typeof e!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(oS,"")}function cS(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function DS(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function fS(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function dS(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function ES(e,{ambiguousAsWide:u=!1}={}){if(dS(e),DS(e)||fS(e)||u&&cS(e))return 2;return 1}var CS=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g},pS=new Intl.Segmenter,gS=/^\p{Default_Ignorable_Code_Point}$/u;function mS(e,u={}){if(typeof e!=="string"||e.length===0)return 0;let{ambiguousIsNarrow:t=!0,countAnsiEscapeCodes:r=!1}=u;if(!r)e=b8(e);if(e.length===0)return 0;let s=0,n={ambiguousAsWide:!t};for(let{segment:i}of pS.segment(e)){let l=i.codePointAt(0);if(l<=31||l>=127&&l<=159)continue;if(l>=8203&&l<=8207||l===65279)continue;if(l>=768&&l<=879||l>=6832&&l<=6911||l>=7616&&l<=7679||l>=8400&&l<=8447||l>=65056&&l<=65071)continue;if(l>=55296&&l<=57343)continue;if(l>=65024&&l<=65039)continue;if(gS.test(i))continue;if(CS().test(i)){s+=2;continue}s+=ES(l,n)}return s}function yS({stream:e=process.stdout}={}){return Boolean(e&&e.isTTY&&!0&&!("CI"in process.env))}function FS(){let{env:e}=Ac,{TERM:u,TERM_PROGRAM:t}=e;if(Ac.platform!=="win32")return u!=="linux";return Boolean(e.WT_SESSION)||Boolean(e.TERMINUS_SUBLIME)||e.ConEmuTask==="{cmd::Cmder}"||t==="Terminus-Sublime"||t==="vscode"||u==="xterm-256color"||u==="alacritty"||u==="rxvt-unicode"||u==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var AS=3;class S8{#e=0;start(){if(this.#e++,this.#e===1)this.#t()}stop(){if(this.#e<=0)throw new Error("`stop` called more times than `start`");if(this.#e--,this.#e===0)this.#u()}#t(){if(ku.platform==="win32"||!ku.stdin.isTTY)return;ku.stdin.setRawMode(!0),ku.stdin.on("data",this.#r),ku.stdin.resume()}#u(){if(!ku.stdin.isTTY)return;ku.stdin.off("data",this.#r),ku.stdin.pause(),ku.stdin.setRawMode(!1)}#r(e){if(e[0]===AS)ku.emit("SIGINT")}}var vS=new S8,wf=vS,S3=je(G1(),1);class BS{#e=0;#t=!1;#u=0;#r=0;#i;#n;#s;#a;#f;#o;#c;#D;#E;#h;#l;color;constructor(e){if(typeof e==="string")e={text:e};if(this.#i={color:"cyan",stream:en.stderr,discardStdin:!0,hideCursor:!0,...e},this.color=this.#i.color,this.spinner=this.#i.spinner,this.#f=this.#i.interval,this.#s=this.#i.stream,this.#o=typeof this.#i.isEnabled==="boolean"?this.#i.isEnabled:yS({stream:this.#s}),this.#c=typeof this.#i.isSilent==="boolean"?this.#i.isSilent:!1,this.text=this.#i.text,this.prefixText=this.#i.prefixText,this.suffixText=this.#i.suffixText,this.indent=this.#i.indent,en.env.NODE_ENV==="test")this._stream=this.#s,this._isEnabled=this.#o,Object.defineProperty(this,"_linesToClear",{get(){return this.#e},set(u){this.#e=u}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#r}}),Object.defineProperty(this,"_lineCount",{get(){return this.#u}})}get indent(){return this.#D}set indent(e=0){if(!(e>=0&&Number.isInteger(e)))throw new Error("The `indent` option must be an integer from 0 and up");this.#D=e,this.#d()}get interval(){return this.#f??this.#n.interval??100}get spinner(){return this.#n}set spinner(e){if(this.#r=0,this.#f=void 0,typeof e==="object"){if(e.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#n=e}else if(!FS())this.#n=cn.default.line;else if(e===void 0)this.#n=cn.default.dots;else if(e!=="default"&&cn.default[e])this.#n=cn.default[e];else throw new Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#E}set text(e=""){this.#E=e,this.#d()}get prefixText(){return this.#h}set prefixText(e=""){this.#h=e,this.#d()}get suffixText(){return this.#l}set suffixText(e=""){this.#l=e,this.#d()}get isSpinning(){return this.#a!==void 0}#C(e=this.#h,u=" "){if(typeof e==="string"&&e!=="")return e+u;if(typeof e==="function")return e()+u;return""}#p(e=this.#l,u=" "){if(typeof e==="string"&&e!=="")return u+e;if(typeof e==="function")return u+e();return""}#d(){let e=this.#s.columns??80,u=this.#C(this.#h,"-"),t=this.#p(this.#l,"-"),r=" ".repeat(this.#D)+u+"--"+this.#E+"--"+t;this.#u=0;for(let s of b8(r).split(`
|
|
645
|
-
`))this.#u+=Math.max(1,Math.ceil(mS(s,{countAnsiEscapeCodes:!0})/e))}get isEnabled(){return this.#o&&!this.#c}set isEnabled(e){if(typeof e!=="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#o=e}get isSilent(){return this.#c}set isSilent(e){if(typeof e!=="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#c=e}frame(){let{frames:e}=this.#n,u=e[this.#r];if(this.color)u=lr[this.color](u);this.#r=++this.#r%e.length;let t=typeof this.#h==="string"&&this.#h!==""?this.#h+" ":"",r=typeof this.text==="string"?" "+this.text:"",s=typeof this.#l==="string"&&this.#l!==""?" "+this.#l:"";return t+u+r+s}clear(){if(!this.#o||!this.#s.isTTY)return this;this.#s.cursorTo(0);for(let e=0;e<this.#e;e++){if(e>0)this.#s.moveCursor(0,-1);this.#s.clearLine(1)}if(this.#D||this.lastIndent!==this.#D)this.#s.cursorTo(this.#D);return this.lastIndent=this.#D,this.#e=0,this}render(){if(this.#c)return this;return this.clear(),this.#s.write(this.frame()),this.#e=this.#u,this}start(e){if(e)this.text=e;if(this.#c)return this;if(!this.#o){if(this.text)this.#s.write(`- ${this.text}
|
|
646
|
-
`);return this}if(this.isSpinning)return this;if(this.#i.hideCursor)Tf.hide(this.#s);if(this.#i.discardStdin&&en.stdin.isTTY)this.#t=!0,wf.start();return this.render(),this.#a=setInterval(this.render.bind(this),this.interval),this}stop(){if(!this.#o)return this;if(clearInterval(this.#a),this.#a=void 0,this.#r=0,this.clear(),this.#i.hideCursor)Tf.show(this.#s);if(this.#i.discardStdin&&en.stdin.isTTY&&this.#t)wf.stop(),this.#t=!1;return this}succeed(e){return this.stopAndPersist({symbol:Dn.success,text:e})}fail(e){return this.stopAndPersist({symbol:Dn.error,text:e})}warn(e){return this.stopAndPersist({symbol:Dn.warning,text:e})}info(e){return this.stopAndPersist({symbol:Dn.info,text:e})}stopAndPersist(e={}){if(this.#c)return this;let u=e.prefixText??this.#h,t=this.#C(u," "),r=e.symbol??" ",s=e.text??this.text,n=typeof s==="string"?" "+s:"",i=e.suffixText??this.#l,l=this.#p(i," "),o=t+r+n+l+`
|
|
647
|
-
`;return this.stop(),this.#s.write(o),this}}function If(e){if(Array.isArray(e))return[...e];return{...e}}function bS(e){if(Array.isArray(e))return e;return[e]}function s0(e,...u){bS(u).forEach((t)=>{delete e[t]})}var br=(e)=>Array.isArray(e);function nr(e){return typeof e==="object"&&!Array.isArray(e)&&e!==null}var ru=(e)=>typeof e==="function";function pi(e,u){try{return u.split(".").reduce((t,r)=>t[r],e)}catch(t){return e}}function Ji(e){if(Array.isArray(e))return[...e];if("all"in e&&typeof e.all==="function")return e.all();return Object.values(e)}function SS(e){return new He(e)}class He{items;constructor(e=[]){this.items=e}[Symbol.iterator]=wS;toJSON(){return this.items}all(){return this.items}average(e){if(e===void 0)return this.sum()/Number(this.items.length);if(ru(e))return Number(new this.constructor(this.items).sum(e))/Number(this.items.length);return Number(new this.constructor(this.items).pluck(e).sum())/Number(this.items.length)}avg=this.average;chunk(e){let u=[],t=Array.isArray(this.items)?this.items:Object.values(this.items);for(let r=0;r<t.length;r+=e)u.push(t.slice(r,r+e));return new He(u)}collapse(){return new this.constructor([].concat(...this.items))}combine(e){if(typeof e==="string")e=[e];if(!Array.isArray(e))throw new TypeError("The values must be an array or a string");let u={};return(Array.isArray(this.items)?this.items:Object.keys(this.items)).forEach((t,r)=>{if(e[r]!==void 0)u[t]=e[r]}),new He(u)}concat(e){let u=e;if(e instanceof this.constructor)u=e.all();else if(typeof e==="object")u=[],Object.keys(e).forEach((r)=>{u.push(e[r])});let t=If(this.items);return u.forEach((r)=>{if(typeof r==="object")Object.keys(r).forEach((s)=>t.push(r[s]));else t.push(r)}),new this.constructor(t)}contains(e,u){if(typeof e==="function")return this.items.some(e);if(Array.isArray(this.items))return this.items.includes(e);if(u!==void 0){if(Array.isArray(this.items))return this.items.some((t)=>t[e]!==void 0&&t[e]===u);return e in this.items&&this.items[e]===u}if(Array.isArray(this.items))return this.items.includes(e);return Object.values(this.items).includes(e)}containsOneItem(){if(typeof this.items==="string")return!0;return Object.keys(this.items).length===1}count(e){if(e)return this.filter(e).count();return Object.keys(this.items).length}countBy(e){let u={};return this.each((t)=>{let r=e?e(t):t;u[r]=(u[r]||0)+1}),new He(u)}crossJoin(...e){function u(t,r,s){let n=s[0];if(n instanceof He)n=n.all();let i=s.slice(1),l=!i.length,o=[];for(let a=0;a<n.length;a+=1){let D=t.slice();if(D.push(n[a]),l)o.push(D);else o=o.concat(u(D,r,i))}return o}return new this.constructor(u([],this.constructor,[].concat([this.items],e)))}dd(){console.log(JSON.stringify(this.all(),null,2)),y9.exit()}diff(e){let u;if(e instanceof this.constructor)u=e.all();else u=e;let t=this.items.filter((r)=>!u.includes(r));return new this.constructor(t)}diffAssoc(e){let u=e;if(e instanceof this.constructor)u=e.all();let t={};return Object.keys(this.items).forEach((r)=>{if(u[r]===void 0||u[r]!==this.items[r])t[r]=this.items[r]}),new this.constructor(t)}diffKeys(e){let u;if(e instanceof this.constructor)u=e.all();else u=e;let t=Object.keys(u),r=Object.keys(this.items).filter((s)=>!t.includes(s));return new this.constructor(this.items).only(r)}diffUsing(e,u){if(console.log("Original collection:",this.items),console.log("Array to compare:",e),e===null)return new He(this.items);let t=this.items.filter((r)=>{return e.findIndex((s)=>{return u(r,s)===0})===-1});return new He(t)}doesntContain(e,u){if(console.log("doesntContain called with:",{key:e,value:u}),typeof e==="function")return console.log("Function branch"),!this.contains(e);if(u!==void 0)return console.log("Key-value pair branch"),!this.contains((t)=>{return console.log("Comparing:",t[e],"with",u),t[e]===u});return console.log("Single value branch"),!this.contains(e)}dump(){return console.log(this.items),this}duplicates(){let e=[],u={},t=(r)=>{if(Array.isArray(r)||typeof r==="object")return JSON.stringify(r);return r};if(Array.isArray(this.items))this.items.forEach((r,s)=>{let n=t(r);if(!e.includes(n))e.push(n);else u[s]=r});else if(typeof this.items==="object")Object.keys(this.items).forEach((r)=>{let s=t(this.items[r]);if(!e.includes(s))e.push(s);else u[r]=this.items[r]});return new this.constructor(u)}each(e){let u=!1;if(Array.isArray(this.items)){let{length:t}=this.items;for(let r=0;r<t&&!u;r+=1)u=e(this.items[r],r,this.items)===!1}else{let t=Object.keys(this.items),{length:r}=t;for(let s=0;s<r&&!u;s+=1){let n=t[s];u=e(this.items[n],n,this.items)===!1}}return this}eachSpread(e){return this.each((u,t)=>{e(...u,t)}),this}every(e){return Ji(this.items).every(e)}except(e){let u={...this.items};return(Array.isArray(e)?e:[e]).forEach((t)=>delete u[t]),new He(u)}filter(e){if(console.log("Filter method called with callback:",e),console.log("Current items:",this.items),typeof e!=="function"){console.log("No callback provided, removing falsy values");let t=this.items.filter((r)=>{return console.log("Filtering item:",r),Boolean(r)});return console.log("Filtered items:",t),new He(t)}let u=this.items.filter((t,r)=>{return console.log("Filtering item:",t,"at index:",r),e(t,r)});return console.log("Filtered items:",u),new He(u)}first(e,u){if(ru(e)){let t=Object.keys(this.items);for(let r=0;r<t.length;r+=1){let s=t[r],n=this.items[s];if(e(n,s))return n}if(ru(u))return u();return u}if(Array.isArray(this.items)&&this.items.length||Object.keys(this.items).length){if(Array.isArray(this.items))return this.items[0];let t=Object.keys(this.items)[0];return this.items[t]}if(ru(u))return u();return u}firstOrFail(e){let u=this.items.find(e||(()=>!0));if(u===void 0)throw new Error("Item not found.");return u}firstWhere(e,u,t){return this.where(e,u,t).first()||null}flatMap(e){return this.map(e).collapse()}flatten(e=Number.POSITIVE_INFINITY){let u=(t,r)=>{if(!Array.isArray(t)&&typeof t!=="object")return[t];return r>0?Object.values(t).reduce((s,n)=>s.concat(Array.isArray(n)||typeof n==="object"?u(n,r-1):n),[]):Array.isArray(t)?[...t]:[t]};return new He(u(this.items,e))}flip(){let e={};if(Array.isArray(this.items))this.items.forEach((u,t)=>{e[u]=t});else Object.entries(this.items).forEach(([u,t])=>{e[t]=u});return new this.constructor(e)}forPage(e,u){let t={};if(Array.isArray(this.items))t=this.items.slice(e*u-u,e*u);else Object.keys(this.items).slice(e*u-u,e*u).forEach((r)=>{t[r]=this.items[r]});return new this.constructor(t)}forget(e){if(Array.isArray(this.items))this.items=this.items.filter((u,t)=>t!==Number.parseInt(e,10));else if(typeof this.items==="object"&&this.items!==null)delete this.items[e];return this}get(e,u=null){if(Array.isArray(this.items))return this.items[e]??u;return this.items[e]??u}groupBy(e){let u={};return this.each((t,r)=>{let s=typeof e==="function"?e(t):t[e];if(!(s in u))u[s]=new He;u[s].push(t)}),new He(u)}has(e){if(Array.isArray(this.items))return e in this.items;return e in this.items}implode(e,u){if(u===void 0)return this.items.join(e);return new this.constructor(this.items).pluck(e).all().join(u)}includes(e){if(Array.isArray(this.items))return this.items.includes(e);return Object.values(this.items).includes(e)}intersect(e){let u=e;if(e instanceof this.constructor)u=e.all();let t=this.items.filter((r)=>u.includes(r));return new this.constructor(t)}intersectByKeys(e){let u=Object.keys(e);if(e instanceof this.constructor)u=Object.keys(e.all());let t={};return Object.keys(this.items).forEach((r)=>{if(u.includes(r))t[r]=this.items[r]}),new this.constructor(t)}isEmpty(){return this.count()===0}isNotEmpty(){return!this.isEmpty()}join(e,u){let t=this.values();if(u===void 0)return t.implode(e);let r=t.count();if(r===0)return"";if(r===1)return t.last();let s=t.pop();return t.implode(e)+u+s}keyBy(e){let u={};if(ru(e))this.items.forEach((t)=>{u[e(t)]=t});else this.items.forEach((t)=>{let r=pi(t,e);u[r||""]=t});return new this.constructor(u)}keys(){return new He(Object.keys(this.items))}last(e,u){let{items:t}=this;if(ru(e))t=this.filter(e).all();if(Array.isArray(t)&&!t.length||!Object.keys(t).length){if(ru(u))return u();return u}if(Array.isArray(t))return t[t.length-1];let r=Object.keys(t);return t[r[r.length-1]]}macro(e,u){this.constructor.prototype[e]=u}make(e=[]){return new this.constructor(e)}map(e){if(Array.isArray(this.items))return new this.constructor(this.items.map(e));let u={};return Object.keys(this.items).forEach((t)=>{u[t]=e(this.items[t],Number(t))}),new this.constructor(u)}mapSpread(e){return this.map((u,t)=>e(...u,t))}mapToDictionary(e){let u={};return this.items.forEach((t,r)=>{let[s,n]=e(t,r);if(u[s]===void 0)u[s]=[n];else u[s].push(n)}),new this.constructor(u)}mapInto(e){return this.map((u,t)=>new e(u,t))}mapToGroups(e){let u={};return this.items.forEach((t,r)=>{let[s,n]=e(t,r);if(u[s]===void 0)u[s]=[n];else u[s].push(n)}),new this.constructor(u)}mapWithKeys(e){let u={};if(Array.isArray(this.items))this.items.forEach((t,r)=>{let[s,n]=e(t,r);u[s]=n});else Object.keys(this.items).forEach((t)=>{let[r,s]=e(this.items[t],Number(t));u[r]=s});return new this.constructor(u)}max(e){if(typeof e==="string"){let u=this.items.filter((t)=>t[e]!==void 0);return Math.max(...u.map((t)=>t[e]))}return Math.max(...this.items)}median(e){let{length:u}=this.items;if(e===void 0){if(u%2===0)return(this.items[u/2-1]+this.items[u/2])/2;return this.items[Math.floor(u/2)]}if(u%2===0)return(this.items[u/2-1][e]+this.items[u/2][e])/2;return this.items[Math.floor(u/2)][e]}merge(e){let u={...this.items,...e};return new He(u)}mergeRecursive(e){let u=(t,r)=>{let s={};return Object.keys({...t,...r}).forEach((n)=>{if(t[n]===void 0&&r[n]!==void 0)s[n]=r[n];else if(t[n]!==void 0&&r[n]===void 0)s[n]=t[n];else if(t[n]!==void 0&&r[n]!==void 0)if(t[n]===r[n])s[n]=t[n];else if(!Array.isArray(t[n])&&typeof t[n]==="object"&&!Array.isArray(r[n])&&typeof r[n]==="object")s[n]=u(t[n],r[n]);else s[n]=[].concat(t[n],r[n])}),s};if(!e)return this;if(e.constructor.name==="Collection")return new this.constructor(u(this.items,e.all()));return new this.constructor(u(this.items,e))}min(e){if(e!==void 0){let u=this.items.filter((t)=>t[e]!==void 0);return Math.min(...u.map((t)=>t[e]))}return Math.min(...this.items)}mode(e){let u=[],t=1;if(!this.items.length)return null;return this.items.forEach((r)=>{let s=u.filter((n)=>{if(e!==void 0)return n.key===r[e];return n.key===r});if(!s.length)if(e!==void 0)u.push({key:r[e],count:1});else u.push({key:r,count:1});else{s[0].count+=1;let{count:n}=s[0];if(n>t)t=n}}),u.filter((r)=>r.count===t).map((r)=>r.key)}nth(e,u=0){let t=Ji(this.items).slice(u).filter((r,s)=>s%e===0);return new this.constructor(t)}only(e){let u={};return e.forEach((t)=>{if(t in this.items)u[t]=this.items[t]}),new He(u)}pad(e,u){let t=Math.abs(e),r=this.count();if(t<=r)return this;let s=t-r,n=If(this.items),i=Array.isArray(this.items),l=e<0;for(let o=0;o<s;){if(!i)if(n[o]!==void 0)s+=1;else n[o]=u;else if(l)n.unshift(u);else n.push(u);o+=1}return new this.constructor(n)}partition(e){let u;if(Array.isArray(this.items))u=[new this.constructor([]),new this.constructor([])],this.items.forEach((t)=>{if(e(t)===!0)u[0].push(t);else u[1].push(t)});else u=[new this.constructor({}),new this.constructor({})],Object.keys(this.items).forEach((t)=>{let r=this.items[t];if(e(r)===!0)u[0].put(t,r);else u[1].put(t,r)});return new this.constructor(u)}pipe(e){return e(this)}pluck(e,u){if(e.includes("*")){let t=TS(this.items),r=[];if(u!==void 0){let l=new RegExp(`0.${u}`,"g"),o=`0.${u}`.split(".").length;Object.keys(t).forEach((a)=>{let D=a.match(l);if(D){let h=D[0];if(h.split(".").length===o)r.push(t[h])}})}let s=[],n=new RegExp(`0.${e}`,"g"),i=`0.${e}`.split(".").length;if(Object.keys(t).forEach((l)=>{let o=l.match(n);if(o){let a=o[0];if(a.split(".").length===i)s.push(t[a])}}),u!==void 0){let l={};return this.items.forEach((o,a)=>{l[r[a]||""]=s}),new this.constructor(l)}return new this.constructor([s])}if(u!==void 0){let t={};return this.items.forEach((r)=>{if(pi(r,e)!==void 0)t[r[u]||""]=pi(r,e);else t[r[u]||""]=null}),new this.constructor(t)}return this.map((t)=>{if(pi(t,e)!==void 0)return pi(t,e);return null})}pop(e=1){if(this.isEmpty())return null;if(br(this.items)){if(e===1)return this.items.pop();return new this.constructor(this.items.splice(-e))}if(nr(this.items)){let u=Object.keys(this.items);if(e===1){let s=u[u.length-1],n=this.items[s];return s0(this.items,s),n}let t=u.slice(-e),r=t.reduce((s,n)=>{return s[n]=this.items[n],s},{});return s0(this.items,t),new this.constructor(r)}return null}prepend(e,u){if(u!==void 0)return this.put(u,e);return this.items.unshift(e),this}pull(e,u=null){if(Array.isArray(this.items)){let r=Number(e);if(Number.isNaN(r))return u;let s=this.items[r];return this.items.splice(r,1),s??u}let t=this.items[e];return delete this.items[e],t??u}push(...e){return this.items=[...this.items,...e],this}put(e,u){return this.items[e]=u,this}random(e=null){let u=Ji(this.items),t=new this.constructor(u).shuffle();if(e!==Number.parseInt(e,10))return t.first();return t.take(e)}reduce(e,u){let t=null;if(u!==void 0)t=u;if(Array.isArray(this.items))this.items.forEach((r)=>{t=e(t,r)});else Object.keys(this.items).forEach((r)=>{t=e(t,this.items[r],r)});return t}reject(e){return new this.constructor(this.items).filter((u)=>!e(u))}replace(e){if(!e)return this;if(Array.isArray(e)){let t=this.items.map((r,s)=>e[s]||r);return new this.constructor(t)}if(e.constructor.name==="Collection"){let t={...this.items,...e.all()};return new this.constructor(t)}let u={...this.items,...e};return new this.constructor(u)}replaceRecursive(e){let u=(t,r)=>{let s={...t};return Object.keys({...t,...r}).forEach((n)=>{if(!Array.isArray(r[n])&&typeof r[n]==="object")s[n]=u(t[n],r[n]);else if(t[n]===void 0&&r[n]!==void 0)if(typeof t[n]==="object")s[n]={...r[n]};else s[n]=r[n];else if(t[n]!==void 0&&r[n]===void 0)if(typeof t[n]==="object")s[n]={...t[n]};else s[n]=t[n];else if(t[n]!==void 0&&r[n]!==void 0)if(typeof r[n]==="object")s[n]={...r[n]};else s[n]=r[n]}),s};if(!e)return this;if(!Array.isArray(e)&&typeof e!=="object")return new this.constructor(u(this.items,[e]));if(e.constructor.name==="Collection")return new this.constructor(u(this.items,e.all()));return new this.constructor(u(this.items,e))}reverse(){let e=[].concat(this.items).reverse();return new this.constructor(e)}search(e,u){let t,r=(s,n)=>{if(ru(e))return e(this.items[n],n);if(u)return this.items[n]===e;return this.items[n]==e};if(br(this.items))t=this.items.findIndex(r);else if(nr(this.items))t=Object.keys(this.items).find((s)=>r(this.items[s],s));if(t===void 0||t<0)return!1;return t}shift(e=1){if(this.isEmpty())return null;if(br(this.items)){if(e===1)return this.items.shift();return new this.constructor(this.items.splice(0,e))}if(nr(this.items)){if(e===1){let r=Object.keys(this.items)[0],s=this.items[r];return delete this.items[r],s}let u=Object.keys(this.items).slice(0,e),t=u.reduce((r,s)=>{return r[s]=this.items[s],r},{});return s0(this.items,u),new this.constructor(t)}return null}shuffle(){let e=Ji(this.items),u,t,r;for(r=e.length;r;r-=1)u=Math.floor(Math.random()*r),t=e[r-1],e[r-1]=e[u],e[u]=t;return this.items=e,this}skip(e){if(nr(this.items))return new this.constructor(Object.keys(this.items).reduce((u,t,r)=>{if(r+1>e)u[t]=this.items[t];return u},{}));return new this.constructor(this.items.slice(e))}skipUntil(e){let u=null,t,r=(s)=>s===e;if(ru(e))r=e;if(br(this.items))t=this.items.filter((s)=>{if(u!==!0)u=r(s);return u});if(nr(this.items))t=Object.keys(this.items).reduce((s,n)=>{if(u!==!0)u=r(this.items[n]);if(u!==!1)s[n]=this.items[n];return s},{});return new this.constructor(t)}skipWhile(e){let u=null,t,r=(s)=>s===e;if(ru(e))r=e;if(br(this.items))t=this.items.filter((s)=>{if(u!==!0)u=!r(s);return u});if(nr(this.items))t=Object.keys(this.items).reduce((s,n)=>{if(u!==!0)u=!r(this.items[n]);if(u!==!1)s[n]=this.items[n];return s},{});return new this.constructor(t)}slice(e,u){let t=this.items.slice(e);if(u!==void 0)t=t.slice(0,u);return new this.constructor(t)}sole(){if(this.items.length!==1)throw new Error("Collection does not contain exactly one item.");return this.items[0]}some(e){return this.items.some((u)=>u.hasOwnProperty(e))}sort(e){let u=[].concat(this.items);if(e===void 0)if(this.every((t)=>typeof t==="number"))u.sort((t,r)=>t-r);else u.sort();else u.sort(e);return new this.constructor(u)}sortDesc(){return this.sort().reverse()}sortBy(e){let u=[].concat(this.items),t=(r)=>{if(ru(e))return e(r);return pi(r,e)};return u.sort((r,s)=>{let n=t(r),i=t(s);if(n===null||n===void 0)return 1;if(i===null||i===void 0)return-1;if(n<i)return-1;if(n>i)return 1;return 0}),new this.constructor(u)}sortByDesc(e){return this.sortBy(e).reverse()}sortKeys(){let e={};return Object.keys(this.items).sort().forEach((u)=>{e[u]=this.items[u]}),new this.constructor(e)}sortKeysDesc(){let e={};return Object.keys(this.items).sort().reverse().forEach((u)=>{e[u]=this.items[u]}),new this.constructor(e)}splice(e,u,t){let r=this.slice(e,u);if(this.items=this.diff(r.all()).all(),Array.isArray(t))for(let s=0,{length:n}=t;s<n;s+=1)this.items.splice(e+s,0,t[s]);return r}split(e){let u=this.toArray(),t=[],r=Math.ceil(u.length/e);for(let s=0;s<u.length;s+=r)t.push(u.slice(s,s+r));return new He(t)}sum(e){let u=Ji(this.items),t=0;if(e===void 0)for(let r=0,{length:s}=u;r<s;r+=1)t+=Number.parseFloat(u[r]);else if(ru(e))for(let r=0,{length:s}=u;r<s;r+=1)t+=Number.parseFloat(e(u[r]));else for(let r=0,{length:s}=u;r<s;r+=1)t+=Number.parseFloat(u[r][e]);return Number.parseFloat(t.toPrecision(12))}take(e){if(!Array.isArray(this.items)&&typeof this.items==="object"){let u=Object.keys(this.items),t;if(e<0)t=u.slice(e);else t=u.slice(0,e);let r={};return u.forEach((s)=>{if(t.includes(s))r[s]=this.items[s]}),new this.constructor(r)}if(e<0)return new this.constructor(this.items.slice(e));return new this.constructor(this.items.slice(0,e))}takeUntil(e){let u=null,t,r=(s)=>s===e;if(ru(e))r=e;if(br(this.items))t=this.items.filter((s)=>{if(u!==!1)u=!r(s);return u});if(nr(this.items))t=Object.keys(this.items).reduce((s,n)=>{if(u!==!1)u=!r(this.items[n]);if(u!==!1)s[n]=this.items[n];return s},{});return new this.constructor(t)}takeWhile(e){let u=null,t,r=(s)=>s===e;if(ru(e))r=e;if(br(this.items))t=this.items.filter((s)=>{if(u!==!1)u=r(s);return u});if(nr(this.items))t=Object.keys(this.items).reduce((s,n)=>{if(u!==!1)u=r(this.items[n]);if(u!==!1)s[n]=this.items[n];return s},{});return new this.constructor(t)}tap(e){return e(this),this}times(e,u){for(let t=1;t<=e;t+=1)this.items.push(u(t));return this}toArray(){return Array.isArray(this.items)?this.items:Object.values(this.items)}toJson(){return JSON.stringify(this.items)}transform(e){if(Array.isArray(this.items))this.items=this.items.map(e);else{let u={};Object.keys(this.items).forEach((t)=>{u[t]=e(this.items[t],t)}),this.items=u}return this}undot(){if(Array.isArray(this.items))return this;let e={};return Object.keys(this.items).forEach((u)=>{if(u.includes(".")){let t=e;u.split(".").reduce((r,s,n,i)=>{if(!r[s])r[s]={};if(n===i.length-1)r[s]=this.items[u];return r[s]},t),e={...e,...t}}else e[u]=this.items[u]}),new this.constructor(e)}unless(e,u,t){if(!e)return u(this);if(t)return t();return}unlessEmpty(e){if(!this.isEmpty())e(this);return this}unlessNotEmpty(e){if(this.isEmpty())e(this);return this}union(e){let u=JSON.parse(JSON.stringify(this.items));return Object.keys(e).forEach((t)=>{if(this.items[t]===void 0)u[t]=e[t]}),new this.constructor(u)}unique(){let e=Array.from(new Set(this.items));return new this.constructor(e)}unwrap(){return this.items}values(){return new He(Object.values(this.items))}when(e,u,t){if(e)u(this,e);else if(t)t();return this}whenEmpty(e,u){if(Array.isArray(this.items)&&!this.items.length)return e(this);if(!Object.keys(this.items).length)return e(this);if(u!==void 0){if(Array.isArray(this.items)&&this.items.length)return u(this);if(Object.keys(this.items).length)return u(this)}return this}whenNotEmpty(e,u){if(Array.isArray(this.items)&&this.items.length)return e(this);if(Object.keys(this.items).length)return e(this);if(u!==void 0){if(Array.isArray(this.items)&&!this.items.length)return u(this);if(!Object.keys(this.items).length)return u(this)}return this}where(e,u,t){if(arguments.length===1)return new He(this.items.filter((s)=>s[e]!==void 0));if(arguments.length===2)t=u,u="===";let r=(s,n,i,l)=>{let o=s[n];switch(l){case"===":return o===i;case"!==":return o!==i;case"<":return o<i;case"<=":return o<=i;case">":return o>i;case">=":return o>=i;default:return o==i}};return new He(this.items.filter((s)=>r(s,e,t,u)))}whereBetween(e,u){return this.filter((t)=>{let r=typeof t==="object"?t[e]:t;return r>=u[0]&&r<=u[1]})}whereIn(e,u){return this.filter((t)=>{let r=typeof t==="object"?t[e]:t;return u.includes(r)})}whereNotBetween(e,u){return this.filter((t)=>{let r=typeof t==="object"?t[e]:t;return r<u[0]||r>u[1]})}whereNotIn(e,u){let t=this.items.filter((r)=>{let s=e.split("."),n=r;for(let i of s){if(n[i]===void 0)return!0;n=n[i]}return!u.includes(n)});return new He(t)}getNestedValue(e,u){return u.split(".").reduce((t,r)=>t&&t[r]!==void 0?t[r]:null,e)}whereInstanceOf(e){return this.filter((u)=>u instanceof e)}whereNotNull(e){return this.where(e,"!==",null)}whereNull(e){return this.where(e,"===",null)}static wrap(e){if(e instanceof He)return e;return new He(Array.isArray(e)?e:[e])}static unwrap(e){if(e instanceof He)return e.all();return e}wrap(e){if(e instanceof He)return e;if(typeof e==="object")return new He(e);return new He([e])}zip(...e){let u=e.map((r)=>this.constructor.wrap(r).all()),t=this.items.map((r,s)=>{let n=[r];return u.forEach((i)=>{n.push(i[s])}),new this.constructor(n)});return new this.constructor(t)}}var TS=function e(u){let t={};return u.forEach((r,s)=>{function n(i,l){if(nr(i))Object.keys(i).forEach((o)=>{n(i[o],`${l}.${o}`)});else if(br(i))i.forEach((o,a)=>{n(o,`${l}.${a}`)});t[l]=i}n(r,s)}),t};function wS(){let e=-1;return{next:()=>{return e+=1,{value:this.items[e],done:e>=this.items.length}}}}In();var T3=SS(["The best way to get started is to quit talking and begin doing.","The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.","Don’t let yesterday take up too much of today.","You learn more from failure than from success. Don’t let it stop you. Failure builds character.","It’s not whether you get knocked down, it’s whether you get up.","If you are working on something that you really care about, you don’t have to be pushed. The vision pulls you.","People who are crazy enough to think they can change the world, are the ones who do.","Failure will never overtake me if my determination to succeed is strong enough.","Entrepreneurs are great at dealing with uncertainty and also very good at minimizing risk. That’s the classic entrepreneur.","We may encounter many defeats but we must not be defeated.","Knowing is not enough; we must apply. Wishing is not enough; we must do.","Imagine your life is perfect in every respect; what would it look like?","We generate fears while we sit. We overcome them by action.","Whether you think you can or think you can’t, you’re right.","Security is mostly a superstition. Life is either a daring adventure or nothing."]),w3=L7.default;function B0(e,u){if(Array.isArray(u)&&!Array.isArray(e))return u;if(Array.isArray(u)&&Array.isArray(e))return u.map((r,s)=>{let n=e[s];if(gi(r)&&gi(n))return B0(n,r);return r});if(!gi(u)||!gi(e))return u;let t={...e};for(let r in u)if(Object.prototype.hasOwnProperty.call(u,r)){let s=u[r],n=t[r];if(s===null||s===void 0)t[r]=s;else if(gi(s)&&gi(n))t[r]=B0(n,s);else t[r]=s}return t}function gi(e){return Boolean(e&&typeof e==="object"&&!Array.isArray(e))}async function _S({name:e,cwd:u,defaultConfig:t}){let r=IS(u||NS.cwd(),`${e}.config`);try{let s=await import(r),n=s.default||s;return B0(t,n)}catch(s){return t}}var T8={altNameIPs:["127.0.0.1"],altNameURIs:["localhost"],organizationName:"Local Development",countryName:"US",stateName:"California",localityName:"Playa Vista",commonName:"stacks.localhost",validityDays:825,hostCertCN:"stacks.localhost",domain:"stacks.localhost",rootCA:{certificate:"",privateKey:""},basePath:"",caCertPath:a0.join(n0.homedir(),".stacks","ssl","stacks.localhost.ca.crt"),certPath:a0.join(n0.homedir(),".stacks","ssl","stacks.localhost.crt"),keyPath:a0.join(n0.homedir(),".stacks","ssl","stacks.localhost.crt.key"),verbose:!1},bt=await _S({name:"tls",defaultConfig:T8}),R3=$f(Qf(),1);function w8(e){let u=Number.parseInt(e[0],16);if(u<8)return e;return u-=8,u.toString()+e.substring(1)}function I8(e,u){let t=[];function r(s){try{let n=Nf.readdirSync(s);for(let i of n){let l=$S.join(s,i);if(Nf.lstatSync(l).isDirectory())r(l);else if(i===u)t.push(s)}}catch(n){console.warn(`Error reading directory ${s}: ${n}`)}}return r(e),t}function Pe(e,u,t){if(t||bt.verbose)console.debug(`[tlsx:${e}] ${u}`)}var Ht=$f(Qf(),1);function q0(e){Pe("cert","Generating random serial number",e);let u=w8(Ht.default.util.bytesToHex(Ht.default.random.getBytesSync(20)));return Pe("cert",`Generated serial number: ${u}`,e),u}function x0(e){let u=e.notBeforeDays??2,t=e.validityDays??(e.validityYears?e.validityYears*365:180);Pe("cert","Calculating certificate validity dates",e.verbose);let r=new Date(Date.now()-86400*u*1000),s=new Date(r.getTime()+t*24*60*60*1000);return r.setUTCHours(0,0,0,0),s.setUTCHours(23,59,59,999),Pe("cert",`Validity period: ${r.toISOString()} to ${s.toISOString()}`,e.verbose),{notBefore:r,notAfter:s}}function RS(e){let u=[];if(u.push({name:"basicConstraints",cA:e.isCA??!1,critical:!0,...e.basicConstraints||{}}),e.keyUsage)u.push({name:"keyUsage",critical:!0,...e.keyUsage});if(e.extKeyUsage)u.push({name:"extKeyUsage",...e.extKeyUsage});if(e.subjectAltNames&&e.subjectAltNames.length>0)u.push({name:"subjectAltName",altNames:e.subjectAltNames});return u}async function Z0(e={}){Pe("ca","Creating new Root CA Certificate",e.verbose);let u=e.keySize||2048;Pe("ca",`Generating ${u}-bit RSA key pair`,e.verbose);let{privateKey:t,publicKey:r}=Ht.pki.rsa.generateKeyPair(u),s=[{shortName:"C",value:e.countryName||bt.countryName},{shortName:"ST",value:e.stateName||bt.stateName},{shortName:"L",value:e.localityName||bt.localityName},{shortName:"O",value:e.organization||"Local Development CA"},{shortName:"OU",value:e.organizationalUnit||"Certificate Authority"},{shortName:"CN",value:e.commonName||"Local Development Root CA"},...e.extraAttributes||[]],{notBefore:n,notAfter:i}=x0({validityYears:e.validityYears||100,verbose:e.verbose}),l=Ht.pki.createCertificate();return l.publicKey=r,l.serialNumber=q0(e.verbose),l.validity.notBefore=n,l.validity.notAfter=i,l.setSubject(s),l.setIssuer(s),l.setExtensions([{name:"basicConstraints",cA:!0,critical:!0},{name:"keyUsage",keyCertSign:!0,cRLSign:!0,critical:!0},{name:"subjectKeyIdentifier"}]),l.sign(t,Ht.default.md.sha256.create()),{certificate:Ht.pki.certificateToPem(l),privateKey:Ht.pki.privateKeyToPem(t),notBefore:n,notAfter:i}}async function X0(e){if(Pe("cert","Generating new certificate",e.verbose),Pe("cert",`Options: ${JSON.stringify(e)}`,e.verbose),!e.rootCA?.certificate||!e.rootCA?.privateKey)throw new Error("Root CA certificate and private key are required");let u=Ht.pki.certificateFromPem(e.rootCA.certificate),t=Ht.pki.privateKeyFromPem(e.rootCA.privateKey);Pe("cert","Generating 2048-bit RSA key pair for host certificate",e.verbose);let r=2048,{privateKey:s,publicKey:n}=Ht.pki.rsa.generateKeyPair(r),i=e.certificateAttributes||[{shortName:"C",value:e.countryName||bt.countryName},{shortName:"ST",value:e.stateName||bt.stateName},{shortName:"L",value:e.localityName||bt.localityName},{shortName:"O",value:e.organizationName||bt.organizationName},{shortName:"CN",value:e.commonName||bt.commonName}],{notBefore:l,notAfter:o}=x0({validityDays:e.validityDays,verbose:e.verbose}),a=Ht.pki.createCertificate();return a.publicKey=n,a.serialNumber=q0(e.verbose),a.validity.notBefore=l,a.validity.notAfter=o,a.setSubject(i),a.setIssuer(u.subject.attributes),a.setExtensions(RS(e)),a.sign(t,Ht.default.md.sha256.create()),{certificate:Ht.pki.certificateToPem(a),privateKey:Ht.pki.privateKeyToPem(s),notBefore:l,notAfter:o}}async function J0(e,u,t){Pe("trust",`Adding certificate to system trust store with options: ${JSON.stringify(t)}`,t?.verbose),Pe("trust","Storing certificate and private key",t?.verbose);let r=N8(e,t);Pe("trust","Storing CA certificate",t?.verbose);let s=_8(u,t),n=_f.platform();Pe("trust",`Detected platform: ${n}`,t?.verbose);let i="TC, C, C";if(n==="darwin")Pe("trust","Adding certificate to macOS keychain",t?.verbose),await ln(`sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ${s}`);else if(n==="win32")Pe("trust","Adding certificate to Windows certificate store",t?.verbose),await ln(`certutil -f -v -addstore -enterprise Root ${s}`);else if(n==="linux"){Pe("trust","Adding certificate to Linux certificate store",t?.verbose);let l=_f.homedir(),o="cert9.db";Pe("trust",`Searching for certificate databases in ${l}`,t?.verbose);let a=I8(l,o);for(let D of a){Pe("trust",`Processing certificate database in ${D}`,t?.verbose);try{Pe("trust",`Attempting to delete existing cert for ${bt.commonName}`,t?.verbose),await ln(`certutil -d sql:${D} -D -n ${bt.commonName}`)}catch(h){Pe("trust",`Warning: Error deleting existing cert: ${h}`,t?.verbose),console.warn(`Error deleting existing cert: ${h}`)}Pe("trust",`Adding new certificate to ${D}`,t?.verbose),await ln(`certutil -d sql:${D} -A -t ${i} -n ${bt.commonName} -i ${s}`),hr.info(`Cert added to ${D}`)}}else throw Pe("trust",`Error: Unsupported platform ${n}`,t?.verbose),new Error(`Unsupported platform: ${n}`);return Pe("trust","Certificate successfully added to system trust store",t?.verbose),r}function N8(e,u){Pe("storage",`Storing certificate and private key with options: ${JSON.stringify(u)}`,u?.verbose);let t=mi.join(u?.basePath||bt.basePath,u?.certPath||bt.certPath),r=mi.join(u?.basePath||bt.basePath,u?.keyPath||bt.keyPath);Pe("storage",`Certificate path: ${t}`,u?.verbose),Pe("storage",`Private key path: ${r}`,u?.verbose);let s=mi.dirname(t);if(!ar.existsSync(s))Pe("storage",`Creating certificate directory: ${s}`,u?.verbose),ar.mkdirSync(s,{recursive:!0});Pe("storage","Writing certificate file",u?.verbose),ar.writeFileSync(t,e.certificate);let n=mi.dirname(r);if(!ar.existsSync(n))Pe("storage",`Creating private key directory: ${n}`,u?.verbose),ar.mkdirSync(n,{recursive:!0});return Pe("storage","Writing private key file",u?.verbose),ar.writeFileSync(r,e.privateKey),Pe("storage","Certificate and private key stored successfully",u?.verbose),t}function _8(e,u){Pe("storage","Storing CA certificate",u?.verbose);let t=mi.join(u?.basePath||bt.basePath,u?.caCertPath||bt.caCertPath);Pe("storage",`CA certificate path: ${t}`,u?.verbose);let r=mi.dirname(t);if(!ar.existsSync(r))Pe("storage",`Creating CA certificate directory: ${r}`,u?.verbose),ar.mkdirSync(r,{recursive:!0});return Pe("storage","Writing CA certificate file",u?.verbose),ar.writeFileSync(t,e),Pe("storage","CA certificate stored successfully",u?.verbose),t}var dI=Ht.tls,EI=Ht.pki,CI=Ht.default;var eh=null;function bI(e,u){let t=Yi(e)?e.proxies[0].to||"stacks.localhost":e.to||"stacks.localhost";if(typeof e.https==="object"&&typeof u.https==="object"){if(e.https.caCertPath&&e.https.certPath&&e.https.keyPath){let s=_r({...e,to:t,https:u.https}),n=e.https.altNameIPs?.filter((l)=>l!==void 0)||s.altNameIPs,i=e.https.altNameURIs?.filter((l)=>l!==void 0)||s.altNameURIs;return{...s,caCertPath:e.https.caCertPath||s.caCertPath,certPath:e.https.certPath||s.certPath,keyPath:e.https.keyPath||s.keyPath,basePath:e.https.basePath||s.basePath,commonName:e.https.commonName||s.commonName,organizationName:e.https.organizationName||s.organizationName,countryName:e.https.countryName||s.countryName,stateName:e.https.stateName||s.stateName,localityName:e.https.localityName||s.localityName,validityDays:e.https.validityDays||s.validityDays,altNameIPs:n,altNameURIs:i,verbose:e.verbose||s.verbose}}}return _r({...e,to:t})}function $8(e){let u=new Set;u.add(e);let t=e.split(".");if(t.length>=2)u.add(`*.${t.slice(1).join(".")}`);return Array.from(u)}function th(e){let u=Xs(e),t="";if(typeof e?.https==="object")return t=e.https.basePath||"",{caCertPath:e.https.caCertPath||qr(t,`${u}.ca.crt`),certPath:e.https.certPath||qr(t,`${u}.crt`),keyPath:e.https.keyPath||qr(t,`${u}.key`)};let r=t||qr(OS(),".stacks","ssl"),s=u.replace(/\*/g,"wildcard");return{caCertPath:qr(r,`${s}.ca.crt`),certPath:qr(r,`${s}.crt`),keyPath:qr(r,`${s}.key`)}}function R8(e){let u=new Set;if(zi(e))e.proxies.forEach((t)=>{let r=t.to||"stacks.localhost";$8(r).forEach((s)=>u.add(s))});else if(Js(e)){let t=e.to||"stacks.localhost";$8(t).forEach((r)=>u.add(r))}else u.add("stacks.localhost");return u.add("localhost"),u.add("*.localhost"),u}async function uh(e){ae("ssl","Loading SSL configuration",e.verbose);let u={...Qi,...e};if(e.https=_r(u),!e.https?.keyPath&&!e.https?.certPath)return ae("ssl","No SSL configuration provided",e.verbose),null;if(e.https?.keyPath&&!e.https?.certPath||!e.https?.keyPath&&e.https?.certPath){let t=!e.https?.keyPath?"keyPath":"certPath";throw ae("ssl",`Invalid SSL configuration - missing ${t}`,e.verbose),new Error(`SSL Configuration requires both keyPath and certPath. Missing: ${t}`)}try{if(!e.https?.keyPath||!e.https?.certPath)return null;try{ae("ssl","Reading SSL certificate files",e.verbose);let t=await ds.readFile(e.https?.keyPath,"utf8"),r=await ds.readFile(e.https?.certPath,"utf8");return ae("ssl","SSL configuration loaded successfully",e.verbose),{key:t,cert:r}}catch(t){return ae("ssl",`Failed to read certificates: ${t}`,e.verbose),null}}catch(t){throw ae("ssl",`SSL configuration error: ${t}`,e.verbose),t}}async function rh(e){if(eh){ae("ssl","Using cached SSL configuration",e.verbose);return}let u=zi(e)?e.proxies.map((i)=>i.to):[e.to];ae("ssl",`Generating certificate for domains: ${u.join(", ")}`,e.verbose);let t=_r(e,e.verbose);me.info("Generating Root CA certificate...");let r=await Z0(t),s=_r(e,e.verbose);me.info(`Generating host certificate for: ${u.join(", ")}`);let n=await X0({...s,rootCA:{certificate:r.certificate,privateKey:r.privateKey}});await J0(n,r.certificate,s),eh={key:n.privateKey,cert:n.certificate,ca:r.certificate},me.success(`Certificate generated successfully for ${u.length} domain${u.length>1?"s":""}`),ae("ssl",`Certificate includes domains: ${u.join(", ")}`,e.verbose)}function SI(){return eh}async function ih(e){let u=Xs(e),t=th(e);try{ae("ssl",`Checking certificates for ${u} at paths:`,e?.verbose),ae("ssl",`CA: ${t.caCertPath}`,e?.verbose),ae("ssl",`Cert: ${t.certPath}`,e?.verbose),ae("ssl",`Key: ${t.keyPath}`,e?.verbose);let r=await ds.readFile(t.keyPath,"utf8"),s=await ds.readFile(t.certPath,"utf8"),n;if(t.caCertPath)try{n=await ds.readFile(t.caCertPath,"utf8")}catch(i){ae("ssl",`Failed to read CA cert: ${i}`,e?.verbose)}return{key:r,cert:s,ca:n}}catch(r){return ae("ssl",`Failed to read certificates: ${r}`,e?.verbose),null}}function _r(e,u){let t=Xs(e);ae("ssl",`Primary domain: ${t}`,u);let r=th(e);if(typeof e.https==="object"){let s={domain:t,hostCertCN:t,basePath:e.https.basePath||"",caCertPath:e.https.caCertPath||r.caCertPath,certPath:e.https.certPath||r.certPath,keyPath:e.https.keyPath||r.keyPath,altNameIPs:["127.0.0.1","::1"],altNameURIs:[],commonName:e.https.commonName||t,organizationName:e.https.organizationName||"Local Development",countryName:e.https.countryName||"US",stateName:e.https.stateName||"California",localityName:e.https.localityName||"Playa Vista",validityDays:e.https.validityDays||825,verbose:u||!1,subjectAltNames:Array.from(R8(e)).map((n)=>({type:2,value:n}))};if(oc(e.https.rootCA))s.rootCA=e.https.rootCA;return s}return{domain:t,hostCertCN:t,basePath:"",...r,altNameIPs:["127.0.0.1","::1"],altNameURIs:[],commonName:t,organizationName:"Local Development",countryName:"US",stateName:"California",localityName:"Playa Vista",validityDays:825,verbose:u||!1,subjectAltNames:Array.from(R8(e)).map((s)=>({type:2,value:s}))}}async function O8(e,u){let t=th({to:e,verbose:u}),r=[t.caCertPath,t.certPath,t.keyPath];ae("certificates","Attempting to clean up relating certificates",u),await Promise.all(r.map((s)=>cc(s,u)))}import*as wi from"node:http";import*as L8 from"node:https";import*as Un from"node:net";import Yu from"node:process";var nh=new Set;async function Ii(e){ae("cleanup","Starting cleanup process",e?.verbose),console.log(`
|
|
648
|
-
`),me.info("Shutting down proxy servers...");let u=[],t=Array.from(nh).map((r)=>new Promise((s)=>{r.close(()=>{ae("cleanup","Server closed successfully",e?.verbose),s()})}));if(u.push(...t),e?.hosts&&e.domains?.length){ae("cleanup","Cleaning up hosts file entries",e?.verbose);let r=e.domains.filter((s)=>!s.includes("localhost"));if(r.length>0)me.info("Cleaning up hosts file entries..."),u.push(Ec(r,e?.verbose).then(()=>{ae("cleanup",`Removed hosts entries for ${r.join(", ")}`,e?.verbose)}).catch((s)=>{ae("cleanup",`Failed to remove hosts entries: ${s}`,e?.verbose),me.warn(`Failed to clean up hosts file entries for ${r.join(", ")}:`,s)}))}if(e?.certs&&e.domains?.length){ae("cleanup","Cleaning up SSL certificates",e?.verbose),me.info("Cleaning up SSL certificates...");let r=e.domains.map(async(s)=>{try{await O8(s,e?.verbose),ae("cleanup",`Removed certificates for ${s}`,e?.verbose)}catch(n){console.log("checkError",n),ae("cleanup",`Failed to remove certificates for ${s}: ${n}`,e?.verbose),me.warn(`Failed to clean up certificates for ${s}:`,n)}});u.push(...r)}try{await Promise.all(u),ae("cleanup","All cleanup tasks completed successfully",e?.verbose),me.success("All cleanup tasks completed successfully"),Yu.exit(0)}catch(r){ae("cleanup",`Error during cleanup: ${r}`,e?.verbose),me.error("Error during cleanup:",r),Yu.exit(1)}}Yu.on("SIGINT",Ii);Yu.on("SIGTERM",Ii);Yu.on("uncaughtException",(e)=>{ae("process",`Uncaught exception: ${e}`,!0),me.error("Uncaught exception:",e),Ii()});function sh(e,u,t){return ae("port",`Checking if port ${e} is in use on ${u}`,t),new Promise((r)=>{let s=Un.createServer();s.once("error",(n)=>{if(n.code==="EADDRINUSE")ae("port",`Port ${e} is in use`,t),r(!0)}),s.once("listening",()=>{ae("port",`Port ${e} is available`,t),s.close(),r(!1)}),s.listen(e,u)})}async function LS(e,u,t){ae("port",`Finding available port starting from ${e}`,t);let r=e;while(await sh(r,u,t))ae("port",`Port ${r} is in use, trying ${r+1}`,t),r++;return ae("port",`Found available port: ${r}`,t),r}async function US(e,u,t){return ae("connection",`Testing connection to ${e}:${u}`,t),new Promise((r,s)=>{let n=Un.connect({host:e,port:u,timeout:5000});n.once("connect",()=>{ae("connection",`Successfully connected to ${e}:${u}`,t),n.end(),r()}),n.once("timeout",()=>{ae("connection",`Connection to ${e}:${u} timed out`,t),n.destroy(),s(new Error(`Connection to ${e}:${u} timed out`))}),n.once("error",(i)=>{ae("connection",`Failed to connect to ${e}:${u}: ${i}`,t),n.destroy(),s(new Error(`Failed to connect to ${e}:${u}: ${i.message}`))})})}async function U8(e){ae("server",`Starting server with options: ${JSON.stringify(e)}`,e.verbose);let u=new URL((e.from?.startsWith("http")?e.from:`http://${e.from}`)||"localhost:5173"),t=new URL((e.to?.startsWith("http")?e.to:`http://${e.to}`)||"stacks.localhost"),r=Number.parseInt(u.port)||(u.protocol.includes("https:")?443:80),s=[t.hostname];if(!t.hostname.includes("localhost")&&!t.hostname.includes("127.0.0.1")){ae("hosts",`Checking if hosts file entry exists for: ${t.hostname}`,e?.verbose);try{if(!(await Cc(s,e.verbose))[0]){me.info(`Adding ${t.hostname} to hosts file...`),me.info("This may require sudo/administrator privileges");try{await dc(s,e.verbose)}catch(l){if(me.error("Failed to add hosts entry:",l.message),me.warn("You can manually add this entry to your hosts file:"),me.warn(`127.0.0.1 ${t.hostname}`),me.warn(`::1 ${t.hostname}`),Yu.platform==="win32")me.warn("On Windows:"),me.warn("1. Run notepad as administrator"),me.warn("2. Open C:\\Windows\\System32\\drivers\\etc\\hosts");else me.warn("On Unix systems:"),me.warn("sudo nano /etc/hosts")}}else ae("hosts",`Host entry already exists for ${t.hostname}`,e.verbose)}catch(i){me.error("Failed to check hosts file:",i.message)}}try{await US(u.hostname,r,e.verbose)}catch(i){ae("server",`Connection test failed: ${i}`,e.verbose),me.error(i.message),Yu.exit(1)}let n=e._cachedSSLConfig||null;if(e.https)try{if(e.https===!0)e.https=_r({...e,to:t.hostname});try{ae("ssl",`Attempting to load SSL configuration for ${t.hostname}`,e.verbose),n=await uh({...e,to:t.hostname,https:e.https})}catch(i){ae("ssl",`Failed to load certificates, will generate new ones: ${i}`,e.verbose)}if(!n){if(ae("ssl",`Generating new certificates for ${t.hostname}`,e.verbose),await rh({...e,from:u.toString(),to:t.hostname,https:e.https}),n=await uh({...e,to:t.hostname,https:e.https}),!n)throw new Error(`Failed to load SSL configuration after generating certificates for ${t.hostname}`)}}catch(i){throw ae("server",`SSL setup failed: ${i}`,e.verbose),i}ae("server",`Setting up reverse proxy with SSL config for ${t.hostname}`,e.verbose),await MS({...e,from:e.from||"localhost:5173",to:t.hostname,fromPort:r,sourceUrl:{hostname:u.hostname,host:u.host},ssl:n})}async function PS(e,u,t,r,s,n,i,l,o,a){ae("proxy",`Creating proxy server ${e} -> ${u} with cleanUrls: ${a}`,o);let D=(F,p)=>{ae("request",`Incoming request: ${F.method} ${F.url}`,o);let f=F.url||"/";if(a){if(!f.match(/\.[a-z0-9]+$/i))if(f.endsWith("/"))f=`${f}index.html`;else f=`${f}.html`}let m={hostname:n.hostname,port:t,path:f,method:F.method,headers:{...F.headers,host:n.host}};ae("request",`Proxy request options: ${JSON.stringify(m)}`,o);let B=wi.request(m,(C)=>{if(ae("response",`Proxy response received with status ${C.statusCode}`,o),a&&C.statusCode===404){let y=[];if(f.endsWith(".html"))y.push(f.slice(0,-5));else if(!f.match(/\.[a-z0-9]+$/i))y.push(`${f}.html`);if(!f.endsWith("/"))y.push(`${f}/index.html`);if(y.length>0){ae("cleanUrls",`Trying alternative paths: ${y.join(", ")}`,o);let A=(T)=>{if(T.length===0){p.writeHead(C.statusCode||404,C.headers),C.pipe(p);return}let I=T[0],v={...m,path:I},g=wi.request(v,(E)=>{if(E.statusCode===200)ae("cleanUrls",`Found matching path: ${I}`,o),p.writeHead(E.statusCode,E.headers),E.pipe(p);else A(T.slice(1))});g.on("error",()=>A(T.slice(1))),g.end()};A(y);return}}let c={...C.headers,"Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","X-Content-Type-Options":"nosniff"};p.writeHead(C.statusCode||500,c),C.pipe(p)});B.on("error",(C)=>{ae("request",`Proxy request failed: ${C}`,o),me.error("Proxy request failed:",C),p.writeHead(502),p.end(`Proxy Error: ${C.message}`)}),F.pipe(B)},h=i?{key:i.key,cert:i.cert,ca:i.ca,minVersion:"TLSv1.2",maxVersion:"TLSv1.3",requestCert:!1,rejectUnauthorized:!1,ciphers:["TLS_AES_128_GCM_SHA256","TLS_AES_256_GCM_SHA384","TLS_CHACHA20_POLY1305_SHA256","ECDHE-ECDSA-AES128-GCM-SHA256","ECDHE-RSA-AES128-GCM-SHA256","ECDHE-ECDSA-AES256-GCM-SHA384","ECDHE-RSA-AES256-GCM-SHA384"].join(":"),allowHTTP1:!0,ALPNProtocols:["h2","http/1.1"]}:void 0;ae("server",`Creating server with SSL config: ${!!i}`,o);let d=i&&h?L8.createServer(h,D):wi.createServer(D);if(i)d.on("secureConnection",(F)=>{ae("tls",`TLS Connection established: ${JSON.stringify({protocol:F.getProtocol?.(),cipher:F.getCipher?.(),authorized:F.authorized,authError:F.authorizationError})}`,o)});return nh.add(d),new Promise((F,p)=>{d.listen(r,s,()=>{if(ae("server",`Server listening on port ${r}`,o),!l){if(console.log(""),console.log(` ${Ar(Ua("reverse-proxy"))} ${Ar(`v${ac}`)}`),console.log(""),console.log(` ${Ar("➜")} ${Zs(e)} ${Zs("➜")} ${i?"https":"http"}://${u}`),r!==(i?443:80))console.log(` ${Ar("➜")} Listening on port ${r}`);if(i)console.log(` ${Ar("➜")} SSL enabled with:`),console.log(" - TLS 1.2/1.3"),console.log(" - Modern cipher suite"),console.log(" - HTTP/2 enabled"),console.log(" - HSTS enabled");if(a)console.log(` ${Ar("➜")} Clean URLs enabled`)}F()}),d.on("error",(f)=>{ae("server",`Server error: ${f}`,o),p(f)})})}async function MS(e){ae("setup",`Setting up reverse proxy: ${JSON.stringify(e)}`,e.verbose);let{from:u,to:t,fromPort:r,sourceUrl:s,ssl:n,verbose:i,cleanup:l,vitePluginUsage:o,portManager:a}=e,D=80,h=443,d="0.0.0.0";try{if(n&&!a?.usedPorts.has(D))if(!await sh(D,d,i))ae("setup","Starting HTTP redirect server",i),kS(i),a?.usedPorts.add(D);else ae("setup","Port 80 is in use, skipping HTTP redirect",i),me.warn("Port 80 is in use, HTTP to HTTPS redirect will not be available");let F=n?h:D,p;if(a)p=await a.getNextAvailablePort(F);else p=await sh(F,d,i)?await LS(n?8443:8080,d,i):F;if(p!==F)me.warn(`Port ${F} is in use. Using port ${p} instead.`),me.info(`You can use 'sudo lsof -i :${F}' (Unix) or 'netstat -ano | findstr :${F}' (Windows) to check what's using the port.`);await PS(u,t,r,p,d,s,n,o,i)}catch(F){ae("setup",`Setup failed: ${F}`,i),me.error(`Failed to setup reverse proxy: ${F.message}`),Ii({domains:[t],hosts:typeof l==="boolean"?l:l?.hosts,certs:typeof l==="boolean"?l:l?.certs,verbose:i})}}function kS(e){ae("redirect","Starting HTTP redirect server",e);let u=wi.createServer((t,r)=>{let s=t.headers.host||"";ae("redirect",`Redirecting request from ${s}${t.url} to HTTPS`,e),r.writeHead(301,{Location:`https://${s}${t.url}`}),r.end()}).listen(80);nh.add(u),ae("redirect","HTTP redirect server started",e)}function LI(e){let u={...Qi,...e};ae("proxy",`Starting proxy with options: ${JSON.stringify(u)}`,u?.verbose);let t={from:u.from,to:u.to,cleanUrls:u.cleanUrls,https:_r(u),cleanup:u.cleanup,vitePluginUsage:u.vitePluginUsage,verbose:u.verbose};console.log("serverOptions",t),U8(t).catch((r)=>{ae("proxy",`Failed to start proxy: ${r}`,u.verbose),me.error(`Failed to start proxy: ${r.message}`),Ii({domains:[u.to],hosts:typeof u.cleanup==="boolean"?u.cleanup:u.cleanup?.hosts,certs:typeof u.cleanup==="boolean"?u.cleanup:u.cleanup?.certs,verbose:u.verbose})})}async function UI(e){ae("proxies","Starting proxy setup",e?.verbose);let u={...Qi,...e},t=Yi(u)?u.proxies[0].to||"stacks.localhost":u.to||"stacks.localhost";if(u.https){let l=await ih(u);if(l)ae("ssl",`Using existing certificates for ${t}`,u.verbose),u._cachedSSLConfig=l;else{ae("ssl",`No valid certificates found for ${t}, generating new ones`,u.verbose),await rh(u);let o=await ih(u);if(!o)throw new Error(`Failed to load SSL certificates after generation for ${t}. Please check file permissions and paths.`);u._cachedSSLConfig=o}}let r=Yi(u)?u.proxies.map((l)=>({...l,https:u.https,cleanup:u.cleanup,cleanUrls:u.cleanUrls,vitePluginUsage:u.vitePluginUsage,verbose:u.verbose,_cachedSSLConfig:u._cachedSSLConfig})):[{from:u.from||"localhost:5173",to:u.to||"stacks.localhost",cleanUrls:u.cleanUrls||!1,https:u.https,cleanup:u.cleanup,vitePluginUsage:u.vitePluginUsage,verbose:u.verbose,_cachedSSLConfig:u._cachedSSLConfig}],s=r.map((l)=>l.to||"stacks.localhost"),n=u._cachedSSLConfig,i=()=>Ii({domains:s,hosts:typeof u.cleanup==="boolean"?u.cleanup:u.cleanup?.hosts,certs:typeof u.cleanup==="boolean"?u.cleanup:u.cleanup?.certs,verbose:u.verbose||!1});Yu.on("SIGINT",i),Yu.on("SIGTERM",i),Yu.on("uncaughtException",(l)=>{ae("process",`Uncaught exception: ${l}`,!0),console.error("Uncaught exception:",l),i()});for(let l of r)try{let o=l.to||"stacks.localhost";ae("proxy",`Starting proxy for ${o} with SSL config: ${!!n}`,l.verbose),await U8({from:l.from||"localhost:5173",to:o,cleanUrls:l.cleanUrls||!1,https:l.https||!1,cleanup:l.cleanup||!1,vitePluginUsage:l.vitePluginUsage||!1,verbose:l.verbose||!1,_cachedSSLConfig:n})}catch(o){ae("proxies",`Failed to start proxy for ${l.to}: ${o}`,l.verbose),console.error(`Failed to start proxy for ${l.to}:`,o),i()}}
|
|
649
|
-
export{eC as a,ac as b,Qi as c,ae as d,pw as e,oc as f,Xs as g,Yi as h,zi as i,Js as j,cc as k,vr as l,dc as m,Ec as n,Cc as o,bI as p,$8 as q,th as r,R8 as s,uh as t,rh as u,SI as v,ih as w,_r as x,O8 as y,Ii as z,U8 as A,MS as B,kS as C,LI as D,UI as E};
|