nemar-cli 0.8.14-PR465.a485d13 → 0.8.14-PR466.997777

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.
Files changed (2) hide show
  1. package/dist/index.js +30 -30
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -25,10 +25,10 @@ Expecting one of '${$.join("', '")}'`);if(this._lifeCycleHooks[D])this._lifeCycl
25
25
  `),this.outputHelp({error:!0});let $=F||{},J=$.exitCode||1,Q=$.code||"commander.error";this._exit(J,Q,D)}_parseOptionsEnv(){this.options.forEach((D)=>{if(D.envVar&&D.envVar in t0.env){let F=D.attributeName();if(this.getOptionValue(F)===void 0||["default","config","env"].includes(this.getOptionValueSource(F)))if(D.required||D.optional)this.emit(`optionEnv:${D.name()}`,t0.env[D.envVar]);else this.emit(`optionEnv:${D.name()}`)}})}_parseOptionsImplied(){let D=new Bu(this.options),F=($)=>{return this.getOptionValue($)!==void 0&&!["default","implied"].includes(this.getOptionValueSource($))};this.options.filter(($)=>$.implied!==void 0&&F($.attributeName())&&D.valueFromOption(this.getOptionValue($.attributeName()),$)).forEach(($)=>{Object.keys($.implied).filter((J)=>!F(J)).forEach((J)=>{this.setOptionValueWithSource(J,$.implied[J],"implied")})})}missingArgument(D){let F=`error: missing required argument '${D}'`;this.error(F,{code:"commander.missingArgument"})}optionMissingArgument(D){let F=`error: option '${D.flags}' argument missing`;this.error(F,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(D){let F=`error: required option '${D.flags}' not specified`;this.error(F,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(D,F){let $=(Y)=>{let B=Y.attributeName(),X=this.getOptionValue(B),G=this.options.find((q)=>q.negate&&B===q.attributeName()),H=this.options.find((q)=>!q.negate&&B===q.attributeName());if(G&&(G.presetArg===void 0&&X===!1||G.presetArg!==void 0&&X===G.presetArg))return G;return H||Y},J=(Y)=>{let B=$(Y),X=B.attributeName();if(this.getOptionValueSource(X)==="env")return`environment variable '${B.envVar}'`;return`option '${B.flags}'`},Q=`error: ${J(D)} cannot be used with ${J(F)}`;this.error(Q,{code:"commander.conflictingOption"})}unknownOption(D){if(this._allowUnknownOption)return;let F="";if(D.startsWith("--")&&this._showSuggestionAfterError){let J=[],Q=this;do{let Y=Q.createHelp().visibleOptions(Q).filter((B)=>B.long).map((B)=>B.long);J=J.concat(Y),Q=Q.parent}while(Q&&!Q._enablePositionalOptions);F=eH(D,J)}let $=`error: unknown option '${D}'${F}`;this.error($,{code:"commander.unknownOption"})}_excessArguments(D){if(this._allowExcessArguments)return;let F=this.registeredArguments.length,$=F===1?"":"s",Q=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${F} argument${$} but got ${D.length}.`;this.error(Q,{code:"commander.excessArguments"})}unknownCommand(){let D=this.args[0],F="";if(this._showSuggestionAfterError){let J=[];this.createHelp().visibleCommands(this).forEach((Q)=>{if(J.push(Q.name()),Q.alias())J.push(Q.alias())}),F=eH(D,J)}let $=`error: unknown command '${D}'${F}`;this.error($,{code:"commander.unknownCommand"})}version(D,F,$){if(D===void 0)return this._version;this._version=D,F=F||"-V, --version",$=$||"output the version number";let J=this.createOption(F,$);return this._versionOptionName=J.attributeName(),this._registerOption(J),this.on("option:"+J.name(),()=>{this._outputConfiguration.writeOut(`${D}
26
26
  `),this._exit(0,"commander.version",D)}),this}description(D,F){if(D===void 0&&F===void 0)return this._description;if(this._description=D,F)this._argsDescription=F;return this}summary(D){if(D===void 0)return this._summary;return this._summary=D,this}alias(D){if(D===void 0)return this._aliases[0];let F=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)F=this.commands[this.commands.length-1];if(D===F._name)throw Error("Command alias can't be the same as its name");let $=this.parent?._findCommand(D);if($){let J=[$.name()].concat($.aliases()).join("|");throw Error(`cannot add alias '${D}' to command '${this.name()}' as already have command '${J}'`)}return F._aliases.push(D),this}aliases(D){if(D===void 0)return this._aliases;return D.forEach((F)=>this.alias(F)),this}usage(D){if(D===void 0){if(this._usage)return this._usage;let F=this.registeredArguments.map(($)=>{return Qu($)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?F:[]).join(" ")}return this._usage=D,this}name(D){if(D===void 0)return this._name;return this._name=D,this}nameFromFilename(D){return this._name=j8.basename(D,j8.extname(D)),this}executableDir(D){if(D===void 0)return this._executableDir;return this._executableDir=D,this}helpInformation(D){let F=this.createHelp();if(F.helpWidth===void 0)F.helpWidth=D&&D.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth();return F.formatHelp(this,F)}_getHelpContext(D){D=D||{};let F={error:!!D.error},$;if(F.error)$=(J)=>this._outputConfiguration.writeErr(J);else $=(J)=>this._outputConfiguration.writeOut(J);return F.write=D.write||$,F.command=this,F}outputHelp(D){let F;if(typeof D==="function")F=D,D=void 0;let $=this._getHelpContext(D);this._getCommandAndAncestors().reverse().forEach((Q)=>Q.emit("beforeAllHelp",$)),this.emit("beforeHelp",$);let J=this.helpInformation($);if(F){if(J=F(J),typeof J!=="string"&&!Buffer.isBuffer(J))throw Error("outputHelp callback must return a string or a Buffer")}if($.write(J),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",$),this._getCommandAndAncestors().forEach((Q)=>Q.emit("afterAllHelp",$))}helpOption(D,F){if(typeof D==="boolean"){if(D)this._helpOption=this._helpOption??void 0;else this._helpOption=null;return this}return D=D??"-h, --help",F=F??"display help for command",this._helpOption=this.createOption(D,F),this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(D){return this._helpOption=D,this}help(D){this.outputHelp(D);let F=t0.exitCode||0;if(F===0&&D&&typeof D!=="function"&&D.error)F=1;this._exit(F,"commander.help","(outputHelp)")}addHelpText(D,F){let $=["beforeAll","before","after","afterAll"];if(!$.includes(D))throw Error(`Unexpected value for position to addHelpText.
27
27
  Expecting one of '${$.join("', '")}'`);let J=`${D}Help`;return this.on(J,(Q)=>{let Y;if(typeof F==="function")Y=F({error:Q.error,command:Q.command});else Y=F;if(Y)Q.write(`${Y}
28
- `)}),this}_outputHelpIfRequested(D){let F=this._getHelpOption();if(F&&D.find((J)=>F.is(J)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function Dq(D){return D.map((F)=>{if(!F.startsWith("--inspect"))return F;let $,J="127.0.0.1",Q="9229",Y;if((Y=F.match(/^(--inspect(-brk)?)$/))!==null)$=Y[1];else if((Y=F.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if($=Y[1],/^\d+$/.test(Y[3]))Q=Y[3];else J=Y[3];else if((Y=F.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)$=Y[1],J=Y[3],Q=Y[4];if($&&Q!=="0")return`${$}=${J}:${parseInt(Q)+1}`;return F})}Xu.Command=fQ});var Yq=z((qu)=>{var{Argument:$q}=a9(),{Command:gQ}=Fq(),{CommanderError:Wu,InvalidArgumentError:Jq}=fF(),{Help:Hu}=kQ(),{Option:Qq}=vQ();qu.program=new gQ;qu.createCommand=(D)=>new gQ(D);qu.createOption=(D,F)=>new Qq(D,F);qu.createArgument=(D,F)=>new $q(D,F);qu.Command=gQ;qu.Option=Qq;qu.Argument=$q;qu.Help=Hu;qu.CommanderError=Wu;qu.InvalidArgumentError=Jq;qu.InvalidOptionArgumentError=Jq});var bF=z((Ou,hQ)=>{var Z0=Ou;Ou.default=Z0;var I0="\x1B[",hF="\x1B]",a4="\x07",s9=";",Kq=process.env.TERM_PROGRAM==="Apple_Terminal";Z0.cursorTo=(D,F)=>{if(typeof D!=="number")throw TypeError("The `x` argument is required");if(typeof F!=="number")return I0+(D+1)+"G";return I0+(F+1)+";"+(D+1)+"H"};Z0.cursorMove=(D,F)=>{if(typeof D!=="number")throw TypeError("The `x` argument is required");let $="";if(D<0)$+=I0+-D+"D";else if(D>0)$+=I0+D+"C";if(F<0)$+=I0+-F+"A";else if(F>0)$+=I0+F+"B";return $};Z0.cursorUp=(D=1)=>I0+D+"A";Z0.cursorDown=(D=1)=>I0+D+"B";Z0.cursorForward=(D=1)=>I0+D+"C";Z0.cursorBackward=(D=1)=>I0+D+"D";Z0.cursorLeft=I0+"G";Z0.cursorSavePosition=Kq?"\x1B7":I0+"s";Z0.cursorRestorePosition=Kq?"\x1B8":I0+"u";Z0.cursorGetPosition=I0+"6n";Z0.cursorNextLine=I0+"E";Z0.cursorPrevLine=I0+"F";Z0.cursorHide=I0+"?25l";Z0.cursorShow=I0+"?25h";Z0.eraseLines=(D)=>{let F="";for(let $=0;$<D;$++)F+=Z0.eraseLine+($<D-1?Z0.cursorUp():"");if(D)F+=Z0.cursorLeft;return F};Z0.eraseEndLine=I0+"K";Z0.eraseStartLine=I0+"1K";Z0.eraseLine=I0+"2K";Z0.eraseDown=I0+"J";Z0.eraseUp=I0+"1J";Z0.eraseScreen=I0+"2J";Z0.scrollUp=I0+"S";Z0.scrollDown=I0+"T";Z0.clearScreen="\x1Bc";Z0.clearTerminal=process.platform==="win32"?`${Z0.eraseScreen}${I0}0f`:`${Z0.eraseScreen}${I0}3J${I0}H`;Z0.beep=a4;Z0.link=(D,F)=>{return[hF,"8",s9,s9,F,a4,D,hF,"8",s9,s9,a4].join("")};Z0.image=(D,F={})=>{let $=`${hF}1337;File=inline=1`;if(F.width)$+=`;width=${F.width}`;if(F.height)$+=`;height=${F.height}`;if(F.preserveAspectRatio===!1)$+=";preserveAspectRatio=0";return $+":"+D.toString("base64")+a4};Z0.iTerm={setCwd:(D=process.cwd())=>`${hF}50;CurrentDir=${D}${a4}`,annotation:(D,F={})=>{let $=`${hF}1337;`,J=typeof F.x<"u",Q=typeof F.y<"u";if((J||Q)&&!(J&&Q&&typeof F.length<"u"))throw Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");if(D=D.replace(/\|/g,""),$+=F.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",F.length>0)$+=(J?[D,F.length,F.x,F.y]:[F.length,D]).join("|");else $+=D;return $+a4}}});var q1=z((iZ0,zq)=>{var Tu=K0("tty"),ju=Tu?.WriteStream?.prototype?.hasColors?.()??!1,X0=(D,F)=>{if(!ju)return(Q)=>Q;let $=`\x1B[${D}m`,J=`\x1B[${F}m`;return(Q)=>{let Y=Q+"",B=Y.indexOf(J);if(B===-1)return $+Y+J;let X=$,G=0,q=(F===22?J:"")+$;while(B!==-1)X+=Y.slice(G,B)+q,G=B+J.length,B=Y.indexOf(J,G);return X+=Y.slice(G)+J,X}},Q0={};Q0.reset=X0(0,0);Q0.bold=X0(1,22);Q0.dim=X0(2,22);Q0.italic=X0(3,23);Q0.underline=X0(4,24);Q0.overline=X0(53,55);Q0.inverse=X0(7,27);Q0.hidden=X0(8,28);Q0.strikethrough=X0(9,29);Q0.black=X0(30,39);Q0.red=X0(31,39);Q0.green=X0(32,39);Q0.yellow=X0(33,39);Q0.blue=X0(34,39);Q0.magenta=X0(35,39);Q0.cyan=X0(36,39);Q0.white=X0(37,39);Q0.gray=X0(90,39);Q0.bgBlack=X0(40,49);Q0.bgRed=X0(41,49);Q0.bgGreen=X0(42,49);Q0.bgYellow=X0(43,49);Q0.bgBlue=X0(44,49);Q0.bgMagenta=X0(45,49);Q0.bgCyan=X0(46,49);Q0.bgWhite=X0(47,49);Q0.bgGray=X0(100,49);Q0.redBright=X0(91,39);Q0.greenBright=X0(92,39);Q0.yellowBright=X0(93,39);Q0.blueBright=X0(94,39);Q0.magentaBright=X0(95,39);Q0.cyanBright=X0(96,39);Q0.whiteBright=X0(97,39);Q0.bgRedBright=X0(101,49);Q0.bgGreenBright=X0(102,49);Q0.bgYellowBright=X0(103,49);Q0.bgBlueBright=X0(104,49);Q0.bgMagentaBright=X0(105,49);Q0.bgCyanBright=X0(106,49);Q0.bgWhiteBright=X0(107,49);zq.exports=Q0});import e1 from"process";function Pu(){if(e1.platform!=="win32")return e1.env.TERM!=="linux";return Boolean(e1.env.WT_SESSION)||Boolean(e1.env.TERMINUS_SUBLIME)||e1.env.ConEmuTask==="{cmd::Cmder}"||e1.env.TERM_PROGRAM==="Terminus-Sublime"||e1.env.TERM_PROGRAM==="vscode"||e1.env.TERM==="xterm-256color"||e1.env.TERM==="alacritty"||e1.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Eq,Vq,Iu,Su,ku,vu,yu,D6,oZ0;var r9=P(()=>{Eq={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},Vq={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},Iu={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Su={...Eq,...Vq},ku={...Eq,...Iu},vu=Pu(),yu=vu?Su:ku,D6=yu,oZ0=Object.entries(Vq)});var uF=z((rZ0,Lq)=>{function Zq(D){return!!D&&(typeof D==="object"||typeof D==="function")&&typeof D.then==="function"}var Uq=Lq.exports=function(D,F,$="async"){if(typeof F==="string")$=F,F=void 0;return F=F||function(){},function(){var J=arguments,Q=this,Y=new Promise(function(B,X){var G=!1;let H=function(O){if(G)console.warn("Run-async promise already resolved.");G=!0,B(O)};var q=!1;let K=function(O){if(q)console.warn("Run-async promise already rejected.");q=!0,X(O)};var V=!1,E=!1,Z=!1,L=function(){if(Z)return console.warn("Run-async async() called outside a valid run-async context, callback will be ignored."),function(){};if(E)console.warn(`Run-async wrapped function (async) returned a promise.
29
- Calls to async() callback can have unexpected results.`);return V=!0,function(O,w){if(O)K(O);else H(w)}},A;if(Q&&$&&Proxy)A=new Proxy(Q,{get(O,w){if(w===$){if(w in O)console.warn(`${$} property is been shadowed by run-sync`);return L}return Reflect.get(...arguments)}});else A={[$]:L};var M=D.apply(A,Array.prototype.slice.call(J));if(V){if(Zq(M))console.warn("Run-async wrapped function (sync) returned a promise but async() callback must be executed to resolve.")}else if(Zq(M))E=!0,M.then(H,K);else H(M);Z=!0});return Y.then(F.bind(null,null),F),Y}};Uq.cb=function(D,F){return Uq(function(){var $=Array.prototype.slice.call(arguments);if($.length===D.length-1)$.push(this.async());return D.apply(this,$)},F)}});var S0=z((Aq)=>{Object.defineProperty(Aq,"__esModule",{value:!0});Aq.isFunction=void 0;function xu(D){return typeof D==="function"}Aq.isFunction=xu});var F6=z((Nq)=>{Object.defineProperty(Nq,"__esModule",{value:!0});Nq.createErrorClass=void 0;function _u(D){var F=function(J){Error.call(J),J.stack=Error().stack},$=D(F);return $.prototype=Object.create(Error.prototype),$.prototype.constructor=$,$}Nq.createErrorClass=_u});var bQ=z((Rq)=>{Object.defineProperty(Rq,"__esModule",{value:!0});Rq.UnsubscriptionError=void 0;var fu=F6();Rq.UnsubscriptionError=fu.createErrorClass(function(D){return function($){D(this),this.message=$?$.length+` errors occurred during unsubscription:
28
+ `)}),this}_outputHelpIfRequested(D){let F=this._getHelpOption();if(F&&D.find((J)=>F.is(J)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function Dq(D){return D.map((F)=>{if(!F.startsWith("--inspect"))return F;let $,J="127.0.0.1",Q="9229",Y;if((Y=F.match(/^(--inspect(-brk)?)$/))!==null)$=Y[1];else if((Y=F.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if($=Y[1],/^\d+$/.test(Y[3]))Q=Y[3];else J=Y[3];else if((Y=F.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)$=Y[1],J=Y[3],Q=Y[4];if($&&Q!=="0")return`${$}=${J}:${parseInt(Q)+1}`;return F})}Xu.Command=fQ});var Yq=z((qu)=>{var{Argument:$q}=a9(),{Command:gQ}=Fq(),{CommanderError:Wu,InvalidArgumentError:Jq}=fF(),{Help:Hu}=kQ(),{Option:Qq}=vQ();qu.program=new gQ;qu.createCommand=(D)=>new gQ(D);qu.createOption=(D,F)=>new Qq(D,F);qu.createArgument=(D,F)=>new $q(D,F);qu.Command=gQ;qu.Option=Qq;qu.Argument=$q;qu.Help=Hu;qu.CommanderError=Wu;qu.InvalidArgumentError=Jq;qu.InvalidOptionArgumentError=Jq});var bF=z((Ou,hQ)=>{var Z0=Ou;Ou.default=Z0;var I0="\x1B[",hF="\x1B]",a4="\x07",s9=";",Kq=process.env.TERM_PROGRAM==="Apple_Terminal";Z0.cursorTo=(D,F)=>{if(typeof D!=="number")throw TypeError("The `x` argument is required");if(typeof F!=="number")return I0+(D+1)+"G";return I0+(F+1)+";"+(D+1)+"H"};Z0.cursorMove=(D,F)=>{if(typeof D!=="number")throw TypeError("The `x` argument is required");let $="";if(D<0)$+=I0+-D+"D";else if(D>0)$+=I0+D+"C";if(F<0)$+=I0+-F+"A";else if(F>0)$+=I0+F+"B";return $};Z0.cursorUp=(D=1)=>I0+D+"A";Z0.cursorDown=(D=1)=>I0+D+"B";Z0.cursorForward=(D=1)=>I0+D+"C";Z0.cursorBackward=(D=1)=>I0+D+"D";Z0.cursorLeft=I0+"G";Z0.cursorSavePosition=Kq?"\x1B7":I0+"s";Z0.cursorRestorePosition=Kq?"\x1B8":I0+"u";Z0.cursorGetPosition=I0+"6n";Z0.cursorNextLine=I0+"E";Z0.cursorPrevLine=I0+"F";Z0.cursorHide=I0+"?25l";Z0.cursorShow=I0+"?25h";Z0.eraseLines=(D)=>{let F="";for(let $=0;$<D;$++)F+=Z0.eraseLine+($<D-1?Z0.cursorUp():"");if(D)F+=Z0.cursorLeft;return F};Z0.eraseEndLine=I0+"K";Z0.eraseStartLine=I0+"1K";Z0.eraseLine=I0+"2K";Z0.eraseDown=I0+"J";Z0.eraseUp=I0+"1J";Z0.eraseScreen=I0+"2J";Z0.scrollUp=I0+"S";Z0.scrollDown=I0+"T";Z0.clearScreen="\x1Bc";Z0.clearTerminal=process.platform==="win32"?`${Z0.eraseScreen}${I0}0f`:`${Z0.eraseScreen}${I0}3J${I0}H`;Z0.beep=a4;Z0.link=(D,F)=>{return[hF,"8",s9,s9,F,a4,D,hF,"8",s9,s9,a4].join("")};Z0.image=(D,F={})=>{let $=`${hF}1337;File=inline=1`;if(F.width)$+=`;width=${F.width}`;if(F.height)$+=`;height=${F.height}`;if(F.preserveAspectRatio===!1)$+=";preserveAspectRatio=0";return $+":"+D.toString("base64")+a4};Z0.iTerm={setCwd:(D=process.cwd())=>`${hF}50;CurrentDir=${D}${a4}`,annotation:(D,F={})=>{let $=`${hF}1337;`,J=typeof F.x<"u",Q=typeof F.y<"u";if((J||Q)&&!(J&&Q&&typeof F.length<"u"))throw Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");if(D=D.replace(/\|/g,""),$+=F.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",F.length>0)$+=(J?[D,F.length,F.x,F.y]:[F.length,D]).join("|");else $+=D;return $+a4}}});var q1=z((iZ0,zq)=>{var Tu=K0("tty"),ju=Tu?.WriteStream?.prototype?.hasColors?.()??!1,X0=(D,F)=>{if(!ju)return(Q)=>Q;let $=`\x1B[${D}m`,J=`\x1B[${F}m`;return(Q)=>{let Y=Q+"",B=Y.indexOf(J);if(B===-1)return $+Y+J;let X=$,G=0,q=(F===22?J:"")+$;while(B!==-1)X+=Y.slice(G,B)+q,G=B+J.length,B=Y.indexOf(J,G);return X+=Y.slice(G)+J,X}},Q0={};Q0.reset=X0(0,0);Q0.bold=X0(1,22);Q0.dim=X0(2,22);Q0.italic=X0(3,23);Q0.underline=X0(4,24);Q0.overline=X0(53,55);Q0.inverse=X0(7,27);Q0.hidden=X0(8,28);Q0.strikethrough=X0(9,29);Q0.black=X0(30,39);Q0.red=X0(31,39);Q0.green=X0(32,39);Q0.yellow=X0(33,39);Q0.blue=X0(34,39);Q0.magenta=X0(35,39);Q0.cyan=X0(36,39);Q0.white=X0(37,39);Q0.gray=X0(90,39);Q0.bgBlack=X0(40,49);Q0.bgRed=X0(41,49);Q0.bgGreen=X0(42,49);Q0.bgYellow=X0(43,49);Q0.bgBlue=X0(44,49);Q0.bgMagenta=X0(45,49);Q0.bgCyan=X0(46,49);Q0.bgWhite=X0(47,49);Q0.bgGray=X0(100,49);Q0.redBright=X0(91,39);Q0.greenBright=X0(92,39);Q0.yellowBright=X0(93,39);Q0.blueBright=X0(94,39);Q0.magentaBright=X0(95,39);Q0.cyanBright=X0(96,39);Q0.whiteBright=X0(97,39);Q0.bgRedBright=X0(101,49);Q0.bgGreenBright=X0(102,49);Q0.bgYellowBright=X0(103,49);Q0.bgBlueBright=X0(104,49);Q0.bgMagentaBright=X0(105,49);Q0.bgCyanBright=X0(106,49);Q0.bgWhiteBright=X0(107,49);zq.exports=Q0});import e1 from"process";function Pu(){if(e1.platform!=="win32")return e1.env.TERM!=="linux";return Boolean(e1.env.WT_SESSION)||Boolean(e1.env.TERMINUS_SUBLIME)||e1.env.ConEmuTask==="{cmd::Cmder}"||e1.env.TERM_PROGRAM==="Terminus-Sublime"||e1.env.TERM_PROGRAM==="vscode"||e1.env.TERM==="xterm-256color"||e1.env.TERM==="alacritty"||e1.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Eq,Vq,Iu,Su,ku,vu,yu,D6,oZ0;var r9=P(()=>{Eq={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},Vq={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},Iu={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Su={...Eq,...Vq},ku={...Eq,...Iu},vu=Pu(),yu=vu?Su:ku,D6=yu,oZ0=Object.entries(Vq)});var uF=z((rZ0,Lq)=>{function Zq(D){return!!D&&(typeof D==="object"||typeof D==="function")&&typeof D.then==="function"}var Uq=Lq.exports=function(D,F,$="async"){if(typeof F==="string")$=F,F=void 0;return F=F||function(){},function(){var J=arguments,Q=this,Y=new Promise(function(B,X){var G=!1;let H=function(R){if(G)console.warn("Run-async promise already resolved.");G=!0,B(R)};var q=!1;let K=function(R){if(q)console.warn("Run-async promise already rejected.");q=!0,X(R)};var V=!1,E=!1,Z=!1,L=function(){if(Z)return console.warn("Run-async async() called outside a valid run-async context, callback will be ignored."),function(){};if(E)console.warn(`Run-async wrapped function (async) returned a promise.
29
+ Calls to async() callback can have unexpected results.`);return V=!0,function(R,w){if(R)K(R);else H(w)}},A;if(Q&&$&&Proxy)A=new Proxy(Q,{get(R,w){if(w===$){if(w in R)console.warn(`${$} property is been shadowed by run-sync`);return L}return Reflect.get(...arguments)}});else A={[$]:L};var M=D.apply(A,Array.prototype.slice.call(J));if(V){if(Zq(M))console.warn("Run-async wrapped function (sync) returned a promise but async() callback must be executed to resolve.")}else if(Zq(M))E=!0,M.then(H,K);else H(M);Z=!0});return Y.then(F.bind(null,null),F),Y}};Uq.cb=function(D,F){return Uq(function(){var $=Array.prototype.slice.call(arguments);if($.length===D.length-1)$.push(this.async());return D.apply(this,$)},F)}});var S0=z((Aq)=>{Object.defineProperty(Aq,"__esModule",{value:!0});Aq.isFunction=void 0;function xu(D){return typeof D==="function"}Aq.isFunction=xu});var F6=z((Nq)=>{Object.defineProperty(Nq,"__esModule",{value:!0});Nq.createErrorClass=void 0;function _u(D){var F=function(J){Error.call(J),J.stack=Error().stack},$=D(F);return $.prototype=Object.create(Error.prototype),$.prototype.constructor=$,$}Nq.createErrorClass=_u});var bQ=z((Rq)=>{Object.defineProperty(Rq,"__esModule",{value:!0});Rq.UnsubscriptionError=void 0;var fu=F6();Rq.UnsubscriptionError=fu.createErrorClass(function(D){return function($){D(this),this.message=$?$.length+` errors occurred during unsubscription:
30
30
  `+$.map(function(J,Q){return Q+1+") "+J.toString()}).join(`
31
- `):"",this.name="UnsubscriptionError",this.errors=$}})});var P8=z((wq)=>{Object.defineProperty(wq,"__esModule",{value:!0});wq.arrRemove=void 0;function gu(D,F){if(D){var $=D.indexOf(F);0<=$&&D.splice($,1)}}wq.arrRemove=gu});var F1=z((pD)=>{var jq=pD&&pD.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")},Pq=pD&&pD.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Iq=pD&&pD.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(pD,"__esModule",{value:!0});pD.isSubscription=pD.EMPTY_SUBSCRIPTION=pD.Subscription=void 0;var mF=S0(),uQ=bQ(),Sq=P8(),mQ=function(){function D(F){this.initialTeardown=F,this.closed=!1,this._parentage=null,this._finalizers=null}return D.prototype.unsubscribe=function(){var F,$,J,Q,Y;if(!this.closed){this.closed=!0;var B=this._parentage;if(B)if(this._parentage=null,Array.isArray(B))try{for(var X=jq(B),G=X.next();!G.done;G=X.next()){var H=G.value;H.remove(this)}}catch(L){F={error:L}}finally{try{if(G&&!G.done&&($=X.return))$.call(X)}finally{if(F)throw F.error}}else B.remove(this);var q=this.initialTeardown;if(mF.isFunction(q))try{q()}catch(L){Y=L instanceof uQ.UnsubscriptionError?L.errors:[L]}var K=this._finalizers;if(K){this._finalizers=null;try{for(var V=jq(K),E=V.next();!E.done;E=V.next()){var Z=E.value;try{kq(Z)}catch(L){if(Y=Y!==null&&Y!==void 0?Y:[],L instanceof uQ.UnsubscriptionError)Y=Iq(Iq([],Pq(Y)),Pq(L.errors));else Y.push(L)}}}catch(L){J={error:L}}finally{try{if(E&&!E.done&&(Q=V.return))Q.call(V)}finally{if(J)throw J.error}}}if(Y)throw new uQ.UnsubscriptionError(Y)}},D.prototype.add=function(F){var $;if(F&&F!==this)if(this.closed)kq(F);else{if(F instanceof D){if(F.closed||F._hasParent(this))return;F._addParent(this)}(this._finalizers=($=this._finalizers)!==null&&$!==void 0?$:[]).push(F)}},D.prototype._hasParent=function(F){var $=this._parentage;return $===F||Array.isArray($)&&$.includes(F)},D.prototype._addParent=function(F){var $=this._parentage;this._parentage=Array.isArray($)?($.push(F),$):$?[$,F]:F},D.prototype._removeParent=function(F){var $=this._parentage;if($===F)this._parentage=null;else if(Array.isArray($))Sq.arrRemove($,F)},D.prototype.remove=function(F){var $=this._finalizers;if($&&Sq.arrRemove($,F),F instanceof D)F._removeParent(this)},D.EMPTY=function(){var F=new D;return F.closed=!0,F}(),D}();pD.Subscription=mQ;pD.EMPTY_SUBSCRIPTION=mQ.EMPTY;function hu(D){return D instanceof mQ||D&&"closed"in D&&mF.isFunction(D.remove)&&mF.isFunction(D.add)&&mF.isFunction(D.unsubscribe)}pD.isSubscription=hu;function kq(D){if(mF.isFunction(D))D();else D.unsubscribe()}});var o4=z((vq)=>{Object.defineProperty(vq,"__esModule",{value:!0});vq.config=void 0;vq.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var lQ=z((D8)=>{var xq=D8&&D8.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},_q=D8&&D8.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(D8,"__esModule",{value:!0});D8.timeoutProvider=void 0;D8.timeoutProvider={setTimeout:function(D,F){var $=[];for(var J=2;J<arguments.length;J++)$[J-2]=arguments[J];var Q=D8.timeoutProvider.delegate;if(Q===null||Q===void 0?void 0:Q.setTimeout)return Q.setTimeout.apply(Q,_q([D,F],xq($)));return setTimeout.apply(void 0,_q([D,F],xq($)))},clearTimeout:function(D){var F=D8.timeoutProvider.delegate;return((F===null||F===void 0?void 0:F.clearTimeout)||clearTimeout)(D)},delegate:void 0}});var pQ=z((fq)=>{Object.defineProperty(fq,"__esModule",{value:!0});fq.reportUnhandledError=void 0;var bu=o4(),uu=lQ();function mu(D){uu.timeoutProvider.setTimeout(function(){var F=bu.config.onUnhandledError;if(F)F(D);else throw D})}fq.reportUnhandledError=mu});var zD=z((hq)=>{Object.defineProperty(hq,"__esModule",{value:!0});hq.noop=void 0;function lu(){}hq.noop=lu});var lq=z((uq)=>{Object.defineProperty(uq,"__esModule",{value:!0});uq.createNotification=uq.nextNotification=uq.errorNotification=uq.COMPLETE_NOTIFICATION=void 0;uq.COMPLETE_NOTIFICATION=function(){return t9("C",void 0,void 0)}();function pu(D){return t9("E",void 0,D)}uq.errorNotification=pu;function du(D){return t9("N",D,void 0)}uq.nextNotification=du;function t9(D,F,$){return{kind:D,value:F,error:$}}uq.createNotification=t9});var e9=z((dq)=>{Object.defineProperty(dq,"__esModule",{value:!0});dq.captureError=dq.errorContext=void 0;var pq=o4(),t6=null;function au(D){if(pq.config.useDeprecatedSynchronousErrorHandling){var F=!t6;if(F)t6={errorThrown:!1,error:null};if(D(),F){var $=t6,J=$.errorThrown,Q=$.error;if(t6=null,J)throw Q}}else D()}dq.errorContext=au;function ou(D){if(pq.config.useDeprecatedSynchronousErrorHandling&&t6)t6.errorThrown=!0,t6.error=D}dq.captureError=ou});var s4=z((P1)=>{var aq=P1&&P1.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(P1,"__esModule",{value:!0});P1.EMPTY_OBSERVER=P1.SafeSubscriber=P1.Subscriber=void 0;var ru=S0(),nq=F1(),iQ=o4(),tu=pQ(),iq=zD(),dQ=lq(),eu=lQ(),Dm=e9(),oq=function(D){aq(F,D);function F($){var J=D.call(this)||this;if(J.isStopped=!1,$){if(J.destination=$,nq.isSubscription($))$.add(J)}else J.destination=P1.EMPTY_OBSERVER;return J}return F.create=function($,J,Q){return new sq($,J,Q)},F.prototype.next=function($){if(this.isStopped)nQ(dQ.nextNotification($),this);else this._next($)},F.prototype.error=function($){if(this.isStopped)nQ(dQ.errorNotification($),this);else this.isStopped=!0,this._error($)},F.prototype.complete=function(){if(this.isStopped)nQ(dQ.COMPLETE_NOTIFICATION,this);else this.isStopped=!0,this._complete()},F.prototype.unsubscribe=function(){if(!this.closed)this.isStopped=!0,D.prototype.unsubscribe.call(this),this.destination=null},F.prototype._next=function($){this.destination.next($)},F.prototype._error=function($){try{this.destination.error($)}finally{this.unsubscribe()}},F.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},F}(nq.Subscription);P1.Subscriber=oq;var Fm=Function.prototype.bind;function cQ(D,F){return Fm.call(D,F)}var $m=function(){function D(F){this.partialObserver=F}return D.prototype.next=function(F){var $=this.partialObserver;if($.next)try{$.next(F)}catch(J){D7(J)}},D.prototype.error=function(F){var $=this.partialObserver;if($.error)try{$.error(F)}catch(J){D7(J)}else D7(F)},D.prototype.complete=function(){var F=this.partialObserver;if(F.complete)try{F.complete()}catch($){D7($)}},D}(),sq=function(D){aq(F,D);function F($,J,Q){var Y=D.call(this)||this,B;if(ru.isFunction($)||!$)B={next:$!==null&&$!==void 0?$:void 0,error:J!==null&&J!==void 0?J:void 0,complete:Q!==null&&Q!==void 0?Q:void 0};else{var X;if(Y&&iQ.config.useDeprecatedNextContext)X=Object.create($),X.unsubscribe=function(){return Y.unsubscribe()},B={next:$.next&&cQ($.next,X),error:$.error&&cQ($.error,X),complete:$.complete&&cQ($.complete,X)};else B=$}return Y.destination=new $m(B),Y}return F}(oq);P1.SafeSubscriber=sq;function D7(D){if(iQ.config.useDeprecatedSynchronousErrorHandling)Dm.captureError(D);else tu.reportUnhandledError(D)}function Jm(D){throw D}function nQ(D,F){var $=iQ.config.onStoppedNotification;$&&eu.timeoutProvider.setTimeout(function(){return $(D,F)})}P1.EMPTY_OBSERVER={closed:!0,next:iq.noop,error:Jm,complete:iq.noop}});var lF=z((rq)=>{Object.defineProperty(rq,"__esModule",{value:!0});rq.observable=void 0;rq.observable=function(){return typeof Symbol==="function"&&Symbol.observable||"@@observable"}()});var ED=z((eq)=>{Object.defineProperty(eq,"__esModule",{value:!0});eq.identity=void 0;function Qm(D){return D}eq.identity=Qm});var pF=z(($K)=>{Object.defineProperty($K,"__esModule",{value:!0});$K.pipeFromArray=$K.pipe=void 0;var Ym=ED();function Bm(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return FK(D)}$K.pipe=Bm;function FK(D){if(D.length===0)return Ym.identity;if(D.length===1)return D[0];return function($){return D.reduce(function(J,Q){return Q(J)},$)}}$K.pipeFromArray=FK});var v0=z((YK)=>{Object.defineProperty(YK,"__esModule",{value:!0});YK.Observable=void 0;var oQ=s4(),Gm=F1(),Wm=lF(),Hm=pF(),qm=o4(),aQ=S0(),Km=e9(),zm=function(){function D(F){if(F)this._subscribe=F}return D.prototype.lift=function(F){var $=new D;return $.source=this,$.operator=F,$},D.prototype.subscribe=function(F,$,J){var Q=this,Y=Vm(F)?F:new oQ.SafeSubscriber(F,$,J);return Km.errorContext(function(){var B=Q,X=B.operator,G=B.source;Y.add(X?X.call(Y,G):G?Q._subscribe(Y):Q._trySubscribe(Y))}),Y},D.prototype._trySubscribe=function(F){try{return this._subscribe(F)}catch($){F.error($)}},D.prototype.forEach=function(F,$){var J=this;return $=QK($),new $(function(Q,Y){var B=new oQ.SafeSubscriber({next:function(X){try{F(X)}catch(G){Y(G),B.unsubscribe()}},error:Y,complete:Q});J.subscribe(B)})},D.prototype._subscribe=function(F){var $;return($=this.source)===null||$===void 0?void 0:$.subscribe(F)},D.prototype[Wm.observable]=function(){return this},D.prototype.pipe=function(){var F=[];for(var $=0;$<arguments.length;$++)F[$]=arguments[$];return Hm.pipeFromArray(F)(this)},D.prototype.toPromise=function(F){var $=this;return F=QK(F),new F(function(J,Q){var Y;$.subscribe(function(B){return Y=B},function(B){return Q(B)},function(){return J(Y)})})},D.create=function(F){return new D(F)},D}();YK.Observable=zm;function QK(D){var F;return(F=D!==null&&D!==void 0?D:qm.config.Promise)!==null&&F!==void 0?F:Promise}function Em(D){return D&&aQ.isFunction(D.next)&&aQ.isFunction(D.error)&&aQ.isFunction(D.complete)}function Vm(D){return D&&D instanceof oQ.Subscriber||Em(D)&&Gm.isSubscription(D)}});var x=z((GK)=>{Object.defineProperty(GK,"__esModule",{value:!0});GK.operate=GK.hasLift=void 0;var Zm=S0();function XK(D){return Zm.isFunction(D===null||D===void 0?void 0:D.lift)}GK.hasLift=XK;function Um(D){return function(F){if(XK(F))return F.lift(function($){try{return D($,this)}catch(J){this.error(J)}});throw TypeError("Unable to lift unknown Observable type")}}GK.operate=Um});var l=z(($6)=>{var Am=$6&&$6.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty($6,"__esModule",{value:!0});$6.OperatorSubscriber=$6.createOperatorSubscriber=void 0;var Mm=s4();function Nm(D,F,$,J,Q){return new HK(D,F,$,J,Q)}$6.createOperatorSubscriber=Nm;var HK=function(D){Am(F,D);function F($,J,Q,Y,B,X){var G=D.call(this,$)||this;return G.onFinalize=B,G.shouldUnsubscribe=X,G._next=J?function(H){try{J(H)}catch(q){$.error(q)}}:D.prototype._next,G._error=Y?function(H){try{Y(H)}catch(q){$.error(q)}finally{this.unsubscribe()}}:D.prototype._error,G._complete=Q?function(){try{Q()}catch(H){$.error(H)}finally{this.unsubscribe()}}:D.prototype._complete,G}return F.prototype.unsubscribe=function(){var $;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var J=this.closed;D.prototype.unsubscribe.call(this),!J&&(($=this.onFinalize)===null||$===void 0||$.call(this))}},F}(Mm.Subscriber);$6.OperatorSubscriber=HK});var sQ=z((qK)=>{Object.defineProperty(qK,"__esModule",{value:!0});qK.refCount=void 0;var Cm=x(),Rm=l();function Om(){return Cm.operate(function(D,F){var $=null;D._refCount++;var J=Rm.createOperatorSubscriber(F,void 0,void 0,void 0,function(){if(!D||D._refCount<=0||0<--D._refCount){$=null;return}var Q=D._connection,Y=$;if($=null,Q&&(!Y||Q===Y))Q.unsubscribe();F.unsubscribe()});if(D.subscribe(J),!J.closed)$=D.connect()})}qK.refCount=Om});var dF=z((r4)=>{var wm=r4&&r4.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(r4,"__esModule",{value:!0});r4.ConnectableObservable=void 0;var Tm=v0(),zK=F1(),jm=sQ(),Pm=l(),Im=x(),Sm=function(D){wm(F,D);function F($,J){var Q=D.call(this)||this;if(Q.source=$,Q.subjectFactory=J,Q._subject=null,Q._refCount=0,Q._connection=null,Im.hasLift($))Q.lift=$.lift;return Q}return F.prototype._subscribe=function($){return this.getSubject().subscribe($)},F.prototype.getSubject=function(){var $=this._subject;if(!$||$.isStopped)this._subject=this.subjectFactory();return this._subject},F.prototype._teardown=function(){this._refCount=0;var $=this._connection;this._subject=this._connection=null,$===null||$===void 0||$.unsubscribe()},F.prototype.connect=function(){var $=this,J=this._connection;if(!J){J=this._connection=new zK.Subscription;var Q=this.getSubject();if(J.add(this.source.subscribe(Pm.createOperatorSubscriber(Q,void 0,function(){$._teardown(),Q.complete()},function(Y){$._teardown(),Q.error(Y)},function(){return $._teardown()}))),J.closed)this._connection=null,J=zK.Subscription.EMPTY}return J},F.prototype.refCount=function(){return jm.refCount()(this)},F}(Tm.Observable);r4.ConnectableObservable=Sm});var VK=z((EK)=>{Object.defineProperty(EK,"__esModule",{value:!0});EK.performanceTimestampProvider=void 0;EK.performanceTimestampProvider={now:function(){return(EK.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var tQ=z((I1)=>{var ZK=I1&&I1.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},UK=I1&&I1.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(I1,"__esModule",{value:!0});I1.animationFrameProvider=void 0;var km=F1();I1.animationFrameProvider={schedule:function(D){var F=requestAnimationFrame,$=cancelAnimationFrame,J=I1.animationFrameProvider.delegate;if(J)F=J.requestAnimationFrame,$=J.cancelAnimationFrame;var Q=F(function(Y){$=void 0,D(Y)});return new km.Subscription(function(){return $===null||$===void 0?void 0:$(Q)})},requestAnimationFrame:function(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=I1.animationFrameProvider.delegate;return(($===null||$===void 0?void 0:$.requestAnimationFrame)||requestAnimationFrame).apply(void 0,UK([],ZK(D)))},cancelAnimationFrame:function(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=I1.animationFrameProvider.delegate;return(($===null||$===void 0?void 0:$.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,UK([],ZK(D)))},delegate:void 0}});var CK=z((MK)=>{Object.defineProperty(MK,"__esModule",{value:!0});MK.animationFrames=void 0;var vm=v0(),ym=VK(),LK=tQ();function xm(D){return D?AK(D):_m}MK.animationFrames=xm;function AK(D){return new vm.Observable(function(F){var $=D||ym.performanceTimestampProvider,J=$.now(),Q=0,Y=function(){if(!F.closed)Q=LK.animationFrameProvider.requestAnimationFrame(function(B){Q=0;var X=$.now();F.next({timestamp:D?X:B,elapsed:X-J}),Y()})};return Y(),function(){if(Q)LK.animationFrameProvider.cancelAnimationFrame(Q)}})}var _m=AK()});var eQ=z((RK)=>{Object.defineProperty(RK,"__esModule",{value:!0});RK.ObjectUnsubscribedError=void 0;var fm=F6();RK.ObjectUnsubscribedError=fm.createErrorClass(function(D){return function(){D(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var VD=z((F8)=>{var TK=F8&&F8.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}(),gm=F8&&F8.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(F8,"__esModule",{value:!0});F8.AnonymousSubject=F8.Subject=void 0;var wK=v0(),FY=F1(),hm=eQ(),bm=P8(),DY=e9(),jK=function(D){TK(F,D);function F(){var $=D.call(this)||this;return $.closed=!1,$.currentObservers=null,$.observers=[],$.isStopped=!1,$.hasError=!1,$.thrownError=null,$}return F.prototype.lift=function($){var J=new $Y(this,this);return J.operator=$,J},F.prototype._throwIfClosed=function(){if(this.closed)throw new hm.ObjectUnsubscribedError},F.prototype.next=function($){var J=this;DY.errorContext(function(){var Q,Y;if(J._throwIfClosed(),!J.isStopped){if(!J.currentObservers)J.currentObservers=Array.from(J.observers);try{for(var B=gm(J.currentObservers),X=B.next();!X.done;X=B.next()){var G=X.value;G.next($)}}catch(H){Q={error:H}}finally{try{if(X&&!X.done&&(Y=B.return))Y.call(B)}finally{if(Q)throw Q.error}}}})},F.prototype.error=function($){var J=this;DY.errorContext(function(){if(J._throwIfClosed(),!J.isStopped){J.hasError=J.isStopped=!0,J.thrownError=$;var Q=J.observers;while(Q.length)Q.shift().error($)}})},F.prototype.complete=function(){var $=this;DY.errorContext(function(){if($._throwIfClosed(),!$.isStopped){$.isStopped=!0;var J=$.observers;while(J.length)J.shift().complete()}})},F.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(F.prototype,"observed",{get:function(){var $;return(($=this.observers)===null||$===void 0?void 0:$.length)>0},enumerable:!1,configurable:!0}),F.prototype._trySubscribe=function($){return this._throwIfClosed(),D.prototype._trySubscribe.call(this,$)},F.prototype._subscribe=function($){return this._throwIfClosed(),this._checkFinalizedStatuses($),this._innerSubscribe($)},F.prototype._innerSubscribe=function($){var J=this,Q=this,Y=Q.hasError,B=Q.isStopped,X=Q.observers;if(Y||B)return FY.EMPTY_SUBSCRIPTION;return this.currentObservers=null,X.push($),new FY.Subscription(function(){J.currentObservers=null,bm.arrRemove(X,$)})},F.prototype._checkFinalizedStatuses=function($){var J=this,Q=J.hasError,Y=J.thrownError,B=J.isStopped;if(Q)$.error(Y);else if(B)$.complete()},F.prototype.asObservable=function(){var $=new wK.Observable;return $.source=this,$},F.create=function($,J){return new $Y($,J)},F}(wK.Observable);F8.Subject=jK;var $Y=function(D){TK(F,D);function F($,J){var Q=D.call(this)||this;return Q.destination=$,Q.source=J,Q}return F.prototype.next=function($){var J,Q;(Q=(J=this.destination)===null||J===void 0?void 0:J.next)===null||Q===void 0||Q.call(J,$)},F.prototype.error=function($){var J,Q;(Q=(J=this.destination)===null||J===void 0?void 0:J.error)===null||Q===void 0||Q.call(J,$)},F.prototype.complete=function(){var $,J;(J=($=this.destination)===null||$===void 0?void 0:$.complete)===null||J===void 0||J.call($)},F.prototype._subscribe=function($){var J,Q;return(Q=(J=this.source)===null||J===void 0?void 0:J.subscribe($))!==null&&Q!==void 0?Q:FY.EMPTY_SUBSCRIPTION},F}(jK);F8.AnonymousSubject=$Y});var JY=z((t4)=>{var um=t4&&t4.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(t4,"__esModule",{value:!0});t4.BehaviorSubject=void 0;var mm=VD(),lm=function(D){um(F,D);function F($){var J=D.call(this)||this;return J._value=$,J}return Object.defineProperty(F.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),F.prototype._subscribe=function($){var J=D.prototype._subscribe.call(this,$);return!J.closed&&$.next(this._value),J},F.prototype.getValue=function(){var $=this,J=$.hasError,Q=$.thrownError,Y=$._value;if(J)throw Q;return this._throwIfClosed(),Y},F.prototype.next=function($){D.prototype.next.call(this,this._value=$)},F}(mm.Subject);t4.BehaviorSubject=lm});var F7=z((PK)=>{Object.defineProperty(PK,"__esModule",{value:!0});PK.dateTimestampProvider=void 0;PK.dateTimestampProvider={now:function(){return(PK.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var $7=z((e4)=>{var pm=e4&&e4.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(e4,"__esModule",{value:!0});e4.ReplaySubject=void 0;var dm=VD(),cm=F7(),nm=function(D){pm(F,D);function F($,J,Q){if($===void 0)$=1/0;if(J===void 0)J=1/0;if(Q===void 0)Q=cm.dateTimestampProvider;var Y=D.call(this)||this;return Y._bufferSize=$,Y._windowTime=J,Y._timestampProvider=Q,Y._buffer=[],Y._infiniteTimeWindow=!0,Y._infiniteTimeWindow=J===1/0,Y._bufferSize=Math.max(1,$),Y._windowTime=Math.max(1,J),Y}return F.prototype.next=function($){var J=this,Q=J.isStopped,Y=J._buffer,B=J._infiniteTimeWindow,X=J._timestampProvider,G=J._windowTime;if(!Q)Y.push($),!B&&Y.push(X.now()+G);this._trimBuffer(),D.prototype.next.call(this,$)},F.prototype._subscribe=function($){this._throwIfClosed(),this._trimBuffer();var J=this._innerSubscribe($),Q=this,Y=Q._infiniteTimeWindow,B=Q._buffer,X=B.slice();for(var G=0;G<X.length&&!$.closed;G+=Y?1:2)$.next(X[G]);return this._checkFinalizedStatuses($),J},F.prototype._trimBuffer=function(){var $=this,J=$._bufferSize,Q=$._timestampProvider,Y=$._buffer,B=$._infiniteTimeWindow,X=(B?1:2)*J;if(J<1/0&&X<Y.length&&Y.splice(0,Y.length-X),!B){var G=Q.now(),H=0;for(var q=1;q<Y.length&&Y[q]<=G;q+=2)H=q;H&&Y.splice(0,H+1)}},F}(dm.Subject);e4.ReplaySubject=nm});var J7=z((D3)=>{var im=D3&&D3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(D3,"__esModule",{value:!0});D3.AsyncSubject=void 0;var am=VD(),om=function(D){im(F,D);function F(){var $=D!==null&&D.apply(this,arguments)||this;return $._value=null,$._hasValue=!1,$._isComplete=!1,$}return F.prototype._checkFinalizedStatuses=function($){var J=this,Q=J.hasError,Y=J._hasValue,B=J._value,X=J.thrownError,G=J.isStopped,H=J._isComplete;if(Q)$.error(X);else if(G||H)Y&&$.next(B),$.complete()},F.prototype.next=function($){if(!this.isStopped)this._value=$,this._hasValue=!0},F.prototype.complete=function(){var $=this,J=$._hasValue,Q=$._value,Y=$._isComplete;if(!Y)this._isComplete=!0,J&&D.prototype.next.call(this,Q),D.prototype.complete.call(this)},F}(am.Subject);D3.AsyncSubject=om});var IK=z((F3)=>{var sm=F3&&F3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(F3,"__esModule",{value:!0});F3.Action=void 0;var rm=F1(),tm=function(D){sm(F,D);function F($,J){return D.call(this)||this}return F.prototype.schedule=function($,J){if(J===void 0)J=0;return this},F}(rm.Subscription);F3.Action=tm});var vK=z(($8)=>{var SK=$8&&$8.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},kK=$8&&$8.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty($8,"__esModule",{value:!0});$8.intervalProvider=void 0;$8.intervalProvider={setInterval:function(D,F){var $=[];for(var J=2;J<arguments.length;J++)$[J-2]=arguments[J];var Q=$8.intervalProvider.delegate;if(Q===null||Q===void 0?void 0:Q.setInterval)return Q.setInterval.apply(Q,kK([D,F],SK($)));return setInterval.apply(void 0,kK([D,F],SK($)))},clearInterval:function(D){var F=$8.intervalProvider.delegate;return((F===null||F===void 0?void 0:F.clearInterval)||clearInterval)(D)},delegate:void 0}});var J3=z(($3)=>{var em=$3&&$3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty($3,"__esModule",{value:!0});$3.AsyncAction=void 0;var Dl=IK(),yK=vK(),Fl=P8(),$l=function(D){em(F,D);function F($,J){var Q=D.call(this,$,J)||this;return Q.scheduler=$,Q.work=J,Q.pending=!1,Q}return F.prototype.schedule=function($,J){var Q;if(J===void 0)J=0;if(this.closed)return this;this.state=$;var Y=this.id,B=this.scheduler;if(Y!=null)this.id=this.recycleAsyncId(B,Y,J);return this.pending=!0,this.delay=J,this.id=(Q=this.id)!==null&&Q!==void 0?Q:this.requestAsyncId(B,this.id,J),this},F.prototype.requestAsyncId=function($,J,Q){if(Q===void 0)Q=0;return yK.intervalProvider.setInterval($.flush.bind($,this),Q)},F.prototype.recycleAsyncId=function($,J,Q){if(Q===void 0)Q=0;if(Q!=null&&this.delay===Q&&this.pending===!1)return J;if(J!=null)yK.intervalProvider.clearInterval(J);return},F.prototype.execute=function($,J){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var Q=this._execute($,J);if(Q)return Q;else if(this.pending===!1&&this.id!=null)this.id=this.recycleAsyncId(this.scheduler,this.id,null)},F.prototype._execute=function($,J){var Q=!1,Y;try{this.work($)}catch(B){Q=!0,Y=B?B:Error("Scheduled action threw falsy error")}if(Q)return this.unsubscribe(),Y},F.prototype.unsubscribe=function(){if(!this.closed){var $=this,J=$.id,Q=$.scheduler,Y=Q.actions;if(this.work=this.state=this.scheduler=null,this.pending=!1,Fl.arrRemove(Y,this),J!=null)this.id=this.recycleAsyncId(Q,J,null);this.delay=null,D.prototype.unsubscribe.call(this)}},F}(Dl.Action);$3.AsyncAction=$l});var gK=z((_K)=>{Object.defineProperty(_K,"__esModule",{value:!0});_K.TestTools=_K.Immediate=void 0;var Jl=1,YY,Q7={};function xK(D){if(D in Q7)return delete Q7[D],!0;return!1}_K.Immediate={setImmediate:function(D){var F=Jl++;if(Q7[F]=!0,!YY)YY=Promise.resolve();return YY.then(function(){return xK(F)&&D()}),F},clearImmediate:function(D){xK(D)}};_K.TestTools={pending:function(){return Object.keys(Q7).length}}});var bK=z((J8)=>{var Yl=J8&&J8.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Bl=J8&&J8.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(J8,"__esModule",{value:!0});J8.immediateProvider=void 0;var hK=gK(),Xl=hK.Immediate.setImmediate,Gl=hK.Immediate.clearImmediate;J8.immediateProvider={setImmediate:function(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=J8.immediateProvider.delegate;return(($===null||$===void 0?void 0:$.setImmediate)||Xl).apply(void 0,Bl([],Yl(D)))},clearImmediate:function(D){var F=J8.immediateProvider.delegate;return((F===null||F===void 0?void 0:F.clearImmediate)||Gl)(D)},delegate:void 0}});var mK=z((Q3)=>{var Wl=Q3&&Q3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(Q3,"__esModule",{value:!0});Q3.AsapAction=void 0;var Hl=J3(),uK=bK(),ql=function(D){Wl(F,D);function F($,J){var Q=D.call(this,$,J)||this;return Q.scheduler=$,Q.work=J,Q}return F.prototype.requestAsyncId=function($,J,Q){if(Q===void 0)Q=0;if(Q!==null&&Q>0)return D.prototype.requestAsyncId.call(this,$,J,Q);return $.actions.push(this),$._scheduled||($._scheduled=uK.immediateProvider.setImmediate($.flush.bind($,void 0)))},F.prototype.recycleAsyncId=function($,J,Q){var Y;if(Q===void 0)Q=0;if(Q!=null?Q>0:this.delay>0)return D.prototype.recycleAsyncId.call(this,$,J,Q);var B=$.actions;if(J!=null&&((Y=B[B.length-1])===null||Y===void 0?void 0:Y.id)!==J){if(uK.immediateProvider.clearImmediate(J),$._scheduled===J)$._scheduled=void 0}return},F}(Hl.AsyncAction);Q3.AsapAction=ql});var BY=z((lK)=>{Object.defineProperty(lK,"__esModule",{value:!0});lK.Scheduler=void 0;var Kl=F7(),zl=function(){function D(F,$){if($===void 0)$=D.now;this.schedulerActionCtor=F,this.now=$}return D.prototype.schedule=function(F,$,J){if($===void 0)$=0;return new this.schedulerActionCtor(this,F).schedule(J,$)},D.now=Kl.dateTimestampProvider.now,D}();lK.Scheduler=zl});var B3=z((Y3)=>{var El=Y3&&Y3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(Y3,"__esModule",{value:!0});Y3.AsyncScheduler=void 0;var dK=BY(),Vl=function(D){El(F,D);function F($,J){if(J===void 0)J=dK.Scheduler.now;var Q=D.call(this,$,J)||this;return Q.actions=[],Q._active=!1,Q}return F.prototype.flush=function($){var J=this.actions;if(this._active){J.push($);return}var Q;this._active=!0;do if(Q=$.execute($.state,$.delay))break;while($=J.shift());if(this._active=!1,Q){while($=J.shift())$.unsubscribe();throw Q}},F}(dK.Scheduler);Y3.AsyncScheduler=Vl});var cK=z((X3)=>{var Zl=X3&&X3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(X3,"__esModule",{value:!0});X3.AsapScheduler=void 0;var Ul=B3(),Ll=function(D){Zl(F,D);function F(){return D!==null&&D.apply(this,arguments)||this}return F.prototype.flush=function($){this._active=!0;var J=this._scheduled;this._scheduled=void 0;var Q=this.actions,Y;$=$||Q.shift();do if(Y=$.execute($.state,$.delay))break;while(($=Q[0])&&$.id===J&&Q.shift());if(this._active=!1,Y){while(($=Q[0])&&$.id===J&&Q.shift())$.unsubscribe();throw Y}},F}(Ul.AsyncScheduler);X3.AsapScheduler=Ll});var oK=z((nK)=>{Object.defineProperty(nK,"__esModule",{value:!0});nK.asap=nK.asapScheduler=void 0;var Al=mK(),Ml=cK();nK.asapScheduler=new Ml.AsapScheduler(Al.AsapAction);nK.asap=nK.asapScheduler});var dD=z((sK)=>{Object.defineProperty(sK,"__esModule",{value:!0});sK.async=sK.asyncScheduler=void 0;var Nl=J3(),Cl=B3();sK.asyncScheduler=new Cl.AsyncScheduler(Nl.AsyncAction);sK.async=sK.asyncScheduler});var eK=z((G3)=>{var Rl=G3&&G3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(G3,"__esModule",{value:!0});G3.QueueAction=void 0;var Ol=J3(),wl=function(D){Rl(F,D);function F($,J){var Q=D.call(this,$,J)||this;return Q.scheduler=$,Q.work=J,Q}return F.prototype.schedule=function($,J){if(J===void 0)J=0;if(J>0)return D.prototype.schedule.call(this,$,J);return this.delay=J,this.state=$,this.scheduler.flush(this),this},F.prototype.execute=function($,J){return J>0||this.closed?D.prototype.execute.call(this,$,J):this._execute($,J)},F.prototype.requestAsyncId=function($,J,Q){if(Q===void 0)Q=0;if(Q!=null&&Q>0||Q==null&&this.delay>0)return D.prototype.requestAsyncId.call(this,$,J,Q);return $.flush(this),0},F}(Ol.AsyncAction);G3.QueueAction=wl});var Dz=z((W3)=>{var Tl=W3&&W3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(W3,"__esModule",{value:!0});W3.QueueScheduler=void 0;var jl=B3(),Pl=function(D){Tl(F,D);function F(){return D!==null&&D.apply(this,arguments)||this}return F}(jl.AsyncScheduler);W3.QueueScheduler=Pl});var Qz=z((Fz)=>{Object.defineProperty(Fz,"__esModule",{value:!0});Fz.queue=Fz.queueScheduler=void 0;var Il=eK(),Sl=Dz();Fz.queueScheduler=new Sl.QueueScheduler(Il.QueueAction);Fz.queue=Fz.queueScheduler});var Bz=z((H3)=>{var kl=H3&&H3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(H3,"__esModule",{value:!0});H3.AnimationFrameAction=void 0;var vl=J3(),Yz=tQ(),yl=function(D){kl(F,D);function F($,J){var Q=D.call(this,$,J)||this;return Q.scheduler=$,Q.work=J,Q}return F.prototype.requestAsyncId=function($,J,Q){if(Q===void 0)Q=0;if(Q!==null&&Q>0)return D.prototype.requestAsyncId.call(this,$,J,Q);return $.actions.push(this),$._scheduled||($._scheduled=Yz.animationFrameProvider.requestAnimationFrame(function(){return $.flush(void 0)}))},F.prototype.recycleAsyncId=function($,J,Q){var Y;if(Q===void 0)Q=0;if(Q!=null?Q>0:this.delay>0)return D.prototype.recycleAsyncId.call(this,$,J,Q);var B=$.actions;if(J!=null&&J===$._scheduled&&((Y=B[B.length-1])===null||Y===void 0?void 0:Y.id)!==J)Yz.animationFrameProvider.cancelAnimationFrame(J),$._scheduled=void 0;return},F}(vl.AsyncAction);H3.AnimationFrameAction=yl});var Xz=z((q3)=>{var xl=q3&&q3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(q3,"__esModule",{value:!0});q3.AnimationFrameScheduler=void 0;var _l=B3(),fl=function(D){xl(F,D);function F(){return D!==null&&D.apply(this,arguments)||this}return F.prototype.flush=function($){this._active=!0;var J;if($)J=$.id;else J=this._scheduled,this._scheduled=void 0;var Q=this.actions,Y;$=$||Q.shift();do if(Y=$.execute($.state,$.delay))break;while(($=Q[0])&&$.id===J&&Q.shift());if(this._active=!1,Y){while(($=Q[0])&&$.id===J&&Q.shift())$.unsubscribe();throw Y}},F}(_l.AsyncScheduler);q3.AnimationFrameScheduler=fl});var qz=z((Gz)=>{Object.defineProperty(Gz,"__esModule",{value:!0});Gz.animationFrame=Gz.animationFrameScheduler=void 0;var gl=Bz(),hl=Xz();Gz.animationFrameScheduler=new hl.AnimationFrameScheduler(gl.AnimationFrameAction);Gz.animationFrame=Gz.animationFrameScheduler});var Ez=z((J6)=>{var Kz=J6&&J6.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(J6,"__esModule",{value:!0});J6.VirtualAction=J6.VirtualTimeScheduler=void 0;var bl=J3(),ul=F1(),ml=B3(),ll=function(D){Kz(F,D);function F($,J){if($===void 0)$=zz;if(J===void 0)J=1/0;var Q=D.call(this,$,function(){return Q.frame})||this;return Q.maxFrames=J,Q.frame=0,Q.index=-1,Q}return F.prototype.flush=function(){var $=this,J=$.actions,Q=$.maxFrames,Y,B;while((B=J[0])&&B.delay<=Q)if(J.shift(),this.frame=B.delay,Y=B.execute(B.state,B.delay))break;if(Y){while(B=J.shift())B.unsubscribe();throw Y}},F.frameTimeFactor=10,F}(ml.AsyncScheduler);J6.VirtualTimeScheduler=ll;var zz=function(D){Kz(F,D);function F($,J,Q){if(Q===void 0)Q=$.index+=1;var Y=D.call(this,$,J)||this;return Y.scheduler=$,Y.work=J,Y.index=Q,Y.active=!0,Y.index=$.index=Q,Y}return F.prototype.schedule=function($,J){if(J===void 0)J=0;if(Number.isFinite(J)){if(!this.id)return D.prototype.schedule.call(this,$,J);this.active=!1;var Q=new F(this.scheduler,this.work);return this.add(Q),Q.schedule($,J)}else return ul.Subscription.EMPTY},F.prototype.requestAsyncId=function($,J,Q){if(Q===void 0)Q=0;this.delay=$.frame+Q;var Y=$.actions;return Y.push(this),Y.sort(F.sortActions),1},F.prototype.recycleAsyncId=function($,J,Q){if(Q===void 0)Q=0;return},F.prototype._execute=function($,J){if(this.active===!0)return D.prototype._execute.call(this,$,J)},F.sortActions=function($,J){if($.delay===J.delay)if($.index===J.index)return 0;else if($.index>J.index)return 1;else return-1;else if($.delay>J.delay)return 1;else return-1},F}(bl.AsyncAction);J6.VirtualAction=zz});var S1=z((Zz)=>{Object.defineProperty(Zz,"__esModule",{value:!0});Zz.empty=Zz.EMPTY=void 0;var Vz=v0();Zz.EMPTY=new Vz.Observable(function(D){return D.complete()});function pl(D){return D?dl(D):Zz.EMPTY}Zz.empty=pl;function dl(D){return new Vz.Observable(function(F){return D.schedule(function(){return F.complete()})})}});var cF=z((Az)=>{Object.defineProperty(Az,"__esModule",{value:!0});Az.isScheduler=void 0;var cl=S0();function nl(D){return D&&cl.isFunction(D.schedule)}Az.isScheduler=nl});var cD=z((Nz)=>{Object.defineProperty(Nz,"__esModule",{value:!0});Nz.popNumber=Nz.popScheduler=Nz.popResultSelector=void 0;var il=S0(),al=cF();function XY(D){return D[D.length-1]}function ol(D){return il.isFunction(XY(D))?D.pop():void 0}Nz.popResultSelector=ol;function sl(D){return al.isScheduler(XY(D))?D.pop():void 0}Nz.popScheduler=sl;function rl(D,F){return typeof XY(D)==="number"?D.pop():F}Nz.popNumber=rl});var Y7=z((Rz)=>{Object.defineProperty(Rz,"__esModule",{value:!0});Rz.isArrayLike=void 0;Rz.isArrayLike=function(D){return D&&typeof D.length==="number"&&typeof D!=="function"}});var GY=z((wz)=>{Object.defineProperty(wz,"__esModule",{value:!0});wz.isPromise=void 0;var Dp=S0();function Fp(D){return Dp.isFunction(D===null||D===void 0?void 0:D.then)}wz.isPromise=Fp});var WY=z((jz)=>{Object.defineProperty(jz,"__esModule",{value:!0});jz.isInteropObservable=void 0;var $p=lF(),Jp=S0();function Qp(D){return Jp.isFunction(D[$p.observable])}jz.isInteropObservable=Qp});var HY=z((Iz)=>{Object.defineProperty(Iz,"__esModule",{value:!0});Iz.isAsyncIterable=void 0;var Yp=S0();function Bp(D){return Symbol.asyncIterator&&Yp.isFunction(D===null||D===void 0?void 0:D[Symbol.asyncIterator])}Iz.isAsyncIterable=Bp});var qY=z((kz)=>{Object.defineProperty(kz,"__esModule",{value:!0});kz.createInvalidObservableTypeError=void 0;function Xp(D){return TypeError("You provided "+(D!==null&&typeof D==="object"?"an invalid object":"'"+D+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}kz.createInvalidObservableTypeError=Xp});var KY=z((xz)=>{Object.defineProperty(xz,"__esModule",{value:!0});xz.iterator=xz.getSymbolIterator=void 0;function yz(){if(typeof Symbol!=="function"||!Symbol.iterator)return"@@iterator";return Symbol.iterator}xz.getSymbolIterator=yz;xz.iterator=yz()});var zY=z((fz)=>{Object.defineProperty(fz,"__esModule",{value:!0});fz.isIterable=void 0;var Wp=KY(),Hp=S0();function qp(D){return Hp.isFunction(D===null||D===void 0?void 0:D[Wp.iterator])}fz.isIterable=qp});var B7=z((K1)=>{var Kp=K1&&K1.__generator||function(D,F){var $={label:0,sent:function(){if(Y[0]&1)throw Y[1];return Y[1]},trys:[],ops:[]},J,Q,Y,B;return B={next:X(0),throw:X(1),return:X(2)},typeof Symbol==="function"&&(B[Symbol.iterator]=function(){return this}),B;function X(H){return function(q){return G([H,q])}}function G(H){if(J)throw TypeError("Generator is already executing.");while($)try{if(J=1,Q&&(Y=H[0]&2?Q.return:H[0]?Q.throw||((Y=Q.return)&&Y.call(Q),0):Q.next)&&!(Y=Y.call(Q,H[1])).done)return Y;if(Q=0,Y)H=[H[0]&2,Y.value];switch(H[0]){case 0:case 1:Y=H;break;case 4:return $.label++,{value:H[1],done:!1};case 5:$.label++,Q=H[1],H=[0];continue;case 7:H=$.ops.pop(),$.trys.pop();continue;default:if((Y=$.trys,!(Y=Y.length>0&&Y[Y.length-1]))&&(H[0]===6||H[0]===2)){$=0;continue}if(H[0]===3&&(!Y||H[1]>Y[0]&&H[1]<Y[3])){$.label=H[1];break}if(H[0]===6&&$.label<Y[1]){$.label=Y[1],Y=H;break}if(Y&&$.label<Y[2]){$.label=Y[2],$.ops.push(H);break}if(Y[2])$.ops.pop();$.trys.pop();continue}H=F.call(D,$)}catch(q){H=[6,q],Q=0}finally{J=Y=0}if(H[0]&5)throw H[1];return{value:H[0]?H[1]:void 0,done:!0}}},K3=K1&&K1.__await||function(D){return this instanceof K3?(this.v=D,this):new K3(D)},zp=K1&&K1.__asyncGenerator||function(D,F,$){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var J=$.apply(D,F||[]),Q,Y=[];return Q={},B("next"),B("throw"),B("return"),Q[Symbol.asyncIterator]=function(){return this},Q;function B(V){if(J[V])Q[V]=function(E){return new Promise(function(Z,L){Y.push([V,E,Z,L])>1||X(V,E)})}}function X(V,E){try{G(J[V](E))}catch(Z){K(Y[0][3],Z)}}function G(V){V.value instanceof K3?Promise.resolve(V.value.v).then(H,q):K(Y[0][2],V)}function H(V){X("next",V)}function q(V){X("throw",V)}function K(V,E){if(V(E),Y.shift(),Y.length)X(Y[0][0],Y[0][1])}};Object.defineProperty(K1,"__esModule",{value:!0});K1.isReadableStreamLike=K1.readableStreamLikeToAsyncGenerator=void 0;var Ep=S0();function Vp(D){return zp(this,arguments,function(){var $,J,Q,Y;return Kp(this,function(B){switch(B.label){case 0:$=D.getReader(),B.label=1;case 1:B.trys.push([1,,9,10]),B.label=2;case 2:return[4,K3($.read())];case 3:if(J=B.sent(),Q=J.value,Y=J.done,!Y)return[3,5];return[4,K3(void 0)];case 4:return[2,B.sent()];case 5:return[4,K3(Q)];case 6:return[4,B.sent()];case 7:return B.sent(),[3,2];case 8:return[3,10];case 9:return $.releaseLock(),[7];case 10:return[2]}})})}K1.readableStreamLikeToAsyncGenerator=Vp;function Zp(D){return Ep.isFunction(D===null||D===void 0?void 0:D.getReader)}K1.isReadableStreamLike=Zp});var Y0=z((d0)=>{var Up=d0&&d0.__awaiter||function(D,F,$,J){function Q(Y){return Y instanceof $?Y:new $(function(B){B(Y)})}return new($||($=Promise))(function(Y,B){function X(q){try{H(J.next(q))}catch(K){B(K)}}function G(q){try{H(J.throw(q))}catch(K){B(K)}}function H(q){q.done?Y(q.value):Q(q.value).then(X,G)}H((J=J.apply(D,F||[])).next())})},Lp=d0&&d0.__generator||function(D,F){var $={label:0,sent:function(){if(Y[0]&1)throw Y[1];return Y[1]},trys:[],ops:[]},J,Q,Y,B;return B={next:X(0),throw:X(1),return:X(2)},typeof Symbol==="function"&&(B[Symbol.iterator]=function(){return this}),B;function X(H){return function(q){return G([H,q])}}function G(H){if(J)throw TypeError("Generator is already executing.");while($)try{if(J=1,Q&&(Y=H[0]&2?Q.return:H[0]?Q.throw||((Y=Q.return)&&Y.call(Q),0):Q.next)&&!(Y=Y.call(Q,H[1])).done)return Y;if(Q=0,Y)H=[H[0]&2,Y.value];switch(H[0]){case 0:case 1:Y=H;break;case 4:return $.label++,{value:H[1],done:!1};case 5:$.label++,Q=H[1],H=[0];continue;case 7:H=$.ops.pop(),$.trys.pop();continue;default:if((Y=$.trys,!(Y=Y.length>0&&Y[Y.length-1]))&&(H[0]===6||H[0]===2)){$=0;continue}if(H[0]===3&&(!Y||H[1]>Y[0]&&H[1]<Y[3])){$.label=H[1];break}if(H[0]===6&&$.label<Y[1]){$.label=Y[1],Y=H;break}if(Y&&$.label<Y[2]){$.label=Y[2],$.ops.push(H);break}if(Y[2])$.ops.pop();$.trys.pop();continue}H=F.call(D,$)}catch(q){H=[6,q],Q=0}finally{J=Y=0}if(H[0]&5)throw H[1];return{value:H[0]?H[1]:void 0,done:!0}}},Ap=d0&&d0.__asyncValues||function(D){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var F=D[Symbol.asyncIterator],$;return F?F.call(D):(D=typeof EY==="function"?EY(D):D[Symbol.iterator](),$={},J("next"),J("throw"),J("return"),$[Symbol.asyncIterator]=function(){return this},$);function J(Y){$[Y]=D[Y]&&function(B){return new Promise(function(X,G){B=D[Y](B),Q(X,G,B.done,B.value)})}}function Q(Y,B,X,G){Promise.resolve(G).then(function(H){Y({value:H,done:X})},B)}},EY=d0&&d0.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(d0,"__esModule",{value:!0});d0.fromReadableStreamLike=d0.fromAsyncIterable=d0.fromIterable=d0.fromPromise=d0.fromArrayLike=d0.fromInteropObservable=d0.innerFrom=void 0;var Mp=Y7(),Np=GY(),z3=v0(),Cp=WY(),Rp=HY(),Op=qY(),wp=zY(),hz=B7(),Tp=S0(),jp=pQ(),Pp=lF();function Ip(D){if(D instanceof z3.Observable)return D;if(D!=null){if(Cp.isInteropObservable(D))return bz(D);if(Mp.isArrayLike(D))return uz(D);if(Np.isPromise(D))return mz(D);if(Rp.isAsyncIterable(D))return VY(D);if(wp.isIterable(D))return lz(D);if(hz.isReadableStreamLike(D))return pz(D)}throw Op.createInvalidObservableTypeError(D)}d0.innerFrom=Ip;function bz(D){return new z3.Observable(function(F){var $=D[Pp.observable]();if(Tp.isFunction($.subscribe))return $.subscribe(F);throw TypeError("Provided object does not correctly implement Symbol.observable")})}d0.fromInteropObservable=bz;function uz(D){return new z3.Observable(function(F){for(var $=0;$<D.length&&!F.closed;$++)F.next(D[$]);F.complete()})}d0.fromArrayLike=uz;function mz(D){return new z3.Observable(function(F){D.then(function($){if(!F.closed)F.next($),F.complete()},function($){return F.error($)}).then(null,jp.reportUnhandledError)})}d0.fromPromise=mz;function lz(D){return new z3.Observable(function(F){var $,J;try{for(var Q=EY(D),Y=Q.next();!Y.done;Y=Q.next()){var B=Y.value;if(F.next(B),F.closed)return}}catch(X){$={error:X}}finally{try{if(Y&&!Y.done&&(J=Q.return))J.call(Q)}finally{if($)throw $.error}}F.complete()})}d0.fromIterable=lz;function VY(D){return new z3.Observable(function(F){Sp(D,F).catch(function($){return F.error($)})})}d0.fromAsyncIterable=VY;function pz(D){return VY(hz.readableStreamLikeToAsyncGenerator(D))}d0.fromReadableStreamLike=pz;function Sp(D,F){var $,J,Q,Y;return Up(this,void 0,void 0,function(){var B,X;return Lp(this,function(G){switch(G.label){case 0:G.trys.push([0,5,6,11]),$=Ap(D),G.label=1;case 1:return[4,$.next()];case 2:if(J=G.sent(),!!J.done)return[3,4];if(B=J.value,F.next(B),F.closed)return[2];G.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return X=G.sent(),Q={error:X},[3,11];case 6:if(G.trys.push([6,,9,10]),!(J&&!J.done&&(Y=$.return)))return[3,8];return[4,Y.call($)];case 7:G.sent(),G.label=8;case 8:return[3,10];case 9:if(Q)throw Q.error;return[7];case 10:return[7];case 11:return F.complete(),[2]}})})}});var I8=z((dz)=>{Object.defineProperty(dz,"__esModule",{value:!0});dz.executeSchedule=void 0;function kp(D,F,$,J,Q){if(J===void 0)J=0;if(Q===void 0)Q=!1;var Y=F.schedule(function(){if($(),Q)D.add(this.schedule(null,J));else this.unsubscribe()},J);if(D.add(Y),!Q)return Y}dz.executeSchedule=kp});var nF=z((nz)=>{Object.defineProperty(nz,"__esModule",{value:!0});nz.observeOn=void 0;var ZY=I8(),vp=x(),yp=l();function xp(D,F){if(F===void 0)F=0;return vp.operate(function($,J){$.subscribe(yp.createOperatorSubscriber(J,function(Q){return ZY.executeSchedule(J,D,function(){return J.next(Q)},F)},function(){return ZY.executeSchedule(J,D,function(){return J.complete()},F)},function(Q){return ZY.executeSchedule(J,D,function(){return J.error(Q)},F)}))})}nz.observeOn=xp});var iF=z((az)=>{Object.defineProperty(az,"__esModule",{value:!0});az.subscribeOn=void 0;var _p=x();function fp(D,F){if(F===void 0)F=0;return _p.operate(function($,J){J.add(D.schedule(function(){return $.subscribe(J)},F))})}az.subscribeOn=fp});var tz=z((sz)=>{Object.defineProperty(sz,"__esModule",{value:!0});sz.scheduleObservable=void 0;var gp=Y0(),hp=nF(),bp=iF();function up(D,F){return gp.innerFrom(D).pipe(bp.subscribeOn(F),hp.observeOn(F))}sz.scheduleObservable=up});var FE=z((ez)=>{Object.defineProperty(ez,"__esModule",{value:!0});ez.schedulePromise=void 0;var mp=Y0(),lp=nF(),pp=iF();function dp(D,F){return mp.innerFrom(D).pipe(pp.subscribeOn(F),lp.observeOn(F))}ez.schedulePromise=dp});var QE=z(($E)=>{Object.defineProperty($E,"__esModule",{value:!0});$E.scheduleArray=void 0;var cp=v0();function np(D,F){return new cp.Observable(function($){var J=0;return F.schedule(function(){if(J===D.length)$.complete();else if($.next(D[J++]),!$.closed)this.schedule()})})}$E.scheduleArray=np});var UY=z((BE)=>{Object.defineProperty(BE,"__esModule",{value:!0});BE.scheduleIterable=void 0;var ip=v0(),ap=KY(),op=S0(),YE=I8();function sp(D,F){return new ip.Observable(function($){var J;return YE.executeSchedule($,F,function(){J=D[ap.iterator](),YE.executeSchedule($,F,function(){var Q,Y,B;try{Q=J.next(),Y=Q.value,B=Q.done}catch(X){$.error(X);return}if(B)$.complete();else $.next(Y)},0,!0)}),function(){return op.isFunction(J===null||J===void 0?void 0:J.return)&&J.return()}})}BE.scheduleIterable=sp});var LY=z((WE)=>{Object.defineProperty(WE,"__esModule",{value:!0});WE.scheduleAsyncIterable=void 0;var rp=v0(),GE=I8();function tp(D,F){if(!D)throw Error("Iterable cannot be null");return new rp.Observable(function($){GE.executeSchedule($,F,function(){var J=D[Symbol.asyncIterator]();GE.executeSchedule($,F,function(){J.next().then(function(Q){if(Q.done)$.complete();else $.next(Q.value)})},0,!0)})})}WE.scheduleAsyncIterable=tp});var zE=z((qE)=>{Object.defineProperty(qE,"__esModule",{value:!0});qE.scheduleReadableStreamLike=void 0;var ep=LY(),Dd=B7();function Fd(D,F){return ep.scheduleAsyncIterable(Dd.readableStreamLikeToAsyncGenerator(D),F)}qE.scheduleReadableStreamLike=Fd});var AY=z((EE)=>{Object.defineProperty(EE,"__esModule",{value:!0});EE.scheduled=void 0;var $d=tz(),Jd=FE(),Qd=QE(),Yd=UY(),Bd=LY(),Xd=WY(),Gd=GY(),Wd=Y7(),Hd=zY(),qd=HY(),Kd=qY(),zd=B7(),Ed=zE();function Vd(D,F){if(D!=null){if(Xd.isInteropObservable(D))return $d.scheduleObservable(D,F);if(Wd.isArrayLike(D))return Qd.scheduleArray(D,F);if(Gd.isPromise(D))return Jd.schedulePromise(D,F);if(qd.isAsyncIterable(D))return Bd.scheduleAsyncIterable(D,F);if(Hd.isIterable(D))return Yd.scheduleIterable(D,F);if(zd.isReadableStreamLike(D))return Ed.scheduleReadableStreamLike(D,F)}throw Kd.createInvalidObservableTypeError(D)}EE.scheduled=Vd});var S8=z((ZE)=>{Object.defineProperty(ZE,"__esModule",{value:!0});ZE.from=void 0;var Zd=AY(),Ud=Y0();function Ld(D,F){return F?Zd.scheduled(D,F):Ud.innerFrom(D)}ZE.from=Ld});var X7=z((LE)=>{Object.defineProperty(LE,"__esModule",{value:!0});LE.of=void 0;var Ad=cD(),Md=S8();function Nd(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=Ad.popScheduler(D);return Md.from(D,$)}LE.of=Nd});var MY=z((ME)=>{Object.defineProperty(ME,"__esModule",{value:!0});ME.throwError=void 0;var Cd=v0(),Rd=S0();function Od(D,F){var $=Rd.isFunction(D)?D:function(){return D},J=function(Q){return Q.error($())};return new Cd.Observable(F?function(Q){return F.schedule(J,0,Q)}:J)}ME.throwError=Od});var G7=z((OE)=>{Object.defineProperty(OE,"__esModule",{value:!0});OE.observeNotification=OE.Notification=OE.NotificationKind=void 0;var wd=S1(),Td=X7(),jd=MY(),Pd=S0(),Id;(function(D){D.NEXT="N",D.ERROR="E",D.COMPLETE="C"})(Id=OE.NotificationKind||(OE.NotificationKind={}));var Sd=function(){function D(F,$,J){this.kind=F,this.value=$,this.error=J,this.hasValue=F==="N"}return D.prototype.observe=function(F){return RE(this,F)},D.prototype.do=function(F,$,J){var Q=this,Y=Q.kind,B=Q.value,X=Q.error;return Y==="N"?F===null||F===void 0?void 0:F(B):Y==="E"?$===null||$===void 0?void 0:$(X):J===null||J===void 0?void 0:J()},D.prototype.accept=function(F,$,J){var Q;return Pd.isFunction((Q=F)===null||Q===void 0?void 0:Q.next)?this.observe(F):this.do(F,$,J)},D.prototype.toObservable=function(){var F=this,$=F.kind,J=F.value,Q=F.error,Y=$==="N"?Td.of(J):$==="E"?jd.throwError(function(){return Q}):$==="C"?wd.EMPTY:0;if(!Y)throw TypeError("Unexpected notification kind "+$);return Y},D.createNext=function(F){return new D("N",F)},D.createError=function(F){return new D("E",void 0,F)},D.createComplete=function(){return D.completeNotification},D.completeNotification=new D("C"),D}();OE.Notification=Sd;function RE(D,F){var $,J,Q,Y=D,B=Y.kind,X=Y.value,G=Y.error;if(typeof B!=="string")throw TypeError('Invalid notification, missing "kind"');B==="N"?($=F.next)===null||$===void 0||$.call(F,X):B==="E"?(J=F.error)===null||J===void 0||J.call(F,G):(Q=F.complete)===null||Q===void 0||Q.call(F)}OE.observeNotification=RE});var IE=z((jE)=>{Object.defineProperty(jE,"__esModule",{value:!0});jE.isObservable=void 0;var vd=v0(),TE=S0();function yd(D){return!!D&&(D instanceof vd.Observable||TE.isFunction(D.lift)&&TE.isFunction(D.subscribe))}jE.isObservable=yd});var Q6=z((SE)=>{Object.defineProperty(SE,"__esModule",{value:!0});SE.EmptyError=void 0;var xd=F6();SE.EmptyError=xd.createErrorClass(function(D){return function(){D(this),this.name="EmptyError",this.message="no elements in sequence"}})});var xE=z((vE)=>{Object.defineProperty(vE,"__esModule",{value:!0});vE.lastValueFrom=void 0;var _d=Q6();function fd(D,F){var $=typeof F==="object";return new Promise(function(J,Q){var Y=!1,B;D.subscribe({next:function(X){B=X,Y=!0},error:Q,complete:function(){if(Y)J(B);else if($)J(F.defaultValue);else Q(new _d.EmptyError)}})})}vE.lastValueFrom=fd});var gE=z((_E)=>{Object.defineProperty(_E,"__esModule",{value:!0});_E.firstValueFrom=void 0;var gd=Q6(),hd=s4();function bd(D,F){var $=typeof F==="object";return new Promise(function(J,Q){var Y=new hd.SafeSubscriber({next:function(B){J(B),Y.unsubscribe()},error:Q,complete:function(){if($)J(F.defaultValue);else Q(new gd.EmptyError)}});D.subscribe(Y)})}_E.firstValueFrom=bd});var NY=z((hE)=>{Object.defineProperty(hE,"__esModule",{value:!0});hE.ArgumentOutOfRangeError=void 0;var ud=F6();hE.ArgumentOutOfRangeError=ud.createErrorClass(function(D){return function(){D(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var CY=z((uE)=>{Object.defineProperty(uE,"__esModule",{value:!0});uE.NotFoundError=void 0;var md=F6();uE.NotFoundError=md.createErrorClass(function(D){return function($){D(this),this.name="NotFoundError",this.message=$}})});var RY=z((lE)=>{Object.defineProperty(lE,"__esModule",{value:!0});lE.SequenceError=void 0;var ld=F6();lE.SequenceError=ld.createErrorClass(function(D){return function($){D(this),this.name="SequenceError",this.message=$}})});var W7=z((dE)=>{Object.defineProperty(dE,"__esModule",{value:!0});dE.isValidDate=void 0;function pd(D){return D instanceof Date&&!isNaN(D)}dE.isValidDate=pd});var H7=z((nE)=>{Object.defineProperty(nE,"__esModule",{value:!0});nE.timeout=nE.TimeoutError=void 0;var dd=dD(),cd=W7(),nd=x(),id=Y0(),ad=F6(),od=l(),sd=I8();nE.TimeoutError=ad.createErrorClass(function(D){return function($){if($===void 0)$=null;D(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=$}});function rd(D,F){var $=cd.isValidDate(D)?{first:D}:typeof D==="number"?{each:D}:D,J=$.first,Q=$.each,Y=$.with,B=Y===void 0?td:Y,X=$.scheduler,G=X===void 0?F!==null&&F!==void 0?F:dd.asyncScheduler:X,H=$.meta,q=H===void 0?null:H;if(J==null&&Q==null)throw TypeError("No timeout provided.");return nd.operate(function(K,V){var E,Z,L=null,A=0,M=function(O){Z=sd.executeSchedule(V,G,function(){try{E.unsubscribe(),id.innerFrom(B({meta:q,lastValue:L,seen:A})).subscribe(V)}catch(w){V.error(w)}},O)};E=K.subscribe(od.createOperatorSubscriber(V,function(O){Z===null||Z===void 0||Z.unsubscribe(),A++,V.next(L=O),Q>0&&M(Q)},void 0,void 0,function(){if(!(Z===null||Z===void 0?void 0:Z.closed))Z===null||Z===void 0||Z.unsubscribe();L=null})),!A&&M(J!=null?typeof J==="number"?J:+J-G.now():Q)})}nE.timeout=rd;function td(D){throw new nE.TimeoutError(D)}});var Y6=z((oE)=>{Object.defineProperty(oE,"__esModule",{value:!0});oE.map=void 0;var ed=x(),Dc=l();function Fc(D,F){return ed.operate(function($,J){var Q=0;$.subscribe(Dc.createOperatorSubscriber(J,function(Y){J.next(D.call(F,Y,Q++))}))})}oE.map=Fc});var X6=z((B6)=>{var $c=B6&&B6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Jc=B6&&B6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(B6,"__esModule",{value:!0});B6.mapOneOrManyArgs=void 0;var Qc=Y6(),Yc=Array.isArray;function Bc(D,F){return Yc(F)?D.apply(void 0,Jc([],$c(F))):D(F)}function Xc(D){return Qc.map(function(F){return Bc(D,F)})}B6.mapOneOrManyArgs=Xc});var wY=z((G6)=>{var Gc=G6&&G6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},rE=G6&&G6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(G6,"__esModule",{value:!0});G6.bindCallbackInternals=void 0;var Wc=cF(),Hc=v0(),qc=iF(),Kc=X6(),zc=nF(),Ec=J7();function OY(D,F,$,J){if($)if(Wc.isScheduler($))J=$;else return function(){var Q=[];for(var Y=0;Y<arguments.length;Y++)Q[Y]=arguments[Y];return OY(D,F,J).apply(this,Q).pipe(Kc.mapOneOrManyArgs($))};if(J)return function(){var Q=[];for(var Y=0;Y<arguments.length;Y++)Q[Y]=arguments[Y];return OY(D,F).apply(this,Q).pipe(qc.subscribeOn(J),zc.observeOn(J))};return function(){var Q=this,Y=[];for(var B=0;B<arguments.length;B++)Y[B]=arguments[B];var X=new Ec.AsyncSubject,G=!0;return new Hc.Observable(function(H){var q=X.subscribe(H);if(G){G=!1;var K=!1,V=!1;if(F.apply(Q,rE(rE([],Gc(Y)),[function(){var E=[];for(var Z=0;Z<arguments.length;Z++)E[Z]=arguments[Z];if(D){var L=E.shift();if(L!=null){X.error(L);return}}if(X.next(1<E.length?E:E[0]),V=!0,K)X.complete()}])),V)X.complete();K=!0}return q})}}G6.bindCallbackInternals=OY});var DV=z((tE)=>{Object.defineProperty(tE,"__esModule",{value:!0});tE.bindCallback=void 0;var Vc=wY();function Zc(D,F,$){return Vc.bindCallbackInternals(!1,D,F,$)}tE.bindCallback=Zc});var JV=z((FV)=>{Object.defineProperty(FV,"__esModule",{value:!0});FV.bindNodeCallback=void 0;var Uc=wY();function Lc(D,F,$){return Uc.bindCallbackInternals(!0,D,F,$)}FV.bindNodeCallback=Lc});var TY=z((QV)=>{Object.defineProperty(QV,"__esModule",{value:!0});QV.argsArgArrayOrObject=void 0;var Ac=Array.isArray,Mc=Object.getPrototypeOf,Nc=Object.prototype,Cc=Object.keys;function Rc(D){if(D.length===1){var F=D[0];if(Ac(F))return{args:F,keys:null};if(Oc(F)){var $=Cc(F);return{args:$.map(function(J){return F[J]}),keys:$}}}return{args:D,keys:null}}QV.argsArgArrayOrObject=Rc;function Oc(D){return D&&typeof D==="object"&&Mc(D)===Nc}});var jY=z((BV)=>{Object.defineProperty(BV,"__esModule",{value:!0});BV.createObject=void 0;function wc(D,F){return D.reduce(function($,J,Q){return $[J]=F[Q],$},{})}BV.createObject=wc});var q7=z((zV)=>{Object.defineProperty(zV,"__esModule",{value:!0});zV.combineLatestInit=zV.combineLatest=void 0;var Tc=v0(),jc=TY(),HV=S8(),qV=ED(),Pc=X6(),GV=cD(),Ic=jY(),Sc=l(),kc=I8();function vc(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=GV.popScheduler(D),J=GV.popResultSelector(D),Q=jc.argsArgArrayOrObject(D),Y=Q.args,B=Q.keys;if(Y.length===0)return HV.from([],$);var X=new Tc.Observable(KV(Y,$,B?function(G){return Ic.createObject(B,G)}:qV.identity));return J?X.pipe(Pc.mapOneOrManyArgs(J)):X}zV.combineLatest=vc;function KV(D,F,$){if($===void 0)$=qV.identity;return function(J){WV(F,function(){var Q=D.length,Y=Array(Q),B=Q,X=Q,G=function(q){WV(F,function(){var K=HV.from(D[q],F),V=!1;K.subscribe(Sc.createOperatorSubscriber(J,function(E){if(Y[q]=E,!V)V=!0,X--;if(!X)J.next($(Y.slice()))},function(){if(!--B)J.complete()}))},J)};for(var H=0;H<Q;H++)G(H)},J)}}zV.combineLatestInit=KV;function WV(D,F,$){if(D)kc.executeSchedule($,D,F);else F()}});var K7=z((ZV)=>{Object.defineProperty(ZV,"__esModule",{value:!0});ZV.mergeInternals=void 0;var xc=Y0(),_c=I8(),VV=l();function fc(D,F,$,J,Q,Y,B,X){var G=[],H=0,q=0,K=!1,V=function(){if(K&&!G.length&&!H)F.complete()},E=function(L){return H<J?Z(L):G.push(L)},Z=function(L){Y&&F.next(L),H++;var A=!1;xc.innerFrom($(L,q++)).subscribe(VV.createOperatorSubscriber(F,function(M){if(Q===null||Q===void 0||Q(M),Y)E(M);else F.next(M)},function(){A=!0},void 0,function(){if(A)try{H--;var M=function(){var O=G.shift();if(B)_c.executeSchedule(F,B,function(){return Z(O)});else Z(O)};while(G.length&&H<J)M();V()}catch(O){F.error(O)}}))};return D.subscribe(VV.createOperatorSubscriber(F,E,function(){K=!0,V()})),function(){X===null||X===void 0||X()}}ZV.mergeInternals=fc});var k8=z((AV)=>{Object.defineProperty(AV,"__esModule",{value:!0});AV.mergeMap=void 0;var gc=Y6(),hc=Y0(),bc=x(),uc=K7(),mc=S0();function LV(D,F,$){if($===void 0)$=1/0;if(mc.isFunction(F))return LV(function(J,Q){return gc.map(function(Y,B){return F(J,Y,Q,B)})(hc.innerFrom(D(J,Q)))},$);else if(typeof F==="number")$=F;return bc.operate(function(J,Q){return uc.mergeInternals(J,Q,D,$)})}AV.mergeMap=LV});var aF=z((NV)=>{Object.defineProperty(NV,"__esModule",{value:!0});NV.mergeAll=void 0;var lc=k8(),pc=ED();function dc(D){if(D===void 0)D=1/0;return lc.mergeMap(pc.identity,D)}NV.mergeAll=dc});var z7=z((RV)=>{Object.defineProperty(RV,"__esModule",{value:!0});RV.concatAll=void 0;var cc=aF();function nc(){return cc.mergeAll(1)}RV.concatAll=nc});var oF=z((wV)=>{Object.defineProperty(wV,"__esModule",{value:!0});wV.concat=void 0;var ic=z7(),ac=cD(),oc=S8();function sc(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return ic.concatAll()(oc.from(D,ac.popScheduler(D)))}wV.concat=sc});var sF=z((jV)=>{Object.defineProperty(jV,"__esModule",{value:!0});jV.defer=void 0;var rc=v0(),tc=Y0();function ec(D){return new rc.Observable(function(F){tc.innerFrom(D()).subscribe(F)})}jV.defer=ec});var kV=z((IV)=>{Object.defineProperty(IV,"__esModule",{value:!0});IV.connectable=void 0;var Dn=VD(),Fn=v0(),$n=sF(),Jn={connector:function(){return new Dn.Subject},resetOnDisconnect:!0};function Qn(D,F){if(F===void 0)F=Jn;var $=null,J=F.connector,Q=F.resetOnDisconnect,Y=Q===void 0?!0:Q,B=J(),X=new Fn.Observable(function(G){return B.subscribe(G)});return X.connect=function(){if(!$||$.closed){if($=$n.defer(function(){return D}).subscribe(B),Y)$.add(function(){return B=J()})}return $},X}IV.connectable=Qn});var xV=z((vV)=>{Object.defineProperty(vV,"__esModule",{value:!0});vV.forkJoin=void 0;var Yn=v0(),Bn=TY(),Xn=Y0(),Gn=cD(),Wn=l(),Hn=X6(),qn=jY();function Kn(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=Gn.popResultSelector(D),J=Bn.argsArgArrayOrObject(D),Q=J.args,Y=J.keys,B=new Yn.Observable(function(X){var G=Q.length;if(!G){X.complete();return}var H=Array(G),q=G,K=G,V=function(Z){var L=!1;Xn.innerFrom(Q[Z]).subscribe(Wn.createOperatorSubscriber(X,function(A){if(!L)L=!0,K--;H[Z]=A},function(){return q--},void 0,function(){if(!q||!L){if(!K)X.next(Y?qn.createObject(Y,H):H);X.complete()}}))};for(var E=0;E<G;E++)V(E)});return $?B.pipe(Hn.mapOneOrManyArgs($)):B}vV.forkJoin=Kn});var fV=z((E3)=>{var zn=E3&&E3.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y};Object.defineProperty(E3,"__esModule",{value:!0});E3.fromEvent=void 0;var En=Y0(),Vn=v0(),Zn=k8(),Un=Y7(),e6=S0(),Ln=X6(),An=["addListener","removeListener"],Mn=["addEventListener","removeEventListener"],Nn=["on","off"];function PY(D,F,$,J){if(e6.isFunction($))J=$,$=void 0;if(J)return PY(D,F,$).pipe(Ln.mapOneOrManyArgs(J));var Q=zn(On(D)?Mn.map(function(X){return function(G){return D[X](F,G,$)}}):Cn(D)?An.map(_V(D,F)):Rn(D)?Nn.map(_V(D,F)):[],2),Y=Q[0],B=Q[1];if(!Y){if(Un.isArrayLike(D))return Zn.mergeMap(function(X){return PY(X,F,$)})(En.innerFrom(D))}if(!Y)throw TypeError("Invalid event target");return new Vn.Observable(function(X){var G=function(){var H=[];for(var q=0;q<arguments.length;q++)H[q]=arguments[q];return X.next(1<H.length?H:H[0])};return Y(G),function(){return B(G)}})}E3.fromEvent=PY;function _V(D,F){return function($){return function(J){return D[$](F,J)}}}function Cn(D){return e6.isFunction(D.addListener)&&e6.isFunction(D.removeListener)}function Rn(D){return e6.isFunction(D.on)&&e6.isFunction(D.off)}function On(D){return e6.isFunction(D.addEventListener)&&e6.isFunction(D.removeEventListener)}});var uV=z((hV)=>{Object.defineProperty(hV,"__esModule",{value:!0});hV.fromEventPattern=void 0;var wn=v0(),Tn=S0(),jn=X6();function gV(D,F,$){if($)return gV(D,F).pipe(jn.mapOneOrManyArgs($));return new wn.Observable(function(J){var Q=function(){var B=[];for(var X=0;X<arguments.length;X++)B[X]=arguments[X];return J.next(B.length===1?B[0]:B)},Y=D(Q);return Tn.isFunction(F)?function(){return F(Q,Y)}:void 0})}hV.fromEventPattern=gV});var lV=z((V3)=>{var Pn=V3&&V3.__generator||function(D,F){var $={label:0,sent:function(){if(Y[0]&1)throw Y[1];return Y[1]},trys:[],ops:[]},J,Q,Y,B;return B={next:X(0),throw:X(1),return:X(2)},typeof Symbol==="function"&&(B[Symbol.iterator]=function(){return this}),B;function X(H){return function(q){return G([H,q])}}function G(H){if(J)throw TypeError("Generator is already executing.");while($)try{if(J=1,Q&&(Y=H[0]&2?Q.return:H[0]?Q.throw||((Y=Q.return)&&Y.call(Q),0):Q.next)&&!(Y=Y.call(Q,H[1])).done)return Y;if(Q=0,Y)H=[H[0]&2,Y.value];switch(H[0]){case 0:case 1:Y=H;break;case 4:return $.label++,{value:H[1],done:!1};case 5:$.label++,Q=H[1],H=[0];continue;case 7:H=$.ops.pop(),$.trys.pop();continue;default:if((Y=$.trys,!(Y=Y.length>0&&Y[Y.length-1]))&&(H[0]===6||H[0]===2)){$=0;continue}if(H[0]===3&&(!Y||H[1]>Y[0]&&H[1]<Y[3])){$.label=H[1];break}if(H[0]===6&&$.label<Y[1]){$.label=Y[1],Y=H;break}if(Y&&$.label<Y[2]){$.label=Y[2],$.ops.push(H);break}if(Y[2])$.ops.pop();$.trys.pop();continue}H=F.call(D,$)}catch(q){H=[6,q],Q=0}finally{J=Y=0}if(H[0]&5)throw H[1];return{value:H[0]?H[1]:void 0,done:!0}}};Object.defineProperty(V3,"__esModule",{value:!0});V3.generate=void 0;var mV=ED(),In=cF(),Sn=sF(),kn=UY();function vn(D,F,$,J,Q){var Y,B,X,G;if(arguments.length===1)Y=D,G=Y.initialState,F=Y.condition,$=Y.iterate,B=Y.resultSelector,X=B===void 0?mV.identity:B,Q=Y.scheduler;else if(G=D,!J||In.isScheduler(J))X=mV.identity,Q=J;else X=J;function H(){var q;return Pn(this,function(K){switch(K.label){case 0:q=G,K.label=1;case 1:if(!(!F||F(q)))return[3,4];return[4,X(q)];case 2:K.sent(),K.label=3;case 3:return q=$(q),[3,1];case 4:return[2]}})}return Sn.defer(Q?function(){return kn.scheduleIterable(H(),Q)}:H)}V3.generate=vn});var cV=z((pV)=>{Object.defineProperty(pV,"__esModule",{value:!0});pV.iif=void 0;var yn=sF();function xn(D,F,$){return yn.defer(function(){return D()?F:$})}pV.iif=xn});var W6=z((nV)=>{Object.defineProperty(nV,"__esModule",{value:!0});nV.timer=void 0;var _n=v0(),fn=dD(),gn=cF(),hn=W7();function bn(D,F,$){if(D===void 0)D=0;if($===void 0)$=fn.async;var J=-1;if(F!=null)if(gn.isScheduler(F))$=F;else J=F;return new _n.Observable(function(Q){var Y=hn.isValidDate(D)?+D-$.now():D;if(Y<0)Y=0;var B=0;return $.schedule(function(){if(!Q.closed)if(Q.next(B++),0<=J)this.schedule(void 0,J);else Q.complete()},Y)})}nV.timer=bn});var IY=z((aV)=>{Object.defineProperty(aV,"__esModule",{value:!0});aV.interval=void 0;var un=dD(),mn=W6();function ln(D,F){if(D===void 0)D=0;if(F===void 0)F=un.asyncScheduler;if(D<0)D=0;return mn.timer(D,D,F)}aV.interval=ln});var eV=z((rV)=>{Object.defineProperty(rV,"__esModule",{value:!0});rV.merge=void 0;var pn=aF(),dn=Y0(),cn=S1(),sV=cD(),nn=S8();function an(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=sV.popScheduler(D),J=sV.popNumber(D,1/0),Q=D;return!Q.length?cn.EMPTY:Q.length===1?dn.innerFrom(Q[0]):pn.mergeAll(J)(nn.from(Q,$))}rV.merge=an});var SY=z((DZ)=>{Object.defineProperty(DZ,"__esModule",{value:!0});DZ.never=DZ.NEVER=void 0;var on=v0(),sn=zD();DZ.NEVER=new on.Observable(sn.noop);function rn(){return DZ.NEVER}DZ.never=rn});var Z3=z((JZ)=>{Object.defineProperty(JZ,"__esModule",{value:!0});JZ.argsOrArgArray=void 0;var tn=Array.isArray;function en(D){return D.length===1&&tn(D[0])?D[0]:D}JZ.argsOrArgArray=en});var kY=z((BZ)=>{Object.defineProperty(BZ,"__esModule",{value:!0});BZ.onErrorResumeNext=void 0;var Di=v0(),Fi=Z3(),$i=l(),YZ=zD(),Ji=Y0();function Qi(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=Fi.argsOrArgArray(D);return new Di.Observable(function(J){var Q=0,Y=function(){if(Q<$.length){var B=void 0;try{B=Ji.innerFrom($[Q++])}catch(G){Y();return}var X=new $i.OperatorSubscriber(J,void 0,YZ.noop,YZ.noop);B.subscribe(X),X.add(Y)}else J.complete()};Y()})}BZ.onErrorResumeNext=Qi});var HZ=z((GZ)=>{Object.defineProperty(GZ,"__esModule",{value:!0});GZ.pairs=void 0;var Yi=S8();function Bi(D,F){return Yi.from(Object.entries(D),F)}GZ.pairs=Bi});var zZ=z((qZ)=>{Object.defineProperty(qZ,"__esModule",{value:!0});qZ.not=void 0;function Xi(D,F){return function($,J){return!D.call(F,$,J)}}qZ.not=Xi});var D4=z((EZ)=>{Object.defineProperty(EZ,"__esModule",{value:!0});EZ.filter=void 0;var Gi=x(),Wi=l();function Hi(D,F){return Gi.operate(function($,J){var Q=0;$.subscribe(Wi.createOperatorSubscriber(J,function(Y){return D.call(F,Y,Q++)&&J.next(Y)}))})}EZ.filter=Hi});var MZ=z((LZ)=>{Object.defineProperty(LZ,"__esModule",{value:!0});LZ.partition=void 0;var qi=zZ(),ZZ=D4(),UZ=Y0();function Ki(D,F,$){return[ZZ.filter(F,$)(UZ.innerFrom(D)),ZZ.filter(qi.not(F,$))(UZ.innerFrom(D))]}LZ.partition=Ki});var vY=z((RZ)=>{Object.defineProperty(RZ,"__esModule",{value:!0});RZ.raceInit=RZ.race=void 0;var zi=v0(),NZ=Y0(),Ei=Z3(),Vi=l();function Zi(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return D=Ei.argsOrArgArray(D),D.length===1?NZ.innerFrom(D[0]):new zi.Observable(CZ(D))}RZ.race=Zi;function CZ(D){return function(F){var $=[],J=function(Y){$.push(NZ.innerFrom(D[Y]).subscribe(Vi.createOperatorSubscriber(F,function(B){if($){for(var X=0;X<$.length;X++)X!==Y&&$[X].unsubscribe();$=null}F.next(B)})))};for(var Q=0;$&&!F.closed&&Q<D.length;Q++)J(Q)}}RZ.raceInit=CZ});var jZ=z((wZ)=>{Object.defineProperty(wZ,"__esModule",{value:!0});wZ.range=void 0;var Li=v0(),Ai=S1();function Mi(D,F,$){if(F==null)F=D,D=0;if(F<=0)return Ai.EMPTY;var J=F+D;return new Li.Observable($?function(Q){var Y=D;return $.schedule(function(){if(Y<J)Q.next(Y++),this.schedule();else Q.complete()})}:function(Q){var Y=D;while(Y<J&&!Q.closed)Q.next(Y++);Q.complete()})}wZ.range=Mi});var SZ=z((PZ)=>{Object.defineProperty(PZ,"__esModule",{value:!0});PZ.using=void 0;var Ni=v0(),Ci=Y0(),Ri=S1();function Oi(D,F){return new Ni.Observable(function($){var J=D(),Q=F(J),Y=Q?Ci.innerFrom(Q):Ri.EMPTY;return Y.subscribe($),function(){if(J)J.unsubscribe()}})}PZ.using=Oi});var E7=z((H6)=>{var wi=H6&&H6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Ti=H6&&H6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(H6,"__esModule",{value:!0});H6.zip=void 0;var ji=v0(),Pi=Y0(),Ii=Z3(),Si=S1(),ki=l(),vi=cD();function yi(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=vi.popResultSelector(D),J=Ii.argsOrArgArray(D);return J.length?new ji.Observable(function(Q){var Y=J.map(function(){return[]}),B=J.map(function(){return!1});Q.add(function(){Y=B=null});var X=function(H){Pi.innerFrom(J[H]).subscribe(ki.createOperatorSubscriber(Q,function(q){if(Y[H].push(q),Y.every(function(V){return V.length})){var K=Y.map(function(V){return V.shift()});if(Q.next($?$.apply(void 0,Ti([],wi(K))):K),Y.some(function(V,E){return!V.length&&B[E]}))Q.complete()}},function(){B[H]=!0,!Y[H].length&&Q.complete()}))};for(var G=0;!Q.closed&&G<J.length;G++)X(G);return function(){Y=B=null}}):Si.EMPTY}H6.zip=yi});var vZ=z((kZ)=>{Object.defineProperty(kZ,"__esModule",{value:!0})});var yY=z((xZ)=>{Object.defineProperty(xZ,"__esModule",{value:!0});xZ.audit=void 0;var xi=x(),_i=Y0(),yZ=l();function fi(D){return xi.operate(function(F,$){var J=!1,Q=null,Y=null,B=!1,X=function(){if(Y===null||Y===void 0||Y.unsubscribe(),Y=null,J){J=!1;var H=Q;Q=null,$.next(H)}B&&$.complete()},G=function(){Y=null,B&&$.complete()};F.subscribe(yZ.createOperatorSubscriber($,function(H){if(J=!0,Q=H,!Y)_i.innerFrom(D(H)).subscribe(Y=yZ.createOperatorSubscriber($,X,G))},function(){B=!0,(!J||!Y||Y.closed)&&$.complete()}))})}xZ.audit=fi});var hZ=z((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.auditTime=void 0;var gi=dD(),hi=yY(),bi=W6();function ui(D,F){if(F===void 0)F=gi.asyncScheduler;return hi.audit(function(){return bi.timer(D,F)})}fZ.auditTime=ui});var lZ=z((uZ)=>{Object.defineProperty(uZ,"__esModule",{value:!0});uZ.buffer=void 0;var mi=x(),li=zD(),bZ=l(),pi=Y0();function di(D){return mi.operate(function(F,$){var J=[];return F.subscribe(bZ.createOperatorSubscriber($,function(Q){return J.push(Q)},function(){$.next(J),$.complete()})),pi.innerFrom(D).subscribe(bZ.createOperatorSubscriber($,function(){var Q=J;J=[],$.next(Q)},li.noop)),function(){J=null}})}uZ.buffer=di});var pZ=z((U3)=>{var xY=U3&&U3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(U3,"__esModule",{value:!0});U3.bufferCount=void 0;var ci=x(),ni=l(),ii=P8();function ai(D,F){if(F===void 0)F=null;return F=F!==null&&F!==void 0?F:D,ci.operate(function($,J){var Q=[],Y=0;$.subscribe(ni.createOperatorSubscriber(J,function(B){var X,G,H,q,K=null;if(Y++%F===0)Q.push([]);try{for(var V=xY(Q),E=V.next();!E.done;E=V.next()){var Z=E.value;if(Z.push(B),D<=Z.length)K=K!==null&&K!==void 0?K:[],K.push(Z)}}catch(M){X={error:M}}finally{try{if(E&&!E.done&&(G=V.return))G.call(V)}finally{if(X)throw X.error}}if(K)try{for(var L=xY(K),A=L.next();!A.done;A=L.next()){var Z=A.value;ii.arrRemove(Q,Z),J.next(Z)}}catch(M){H={error:M}}finally{try{if(A&&!A.done&&(q=L.return))q.call(L)}finally{if(H)throw H.error}}},function(){var B,X;try{for(var G=xY(Q),H=G.next();!H.done;H=G.next()){var q=H.value;J.next(q)}}catch(K){B={error:K}}finally{try{if(H&&!H.done&&(X=G.return))X.call(G)}finally{if(B)throw B.error}}J.complete()},void 0,function(){Q=null}))})}U3.bufferCount=ai});var cZ=z((L3)=>{var oi=L3&&L3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(L3,"__esModule",{value:!0});L3.bufferTime=void 0;var si=F1(),ri=x(),ti=l(),ei=P8(),Da=dD(),Fa=cD(),dZ=I8();function $a(D){var F,$,J=[];for(var Q=1;Q<arguments.length;Q++)J[Q-1]=arguments[Q];var Y=(F=Fa.popScheduler(J))!==null&&F!==void 0?F:Da.asyncScheduler,B=($=J[0])!==null&&$!==void 0?$:null,X=J[1]||1/0;return ri.operate(function(G,H){var q=[],K=!1,V=function(L){var{buffer:A,subs:M}=L;M.unsubscribe(),ei.arrRemove(q,L),H.next(A),K&&E()},E=function(){if(q){var L=new si.Subscription;H.add(L);var A=[],M={buffer:A,subs:L};q.push(M),dZ.executeSchedule(L,Y,function(){return V(M)},D)}};if(B!==null&&B>=0)dZ.executeSchedule(H,Y,E,B,!0);else K=!0;E();var Z=ti.createOperatorSubscriber(H,function(L){var A,M,O=q.slice();try{for(var w=oi(O),k=w.next();!k.done;k=w.next()){var R=k.value,j=R.buffer;j.push(L),X<=j.length&&V(R)}}catch(y){A={error:y}}finally{try{if(k&&!k.done&&(M=w.return))M.call(w)}finally{if(A)throw A.error}}},function(){while(q===null||q===void 0?void 0:q.length)H.next(q.shift().buffer);Z===null||Z===void 0||Z.unsubscribe(),H.complete(),H.unsubscribe()},void 0,function(){return q=null});G.subscribe(Z)})}L3.bufferTime=$a});var aZ=z((A3)=>{var Ja=A3&&A3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(A3,"__esModule",{value:!0});A3.bufferToggle=void 0;var Qa=F1(),Ya=x(),nZ=Y0(),_Y=l(),iZ=zD(),Ba=P8();function Xa(D,F){return Ya.operate(function($,J){var Q=[];nZ.innerFrom(D).subscribe(_Y.createOperatorSubscriber(J,function(Y){var B=[];Q.push(B);var X=new Qa.Subscription,G=function(){Ba.arrRemove(Q,B),J.next(B),X.unsubscribe()};X.add(nZ.innerFrom(F(Y)).subscribe(_Y.createOperatorSubscriber(J,G,iZ.noop)))},iZ.noop)),$.subscribe(_Y.createOperatorSubscriber(J,function(Y){var B,X;try{for(var G=Ja(Q),H=G.next();!H.done;H=G.next()){var q=H.value;q.push(Y)}}catch(K){B={error:K}}finally{try{if(H&&!H.done&&(X=G.return))X.call(G)}finally{if(B)throw B.error}}},function(){while(Q.length>0)J.next(Q.shift());J.complete()}))})}A3.bufferToggle=Xa});var tZ=z((sZ)=>{Object.defineProperty(sZ,"__esModule",{value:!0});sZ.bufferWhen=void 0;var Ga=x(),Wa=zD(),oZ=l(),Ha=Y0();function qa(D){return Ga.operate(function(F,$){var J=null,Q=null,Y=function(){Q===null||Q===void 0||Q.unsubscribe();var B=J;J=[],B&&$.next(B),Ha.innerFrom(D()).subscribe(Q=oZ.createOperatorSubscriber($,Y,Wa.noop))};Y(),F.subscribe(oZ.createOperatorSubscriber($,function(B){return J===null||J===void 0?void 0:J.push(B)},function(){J&&$.next(J),$.complete()},void 0,function(){return J=Q=null}))})}sZ.bufferWhen=qa});var $U=z((DU)=>{Object.defineProperty(DU,"__esModule",{value:!0});DU.catchError=void 0;var Ka=Y0(),za=l(),Ea=x();function eZ(D){return Ea.operate(function(F,$){var J=null,Q=!1,Y;if(J=F.subscribe(za.createOperatorSubscriber($,void 0,void 0,function(B){if(Y=Ka.innerFrom(D(B,eZ(D)(F))),J)J.unsubscribe(),J=null,Y.subscribe($);else Q=!0})),Q)J.unsubscribe(),J=null,Y.subscribe($)})}DU.catchError=eZ});var fY=z((JU)=>{Object.defineProperty(JU,"__esModule",{value:!0});JU.scanInternals=void 0;var Va=l();function Za(D,F,$,J,Q){return function(Y,B){var X=$,G=F,H=0;Y.subscribe(Va.createOperatorSubscriber(B,function(q){var K=H++;G=X?D(G,q,K):(X=!0,q),J&&B.next(G)},Q&&function(){X&&B.next(G),B.complete()}))}}JU.scanInternals=Za});var M3=z((YU)=>{Object.defineProperty(YU,"__esModule",{value:!0});YU.reduce=void 0;var Ua=fY(),La=x();function Aa(D,F){return La.operate(Ua.scanInternals(D,F,arguments.length>=2,!1,!0))}YU.reduce=Aa});var gY=z((XU)=>{Object.defineProperty(XU,"__esModule",{value:!0});XU.toArray=void 0;var Ma=M3(),Na=x(),Ca=function(D,F){return D.push(F),D};function Ra(){return Na.operate(function(D,F){Ma.reduce(Ca,[])(D).subscribe(F)})}XU.toArray=Ra});var hY=z((WU)=>{Object.defineProperty(WU,"__esModule",{value:!0});WU.joinAllInternals=void 0;var Oa=ED(),wa=X6(),Ta=pF(),ja=k8(),Pa=gY();function Ia(D,F){return Ta.pipe(Pa.toArray(),ja.mergeMap(function($){return D($)}),F?wa.mapOneOrManyArgs(F):Oa.identity)}WU.joinAllInternals=Ia});var bY=z((qU)=>{Object.defineProperty(qU,"__esModule",{value:!0});qU.combineLatestAll=void 0;var Sa=q7(),ka=hY();function va(D){return ka.joinAllInternals(Sa.combineLatest,D)}qU.combineLatestAll=va});var VU=z((zU)=>{Object.defineProperty(zU,"__esModule",{value:!0});zU.combineAll=void 0;var ya=bY();zU.combineAll=ya.combineLatestAll});var AU=z((q6)=>{var ZU=q6&&q6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},UU=q6&&q6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(q6,"__esModule",{value:!0});q6.combineLatest=void 0;var xa=q7(),_a=x(),fa=Z3(),ga=X6(),ha=pF(),ba=cD();function LU(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=ba.popResultSelector(D);return $?ha.pipe(LU.apply(void 0,UU([],ZU(D))),ga.mapOneOrManyArgs($)):_a.operate(function(J,Q){xa.combineLatestInit(UU([J],ZU(fa.argsOrArgArray(D))))(Q)})}q6.combineLatest=LU});var MU=z((K6)=>{var ua=K6&&K6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},ma=K6&&K6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(K6,"__esModule",{value:!0});K6.combineLatestWith=void 0;var la=AU();function pa(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return la.combineLatest.apply(void 0,ma([],ua(D)))}K6.combineLatestWith=pa});var uY=z((CU)=>{Object.defineProperty(CU,"__esModule",{value:!0});CU.concatMap=void 0;var NU=k8(),da=S0();function ca(D,F){return da.isFunction(F)?NU.mergeMap(D,F,1):NU.mergeMap(D,1)}CU.concatMap=ca});var jU=z((wU)=>{Object.defineProperty(wU,"__esModule",{value:!0});wU.concatMapTo=void 0;var OU=uY(),na=S0();function ia(D,F){return na.isFunction(F)?OU.concatMap(function(){return D},F):OU.concatMap(function(){return D})}wU.concatMapTo=ia});var PU=z((z6)=>{var aa=z6&&z6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},oa=z6&&z6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(z6,"__esModule",{value:!0});z6.concat=void 0;var sa=x(),ra=z7(),ta=cD(),ea=S8();function Do(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=ta.popScheduler(D);return sa.operate(function(J,Q){ra.concatAll()(ea.from(oa([J],aa(D)),$)).subscribe(Q)})}z6.concat=Do});var IU=z((E6)=>{var Fo=E6&&E6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},$o=E6&&E6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(E6,"__esModule",{value:!0});E6.concatWith=void 0;var Jo=PU();function Qo(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return Jo.concat.apply(void 0,$o([],Fo(D)))}E6.concatWith=Qo});var vU=z((SU)=>{Object.defineProperty(SU,"__esModule",{value:!0});SU.fromSubscribable=void 0;var Yo=v0();function Bo(D){return new Yo.Observable(function(F){return D.subscribe(F)})}SU.fromSubscribable=Bo});var V7=z((yU)=>{Object.defineProperty(yU,"__esModule",{value:!0});yU.connect=void 0;var Xo=VD(),Go=Y0(),Wo=x(),Ho=vU(),qo={connector:function(){return new Xo.Subject}};function Ko(D,F){if(F===void 0)F=qo;var $=F.connector;return Wo.operate(function(J,Q){var Y=$();Go.innerFrom(D(Ho.fromSubscribable(Y))).subscribe(Q),Q.add(J.subscribe(Y))})}yU.connect=Ko});var gU=z((_U)=>{Object.defineProperty(_U,"__esModule",{value:!0});_U.count=void 0;var zo=M3();function Eo(D){return zo.reduce(function(F,$,J){return!D||D($,J)?F+1:F},0)}_U.count=Eo});var mU=z((bU)=>{Object.defineProperty(bU,"__esModule",{value:!0});bU.debounce=void 0;var Vo=x(),Zo=zD(),hU=l(),Uo=Y0();function Lo(D){return Vo.operate(function(F,$){var J=!1,Q=null,Y=null,B=function(){if(Y===null||Y===void 0||Y.unsubscribe(),Y=null,J){J=!1;var X=Q;Q=null,$.next(X)}};F.subscribe(hU.createOperatorSubscriber($,function(X){Y===null||Y===void 0||Y.unsubscribe(),J=!0,Q=X,Y=hU.createOperatorSubscriber($,B,Zo.noop),Uo.innerFrom(D(X)).subscribe(Y)},function(){B(),$.complete()},void 0,function(){Q=Y=null}))})}bU.debounce=Lo});var dU=z((lU)=>{Object.defineProperty(lU,"__esModule",{value:!0});lU.debounceTime=void 0;var Ao=dD(),Mo=x(),No=l();function Co(D,F){if(F===void 0)F=Ao.asyncScheduler;return Mo.operate(function($,J){var Q=null,Y=null,B=null,X=function(){if(Q){Q.unsubscribe(),Q=null;var H=Y;Y=null,J.next(H)}};function G(){var H=B+D,q=F.now();if(q<H){Q=this.schedule(void 0,H-q),J.add(Q);return}X()}$.subscribe(No.createOperatorSubscriber(J,function(H){if(Y=H,B=F.now(),!Q)Q=F.schedule(G,D),J.add(Q)},function(){X(),J.complete()},void 0,function(){Y=Q=null}))})}lU.debounceTime=Co});var rF=z((cU)=>{Object.defineProperty(cU,"__esModule",{value:!0});cU.defaultIfEmpty=void 0;var Ro=x(),Oo=l();function wo(D){return Ro.operate(function(F,$){var J=!1;F.subscribe(Oo.createOperatorSubscriber($,function(Q){J=!0,$.next(Q)},function(){if(!J)$.next(D);$.complete()}))})}cU.defaultIfEmpty=wo});var tF=z((iU)=>{Object.defineProperty(iU,"__esModule",{value:!0});iU.take=void 0;var To=S1(),jo=x(),Po=l();function Io(D){return D<=0?function(){return To.EMPTY}:jo.operate(function(F,$){var J=0;F.subscribe(Po.createOperatorSubscriber($,function(Q){if(++J<=D){if($.next(Q),D<=J)$.complete()}}))})}iU.take=Io});var mY=z((oU)=>{Object.defineProperty(oU,"__esModule",{value:!0});oU.ignoreElements=void 0;var So=x(),ko=l(),vo=zD();function yo(){return So.operate(function(D,F){D.subscribe(ko.createOperatorSubscriber(F,vo.noop))})}oU.ignoreElements=yo});var lY=z((rU)=>{Object.defineProperty(rU,"__esModule",{value:!0});rU.mapTo=void 0;var xo=Y6();function _o(D){return xo.map(function(){return D})}rU.mapTo=_o});var pY=z((FL)=>{Object.defineProperty(FL,"__esModule",{value:!0});FL.delayWhen=void 0;var fo=oF(),eU=tF(),go=mY(),ho=lY(),bo=k8(),uo=Y0();function DL(D,F){if(F)return function($){return fo.concat(F.pipe(eU.take(1),go.ignoreElements()),$.pipe(DL(D)))};return bo.mergeMap(function($,J){return uo.innerFrom(D($,J)).pipe(eU.take(1),ho.mapTo($))})}FL.delayWhen=DL});var YL=z((JL)=>{Object.defineProperty(JL,"__esModule",{value:!0});JL.delay=void 0;var mo=dD(),lo=pY(),po=W6();function co(D,F){if(F===void 0)F=mo.asyncScheduler;var $=po.timer(D,F);return lo.delayWhen(function(){return $})}JL.delay=co});var GL=z((BL)=>{Object.defineProperty(BL,"__esModule",{value:!0});BL.dematerialize=void 0;var no=G7(),io=x(),ao=l();function oo(){return io.operate(function(D,F){D.subscribe(ao.createOperatorSubscriber(F,function($){return no.observeNotification($,F)}))})}BL.dematerialize=oo});var KL=z((HL)=>{Object.defineProperty(HL,"__esModule",{value:!0});HL.distinct=void 0;var so=x(),WL=l(),ro=zD(),to=Y0();function eo(D,F){return so.operate(function($,J){var Q=new Set;$.subscribe(WL.createOperatorSubscriber(J,function(Y){var B=D?D(Y):Y;if(!Q.has(B))Q.add(B),J.next(Y)})),F&&to.innerFrom(F).subscribe(WL.createOperatorSubscriber(J,function(){return Q.clear()},ro.noop))})}HL.distinct=eo});var dY=z((zL)=>{Object.defineProperty(zL,"__esModule",{value:!0});zL.distinctUntilChanged=void 0;var Ds=ED(),Fs=x(),$s=l();function Js(D,F){if(F===void 0)F=Ds.identity;return D=D!==null&&D!==void 0?D:Qs,Fs.operate(function($,J){var Q,Y=!0;$.subscribe($s.createOperatorSubscriber(J,function(B){var X=F(B);if(Y||!D(Q,X))Y=!1,Q=X,J.next(B)}))})}zL.distinctUntilChanged=Js;function Qs(D,F){return D===F}});var UL=z((VL)=>{Object.defineProperty(VL,"__esModule",{value:!0});VL.distinctUntilKeyChanged=void 0;var Ys=dY();function Bs(D,F){return Ys.distinctUntilChanged(function($,J){return F?F($[D],J[D]):$[D]===J[D]})}VL.distinctUntilKeyChanged=Bs});var eF=z((LL)=>{Object.defineProperty(LL,"__esModule",{value:!0});LL.throwIfEmpty=void 0;var Xs=Q6(),Gs=x(),Ws=l();function Hs(D){if(D===void 0)D=qs;return Gs.operate(function(F,$){var J=!1;F.subscribe(Ws.createOperatorSubscriber($,function(Q){J=!0,$.next(Q)},function(){return J?$.complete():$.error(D())}))})}LL.throwIfEmpty=Hs;function qs(){return new Xs.EmptyError}});var RL=z((NL)=>{Object.defineProperty(NL,"__esModule",{value:!0});NL.elementAt=void 0;var ML=NY(),Ks=D4(),zs=eF(),Es=rF(),Vs=tF();function Zs(D,F){if(D<0)throw new ML.ArgumentOutOfRangeError;var $=arguments.length>=2;return function(J){return J.pipe(Ks.filter(function(Q,Y){return Y===D}),Vs.take(1),$?Es.defaultIfEmpty(F):zs.throwIfEmpty(function(){return new ML.ArgumentOutOfRangeError}))}}NL.elementAt=Zs});var OL=z((V6)=>{var Us=V6&&V6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Ls=V6&&V6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(V6,"__esModule",{value:!0});V6.endWith=void 0;var As=oF(),Ms=X7();function Ns(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return function($){return As.concat($,Ms.of.apply(void 0,Ls([],Us(D))))}}V6.endWith=Ns});var jL=z((wL)=>{Object.defineProperty(wL,"__esModule",{value:!0});wL.every=void 0;var Cs=x(),Rs=l();function Os(D,F){return Cs.operate(function($,J){var Q=0;$.subscribe(Rs.createOperatorSubscriber(J,function(Y){if(!D.call(F,Y,Q++,$))J.next(!1),J.complete()},function(){J.next(!0),J.complete()}))})}wL.every=Os});var cY=z((kL)=>{Object.defineProperty(kL,"__esModule",{value:!0});kL.exhaustMap=void 0;var ws=Y6(),PL=Y0(),Ts=x(),IL=l();function SL(D,F){if(F)return function($){return $.pipe(SL(function(J,Q){return PL.innerFrom(D(J,Q)).pipe(ws.map(function(Y,B){return F(J,Y,Q,B)}))}))};return Ts.operate(function($,J){var Q=0,Y=null,B=!1;$.subscribe(IL.createOperatorSubscriber(J,function(X){if(!Y)Y=IL.createOperatorSubscriber(J,void 0,function(){Y=null,B&&J.complete()}),PL.innerFrom(D(X,Q++)).subscribe(Y)},function(){B=!0,!Y&&J.complete()}))})}kL.exhaustMap=SL});var nY=z((yL)=>{Object.defineProperty(yL,"__esModule",{value:!0});yL.exhaustAll=void 0;var js=cY(),Ps=ED();function Is(){return js.exhaustMap(Ps.identity)}yL.exhaustAll=Is});var gL=z((_L)=>{Object.defineProperty(_L,"__esModule",{value:!0});_L.exhaust=void 0;var Ss=nY();_L.exhaust=Ss.exhaustAll});var uL=z((hL)=>{Object.defineProperty(hL,"__esModule",{value:!0});hL.expand=void 0;var ks=x(),vs=K7();function ys(D,F,$){if(F===void 0)F=1/0;return F=(F||0)<1?1/0:F,ks.operate(function(J,Q){return vs.mergeInternals(J,Q,D,F,void 0,!0,$)})}hL.expand=ys});var pL=z((mL)=>{Object.defineProperty(mL,"__esModule",{value:!0});mL.finalize=void 0;var xs=x();function _s(D){return xs.operate(function(F,$){try{F.subscribe($)}finally{$.add(D)}})}mL.finalize=_s});var iY=z((cL)=>{Object.defineProperty(cL,"__esModule",{value:!0});cL.createFind=cL.find=void 0;var fs=x(),gs=l();function hs(D,F){return fs.operate(dL(D,F,"value"))}cL.find=hs;function dL(D,F,$){var J=$==="index";return function(Q,Y){var B=0;Q.subscribe(gs.createOperatorSubscriber(Y,function(X){var G=B++;if(D.call(F,X,G,Q))Y.next(J?G:X),Y.complete()},function(){Y.next(J?-1:void 0),Y.complete()}))}}cL.createFind=dL});var oL=z((iL)=>{Object.defineProperty(iL,"__esModule",{value:!0});iL.findIndex=void 0;var us=x(),ms=iY();function ls(D,F){return us.operate(ms.createFind(D,F,"index"))}iL.findIndex=ls});var tL=z((sL)=>{Object.defineProperty(sL,"__esModule",{value:!0});sL.first=void 0;var ps=Q6(),ds=D4(),cs=tF(),ns=rF(),is=eF(),as=ED();function os(D,F){var $=arguments.length>=2;return function(J){return J.pipe(D?ds.filter(function(Q,Y){return D(Q,Y,J)}):as.identity,cs.take(1),$?ns.defaultIfEmpty(F):is.throwIfEmpty(function(){return new ps.EmptyError}))}}sL.first=os});var $A=z((DA)=>{Object.defineProperty(DA,"__esModule",{value:!0});DA.groupBy=void 0;var ss=v0(),rs=Y0(),ts=VD(),es=x(),eL=l();function Dr(D,F,$,J){return es.operate(function(Q,Y){var B;if(!F||typeof F==="function")B=F;else $=F.duration,B=F.element,J=F.connector;var X=new Map,G=function(Z){X.forEach(Z),Z(Y)},H=function(Z){return G(function(L){return L.error(Z)})},q=0,K=!1,V=new eL.OperatorSubscriber(Y,function(Z){try{var L=D(Z),A=X.get(L);if(!A){X.set(L,A=J?J():new ts.Subject);var M=E(L,A);if(Y.next(M),$){var O=eL.createOperatorSubscriber(A,function(){A.complete(),O===null||O===void 0||O.unsubscribe()},void 0,void 0,function(){return X.delete(L)});V.add(rs.innerFrom($(M)).subscribe(O))}}A.next(B?B(Z):Z)}catch(w){H(w)}},function(){return G(function(Z){return Z.complete()})},H,function(){return X.clear()},function(){return K=!0,q===0});Q.subscribe(V);function E(Z,L){var A=new ss.Observable(function(M){q++;var O=L.subscribe(M);return function(){O.unsubscribe(),--q===0&&K&&V.unsubscribe()}});return A.key=Z,A}})}DA.groupBy=Dr});var YA=z((JA)=>{Object.defineProperty(JA,"__esModule",{value:!0});JA.isEmpty=void 0;var Fr=x(),$r=l();function Jr(){return Fr.operate(function(D,F){D.subscribe($r.createOperatorSubscriber(F,function(){F.next(!1),F.complete()},function(){F.next(!0),F.complete()}))})}JA.isEmpty=Jr});var aY=z((N3)=>{var Qr=N3&&N3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(N3,"__esModule",{value:!0});N3.takeLast=void 0;var Yr=S1(),Br=x(),Xr=l();function Gr(D){return D<=0?function(){return Yr.EMPTY}:Br.operate(function(F,$){var J=[];F.subscribe(Xr.createOperatorSubscriber($,function(Q){J.push(Q),D<J.length&&J.shift()},function(){var Q,Y;try{for(var B=Qr(J),X=B.next();!X.done;X=B.next()){var G=X.value;$.next(G)}}catch(H){Q={error:H}}finally{try{if(X&&!X.done&&(Y=B.return))Y.call(B)}finally{if(Q)throw Q.error}}$.complete()},void 0,function(){J=null}))})}N3.takeLast=Gr});var GA=z((BA)=>{Object.defineProperty(BA,"__esModule",{value:!0});BA.last=void 0;var Wr=Q6(),Hr=D4(),qr=aY(),Kr=eF(),zr=rF(),Er=ED();function Vr(D,F){var $=arguments.length>=2;return function(J){return J.pipe(D?Hr.filter(function(Q,Y){return D(Q,Y,J)}):Er.identity,qr.takeLast(1),$?zr.defaultIfEmpty(F):Kr.throwIfEmpty(function(){return new Wr.EmptyError}))}}BA.last=Vr});var qA=z((WA)=>{Object.defineProperty(WA,"__esModule",{value:!0});WA.materialize=void 0;var oY=G7(),Zr=x(),Ur=l();function Lr(){return Zr.operate(function(D,F){D.subscribe(Ur.createOperatorSubscriber(F,function($){F.next(oY.Notification.createNext($))},function(){F.next(oY.Notification.createComplete()),F.complete()},function($){F.next(oY.Notification.createError($)),F.complete()}))})}WA.materialize=Lr});var EA=z((KA)=>{Object.defineProperty(KA,"__esModule",{value:!0});KA.max=void 0;var Ar=M3(),Mr=S0();function Nr(D){return Ar.reduce(Mr.isFunction(D)?function(F,$){return D(F,$)>0?F:$}:function(F,$){return F>$?F:$})}KA.max=Nr});var UA=z((VA)=>{Object.defineProperty(VA,"__esModule",{value:!0});VA.flatMap=void 0;var Cr=k8();VA.flatMap=Cr.mergeMap});var NA=z((AA)=>{Object.defineProperty(AA,"__esModule",{value:!0});AA.mergeMapTo=void 0;var LA=k8(),Rr=S0();function Or(D,F,$){if($===void 0)$=1/0;if(Rr.isFunction(F))return LA.mergeMap(function(){return D},F,$);if(typeof F==="number")$=F;return LA.mergeMap(function(){return D},$)}AA.mergeMapTo=Or});var OA=z((CA)=>{Object.defineProperty(CA,"__esModule",{value:!0});CA.mergeScan=void 0;var wr=x(),Tr=K7();function jr(D,F,$){if($===void 0)$=1/0;return wr.operate(function(J,Q){var Y=F;return Tr.mergeInternals(J,Q,function(B,X){return D(Y,B,X)},$,function(B){Y=B},!1,void 0,function(){return Y=null})})}CA.mergeScan=jr});var TA=z((Z6)=>{var Pr=Z6&&Z6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Ir=Z6&&Z6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(Z6,"__esModule",{value:!0});Z6.merge=void 0;var Sr=x(),kr=aF(),wA=cD(),vr=S8();function yr(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=wA.popScheduler(D),J=wA.popNumber(D,1/0);return Sr.operate(function(Q,Y){kr.mergeAll(J)(vr.from(Ir([Q],Pr(D)),$)).subscribe(Y)})}Z6.merge=yr});var jA=z((U6)=>{var xr=U6&&U6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},_r=U6&&U6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(U6,"__esModule",{value:!0});U6.mergeWith=void 0;var fr=TA();function gr(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return fr.merge.apply(void 0,_r([],xr(D)))}U6.mergeWith=gr});var SA=z((PA)=>{Object.defineProperty(PA,"__esModule",{value:!0});PA.min=void 0;var hr=M3(),br=S0();function ur(D){return hr.reduce(br.isFunction(D)?function(F,$){return D(F,$)<0?F:$}:function(F,$){return F<$?F:$})}PA.min=ur});var Z7=z((vA)=>{Object.defineProperty(vA,"__esModule",{value:!0});vA.multicast=void 0;var mr=dF(),kA=S0(),lr=V7();function pr(D,F){var $=kA.isFunction(D)?D:function(){return D};if(kA.isFunction(F))return lr.connect(F,{connector:$});return function(J){return new mr.ConnectableObservable(J,$)}}vA.multicast=pr});var _A=z((Q8)=>{var dr=Q8&&Q8.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},cr=Q8&&Q8.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(Q8,"__esModule",{value:!0});Q8.onErrorResumeNext=Q8.onErrorResumeNextWith=void 0;var nr=Z3(),ir=kY();function xA(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=nr.argsOrArgArray(D);return function(J){return ir.onErrorResumeNext.apply(void 0,cr([J],dr($)))}}Q8.onErrorResumeNextWith=xA;Q8.onErrorResumeNext=xA});var hA=z((fA)=>{Object.defineProperty(fA,"__esModule",{value:!0});fA.pairwise=void 0;var ar=x(),or=l();function sr(){return ar.operate(function(D,F){var $,J=!1;D.subscribe(or.createOperatorSubscriber(F,function(Q){var Y=$;$=Q,J&&F.next([Y,Q]),J=!0}))})}fA.pairwise=sr});var mA=z((bA)=>{Object.defineProperty(bA,"__esModule",{value:!0});bA.pluck=void 0;var rr=Y6();function tr(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=D.length;if($===0)throw Error("list of properties cannot be empty.");return rr.map(function(J){var Q=J;for(var Y=0;Y<$;Y++){var B=Q===null||Q===void 0?void 0:Q[D[Y]];if(typeof B<"u")Q=B;else return}return Q})}bA.pluck=tr});var dA=z((lA)=>{Object.defineProperty(lA,"__esModule",{value:!0});lA.publish=void 0;var er=VD(),Dt=Z7(),Ft=V7();function $t(D){return D?function(F){return Ft.connect(D)(F)}:function(F){return Dt.multicast(new er.Subject)(F)}}lA.publish=$t});var iA=z((cA)=>{Object.defineProperty(cA,"__esModule",{value:!0});cA.publishBehavior=void 0;var Jt=JY(),Qt=dF();function Yt(D){return function(F){var $=new Jt.BehaviorSubject(D);return new Qt.ConnectableObservable(F,function(){return $})}}cA.publishBehavior=Yt});var sA=z((aA)=>{Object.defineProperty(aA,"__esModule",{value:!0});aA.publishLast=void 0;var Bt=J7(),Xt=dF();function Gt(){return function(D){var F=new Bt.AsyncSubject;return new Xt.ConnectableObservable(D,function(){return F})}}aA.publishLast=Gt});var DM=z((tA)=>{Object.defineProperty(tA,"__esModule",{value:!0});tA.publishReplay=void 0;var Wt=$7(),Ht=Z7(),rA=S0();function qt(D,F,$,J){if($&&!rA.isFunction($))J=$;var Q=rA.isFunction($)?$:void 0;return function(Y){return Ht.multicast(new Wt.ReplaySubject(D,F,J),Q)(Y)}}tA.publishReplay=qt});var FM=z((L6)=>{var Kt=L6&&L6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},zt=L6&&L6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(L6,"__esModule",{value:!0});L6.raceWith=void 0;var Et=vY(),Vt=x(),Zt=ED();function Ut(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return!D.length?Zt.identity:Vt.operate(function($,J){Et.raceInit(zt([$],Kt(D)))(J)})}L6.raceWith=Ut});var YM=z((JM)=>{Object.defineProperty(JM,"__esModule",{value:!0});JM.repeat=void 0;var Lt=S1(),At=x(),$M=l(),Mt=Y0(),Nt=W6();function Ct(D){var F,$=1/0,J;if(D!=null)if(typeof D==="object")F=D.count,$=F===void 0?1/0:F,J=D.delay;else $=D;return $<=0?function(){return Lt.EMPTY}:At.operate(function(Q,Y){var B=0,X,G=function(){if(X===null||X===void 0||X.unsubscribe(),X=null,J!=null){var q=typeof J==="number"?Nt.timer(J):Mt.innerFrom(J(B)),K=$M.createOperatorSubscriber(Y,function(){K.unsubscribe(),H()});q.subscribe(K)}else H()},H=function(){var q=!1;if(X=Q.subscribe($M.createOperatorSubscriber(Y,void 0,function(){if(++B<$)if(X)G();else q=!0;else Y.complete()})),q)G()};H()})}JM.repeat=Ct});var WM=z((XM)=>{Object.defineProperty(XM,"__esModule",{value:!0});XM.repeatWhen=void 0;var Rt=Y0(),Ot=VD(),wt=x(),BM=l();function Tt(D){return wt.operate(function(F,$){var J,Q=!1,Y,B=!1,X=!1,G=function(){return X&&B&&($.complete(),!0)},H=function(){if(!Y)Y=new Ot.Subject,Rt.innerFrom(D(Y)).subscribe(BM.createOperatorSubscriber($,function(){if(J)q();else Q=!0},function(){B=!0,G()}));return Y},q=function(){if(X=!1,J=F.subscribe(BM.createOperatorSubscriber($,void 0,function(){X=!0,!G()&&H().next()})),Q)J.unsubscribe(),J=null,Q=!1,q()};q()})}XM.repeatWhen=Tt});var zM=z((qM)=>{Object.defineProperty(qM,"__esModule",{value:!0});qM.retry=void 0;var jt=x(),HM=l(),Pt=ED(),It=W6(),St=Y0();function kt(D){if(D===void 0)D=1/0;var F;if(D&&typeof D==="object")F=D;else F={count:D};var $=F.count,J=$===void 0?1/0:$,Q=F.delay,Y=F.resetOnSuccess,B=Y===void 0?!1:Y;return J<=0?Pt.identity:jt.operate(function(X,G){var H=0,q,K=function(){var V=!1;if(q=X.subscribe(HM.createOperatorSubscriber(G,function(E){if(B)H=0;G.next(E)},void 0,function(E){if(H++<J){var Z=function(){if(q)q.unsubscribe(),q=null,K();else V=!0};if(Q!=null){var L=typeof Q==="number"?It.timer(Q):St.innerFrom(Q(E,H)),A=HM.createOperatorSubscriber(G,function(){A.unsubscribe(),Z()},function(){G.complete()});L.subscribe(A)}else Z()}else G.error(E)})),V)q.unsubscribe(),q=null,K()};K()})}qM.retry=kt});var UM=z((VM)=>{Object.defineProperty(VM,"__esModule",{value:!0});VM.retryWhen=void 0;var vt=Y0(),yt=VD(),xt=x(),EM=l();function _t(D){return xt.operate(function(F,$){var J,Q=!1,Y,B=function(){if(J=F.subscribe(EM.createOperatorSubscriber($,void 0,void 0,function(X){if(!Y)Y=new yt.Subject,vt.innerFrom(D(Y)).subscribe(EM.createOperatorSubscriber($,function(){return J?B():Q=!0}));if(Y)Y.next(X)})),Q)J.unsubscribe(),J=null,Q=!1,B()};B()})}VM.retryWhen=_t});var sY=z((AM)=>{Object.defineProperty(AM,"__esModule",{value:!0});AM.sample=void 0;var ft=Y0(),gt=x(),ht=zD(),LM=l();function bt(D){return gt.operate(function(F,$){var J=!1,Q=null;F.subscribe(LM.createOperatorSubscriber($,function(Y){J=!0,Q=Y})),ft.innerFrom(D).subscribe(LM.createOperatorSubscriber($,function(){if(J){J=!1;var Y=Q;Q=null,$.next(Y)}},ht.noop))})}AM.sample=bt});var RM=z((NM)=>{Object.defineProperty(NM,"__esModule",{value:!0});NM.sampleTime=void 0;var ut=dD(),mt=sY(),lt=IY();function pt(D,F){if(F===void 0)F=ut.asyncScheduler;return mt.sample(lt.interval(D,F))}NM.sampleTime=pt});var TM=z((OM)=>{Object.defineProperty(OM,"__esModule",{value:!0});OM.scan=void 0;var dt=x(),ct=fY();function nt(D,F){return dt.operate(ct.scanInternals(D,F,arguments.length>=2,!0))}OM.scan=nt});var SM=z((PM)=>{Object.defineProperty(PM,"__esModule",{value:!0});PM.sequenceEqual=void 0;var it=x(),at=l(),ot=Y0();function st(D,F){if(F===void 0)F=function($,J){return $===J};return it.operate(function($,J){var Q=jM(),Y=jM(),B=function(G){J.next(G),J.complete()},X=function(G,H){var q=at.createOperatorSubscriber(J,function(K){var{buffer:V,complete:E}=H;if(V.length===0)E?B(!1):G.buffer.push(K);else!F(K,V.shift())&&B(!1)},function(){G.complete=!0;var{complete:K,buffer:V}=H;K&&B(V.length===0),q===null||q===void 0||q.unsubscribe()});return q};$.subscribe(X(Q,Y)),ot.innerFrom(D).subscribe(X(Y,Q))})}PM.sequenceEqual=st;function jM(){return{buffer:[],complete:!1}}});var tY=z((A6)=>{var rt=A6&&A6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},tt=A6&&A6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(A6,"__esModule",{value:!0});A6.share=void 0;var kM=Y0(),et=VD(),vM=s4(),De=x();function Fe(D){if(D===void 0)D={};var F=D.connector,$=F===void 0?function(){return new et.Subject}:F,J=D.resetOnError,Q=J===void 0?!0:J,Y=D.resetOnComplete,B=Y===void 0?!0:Y,X=D.resetOnRefCountZero,G=X===void 0?!0:X;return function(H){var q,K,V,E=0,Z=!1,L=!1,A=function(){K===null||K===void 0||K.unsubscribe(),K=void 0},M=function(){A(),q=V=void 0,Z=L=!1},O=function(){var w=q;M(),w===null||w===void 0||w.unsubscribe()};return De.operate(function(w,k){if(E++,!L&&!Z)A();var R=V=V!==null&&V!==void 0?V:$();if(k.add(function(){if(E--,E===0&&!L&&!Z)K=rY(O,G)}),R.subscribe(k),!q&&E>0)q=new vM.SafeSubscriber({next:function(j){return R.next(j)},error:function(j){L=!0,A(),K=rY(M,Q,j),R.error(j)},complete:function(){Z=!0,A(),K=rY(M,B),R.complete()}}),kM.innerFrom(w).subscribe(q)})(H)}}A6.share=Fe;function rY(D,F){var $=[];for(var J=2;J<arguments.length;J++)$[J-2]=arguments[J];if(F===!0){D();return}if(F===!1)return;var Q=new vM.SafeSubscriber({next:function(){Q.unsubscribe(),D()}});return kM.innerFrom(F.apply(void 0,tt([],rt($)))).subscribe(Q)}});var _M=z((yM)=>{Object.defineProperty(yM,"__esModule",{value:!0});yM.shareReplay=void 0;var $e=$7(),Je=tY();function Qe(D,F,$){var J,Q,Y,B,X=!1;if(D&&typeof D==="object")J=D.bufferSize,B=J===void 0?1/0:J,Q=D.windowTime,F=Q===void 0?1/0:Q,Y=D.refCount,X=Y===void 0?!1:Y,$=D.scheduler;else B=D!==null&&D!==void 0?D:1/0;return Je.share({connector:function(){return new $e.ReplaySubject(B,F,$)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:X})}yM.shareReplay=Qe});var hM=z((fM)=>{Object.defineProperty(fM,"__esModule",{value:!0});fM.single=void 0;var Ye=Q6(),Be=RY(),Xe=CY(),Ge=x(),We=l();function He(D){return Ge.operate(function(F,$){var J=!1,Q,Y=!1,B=0;F.subscribe(We.createOperatorSubscriber($,function(X){if(Y=!0,!D||D(X,B++,F))J&&$.error(new Be.SequenceError("Too many matching values")),J=!0,Q=X},function(){if(J)$.next(Q),$.complete();else $.error(Y?new Xe.NotFoundError("No matching values"):new Ye.EmptyError)}))})}fM.single=He});var mM=z((bM)=>{Object.defineProperty(bM,"__esModule",{value:!0});bM.skip=void 0;var qe=D4();function Ke(D){return qe.filter(function(F,$){return D<=$})}bM.skip=Ke});var dM=z((lM)=>{Object.defineProperty(lM,"__esModule",{value:!0});lM.skipLast=void 0;var ze=ED(),Ee=x(),Ve=l();function Ze(D){return D<=0?ze.identity:Ee.operate(function(F,$){var J=Array(D),Q=0;return F.subscribe(Ve.createOperatorSubscriber($,function(Y){var B=Q++;if(B<D)J[B]=Y;else{var X=B%D,G=J[X];J[X]=Y,$.next(G)}})),function(){J=null}})}lM.skipLast=Ze});var aM=z((nM)=>{Object.defineProperty(nM,"__esModule",{value:!0});nM.skipUntil=void 0;var Ue=x(),cM=l(),Le=Y0(),Ae=zD();function Me(D){return Ue.operate(function(F,$){var J=!1,Q=cM.createOperatorSubscriber($,function(){Q===null||Q===void 0||Q.unsubscribe(),J=!0},Ae.noop);Le.innerFrom(D).subscribe(Q),F.subscribe(cM.createOperatorSubscriber($,function(Y){return J&&$.next(Y)}))})}nM.skipUntil=Me});var rM=z((oM)=>{Object.defineProperty(oM,"__esModule",{value:!0});oM.skipWhile=void 0;var Ne=x(),Ce=l();function Re(D){return Ne.operate(function(F,$){var J=!1,Q=0;F.subscribe(Ce.createOperatorSubscriber($,function(Y){return(J||(J=!D(Y,Q++)))&&$.next(Y)}))})}oM.skipWhile=Re});var FN=z((eM)=>{Object.defineProperty(eM,"__esModule",{value:!0});eM.startWith=void 0;var tM=oF(),Oe=cD(),we=x();function Te(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=Oe.popScheduler(D);return we.operate(function(J,Q){($?tM.concat(D,J,$):tM.concat(D,J)).subscribe(Q)})}eM.startWith=Te});var D5=z((JN)=>{Object.defineProperty(JN,"__esModule",{value:!0});JN.switchMap=void 0;var je=Y0(),Pe=x(),$N=l();function Ie(D,F){return Pe.operate(function($,J){var Q=null,Y=0,B=!1,X=function(){return B&&!Q&&J.complete()};$.subscribe($N.createOperatorSubscriber(J,function(G){Q===null||Q===void 0||Q.unsubscribe();var H=0,q=Y++;je.innerFrom(D(G,q)).subscribe(Q=$N.createOperatorSubscriber(J,function(K){return J.next(F?F(G,K,q,H++):K)},function(){Q=null,X()}))},function(){B=!0,X()}))})}JN.switchMap=Ie});var XN=z((YN)=>{Object.defineProperty(YN,"__esModule",{value:!0});YN.switchAll=void 0;var Se=D5(),ke=ED();function ve(){return Se.switchMap(ke.identity)}YN.switchAll=ve});var qN=z((WN)=>{Object.defineProperty(WN,"__esModule",{value:!0});WN.switchMapTo=void 0;var GN=D5(),ye=S0();function xe(D,F){return ye.isFunction(F)?GN.switchMap(function(){return D},F):GN.switchMap(function(){return D})}WN.switchMapTo=xe});var EN=z((KN)=>{Object.defineProperty(KN,"__esModule",{value:!0});KN.switchScan=void 0;var _e=D5(),fe=x();function ge(D,F){return fe.operate(function($,J){var Q=F;return _e.switchMap(function(Y,B){return D(Q,Y,B)},function(Y,B){return Q=B,B})($).subscribe(J),function(){Q=null}})}KN.switchScan=ge});var UN=z((VN)=>{Object.defineProperty(VN,"__esModule",{value:!0});VN.takeUntil=void 0;var he=x(),be=l(),ue=Y0(),me=zD();function le(D){return he.operate(function(F,$){ue.innerFrom(D).subscribe(be.createOperatorSubscriber($,function(){return $.complete()},me.noop)),!$.closed&&F.subscribe($)})}VN.takeUntil=le});var MN=z((LN)=>{Object.defineProperty(LN,"__esModule",{value:!0});LN.takeWhile=void 0;var pe=x(),de=l();function ce(D,F){if(F===void 0)F=!1;return pe.operate(function($,J){var Q=0;$.subscribe(de.createOperatorSubscriber(J,function(Y){var B=D(Y,Q++);(B||F)&&J.next(Y),!B&&J.complete()}))})}LN.takeWhile=ce});var RN=z((NN)=>{Object.defineProperty(NN,"__esModule",{value:!0});NN.tap=void 0;var ne=S0(),ie=x(),ae=l(),oe=ED();function se(D,F,$){var J=ne.isFunction(D)||F||$?{next:D,error:F,complete:$}:D;return J?ie.operate(function(Q,Y){var B;(B=J.subscribe)===null||B===void 0||B.call(J);var X=!0;Q.subscribe(ae.createOperatorSubscriber(Y,function(G){var H;(H=J.next)===null||H===void 0||H.call(J,G),Y.next(G)},function(){var G;X=!1,(G=J.complete)===null||G===void 0||G.call(J),Y.complete()},function(G){var H;X=!1,(H=J.error)===null||H===void 0||H.call(J,G),Y.error(G)},function(){var G,H;if(X)(G=J.unsubscribe)===null||G===void 0||G.call(J);(H=J.finalize)===null||H===void 0||H.call(J)}))}):oe.identity}NN.tap=se});var eY=z((wN)=>{Object.defineProperty(wN,"__esModule",{value:!0});wN.throttle=void 0;var re=x(),ON=l(),te=Y0();function ee(D,F){return re.operate(function($,J){var Q=F!==null&&F!==void 0?F:{},Y=Q.leading,B=Y===void 0?!0:Y,X=Q.trailing,G=X===void 0?!1:X,H=!1,q=null,K=null,V=!1,E=function(){if(K===null||K===void 0||K.unsubscribe(),K=null,G)A(),V&&J.complete()},Z=function(){K=null,V&&J.complete()},L=function(M){return K=te.innerFrom(D(M)).subscribe(ON.createOperatorSubscriber(J,E,Z))},A=function(){if(H){H=!1;var M=q;q=null,J.next(M),!V&&L(M)}};$.subscribe(ON.createOperatorSubscriber(J,function(M){H=!0,q=M,!(K&&!K.closed)&&(B?A():L(M))},function(){V=!0,!(G&&H&&K&&!K.closed)&&J.complete()}))})}wN.throttle=ee});var IN=z((jN)=>{Object.defineProperty(jN,"__esModule",{value:!0});jN.throttleTime=void 0;var D00=dD(),F00=eY(),$00=W6();function J00(D,F,$){if(F===void 0)F=D00.asyncScheduler;var J=$00.timer(D,F);return F00.throttle(function(){return J},$)}jN.throttleTime=J00});var yN=z((kN)=>{Object.defineProperty(kN,"__esModule",{value:!0});kN.TimeInterval=kN.timeInterval=void 0;var Q00=dD(),Y00=x(),B00=l();function X00(D){if(D===void 0)D=Q00.asyncScheduler;return Y00.operate(function(F,$){var J=D.now();F.subscribe(B00.createOperatorSubscriber($,function(Q){var Y=D.now(),B=Y-J;J=Y,$.next(new SN(Q,B))}))})}kN.timeInterval=X00;var SN=function(){function D(F,$){this.value=F,this.interval=$}return D}();kN.TimeInterval=SN});var fN=z((xN)=>{Object.defineProperty(xN,"__esModule",{value:!0});xN.timeoutWith=void 0;var W00=dD(),H00=W7(),q00=H7();function K00(D,F,$){var J,Q,Y;if($=$!==null&&$!==void 0?$:W00.async,H00.isValidDate(D))J=D;else if(typeof D==="number")Q=D;if(F)Y=function(){return F};else throw TypeError("No observable provided to switch to");if(J==null&&Q==null)throw TypeError("No timeout provided.");return q00.timeout({first:J,each:Q,scheduler:$,with:Y})}xN.timeoutWith=K00});var bN=z((gN)=>{Object.defineProperty(gN,"__esModule",{value:!0});gN.timestamp=void 0;var z00=F7(),E00=Y6();function V00(D){if(D===void 0)D=z00.dateTimestampProvider;return E00.map(function(F){return{value:F,timestamp:D.now()}})}gN.timestamp=V00});var dN=z((lN)=>{Object.defineProperty(lN,"__esModule",{value:!0});lN.window=void 0;var uN=VD(),Z00=x(),mN=l(),U00=zD(),L00=Y0();function A00(D){return Z00.operate(function(F,$){var J=new uN.Subject;$.next(J.asObservable());var Q=function(Y){J.error(Y),$.error(Y)};return F.subscribe(mN.createOperatorSubscriber($,function(Y){return J===null||J===void 0?void 0:J.next(Y)},function(){J.complete(),$.complete()},Q)),L00.innerFrom(D).subscribe(mN.createOperatorSubscriber($,function(){J.complete(),$.next(J=new uN.Subject)},U00.noop,Q)),function(){J===null||J===void 0||J.unsubscribe(),J=null}})}lN.window=A00});var nN=z((C3)=>{var M00=C3&&C3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(C3,"__esModule",{value:!0});C3.windowCount=void 0;var cN=VD(),N00=x(),C00=l();function R00(D,F){if(F===void 0)F=0;var $=F>0?F:D;return N00.operate(function(J,Q){var Y=[new cN.Subject],B=[],X=0;Q.next(Y[0].asObservable()),J.subscribe(C00.createOperatorSubscriber(Q,function(G){var H,q;try{for(var K=M00(Y),V=K.next();!V.done;V=K.next()){var E=V.value;E.next(G)}}catch(A){H={error:A}}finally{try{if(V&&!V.done&&(q=K.return))q.call(K)}finally{if(H)throw H.error}}var Z=X-D+1;if(Z>=0&&Z%$===0)Y.shift().complete();if(++X%$===0){var L=new cN.Subject;Y.push(L),Q.next(L.asObservable())}},function(){while(Y.length>0)Y.shift().complete();Q.complete()},function(G){while(Y.length>0)Y.shift().error(G);Q.error(G)},function(){B=null,Y=null}))})}C3.windowCount=R00});var sN=z((aN)=>{Object.defineProperty(aN,"__esModule",{value:!0});aN.windowTime=void 0;var O00=VD(),w00=dD(),T00=F1(),j00=x(),P00=l(),I00=P8(),S00=cD(),iN=I8();function k00(D){var F,$,J=[];for(var Q=1;Q<arguments.length;Q++)J[Q-1]=arguments[Q];var Y=(F=S00.popScheduler(J))!==null&&F!==void 0?F:w00.asyncScheduler,B=($=J[0])!==null&&$!==void 0?$:null,X=J[1]||1/0;return j00.operate(function(G,H){var q=[],K=!1,V=function(A){var{window:M,subs:O}=A;M.complete(),O.unsubscribe(),I00.arrRemove(q,A),K&&E()},E=function(){if(q){var A=new T00.Subscription;H.add(A);var M=new O00.Subject,O={window:M,subs:A,seen:0};q.push(O),H.next(M.asObservable()),iN.executeSchedule(A,Y,function(){return V(O)},D)}};if(B!==null&&B>=0)iN.executeSchedule(H,Y,E,B,!0);else K=!0;E();var Z=function(A){return q.slice().forEach(A)},L=function(A){Z(function(M){var O=M.window;return A(O)}),A(H),H.unsubscribe()};return G.subscribe(P00.createOperatorSubscriber(H,function(A){Z(function(M){M.window.next(A),X<=++M.seen&&V(M)})},function(){return L(function(A){return A.complete()})},function(A){return L(function(M){return M.error(A)})})),function(){q=null}})}aN.windowTime=k00});var eN=z((R3)=>{var v00=R3&&R3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(R3,"__esModule",{value:!0});R3.windowToggle=void 0;var y00=VD(),x00=F1(),_00=x(),rN=Y0(),DB=l(),tN=zD(),f00=P8();function g00(D,F){return _00.operate(function($,J){var Q=[],Y=function(B){while(0<Q.length)Q.shift().error(B);J.error(B)};rN.innerFrom(D).subscribe(DB.createOperatorSubscriber(J,function(B){var X=new y00.Subject;Q.push(X);var G=new x00.Subscription,H=function(){f00.arrRemove(Q,X),X.complete(),G.unsubscribe()},q;try{q=rN.innerFrom(F(B))}catch(K){Y(K);return}J.next(X.asObservable()),G.add(q.subscribe(DB.createOperatorSubscriber(J,H,tN.noop,Y)))},tN.noop)),$.subscribe(DB.createOperatorSubscriber(J,function(B){var X,G,H=Q.slice();try{for(var q=v00(H),K=q.next();!K.done;K=q.next()){var V=K.value;V.next(B)}}catch(E){X={error:E}}finally{try{if(K&&!K.done&&(G=q.return))G.call(q)}finally{if(X)throw X.error}}},function(){while(0<Q.length)Q.shift().complete();J.complete()},Y,function(){while(0<Q.length)Q.shift().unsubscribe()}))})}R3.windowToggle=g00});var JC=z((FC)=>{Object.defineProperty(FC,"__esModule",{value:!0});FC.windowWhen=void 0;var h00=VD(),b00=x(),DC=l(),u00=Y0();function m00(D){return b00.operate(function(F,$){var J,Q,Y=function(X){J.error(X),$.error(X)},B=function(){Q===null||Q===void 0||Q.unsubscribe(),J===null||J===void 0||J.complete(),J=new h00.Subject,$.next(J.asObservable());var X;try{X=u00.innerFrom(D())}catch(G){Y(G);return}X.subscribe(Q=DC.createOperatorSubscriber($,B,B,Y))};B(),F.subscribe(DC.createOperatorSubscriber($,function(X){return J.next(X)},function(){J.complete(),$.complete()},Y,function(){Q===null||Q===void 0||Q.unsubscribe(),J=null}))})}FC.windowWhen=m00});var XC=z((M6)=>{var QC=M6&&M6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},YC=M6&&M6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(M6,"__esModule",{value:!0});M6.withLatestFrom=void 0;var l00=x(),BC=l(),p00=Y0(),d00=ED(),c00=zD(),n00=cD();function i00(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=n00.popResultSelector(D);return l00.operate(function(J,Q){var Y=D.length,B=Array(Y),X=D.map(function(){return!1}),G=!1,H=function(K){p00.innerFrom(D[K]).subscribe(BC.createOperatorSubscriber(Q,function(V){if(B[K]=V,!G&&!X[K])X[K]=!0,(G=X.every(d00.identity))&&(X=null)},c00.noop))};for(var q=0;q<Y;q++)H(q);J.subscribe(BC.createOperatorSubscriber(Q,function(K){if(G){var V=YC([K],QC(B));Q.next($?$.apply(void 0,YC([],QC(V))):V)}}))})}M6.withLatestFrom=i00});var HC=z((GC)=>{Object.defineProperty(GC,"__esModule",{value:!0});GC.zipAll=void 0;var a00=E7(),o00=hY();function s00(D){return o00.joinAllInternals(a00.zip,D)}GC.zipAll=s00});var qC=z((N6)=>{var r00=N6&&N6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},t00=N6&&N6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(N6,"__esModule",{value:!0});N6.zip=void 0;var e00=E7(),DD0=x();function FD0(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return DD0.operate(function($,J){e00.zip.apply(void 0,t00([$],r00(D))).subscribe(J)})}N6.zip=FD0});var KC=z((C6)=>{var $D0=C6&&C6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},JD0=C6&&C6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(C6,"__esModule",{value:!0});C6.zipWith=void 0;var QD0=qC();function YD0(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return QD0.zip.apply(void 0,JD0([],$D0(D)))}C6.zipWith=YD0});var $1=z((U)=>{var BD0=U&&U.__createBinding||(Object.create?function(D,F,$,J){if(J===void 0)J=$;Object.defineProperty(D,J,{enumerable:!0,get:function(){return F[$]}})}:function(D,F,$,J){if(J===void 0)J=$;D[J]=F[$]}),XD0=U&&U.__exportStar||function(D,F){for(var $ in D)if($!=="default"&&!Object.prototype.hasOwnProperty.call(F,$))BD0(F,D,$)};Object.defineProperty(U,"__esModule",{value:!0});U.interval=U.iif=U.generate=U.fromEventPattern=U.fromEvent=U.from=U.forkJoin=U.empty=U.defer=U.connectable=U.concat=U.combineLatest=U.bindNodeCallback=U.bindCallback=U.UnsubscriptionError=U.TimeoutError=U.SequenceError=U.ObjectUnsubscribedError=U.NotFoundError=U.EmptyError=U.ArgumentOutOfRangeError=U.firstValueFrom=U.lastValueFrom=U.isObservable=U.identity=U.noop=U.pipe=U.NotificationKind=U.Notification=U.Subscriber=U.Subscription=U.Scheduler=U.VirtualAction=U.VirtualTimeScheduler=U.animationFrameScheduler=U.animationFrame=U.queueScheduler=U.queue=U.asyncScheduler=U.async=U.asapScheduler=U.asap=U.AsyncSubject=U.ReplaySubject=U.BehaviorSubject=U.Subject=U.animationFrames=U.observable=U.ConnectableObservable=U.Observable=void 0;U.filter=U.expand=U.exhaustMap=U.exhaustAll=U.exhaust=U.every=U.endWith=U.elementAt=U.distinctUntilKeyChanged=U.distinctUntilChanged=U.distinct=U.dematerialize=U.delayWhen=U.delay=U.defaultIfEmpty=U.debounceTime=U.debounce=U.count=U.connect=U.concatWith=U.concatMapTo=U.concatMap=U.concatAll=U.combineLatestWith=U.combineLatestAll=U.combineAll=U.catchError=U.bufferWhen=U.bufferToggle=U.bufferTime=U.bufferCount=U.buffer=U.auditTime=U.audit=U.config=U.NEVER=U.EMPTY=U.scheduled=U.zip=U.using=U.timer=U.throwError=U.range=U.race=U.partition=U.pairs=U.onErrorResumeNext=U.of=U.never=U.merge=void 0;U.switchMap=U.switchAll=U.subscribeOn=U.startWith=U.skipWhile=U.skipUntil=U.skipLast=U.skip=U.single=U.shareReplay=U.share=U.sequenceEqual=U.scan=U.sampleTime=U.sample=U.refCount=U.retryWhen=U.retry=U.repeatWhen=U.repeat=U.reduce=U.raceWith=U.publishReplay=U.publishLast=U.publishBehavior=U.publish=U.pluck=U.pairwise=U.onErrorResumeNextWith=U.observeOn=U.multicast=U.min=U.mergeWith=U.mergeScan=U.mergeMapTo=U.mergeMap=U.flatMap=U.mergeAll=U.max=U.materialize=U.mapTo=U.map=U.last=U.isEmpty=U.ignoreElements=U.groupBy=U.first=U.findIndex=U.find=U.finalize=void 0;U.zipWith=U.zipAll=U.withLatestFrom=U.windowWhen=U.windowToggle=U.windowTime=U.windowCount=U.window=U.toArray=U.timestamp=U.timeoutWith=U.timeout=U.timeInterval=U.throwIfEmpty=U.throttleTime=U.throttle=U.tap=U.takeWhile=U.takeUntil=U.takeLast=U.take=U.switchScan=U.switchMapTo=void 0;var GD0=v0();Object.defineProperty(U,"Observable",{enumerable:!0,get:function(){return GD0.Observable}});var WD0=dF();Object.defineProperty(U,"ConnectableObservable",{enumerable:!0,get:function(){return WD0.ConnectableObservable}});var HD0=lF();Object.defineProperty(U,"observable",{enumerable:!0,get:function(){return HD0.observable}});var qD0=CK();Object.defineProperty(U,"animationFrames",{enumerable:!0,get:function(){return qD0.animationFrames}});var KD0=VD();Object.defineProperty(U,"Subject",{enumerable:!0,get:function(){return KD0.Subject}});var zD0=JY();Object.defineProperty(U,"BehaviorSubject",{enumerable:!0,get:function(){return zD0.BehaviorSubject}});var ED0=$7();Object.defineProperty(U,"ReplaySubject",{enumerable:!0,get:function(){return ED0.ReplaySubject}});var VD0=J7();Object.defineProperty(U,"AsyncSubject",{enumerable:!0,get:function(){return VD0.AsyncSubject}});var zC=oK();Object.defineProperty(U,"asap",{enumerable:!0,get:function(){return zC.asap}});Object.defineProperty(U,"asapScheduler",{enumerable:!0,get:function(){return zC.asapScheduler}});var EC=dD();Object.defineProperty(U,"async",{enumerable:!0,get:function(){return EC.async}});Object.defineProperty(U,"asyncScheduler",{enumerable:!0,get:function(){return EC.asyncScheduler}});var VC=Qz();Object.defineProperty(U,"queue",{enumerable:!0,get:function(){return VC.queue}});Object.defineProperty(U,"queueScheduler",{enumerable:!0,get:function(){return VC.queueScheduler}});var ZC=qz();Object.defineProperty(U,"animationFrame",{enumerable:!0,get:function(){return ZC.animationFrame}});Object.defineProperty(U,"animationFrameScheduler",{enumerable:!0,get:function(){return ZC.animationFrameScheduler}});var UC=Ez();Object.defineProperty(U,"VirtualTimeScheduler",{enumerable:!0,get:function(){return UC.VirtualTimeScheduler}});Object.defineProperty(U,"VirtualAction",{enumerable:!0,get:function(){return UC.VirtualAction}});var ZD0=BY();Object.defineProperty(U,"Scheduler",{enumerable:!0,get:function(){return ZD0.Scheduler}});var UD0=F1();Object.defineProperty(U,"Subscription",{enumerable:!0,get:function(){return UD0.Subscription}});var LD0=s4();Object.defineProperty(U,"Subscriber",{enumerable:!0,get:function(){return LD0.Subscriber}});var LC=G7();Object.defineProperty(U,"Notification",{enumerable:!0,get:function(){return LC.Notification}});Object.defineProperty(U,"NotificationKind",{enumerable:!0,get:function(){return LC.NotificationKind}});var AD0=pF();Object.defineProperty(U,"pipe",{enumerable:!0,get:function(){return AD0.pipe}});var MD0=zD();Object.defineProperty(U,"noop",{enumerable:!0,get:function(){return MD0.noop}});var ND0=ED();Object.defineProperty(U,"identity",{enumerable:!0,get:function(){return ND0.identity}});var CD0=IE();Object.defineProperty(U,"isObservable",{enumerable:!0,get:function(){return CD0.isObservable}});var RD0=xE();Object.defineProperty(U,"lastValueFrom",{enumerable:!0,get:function(){return RD0.lastValueFrom}});var OD0=gE();Object.defineProperty(U,"firstValueFrom",{enumerable:!0,get:function(){return OD0.firstValueFrom}});var wD0=NY();Object.defineProperty(U,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return wD0.ArgumentOutOfRangeError}});var TD0=Q6();Object.defineProperty(U,"EmptyError",{enumerable:!0,get:function(){return TD0.EmptyError}});var jD0=CY();Object.defineProperty(U,"NotFoundError",{enumerable:!0,get:function(){return jD0.NotFoundError}});var PD0=eQ();Object.defineProperty(U,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return PD0.ObjectUnsubscribedError}});var ID0=RY();Object.defineProperty(U,"SequenceError",{enumerable:!0,get:function(){return ID0.SequenceError}});var SD0=H7();Object.defineProperty(U,"TimeoutError",{enumerable:!0,get:function(){return SD0.TimeoutError}});var kD0=bQ();Object.defineProperty(U,"UnsubscriptionError",{enumerable:!0,get:function(){return kD0.UnsubscriptionError}});var vD0=DV();Object.defineProperty(U,"bindCallback",{enumerable:!0,get:function(){return vD0.bindCallback}});var yD0=JV();Object.defineProperty(U,"bindNodeCallback",{enumerable:!0,get:function(){return yD0.bindNodeCallback}});var xD0=q7();Object.defineProperty(U,"combineLatest",{enumerable:!0,get:function(){return xD0.combineLatest}});var _D0=oF();Object.defineProperty(U,"concat",{enumerable:!0,get:function(){return _D0.concat}});var fD0=kV();Object.defineProperty(U,"connectable",{enumerable:!0,get:function(){return fD0.connectable}});var gD0=sF();Object.defineProperty(U,"defer",{enumerable:!0,get:function(){return gD0.defer}});var hD0=S1();Object.defineProperty(U,"empty",{enumerable:!0,get:function(){return hD0.empty}});var bD0=xV();Object.defineProperty(U,"forkJoin",{enumerable:!0,get:function(){return bD0.forkJoin}});var uD0=S8();Object.defineProperty(U,"from",{enumerable:!0,get:function(){return uD0.from}});var mD0=fV();Object.defineProperty(U,"fromEvent",{enumerable:!0,get:function(){return mD0.fromEvent}});var lD0=uV();Object.defineProperty(U,"fromEventPattern",{enumerable:!0,get:function(){return lD0.fromEventPattern}});var pD0=lV();Object.defineProperty(U,"generate",{enumerable:!0,get:function(){return pD0.generate}});var dD0=cV();Object.defineProperty(U,"iif",{enumerable:!0,get:function(){return dD0.iif}});var cD0=IY();Object.defineProperty(U,"interval",{enumerable:!0,get:function(){return cD0.interval}});var nD0=eV();Object.defineProperty(U,"merge",{enumerable:!0,get:function(){return nD0.merge}});var iD0=SY();Object.defineProperty(U,"never",{enumerable:!0,get:function(){return iD0.never}});var aD0=X7();Object.defineProperty(U,"of",{enumerable:!0,get:function(){return aD0.of}});var oD0=kY();Object.defineProperty(U,"onErrorResumeNext",{enumerable:!0,get:function(){return oD0.onErrorResumeNext}});var sD0=HZ();Object.defineProperty(U,"pairs",{enumerable:!0,get:function(){return sD0.pairs}});var rD0=MZ();Object.defineProperty(U,"partition",{enumerable:!0,get:function(){return rD0.partition}});var tD0=vY();Object.defineProperty(U,"race",{enumerable:!0,get:function(){return tD0.race}});var eD0=jZ();Object.defineProperty(U,"range",{enumerable:!0,get:function(){return eD0.range}});var D10=MY();Object.defineProperty(U,"throwError",{enumerable:!0,get:function(){return D10.throwError}});var F10=W6();Object.defineProperty(U,"timer",{enumerable:!0,get:function(){return F10.timer}});var $10=SZ();Object.defineProperty(U,"using",{enumerable:!0,get:function(){return $10.using}});var J10=E7();Object.defineProperty(U,"zip",{enumerable:!0,get:function(){return J10.zip}});var Q10=AY();Object.defineProperty(U,"scheduled",{enumerable:!0,get:function(){return Q10.scheduled}});var Y10=S1();Object.defineProperty(U,"EMPTY",{enumerable:!0,get:function(){return Y10.EMPTY}});var B10=SY();Object.defineProperty(U,"NEVER",{enumerable:!0,get:function(){return B10.NEVER}});XD0(vZ(),U);var X10=o4();Object.defineProperty(U,"config",{enumerable:!0,get:function(){return X10.config}});var G10=yY();Object.defineProperty(U,"audit",{enumerable:!0,get:function(){return G10.audit}});var W10=hZ();Object.defineProperty(U,"auditTime",{enumerable:!0,get:function(){return W10.auditTime}});var H10=lZ();Object.defineProperty(U,"buffer",{enumerable:!0,get:function(){return H10.buffer}});var q10=pZ();Object.defineProperty(U,"bufferCount",{enumerable:!0,get:function(){return q10.bufferCount}});var K10=cZ();Object.defineProperty(U,"bufferTime",{enumerable:!0,get:function(){return K10.bufferTime}});var z10=aZ();Object.defineProperty(U,"bufferToggle",{enumerable:!0,get:function(){return z10.bufferToggle}});var E10=tZ();Object.defineProperty(U,"bufferWhen",{enumerable:!0,get:function(){return E10.bufferWhen}});var V10=$U();Object.defineProperty(U,"catchError",{enumerable:!0,get:function(){return V10.catchError}});var Z10=VU();Object.defineProperty(U,"combineAll",{enumerable:!0,get:function(){return Z10.combineAll}});var U10=bY();Object.defineProperty(U,"combineLatestAll",{enumerable:!0,get:function(){return U10.combineLatestAll}});var L10=MU();Object.defineProperty(U,"combineLatestWith",{enumerable:!0,get:function(){return L10.combineLatestWith}});var A10=z7();Object.defineProperty(U,"concatAll",{enumerable:!0,get:function(){return A10.concatAll}});var M10=uY();Object.defineProperty(U,"concatMap",{enumerable:!0,get:function(){return M10.concatMap}});var N10=jU();Object.defineProperty(U,"concatMapTo",{enumerable:!0,get:function(){return N10.concatMapTo}});var C10=IU();Object.defineProperty(U,"concatWith",{enumerable:!0,get:function(){return C10.concatWith}});var R10=V7();Object.defineProperty(U,"connect",{enumerable:!0,get:function(){return R10.connect}});var O10=gU();Object.defineProperty(U,"count",{enumerable:!0,get:function(){return O10.count}});var w10=mU();Object.defineProperty(U,"debounce",{enumerable:!0,get:function(){return w10.debounce}});var T10=dU();Object.defineProperty(U,"debounceTime",{enumerable:!0,get:function(){return T10.debounceTime}});var j10=rF();Object.defineProperty(U,"defaultIfEmpty",{enumerable:!0,get:function(){return j10.defaultIfEmpty}});var P10=YL();Object.defineProperty(U,"delay",{enumerable:!0,get:function(){return P10.delay}});var I10=pY();Object.defineProperty(U,"delayWhen",{enumerable:!0,get:function(){return I10.delayWhen}});var S10=GL();Object.defineProperty(U,"dematerialize",{enumerable:!0,get:function(){return S10.dematerialize}});var k10=KL();Object.defineProperty(U,"distinct",{enumerable:!0,get:function(){return k10.distinct}});var v10=dY();Object.defineProperty(U,"distinctUntilChanged",{enumerable:!0,get:function(){return v10.distinctUntilChanged}});var y10=UL();Object.defineProperty(U,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return y10.distinctUntilKeyChanged}});var x10=RL();Object.defineProperty(U,"elementAt",{enumerable:!0,get:function(){return x10.elementAt}});var _10=OL();Object.defineProperty(U,"endWith",{enumerable:!0,get:function(){return _10.endWith}});var f10=jL();Object.defineProperty(U,"every",{enumerable:!0,get:function(){return f10.every}});var g10=gL();Object.defineProperty(U,"exhaust",{enumerable:!0,get:function(){return g10.exhaust}});var h10=nY();Object.defineProperty(U,"exhaustAll",{enumerable:!0,get:function(){return h10.exhaustAll}});var b10=cY();Object.defineProperty(U,"exhaustMap",{enumerable:!0,get:function(){return b10.exhaustMap}});var u10=uL();Object.defineProperty(U,"expand",{enumerable:!0,get:function(){return u10.expand}});var m10=D4();Object.defineProperty(U,"filter",{enumerable:!0,get:function(){return m10.filter}});var l10=pL();Object.defineProperty(U,"finalize",{enumerable:!0,get:function(){return l10.finalize}});var p10=iY();Object.defineProperty(U,"find",{enumerable:!0,get:function(){return p10.find}});var d10=oL();Object.defineProperty(U,"findIndex",{enumerable:!0,get:function(){return d10.findIndex}});var c10=tL();Object.defineProperty(U,"first",{enumerable:!0,get:function(){return c10.first}});var n10=$A();Object.defineProperty(U,"groupBy",{enumerable:!0,get:function(){return n10.groupBy}});var i10=mY();Object.defineProperty(U,"ignoreElements",{enumerable:!0,get:function(){return i10.ignoreElements}});var a10=YA();Object.defineProperty(U,"isEmpty",{enumerable:!0,get:function(){return a10.isEmpty}});var o10=GA();Object.defineProperty(U,"last",{enumerable:!0,get:function(){return o10.last}});var s10=Y6();Object.defineProperty(U,"map",{enumerable:!0,get:function(){return s10.map}});var r10=lY();Object.defineProperty(U,"mapTo",{enumerable:!0,get:function(){return r10.mapTo}});var t10=qA();Object.defineProperty(U,"materialize",{enumerable:!0,get:function(){return t10.materialize}});var e10=EA();Object.defineProperty(U,"max",{enumerable:!0,get:function(){return e10.max}});var D80=aF();Object.defineProperty(U,"mergeAll",{enumerable:!0,get:function(){return D80.mergeAll}});var F80=UA();Object.defineProperty(U,"flatMap",{enumerable:!0,get:function(){return F80.flatMap}});var $80=k8();Object.defineProperty(U,"mergeMap",{enumerable:!0,get:function(){return $80.mergeMap}});var J80=NA();Object.defineProperty(U,"mergeMapTo",{enumerable:!0,get:function(){return J80.mergeMapTo}});var Q80=OA();Object.defineProperty(U,"mergeScan",{enumerable:!0,get:function(){return Q80.mergeScan}});var Y80=jA();Object.defineProperty(U,"mergeWith",{enumerable:!0,get:function(){return Y80.mergeWith}});var B80=SA();Object.defineProperty(U,"min",{enumerable:!0,get:function(){return B80.min}});var X80=Z7();Object.defineProperty(U,"multicast",{enumerable:!0,get:function(){return X80.multicast}});var G80=nF();Object.defineProperty(U,"observeOn",{enumerable:!0,get:function(){return G80.observeOn}});var W80=_A();Object.defineProperty(U,"onErrorResumeNextWith",{enumerable:!0,get:function(){return W80.onErrorResumeNextWith}});var H80=hA();Object.defineProperty(U,"pairwise",{enumerable:!0,get:function(){return H80.pairwise}});var q80=mA();Object.defineProperty(U,"pluck",{enumerable:!0,get:function(){return q80.pluck}});var K80=dA();Object.defineProperty(U,"publish",{enumerable:!0,get:function(){return K80.publish}});var z80=iA();Object.defineProperty(U,"publishBehavior",{enumerable:!0,get:function(){return z80.publishBehavior}});var E80=sA();Object.defineProperty(U,"publishLast",{enumerable:!0,get:function(){return E80.publishLast}});var V80=DM();Object.defineProperty(U,"publishReplay",{enumerable:!0,get:function(){return V80.publishReplay}});var Z80=FM();Object.defineProperty(U,"raceWith",{enumerable:!0,get:function(){return Z80.raceWith}});var U80=M3();Object.defineProperty(U,"reduce",{enumerable:!0,get:function(){return U80.reduce}});var L80=YM();Object.defineProperty(U,"repeat",{enumerable:!0,get:function(){return L80.repeat}});var A80=WM();Object.defineProperty(U,"repeatWhen",{enumerable:!0,get:function(){return A80.repeatWhen}});var M80=zM();Object.defineProperty(U,"retry",{enumerable:!0,get:function(){return M80.retry}});var N80=UM();Object.defineProperty(U,"retryWhen",{enumerable:!0,get:function(){return N80.retryWhen}});var C80=sQ();Object.defineProperty(U,"refCount",{enumerable:!0,get:function(){return C80.refCount}});var R80=sY();Object.defineProperty(U,"sample",{enumerable:!0,get:function(){return R80.sample}});var O80=RM();Object.defineProperty(U,"sampleTime",{enumerable:!0,get:function(){return O80.sampleTime}});var w80=TM();Object.defineProperty(U,"scan",{enumerable:!0,get:function(){return w80.scan}});var T80=SM();Object.defineProperty(U,"sequenceEqual",{enumerable:!0,get:function(){return T80.sequenceEqual}});var j80=tY();Object.defineProperty(U,"share",{enumerable:!0,get:function(){return j80.share}});var P80=_M();Object.defineProperty(U,"shareReplay",{enumerable:!0,get:function(){return P80.shareReplay}});var I80=hM();Object.defineProperty(U,"single",{enumerable:!0,get:function(){return I80.single}});var S80=mM();Object.defineProperty(U,"skip",{enumerable:!0,get:function(){return S80.skip}});var k80=dM();Object.defineProperty(U,"skipLast",{enumerable:!0,get:function(){return k80.skipLast}});var v80=aM();Object.defineProperty(U,"skipUntil",{enumerable:!0,get:function(){return v80.skipUntil}});var y80=rM();Object.defineProperty(U,"skipWhile",{enumerable:!0,get:function(){return y80.skipWhile}});var x80=FN();Object.defineProperty(U,"startWith",{enumerable:!0,get:function(){return x80.startWith}});var _80=iF();Object.defineProperty(U,"subscribeOn",{enumerable:!0,get:function(){return _80.subscribeOn}});var f80=XN();Object.defineProperty(U,"switchAll",{enumerable:!0,get:function(){return f80.switchAll}});var g80=D5();Object.defineProperty(U,"switchMap",{enumerable:!0,get:function(){return g80.switchMap}});var h80=qN();Object.defineProperty(U,"switchMapTo",{enumerable:!0,get:function(){return h80.switchMapTo}});var b80=EN();Object.defineProperty(U,"switchScan",{enumerable:!0,get:function(){return b80.switchScan}});var u80=tF();Object.defineProperty(U,"take",{enumerable:!0,get:function(){return u80.take}});var m80=aY();Object.defineProperty(U,"takeLast",{enumerable:!0,get:function(){return m80.takeLast}});var l80=UN();Object.defineProperty(U,"takeUntil",{enumerable:!0,get:function(){return l80.takeUntil}});var p80=MN();Object.defineProperty(U,"takeWhile",{enumerable:!0,get:function(){return p80.takeWhile}});var d80=RN();Object.defineProperty(U,"tap",{enumerable:!0,get:function(){return d80.tap}});var c80=eY();Object.defineProperty(U,"throttle",{enumerable:!0,get:function(){return c80.throttle}});var n80=IN();Object.defineProperty(U,"throttleTime",{enumerable:!0,get:function(){return n80.throttleTime}});var i80=eF();Object.defineProperty(U,"throwIfEmpty",{enumerable:!0,get:function(){return i80.throwIfEmpty}});var a80=yN();Object.defineProperty(U,"timeInterval",{enumerable:!0,get:function(){return a80.timeInterval}});var o80=H7();Object.defineProperty(U,"timeout",{enumerable:!0,get:function(){return o80.timeout}});var s80=fN();Object.defineProperty(U,"timeoutWith",{enumerable:!0,get:function(){return s80.timeoutWith}});var r80=bN();Object.defineProperty(U,"timestamp",{enumerable:!0,get:function(){return r80.timestamp}});var t80=gY();Object.defineProperty(U,"toArray",{enumerable:!0,get:function(){return t80.toArray}});var e80=dN();Object.defineProperty(U,"window",{enumerable:!0,get:function(){return e80.window}});var D60=nN();Object.defineProperty(U,"windowCount",{enumerable:!0,get:function(){return D60.windowCount}});var F60=sN();Object.defineProperty(U,"windowTime",{enumerable:!0,get:function(){return F60.windowTime}});var $60=eN();Object.defineProperty(U,"windowToggle",{enumerable:!0,get:function(){return $60.windowToggle}});var J60=JC();Object.defineProperty(U,"windowWhen",{enumerable:!0,get:function(){return J60.windowWhen}});var Q60=XC();Object.defineProperty(U,"withLatestFrom",{enumerable:!0,get:function(){return Q60.withLatestFrom}});var Y60=HC();Object.defineProperty(U,"zipAll",{enumerable:!0,get:function(){return Y60.zipAll}});var B60=KC();Object.defineProperty(U,"zipWith",{enumerable:!0,get:function(){return B60.zipWith}})});function X60(D,F){return{value:D,key:F||{}}}function ZD(D){let F=a0.fromEvent(D.input,"keypress",X60).pipe(a0.takeUntil(a0.fromEvent(D,"close"))).pipe(a0.filter(({key:$})=>$.name!=="enter"&&$.name!=="return"));return{line:a0.fromEvent(D,"line"),keypress:F,normalizedUpKey:F.pipe(a0.filter(({key:$})=>$.name==="up"||$.name==="k"||$.name==="p"&&$.ctrl),a0.share()),normalizedDownKey:F.pipe(a0.filter(({key:$})=>$.name==="down"||$.name==="j"||$.name==="n"&&$.ctrl),a0.share()),numberKey:F.pipe(a0.filter(($)=>$.value&&"123456789".includes($.value)),a0.map(($)=>Number($.value)),a0.share()),spaceKey:F.pipe(a0.filter(({key:$})=>$&&$.name==="space"),a0.share()),aKey:F.pipe(a0.filter(({key:$})=>$&&$.name==="a"),a0.share()),iKey:F.pipe(a0.filter(({key:$})=>$&&$.name==="i"),a0.share())}}var a0;var v8=P(()=>{a0=s($1(),1)});class Y8{constructor(D,F={}){let{isInfinite:$=!0}=F;this.lastIndex=0,this.screen=D,this.isInfinite=$}paginate(D,F,$){$||=7;let J=D.split(`
31
+ `):"",this.name="UnsubscriptionError",this.errors=$}})});var P8=z((wq)=>{Object.defineProperty(wq,"__esModule",{value:!0});wq.arrRemove=void 0;function gu(D,F){if(D){var $=D.indexOf(F);0<=$&&D.splice($,1)}}wq.arrRemove=gu});var F1=z((pD)=>{var jq=pD&&pD.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")},Pq=pD&&pD.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Iq=pD&&pD.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(pD,"__esModule",{value:!0});pD.isSubscription=pD.EMPTY_SUBSCRIPTION=pD.Subscription=void 0;var mF=S0(),uQ=bQ(),Sq=P8(),mQ=function(){function D(F){this.initialTeardown=F,this.closed=!1,this._parentage=null,this._finalizers=null}return D.prototype.unsubscribe=function(){var F,$,J,Q,Y;if(!this.closed){this.closed=!0;var B=this._parentage;if(B)if(this._parentage=null,Array.isArray(B))try{for(var X=jq(B),G=X.next();!G.done;G=X.next()){var H=G.value;H.remove(this)}}catch(L){F={error:L}}finally{try{if(G&&!G.done&&($=X.return))$.call(X)}finally{if(F)throw F.error}}else B.remove(this);var q=this.initialTeardown;if(mF.isFunction(q))try{q()}catch(L){Y=L instanceof uQ.UnsubscriptionError?L.errors:[L]}var K=this._finalizers;if(K){this._finalizers=null;try{for(var V=jq(K),E=V.next();!E.done;E=V.next()){var Z=E.value;try{kq(Z)}catch(L){if(Y=Y!==null&&Y!==void 0?Y:[],L instanceof uQ.UnsubscriptionError)Y=Iq(Iq([],Pq(Y)),Pq(L.errors));else Y.push(L)}}}catch(L){J={error:L}}finally{try{if(E&&!E.done&&(Q=V.return))Q.call(V)}finally{if(J)throw J.error}}}if(Y)throw new uQ.UnsubscriptionError(Y)}},D.prototype.add=function(F){var $;if(F&&F!==this)if(this.closed)kq(F);else{if(F instanceof D){if(F.closed||F._hasParent(this))return;F._addParent(this)}(this._finalizers=($=this._finalizers)!==null&&$!==void 0?$:[]).push(F)}},D.prototype._hasParent=function(F){var $=this._parentage;return $===F||Array.isArray($)&&$.includes(F)},D.prototype._addParent=function(F){var $=this._parentage;this._parentage=Array.isArray($)?($.push(F),$):$?[$,F]:F},D.prototype._removeParent=function(F){var $=this._parentage;if($===F)this._parentage=null;else if(Array.isArray($))Sq.arrRemove($,F)},D.prototype.remove=function(F){var $=this._finalizers;if($&&Sq.arrRemove($,F),F instanceof D)F._removeParent(this)},D.EMPTY=function(){var F=new D;return F.closed=!0,F}(),D}();pD.Subscription=mQ;pD.EMPTY_SUBSCRIPTION=mQ.EMPTY;function hu(D){return D instanceof mQ||D&&"closed"in D&&mF.isFunction(D.remove)&&mF.isFunction(D.add)&&mF.isFunction(D.unsubscribe)}pD.isSubscription=hu;function kq(D){if(mF.isFunction(D))D();else D.unsubscribe()}});var o4=z((vq)=>{Object.defineProperty(vq,"__esModule",{value:!0});vq.config=void 0;vq.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var lQ=z((D8)=>{var xq=D8&&D8.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},_q=D8&&D8.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(D8,"__esModule",{value:!0});D8.timeoutProvider=void 0;D8.timeoutProvider={setTimeout:function(D,F){var $=[];for(var J=2;J<arguments.length;J++)$[J-2]=arguments[J];var Q=D8.timeoutProvider.delegate;if(Q===null||Q===void 0?void 0:Q.setTimeout)return Q.setTimeout.apply(Q,_q([D,F],xq($)));return setTimeout.apply(void 0,_q([D,F],xq($)))},clearTimeout:function(D){var F=D8.timeoutProvider.delegate;return((F===null||F===void 0?void 0:F.clearTimeout)||clearTimeout)(D)},delegate:void 0}});var pQ=z((fq)=>{Object.defineProperty(fq,"__esModule",{value:!0});fq.reportUnhandledError=void 0;var bu=o4(),uu=lQ();function mu(D){uu.timeoutProvider.setTimeout(function(){var F=bu.config.onUnhandledError;if(F)F(D);else throw D})}fq.reportUnhandledError=mu});var zD=z((hq)=>{Object.defineProperty(hq,"__esModule",{value:!0});hq.noop=void 0;function lu(){}hq.noop=lu});var lq=z((uq)=>{Object.defineProperty(uq,"__esModule",{value:!0});uq.createNotification=uq.nextNotification=uq.errorNotification=uq.COMPLETE_NOTIFICATION=void 0;uq.COMPLETE_NOTIFICATION=function(){return t9("C",void 0,void 0)}();function pu(D){return t9("E",void 0,D)}uq.errorNotification=pu;function du(D){return t9("N",D,void 0)}uq.nextNotification=du;function t9(D,F,$){return{kind:D,value:F,error:$}}uq.createNotification=t9});var e9=z((dq)=>{Object.defineProperty(dq,"__esModule",{value:!0});dq.captureError=dq.errorContext=void 0;var pq=o4(),t6=null;function au(D){if(pq.config.useDeprecatedSynchronousErrorHandling){var F=!t6;if(F)t6={errorThrown:!1,error:null};if(D(),F){var $=t6,J=$.errorThrown,Q=$.error;if(t6=null,J)throw Q}}else D()}dq.errorContext=au;function ou(D){if(pq.config.useDeprecatedSynchronousErrorHandling&&t6)t6.errorThrown=!0,t6.error=D}dq.captureError=ou});var s4=z((P1)=>{var aq=P1&&P1.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(P1,"__esModule",{value:!0});P1.EMPTY_OBSERVER=P1.SafeSubscriber=P1.Subscriber=void 0;var ru=S0(),nq=F1(),iQ=o4(),tu=pQ(),iq=zD(),dQ=lq(),eu=lQ(),Dm=e9(),oq=function(D){aq(F,D);function F($){var J=D.call(this)||this;if(J.isStopped=!1,$){if(J.destination=$,nq.isSubscription($))$.add(J)}else J.destination=P1.EMPTY_OBSERVER;return J}return F.create=function($,J,Q){return new sq($,J,Q)},F.prototype.next=function($){if(this.isStopped)nQ(dQ.nextNotification($),this);else this._next($)},F.prototype.error=function($){if(this.isStopped)nQ(dQ.errorNotification($),this);else this.isStopped=!0,this._error($)},F.prototype.complete=function(){if(this.isStopped)nQ(dQ.COMPLETE_NOTIFICATION,this);else this.isStopped=!0,this._complete()},F.prototype.unsubscribe=function(){if(!this.closed)this.isStopped=!0,D.prototype.unsubscribe.call(this),this.destination=null},F.prototype._next=function($){this.destination.next($)},F.prototype._error=function($){try{this.destination.error($)}finally{this.unsubscribe()}},F.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},F}(nq.Subscription);P1.Subscriber=oq;var Fm=Function.prototype.bind;function cQ(D,F){return Fm.call(D,F)}var $m=function(){function D(F){this.partialObserver=F}return D.prototype.next=function(F){var $=this.partialObserver;if($.next)try{$.next(F)}catch(J){D7(J)}},D.prototype.error=function(F){var $=this.partialObserver;if($.error)try{$.error(F)}catch(J){D7(J)}else D7(F)},D.prototype.complete=function(){var F=this.partialObserver;if(F.complete)try{F.complete()}catch($){D7($)}},D}(),sq=function(D){aq(F,D);function F($,J,Q){var Y=D.call(this)||this,B;if(ru.isFunction($)||!$)B={next:$!==null&&$!==void 0?$:void 0,error:J!==null&&J!==void 0?J:void 0,complete:Q!==null&&Q!==void 0?Q:void 0};else{var X;if(Y&&iQ.config.useDeprecatedNextContext)X=Object.create($),X.unsubscribe=function(){return Y.unsubscribe()},B={next:$.next&&cQ($.next,X),error:$.error&&cQ($.error,X),complete:$.complete&&cQ($.complete,X)};else B=$}return Y.destination=new $m(B),Y}return F}(oq);P1.SafeSubscriber=sq;function D7(D){if(iQ.config.useDeprecatedSynchronousErrorHandling)Dm.captureError(D);else tu.reportUnhandledError(D)}function Jm(D){throw D}function nQ(D,F){var $=iQ.config.onStoppedNotification;$&&eu.timeoutProvider.setTimeout(function(){return $(D,F)})}P1.EMPTY_OBSERVER={closed:!0,next:iq.noop,error:Jm,complete:iq.noop}});var lF=z((rq)=>{Object.defineProperty(rq,"__esModule",{value:!0});rq.observable=void 0;rq.observable=function(){return typeof Symbol==="function"&&Symbol.observable||"@@observable"}()});var ED=z((eq)=>{Object.defineProperty(eq,"__esModule",{value:!0});eq.identity=void 0;function Qm(D){return D}eq.identity=Qm});var pF=z(($K)=>{Object.defineProperty($K,"__esModule",{value:!0});$K.pipeFromArray=$K.pipe=void 0;var Ym=ED();function Bm(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return FK(D)}$K.pipe=Bm;function FK(D){if(D.length===0)return Ym.identity;if(D.length===1)return D[0];return function($){return D.reduce(function(J,Q){return Q(J)},$)}}$K.pipeFromArray=FK});var v0=z((YK)=>{Object.defineProperty(YK,"__esModule",{value:!0});YK.Observable=void 0;var oQ=s4(),Gm=F1(),Wm=lF(),Hm=pF(),qm=o4(),aQ=S0(),Km=e9(),zm=function(){function D(F){if(F)this._subscribe=F}return D.prototype.lift=function(F){var $=new D;return $.source=this,$.operator=F,$},D.prototype.subscribe=function(F,$,J){var Q=this,Y=Vm(F)?F:new oQ.SafeSubscriber(F,$,J);return Km.errorContext(function(){var B=Q,X=B.operator,G=B.source;Y.add(X?X.call(Y,G):G?Q._subscribe(Y):Q._trySubscribe(Y))}),Y},D.prototype._trySubscribe=function(F){try{return this._subscribe(F)}catch($){F.error($)}},D.prototype.forEach=function(F,$){var J=this;return $=QK($),new $(function(Q,Y){var B=new oQ.SafeSubscriber({next:function(X){try{F(X)}catch(G){Y(G),B.unsubscribe()}},error:Y,complete:Q});J.subscribe(B)})},D.prototype._subscribe=function(F){var $;return($=this.source)===null||$===void 0?void 0:$.subscribe(F)},D.prototype[Wm.observable]=function(){return this},D.prototype.pipe=function(){var F=[];for(var $=0;$<arguments.length;$++)F[$]=arguments[$];return Hm.pipeFromArray(F)(this)},D.prototype.toPromise=function(F){var $=this;return F=QK(F),new F(function(J,Q){var Y;$.subscribe(function(B){return Y=B},function(B){return Q(B)},function(){return J(Y)})})},D.create=function(F){return new D(F)},D}();YK.Observable=zm;function QK(D){var F;return(F=D!==null&&D!==void 0?D:qm.config.Promise)!==null&&F!==void 0?F:Promise}function Em(D){return D&&aQ.isFunction(D.next)&&aQ.isFunction(D.error)&&aQ.isFunction(D.complete)}function Vm(D){return D&&D instanceof oQ.Subscriber||Em(D)&&Gm.isSubscription(D)}});var x=z((GK)=>{Object.defineProperty(GK,"__esModule",{value:!0});GK.operate=GK.hasLift=void 0;var Zm=S0();function XK(D){return Zm.isFunction(D===null||D===void 0?void 0:D.lift)}GK.hasLift=XK;function Um(D){return function(F){if(XK(F))return F.lift(function($){try{return D($,this)}catch(J){this.error(J)}});throw TypeError("Unable to lift unknown Observable type")}}GK.operate=Um});var l=z(($6)=>{var Am=$6&&$6.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty($6,"__esModule",{value:!0});$6.OperatorSubscriber=$6.createOperatorSubscriber=void 0;var Mm=s4();function Nm(D,F,$,J,Q){return new HK(D,F,$,J,Q)}$6.createOperatorSubscriber=Nm;var HK=function(D){Am(F,D);function F($,J,Q,Y,B,X){var G=D.call(this,$)||this;return G.onFinalize=B,G.shouldUnsubscribe=X,G._next=J?function(H){try{J(H)}catch(q){$.error(q)}}:D.prototype._next,G._error=Y?function(H){try{Y(H)}catch(q){$.error(q)}finally{this.unsubscribe()}}:D.prototype._error,G._complete=Q?function(){try{Q()}catch(H){$.error(H)}finally{this.unsubscribe()}}:D.prototype._complete,G}return F.prototype.unsubscribe=function(){var $;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var J=this.closed;D.prototype.unsubscribe.call(this),!J&&(($=this.onFinalize)===null||$===void 0||$.call(this))}},F}(Mm.Subscriber);$6.OperatorSubscriber=HK});var sQ=z((qK)=>{Object.defineProperty(qK,"__esModule",{value:!0});qK.refCount=void 0;var Cm=x(),Rm=l();function Om(){return Cm.operate(function(D,F){var $=null;D._refCount++;var J=Rm.createOperatorSubscriber(F,void 0,void 0,void 0,function(){if(!D||D._refCount<=0||0<--D._refCount){$=null;return}var Q=D._connection,Y=$;if($=null,Q&&(!Y||Q===Y))Q.unsubscribe();F.unsubscribe()});if(D.subscribe(J),!J.closed)$=D.connect()})}qK.refCount=Om});var dF=z((r4)=>{var wm=r4&&r4.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(r4,"__esModule",{value:!0});r4.ConnectableObservable=void 0;var Tm=v0(),zK=F1(),jm=sQ(),Pm=l(),Im=x(),Sm=function(D){wm(F,D);function F($,J){var Q=D.call(this)||this;if(Q.source=$,Q.subjectFactory=J,Q._subject=null,Q._refCount=0,Q._connection=null,Im.hasLift($))Q.lift=$.lift;return Q}return F.prototype._subscribe=function($){return this.getSubject().subscribe($)},F.prototype.getSubject=function(){var $=this._subject;if(!$||$.isStopped)this._subject=this.subjectFactory();return this._subject},F.prototype._teardown=function(){this._refCount=0;var $=this._connection;this._subject=this._connection=null,$===null||$===void 0||$.unsubscribe()},F.prototype.connect=function(){var $=this,J=this._connection;if(!J){J=this._connection=new zK.Subscription;var Q=this.getSubject();if(J.add(this.source.subscribe(Pm.createOperatorSubscriber(Q,void 0,function(){$._teardown(),Q.complete()},function(Y){$._teardown(),Q.error(Y)},function(){return $._teardown()}))),J.closed)this._connection=null,J=zK.Subscription.EMPTY}return J},F.prototype.refCount=function(){return jm.refCount()(this)},F}(Tm.Observable);r4.ConnectableObservable=Sm});var VK=z((EK)=>{Object.defineProperty(EK,"__esModule",{value:!0});EK.performanceTimestampProvider=void 0;EK.performanceTimestampProvider={now:function(){return(EK.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var tQ=z((I1)=>{var ZK=I1&&I1.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},UK=I1&&I1.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(I1,"__esModule",{value:!0});I1.animationFrameProvider=void 0;var km=F1();I1.animationFrameProvider={schedule:function(D){var F=requestAnimationFrame,$=cancelAnimationFrame,J=I1.animationFrameProvider.delegate;if(J)F=J.requestAnimationFrame,$=J.cancelAnimationFrame;var Q=F(function(Y){$=void 0,D(Y)});return new km.Subscription(function(){return $===null||$===void 0?void 0:$(Q)})},requestAnimationFrame:function(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=I1.animationFrameProvider.delegate;return(($===null||$===void 0?void 0:$.requestAnimationFrame)||requestAnimationFrame).apply(void 0,UK([],ZK(D)))},cancelAnimationFrame:function(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=I1.animationFrameProvider.delegate;return(($===null||$===void 0?void 0:$.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,UK([],ZK(D)))},delegate:void 0}});var CK=z((MK)=>{Object.defineProperty(MK,"__esModule",{value:!0});MK.animationFrames=void 0;var vm=v0(),ym=VK(),LK=tQ();function xm(D){return D?AK(D):_m}MK.animationFrames=xm;function AK(D){return new vm.Observable(function(F){var $=D||ym.performanceTimestampProvider,J=$.now(),Q=0,Y=function(){if(!F.closed)Q=LK.animationFrameProvider.requestAnimationFrame(function(B){Q=0;var X=$.now();F.next({timestamp:D?X:B,elapsed:X-J}),Y()})};return Y(),function(){if(Q)LK.animationFrameProvider.cancelAnimationFrame(Q)}})}var _m=AK()});var eQ=z((RK)=>{Object.defineProperty(RK,"__esModule",{value:!0});RK.ObjectUnsubscribedError=void 0;var fm=F6();RK.ObjectUnsubscribedError=fm.createErrorClass(function(D){return function(){D(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var VD=z((F8)=>{var TK=F8&&F8.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}(),gm=F8&&F8.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(F8,"__esModule",{value:!0});F8.AnonymousSubject=F8.Subject=void 0;var wK=v0(),FY=F1(),hm=eQ(),bm=P8(),DY=e9(),jK=function(D){TK(F,D);function F(){var $=D.call(this)||this;return $.closed=!1,$.currentObservers=null,$.observers=[],$.isStopped=!1,$.hasError=!1,$.thrownError=null,$}return F.prototype.lift=function($){var J=new $Y(this,this);return J.operator=$,J},F.prototype._throwIfClosed=function(){if(this.closed)throw new hm.ObjectUnsubscribedError},F.prototype.next=function($){var J=this;DY.errorContext(function(){var Q,Y;if(J._throwIfClosed(),!J.isStopped){if(!J.currentObservers)J.currentObservers=Array.from(J.observers);try{for(var B=gm(J.currentObservers),X=B.next();!X.done;X=B.next()){var G=X.value;G.next($)}}catch(H){Q={error:H}}finally{try{if(X&&!X.done&&(Y=B.return))Y.call(B)}finally{if(Q)throw Q.error}}}})},F.prototype.error=function($){var J=this;DY.errorContext(function(){if(J._throwIfClosed(),!J.isStopped){J.hasError=J.isStopped=!0,J.thrownError=$;var Q=J.observers;while(Q.length)Q.shift().error($)}})},F.prototype.complete=function(){var $=this;DY.errorContext(function(){if($._throwIfClosed(),!$.isStopped){$.isStopped=!0;var J=$.observers;while(J.length)J.shift().complete()}})},F.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(F.prototype,"observed",{get:function(){var $;return(($=this.observers)===null||$===void 0?void 0:$.length)>0},enumerable:!1,configurable:!0}),F.prototype._trySubscribe=function($){return this._throwIfClosed(),D.prototype._trySubscribe.call(this,$)},F.prototype._subscribe=function($){return this._throwIfClosed(),this._checkFinalizedStatuses($),this._innerSubscribe($)},F.prototype._innerSubscribe=function($){var J=this,Q=this,Y=Q.hasError,B=Q.isStopped,X=Q.observers;if(Y||B)return FY.EMPTY_SUBSCRIPTION;return this.currentObservers=null,X.push($),new FY.Subscription(function(){J.currentObservers=null,bm.arrRemove(X,$)})},F.prototype._checkFinalizedStatuses=function($){var J=this,Q=J.hasError,Y=J.thrownError,B=J.isStopped;if(Q)$.error(Y);else if(B)$.complete()},F.prototype.asObservable=function(){var $=new wK.Observable;return $.source=this,$},F.create=function($,J){return new $Y($,J)},F}(wK.Observable);F8.Subject=jK;var $Y=function(D){TK(F,D);function F($,J){var Q=D.call(this)||this;return Q.destination=$,Q.source=J,Q}return F.prototype.next=function($){var J,Q;(Q=(J=this.destination)===null||J===void 0?void 0:J.next)===null||Q===void 0||Q.call(J,$)},F.prototype.error=function($){var J,Q;(Q=(J=this.destination)===null||J===void 0?void 0:J.error)===null||Q===void 0||Q.call(J,$)},F.prototype.complete=function(){var $,J;(J=($=this.destination)===null||$===void 0?void 0:$.complete)===null||J===void 0||J.call($)},F.prototype._subscribe=function($){var J,Q;return(Q=(J=this.source)===null||J===void 0?void 0:J.subscribe($))!==null&&Q!==void 0?Q:FY.EMPTY_SUBSCRIPTION},F}(jK);F8.AnonymousSubject=$Y});var JY=z((t4)=>{var um=t4&&t4.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(t4,"__esModule",{value:!0});t4.BehaviorSubject=void 0;var mm=VD(),lm=function(D){um(F,D);function F($){var J=D.call(this)||this;return J._value=$,J}return Object.defineProperty(F.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),F.prototype._subscribe=function($){var J=D.prototype._subscribe.call(this,$);return!J.closed&&$.next(this._value),J},F.prototype.getValue=function(){var $=this,J=$.hasError,Q=$.thrownError,Y=$._value;if(J)throw Q;return this._throwIfClosed(),Y},F.prototype.next=function($){D.prototype.next.call(this,this._value=$)},F}(mm.Subject);t4.BehaviorSubject=lm});var F7=z((PK)=>{Object.defineProperty(PK,"__esModule",{value:!0});PK.dateTimestampProvider=void 0;PK.dateTimestampProvider={now:function(){return(PK.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var $7=z((e4)=>{var pm=e4&&e4.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(e4,"__esModule",{value:!0});e4.ReplaySubject=void 0;var dm=VD(),cm=F7(),nm=function(D){pm(F,D);function F($,J,Q){if($===void 0)$=1/0;if(J===void 0)J=1/0;if(Q===void 0)Q=cm.dateTimestampProvider;var Y=D.call(this)||this;return Y._bufferSize=$,Y._windowTime=J,Y._timestampProvider=Q,Y._buffer=[],Y._infiniteTimeWindow=!0,Y._infiniteTimeWindow=J===1/0,Y._bufferSize=Math.max(1,$),Y._windowTime=Math.max(1,J),Y}return F.prototype.next=function($){var J=this,Q=J.isStopped,Y=J._buffer,B=J._infiniteTimeWindow,X=J._timestampProvider,G=J._windowTime;if(!Q)Y.push($),!B&&Y.push(X.now()+G);this._trimBuffer(),D.prototype.next.call(this,$)},F.prototype._subscribe=function($){this._throwIfClosed(),this._trimBuffer();var J=this._innerSubscribe($),Q=this,Y=Q._infiniteTimeWindow,B=Q._buffer,X=B.slice();for(var G=0;G<X.length&&!$.closed;G+=Y?1:2)$.next(X[G]);return this._checkFinalizedStatuses($),J},F.prototype._trimBuffer=function(){var $=this,J=$._bufferSize,Q=$._timestampProvider,Y=$._buffer,B=$._infiniteTimeWindow,X=(B?1:2)*J;if(J<1/0&&X<Y.length&&Y.splice(0,Y.length-X),!B){var G=Q.now(),H=0;for(var q=1;q<Y.length&&Y[q]<=G;q+=2)H=q;H&&Y.splice(0,H+1)}},F}(dm.Subject);e4.ReplaySubject=nm});var J7=z((D3)=>{var im=D3&&D3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(D3,"__esModule",{value:!0});D3.AsyncSubject=void 0;var am=VD(),om=function(D){im(F,D);function F(){var $=D!==null&&D.apply(this,arguments)||this;return $._value=null,$._hasValue=!1,$._isComplete=!1,$}return F.prototype._checkFinalizedStatuses=function($){var J=this,Q=J.hasError,Y=J._hasValue,B=J._value,X=J.thrownError,G=J.isStopped,H=J._isComplete;if(Q)$.error(X);else if(G||H)Y&&$.next(B),$.complete()},F.prototype.next=function($){if(!this.isStopped)this._value=$,this._hasValue=!0},F.prototype.complete=function(){var $=this,J=$._hasValue,Q=$._value,Y=$._isComplete;if(!Y)this._isComplete=!0,J&&D.prototype.next.call(this,Q),D.prototype.complete.call(this)},F}(am.Subject);D3.AsyncSubject=om});var IK=z((F3)=>{var sm=F3&&F3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(F3,"__esModule",{value:!0});F3.Action=void 0;var rm=F1(),tm=function(D){sm(F,D);function F($,J){return D.call(this)||this}return F.prototype.schedule=function($,J){if(J===void 0)J=0;return this},F}(rm.Subscription);F3.Action=tm});var vK=z(($8)=>{var SK=$8&&$8.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},kK=$8&&$8.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty($8,"__esModule",{value:!0});$8.intervalProvider=void 0;$8.intervalProvider={setInterval:function(D,F){var $=[];for(var J=2;J<arguments.length;J++)$[J-2]=arguments[J];var Q=$8.intervalProvider.delegate;if(Q===null||Q===void 0?void 0:Q.setInterval)return Q.setInterval.apply(Q,kK([D,F],SK($)));return setInterval.apply(void 0,kK([D,F],SK($)))},clearInterval:function(D){var F=$8.intervalProvider.delegate;return((F===null||F===void 0?void 0:F.clearInterval)||clearInterval)(D)},delegate:void 0}});var J3=z(($3)=>{var em=$3&&$3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty($3,"__esModule",{value:!0});$3.AsyncAction=void 0;var Dl=IK(),yK=vK(),Fl=P8(),$l=function(D){em(F,D);function F($,J){var Q=D.call(this,$,J)||this;return Q.scheduler=$,Q.work=J,Q.pending=!1,Q}return F.prototype.schedule=function($,J){var Q;if(J===void 0)J=0;if(this.closed)return this;this.state=$;var Y=this.id,B=this.scheduler;if(Y!=null)this.id=this.recycleAsyncId(B,Y,J);return this.pending=!0,this.delay=J,this.id=(Q=this.id)!==null&&Q!==void 0?Q:this.requestAsyncId(B,this.id,J),this},F.prototype.requestAsyncId=function($,J,Q){if(Q===void 0)Q=0;return yK.intervalProvider.setInterval($.flush.bind($,this),Q)},F.prototype.recycleAsyncId=function($,J,Q){if(Q===void 0)Q=0;if(Q!=null&&this.delay===Q&&this.pending===!1)return J;if(J!=null)yK.intervalProvider.clearInterval(J);return},F.prototype.execute=function($,J){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var Q=this._execute($,J);if(Q)return Q;else if(this.pending===!1&&this.id!=null)this.id=this.recycleAsyncId(this.scheduler,this.id,null)},F.prototype._execute=function($,J){var Q=!1,Y;try{this.work($)}catch(B){Q=!0,Y=B?B:Error("Scheduled action threw falsy error")}if(Q)return this.unsubscribe(),Y},F.prototype.unsubscribe=function(){if(!this.closed){var $=this,J=$.id,Q=$.scheduler,Y=Q.actions;if(this.work=this.state=this.scheduler=null,this.pending=!1,Fl.arrRemove(Y,this),J!=null)this.id=this.recycleAsyncId(Q,J,null);this.delay=null,D.prototype.unsubscribe.call(this)}},F}(Dl.Action);$3.AsyncAction=$l});var gK=z((_K)=>{Object.defineProperty(_K,"__esModule",{value:!0});_K.TestTools=_K.Immediate=void 0;var Jl=1,YY,Q7={};function xK(D){if(D in Q7)return delete Q7[D],!0;return!1}_K.Immediate={setImmediate:function(D){var F=Jl++;if(Q7[F]=!0,!YY)YY=Promise.resolve();return YY.then(function(){return xK(F)&&D()}),F},clearImmediate:function(D){xK(D)}};_K.TestTools={pending:function(){return Object.keys(Q7).length}}});var bK=z((J8)=>{var Yl=J8&&J8.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Bl=J8&&J8.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(J8,"__esModule",{value:!0});J8.immediateProvider=void 0;var hK=gK(),Xl=hK.Immediate.setImmediate,Gl=hK.Immediate.clearImmediate;J8.immediateProvider={setImmediate:function(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=J8.immediateProvider.delegate;return(($===null||$===void 0?void 0:$.setImmediate)||Xl).apply(void 0,Bl([],Yl(D)))},clearImmediate:function(D){var F=J8.immediateProvider.delegate;return((F===null||F===void 0?void 0:F.clearImmediate)||Gl)(D)},delegate:void 0}});var mK=z((Q3)=>{var Wl=Q3&&Q3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(Q3,"__esModule",{value:!0});Q3.AsapAction=void 0;var Hl=J3(),uK=bK(),ql=function(D){Wl(F,D);function F($,J){var Q=D.call(this,$,J)||this;return Q.scheduler=$,Q.work=J,Q}return F.prototype.requestAsyncId=function($,J,Q){if(Q===void 0)Q=0;if(Q!==null&&Q>0)return D.prototype.requestAsyncId.call(this,$,J,Q);return $.actions.push(this),$._scheduled||($._scheduled=uK.immediateProvider.setImmediate($.flush.bind($,void 0)))},F.prototype.recycleAsyncId=function($,J,Q){var Y;if(Q===void 0)Q=0;if(Q!=null?Q>0:this.delay>0)return D.prototype.recycleAsyncId.call(this,$,J,Q);var B=$.actions;if(J!=null&&((Y=B[B.length-1])===null||Y===void 0?void 0:Y.id)!==J){if(uK.immediateProvider.clearImmediate(J),$._scheduled===J)$._scheduled=void 0}return},F}(Hl.AsyncAction);Q3.AsapAction=ql});var BY=z((lK)=>{Object.defineProperty(lK,"__esModule",{value:!0});lK.Scheduler=void 0;var Kl=F7(),zl=function(){function D(F,$){if($===void 0)$=D.now;this.schedulerActionCtor=F,this.now=$}return D.prototype.schedule=function(F,$,J){if($===void 0)$=0;return new this.schedulerActionCtor(this,F).schedule(J,$)},D.now=Kl.dateTimestampProvider.now,D}();lK.Scheduler=zl});var B3=z((Y3)=>{var El=Y3&&Y3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(Y3,"__esModule",{value:!0});Y3.AsyncScheduler=void 0;var dK=BY(),Vl=function(D){El(F,D);function F($,J){if(J===void 0)J=dK.Scheduler.now;var Q=D.call(this,$,J)||this;return Q.actions=[],Q._active=!1,Q}return F.prototype.flush=function($){var J=this.actions;if(this._active){J.push($);return}var Q;this._active=!0;do if(Q=$.execute($.state,$.delay))break;while($=J.shift());if(this._active=!1,Q){while($=J.shift())$.unsubscribe();throw Q}},F}(dK.Scheduler);Y3.AsyncScheduler=Vl});var cK=z((X3)=>{var Zl=X3&&X3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(X3,"__esModule",{value:!0});X3.AsapScheduler=void 0;var Ul=B3(),Ll=function(D){Zl(F,D);function F(){return D!==null&&D.apply(this,arguments)||this}return F.prototype.flush=function($){this._active=!0;var J=this._scheduled;this._scheduled=void 0;var Q=this.actions,Y;$=$||Q.shift();do if(Y=$.execute($.state,$.delay))break;while(($=Q[0])&&$.id===J&&Q.shift());if(this._active=!1,Y){while(($=Q[0])&&$.id===J&&Q.shift())$.unsubscribe();throw Y}},F}(Ul.AsyncScheduler);X3.AsapScheduler=Ll});var oK=z((nK)=>{Object.defineProperty(nK,"__esModule",{value:!0});nK.asap=nK.asapScheduler=void 0;var Al=mK(),Ml=cK();nK.asapScheduler=new Ml.AsapScheduler(Al.AsapAction);nK.asap=nK.asapScheduler});var dD=z((sK)=>{Object.defineProperty(sK,"__esModule",{value:!0});sK.async=sK.asyncScheduler=void 0;var Nl=J3(),Cl=B3();sK.asyncScheduler=new Cl.AsyncScheduler(Nl.AsyncAction);sK.async=sK.asyncScheduler});var eK=z((G3)=>{var Rl=G3&&G3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(G3,"__esModule",{value:!0});G3.QueueAction=void 0;var Ol=J3(),wl=function(D){Rl(F,D);function F($,J){var Q=D.call(this,$,J)||this;return Q.scheduler=$,Q.work=J,Q}return F.prototype.schedule=function($,J){if(J===void 0)J=0;if(J>0)return D.prototype.schedule.call(this,$,J);return this.delay=J,this.state=$,this.scheduler.flush(this),this},F.prototype.execute=function($,J){return J>0||this.closed?D.prototype.execute.call(this,$,J):this._execute($,J)},F.prototype.requestAsyncId=function($,J,Q){if(Q===void 0)Q=0;if(Q!=null&&Q>0||Q==null&&this.delay>0)return D.prototype.requestAsyncId.call(this,$,J,Q);return $.flush(this),0},F}(Ol.AsyncAction);G3.QueueAction=wl});var Dz=z((W3)=>{var Tl=W3&&W3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(W3,"__esModule",{value:!0});W3.QueueScheduler=void 0;var jl=B3(),Pl=function(D){Tl(F,D);function F(){return D!==null&&D.apply(this,arguments)||this}return F}(jl.AsyncScheduler);W3.QueueScheduler=Pl});var Qz=z((Fz)=>{Object.defineProperty(Fz,"__esModule",{value:!0});Fz.queue=Fz.queueScheduler=void 0;var Il=eK(),Sl=Dz();Fz.queueScheduler=new Sl.QueueScheduler(Il.QueueAction);Fz.queue=Fz.queueScheduler});var Bz=z((H3)=>{var kl=H3&&H3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(H3,"__esModule",{value:!0});H3.AnimationFrameAction=void 0;var vl=J3(),Yz=tQ(),yl=function(D){kl(F,D);function F($,J){var Q=D.call(this,$,J)||this;return Q.scheduler=$,Q.work=J,Q}return F.prototype.requestAsyncId=function($,J,Q){if(Q===void 0)Q=0;if(Q!==null&&Q>0)return D.prototype.requestAsyncId.call(this,$,J,Q);return $.actions.push(this),$._scheduled||($._scheduled=Yz.animationFrameProvider.requestAnimationFrame(function(){return $.flush(void 0)}))},F.prototype.recycleAsyncId=function($,J,Q){var Y;if(Q===void 0)Q=0;if(Q!=null?Q>0:this.delay>0)return D.prototype.recycleAsyncId.call(this,$,J,Q);var B=$.actions;if(J!=null&&J===$._scheduled&&((Y=B[B.length-1])===null||Y===void 0?void 0:Y.id)!==J)Yz.animationFrameProvider.cancelAnimationFrame(J),$._scheduled=void 0;return},F}(vl.AsyncAction);H3.AnimationFrameAction=yl});var Xz=z((q3)=>{var xl=q3&&q3.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(q3,"__esModule",{value:!0});q3.AnimationFrameScheduler=void 0;var _l=B3(),fl=function(D){xl(F,D);function F(){return D!==null&&D.apply(this,arguments)||this}return F.prototype.flush=function($){this._active=!0;var J;if($)J=$.id;else J=this._scheduled,this._scheduled=void 0;var Q=this.actions,Y;$=$||Q.shift();do if(Y=$.execute($.state,$.delay))break;while(($=Q[0])&&$.id===J&&Q.shift());if(this._active=!1,Y){while(($=Q[0])&&$.id===J&&Q.shift())$.unsubscribe();throw Y}},F}(_l.AsyncScheduler);q3.AnimationFrameScheduler=fl});var qz=z((Gz)=>{Object.defineProperty(Gz,"__esModule",{value:!0});Gz.animationFrame=Gz.animationFrameScheduler=void 0;var gl=Bz(),hl=Xz();Gz.animationFrameScheduler=new hl.AnimationFrameScheduler(gl.AnimationFrameAction);Gz.animationFrame=Gz.animationFrameScheduler});var Ez=z((J6)=>{var Kz=J6&&J6.__extends||function(){var D=function(F,$){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Q){J.__proto__=Q}||function(J,Q){for(var Y in Q)if(Object.prototype.hasOwnProperty.call(Q,Y))J[Y]=Q[Y]},D(F,$)};return function(F,$){if(typeof $!=="function"&&$!==null)throw TypeError("Class extends value "+String($)+" is not a constructor or null");D(F,$);function J(){this.constructor=F}F.prototype=$===null?Object.create($):(J.prototype=$.prototype,new J)}}();Object.defineProperty(J6,"__esModule",{value:!0});J6.VirtualAction=J6.VirtualTimeScheduler=void 0;var bl=J3(),ul=F1(),ml=B3(),ll=function(D){Kz(F,D);function F($,J){if($===void 0)$=zz;if(J===void 0)J=1/0;var Q=D.call(this,$,function(){return Q.frame})||this;return Q.maxFrames=J,Q.frame=0,Q.index=-1,Q}return F.prototype.flush=function(){var $=this,J=$.actions,Q=$.maxFrames,Y,B;while((B=J[0])&&B.delay<=Q)if(J.shift(),this.frame=B.delay,Y=B.execute(B.state,B.delay))break;if(Y){while(B=J.shift())B.unsubscribe();throw Y}},F.frameTimeFactor=10,F}(ml.AsyncScheduler);J6.VirtualTimeScheduler=ll;var zz=function(D){Kz(F,D);function F($,J,Q){if(Q===void 0)Q=$.index+=1;var Y=D.call(this,$,J)||this;return Y.scheduler=$,Y.work=J,Y.index=Q,Y.active=!0,Y.index=$.index=Q,Y}return F.prototype.schedule=function($,J){if(J===void 0)J=0;if(Number.isFinite(J)){if(!this.id)return D.prototype.schedule.call(this,$,J);this.active=!1;var Q=new F(this.scheduler,this.work);return this.add(Q),Q.schedule($,J)}else return ul.Subscription.EMPTY},F.prototype.requestAsyncId=function($,J,Q){if(Q===void 0)Q=0;this.delay=$.frame+Q;var Y=$.actions;return Y.push(this),Y.sort(F.sortActions),1},F.prototype.recycleAsyncId=function($,J,Q){if(Q===void 0)Q=0;return},F.prototype._execute=function($,J){if(this.active===!0)return D.prototype._execute.call(this,$,J)},F.sortActions=function($,J){if($.delay===J.delay)if($.index===J.index)return 0;else if($.index>J.index)return 1;else return-1;else if($.delay>J.delay)return 1;else return-1},F}(bl.AsyncAction);J6.VirtualAction=zz});var S1=z((Zz)=>{Object.defineProperty(Zz,"__esModule",{value:!0});Zz.empty=Zz.EMPTY=void 0;var Vz=v0();Zz.EMPTY=new Vz.Observable(function(D){return D.complete()});function pl(D){return D?dl(D):Zz.EMPTY}Zz.empty=pl;function dl(D){return new Vz.Observable(function(F){return D.schedule(function(){return F.complete()})})}});var cF=z((Az)=>{Object.defineProperty(Az,"__esModule",{value:!0});Az.isScheduler=void 0;var cl=S0();function nl(D){return D&&cl.isFunction(D.schedule)}Az.isScheduler=nl});var cD=z((Nz)=>{Object.defineProperty(Nz,"__esModule",{value:!0});Nz.popNumber=Nz.popScheduler=Nz.popResultSelector=void 0;var il=S0(),al=cF();function XY(D){return D[D.length-1]}function ol(D){return il.isFunction(XY(D))?D.pop():void 0}Nz.popResultSelector=ol;function sl(D){return al.isScheduler(XY(D))?D.pop():void 0}Nz.popScheduler=sl;function rl(D,F){return typeof XY(D)==="number"?D.pop():F}Nz.popNumber=rl});var Y7=z((Rz)=>{Object.defineProperty(Rz,"__esModule",{value:!0});Rz.isArrayLike=void 0;Rz.isArrayLike=function(D){return D&&typeof D.length==="number"&&typeof D!=="function"}});var GY=z((wz)=>{Object.defineProperty(wz,"__esModule",{value:!0});wz.isPromise=void 0;var Dp=S0();function Fp(D){return Dp.isFunction(D===null||D===void 0?void 0:D.then)}wz.isPromise=Fp});var WY=z((jz)=>{Object.defineProperty(jz,"__esModule",{value:!0});jz.isInteropObservable=void 0;var $p=lF(),Jp=S0();function Qp(D){return Jp.isFunction(D[$p.observable])}jz.isInteropObservable=Qp});var HY=z((Iz)=>{Object.defineProperty(Iz,"__esModule",{value:!0});Iz.isAsyncIterable=void 0;var Yp=S0();function Bp(D){return Symbol.asyncIterator&&Yp.isFunction(D===null||D===void 0?void 0:D[Symbol.asyncIterator])}Iz.isAsyncIterable=Bp});var qY=z((kz)=>{Object.defineProperty(kz,"__esModule",{value:!0});kz.createInvalidObservableTypeError=void 0;function Xp(D){return TypeError("You provided "+(D!==null&&typeof D==="object"?"an invalid object":"'"+D+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}kz.createInvalidObservableTypeError=Xp});var KY=z((xz)=>{Object.defineProperty(xz,"__esModule",{value:!0});xz.iterator=xz.getSymbolIterator=void 0;function yz(){if(typeof Symbol!=="function"||!Symbol.iterator)return"@@iterator";return Symbol.iterator}xz.getSymbolIterator=yz;xz.iterator=yz()});var zY=z((fz)=>{Object.defineProperty(fz,"__esModule",{value:!0});fz.isIterable=void 0;var Wp=KY(),Hp=S0();function qp(D){return Hp.isFunction(D===null||D===void 0?void 0:D[Wp.iterator])}fz.isIterable=qp});var B7=z((K1)=>{var Kp=K1&&K1.__generator||function(D,F){var $={label:0,sent:function(){if(Y[0]&1)throw Y[1];return Y[1]},trys:[],ops:[]},J,Q,Y,B;return B={next:X(0),throw:X(1),return:X(2)},typeof Symbol==="function"&&(B[Symbol.iterator]=function(){return this}),B;function X(H){return function(q){return G([H,q])}}function G(H){if(J)throw TypeError("Generator is already executing.");while($)try{if(J=1,Q&&(Y=H[0]&2?Q.return:H[0]?Q.throw||((Y=Q.return)&&Y.call(Q),0):Q.next)&&!(Y=Y.call(Q,H[1])).done)return Y;if(Q=0,Y)H=[H[0]&2,Y.value];switch(H[0]){case 0:case 1:Y=H;break;case 4:return $.label++,{value:H[1],done:!1};case 5:$.label++,Q=H[1],H=[0];continue;case 7:H=$.ops.pop(),$.trys.pop();continue;default:if((Y=$.trys,!(Y=Y.length>0&&Y[Y.length-1]))&&(H[0]===6||H[0]===2)){$=0;continue}if(H[0]===3&&(!Y||H[1]>Y[0]&&H[1]<Y[3])){$.label=H[1];break}if(H[0]===6&&$.label<Y[1]){$.label=Y[1],Y=H;break}if(Y&&$.label<Y[2]){$.label=Y[2],$.ops.push(H);break}if(Y[2])$.ops.pop();$.trys.pop();continue}H=F.call(D,$)}catch(q){H=[6,q],Q=0}finally{J=Y=0}if(H[0]&5)throw H[1];return{value:H[0]?H[1]:void 0,done:!0}}},K3=K1&&K1.__await||function(D){return this instanceof K3?(this.v=D,this):new K3(D)},zp=K1&&K1.__asyncGenerator||function(D,F,$){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var J=$.apply(D,F||[]),Q,Y=[];return Q={},B("next"),B("throw"),B("return"),Q[Symbol.asyncIterator]=function(){return this},Q;function B(V){if(J[V])Q[V]=function(E){return new Promise(function(Z,L){Y.push([V,E,Z,L])>1||X(V,E)})}}function X(V,E){try{G(J[V](E))}catch(Z){K(Y[0][3],Z)}}function G(V){V.value instanceof K3?Promise.resolve(V.value.v).then(H,q):K(Y[0][2],V)}function H(V){X("next",V)}function q(V){X("throw",V)}function K(V,E){if(V(E),Y.shift(),Y.length)X(Y[0][0],Y[0][1])}};Object.defineProperty(K1,"__esModule",{value:!0});K1.isReadableStreamLike=K1.readableStreamLikeToAsyncGenerator=void 0;var Ep=S0();function Vp(D){return zp(this,arguments,function(){var $,J,Q,Y;return Kp(this,function(B){switch(B.label){case 0:$=D.getReader(),B.label=1;case 1:B.trys.push([1,,9,10]),B.label=2;case 2:return[4,K3($.read())];case 3:if(J=B.sent(),Q=J.value,Y=J.done,!Y)return[3,5];return[4,K3(void 0)];case 4:return[2,B.sent()];case 5:return[4,K3(Q)];case 6:return[4,B.sent()];case 7:return B.sent(),[3,2];case 8:return[3,10];case 9:return $.releaseLock(),[7];case 10:return[2]}})})}K1.readableStreamLikeToAsyncGenerator=Vp;function Zp(D){return Ep.isFunction(D===null||D===void 0?void 0:D.getReader)}K1.isReadableStreamLike=Zp});var Y0=z((d0)=>{var Up=d0&&d0.__awaiter||function(D,F,$,J){function Q(Y){return Y instanceof $?Y:new $(function(B){B(Y)})}return new($||($=Promise))(function(Y,B){function X(q){try{H(J.next(q))}catch(K){B(K)}}function G(q){try{H(J.throw(q))}catch(K){B(K)}}function H(q){q.done?Y(q.value):Q(q.value).then(X,G)}H((J=J.apply(D,F||[])).next())})},Lp=d0&&d0.__generator||function(D,F){var $={label:0,sent:function(){if(Y[0]&1)throw Y[1];return Y[1]},trys:[],ops:[]},J,Q,Y,B;return B={next:X(0),throw:X(1),return:X(2)},typeof Symbol==="function"&&(B[Symbol.iterator]=function(){return this}),B;function X(H){return function(q){return G([H,q])}}function G(H){if(J)throw TypeError("Generator is already executing.");while($)try{if(J=1,Q&&(Y=H[0]&2?Q.return:H[0]?Q.throw||((Y=Q.return)&&Y.call(Q),0):Q.next)&&!(Y=Y.call(Q,H[1])).done)return Y;if(Q=0,Y)H=[H[0]&2,Y.value];switch(H[0]){case 0:case 1:Y=H;break;case 4:return $.label++,{value:H[1],done:!1};case 5:$.label++,Q=H[1],H=[0];continue;case 7:H=$.ops.pop(),$.trys.pop();continue;default:if((Y=$.trys,!(Y=Y.length>0&&Y[Y.length-1]))&&(H[0]===6||H[0]===2)){$=0;continue}if(H[0]===3&&(!Y||H[1]>Y[0]&&H[1]<Y[3])){$.label=H[1];break}if(H[0]===6&&$.label<Y[1]){$.label=Y[1],Y=H;break}if(Y&&$.label<Y[2]){$.label=Y[2],$.ops.push(H);break}if(Y[2])$.ops.pop();$.trys.pop();continue}H=F.call(D,$)}catch(q){H=[6,q],Q=0}finally{J=Y=0}if(H[0]&5)throw H[1];return{value:H[0]?H[1]:void 0,done:!0}}},Ap=d0&&d0.__asyncValues||function(D){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var F=D[Symbol.asyncIterator],$;return F?F.call(D):(D=typeof EY==="function"?EY(D):D[Symbol.iterator](),$={},J("next"),J("throw"),J("return"),$[Symbol.asyncIterator]=function(){return this},$);function J(Y){$[Y]=D[Y]&&function(B){return new Promise(function(X,G){B=D[Y](B),Q(X,G,B.done,B.value)})}}function Q(Y,B,X,G){Promise.resolve(G).then(function(H){Y({value:H,done:X})},B)}},EY=d0&&d0.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(d0,"__esModule",{value:!0});d0.fromReadableStreamLike=d0.fromAsyncIterable=d0.fromIterable=d0.fromPromise=d0.fromArrayLike=d0.fromInteropObservable=d0.innerFrom=void 0;var Mp=Y7(),Np=GY(),z3=v0(),Cp=WY(),Rp=HY(),Op=qY(),wp=zY(),hz=B7(),Tp=S0(),jp=pQ(),Pp=lF();function Ip(D){if(D instanceof z3.Observable)return D;if(D!=null){if(Cp.isInteropObservable(D))return bz(D);if(Mp.isArrayLike(D))return uz(D);if(Np.isPromise(D))return mz(D);if(Rp.isAsyncIterable(D))return VY(D);if(wp.isIterable(D))return lz(D);if(hz.isReadableStreamLike(D))return pz(D)}throw Op.createInvalidObservableTypeError(D)}d0.innerFrom=Ip;function bz(D){return new z3.Observable(function(F){var $=D[Pp.observable]();if(Tp.isFunction($.subscribe))return $.subscribe(F);throw TypeError("Provided object does not correctly implement Symbol.observable")})}d0.fromInteropObservable=bz;function uz(D){return new z3.Observable(function(F){for(var $=0;$<D.length&&!F.closed;$++)F.next(D[$]);F.complete()})}d0.fromArrayLike=uz;function mz(D){return new z3.Observable(function(F){D.then(function($){if(!F.closed)F.next($),F.complete()},function($){return F.error($)}).then(null,jp.reportUnhandledError)})}d0.fromPromise=mz;function lz(D){return new z3.Observable(function(F){var $,J;try{for(var Q=EY(D),Y=Q.next();!Y.done;Y=Q.next()){var B=Y.value;if(F.next(B),F.closed)return}}catch(X){$={error:X}}finally{try{if(Y&&!Y.done&&(J=Q.return))J.call(Q)}finally{if($)throw $.error}}F.complete()})}d0.fromIterable=lz;function VY(D){return new z3.Observable(function(F){Sp(D,F).catch(function($){return F.error($)})})}d0.fromAsyncIterable=VY;function pz(D){return VY(hz.readableStreamLikeToAsyncGenerator(D))}d0.fromReadableStreamLike=pz;function Sp(D,F){var $,J,Q,Y;return Up(this,void 0,void 0,function(){var B,X;return Lp(this,function(G){switch(G.label){case 0:G.trys.push([0,5,6,11]),$=Ap(D),G.label=1;case 1:return[4,$.next()];case 2:if(J=G.sent(),!!J.done)return[3,4];if(B=J.value,F.next(B),F.closed)return[2];G.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return X=G.sent(),Q={error:X},[3,11];case 6:if(G.trys.push([6,,9,10]),!(J&&!J.done&&(Y=$.return)))return[3,8];return[4,Y.call($)];case 7:G.sent(),G.label=8;case 8:return[3,10];case 9:if(Q)throw Q.error;return[7];case 10:return[7];case 11:return F.complete(),[2]}})})}});var I8=z((dz)=>{Object.defineProperty(dz,"__esModule",{value:!0});dz.executeSchedule=void 0;function kp(D,F,$,J,Q){if(J===void 0)J=0;if(Q===void 0)Q=!1;var Y=F.schedule(function(){if($(),Q)D.add(this.schedule(null,J));else this.unsubscribe()},J);if(D.add(Y),!Q)return Y}dz.executeSchedule=kp});var nF=z((nz)=>{Object.defineProperty(nz,"__esModule",{value:!0});nz.observeOn=void 0;var ZY=I8(),vp=x(),yp=l();function xp(D,F){if(F===void 0)F=0;return vp.operate(function($,J){$.subscribe(yp.createOperatorSubscriber(J,function(Q){return ZY.executeSchedule(J,D,function(){return J.next(Q)},F)},function(){return ZY.executeSchedule(J,D,function(){return J.complete()},F)},function(Q){return ZY.executeSchedule(J,D,function(){return J.error(Q)},F)}))})}nz.observeOn=xp});var iF=z((az)=>{Object.defineProperty(az,"__esModule",{value:!0});az.subscribeOn=void 0;var _p=x();function fp(D,F){if(F===void 0)F=0;return _p.operate(function($,J){J.add(D.schedule(function(){return $.subscribe(J)},F))})}az.subscribeOn=fp});var tz=z((sz)=>{Object.defineProperty(sz,"__esModule",{value:!0});sz.scheduleObservable=void 0;var gp=Y0(),hp=nF(),bp=iF();function up(D,F){return gp.innerFrom(D).pipe(bp.subscribeOn(F),hp.observeOn(F))}sz.scheduleObservable=up});var FE=z((ez)=>{Object.defineProperty(ez,"__esModule",{value:!0});ez.schedulePromise=void 0;var mp=Y0(),lp=nF(),pp=iF();function dp(D,F){return mp.innerFrom(D).pipe(pp.subscribeOn(F),lp.observeOn(F))}ez.schedulePromise=dp});var QE=z(($E)=>{Object.defineProperty($E,"__esModule",{value:!0});$E.scheduleArray=void 0;var cp=v0();function np(D,F){return new cp.Observable(function($){var J=0;return F.schedule(function(){if(J===D.length)$.complete();else if($.next(D[J++]),!$.closed)this.schedule()})})}$E.scheduleArray=np});var UY=z((BE)=>{Object.defineProperty(BE,"__esModule",{value:!0});BE.scheduleIterable=void 0;var ip=v0(),ap=KY(),op=S0(),YE=I8();function sp(D,F){return new ip.Observable(function($){var J;return YE.executeSchedule($,F,function(){J=D[ap.iterator](),YE.executeSchedule($,F,function(){var Q,Y,B;try{Q=J.next(),Y=Q.value,B=Q.done}catch(X){$.error(X);return}if(B)$.complete();else $.next(Y)},0,!0)}),function(){return op.isFunction(J===null||J===void 0?void 0:J.return)&&J.return()}})}BE.scheduleIterable=sp});var LY=z((WE)=>{Object.defineProperty(WE,"__esModule",{value:!0});WE.scheduleAsyncIterable=void 0;var rp=v0(),GE=I8();function tp(D,F){if(!D)throw Error("Iterable cannot be null");return new rp.Observable(function($){GE.executeSchedule($,F,function(){var J=D[Symbol.asyncIterator]();GE.executeSchedule($,F,function(){J.next().then(function(Q){if(Q.done)$.complete();else $.next(Q.value)})},0,!0)})})}WE.scheduleAsyncIterable=tp});var zE=z((qE)=>{Object.defineProperty(qE,"__esModule",{value:!0});qE.scheduleReadableStreamLike=void 0;var ep=LY(),Dd=B7();function Fd(D,F){return ep.scheduleAsyncIterable(Dd.readableStreamLikeToAsyncGenerator(D),F)}qE.scheduleReadableStreamLike=Fd});var AY=z((EE)=>{Object.defineProperty(EE,"__esModule",{value:!0});EE.scheduled=void 0;var $d=tz(),Jd=FE(),Qd=QE(),Yd=UY(),Bd=LY(),Xd=WY(),Gd=GY(),Wd=Y7(),Hd=zY(),qd=HY(),Kd=qY(),zd=B7(),Ed=zE();function Vd(D,F){if(D!=null){if(Xd.isInteropObservable(D))return $d.scheduleObservable(D,F);if(Wd.isArrayLike(D))return Qd.scheduleArray(D,F);if(Gd.isPromise(D))return Jd.schedulePromise(D,F);if(qd.isAsyncIterable(D))return Bd.scheduleAsyncIterable(D,F);if(Hd.isIterable(D))return Yd.scheduleIterable(D,F);if(zd.isReadableStreamLike(D))return Ed.scheduleReadableStreamLike(D,F)}throw Kd.createInvalidObservableTypeError(D)}EE.scheduled=Vd});var S8=z((ZE)=>{Object.defineProperty(ZE,"__esModule",{value:!0});ZE.from=void 0;var Zd=AY(),Ud=Y0();function Ld(D,F){return F?Zd.scheduled(D,F):Ud.innerFrom(D)}ZE.from=Ld});var X7=z((LE)=>{Object.defineProperty(LE,"__esModule",{value:!0});LE.of=void 0;var Ad=cD(),Md=S8();function Nd(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=Ad.popScheduler(D);return Md.from(D,$)}LE.of=Nd});var MY=z((ME)=>{Object.defineProperty(ME,"__esModule",{value:!0});ME.throwError=void 0;var Cd=v0(),Rd=S0();function Od(D,F){var $=Rd.isFunction(D)?D:function(){return D},J=function(Q){return Q.error($())};return new Cd.Observable(F?function(Q){return F.schedule(J,0,Q)}:J)}ME.throwError=Od});var G7=z((OE)=>{Object.defineProperty(OE,"__esModule",{value:!0});OE.observeNotification=OE.Notification=OE.NotificationKind=void 0;var wd=S1(),Td=X7(),jd=MY(),Pd=S0(),Id;(function(D){D.NEXT="N",D.ERROR="E",D.COMPLETE="C"})(Id=OE.NotificationKind||(OE.NotificationKind={}));var Sd=function(){function D(F,$,J){this.kind=F,this.value=$,this.error=J,this.hasValue=F==="N"}return D.prototype.observe=function(F){return RE(this,F)},D.prototype.do=function(F,$,J){var Q=this,Y=Q.kind,B=Q.value,X=Q.error;return Y==="N"?F===null||F===void 0?void 0:F(B):Y==="E"?$===null||$===void 0?void 0:$(X):J===null||J===void 0?void 0:J()},D.prototype.accept=function(F,$,J){var Q;return Pd.isFunction((Q=F)===null||Q===void 0?void 0:Q.next)?this.observe(F):this.do(F,$,J)},D.prototype.toObservable=function(){var F=this,$=F.kind,J=F.value,Q=F.error,Y=$==="N"?Td.of(J):$==="E"?jd.throwError(function(){return Q}):$==="C"?wd.EMPTY:0;if(!Y)throw TypeError("Unexpected notification kind "+$);return Y},D.createNext=function(F){return new D("N",F)},D.createError=function(F){return new D("E",void 0,F)},D.createComplete=function(){return D.completeNotification},D.completeNotification=new D("C"),D}();OE.Notification=Sd;function RE(D,F){var $,J,Q,Y=D,B=Y.kind,X=Y.value,G=Y.error;if(typeof B!=="string")throw TypeError('Invalid notification, missing "kind"');B==="N"?($=F.next)===null||$===void 0||$.call(F,X):B==="E"?(J=F.error)===null||J===void 0||J.call(F,G):(Q=F.complete)===null||Q===void 0||Q.call(F)}OE.observeNotification=RE});var IE=z((jE)=>{Object.defineProperty(jE,"__esModule",{value:!0});jE.isObservable=void 0;var vd=v0(),TE=S0();function yd(D){return!!D&&(D instanceof vd.Observable||TE.isFunction(D.lift)&&TE.isFunction(D.subscribe))}jE.isObservable=yd});var Q6=z((SE)=>{Object.defineProperty(SE,"__esModule",{value:!0});SE.EmptyError=void 0;var xd=F6();SE.EmptyError=xd.createErrorClass(function(D){return function(){D(this),this.name="EmptyError",this.message="no elements in sequence"}})});var xE=z((vE)=>{Object.defineProperty(vE,"__esModule",{value:!0});vE.lastValueFrom=void 0;var _d=Q6();function fd(D,F){var $=typeof F==="object";return new Promise(function(J,Q){var Y=!1,B;D.subscribe({next:function(X){B=X,Y=!0},error:Q,complete:function(){if(Y)J(B);else if($)J(F.defaultValue);else Q(new _d.EmptyError)}})})}vE.lastValueFrom=fd});var gE=z((_E)=>{Object.defineProperty(_E,"__esModule",{value:!0});_E.firstValueFrom=void 0;var gd=Q6(),hd=s4();function bd(D,F){var $=typeof F==="object";return new Promise(function(J,Q){var Y=new hd.SafeSubscriber({next:function(B){J(B),Y.unsubscribe()},error:Q,complete:function(){if($)J(F.defaultValue);else Q(new gd.EmptyError)}});D.subscribe(Y)})}_E.firstValueFrom=bd});var NY=z((hE)=>{Object.defineProperty(hE,"__esModule",{value:!0});hE.ArgumentOutOfRangeError=void 0;var ud=F6();hE.ArgumentOutOfRangeError=ud.createErrorClass(function(D){return function(){D(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var CY=z((uE)=>{Object.defineProperty(uE,"__esModule",{value:!0});uE.NotFoundError=void 0;var md=F6();uE.NotFoundError=md.createErrorClass(function(D){return function($){D(this),this.name="NotFoundError",this.message=$}})});var RY=z((lE)=>{Object.defineProperty(lE,"__esModule",{value:!0});lE.SequenceError=void 0;var ld=F6();lE.SequenceError=ld.createErrorClass(function(D){return function($){D(this),this.name="SequenceError",this.message=$}})});var W7=z((dE)=>{Object.defineProperty(dE,"__esModule",{value:!0});dE.isValidDate=void 0;function pd(D){return D instanceof Date&&!isNaN(D)}dE.isValidDate=pd});var H7=z((nE)=>{Object.defineProperty(nE,"__esModule",{value:!0});nE.timeout=nE.TimeoutError=void 0;var dd=dD(),cd=W7(),nd=x(),id=Y0(),ad=F6(),od=l(),sd=I8();nE.TimeoutError=ad.createErrorClass(function(D){return function($){if($===void 0)$=null;D(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=$}});function rd(D,F){var $=cd.isValidDate(D)?{first:D}:typeof D==="number"?{each:D}:D,J=$.first,Q=$.each,Y=$.with,B=Y===void 0?td:Y,X=$.scheduler,G=X===void 0?F!==null&&F!==void 0?F:dd.asyncScheduler:X,H=$.meta,q=H===void 0?null:H;if(J==null&&Q==null)throw TypeError("No timeout provided.");return nd.operate(function(K,V){var E,Z,L=null,A=0,M=function(R){Z=sd.executeSchedule(V,G,function(){try{E.unsubscribe(),id.innerFrom(B({meta:q,lastValue:L,seen:A})).subscribe(V)}catch(w){V.error(w)}},R)};E=K.subscribe(od.createOperatorSubscriber(V,function(R){Z===null||Z===void 0||Z.unsubscribe(),A++,V.next(L=R),Q>0&&M(Q)},void 0,void 0,function(){if(!(Z===null||Z===void 0?void 0:Z.closed))Z===null||Z===void 0||Z.unsubscribe();L=null})),!A&&M(J!=null?typeof J==="number"?J:+J-G.now():Q)})}nE.timeout=rd;function td(D){throw new nE.TimeoutError(D)}});var Y6=z((oE)=>{Object.defineProperty(oE,"__esModule",{value:!0});oE.map=void 0;var ed=x(),Dc=l();function Fc(D,F){return ed.operate(function($,J){var Q=0;$.subscribe(Dc.createOperatorSubscriber(J,function(Y){J.next(D.call(F,Y,Q++))}))})}oE.map=Fc});var X6=z((B6)=>{var $c=B6&&B6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Jc=B6&&B6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(B6,"__esModule",{value:!0});B6.mapOneOrManyArgs=void 0;var Qc=Y6(),Yc=Array.isArray;function Bc(D,F){return Yc(F)?D.apply(void 0,Jc([],$c(F))):D(F)}function Xc(D){return Qc.map(function(F){return Bc(D,F)})}B6.mapOneOrManyArgs=Xc});var wY=z((G6)=>{var Gc=G6&&G6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},rE=G6&&G6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(G6,"__esModule",{value:!0});G6.bindCallbackInternals=void 0;var Wc=cF(),Hc=v0(),qc=iF(),Kc=X6(),zc=nF(),Ec=J7();function OY(D,F,$,J){if($)if(Wc.isScheduler($))J=$;else return function(){var Q=[];for(var Y=0;Y<arguments.length;Y++)Q[Y]=arguments[Y];return OY(D,F,J).apply(this,Q).pipe(Kc.mapOneOrManyArgs($))};if(J)return function(){var Q=[];for(var Y=0;Y<arguments.length;Y++)Q[Y]=arguments[Y];return OY(D,F).apply(this,Q).pipe(qc.subscribeOn(J),zc.observeOn(J))};return function(){var Q=this,Y=[];for(var B=0;B<arguments.length;B++)Y[B]=arguments[B];var X=new Ec.AsyncSubject,G=!0;return new Hc.Observable(function(H){var q=X.subscribe(H);if(G){G=!1;var K=!1,V=!1;if(F.apply(Q,rE(rE([],Gc(Y)),[function(){var E=[];for(var Z=0;Z<arguments.length;Z++)E[Z]=arguments[Z];if(D){var L=E.shift();if(L!=null){X.error(L);return}}if(X.next(1<E.length?E:E[0]),V=!0,K)X.complete()}])),V)X.complete();K=!0}return q})}}G6.bindCallbackInternals=OY});var DV=z((tE)=>{Object.defineProperty(tE,"__esModule",{value:!0});tE.bindCallback=void 0;var Vc=wY();function Zc(D,F,$){return Vc.bindCallbackInternals(!1,D,F,$)}tE.bindCallback=Zc});var JV=z((FV)=>{Object.defineProperty(FV,"__esModule",{value:!0});FV.bindNodeCallback=void 0;var Uc=wY();function Lc(D,F,$){return Uc.bindCallbackInternals(!0,D,F,$)}FV.bindNodeCallback=Lc});var TY=z((QV)=>{Object.defineProperty(QV,"__esModule",{value:!0});QV.argsArgArrayOrObject=void 0;var Ac=Array.isArray,Mc=Object.getPrototypeOf,Nc=Object.prototype,Cc=Object.keys;function Rc(D){if(D.length===1){var F=D[0];if(Ac(F))return{args:F,keys:null};if(Oc(F)){var $=Cc(F);return{args:$.map(function(J){return F[J]}),keys:$}}}return{args:D,keys:null}}QV.argsArgArrayOrObject=Rc;function Oc(D){return D&&typeof D==="object"&&Mc(D)===Nc}});var jY=z((BV)=>{Object.defineProperty(BV,"__esModule",{value:!0});BV.createObject=void 0;function wc(D,F){return D.reduce(function($,J,Q){return $[J]=F[Q],$},{})}BV.createObject=wc});var q7=z((zV)=>{Object.defineProperty(zV,"__esModule",{value:!0});zV.combineLatestInit=zV.combineLatest=void 0;var Tc=v0(),jc=TY(),HV=S8(),qV=ED(),Pc=X6(),GV=cD(),Ic=jY(),Sc=l(),kc=I8();function vc(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=GV.popScheduler(D),J=GV.popResultSelector(D),Q=jc.argsArgArrayOrObject(D),Y=Q.args,B=Q.keys;if(Y.length===0)return HV.from([],$);var X=new Tc.Observable(KV(Y,$,B?function(G){return Ic.createObject(B,G)}:qV.identity));return J?X.pipe(Pc.mapOneOrManyArgs(J)):X}zV.combineLatest=vc;function KV(D,F,$){if($===void 0)$=qV.identity;return function(J){WV(F,function(){var Q=D.length,Y=Array(Q),B=Q,X=Q,G=function(q){WV(F,function(){var K=HV.from(D[q],F),V=!1;K.subscribe(Sc.createOperatorSubscriber(J,function(E){if(Y[q]=E,!V)V=!0,X--;if(!X)J.next($(Y.slice()))},function(){if(!--B)J.complete()}))},J)};for(var H=0;H<Q;H++)G(H)},J)}}zV.combineLatestInit=KV;function WV(D,F,$){if(D)kc.executeSchedule($,D,F);else F()}});var K7=z((ZV)=>{Object.defineProperty(ZV,"__esModule",{value:!0});ZV.mergeInternals=void 0;var xc=Y0(),_c=I8(),VV=l();function fc(D,F,$,J,Q,Y,B,X){var G=[],H=0,q=0,K=!1,V=function(){if(K&&!G.length&&!H)F.complete()},E=function(L){return H<J?Z(L):G.push(L)},Z=function(L){Y&&F.next(L),H++;var A=!1;xc.innerFrom($(L,q++)).subscribe(VV.createOperatorSubscriber(F,function(M){if(Q===null||Q===void 0||Q(M),Y)E(M);else F.next(M)},function(){A=!0},void 0,function(){if(A)try{H--;var M=function(){var R=G.shift();if(B)_c.executeSchedule(F,B,function(){return Z(R)});else Z(R)};while(G.length&&H<J)M();V()}catch(R){F.error(R)}}))};return D.subscribe(VV.createOperatorSubscriber(F,E,function(){K=!0,V()})),function(){X===null||X===void 0||X()}}ZV.mergeInternals=fc});var k8=z((AV)=>{Object.defineProperty(AV,"__esModule",{value:!0});AV.mergeMap=void 0;var gc=Y6(),hc=Y0(),bc=x(),uc=K7(),mc=S0();function LV(D,F,$){if($===void 0)$=1/0;if(mc.isFunction(F))return LV(function(J,Q){return gc.map(function(Y,B){return F(J,Y,Q,B)})(hc.innerFrom(D(J,Q)))},$);else if(typeof F==="number")$=F;return bc.operate(function(J,Q){return uc.mergeInternals(J,Q,D,$)})}AV.mergeMap=LV});var aF=z((NV)=>{Object.defineProperty(NV,"__esModule",{value:!0});NV.mergeAll=void 0;var lc=k8(),pc=ED();function dc(D){if(D===void 0)D=1/0;return lc.mergeMap(pc.identity,D)}NV.mergeAll=dc});var z7=z((RV)=>{Object.defineProperty(RV,"__esModule",{value:!0});RV.concatAll=void 0;var cc=aF();function nc(){return cc.mergeAll(1)}RV.concatAll=nc});var oF=z((wV)=>{Object.defineProperty(wV,"__esModule",{value:!0});wV.concat=void 0;var ic=z7(),ac=cD(),oc=S8();function sc(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return ic.concatAll()(oc.from(D,ac.popScheduler(D)))}wV.concat=sc});var sF=z((jV)=>{Object.defineProperty(jV,"__esModule",{value:!0});jV.defer=void 0;var rc=v0(),tc=Y0();function ec(D){return new rc.Observable(function(F){tc.innerFrom(D()).subscribe(F)})}jV.defer=ec});var kV=z((IV)=>{Object.defineProperty(IV,"__esModule",{value:!0});IV.connectable=void 0;var Dn=VD(),Fn=v0(),$n=sF(),Jn={connector:function(){return new Dn.Subject},resetOnDisconnect:!0};function Qn(D,F){if(F===void 0)F=Jn;var $=null,J=F.connector,Q=F.resetOnDisconnect,Y=Q===void 0?!0:Q,B=J(),X=new Fn.Observable(function(G){return B.subscribe(G)});return X.connect=function(){if(!$||$.closed){if($=$n.defer(function(){return D}).subscribe(B),Y)$.add(function(){return B=J()})}return $},X}IV.connectable=Qn});var xV=z((vV)=>{Object.defineProperty(vV,"__esModule",{value:!0});vV.forkJoin=void 0;var Yn=v0(),Bn=TY(),Xn=Y0(),Gn=cD(),Wn=l(),Hn=X6(),qn=jY();function Kn(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=Gn.popResultSelector(D),J=Bn.argsArgArrayOrObject(D),Q=J.args,Y=J.keys,B=new Yn.Observable(function(X){var G=Q.length;if(!G){X.complete();return}var H=Array(G),q=G,K=G,V=function(Z){var L=!1;Xn.innerFrom(Q[Z]).subscribe(Wn.createOperatorSubscriber(X,function(A){if(!L)L=!0,K--;H[Z]=A},function(){return q--},void 0,function(){if(!q||!L){if(!K)X.next(Y?qn.createObject(Y,H):H);X.complete()}}))};for(var E=0;E<G;E++)V(E)});return $?B.pipe(Hn.mapOneOrManyArgs($)):B}vV.forkJoin=Kn});var fV=z((E3)=>{var zn=E3&&E3.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y};Object.defineProperty(E3,"__esModule",{value:!0});E3.fromEvent=void 0;var En=Y0(),Vn=v0(),Zn=k8(),Un=Y7(),e6=S0(),Ln=X6(),An=["addListener","removeListener"],Mn=["addEventListener","removeEventListener"],Nn=["on","off"];function PY(D,F,$,J){if(e6.isFunction($))J=$,$=void 0;if(J)return PY(D,F,$).pipe(Ln.mapOneOrManyArgs(J));var Q=zn(On(D)?Mn.map(function(X){return function(G){return D[X](F,G,$)}}):Cn(D)?An.map(_V(D,F)):Rn(D)?Nn.map(_V(D,F)):[],2),Y=Q[0],B=Q[1];if(!Y){if(Un.isArrayLike(D))return Zn.mergeMap(function(X){return PY(X,F,$)})(En.innerFrom(D))}if(!Y)throw TypeError("Invalid event target");return new Vn.Observable(function(X){var G=function(){var H=[];for(var q=0;q<arguments.length;q++)H[q]=arguments[q];return X.next(1<H.length?H:H[0])};return Y(G),function(){return B(G)}})}E3.fromEvent=PY;function _V(D,F){return function($){return function(J){return D[$](F,J)}}}function Cn(D){return e6.isFunction(D.addListener)&&e6.isFunction(D.removeListener)}function Rn(D){return e6.isFunction(D.on)&&e6.isFunction(D.off)}function On(D){return e6.isFunction(D.addEventListener)&&e6.isFunction(D.removeEventListener)}});var uV=z((hV)=>{Object.defineProperty(hV,"__esModule",{value:!0});hV.fromEventPattern=void 0;var wn=v0(),Tn=S0(),jn=X6();function gV(D,F,$){if($)return gV(D,F).pipe(jn.mapOneOrManyArgs($));return new wn.Observable(function(J){var Q=function(){var B=[];for(var X=0;X<arguments.length;X++)B[X]=arguments[X];return J.next(B.length===1?B[0]:B)},Y=D(Q);return Tn.isFunction(F)?function(){return F(Q,Y)}:void 0})}hV.fromEventPattern=gV});var lV=z((V3)=>{var Pn=V3&&V3.__generator||function(D,F){var $={label:0,sent:function(){if(Y[0]&1)throw Y[1];return Y[1]},trys:[],ops:[]},J,Q,Y,B;return B={next:X(0),throw:X(1),return:X(2)},typeof Symbol==="function"&&(B[Symbol.iterator]=function(){return this}),B;function X(H){return function(q){return G([H,q])}}function G(H){if(J)throw TypeError("Generator is already executing.");while($)try{if(J=1,Q&&(Y=H[0]&2?Q.return:H[0]?Q.throw||((Y=Q.return)&&Y.call(Q),0):Q.next)&&!(Y=Y.call(Q,H[1])).done)return Y;if(Q=0,Y)H=[H[0]&2,Y.value];switch(H[0]){case 0:case 1:Y=H;break;case 4:return $.label++,{value:H[1],done:!1};case 5:$.label++,Q=H[1],H=[0];continue;case 7:H=$.ops.pop(),$.trys.pop();continue;default:if((Y=$.trys,!(Y=Y.length>0&&Y[Y.length-1]))&&(H[0]===6||H[0]===2)){$=0;continue}if(H[0]===3&&(!Y||H[1]>Y[0]&&H[1]<Y[3])){$.label=H[1];break}if(H[0]===6&&$.label<Y[1]){$.label=Y[1],Y=H;break}if(Y&&$.label<Y[2]){$.label=Y[2],$.ops.push(H);break}if(Y[2])$.ops.pop();$.trys.pop();continue}H=F.call(D,$)}catch(q){H=[6,q],Q=0}finally{J=Y=0}if(H[0]&5)throw H[1];return{value:H[0]?H[1]:void 0,done:!0}}};Object.defineProperty(V3,"__esModule",{value:!0});V3.generate=void 0;var mV=ED(),In=cF(),Sn=sF(),kn=UY();function vn(D,F,$,J,Q){var Y,B,X,G;if(arguments.length===1)Y=D,G=Y.initialState,F=Y.condition,$=Y.iterate,B=Y.resultSelector,X=B===void 0?mV.identity:B,Q=Y.scheduler;else if(G=D,!J||In.isScheduler(J))X=mV.identity,Q=J;else X=J;function H(){var q;return Pn(this,function(K){switch(K.label){case 0:q=G,K.label=1;case 1:if(!(!F||F(q)))return[3,4];return[4,X(q)];case 2:K.sent(),K.label=3;case 3:return q=$(q),[3,1];case 4:return[2]}})}return Sn.defer(Q?function(){return kn.scheduleIterable(H(),Q)}:H)}V3.generate=vn});var cV=z((pV)=>{Object.defineProperty(pV,"__esModule",{value:!0});pV.iif=void 0;var yn=sF();function xn(D,F,$){return yn.defer(function(){return D()?F:$})}pV.iif=xn});var W6=z((nV)=>{Object.defineProperty(nV,"__esModule",{value:!0});nV.timer=void 0;var _n=v0(),fn=dD(),gn=cF(),hn=W7();function bn(D,F,$){if(D===void 0)D=0;if($===void 0)$=fn.async;var J=-1;if(F!=null)if(gn.isScheduler(F))$=F;else J=F;return new _n.Observable(function(Q){var Y=hn.isValidDate(D)?+D-$.now():D;if(Y<0)Y=0;var B=0;return $.schedule(function(){if(!Q.closed)if(Q.next(B++),0<=J)this.schedule(void 0,J);else Q.complete()},Y)})}nV.timer=bn});var IY=z((aV)=>{Object.defineProperty(aV,"__esModule",{value:!0});aV.interval=void 0;var un=dD(),mn=W6();function ln(D,F){if(D===void 0)D=0;if(F===void 0)F=un.asyncScheduler;if(D<0)D=0;return mn.timer(D,D,F)}aV.interval=ln});var eV=z((rV)=>{Object.defineProperty(rV,"__esModule",{value:!0});rV.merge=void 0;var pn=aF(),dn=Y0(),cn=S1(),sV=cD(),nn=S8();function an(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=sV.popScheduler(D),J=sV.popNumber(D,1/0),Q=D;return!Q.length?cn.EMPTY:Q.length===1?dn.innerFrom(Q[0]):pn.mergeAll(J)(nn.from(Q,$))}rV.merge=an});var SY=z((DZ)=>{Object.defineProperty(DZ,"__esModule",{value:!0});DZ.never=DZ.NEVER=void 0;var on=v0(),sn=zD();DZ.NEVER=new on.Observable(sn.noop);function rn(){return DZ.NEVER}DZ.never=rn});var Z3=z((JZ)=>{Object.defineProperty(JZ,"__esModule",{value:!0});JZ.argsOrArgArray=void 0;var tn=Array.isArray;function en(D){return D.length===1&&tn(D[0])?D[0]:D}JZ.argsOrArgArray=en});var kY=z((BZ)=>{Object.defineProperty(BZ,"__esModule",{value:!0});BZ.onErrorResumeNext=void 0;var Di=v0(),Fi=Z3(),$i=l(),YZ=zD(),Ji=Y0();function Qi(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=Fi.argsOrArgArray(D);return new Di.Observable(function(J){var Q=0,Y=function(){if(Q<$.length){var B=void 0;try{B=Ji.innerFrom($[Q++])}catch(G){Y();return}var X=new $i.OperatorSubscriber(J,void 0,YZ.noop,YZ.noop);B.subscribe(X),X.add(Y)}else J.complete()};Y()})}BZ.onErrorResumeNext=Qi});var HZ=z((GZ)=>{Object.defineProperty(GZ,"__esModule",{value:!0});GZ.pairs=void 0;var Yi=S8();function Bi(D,F){return Yi.from(Object.entries(D),F)}GZ.pairs=Bi});var zZ=z((qZ)=>{Object.defineProperty(qZ,"__esModule",{value:!0});qZ.not=void 0;function Xi(D,F){return function($,J){return!D.call(F,$,J)}}qZ.not=Xi});var D4=z((EZ)=>{Object.defineProperty(EZ,"__esModule",{value:!0});EZ.filter=void 0;var Gi=x(),Wi=l();function Hi(D,F){return Gi.operate(function($,J){var Q=0;$.subscribe(Wi.createOperatorSubscriber(J,function(Y){return D.call(F,Y,Q++)&&J.next(Y)}))})}EZ.filter=Hi});var MZ=z((LZ)=>{Object.defineProperty(LZ,"__esModule",{value:!0});LZ.partition=void 0;var qi=zZ(),ZZ=D4(),UZ=Y0();function Ki(D,F,$){return[ZZ.filter(F,$)(UZ.innerFrom(D)),ZZ.filter(qi.not(F,$))(UZ.innerFrom(D))]}LZ.partition=Ki});var vY=z((RZ)=>{Object.defineProperty(RZ,"__esModule",{value:!0});RZ.raceInit=RZ.race=void 0;var zi=v0(),NZ=Y0(),Ei=Z3(),Vi=l();function Zi(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return D=Ei.argsOrArgArray(D),D.length===1?NZ.innerFrom(D[0]):new zi.Observable(CZ(D))}RZ.race=Zi;function CZ(D){return function(F){var $=[],J=function(Y){$.push(NZ.innerFrom(D[Y]).subscribe(Vi.createOperatorSubscriber(F,function(B){if($){for(var X=0;X<$.length;X++)X!==Y&&$[X].unsubscribe();$=null}F.next(B)})))};for(var Q=0;$&&!F.closed&&Q<D.length;Q++)J(Q)}}RZ.raceInit=CZ});var jZ=z((wZ)=>{Object.defineProperty(wZ,"__esModule",{value:!0});wZ.range=void 0;var Li=v0(),Ai=S1();function Mi(D,F,$){if(F==null)F=D,D=0;if(F<=0)return Ai.EMPTY;var J=F+D;return new Li.Observable($?function(Q){var Y=D;return $.schedule(function(){if(Y<J)Q.next(Y++),this.schedule();else Q.complete()})}:function(Q){var Y=D;while(Y<J&&!Q.closed)Q.next(Y++);Q.complete()})}wZ.range=Mi});var SZ=z((PZ)=>{Object.defineProperty(PZ,"__esModule",{value:!0});PZ.using=void 0;var Ni=v0(),Ci=Y0(),Ri=S1();function Oi(D,F){return new Ni.Observable(function($){var J=D(),Q=F(J),Y=Q?Ci.innerFrom(Q):Ri.EMPTY;return Y.subscribe($),function(){if(J)J.unsubscribe()}})}PZ.using=Oi});var E7=z((H6)=>{var wi=H6&&H6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Ti=H6&&H6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(H6,"__esModule",{value:!0});H6.zip=void 0;var ji=v0(),Pi=Y0(),Ii=Z3(),Si=S1(),ki=l(),vi=cD();function yi(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=vi.popResultSelector(D),J=Ii.argsOrArgArray(D);return J.length?new ji.Observable(function(Q){var Y=J.map(function(){return[]}),B=J.map(function(){return!1});Q.add(function(){Y=B=null});var X=function(H){Pi.innerFrom(J[H]).subscribe(ki.createOperatorSubscriber(Q,function(q){if(Y[H].push(q),Y.every(function(V){return V.length})){var K=Y.map(function(V){return V.shift()});if(Q.next($?$.apply(void 0,Ti([],wi(K))):K),Y.some(function(V,E){return!V.length&&B[E]}))Q.complete()}},function(){B[H]=!0,!Y[H].length&&Q.complete()}))};for(var G=0;!Q.closed&&G<J.length;G++)X(G);return function(){Y=B=null}}):Si.EMPTY}H6.zip=yi});var vZ=z((kZ)=>{Object.defineProperty(kZ,"__esModule",{value:!0})});var yY=z((xZ)=>{Object.defineProperty(xZ,"__esModule",{value:!0});xZ.audit=void 0;var xi=x(),_i=Y0(),yZ=l();function fi(D){return xi.operate(function(F,$){var J=!1,Q=null,Y=null,B=!1,X=function(){if(Y===null||Y===void 0||Y.unsubscribe(),Y=null,J){J=!1;var H=Q;Q=null,$.next(H)}B&&$.complete()},G=function(){Y=null,B&&$.complete()};F.subscribe(yZ.createOperatorSubscriber($,function(H){if(J=!0,Q=H,!Y)_i.innerFrom(D(H)).subscribe(Y=yZ.createOperatorSubscriber($,X,G))},function(){B=!0,(!J||!Y||Y.closed)&&$.complete()}))})}xZ.audit=fi});var hZ=z((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.auditTime=void 0;var gi=dD(),hi=yY(),bi=W6();function ui(D,F){if(F===void 0)F=gi.asyncScheduler;return hi.audit(function(){return bi.timer(D,F)})}fZ.auditTime=ui});var lZ=z((uZ)=>{Object.defineProperty(uZ,"__esModule",{value:!0});uZ.buffer=void 0;var mi=x(),li=zD(),bZ=l(),pi=Y0();function di(D){return mi.operate(function(F,$){var J=[];return F.subscribe(bZ.createOperatorSubscriber($,function(Q){return J.push(Q)},function(){$.next(J),$.complete()})),pi.innerFrom(D).subscribe(bZ.createOperatorSubscriber($,function(){var Q=J;J=[],$.next(Q)},li.noop)),function(){J=null}})}uZ.buffer=di});var pZ=z((U3)=>{var xY=U3&&U3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(U3,"__esModule",{value:!0});U3.bufferCount=void 0;var ci=x(),ni=l(),ii=P8();function ai(D,F){if(F===void 0)F=null;return F=F!==null&&F!==void 0?F:D,ci.operate(function($,J){var Q=[],Y=0;$.subscribe(ni.createOperatorSubscriber(J,function(B){var X,G,H,q,K=null;if(Y++%F===0)Q.push([]);try{for(var V=xY(Q),E=V.next();!E.done;E=V.next()){var Z=E.value;if(Z.push(B),D<=Z.length)K=K!==null&&K!==void 0?K:[],K.push(Z)}}catch(M){X={error:M}}finally{try{if(E&&!E.done&&(G=V.return))G.call(V)}finally{if(X)throw X.error}}if(K)try{for(var L=xY(K),A=L.next();!A.done;A=L.next()){var Z=A.value;ii.arrRemove(Q,Z),J.next(Z)}}catch(M){H={error:M}}finally{try{if(A&&!A.done&&(q=L.return))q.call(L)}finally{if(H)throw H.error}}},function(){var B,X;try{for(var G=xY(Q),H=G.next();!H.done;H=G.next()){var q=H.value;J.next(q)}}catch(K){B={error:K}}finally{try{if(H&&!H.done&&(X=G.return))X.call(G)}finally{if(B)throw B.error}}J.complete()},void 0,function(){Q=null}))})}U3.bufferCount=ai});var cZ=z((L3)=>{var oi=L3&&L3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(L3,"__esModule",{value:!0});L3.bufferTime=void 0;var si=F1(),ri=x(),ti=l(),ei=P8(),Da=dD(),Fa=cD(),dZ=I8();function $a(D){var F,$,J=[];for(var Q=1;Q<arguments.length;Q++)J[Q-1]=arguments[Q];var Y=(F=Fa.popScheduler(J))!==null&&F!==void 0?F:Da.asyncScheduler,B=($=J[0])!==null&&$!==void 0?$:null,X=J[1]||1/0;return ri.operate(function(G,H){var q=[],K=!1,V=function(L){var{buffer:A,subs:M}=L;M.unsubscribe(),ei.arrRemove(q,L),H.next(A),K&&E()},E=function(){if(q){var L=new si.Subscription;H.add(L);var A=[],M={buffer:A,subs:L};q.push(M),dZ.executeSchedule(L,Y,function(){return V(M)},D)}};if(B!==null&&B>=0)dZ.executeSchedule(H,Y,E,B,!0);else K=!0;E();var Z=ti.createOperatorSubscriber(H,function(L){var A,M,R=q.slice();try{for(var w=oi(R),k=w.next();!k.done;k=w.next()){var O=k.value,j=O.buffer;j.push(L),X<=j.length&&V(O)}}catch(y){A={error:y}}finally{try{if(k&&!k.done&&(M=w.return))M.call(w)}finally{if(A)throw A.error}}},function(){while(q===null||q===void 0?void 0:q.length)H.next(q.shift().buffer);Z===null||Z===void 0||Z.unsubscribe(),H.complete(),H.unsubscribe()},void 0,function(){return q=null});G.subscribe(Z)})}L3.bufferTime=$a});var aZ=z((A3)=>{var Ja=A3&&A3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(A3,"__esModule",{value:!0});A3.bufferToggle=void 0;var Qa=F1(),Ya=x(),nZ=Y0(),_Y=l(),iZ=zD(),Ba=P8();function Xa(D,F){return Ya.operate(function($,J){var Q=[];nZ.innerFrom(D).subscribe(_Y.createOperatorSubscriber(J,function(Y){var B=[];Q.push(B);var X=new Qa.Subscription,G=function(){Ba.arrRemove(Q,B),J.next(B),X.unsubscribe()};X.add(nZ.innerFrom(F(Y)).subscribe(_Y.createOperatorSubscriber(J,G,iZ.noop)))},iZ.noop)),$.subscribe(_Y.createOperatorSubscriber(J,function(Y){var B,X;try{for(var G=Ja(Q),H=G.next();!H.done;H=G.next()){var q=H.value;q.push(Y)}}catch(K){B={error:K}}finally{try{if(H&&!H.done&&(X=G.return))X.call(G)}finally{if(B)throw B.error}}},function(){while(Q.length>0)J.next(Q.shift());J.complete()}))})}A3.bufferToggle=Xa});var tZ=z((sZ)=>{Object.defineProperty(sZ,"__esModule",{value:!0});sZ.bufferWhen=void 0;var Ga=x(),Wa=zD(),oZ=l(),Ha=Y0();function qa(D){return Ga.operate(function(F,$){var J=null,Q=null,Y=function(){Q===null||Q===void 0||Q.unsubscribe();var B=J;J=[],B&&$.next(B),Ha.innerFrom(D()).subscribe(Q=oZ.createOperatorSubscriber($,Y,Wa.noop))};Y(),F.subscribe(oZ.createOperatorSubscriber($,function(B){return J===null||J===void 0?void 0:J.push(B)},function(){J&&$.next(J),$.complete()},void 0,function(){return J=Q=null}))})}sZ.bufferWhen=qa});var $U=z((DU)=>{Object.defineProperty(DU,"__esModule",{value:!0});DU.catchError=void 0;var Ka=Y0(),za=l(),Ea=x();function eZ(D){return Ea.operate(function(F,$){var J=null,Q=!1,Y;if(J=F.subscribe(za.createOperatorSubscriber($,void 0,void 0,function(B){if(Y=Ka.innerFrom(D(B,eZ(D)(F))),J)J.unsubscribe(),J=null,Y.subscribe($);else Q=!0})),Q)J.unsubscribe(),J=null,Y.subscribe($)})}DU.catchError=eZ});var fY=z((JU)=>{Object.defineProperty(JU,"__esModule",{value:!0});JU.scanInternals=void 0;var Va=l();function Za(D,F,$,J,Q){return function(Y,B){var X=$,G=F,H=0;Y.subscribe(Va.createOperatorSubscriber(B,function(q){var K=H++;G=X?D(G,q,K):(X=!0,q),J&&B.next(G)},Q&&function(){X&&B.next(G),B.complete()}))}}JU.scanInternals=Za});var M3=z((YU)=>{Object.defineProperty(YU,"__esModule",{value:!0});YU.reduce=void 0;var Ua=fY(),La=x();function Aa(D,F){return La.operate(Ua.scanInternals(D,F,arguments.length>=2,!1,!0))}YU.reduce=Aa});var gY=z((XU)=>{Object.defineProperty(XU,"__esModule",{value:!0});XU.toArray=void 0;var Ma=M3(),Na=x(),Ca=function(D,F){return D.push(F),D};function Ra(){return Na.operate(function(D,F){Ma.reduce(Ca,[])(D).subscribe(F)})}XU.toArray=Ra});var hY=z((WU)=>{Object.defineProperty(WU,"__esModule",{value:!0});WU.joinAllInternals=void 0;var Oa=ED(),wa=X6(),Ta=pF(),ja=k8(),Pa=gY();function Ia(D,F){return Ta.pipe(Pa.toArray(),ja.mergeMap(function($){return D($)}),F?wa.mapOneOrManyArgs(F):Oa.identity)}WU.joinAllInternals=Ia});var bY=z((qU)=>{Object.defineProperty(qU,"__esModule",{value:!0});qU.combineLatestAll=void 0;var Sa=q7(),ka=hY();function va(D){return ka.joinAllInternals(Sa.combineLatest,D)}qU.combineLatestAll=va});var VU=z((zU)=>{Object.defineProperty(zU,"__esModule",{value:!0});zU.combineAll=void 0;var ya=bY();zU.combineAll=ya.combineLatestAll});var AU=z((q6)=>{var ZU=q6&&q6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},UU=q6&&q6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(q6,"__esModule",{value:!0});q6.combineLatest=void 0;var xa=q7(),_a=x(),fa=Z3(),ga=X6(),ha=pF(),ba=cD();function LU(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=ba.popResultSelector(D);return $?ha.pipe(LU.apply(void 0,UU([],ZU(D))),ga.mapOneOrManyArgs($)):_a.operate(function(J,Q){xa.combineLatestInit(UU([J],ZU(fa.argsOrArgArray(D))))(Q)})}q6.combineLatest=LU});var MU=z((K6)=>{var ua=K6&&K6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},ma=K6&&K6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(K6,"__esModule",{value:!0});K6.combineLatestWith=void 0;var la=AU();function pa(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return la.combineLatest.apply(void 0,ma([],ua(D)))}K6.combineLatestWith=pa});var uY=z((CU)=>{Object.defineProperty(CU,"__esModule",{value:!0});CU.concatMap=void 0;var NU=k8(),da=S0();function ca(D,F){return da.isFunction(F)?NU.mergeMap(D,F,1):NU.mergeMap(D,1)}CU.concatMap=ca});var jU=z((wU)=>{Object.defineProperty(wU,"__esModule",{value:!0});wU.concatMapTo=void 0;var OU=uY(),na=S0();function ia(D,F){return na.isFunction(F)?OU.concatMap(function(){return D},F):OU.concatMap(function(){return D})}wU.concatMapTo=ia});var PU=z((z6)=>{var aa=z6&&z6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},oa=z6&&z6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(z6,"__esModule",{value:!0});z6.concat=void 0;var sa=x(),ra=z7(),ta=cD(),ea=S8();function Do(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=ta.popScheduler(D);return sa.operate(function(J,Q){ra.concatAll()(ea.from(oa([J],aa(D)),$)).subscribe(Q)})}z6.concat=Do});var IU=z((E6)=>{var Fo=E6&&E6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},$o=E6&&E6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(E6,"__esModule",{value:!0});E6.concatWith=void 0;var Jo=PU();function Qo(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return Jo.concat.apply(void 0,$o([],Fo(D)))}E6.concatWith=Qo});var vU=z((SU)=>{Object.defineProperty(SU,"__esModule",{value:!0});SU.fromSubscribable=void 0;var Yo=v0();function Bo(D){return new Yo.Observable(function(F){return D.subscribe(F)})}SU.fromSubscribable=Bo});var V7=z((yU)=>{Object.defineProperty(yU,"__esModule",{value:!0});yU.connect=void 0;var Xo=VD(),Go=Y0(),Wo=x(),Ho=vU(),qo={connector:function(){return new Xo.Subject}};function Ko(D,F){if(F===void 0)F=qo;var $=F.connector;return Wo.operate(function(J,Q){var Y=$();Go.innerFrom(D(Ho.fromSubscribable(Y))).subscribe(Q),Q.add(J.subscribe(Y))})}yU.connect=Ko});var gU=z((_U)=>{Object.defineProperty(_U,"__esModule",{value:!0});_U.count=void 0;var zo=M3();function Eo(D){return zo.reduce(function(F,$,J){return!D||D($,J)?F+1:F},0)}_U.count=Eo});var mU=z((bU)=>{Object.defineProperty(bU,"__esModule",{value:!0});bU.debounce=void 0;var Vo=x(),Zo=zD(),hU=l(),Uo=Y0();function Lo(D){return Vo.operate(function(F,$){var J=!1,Q=null,Y=null,B=function(){if(Y===null||Y===void 0||Y.unsubscribe(),Y=null,J){J=!1;var X=Q;Q=null,$.next(X)}};F.subscribe(hU.createOperatorSubscriber($,function(X){Y===null||Y===void 0||Y.unsubscribe(),J=!0,Q=X,Y=hU.createOperatorSubscriber($,B,Zo.noop),Uo.innerFrom(D(X)).subscribe(Y)},function(){B(),$.complete()},void 0,function(){Q=Y=null}))})}bU.debounce=Lo});var dU=z((lU)=>{Object.defineProperty(lU,"__esModule",{value:!0});lU.debounceTime=void 0;var Ao=dD(),Mo=x(),No=l();function Co(D,F){if(F===void 0)F=Ao.asyncScheduler;return Mo.operate(function($,J){var Q=null,Y=null,B=null,X=function(){if(Q){Q.unsubscribe(),Q=null;var H=Y;Y=null,J.next(H)}};function G(){var H=B+D,q=F.now();if(q<H){Q=this.schedule(void 0,H-q),J.add(Q);return}X()}$.subscribe(No.createOperatorSubscriber(J,function(H){if(Y=H,B=F.now(),!Q)Q=F.schedule(G,D),J.add(Q)},function(){X(),J.complete()},void 0,function(){Y=Q=null}))})}lU.debounceTime=Co});var rF=z((cU)=>{Object.defineProperty(cU,"__esModule",{value:!0});cU.defaultIfEmpty=void 0;var Ro=x(),Oo=l();function wo(D){return Ro.operate(function(F,$){var J=!1;F.subscribe(Oo.createOperatorSubscriber($,function(Q){J=!0,$.next(Q)},function(){if(!J)$.next(D);$.complete()}))})}cU.defaultIfEmpty=wo});var tF=z((iU)=>{Object.defineProperty(iU,"__esModule",{value:!0});iU.take=void 0;var To=S1(),jo=x(),Po=l();function Io(D){return D<=0?function(){return To.EMPTY}:jo.operate(function(F,$){var J=0;F.subscribe(Po.createOperatorSubscriber($,function(Q){if(++J<=D){if($.next(Q),D<=J)$.complete()}}))})}iU.take=Io});var mY=z((oU)=>{Object.defineProperty(oU,"__esModule",{value:!0});oU.ignoreElements=void 0;var So=x(),ko=l(),vo=zD();function yo(){return So.operate(function(D,F){D.subscribe(ko.createOperatorSubscriber(F,vo.noop))})}oU.ignoreElements=yo});var lY=z((rU)=>{Object.defineProperty(rU,"__esModule",{value:!0});rU.mapTo=void 0;var xo=Y6();function _o(D){return xo.map(function(){return D})}rU.mapTo=_o});var pY=z((FL)=>{Object.defineProperty(FL,"__esModule",{value:!0});FL.delayWhen=void 0;var fo=oF(),eU=tF(),go=mY(),ho=lY(),bo=k8(),uo=Y0();function DL(D,F){if(F)return function($){return fo.concat(F.pipe(eU.take(1),go.ignoreElements()),$.pipe(DL(D)))};return bo.mergeMap(function($,J){return uo.innerFrom(D($,J)).pipe(eU.take(1),ho.mapTo($))})}FL.delayWhen=DL});var YL=z((JL)=>{Object.defineProperty(JL,"__esModule",{value:!0});JL.delay=void 0;var mo=dD(),lo=pY(),po=W6();function co(D,F){if(F===void 0)F=mo.asyncScheduler;var $=po.timer(D,F);return lo.delayWhen(function(){return $})}JL.delay=co});var GL=z((BL)=>{Object.defineProperty(BL,"__esModule",{value:!0});BL.dematerialize=void 0;var no=G7(),io=x(),ao=l();function oo(){return io.operate(function(D,F){D.subscribe(ao.createOperatorSubscriber(F,function($){return no.observeNotification($,F)}))})}BL.dematerialize=oo});var KL=z((HL)=>{Object.defineProperty(HL,"__esModule",{value:!0});HL.distinct=void 0;var so=x(),WL=l(),ro=zD(),to=Y0();function eo(D,F){return so.operate(function($,J){var Q=new Set;$.subscribe(WL.createOperatorSubscriber(J,function(Y){var B=D?D(Y):Y;if(!Q.has(B))Q.add(B),J.next(Y)})),F&&to.innerFrom(F).subscribe(WL.createOperatorSubscriber(J,function(){return Q.clear()},ro.noop))})}HL.distinct=eo});var dY=z((zL)=>{Object.defineProperty(zL,"__esModule",{value:!0});zL.distinctUntilChanged=void 0;var Ds=ED(),Fs=x(),$s=l();function Js(D,F){if(F===void 0)F=Ds.identity;return D=D!==null&&D!==void 0?D:Qs,Fs.operate(function($,J){var Q,Y=!0;$.subscribe($s.createOperatorSubscriber(J,function(B){var X=F(B);if(Y||!D(Q,X))Y=!1,Q=X,J.next(B)}))})}zL.distinctUntilChanged=Js;function Qs(D,F){return D===F}});var UL=z((VL)=>{Object.defineProperty(VL,"__esModule",{value:!0});VL.distinctUntilKeyChanged=void 0;var Ys=dY();function Bs(D,F){return Ys.distinctUntilChanged(function($,J){return F?F($[D],J[D]):$[D]===J[D]})}VL.distinctUntilKeyChanged=Bs});var eF=z((LL)=>{Object.defineProperty(LL,"__esModule",{value:!0});LL.throwIfEmpty=void 0;var Xs=Q6(),Gs=x(),Ws=l();function Hs(D){if(D===void 0)D=qs;return Gs.operate(function(F,$){var J=!1;F.subscribe(Ws.createOperatorSubscriber($,function(Q){J=!0,$.next(Q)},function(){return J?$.complete():$.error(D())}))})}LL.throwIfEmpty=Hs;function qs(){return new Xs.EmptyError}});var RL=z((NL)=>{Object.defineProperty(NL,"__esModule",{value:!0});NL.elementAt=void 0;var ML=NY(),Ks=D4(),zs=eF(),Es=rF(),Vs=tF();function Zs(D,F){if(D<0)throw new ML.ArgumentOutOfRangeError;var $=arguments.length>=2;return function(J){return J.pipe(Ks.filter(function(Q,Y){return Y===D}),Vs.take(1),$?Es.defaultIfEmpty(F):zs.throwIfEmpty(function(){return new ML.ArgumentOutOfRangeError}))}}NL.elementAt=Zs});var OL=z((V6)=>{var Us=V6&&V6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Ls=V6&&V6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(V6,"__esModule",{value:!0});V6.endWith=void 0;var As=oF(),Ms=X7();function Ns(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return function($){return As.concat($,Ms.of.apply(void 0,Ls([],Us(D))))}}V6.endWith=Ns});var jL=z((wL)=>{Object.defineProperty(wL,"__esModule",{value:!0});wL.every=void 0;var Cs=x(),Rs=l();function Os(D,F){return Cs.operate(function($,J){var Q=0;$.subscribe(Rs.createOperatorSubscriber(J,function(Y){if(!D.call(F,Y,Q++,$))J.next(!1),J.complete()},function(){J.next(!0),J.complete()}))})}wL.every=Os});var cY=z((kL)=>{Object.defineProperty(kL,"__esModule",{value:!0});kL.exhaustMap=void 0;var ws=Y6(),PL=Y0(),Ts=x(),IL=l();function SL(D,F){if(F)return function($){return $.pipe(SL(function(J,Q){return PL.innerFrom(D(J,Q)).pipe(ws.map(function(Y,B){return F(J,Y,Q,B)}))}))};return Ts.operate(function($,J){var Q=0,Y=null,B=!1;$.subscribe(IL.createOperatorSubscriber(J,function(X){if(!Y)Y=IL.createOperatorSubscriber(J,void 0,function(){Y=null,B&&J.complete()}),PL.innerFrom(D(X,Q++)).subscribe(Y)},function(){B=!0,!Y&&J.complete()}))})}kL.exhaustMap=SL});var nY=z((yL)=>{Object.defineProperty(yL,"__esModule",{value:!0});yL.exhaustAll=void 0;var js=cY(),Ps=ED();function Is(){return js.exhaustMap(Ps.identity)}yL.exhaustAll=Is});var gL=z((_L)=>{Object.defineProperty(_L,"__esModule",{value:!0});_L.exhaust=void 0;var Ss=nY();_L.exhaust=Ss.exhaustAll});var uL=z((hL)=>{Object.defineProperty(hL,"__esModule",{value:!0});hL.expand=void 0;var ks=x(),vs=K7();function ys(D,F,$){if(F===void 0)F=1/0;return F=(F||0)<1?1/0:F,ks.operate(function(J,Q){return vs.mergeInternals(J,Q,D,F,void 0,!0,$)})}hL.expand=ys});var pL=z((mL)=>{Object.defineProperty(mL,"__esModule",{value:!0});mL.finalize=void 0;var xs=x();function _s(D){return xs.operate(function(F,$){try{F.subscribe($)}finally{$.add(D)}})}mL.finalize=_s});var iY=z((cL)=>{Object.defineProperty(cL,"__esModule",{value:!0});cL.createFind=cL.find=void 0;var fs=x(),gs=l();function hs(D,F){return fs.operate(dL(D,F,"value"))}cL.find=hs;function dL(D,F,$){var J=$==="index";return function(Q,Y){var B=0;Q.subscribe(gs.createOperatorSubscriber(Y,function(X){var G=B++;if(D.call(F,X,G,Q))Y.next(J?G:X),Y.complete()},function(){Y.next(J?-1:void 0),Y.complete()}))}}cL.createFind=dL});var oL=z((iL)=>{Object.defineProperty(iL,"__esModule",{value:!0});iL.findIndex=void 0;var us=x(),ms=iY();function ls(D,F){return us.operate(ms.createFind(D,F,"index"))}iL.findIndex=ls});var tL=z((sL)=>{Object.defineProperty(sL,"__esModule",{value:!0});sL.first=void 0;var ps=Q6(),ds=D4(),cs=tF(),ns=rF(),is=eF(),as=ED();function os(D,F){var $=arguments.length>=2;return function(J){return J.pipe(D?ds.filter(function(Q,Y){return D(Q,Y,J)}):as.identity,cs.take(1),$?ns.defaultIfEmpty(F):is.throwIfEmpty(function(){return new ps.EmptyError}))}}sL.first=os});var $A=z((DA)=>{Object.defineProperty(DA,"__esModule",{value:!0});DA.groupBy=void 0;var ss=v0(),rs=Y0(),ts=VD(),es=x(),eL=l();function Dr(D,F,$,J){return es.operate(function(Q,Y){var B;if(!F||typeof F==="function")B=F;else $=F.duration,B=F.element,J=F.connector;var X=new Map,G=function(Z){X.forEach(Z),Z(Y)},H=function(Z){return G(function(L){return L.error(Z)})},q=0,K=!1,V=new eL.OperatorSubscriber(Y,function(Z){try{var L=D(Z),A=X.get(L);if(!A){X.set(L,A=J?J():new ts.Subject);var M=E(L,A);if(Y.next(M),$){var R=eL.createOperatorSubscriber(A,function(){A.complete(),R===null||R===void 0||R.unsubscribe()},void 0,void 0,function(){return X.delete(L)});V.add(rs.innerFrom($(M)).subscribe(R))}}A.next(B?B(Z):Z)}catch(w){H(w)}},function(){return G(function(Z){return Z.complete()})},H,function(){return X.clear()},function(){return K=!0,q===0});Q.subscribe(V);function E(Z,L){var A=new ss.Observable(function(M){q++;var R=L.subscribe(M);return function(){R.unsubscribe(),--q===0&&K&&V.unsubscribe()}});return A.key=Z,A}})}DA.groupBy=Dr});var YA=z((JA)=>{Object.defineProperty(JA,"__esModule",{value:!0});JA.isEmpty=void 0;var Fr=x(),$r=l();function Jr(){return Fr.operate(function(D,F){D.subscribe($r.createOperatorSubscriber(F,function(){F.next(!1),F.complete()},function(){F.next(!0),F.complete()}))})}JA.isEmpty=Jr});var aY=z((N3)=>{var Qr=N3&&N3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(N3,"__esModule",{value:!0});N3.takeLast=void 0;var Yr=S1(),Br=x(),Xr=l();function Gr(D){return D<=0?function(){return Yr.EMPTY}:Br.operate(function(F,$){var J=[];F.subscribe(Xr.createOperatorSubscriber($,function(Q){J.push(Q),D<J.length&&J.shift()},function(){var Q,Y;try{for(var B=Qr(J),X=B.next();!X.done;X=B.next()){var G=X.value;$.next(G)}}catch(H){Q={error:H}}finally{try{if(X&&!X.done&&(Y=B.return))Y.call(B)}finally{if(Q)throw Q.error}}$.complete()},void 0,function(){J=null}))})}N3.takeLast=Gr});var GA=z((BA)=>{Object.defineProperty(BA,"__esModule",{value:!0});BA.last=void 0;var Wr=Q6(),Hr=D4(),qr=aY(),Kr=eF(),zr=rF(),Er=ED();function Vr(D,F){var $=arguments.length>=2;return function(J){return J.pipe(D?Hr.filter(function(Q,Y){return D(Q,Y,J)}):Er.identity,qr.takeLast(1),$?zr.defaultIfEmpty(F):Kr.throwIfEmpty(function(){return new Wr.EmptyError}))}}BA.last=Vr});var qA=z((WA)=>{Object.defineProperty(WA,"__esModule",{value:!0});WA.materialize=void 0;var oY=G7(),Zr=x(),Ur=l();function Lr(){return Zr.operate(function(D,F){D.subscribe(Ur.createOperatorSubscriber(F,function($){F.next(oY.Notification.createNext($))},function(){F.next(oY.Notification.createComplete()),F.complete()},function($){F.next(oY.Notification.createError($)),F.complete()}))})}WA.materialize=Lr});var EA=z((KA)=>{Object.defineProperty(KA,"__esModule",{value:!0});KA.max=void 0;var Ar=M3(),Mr=S0();function Nr(D){return Ar.reduce(Mr.isFunction(D)?function(F,$){return D(F,$)>0?F:$}:function(F,$){return F>$?F:$})}KA.max=Nr});var UA=z((VA)=>{Object.defineProperty(VA,"__esModule",{value:!0});VA.flatMap=void 0;var Cr=k8();VA.flatMap=Cr.mergeMap});var NA=z((AA)=>{Object.defineProperty(AA,"__esModule",{value:!0});AA.mergeMapTo=void 0;var LA=k8(),Rr=S0();function Or(D,F,$){if($===void 0)$=1/0;if(Rr.isFunction(F))return LA.mergeMap(function(){return D},F,$);if(typeof F==="number")$=F;return LA.mergeMap(function(){return D},$)}AA.mergeMapTo=Or});var OA=z((CA)=>{Object.defineProperty(CA,"__esModule",{value:!0});CA.mergeScan=void 0;var wr=x(),Tr=K7();function jr(D,F,$){if($===void 0)$=1/0;return wr.operate(function(J,Q){var Y=F;return Tr.mergeInternals(J,Q,function(B,X){return D(Y,B,X)},$,function(B){Y=B},!1,void 0,function(){return Y=null})})}CA.mergeScan=jr});var TA=z((Z6)=>{var Pr=Z6&&Z6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},Ir=Z6&&Z6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(Z6,"__esModule",{value:!0});Z6.merge=void 0;var Sr=x(),kr=aF(),wA=cD(),vr=S8();function yr(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=wA.popScheduler(D),J=wA.popNumber(D,1/0);return Sr.operate(function(Q,Y){kr.mergeAll(J)(vr.from(Ir([Q],Pr(D)),$)).subscribe(Y)})}Z6.merge=yr});var jA=z((U6)=>{var xr=U6&&U6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},_r=U6&&U6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(U6,"__esModule",{value:!0});U6.mergeWith=void 0;var fr=TA();function gr(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return fr.merge.apply(void 0,_r([],xr(D)))}U6.mergeWith=gr});var SA=z((PA)=>{Object.defineProperty(PA,"__esModule",{value:!0});PA.min=void 0;var hr=M3(),br=S0();function ur(D){return hr.reduce(br.isFunction(D)?function(F,$){return D(F,$)<0?F:$}:function(F,$){return F<$?F:$})}PA.min=ur});var Z7=z((vA)=>{Object.defineProperty(vA,"__esModule",{value:!0});vA.multicast=void 0;var mr=dF(),kA=S0(),lr=V7();function pr(D,F){var $=kA.isFunction(D)?D:function(){return D};if(kA.isFunction(F))return lr.connect(F,{connector:$});return function(J){return new mr.ConnectableObservable(J,$)}}vA.multicast=pr});var _A=z((Q8)=>{var dr=Q8&&Q8.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},cr=Q8&&Q8.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(Q8,"__esModule",{value:!0});Q8.onErrorResumeNext=Q8.onErrorResumeNextWith=void 0;var nr=Z3(),ir=kY();function xA(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=nr.argsOrArgArray(D);return function(J){return ir.onErrorResumeNext.apply(void 0,cr([J],dr($)))}}Q8.onErrorResumeNextWith=xA;Q8.onErrorResumeNext=xA});var hA=z((fA)=>{Object.defineProperty(fA,"__esModule",{value:!0});fA.pairwise=void 0;var ar=x(),or=l();function sr(){return ar.operate(function(D,F){var $,J=!1;D.subscribe(or.createOperatorSubscriber(F,function(Q){var Y=$;$=Q,J&&F.next([Y,Q]),J=!0}))})}fA.pairwise=sr});var mA=z((bA)=>{Object.defineProperty(bA,"__esModule",{value:!0});bA.pluck=void 0;var rr=Y6();function tr(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=D.length;if($===0)throw Error("list of properties cannot be empty.");return rr.map(function(J){var Q=J;for(var Y=0;Y<$;Y++){var B=Q===null||Q===void 0?void 0:Q[D[Y]];if(typeof B<"u")Q=B;else return}return Q})}bA.pluck=tr});var dA=z((lA)=>{Object.defineProperty(lA,"__esModule",{value:!0});lA.publish=void 0;var er=VD(),Dt=Z7(),Ft=V7();function $t(D){return D?function(F){return Ft.connect(D)(F)}:function(F){return Dt.multicast(new er.Subject)(F)}}lA.publish=$t});var iA=z((cA)=>{Object.defineProperty(cA,"__esModule",{value:!0});cA.publishBehavior=void 0;var Jt=JY(),Qt=dF();function Yt(D){return function(F){var $=new Jt.BehaviorSubject(D);return new Qt.ConnectableObservable(F,function(){return $})}}cA.publishBehavior=Yt});var sA=z((aA)=>{Object.defineProperty(aA,"__esModule",{value:!0});aA.publishLast=void 0;var Bt=J7(),Xt=dF();function Gt(){return function(D){var F=new Bt.AsyncSubject;return new Xt.ConnectableObservable(D,function(){return F})}}aA.publishLast=Gt});var DM=z((tA)=>{Object.defineProperty(tA,"__esModule",{value:!0});tA.publishReplay=void 0;var Wt=$7(),Ht=Z7(),rA=S0();function qt(D,F,$,J){if($&&!rA.isFunction($))J=$;var Q=rA.isFunction($)?$:void 0;return function(Y){return Ht.multicast(new Wt.ReplaySubject(D,F,J),Q)(Y)}}tA.publishReplay=qt});var FM=z((L6)=>{var Kt=L6&&L6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},zt=L6&&L6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(L6,"__esModule",{value:!0});L6.raceWith=void 0;var Et=vY(),Vt=x(),Zt=ED();function Ut(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return!D.length?Zt.identity:Vt.operate(function($,J){Et.raceInit(zt([$],Kt(D)))(J)})}L6.raceWith=Ut});var YM=z((JM)=>{Object.defineProperty(JM,"__esModule",{value:!0});JM.repeat=void 0;var Lt=S1(),At=x(),$M=l(),Mt=Y0(),Nt=W6();function Ct(D){var F,$=1/0,J;if(D!=null)if(typeof D==="object")F=D.count,$=F===void 0?1/0:F,J=D.delay;else $=D;return $<=0?function(){return Lt.EMPTY}:At.operate(function(Q,Y){var B=0,X,G=function(){if(X===null||X===void 0||X.unsubscribe(),X=null,J!=null){var q=typeof J==="number"?Nt.timer(J):Mt.innerFrom(J(B)),K=$M.createOperatorSubscriber(Y,function(){K.unsubscribe(),H()});q.subscribe(K)}else H()},H=function(){var q=!1;if(X=Q.subscribe($M.createOperatorSubscriber(Y,void 0,function(){if(++B<$)if(X)G();else q=!0;else Y.complete()})),q)G()};H()})}JM.repeat=Ct});var WM=z((XM)=>{Object.defineProperty(XM,"__esModule",{value:!0});XM.repeatWhen=void 0;var Rt=Y0(),Ot=VD(),wt=x(),BM=l();function Tt(D){return wt.operate(function(F,$){var J,Q=!1,Y,B=!1,X=!1,G=function(){return X&&B&&($.complete(),!0)},H=function(){if(!Y)Y=new Ot.Subject,Rt.innerFrom(D(Y)).subscribe(BM.createOperatorSubscriber($,function(){if(J)q();else Q=!0},function(){B=!0,G()}));return Y},q=function(){if(X=!1,J=F.subscribe(BM.createOperatorSubscriber($,void 0,function(){X=!0,!G()&&H().next()})),Q)J.unsubscribe(),J=null,Q=!1,q()};q()})}XM.repeatWhen=Tt});var zM=z((qM)=>{Object.defineProperty(qM,"__esModule",{value:!0});qM.retry=void 0;var jt=x(),HM=l(),Pt=ED(),It=W6(),St=Y0();function kt(D){if(D===void 0)D=1/0;var F;if(D&&typeof D==="object")F=D;else F={count:D};var $=F.count,J=$===void 0?1/0:$,Q=F.delay,Y=F.resetOnSuccess,B=Y===void 0?!1:Y;return J<=0?Pt.identity:jt.operate(function(X,G){var H=0,q,K=function(){var V=!1;if(q=X.subscribe(HM.createOperatorSubscriber(G,function(E){if(B)H=0;G.next(E)},void 0,function(E){if(H++<J){var Z=function(){if(q)q.unsubscribe(),q=null,K();else V=!0};if(Q!=null){var L=typeof Q==="number"?It.timer(Q):St.innerFrom(Q(E,H)),A=HM.createOperatorSubscriber(G,function(){A.unsubscribe(),Z()},function(){G.complete()});L.subscribe(A)}else Z()}else G.error(E)})),V)q.unsubscribe(),q=null,K()};K()})}qM.retry=kt});var UM=z((VM)=>{Object.defineProperty(VM,"__esModule",{value:!0});VM.retryWhen=void 0;var vt=Y0(),yt=VD(),xt=x(),EM=l();function _t(D){return xt.operate(function(F,$){var J,Q=!1,Y,B=function(){if(J=F.subscribe(EM.createOperatorSubscriber($,void 0,void 0,function(X){if(!Y)Y=new yt.Subject,vt.innerFrom(D(Y)).subscribe(EM.createOperatorSubscriber($,function(){return J?B():Q=!0}));if(Y)Y.next(X)})),Q)J.unsubscribe(),J=null,Q=!1,B()};B()})}VM.retryWhen=_t});var sY=z((AM)=>{Object.defineProperty(AM,"__esModule",{value:!0});AM.sample=void 0;var ft=Y0(),gt=x(),ht=zD(),LM=l();function bt(D){return gt.operate(function(F,$){var J=!1,Q=null;F.subscribe(LM.createOperatorSubscriber($,function(Y){J=!0,Q=Y})),ft.innerFrom(D).subscribe(LM.createOperatorSubscriber($,function(){if(J){J=!1;var Y=Q;Q=null,$.next(Y)}},ht.noop))})}AM.sample=bt});var RM=z((NM)=>{Object.defineProperty(NM,"__esModule",{value:!0});NM.sampleTime=void 0;var ut=dD(),mt=sY(),lt=IY();function pt(D,F){if(F===void 0)F=ut.asyncScheduler;return mt.sample(lt.interval(D,F))}NM.sampleTime=pt});var TM=z((OM)=>{Object.defineProperty(OM,"__esModule",{value:!0});OM.scan=void 0;var dt=x(),ct=fY();function nt(D,F){return dt.operate(ct.scanInternals(D,F,arguments.length>=2,!0))}OM.scan=nt});var SM=z((PM)=>{Object.defineProperty(PM,"__esModule",{value:!0});PM.sequenceEqual=void 0;var it=x(),at=l(),ot=Y0();function st(D,F){if(F===void 0)F=function($,J){return $===J};return it.operate(function($,J){var Q=jM(),Y=jM(),B=function(G){J.next(G),J.complete()},X=function(G,H){var q=at.createOperatorSubscriber(J,function(K){var{buffer:V,complete:E}=H;if(V.length===0)E?B(!1):G.buffer.push(K);else!F(K,V.shift())&&B(!1)},function(){G.complete=!0;var{complete:K,buffer:V}=H;K&&B(V.length===0),q===null||q===void 0||q.unsubscribe()});return q};$.subscribe(X(Q,Y)),ot.innerFrom(D).subscribe(X(Y,Q))})}PM.sequenceEqual=st;function jM(){return{buffer:[],complete:!1}}});var tY=z((A6)=>{var rt=A6&&A6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},tt=A6&&A6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(A6,"__esModule",{value:!0});A6.share=void 0;var kM=Y0(),et=VD(),vM=s4(),De=x();function Fe(D){if(D===void 0)D={};var F=D.connector,$=F===void 0?function(){return new et.Subject}:F,J=D.resetOnError,Q=J===void 0?!0:J,Y=D.resetOnComplete,B=Y===void 0?!0:Y,X=D.resetOnRefCountZero,G=X===void 0?!0:X;return function(H){var q,K,V,E=0,Z=!1,L=!1,A=function(){K===null||K===void 0||K.unsubscribe(),K=void 0},M=function(){A(),q=V=void 0,Z=L=!1},R=function(){var w=q;M(),w===null||w===void 0||w.unsubscribe()};return De.operate(function(w,k){if(E++,!L&&!Z)A();var O=V=V!==null&&V!==void 0?V:$();if(k.add(function(){if(E--,E===0&&!L&&!Z)K=rY(R,G)}),O.subscribe(k),!q&&E>0)q=new vM.SafeSubscriber({next:function(j){return O.next(j)},error:function(j){L=!0,A(),K=rY(M,Q,j),O.error(j)},complete:function(){Z=!0,A(),K=rY(M,B),O.complete()}}),kM.innerFrom(w).subscribe(q)})(H)}}A6.share=Fe;function rY(D,F){var $=[];for(var J=2;J<arguments.length;J++)$[J-2]=arguments[J];if(F===!0){D();return}if(F===!1)return;var Q=new vM.SafeSubscriber({next:function(){Q.unsubscribe(),D()}});return kM.innerFrom(F.apply(void 0,tt([],rt($)))).subscribe(Q)}});var _M=z((yM)=>{Object.defineProperty(yM,"__esModule",{value:!0});yM.shareReplay=void 0;var $e=$7(),Je=tY();function Qe(D,F,$){var J,Q,Y,B,X=!1;if(D&&typeof D==="object")J=D.bufferSize,B=J===void 0?1/0:J,Q=D.windowTime,F=Q===void 0?1/0:Q,Y=D.refCount,X=Y===void 0?!1:Y,$=D.scheduler;else B=D!==null&&D!==void 0?D:1/0;return Je.share({connector:function(){return new $e.ReplaySubject(B,F,$)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:X})}yM.shareReplay=Qe});var hM=z((fM)=>{Object.defineProperty(fM,"__esModule",{value:!0});fM.single=void 0;var Ye=Q6(),Be=RY(),Xe=CY(),Ge=x(),We=l();function He(D){return Ge.operate(function(F,$){var J=!1,Q,Y=!1,B=0;F.subscribe(We.createOperatorSubscriber($,function(X){if(Y=!0,!D||D(X,B++,F))J&&$.error(new Be.SequenceError("Too many matching values")),J=!0,Q=X},function(){if(J)$.next(Q),$.complete();else $.error(Y?new Xe.NotFoundError("No matching values"):new Ye.EmptyError)}))})}fM.single=He});var mM=z((bM)=>{Object.defineProperty(bM,"__esModule",{value:!0});bM.skip=void 0;var qe=D4();function Ke(D){return qe.filter(function(F,$){return D<=$})}bM.skip=Ke});var dM=z((lM)=>{Object.defineProperty(lM,"__esModule",{value:!0});lM.skipLast=void 0;var ze=ED(),Ee=x(),Ve=l();function Ze(D){return D<=0?ze.identity:Ee.operate(function(F,$){var J=Array(D),Q=0;return F.subscribe(Ve.createOperatorSubscriber($,function(Y){var B=Q++;if(B<D)J[B]=Y;else{var X=B%D,G=J[X];J[X]=Y,$.next(G)}})),function(){J=null}})}lM.skipLast=Ze});var aM=z((nM)=>{Object.defineProperty(nM,"__esModule",{value:!0});nM.skipUntil=void 0;var Ue=x(),cM=l(),Le=Y0(),Ae=zD();function Me(D){return Ue.operate(function(F,$){var J=!1,Q=cM.createOperatorSubscriber($,function(){Q===null||Q===void 0||Q.unsubscribe(),J=!0},Ae.noop);Le.innerFrom(D).subscribe(Q),F.subscribe(cM.createOperatorSubscriber($,function(Y){return J&&$.next(Y)}))})}nM.skipUntil=Me});var rM=z((oM)=>{Object.defineProperty(oM,"__esModule",{value:!0});oM.skipWhile=void 0;var Ne=x(),Ce=l();function Re(D){return Ne.operate(function(F,$){var J=!1,Q=0;F.subscribe(Ce.createOperatorSubscriber($,function(Y){return(J||(J=!D(Y,Q++)))&&$.next(Y)}))})}oM.skipWhile=Re});var FN=z((eM)=>{Object.defineProperty(eM,"__esModule",{value:!0});eM.startWith=void 0;var tM=oF(),Oe=cD(),we=x();function Te(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=Oe.popScheduler(D);return we.operate(function(J,Q){($?tM.concat(D,J,$):tM.concat(D,J)).subscribe(Q)})}eM.startWith=Te});var D5=z((JN)=>{Object.defineProperty(JN,"__esModule",{value:!0});JN.switchMap=void 0;var je=Y0(),Pe=x(),$N=l();function Ie(D,F){return Pe.operate(function($,J){var Q=null,Y=0,B=!1,X=function(){return B&&!Q&&J.complete()};$.subscribe($N.createOperatorSubscriber(J,function(G){Q===null||Q===void 0||Q.unsubscribe();var H=0,q=Y++;je.innerFrom(D(G,q)).subscribe(Q=$N.createOperatorSubscriber(J,function(K){return J.next(F?F(G,K,q,H++):K)},function(){Q=null,X()}))},function(){B=!0,X()}))})}JN.switchMap=Ie});var XN=z((YN)=>{Object.defineProperty(YN,"__esModule",{value:!0});YN.switchAll=void 0;var Se=D5(),ke=ED();function ve(){return Se.switchMap(ke.identity)}YN.switchAll=ve});var qN=z((WN)=>{Object.defineProperty(WN,"__esModule",{value:!0});WN.switchMapTo=void 0;var GN=D5(),ye=S0();function xe(D,F){return ye.isFunction(F)?GN.switchMap(function(){return D},F):GN.switchMap(function(){return D})}WN.switchMapTo=xe});var EN=z((KN)=>{Object.defineProperty(KN,"__esModule",{value:!0});KN.switchScan=void 0;var _e=D5(),fe=x();function ge(D,F){return fe.operate(function($,J){var Q=F;return _e.switchMap(function(Y,B){return D(Q,Y,B)},function(Y,B){return Q=B,B})($).subscribe(J),function(){Q=null}})}KN.switchScan=ge});var UN=z((VN)=>{Object.defineProperty(VN,"__esModule",{value:!0});VN.takeUntil=void 0;var he=x(),be=l(),ue=Y0(),me=zD();function le(D){return he.operate(function(F,$){ue.innerFrom(D).subscribe(be.createOperatorSubscriber($,function(){return $.complete()},me.noop)),!$.closed&&F.subscribe($)})}VN.takeUntil=le});var MN=z((LN)=>{Object.defineProperty(LN,"__esModule",{value:!0});LN.takeWhile=void 0;var pe=x(),de=l();function ce(D,F){if(F===void 0)F=!1;return pe.operate(function($,J){var Q=0;$.subscribe(de.createOperatorSubscriber(J,function(Y){var B=D(Y,Q++);(B||F)&&J.next(Y),!B&&J.complete()}))})}LN.takeWhile=ce});var RN=z((NN)=>{Object.defineProperty(NN,"__esModule",{value:!0});NN.tap=void 0;var ne=S0(),ie=x(),ae=l(),oe=ED();function se(D,F,$){var J=ne.isFunction(D)||F||$?{next:D,error:F,complete:$}:D;return J?ie.operate(function(Q,Y){var B;(B=J.subscribe)===null||B===void 0||B.call(J);var X=!0;Q.subscribe(ae.createOperatorSubscriber(Y,function(G){var H;(H=J.next)===null||H===void 0||H.call(J,G),Y.next(G)},function(){var G;X=!1,(G=J.complete)===null||G===void 0||G.call(J),Y.complete()},function(G){var H;X=!1,(H=J.error)===null||H===void 0||H.call(J,G),Y.error(G)},function(){var G,H;if(X)(G=J.unsubscribe)===null||G===void 0||G.call(J);(H=J.finalize)===null||H===void 0||H.call(J)}))}):oe.identity}NN.tap=se});var eY=z((wN)=>{Object.defineProperty(wN,"__esModule",{value:!0});wN.throttle=void 0;var re=x(),ON=l(),te=Y0();function ee(D,F){return re.operate(function($,J){var Q=F!==null&&F!==void 0?F:{},Y=Q.leading,B=Y===void 0?!0:Y,X=Q.trailing,G=X===void 0?!1:X,H=!1,q=null,K=null,V=!1,E=function(){if(K===null||K===void 0||K.unsubscribe(),K=null,G)A(),V&&J.complete()},Z=function(){K=null,V&&J.complete()},L=function(M){return K=te.innerFrom(D(M)).subscribe(ON.createOperatorSubscriber(J,E,Z))},A=function(){if(H){H=!1;var M=q;q=null,J.next(M),!V&&L(M)}};$.subscribe(ON.createOperatorSubscriber(J,function(M){H=!0,q=M,!(K&&!K.closed)&&(B?A():L(M))},function(){V=!0,!(G&&H&&K&&!K.closed)&&J.complete()}))})}wN.throttle=ee});var IN=z((jN)=>{Object.defineProperty(jN,"__esModule",{value:!0});jN.throttleTime=void 0;var D00=dD(),F00=eY(),$00=W6();function J00(D,F,$){if(F===void 0)F=D00.asyncScheduler;var J=$00.timer(D,F);return F00.throttle(function(){return J},$)}jN.throttleTime=J00});var yN=z((kN)=>{Object.defineProperty(kN,"__esModule",{value:!0});kN.TimeInterval=kN.timeInterval=void 0;var Q00=dD(),Y00=x(),B00=l();function X00(D){if(D===void 0)D=Q00.asyncScheduler;return Y00.operate(function(F,$){var J=D.now();F.subscribe(B00.createOperatorSubscriber($,function(Q){var Y=D.now(),B=Y-J;J=Y,$.next(new SN(Q,B))}))})}kN.timeInterval=X00;var SN=function(){function D(F,$){this.value=F,this.interval=$}return D}();kN.TimeInterval=SN});var fN=z((xN)=>{Object.defineProperty(xN,"__esModule",{value:!0});xN.timeoutWith=void 0;var W00=dD(),H00=W7(),q00=H7();function K00(D,F,$){var J,Q,Y;if($=$!==null&&$!==void 0?$:W00.async,H00.isValidDate(D))J=D;else if(typeof D==="number")Q=D;if(F)Y=function(){return F};else throw TypeError("No observable provided to switch to");if(J==null&&Q==null)throw TypeError("No timeout provided.");return q00.timeout({first:J,each:Q,scheduler:$,with:Y})}xN.timeoutWith=K00});var bN=z((gN)=>{Object.defineProperty(gN,"__esModule",{value:!0});gN.timestamp=void 0;var z00=F7(),E00=Y6();function V00(D){if(D===void 0)D=z00.dateTimestampProvider;return E00.map(function(F){return{value:F,timestamp:D.now()}})}gN.timestamp=V00});var dN=z((lN)=>{Object.defineProperty(lN,"__esModule",{value:!0});lN.window=void 0;var uN=VD(),Z00=x(),mN=l(),U00=zD(),L00=Y0();function A00(D){return Z00.operate(function(F,$){var J=new uN.Subject;$.next(J.asObservable());var Q=function(Y){J.error(Y),$.error(Y)};return F.subscribe(mN.createOperatorSubscriber($,function(Y){return J===null||J===void 0?void 0:J.next(Y)},function(){J.complete(),$.complete()},Q)),L00.innerFrom(D).subscribe(mN.createOperatorSubscriber($,function(){J.complete(),$.next(J=new uN.Subject)},U00.noop,Q)),function(){J===null||J===void 0||J.unsubscribe(),J=null}})}lN.window=A00});var nN=z((C3)=>{var M00=C3&&C3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(C3,"__esModule",{value:!0});C3.windowCount=void 0;var cN=VD(),N00=x(),C00=l();function R00(D,F){if(F===void 0)F=0;var $=F>0?F:D;return N00.operate(function(J,Q){var Y=[new cN.Subject],B=[],X=0;Q.next(Y[0].asObservable()),J.subscribe(C00.createOperatorSubscriber(Q,function(G){var H,q;try{for(var K=M00(Y),V=K.next();!V.done;V=K.next()){var E=V.value;E.next(G)}}catch(A){H={error:A}}finally{try{if(V&&!V.done&&(q=K.return))q.call(K)}finally{if(H)throw H.error}}var Z=X-D+1;if(Z>=0&&Z%$===0)Y.shift().complete();if(++X%$===0){var L=new cN.Subject;Y.push(L),Q.next(L.asObservable())}},function(){while(Y.length>0)Y.shift().complete();Q.complete()},function(G){while(Y.length>0)Y.shift().error(G);Q.error(G)},function(){B=null,Y=null}))})}C3.windowCount=R00});var sN=z((aN)=>{Object.defineProperty(aN,"__esModule",{value:!0});aN.windowTime=void 0;var O00=VD(),w00=dD(),T00=F1(),j00=x(),P00=l(),I00=P8(),S00=cD(),iN=I8();function k00(D){var F,$,J=[];for(var Q=1;Q<arguments.length;Q++)J[Q-1]=arguments[Q];var Y=(F=S00.popScheduler(J))!==null&&F!==void 0?F:w00.asyncScheduler,B=($=J[0])!==null&&$!==void 0?$:null,X=J[1]||1/0;return j00.operate(function(G,H){var q=[],K=!1,V=function(A){var{window:M,subs:R}=A;M.complete(),R.unsubscribe(),I00.arrRemove(q,A),K&&E()},E=function(){if(q){var A=new T00.Subscription;H.add(A);var M=new O00.Subject,R={window:M,subs:A,seen:0};q.push(R),H.next(M.asObservable()),iN.executeSchedule(A,Y,function(){return V(R)},D)}};if(B!==null&&B>=0)iN.executeSchedule(H,Y,E,B,!0);else K=!0;E();var Z=function(A){return q.slice().forEach(A)},L=function(A){Z(function(M){var R=M.window;return A(R)}),A(H),H.unsubscribe()};return G.subscribe(P00.createOperatorSubscriber(H,function(A){Z(function(M){M.window.next(A),X<=++M.seen&&V(M)})},function(){return L(function(A){return A.complete()})},function(A){return L(function(M){return M.error(A)})})),function(){q=null}})}aN.windowTime=k00});var eN=z((R3)=>{var v00=R3&&R3.__values||function(D){var F=typeof Symbol==="function"&&Symbol.iterator,$=F&&D[F],J=0;if($)return $.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&J>=D.length)D=void 0;return{value:D&&D[J++],done:!D}}};throw TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(R3,"__esModule",{value:!0});R3.windowToggle=void 0;var y00=VD(),x00=F1(),_00=x(),rN=Y0(),DB=l(),tN=zD(),f00=P8();function g00(D,F){return _00.operate(function($,J){var Q=[],Y=function(B){while(0<Q.length)Q.shift().error(B);J.error(B)};rN.innerFrom(D).subscribe(DB.createOperatorSubscriber(J,function(B){var X=new y00.Subject;Q.push(X);var G=new x00.Subscription,H=function(){f00.arrRemove(Q,X),X.complete(),G.unsubscribe()},q;try{q=rN.innerFrom(F(B))}catch(K){Y(K);return}J.next(X.asObservable()),G.add(q.subscribe(DB.createOperatorSubscriber(J,H,tN.noop,Y)))},tN.noop)),$.subscribe(DB.createOperatorSubscriber(J,function(B){var X,G,H=Q.slice();try{for(var q=v00(H),K=q.next();!K.done;K=q.next()){var V=K.value;V.next(B)}}catch(E){X={error:E}}finally{try{if(K&&!K.done&&(G=q.return))G.call(q)}finally{if(X)throw X.error}}},function(){while(0<Q.length)Q.shift().complete();J.complete()},Y,function(){while(0<Q.length)Q.shift().unsubscribe()}))})}R3.windowToggle=g00});var JC=z((FC)=>{Object.defineProperty(FC,"__esModule",{value:!0});FC.windowWhen=void 0;var h00=VD(),b00=x(),DC=l(),u00=Y0();function m00(D){return b00.operate(function(F,$){var J,Q,Y=function(X){J.error(X),$.error(X)},B=function(){Q===null||Q===void 0||Q.unsubscribe(),J===null||J===void 0||J.complete(),J=new h00.Subject,$.next(J.asObservable());var X;try{X=u00.innerFrom(D())}catch(G){Y(G);return}X.subscribe(Q=DC.createOperatorSubscriber($,B,B,Y))};B(),F.subscribe(DC.createOperatorSubscriber($,function(X){return J.next(X)},function(){J.complete(),$.complete()},Y,function(){Q===null||Q===void 0||Q.unsubscribe(),J=null}))})}FC.windowWhen=m00});var XC=z((M6)=>{var QC=M6&&M6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},YC=M6&&M6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(M6,"__esModule",{value:!0});M6.withLatestFrom=void 0;var l00=x(),BC=l(),p00=Y0(),d00=ED(),c00=zD(),n00=cD();function i00(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];var $=n00.popResultSelector(D);return l00.operate(function(J,Q){var Y=D.length,B=Array(Y),X=D.map(function(){return!1}),G=!1,H=function(K){p00.innerFrom(D[K]).subscribe(BC.createOperatorSubscriber(Q,function(V){if(B[K]=V,!G&&!X[K])X[K]=!0,(G=X.every(d00.identity))&&(X=null)},c00.noop))};for(var q=0;q<Y;q++)H(q);J.subscribe(BC.createOperatorSubscriber(Q,function(K){if(G){var V=YC([K],QC(B));Q.next($?$.apply(void 0,YC([],QC(V))):V)}}))})}M6.withLatestFrom=i00});var HC=z((GC)=>{Object.defineProperty(GC,"__esModule",{value:!0});GC.zipAll=void 0;var a00=E7(),o00=hY();function s00(D){return o00.joinAllInternals(a00.zip,D)}GC.zipAll=s00});var qC=z((N6)=>{var r00=N6&&N6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},t00=N6&&N6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(N6,"__esModule",{value:!0});N6.zip=void 0;var e00=E7(),DD0=x();function FD0(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return DD0.operate(function($,J){e00.zip.apply(void 0,t00([$],r00(D))).subscribe(J)})}N6.zip=FD0});var KC=z((C6)=>{var $D0=C6&&C6.__read||function(D,F){var $=typeof Symbol==="function"&&D[Symbol.iterator];if(!$)return D;var J=$.call(D),Q,Y=[],B;try{while((F===void 0||F-- >0)&&!(Q=J.next()).done)Y.push(Q.value)}catch(X){B={error:X}}finally{try{if(Q&&!Q.done&&($=J.return))$.call(J)}finally{if(B)throw B.error}}return Y},JD0=C6&&C6.__spreadArray||function(D,F){for(var $=0,J=F.length,Q=D.length;$<J;$++,Q++)D[Q]=F[$];return D};Object.defineProperty(C6,"__esModule",{value:!0});C6.zipWith=void 0;var QD0=qC();function YD0(){var D=[];for(var F=0;F<arguments.length;F++)D[F]=arguments[F];return QD0.zip.apply(void 0,JD0([],$D0(D)))}C6.zipWith=YD0});var $1=z((U)=>{var BD0=U&&U.__createBinding||(Object.create?function(D,F,$,J){if(J===void 0)J=$;Object.defineProperty(D,J,{enumerable:!0,get:function(){return F[$]}})}:function(D,F,$,J){if(J===void 0)J=$;D[J]=F[$]}),XD0=U&&U.__exportStar||function(D,F){for(var $ in D)if($!=="default"&&!Object.prototype.hasOwnProperty.call(F,$))BD0(F,D,$)};Object.defineProperty(U,"__esModule",{value:!0});U.interval=U.iif=U.generate=U.fromEventPattern=U.fromEvent=U.from=U.forkJoin=U.empty=U.defer=U.connectable=U.concat=U.combineLatest=U.bindNodeCallback=U.bindCallback=U.UnsubscriptionError=U.TimeoutError=U.SequenceError=U.ObjectUnsubscribedError=U.NotFoundError=U.EmptyError=U.ArgumentOutOfRangeError=U.firstValueFrom=U.lastValueFrom=U.isObservable=U.identity=U.noop=U.pipe=U.NotificationKind=U.Notification=U.Subscriber=U.Subscription=U.Scheduler=U.VirtualAction=U.VirtualTimeScheduler=U.animationFrameScheduler=U.animationFrame=U.queueScheduler=U.queue=U.asyncScheduler=U.async=U.asapScheduler=U.asap=U.AsyncSubject=U.ReplaySubject=U.BehaviorSubject=U.Subject=U.animationFrames=U.observable=U.ConnectableObservable=U.Observable=void 0;U.filter=U.expand=U.exhaustMap=U.exhaustAll=U.exhaust=U.every=U.endWith=U.elementAt=U.distinctUntilKeyChanged=U.distinctUntilChanged=U.distinct=U.dematerialize=U.delayWhen=U.delay=U.defaultIfEmpty=U.debounceTime=U.debounce=U.count=U.connect=U.concatWith=U.concatMapTo=U.concatMap=U.concatAll=U.combineLatestWith=U.combineLatestAll=U.combineAll=U.catchError=U.bufferWhen=U.bufferToggle=U.bufferTime=U.bufferCount=U.buffer=U.auditTime=U.audit=U.config=U.NEVER=U.EMPTY=U.scheduled=U.zip=U.using=U.timer=U.throwError=U.range=U.race=U.partition=U.pairs=U.onErrorResumeNext=U.of=U.never=U.merge=void 0;U.switchMap=U.switchAll=U.subscribeOn=U.startWith=U.skipWhile=U.skipUntil=U.skipLast=U.skip=U.single=U.shareReplay=U.share=U.sequenceEqual=U.scan=U.sampleTime=U.sample=U.refCount=U.retryWhen=U.retry=U.repeatWhen=U.repeat=U.reduce=U.raceWith=U.publishReplay=U.publishLast=U.publishBehavior=U.publish=U.pluck=U.pairwise=U.onErrorResumeNextWith=U.observeOn=U.multicast=U.min=U.mergeWith=U.mergeScan=U.mergeMapTo=U.mergeMap=U.flatMap=U.mergeAll=U.max=U.materialize=U.mapTo=U.map=U.last=U.isEmpty=U.ignoreElements=U.groupBy=U.first=U.findIndex=U.find=U.finalize=void 0;U.zipWith=U.zipAll=U.withLatestFrom=U.windowWhen=U.windowToggle=U.windowTime=U.windowCount=U.window=U.toArray=U.timestamp=U.timeoutWith=U.timeout=U.timeInterval=U.throwIfEmpty=U.throttleTime=U.throttle=U.tap=U.takeWhile=U.takeUntil=U.takeLast=U.take=U.switchScan=U.switchMapTo=void 0;var GD0=v0();Object.defineProperty(U,"Observable",{enumerable:!0,get:function(){return GD0.Observable}});var WD0=dF();Object.defineProperty(U,"ConnectableObservable",{enumerable:!0,get:function(){return WD0.ConnectableObservable}});var HD0=lF();Object.defineProperty(U,"observable",{enumerable:!0,get:function(){return HD0.observable}});var qD0=CK();Object.defineProperty(U,"animationFrames",{enumerable:!0,get:function(){return qD0.animationFrames}});var KD0=VD();Object.defineProperty(U,"Subject",{enumerable:!0,get:function(){return KD0.Subject}});var zD0=JY();Object.defineProperty(U,"BehaviorSubject",{enumerable:!0,get:function(){return zD0.BehaviorSubject}});var ED0=$7();Object.defineProperty(U,"ReplaySubject",{enumerable:!0,get:function(){return ED0.ReplaySubject}});var VD0=J7();Object.defineProperty(U,"AsyncSubject",{enumerable:!0,get:function(){return VD0.AsyncSubject}});var zC=oK();Object.defineProperty(U,"asap",{enumerable:!0,get:function(){return zC.asap}});Object.defineProperty(U,"asapScheduler",{enumerable:!0,get:function(){return zC.asapScheduler}});var EC=dD();Object.defineProperty(U,"async",{enumerable:!0,get:function(){return EC.async}});Object.defineProperty(U,"asyncScheduler",{enumerable:!0,get:function(){return EC.asyncScheduler}});var VC=Qz();Object.defineProperty(U,"queue",{enumerable:!0,get:function(){return VC.queue}});Object.defineProperty(U,"queueScheduler",{enumerable:!0,get:function(){return VC.queueScheduler}});var ZC=qz();Object.defineProperty(U,"animationFrame",{enumerable:!0,get:function(){return ZC.animationFrame}});Object.defineProperty(U,"animationFrameScheduler",{enumerable:!0,get:function(){return ZC.animationFrameScheduler}});var UC=Ez();Object.defineProperty(U,"VirtualTimeScheduler",{enumerable:!0,get:function(){return UC.VirtualTimeScheduler}});Object.defineProperty(U,"VirtualAction",{enumerable:!0,get:function(){return UC.VirtualAction}});var ZD0=BY();Object.defineProperty(U,"Scheduler",{enumerable:!0,get:function(){return ZD0.Scheduler}});var UD0=F1();Object.defineProperty(U,"Subscription",{enumerable:!0,get:function(){return UD0.Subscription}});var LD0=s4();Object.defineProperty(U,"Subscriber",{enumerable:!0,get:function(){return LD0.Subscriber}});var LC=G7();Object.defineProperty(U,"Notification",{enumerable:!0,get:function(){return LC.Notification}});Object.defineProperty(U,"NotificationKind",{enumerable:!0,get:function(){return LC.NotificationKind}});var AD0=pF();Object.defineProperty(U,"pipe",{enumerable:!0,get:function(){return AD0.pipe}});var MD0=zD();Object.defineProperty(U,"noop",{enumerable:!0,get:function(){return MD0.noop}});var ND0=ED();Object.defineProperty(U,"identity",{enumerable:!0,get:function(){return ND0.identity}});var CD0=IE();Object.defineProperty(U,"isObservable",{enumerable:!0,get:function(){return CD0.isObservable}});var RD0=xE();Object.defineProperty(U,"lastValueFrom",{enumerable:!0,get:function(){return RD0.lastValueFrom}});var OD0=gE();Object.defineProperty(U,"firstValueFrom",{enumerable:!0,get:function(){return OD0.firstValueFrom}});var wD0=NY();Object.defineProperty(U,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return wD0.ArgumentOutOfRangeError}});var TD0=Q6();Object.defineProperty(U,"EmptyError",{enumerable:!0,get:function(){return TD0.EmptyError}});var jD0=CY();Object.defineProperty(U,"NotFoundError",{enumerable:!0,get:function(){return jD0.NotFoundError}});var PD0=eQ();Object.defineProperty(U,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return PD0.ObjectUnsubscribedError}});var ID0=RY();Object.defineProperty(U,"SequenceError",{enumerable:!0,get:function(){return ID0.SequenceError}});var SD0=H7();Object.defineProperty(U,"TimeoutError",{enumerable:!0,get:function(){return SD0.TimeoutError}});var kD0=bQ();Object.defineProperty(U,"UnsubscriptionError",{enumerable:!0,get:function(){return kD0.UnsubscriptionError}});var vD0=DV();Object.defineProperty(U,"bindCallback",{enumerable:!0,get:function(){return vD0.bindCallback}});var yD0=JV();Object.defineProperty(U,"bindNodeCallback",{enumerable:!0,get:function(){return yD0.bindNodeCallback}});var xD0=q7();Object.defineProperty(U,"combineLatest",{enumerable:!0,get:function(){return xD0.combineLatest}});var _D0=oF();Object.defineProperty(U,"concat",{enumerable:!0,get:function(){return _D0.concat}});var fD0=kV();Object.defineProperty(U,"connectable",{enumerable:!0,get:function(){return fD0.connectable}});var gD0=sF();Object.defineProperty(U,"defer",{enumerable:!0,get:function(){return gD0.defer}});var hD0=S1();Object.defineProperty(U,"empty",{enumerable:!0,get:function(){return hD0.empty}});var bD0=xV();Object.defineProperty(U,"forkJoin",{enumerable:!0,get:function(){return bD0.forkJoin}});var uD0=S8();Object.defineProperty(U,"from",{enumerable:!0,get:function(){return uD0.from}});var mD0=fV();Object.defineProperty(U,"fromEvent",{enumerable:!0,get:function(){return mD0.fromEvent}});var lD0=uV();Object.defineProperty(U,"fromEventPattern",{enumerable:!0,get:function(){return lD0.fromEventPattern}});var pD0=lV();Object.defineProperty(U,"generate",{enumerable:!0,get:function(){return pD0.generate}});var dD0=cV();Object.defineProperty(U,"iif",{enumerable:!0,get:function(){return dD0.iif}});var cD0=IY();Object.defineProperty(U,"interval",{enumerable:!0,get:function(){return cD0.interval}});var nD0=eV();Object.defineProperty(U,"merge",{enumerable:!0,get:function(){return nD0.merge}});var iD0=SY();Object.defineProperty(U,"never",{enumerable:!0,get:function(){return iD0.never}});var aD0=X7();Object.defineProperty(U,"of",{enumerable:!0,get:function(){return aD0.of}});var oD0=kY();Object.defineProperty(U,"onErrorResumeNext",{enumerable:!0,get:function(){return oD0.onErrorResumeNext}});var sD0=HZ();Object.defineProperty(U,"pairs",{enumerable:!0,get:function(){return sD0.pairs}});var rD0=MZ();Object.defineProperty(U,"partition",{enumerable:!0,get:function(){return rD0.partition}});var tD0=vY();Object.defineProperty(U,"race",{enumerable:!0,get:function(){return tD0.race}});var eD0=jZ();Object.defineProperty(U,"range",{enumerable:!0,get:function(){return eD0.range}});var D10=MY();Object.defineProperty(U,"throwError",{enumerable:!0,get:function(){return D10.throwError}});var F10=W6();Object.defineProperty(U,"timer",{enumerable:!0,get:function(){return F10.timer}});var $10=SZ();Object.defineProperty(U,"using",{enumerable:!0,get:function(){return $10.using}});var J10=E7();Object.defineProperty(U,"zip",{enumerable:!0,get:function(){return J10.zip}});var Q10=AY();Object.defineProperty(U,"scheduled",{enumerable:!0,get:function(){return Q10.scheduled}});var Y10=S1();Object.defineProperty(U,"EMPTY",{enumerable:!0,get:function(){return Y10.EMPTY}});var B10=SY();Object.defineProperty(U,"NEVER",{enumerable:!0,get:function(){return B10.NEVER}});XD0(vZ(),U);var X10=o4();Object.defineProperty(U,"config",{enumerable:!0,get:function(){return X10.config}});var G10=yY();Object.defineProperty(U,"audit",{enumerable:!0,get:function(){return G10.audit}});var W10=hZ();Object.defineProperty(U,"auditTime",{enumerable:!0,get:function(){return W10.auditTime}});var H10=lZ();Object.defineProperty(U,"buffer",{enumerable:!0,get:function(){return H10.buffer}});var q10=pZ();Object.defineProperty(U,"bufferCount",{enumerable:!0,get:function(){return q10.bufferCount}});var K10=cZ();Object.defineProperty(U,"bufferTime",{enumerable:!0,get:function(){return K10.bufferTime}});var z10=aZ();Object.defineProperty(U,"bufferToggle",{enumerable:!0,get:function(){return z10.bufferToggle}});var E10=tZ();Object.defineProperty(U,"bufferWhen",{enumerable:!0,get:function(){return E10.bufferWhen}});var V10=$U();Object.defineProperty(U,"catchError",{enumerable:!0,get:function(){return V10.catchError}});var Z10=VU();Object.defineProperty(U,"combineAll",{enumerable:!0,get:function(){return Z10.combineAll}});var U10=bY();Object.defineProperty(U,"combineLatestAll",{enumerable:!0,get:function(){return U10.combineLatestAll}});var L10=MU();Object.defineProperty(U,"combineLatestWith",{enumerable:!0,get:function(){return L10.combineLatestWith}});var A10=z7();Object.defineProperty(U,"concatAll",{enumerable:!0,get:function(){return A10.concatAll}});var M10=uY();Object.defineProperty(U,"concatMap",{enumerable:!0,get:function(){return M10.concatMap}});var N10=jU();Object.defineProperty(U,"concatMapTo",{enumerable:!0,get:function(){return N10.concatMapTo}});var C10=IU();Object.defineProperty(U,"concatWith",{enumerable:!0,get:function(){return C10.concatWith}});var R10=V7();Object.defineProperty(U,"connect",{enumerable:!0,get:function(){return R10.connect}});var O10=gU();Object.defineProperty(U,"count",{enumerable:!0,get:function(){return O10.count}});var w10=mU();Object.defineProperty(U,"debounce",{enumerable:!0,get:function(){return w10.debounce}});var T10=dU();Object.defineProperty(U,"debounceTime",{enumerable:!0,get:function(){return T10.debounceTime}});var j10=rF();Object.defineProperty(U,"defaultIfEmpty",{enumerable:!0,get:function(){return j10.defaultIfEmpty}});var P10=YL();Object.defineProperty(U,"delay",{enumerable:!0,get:function(){return P10.delay}});var I10=pY();Object.defineProperty(U,"delayWhen",{enumerable:!0,get:function(){return I10.delayWhen}});var S10=GL();Object.defineProperty(U,"dematerialize",{enumerable:!0,get:function(){return S10.dematerialize}});var k10=KL();Object.defineProperty(U,"distinct",{enumerable:!0,get:function(){return k10.distinct}});var v10=dY();Object.defineProperty(U,"distinctUntilChanged",{enumerable:!0,get:function(){return v10.distinctUntilChanged}});var y10=UL();Object.defineProperty(U,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return y10.distinctUntilKeyChanged}});var x10=RL();Object.defineProperty(U,"elementAt",{enumerable:!0,get:function(){return x10.elementAt}});var _10=OL();Object.defineProperty(U,"endWith",{enumerable:!0,get:function(){return _10.endWith}});var f10=jL();Object.defineProperty(U,"every",{enumerable:!0,get:function(){return f10.every}});var g10=gL();Object.defineProperty(U,"exhaust",{enumerable:!0,get:function(){return g10.exhaust}});var h10=nY();Object.defineProperty(U,"exhaustAll",{enumerable:!0,get:function(){return h10.exhaustAll}});var b10=cY();Object.defineProperty(U,"exhaustMap",{enumerable:!0,get:function(){return b10.exhaustMap}});var u10=uL();Object.defineProperty(U,"expand",{enumerable:!0,get:function(){return u10.expand}});var m10=D4();Object.defineProperty(U,"filter",{enumerable:!0,get:function(){return m10.filter}});var l10=pL();Object.defineProperty(U,"finalize",{enumerable:!0,get:function(){return l10.finalize}});var p10=iY();Object.defineProperty(U,"find",{enumerable:!0,get:function(){return p10.find}});var d10=oL();Object.defineProperty(U,"findIndex",{enumerable:!0,get:function(){return d10.findIndex}});var c10=tL();Object.defineProperty(U,"first",{enumerable:!0,get:function(){return c10.first}});var n10=$A();Object.defineProperty(U,"groupBy",{enumerable:!0,get:function(){return n10.groupBy}});var i10=mY();Object.defineProperty(U,"ignoreElements",{enumerable:!0,get:function(){return i10.ignoreElements}});var a10=YA();Object.defineProperty(U,"isEmpty",{enumerable:!0,get:function(){return a10.isEmpty}});var o10=GA();Object.defineProperty(U,"last",{enumerable:!0,get:function(){return o10.last}});var s10=Y6();Object.defineProperty(U,"map",{enumerable:!0,get:function(){return s10.map}});var r10=lY();Object.defineProperty(U,"mapTo",{enumerable:!0,get:function(){return r10.mapTo}});var t10=qA();Object.defineProperty(U,"materialize",{enumerable:!0,get:function(){return t10.materialize}});var e10=EA();Object.defineProperty(U,"max",{enumerable:!0,get:function(){return e10.max}});var D80=aF();Object.defineProperty(U,"mergeAll",{enumerable:!0,get:function(){return D80.mergeAll}});var F80=UA();Object.defineProperty(U,"flatMap",{enumerable:!0,get:function(){return F80.flatMap}});var $80=k8();Object.defineProperty(U,"mergeMap",{enumerable:!0,get:function(){return $80.mergeMap}});var J80=NA();Object.defineProperty(U,"mergeMapTo",{enumerable:!0,get:function(){return J80.mergeMapTo}});var Q80=OA();Object.defineProperty(U,"mergeScan",{enumerable:!0,get:function(){return Q80.mergeScan}});var Y80=jA();Object.defineProperty(U,"mergeWith",{enumerable:!0,get:function(){return Y80.mergeWith}});var B80=SA();Object.defineProperty(U,"min",{enumerable:!0,get:function(){return B80.min}});var X80=Z7();Object.defineProperty(U,"multicast",{enumerable:!0,get:function(){return X80.multicast}});var G80=nF();Object.defineProperty(U,"observeOn",{enumerable:!0,get:function(){return G80.observeOn}});var W80=_A();Object.defineProperty(U,"onErrorResumeNextWith",{enumerable:!0,get:function(){return W80.onErrorResumeNextWith}});var H80=hA();Object.defineProperty(U,"pairwise",{enumerable:!0,get:function(){return H80.pairwise}});var q80=mA();Object.defineProperty(U,"pluck",{enumerable:!0,get:function(){return q80.pluck}});var K80=dA();Object.defineProperty(U,"publish",{enumerable:!0,get:function(){return K80.publish}});var z80=iA();Object.defineProperty(U,"publishBehavior",{enumerable:!0,get:function(){return z80.publishBehavior}});var E80=sA();Object.defineProperty(U,"publishLast",{enumerable:!0,get:function(){return E80.publishLast}});var V80=DM();Object.defineProperty(U,"publishReplay",{enumerable:!0,get:function(){return V80.publishReplay}});var Z80=FM();Object.defineProperty(U,"raceWith",{enumerable:!0,get:function(){return Z80.raceWith}});var U80=M3();Object.defineProperty(U,"reduce",{enumerable:!0,get:function(){return U80.reduce}});var L80=YM();Object.defineProperty(U,"repeat",{enumerable:!0,get:function(){return L80.repeat}});var A80=WM();Object.defineProperty(U,"repeatWhen",{enumerable:!0,get:function(){return A80.repeatWhen}});var M80=zM();Object.defineProperty(U,"retry",{enumerable:!0,get:function(){return M80.retry}});var N80=UM();Object.defineProperty(U,"retryWhen",{enumerable:!0,get:function(){return N80.retryWhen}});var C80=sQ();Object.defineProperty(U,"refCount",{enumerable:!0,get:function(){return C80.refCount}});var R80=sY();Object.defineProperty(U,"sample",{enumerable:!0,get:function(){return R80.sample}});var O80=RM();Object.defineProperty(U,"sampleTime",{enumerable:!0,get:function(){return O80.sampleTime}});var w80=TM();Object.defineProperty(U,"scan",{enumerable:!0,get:function(){return w80.scan}});var T80=SM();Object.defineProperty(U,"sequenceEqual",{enumerable:!0,get:function(){return T80.sequenceEqual}});var j80=tY();Object.defineProperty(U,"share",{enumerable:!0,get:function(){return j80.share}});var P80=_M();Object.defineProperty(U,"shareReplay",{enumerable:!0,get:function(){return P80.shareReplay}});var I80=hM();Object.defineProperty(U,"single",{enumerable:!0,get:function(){return I80.single}});var S80=mM();Object.defineProperty(U,"skip",{enumerable:!0,get:function(){return S80.skip}});var k80=dM();Object.defineProperty(U,"skipLast",{enumerable:!0,get:function(){return k80.skipLast}});var v80=aM();Object.defineProperty(U,"skipUntil",{enumerable:!0,get:function(){return v80.skipUntil}});var y80=rM();Object.defineProperty(U,"skipWhile",{enumerable:!0,get:function(){return y80.skipWhile}});var x80=FN();Object.defineProperty(U,"startWith",{enumerable:!0,get:function(){return x80.startWith}});var _80=iF();Object.defineProperty(U,"subscribeOn",{enumerable:!0,get:function(){return _80.subscribeOn}});var f80=XN();Object.defineProperty(U,"switchAll",{enumerable:!0,get:function(){return f80.switchAll}});var g80=D5();Object.defineProperty(U,"switchMap",{enumerable:!0,get:function(){return g80.switchMap}});var h80=qN();Object.defineProperty(U,"switchMapTo",{enumerable:!0,get:function(){return h80.switchMapTo}});var b80=EN();Object.defineProperty(U,"switchScan",{enumerable:!0,get:function(){return b80.switchScan}});var u80=tF();Object.defineProperty(U,"take",{enumerable:!0,get:function(){return u80.take}});var m80=aY();Object.defineProperty(U,"takeLast",{enumerable:!0,get:function(){return m80.takeLast}});var l80=UN();Object.defineProperty(U,"takeUntil",{enumerable:!0,get:function(){return l80.takeUntil}});var p80=MN();Object.defineProperty(U,"takeWhile",{enumerable:!0,get:function(){return p80.takeWhile}});var d80=RN();Object.defineProperty(U,"tap",{enumerable:!0,get:function(){return d80.tap}});var c80=eY();Object.defineProperty(U,"throttle",{enumerable:!0,get:function(){return c80.throttle}});var n80=IN();Object.defineProperty(U,"throttleTime",{enumerable:!0,get:function(){return n80.throttleTime}});var i80=eF();Object.defineProperty(U,"throwIfEmpty",{enumerable:!0,get:function(){return i80.throwIfEmpty}});var a80=yN();Object.defineProperty(U,"timeInterval",{enumerable:!0,get:function(){return a80.timeInterval}});var o80=H7();Object.defineProperty(U,"timeout",{enumerable:!0,get:function(){return o80.timeout}});var s80=fN();Object.defineProperty(U,"timeoutWith",{enumerable:!0,get:function(){return s80.timeoutWith}});var r80=bN();Object.defineProperty(U,"timestamp",{enumerable:!0,get:function(){return r80.timestamp}});var t80=gY();Object.defineProperty(U,"toArray",{enumerable:!0,get:function(){return t80.toArray}});var e80=dN();Object.defineProperty(U,"window",{enumerable:!0,get:function(){return e80.window}});var D60=nN();Object.defineProperty(U,"windowCount",{enumerable:!0,get:function(){return D60.windowCount}});var F60=sN();Object.defineProperty(U,"windowTime",{enumerable:!0,get:function(){return F60.windowTime}});var $60=eN();Object.defineProperty(U,"windowToggle",{enumerable:!0,get:function(){return $60.windowToggle}});var J60=JC();Object.defineProperty(U,"windowWhen",{enumerable:!0,get:function(){return J60.windowWhen}});var Q60=XC();Object.defineProperty(U,"withLatestFrom",{enumerable:!0,get:function(){return Q60.withLatestFrom}});var Y60=HC();Object.defineProperty(U,"zipAll",{enumerable:!0,get:function(){return Y60.zipAll}});var B60=KC();Object.defineProperty(U,"zipWith",{enumerable:!0,get:function(){return B60.zipWith}})});function X60(D,F){return{value:D,key:F||{}}}function ZD(D){let F=a0.fromEvent(D.input,"keypress",X60).pipe(a0.takeUntil(a0.fromEvent(D,"close"))).pipe(a0.filter(({key:$})=>$.name!=="enter"&&$.name!=="return"));return{line:a0.fromEvent(D,"line"),keypress:F,normalizedUpKey:F.pipe(a0.filter(({key:$})=>$.name==="up"||$.name==="k"||$.name==="p"&&$.ctrl),a0.share()),normalizedDownKey:F.pipe(a0.filter(({key:$})=>$.name==="down"||$.name==="j"||$.name==="n"&&$.ctrl),a0.share()),numberKey:F.pipe(a0.filter(($)=>$.value&&"123456789".includes($.value)),a0.map(($)=>Number($.value)),a0.share()),spaceKey:F.pipe(a0.filter(({key:$})=>$&&$.name==="space"),a0.share()),aKey:F.pipe(a0.filter(({key:$})=>$&&$.name==="a"),a0.share()),iKey:F.pipe(a0.filter(({key:$})=>$&&$.name==="i"),a0.share())}}var a0;var v8=P(()=>{a0=s($1(),1)});class Y8{constructor(D,F={}){let{isInfinite:$=!0}=F;this.lastIndex=0,this.screen=D,this.isInfinite=$}paginate(D,F,$){$||=7;let J=D.split(`
32
32
  `);if(this.screen)J=this.screen.breakLines(J),F=J.map((Y)=>Y.length).splice(0,F).reduce((Y,B)=>Y+B,0),J=J.flat();if(J.length<=$)return D;let Q=this.isInfinite?this.getInfiniteLines(J,F,$):this.getFiniteLines(J,F,$);return this.lastIndex=F,Q.join(`
33
33
  `)+`
34
34
  `+AC.default.dim("(Move up and down to reveal more choices)")}getInfiniteLines(D,F,$){if(this.pointer===void 0)this.pointer=0;let J=Math.floor($/2);if(this.pointer<J&&this.lastIndex<F&&F-this.lastIndex<$)this.pointer=Math.min(J,this.pointer+F-this.lastIndex);let Q=[D,D,D].flat(),Y=Math.max(0,F+D.length-this.pointer);return Q.splice(Y,$)}getFiniteLines(D,F,$){let J=F-$/2;if(J<0)J=0;else if(J+$>D.length)J=D.length-$;return D.splice(J,$)}}var AC;var F5=P(()=>{AC=s(q1(),1)});function y8(D,F,$){let J=$.choices.realLength,Q="loop"in $?Boolean($.loop):!0;if(F==="up"){if(D>0)return D-1;return Q?J-1:D}if(F==="down"){if(D<J-1)return D+1;return Q?0:D}throw Error("dir must be up or down")}class J1{constructor(D){this.type="separator",this.line=MC.default.dim(D||Array.from({length:15}).join(D6.line))}static exclude(D){return D.type!=="separator"}toString(){return this.line}}var MC;var $5=P(()=>{r9();MC=s(q1(),1)});class O3{constructor(D,F){if(D instanceof O3||D.type==="separator")return D;if(typeof D==="string"||typeof D==="number")this.name=String(D),this.value=D,this.short=String(D);else Object.assign(this,D,{name:D.name||D.value,value:"value"in D?D.value:D.name,short:D.short||D.name||D.value});this.disabled=typeof D.disabled==="function"?D.disabled(F):D.disabled}}import NC from"assert";var U7;var CC=P(()=>{$5();U7=class U7{constructor(D,F){this.choices=D.map(($)=>{if($.type==="separator"){if(!($ instanceof J1))$=new J1($.line);return $}return new O3($,F)}),this.realChoices=this.choices.filter(J1.exclude).filter(($)=>!$.disabled),Object.defineProperty(this,"length",{get(){return this.choices.length},set($){this.choices.length=$}}),Object.defineProperty(this,"realLength",{get(){return this.realChoices.length},set(){throw Error("Cannot set `realLength` of a Choices collection")}})}[Symbol.iterator](){let D=this.choices,F=-1;return{next:()=>({value:D[++F],done:!(F in D)})}}getChoice(D){return NC(typeof D==="number"),this.realChoices[D]}get(D){return NC(typeof D==="number"),this.choices[D]}where(D){let F;if(typeof D==="function")F=D;else{let[$,J]=Object.entries(D)[0];F=(Q)=>Q[$]===J}return this.realChoices.filter(F)}pluck(D){return this.realChoices.map((F)=>F[D])}indexOf(...D){return this.choices.indexOf(...D)}forEach(...D){return this.choices.forEach(...D)}filter(...D){return this.choices.filter(...D)}reduce(...D){return this.choices.reduce(...D)}find(D){return this.choices.find(D)}some(D){return this.choices.some(D)}push(...D){let F=D.map(($)=>new O3($));return this.choices.push(...F),this.realChoices=this.choices.filter(J1.exclude).filter(($)=>!$.disabled),this.choices}}});var OC=z((VN0,RC)=>{RC.exports=W60;function G60(D){let F={defaultWidth:0,output:process.stdout,tty:K0("tty")};if(!D)return F;return Object.keys(F).forEach(function($){if(!D[$])D[$]=F[$]}),D}function W60(D){let F=G60(D);if(F.output.getWindowSize)return F.output.getWindowSize()[0]||F.defaultWidth;if(F.tty.getWindowSize)return F.tty.getWindowSize()[1]||F.defaultWidth;if(F.output.columns)return F.output.columns;if(process.env.CLI_WIDTH){let $=parseInt(process.env.CLI_WIDTH,10);if(!isNaN($)&&$!==0)return $}return F.defaultWidth}});var TC=z((ZN0,wC)=>{wC.exports=({onlyFirst:D=!1}={})=>{let F=["[\\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(F,D?void 0:"g")}});var J5=z((UN0,jC)=>{var H60=TC();jC.exports=(D)=>typeof D==="string"?D.replace(H60(),""):D});var IC=z((LN0,FB)=>{var PC=(D)=>{if(Number.isNaN(D))return!1;if(D>=4352&&(D<=4447||D===9001||D===9002||11904<=D&&D<=12871&&D!==12351||12880<=D&&D<=19903||19968<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65131||65281<=D&&D<=65376||65504<=D&&D<=65510||110592<=D&&D<=110593||127488<=D&&D<=127569||131072<=D&&D<=262141))return!0;return!1};FB.exports=PC;FB.exports.default=PC});var kC=z((AN0,SC)=>{SC.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var JB=z((MN0,$B)=>{var q60=J5(),K60=IC(),z60=kC(),vC=(D)=>{if(typeof D!=="string"||D.length===0)return 0;if(D=q60(D),D.length===0)return 0;D=D.replace(z60()," ");let F=0;for(let $=0;$<D.length;$++){let J=D.codePointAt($);if(J<=31||J>=127&&J<=159)continue;if(J>=768&&J<=879)continue;if(J>65535)$++;F+=K60(J)?2:1}return F};$B.exports=vC;$B.exports.default=vC});var xC=z((NN0,yC)=>{yC.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var QB=z((CN0,fC)=>{var Q5=xC(),_C={};for(let D of Object.keys(Q5))_C[Q5[D]]=D;var u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};fC.exports=u;for(let D of Object.keys(u)){if(!("channels"in u[D]))throw Error("missing channels property: "+D);if(!("labels"in u[D]))throw Error("missing channel labels property: "+D);if(u[D].labels.length!==u[D].channels)throw Error("channel and label counts mismatch: "+D);let{channels:F,labels:$}=u[D];delete u[D].channels,delete u[D].labels,Object.defineProperty(u[D],"channels",{value:F}),Object.defineProperty(u[D],"labels",{value:$})}u.rgb.hsl=function(D){let F=D[0]/255,$=D[1]/255,J=D[2]/255,Q=Math.min(F,$,J),Y=Math.max(F,$,J),B=Y-Q,X,G;if(Y===Q)X=0;else if(F===Y)X=($-J)/B;else if($===Y)X=2+(J-F)/B;else if(J===Y)X=4+(F-$)/B;if(X=Math.min(X*60,360),X<0)X+=360;let H=(Q+Y)/2;if(Y===Q)G=0;else if(H<=0.5)G=B/(Y+Q);else G=B/(2-Y-Q);return[X,G*100,H*100]};u.rgb.hsv=function(D){let F,$,J,Q,Y,B=D[0]/255,X=D[1]/255,G=D[2]/255,H=Math.max(B,X,G),q=H-Math.min(B,X,G),K=function(V){return(H-V)/6/q+0.5};if(q===0)Q=0,Y=0;else{if(Y=q/H,F=K(B),$=K(X),J=K(G),B===H)Q=J-$;else if(X===H)Q=0.3333333333333333+F-J;else if(G===H)Q=0.6666666666666666+$-F;if(Q<0)Q+=1;else if(Q>1)Q-=1}return[Q*360,Y*100,H*100]};u.rgb.hwb=function(D){let F=D[0],$=D[1],J=D[2],Q=u.rgb.hsl(D)[0],Y=0.00392156862745098*Math.min(F,Math.min($,J));return J=1-0.00392156862745098*Math.max(F,Math.max($,J)),[Q,Y*100,J*100]};u.rgb.cmyk=function(D){let F=D[0]/255,$=D[1]/255,J=D[2]/255,Q=Math.min(1-F,1-$,1-J),Y=(1-F-Q)/(1-Q)||0,B=(1-$-Q)/(1-Q)||0,X=(1-J-Q)/(1-Q)||0;return[Y*100,B*100,X*100,Q*100]};function E60(D,F){return(D[0]-F[0])**2+(D[1]-F[1])**2+(D[2]-F[2])**2}u.rgb.keyword=function(D){let F=_C[D];if(F)return F;let $=1/0,J;for(let Q of Object.keys(Q5)){let Y=Q5[Q],B=E60(D,Y);if(B<$)$=B,J=Q}return J};u.keyword.rgb=function(D){return Q5[D]};u.rgb.xyz=function(D){let F=D[0]/255,$=D[1]/255,J=D[2]/255;F=F>0.04045?((F+0.055)/1.055)**2.4:F/12.92,$=$>0.04045?(($+0.055)/1.055)**2.4:$/12.92,J=J>0.04045?((J+0.055)/1.055)**2.4:J/12.92;let Q=F*0.4124+$*0.3576+J*0.1805,Y=F*0.2126+$*0.7152+J*0.0722,B=F*0.0193+$*0.1192+J*0.9505;return[Q*100,Y*100,B*100]};u.rgb.lab=function(D){let F=u.rgb.xyz(D),$=F[0],J=F[1],Q=F[2];$/=95.047,J/=100,Q/=108.883,$=$>0.008856?$**0.3333333333333333:7.787*$+0.13793103448275862,J=J>0.008856?J**0.3333333333333333:7.787*J+0.13793103448275862,Q=Q>0.008856?Q**0.3333333333333333:7.787*Q+0.13793103448275862;let Y=116*J-16,B=500*($-J),X=200*(J-Q);return[Y,B,X]};u.hsl.rgb=function(D){let F=D[0]/360,$=D[1]/100,J=D[2]/100,Q,Y,B;if($===0)return B=J*255,[B,B,B];if(J<0.5)Q=J*(1+$);else Q=J+$-J*$;let X=2*J-Q,G=[0,0,0];for(let H=0;H<3;H++){if(Y=F+0.3333333333333333*-(H-1),Y<0)Y++;if(Y>1)Y--;if(6*Y<1)B=X+(Q-X)*6*Y;else if(2*Y<1)B=Q;else if(3*Y<2)B=X+(Q-X)*(0.6666666666666666-Y)*6;else B=X;G[H]=B*255}return G};u.hsl.hsv=function(D){let F=D[0],$=D[1]/100,J=D[2]/100,Q=$,Y=Math.max(J,0.01);J*=2,$*=J<=1?J:2-J,Q*=Y<=1?Y:2-Y;let B=(J+$)/2,X=J===0?2*Q/(Y+Q):2*$/(J+$);return[F,X*100,B*100]};u.hsv.rgb=function(D){let F=D[0]/60,$=D[1]/100,J=D[2]/100,Q=Math.floor(F)%6,Y=F-Math.floor(F),B=255*J*(1-$),X=255*J*(1-$*Y),G=255*J*(1-$*(1-Y));switch(J*=255,Q){case 0:return[J,G,B];case 1:return[X,J,B];case 2:return[B,J,G];case 3:return[B,X,J];case 4:return[G,B,J];case 5:return[J,B,X]}};u.hsv.hsl=function(D){let F=D[0],$=D[1]/100,J=D[2]/100,Q=Math.max(J,0.01),Y,B;B=(2-$)*J;let X=(2-$)*Q;return Y=$*Q,Y/=X<=1?X:2-X,Y=Y||0,B/=2,[F,Y*100,B*100]};u.hwb.rgb=function(D){let F=D[0]/360,$=D[1]/100,J=D[2]/100,Q=$+J,Y;if(Q>1)$/=Q,J/=Q;let B=Math.floor(6*F),X=1-J;if(Y=6*F-B,(B&1)!==0)Y=1-Y;let G=$+Y*(X-$),H,q,K;switch(B){default:case 6:case 0:H=X,q=G,K=$;break;case 1:H=G,q=X,K=$;break;case 2:H=$,q=X,K=G;break;case 3:H=$,q=G,K=X;break;case 4:H=G,q=$,K=X;break;case 5:H=X,q=$,K=G;break}return[H*255,q*255,K*255]};u.cmyk.rgb=function(D){let F=D[0]/100,$=D[1]/100,J=D[2]/100,Q=D[3]/100,Y=1-Math.min(1,F*(1-Q)+Q),B=1-Math.min(1,$*(1-Q)+Q),X=1-Math.min(1,J*(1-Q)+Q);return[Y*255,B*255,X*255]};u.xyz.rgb=function(D){let F=D[0]/100,$=D[1]/100,J=D[2]/100,Q,Y,B;return Q=F*3.2406+$*-1.5372+J*-0.4986,Y=F*-0.9689+$*1.8758+J*0.0415,B=F*0.0557+$*-0.204+J*1.057,Q=Q>0.0031308?1.055*Q**0.4166666666666667-0.055:Q*12.92,Y=Y>0.0031308?1.055*Y**0.4166666666666667-0.055:Y*12.92,B=B>0.0031308?1.055*B**0.4166666666666667-0.055:B*12.92,Q=Math.min(Math.max(0,Q),1),Y=Math.min(Math.max(0,Y),1),B=Math.min(Math.max(0,B),1),[Q*255,Y*255,B*255]};u.xyz.lab=function(D){let F=D[0],$=D[1],J=D[2];F/=95.047,$/=100,J/=108.883,F=F>0.008856?F**0.3333333333333333:7.787*F+0.13793103448275862,$=$>0.008856?$**0.3333333333333333:7.787*$+0.13793103448275862,J=J>0.008856?J**0.3333333333333333:7.787*J+0.13793103448275862;let Q=116*$-16,Y=500*(F-$),B=200*($-J);return[Q,Y,B]};u.lab.xyz=function(D){let F=D[0],$=D[1],J=D[2],Q,Y,B;Y=(F+16)/116,Q=$/500+Y,B=Y-J/200;let X=Y**3,G=Q**3,H=B**3;return Y=X>0.008856?X:(Y-0.13793103448275862)/7.787,Q=G>0.008856?G:(Q-0.13793103448275862)/7.787,B=H>0.008856?H:(B-0.13793103448275862)/7.787,Q*=95.047,Y*=100,B*=108.883,[Q,Y,B]};u.lab.lch=function(D){let F=D[0],$=D[1],J=D[2],Q;if(Q=Math.atan2(J,$)*360/2/Math.PI,Q<0)Q+=360;let B=Math.sqrt($*$+J*J);return[F,B,Q]};u.lch.lab=function(D){let F=D[0],$=D[1],Q=D[2]/360*2*Math.PI,Y=$*Math.cos(Q),B=$*Math.sin(Q);return[F,Y,B]};u.rgb.ansi16=function(D,F=null){let[$,J,Q]=D,Y=F===null?u.rgb.hsv(D)[2]:F;if(Y=Math.round(Y/50),Y===0)return 30;let B=30+(Math.round(Q/255)<<2|Math.round(J/255)<<1|Math.round($/255));if(Y===2)B+=60;return B};u.hsv.ansi16=function(D){return u.rgb.ansi16(u.hsv.rgb(D),D[2])};u.rgb.ansi256=function(D){let F=D[0],$=D[1],J=D[2];if(F===$&&$===J){if(F<8)return 16;if(F>248)return 231;return Math.round((F-8)/247*24)+232}return 16+36*Math.round(F/255*5)+6*Math.round($/255*5)+Math.round(J/255*5)};u.ansi16.rgb=function(D){let F=D%10;if(F===0||F===7){if(D>50)F+=3.5;return F=F/10.5*255,[F,F,F]}let $=(~~(D>50)+1)*0.5,J=(F&1)*$*255,Q=(F>>1&1)*$*255,Y=(F>>2&1)*$*255;return[J,Q,Y]};u.ansi256.rgb=function(D){if(D>=232){let Y=(D-232)*10+8;return[Y,Y,Y]}D-=16;let F,$=Math.floor(D/36)/5*255,J=Math.floor((F=D%36)/6)/5*255,Q=F%6/5*255;return[$,J,Q]};u.rgb.hex=function(D){let $=(((Math.round(D[0])&255)<<16)+((Math.round(D[1])&255)<<8)+(Math.round(D[2])&255)).toString(16).toUpperCase();return"000000".substring($.length)+$};u.hex.rgb=function(D){let F=D.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!F)return[0,0,0];let $=F[0];if(F[0].length===3)$=$.split("").map((X)=>{return X+X}).join("");let J=parseInt($,16),Q=J>>16&255,Y=J>>8&255,B=J&255;return[Q,Y,B]};u.rgb.hcg=function(D){let F=D[0]/255,$=D[1]/255,J=D[2]/255,Q=Math.max(Math.max(F,$),J),Y=Math.min(Math.min(F,$),J),B=Q-Y,X,G;if(B<1)X=Y/(1-B);else X=0;if(B<=0)G=0;else if(Q===F)G=($-J)/B%6;else if(Q===$)G=2+(J-F)/B;else G=4+(F-$)/B;return G/=6,G%=1,[G*360,B*100,X*100]};u.hsl.hcg=function(D){let F=D[1]/100,$=D[2]/100,J=$<0.5?2*F*$:2*F*(1-$),Q=0;if(J<1)Q=($-0.5*J)/(1-J);return[D[0],J*100,Q*100]};u.hsv.hcg=function(D){let F=D[1]/100,$=D[2]/100,J=F*$,Q=0;if(J<1)Q=($-J)/(1-J);return[D[0],J*100,Q*100]};u.hcg.rgb=function(D){let F=D[0]/360,$=D[1]/100,J=D[2]/100;if($===0)return[J*255,J*255,J*255];let Q=[0,0,0],Y=F%1*6,B=Y%1,X=1-B,G=0;switch(Math.floor(Y)){case 0:Q[0]=1,Q[1]=B,Q[2]=0;break;case 1:Q[0]=X,Q[1]=1,Q[2]=0;break;case 2:Q[0]=0,Q[1]=1,Q[2]=B;break;case 3:Q[0]=0,Q[1]=X,Q[2]=1;break;case 4:Q[0]=B,Q[1]=0,Q[2]=1;break;default:Q[0]=1,Q[1]=0,Q[2]=X}return G=(1-$)*J,[($*Q[0]+G)*255,($*Q[1]+G)*255,($*Q[2]+G)*255]};u.hcg.hsv=function(D){let F=D[1]/100,$=D[2]/100,J=F+$*(1-F),Q=0;if(J>0)Q=F/J;return[D[0],Q*100,J*100]};u.hcg.hsl=function(D){let F=D[1]/100,J=D[2]/100*(1-F)+0.5*F,Q=0;if(J>0&&J<0.5)Q=F/(2*J);else if(J>=0.5&&J<1)Q=F/(2*(1-J));return[D[0],Q*100,J*100]};u.hcg.hwb=function(D){let F=D[1]/100,$=D[2]/100,J=F+$*(1-F);return[D[0],(J-F)*100,(1-J)*100]};u.hwb.hcg=function(D){let F=D[1]/100,J=1-D[2]/100,Q=J-F,Y=0;if(Q<1)Y=(J-Q)/(1-Q);return[D[0],Q*100,Y*100]};u.apple.rgb=function(D){return[D[0]/65535*255,D[1]/65535*255,D[2]/65535*255]};u.rgb.apple=function(D){return[D[0]/255*65535,D[1]/255*65535,D[2]/255*65535]};u.gray.rgb=function(D){return[D[0]/100*255,D[0]/100*255,D[0]/100*255]};u.gray.hsl=function(D){return[0,0,D[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(D){return[0,100,D[0]]};u.gray.cmyk=function(D){return[0,0,0,D[0]]};u.gray.lab=function(D){return[D[0],0,0]};u.gray.hex=function(D){let F=Math.round(D[0]/100*255)&255,J=((F<<16)+(F<<8)+F).toString(16).toUpperCase();return"000000".substring(J.length)+J};u.rgb.gray=function(D){return[(D[0]+D[1]+D[2])/3/255*100]}});var hC=z((RN0,gC)=>{var L7=QB();function V60(){let D={},F=Object.keys(L7);for(let $=F.length,J=0;J<$;J++)D[F[J]]={distance:-1,parent:null};return D}function Z60(D){let F=V60(),$=[D];F[D].distance=0;while($.length){let J=$.pop(),Q=Object.keys(L7[J]);for(let Y=Q.length,B=0;B<Y;B++){let X=Q[B],G=F[X];if(G.distance===-1)G.distance=F[J].distance+1,G.parent=J,$.unshift(X)}}return F}function U60(D,F){return function($){return F(D($))}}function L60(D,F){let $=[F[D].parent,D],J=L7[F[D].parent][D],Q=F[D].parent;while(F[Q].parent)$.unshift(F[Q].parent),J=U60(L7[F[Q].parent][Q],J),Q=F[Q].parent;return J.conversion=$,J}gC.exports=function(D){let F=Z60(D),$={},J=Object.keys(F);for(let Q=J.length,Y=0;Y<Q;Y++){let B=J[Y];if(F[B].parent===null)continue;$[B]=L60(B,F)}return $}});var uC=z((ON0,bC)=>{var YB=QB(),A60=hC(),w3={},M60=Object.keys(YB);function N60(D){let F=function(...$){let J=$[0];if(J===void 0||J===null)return J;if(J.length>1)$=J;return D($)};if("conversion"in D)F.conversion=D.conversion;return F}function C60(D){let F=function(...$){let J=$[0];if(J===void 0||J===null)return J;if(J.length>1)$=J;let Q=D($);if(typeof Q==="object")for(let Y=Q.length,B=0;B<Y;B++)Q[B]=Math.round(Q[B]);return Q};if("conversion"in D)F.conversion=D.conversion;return F}M60.forEach((D)=>{w3[D]={},Object.defineProperty(w3[D],"channels",{value:YB[D].channels}),Object.defineProperty(w3[D],"labels",{value:YB[D].labels});let F=A60(D);Object.keys(F).forEach((J)=>{let Q=F[J];w3[D][J]=C60(Q),w3[D][J].raw=N60(Q)})});bC.exports=w3});var XB=z((wN0,cC)=>{var mC=(D,F)=>(...$)=>{return`\x1B[${D(...$)+F}m`},lC=(D,F)=>(...$)=>{let J=D(...$);return`\x1B[${38+F};5;${J}m`},pC=(D,F)=>(...$)=>{let J=D(...$);return`\x1B[${38+F};2;${J[0]};${J[1]};${J[2]}m`},A7=(D)=>D,dC=(D,F,$)=>[D,F,$],T3=(D,F,$)=>{Object.defineProperty(D,F,{get:()=>{let J=$();return Object.defineProperty(D,F,{value:J,enumerable:!0,configurable:!0}),J},enumerable:!0,configurable:!0})},BB,j3=(D,F,$,J)=>{if(BB===void 0)BB=uC();let Q=J?10:0,Y={};for(let[B,X]of Object.entries(BB)){let G=B==="ansi16"?"ansi":B;if(B===F)Y[G]=D($,Q);else if(typeof X==="object")Y[G]=D(X[F],Q)}return Y};function R60(){let D=new Map,F={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};F.color.gray=F.color.blackBright,F.bgColor.bgGray=F.bgColor.bgBlackBright,F.color.grey=F.color.blackBright,F.bgColor.bgGrey=F.bgColor.bgBlackBright;for(let[$,J]of Object.entries(F)){for(let[Q,Y]of Object.entries(J))F[Q]={open:`\x1B[${Y[0]}m`,close:`\x1B[${Y[1]}m`},J[Q]=F[Q],D.set(Y[0],Y[1]);Object.defineProperty(F,$,{value:J,enumerable:!1})}return Object.defineProperty(F,"codes",{value:D,enumerable:!1}),F.color.close="\x1B[39m",F.bgColor.close="\x1B[49m",T3(F.color,"ansi",()=>j3(mC,"ansi16",A7,!1)),T3(F.color,"ansi256",()=>j3(lC,"ansi256",A7,!1)),T3(F.color,"ansi16m",()=>j3(pC,"rgb",dC,!1)),T3(F.bgColor,"ansi",()=>j3(mC,"ansi16",A7,!0)),T3(F.bgColor,"ansi256",()=>j3(lC,"ansi256",A7,!0)),T3(F.bgColor,"ansi16m",()=>j3(pC,"rgb",dC,!0)),F}Object.defineProperty(cC,"exports",{enumerable:!0,get:R60})});var aC=z((TN0,iC)=>{var Y5=JB(),O60=J5(),w60=XB(),WB=new Set(["\x1B","\x9B"]),nC=(D)=>`${WB.values().next().value}[${D}m`,T60=(D)=>D.split(" ").map((F)=>Y5(F)),GB=(D,F,$)=>{let J=[...F],Q=!1,Y=Y5(O60(D[D.length-1]));for(let[B,X]of J.entries()){let G=Y5(X);if(Y+G<=$)D[D.length-1]+=X;else D.push(X),Y=0;if(WB.has(X))Q=!0;else if(Q&&X==="m"){Q=!1;continue}if(Q)continue;if(Y+=G,Y===$&&B<J.length-1)D.push(""),Y=0}if(!Y&&D[D.length-1].length>0&&D.length>1)D[D.length-2]+=D.pop()},j60=(D)=>{let F=D.split(" "),$=F.length;while($>0){if(Y5(F[$-1])>0)break;$--}if($===F.length)return D;return F.slice(0,$).join(" ")+F.slice($).join("")},P60=(D,F,$={})=>{if($.trim!==!1&&D.trim()==="")return"";let J="",Q="",Y,B=T60(D),X=[""];for(let[G,H]of D.split(" ").entries()){if($.trim!==!1)X[X.length-1]=X[X.length-1].trimLeft();let q=Y5(X[X.length-1]);if(G!==0){if(q>=F&&($.wordWrap===!1||$.trim===!1))X.push(""),q=0;if(q>0||$.trim===!1)X[X.length-1]+=" ",q++}if($.hard&&B[G]>F){let K=F-q,V=1+Math.floor((B[G]-K-1)/F);if(Math.floor((B[G]-1)/F)<V)X.push("");GB(X,H,F);continue}if(q+B[G]>F&&q>0&&B[G]>0){if($.wordWrap===!1&&q<F){GB(X,H,F);continue}X.push("")}if(q+B[G]>F&&$.wordWrap===!1){GB(X,H,F);continue}X[X.length-1]+=H}if($.trim!==!1)X=X.map(j60);J=X.join(`
@@ -42,7 +42,7 @@ Calls to async() callback can have unexpected results.`);return V=!0,function(O,
42
42
  `)+$,Q=J+1,J=D.indexOf(`
43
43
  `,Q)}while(J!==-1);return Y+=D.substr(Q),Y};DR.exports={stringReplaceAll:k60,stringEncaseCRLFWithFirstIndex:v60}});var BR=z((SN0,YR)=>{var y60=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,$R=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,x60=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,_60=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,f60=new Map([["n",`
44
44
  `],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\x00"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function QR(D){let F=D[0]==="u",$=D[1]==="{";if(F&&!$&&D.length===5||D[0]==="x"&&D.length===3)return String.fromCharCode(parseInt(D.slice(1),16));if(F&&$)return String.fromCodePoint(parseInt(D.slice(2,-1),16));return f60.get(D)||D}function g60(D,F){let $=[],J=F.trim().split(/\s*,\s*/g),Q;for(let Y of J){let B=Number(Y);if(!Number.isNaN(B))$.push(B);else if(Q=Y.match(x60))$.push(Q[2].replace(_60,(X,G,H)=>G?QR(G):H));else throw Error(`Invalid Chalk template style argument: ${Y} (in style '${D}')`)}return $}function h60(D){$R.lastIndex=0;let F=[],$;while(($=$R.exec(D))!==null){let J=$[1];if($[2]){let Q=g60(J,$[2]);F.push([J].concat(Q))}else F.push([J])}return F}function JR(D,F){let $={};for(let Q of F)for(let Y of Q.styles)$[Y[0]]=Q.inverse?null:Y.slice(1);let J=D;for(let[Q,Y]of Object.entries($)){if(!Array.isArray(Y))continue;if(!(Q in J))throw Error(`Unknown Chalk style: ${Q}`);J=Y.length>0?J[Q](...Y):J[Q]}return J}YR.exports=(D,F)=>{let $=[],J=[],Q=[];if(F.replace(y60,(Y,B,X,G,H,q)=>{if(B)Q.push(QR(B));else if(G){let K=Q.join("");Q=[],J.push($.length===0?K:JR(D,$)(K)),$.push({inverse:X,styles:h60(G)})}else if(H){if($.length===0)throw Error("Found extraneous } in Chalk template literal");J.push(JR(D,$)(Q.join(""))),Q=[],$.pop()}else Q.push(q)}),J.push(Q.join("")),$.length>0){let Y=`Chalk template literal is missing ${$.length} closing bracket${$.length===1?"":"s"} (\`}\`)`;throw Error(Y)}return J.join("")}});var ZB=z((kN0,zR)=>{var B5=XB(),{stdout:zB,stderr:EB}=eC(),{stringReplaceAll:b60,stringEncaseCRLFWithFirstIndex:u60}=FR(),{isArray:M7}=Array,GR=["ansi","ansi","ansi256","ansi16m"],P3=Object.create(null),m60=(D,F={})=>{if(F.level&&!(Number.isInteger(F.level)&&F.level>=0&&F.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let $=zB?zB.level:0;D.level=F.level===void 0?$:F.level};class WR{constructor(D){return HR(D)}}var HR=(D)=>{let F={};return m60(F,D),F.template=(...$)=>KR(F.template,...$),Object.setPrototypeOf(F,N7.prototype),Object.setPrototypeOf(F.template,F),F.template.constructor=()=>{throw Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},F.template.Instance=WR,F.template};function N7(D){return HR(D)}for(let[D,F]of Object.entries(B5))P3[D]={get(){let $=C7(this,VB(F.open,F.close,this._styler),this._isEmpty);return Object.defineProperty(this,D,{value:$}),$}};P3.visible={get(){let D=C7(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:D}),D}};var qR=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let D of qR)P3[D]={get(){let{level:F}=this;return function(...$){let J=VB(B5.color[GR[F]][D](...$),B5.color.close,this._styler);return C7(this,J,this._isEmpty)}}};for(let D of qR){let F="bg"+D[0].toUpperCase()+D.slice(1);P3[F]={get(){let{level:$}=this;return function(...J){let Q=VB(B5.bgColor[GR[$]][D](...J),B5.bgColor.close,this._styler);return C7(this,Q,this._isEmpty)}}}}var l60=Object.defineProperties(()=>{},{...P3,level:{enumerable:!0,get(){return this._generator.level},set(D){this._generator.level=D}}}),VB=(D,F,$)=>{let J,Q;if($===void 0)J=D,Q=F;else J=$.openAll+D,Q=F+$.closeAll;return{open:D,close:F,openAll:J,closeAll:Q,parent:$}},C7=(D,F,$)=>{let J=(...Q)=>{if(M7(Q[0])&&M7(Q[0].raw))return XR(J,KR(J,...Q));return XR(J,Q.length===1?""+Q[0]:Q.join(" "))};return Object.setPrototypeOf(J,l60),J._generator=D,J._styler=F,J._isEmpty=$,J},XR=(D,F)=>{if(D.level<=0||!F)return D._isEmpty?"":F;let $=D._styler;if($===void 0)return F;let{openAll:J,closeAll:Q}=$;if(F.indexOf("\x1B")!==-1)while($!==void 0)F=b60(F,$.close,$.open),$=$.parent;let Y=F.indexOf(`
45
- `);if(Y!==-1)F=u60(F,Q,J,Y);return J+F+Q},KB,KR=(D,...F)=>{let[$]=F;if(!M7($)||!M7($.raw))return F.join(" ");let J=F.slice(1),Q=[$.raw[0]];for(let Y=1;Y<$.length;Y++)Q.push(String(J[Y-1]).replace(/[{}\\]/g,"\\$&"),String($.raw[Y]));if(KB===void 0)KB=BR();return KB(D,Q.join(""))};Object.defineProperties(N7.prototype,P3);var R7=N7();R7.supportsColor=zB;R7.stderr=N7({level:EB?EB.level:0});R7.stderr.supportsColor=EB;zR.exports=R7});var VR=z((vN0,UB)=>{var ER=(D,F)=>{for(let $ of Reflect.ownKeys(F))Object.defineProperty(D,$,Object.getOwnPropertyDescriptor(F,$));return D};UB.exports=ER;UB.exports.default=ER});var UR=z((yN0,w7)=>{var p60=VR(),O7=new WeakMap,ZR=(D,F={})=>{if(typeof D!=="function")throw TypeError("Expected a function");let $,J=0,Q=D.displayName||D.name||"<anonymous>",Y=function(...B){if(O7.set(Y,++J),J===1)$=D.apply(this,B),D=null;else if(F.throw===!0)throw Error(`Function \`${Q}\` can only be called once`);return $};return p60(Y,D),O7.set(Y,J),Y};w7.exports=ZR;w7.exports.default=ZR;w7.exports.callCount=(D)=>{if(!O7.has(D))throw Error(`The given function \`${D.name}\` is not wrapped by the \`onetime\` package`);return O7.get(D)}});var LR=z((xN0,T7)=>{T7.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")T7.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")T7.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var AR=z((_N0,S3)=>{var c0=global.process,F4=function(D){return D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function"};if(!F4(c0))S3.exports=function(){return function(){}};else{if(LB=K0("assert"),$4=LR(),AB=/^win/i.test(c0.platform),I3=K0("events"),typeof I3!=="function")I3=I3.EventEmitter;if(c0.__signal_exit_emitter__)WD=c0.__signal_exit_emitter__;else WD=c0.__signal_exit_emitter__=new I3,WD.count=0,WD.emitted={};if(!WD.infinite)WD.setMaxListeners(1/0),WD.infinite=!0;S3.exports=function(D,F){if(!F4(global.process))return function(){};if(LB.equal(typeof D,"function","a callback must be provided for exit handler"),J4===!1)j7();var $="exit";if(F&&F.alwaysLast)$="afterexit";var J=function(){if(WD.removeListener($,D),WD.listeners("exit").length===0&&WD.listeners("afterexit").length===0)X5()};return WD.on($,D),J},X5=function(){if(!J4||!F4(global.process))return;J4=!1,$4.forEach(function(F){try{c0.removeListener(F,G5[F])}catch($){}}),c0.emit=W5,c0.reallyExit=P7,WD.count-=1},S3.exports.unload=X5,O6=function(F,$,J){if(WD.emitted[F])return;WD.emitted[F]=!0,WD.emit(F,$,J)},G5={},$4.forEach(function(D){G5[D]=function(){if(!F4(global.process))return;var $=c0.listeners(D);if($.length===WD.count){if(X5(),O6("exit",null,D),O6("afterexit",null,D),AB&&D==="SIGHUP")D="SIGINT";c0.kill(c0.pid,D)}}}),S3.exports.signals=function(){return $4},J4=!1,j7=function(){if(J4||!F4(global.process))return;J4=!0,WD.count+=1,$4=$4.filter(function(F){try{return c0.on(F,G5[F]),!0}catch($){return!1}}),c0.emit=NB,c0.reallyExit=MB},S3.exports.load=j7,P7=c0.reallyExit,MB=function(F){if(!F4(global.process))return;c0.exitCode=F||0,O6("exit",c0.exitCode,null),O6("afterexit",c0.exitCode,null),P7.call(c0,c0.exitCode)},W5=c0.emit,NB=function(F,$){if(F==="exit"&&F4(global.process)){if($!==void 0)c0.exitCode=$;var J=W5.apply(this,arguments);return O6("exit",c0.exitCode,null),O6("afterexit",c0.exitCode,null),J}else return W5.apply(this,arguments)}}var LB,$4,AB,I3,WD,X5,O6,G5,J4,j7,P7,MB,W5,NB});var NR=z((fN0,MR)=>{var d60=UR(),c60=AR();MR.exports=d60(()=>{c60(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})})});var OR=z((i60)=>{var n60=NR(),I7=!1;i60.show=(D=process.stderr)=>{if(!D.isTTY)return;I7=!1,D.write("\x1B[?25h")};i60.hide=(D=process.stderr)=>{if(!D.isTTY)return;n60(),I7=!0,D.write("\x1B[?25l")};i60.toggle=(D,F)=>{if(D!==void 0)I7=D;if(I7)i60.show(F);else i60.hide(F)}});var wR=z((hN0,o60)=>{o60.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},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 ","\u2764\uFE0F "]},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:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},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:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\uD83C\uDF24 ","\u26C5\uFE0F ","\uD83C\uDF25 ","\u2601\uFE0F ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\u26C8 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\u2601\uFE0F ","\uD83C\uDF25 ","\u26C5\uFE0F ","\uD83C\uDF24 ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\uD83C\uDF32","\uD83C\uDF84"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\uD83E\uDD18 ","\uD83E\uDD1F ","\uD83D\uDD96 ","\u270B ","\uD83E\uDD1A ","\uD83D\uDC46 "]},fistBump:{interval:80,frames:["\uD83E\uDD1C\u3000\u3000\u3000\u3000\uD83E\uDD1B ","\uD83E\uDD1C\u3000\u3000\u3000\u3000\uD83E\uDD1B ","\uD83E\uDD1C\u3000\u3000\u3000\u3000\uD83E\uDD1B ","\u3000\uD83E\uDD1C\u3000\u3000\uD83E\uDD1B\u3000 ","\u3000\u3000\uD83E\uDD1C\uD83E\uDD1B\u3000\u3000 ","\u3000\uD83E\uDD1C\u2728\uD83E\uDD1B\u3000\u3000 ","\uD83E\uDD1C\u3000\u2728\u3000\uD83E\uDD1B\u3000 "]},soccerHeader:{interval:80,frames:[" \uD83E\uDDD1\u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F\uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \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 ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},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:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var k7=z((bN0,jR)=>{var S7=Object.assign({},wR()),TR=Object.keys(S7);Object.defineProperty(S7,"random",{get(){let D=Math.floor(Math.random()*TR.length),F=TR[D];return S7[F]}});jR.exports=S7});var CB=z((uN0,PR)=>{PR.exports=()=>{if(process.platform!=="win32")return!0;return Boolean(process.env.CI)||Boolean(process.env.WT_SESSION)||process.env.TERM_PROGRAM==="vscode"||process.env.TERM==="xterm-256color"||process.env.TERM==="alacritty"}});var SR=z((mN0,IR)=>{var w6=ZB(),s60=CB(),r60={info:w6.blue("\u2139"),success:w6.green("\u2714"),warning:w6.yellow("\u26A0"),error:w6.red("\u2716")},t60={info:w6.blue("i"),success:w6.green("\u221A"),warning:w6.yellow("\u203C"),error:w6.red("\xD7")};IR.exports=s60()?r60:t60});var kR=z((lN0,v7)=>{var e60=function(){function D(B,X,G,H){var q;if(typeof X==="object")G=X.depth,H=X.prototype,q=X.filter,X=X.circular;var K=[],V=[],E=typeof Buffer<"u";if(typeof X>"u")X=!0;if(typeof G>"u")G=1/0;function Z(L,A){if(L===null)return null;if(A==0)return L;var M,O;if(typeof L!="object")return L;if(D.__isArray(L))M=[];else if(D.__isRegExp(L)){if(M=new RegExp(L.source,Y(L)),L.lastIndex)M.lastIndex=L.lastIndex}else if(D.__isDate(L))M=new Date(L.getTime());else if(E&&Buffer.isBuffer(L)){if(Buffer.allocUnsafe)M=Buffer.allocUnsafe(L.length);else M=new Buffer(L.length);return L.copy(M),M}else if(typeof H>"u")O=Object.getPrototypeOf(L),M=Object.create(O);else M=Object.create(H),O=H;if(X){var w=K.indexOf(L);if(w!=-1)return V[w];K.push(L),V.push(M)}for(var k in L){var R;if(O)R=Object.getOwnPropertyDescriptor(O,k);if(R&&R.set==null)continue;M[k]=Z(L[k],A-1)}return M}return Z(B,G)}D.clonePrototype=function(X){if(X===null)return null;var G=function(){};return G.prototype=X,new G};function F(B){return Object.prototype.toString.call(B)}D.__objToStr=F;function $(B){return typeof B==="object"&&F(B)==="[object Date]"}D.__isDate=$;function J(B){return typeof B==="object"&&F(B)==="[object Array]"}D.__isArray=J;function Q(B){return typeof B==="object"&&F(B)==="[object RegExp]"}D.__isRegExp=Q;function Y(B){var X="";if(B.global)X+="g";if(B.ignoreCase)X+="i";if(B.multiline)X+="m";return X}return D.__getRegExpFlags=Y,D}();if(typeof v7==="object"&&v7.exports)v7.exports=e60});var yR=z((pN0,vR)=>{var D40=kR();vR.exports=function(D,F){return D=D||{},Object.keys(F).forEach(function($){if(typeof D[$]>"u")D[$]=D40(F[$])}),D}});var _R=z((dN0,xR)=>{xR.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]]});var bR=z((cN0,RB)=>{var F40=yR(),H5=_R(),gR={nul:0,control:0};RB.exports=function(F){return hR(F,gR)};RB.exports.config=function(D){return D=F40(D||{},gR),function($){return hR($,D)}};function hR(D,F){if(typeof D!=="string")return fR(D,F);var $=0;for(var J=0;J<D.length;J++){var Q=fR(D.charCodeAt(J),F);if(Q<0)return-1;$+=Q}return $}function fR(D,F){if(D===0)return F.nul;if(D<32||D>=127&&D<160)return F.control;if($40(D))return 0;return 1+(D>=4352&&(D<=4447||D==9001||D==9002||D>=11904&&D<=42191&&D!=12351||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65135||D>=65280&&D<=65376||D>=65504&&D<=65510||D>=131072&&D<=196605||D>=196608&&D<=262141))}function $40(D){var F=0,$=H5.length-1,J;if(D<H5[0][0]||D>H5[$][1])return!1;while($>=F)if(J=Math.floor((F+$)/2),D>H5[J][1])F=J+1;else if(D<H5[J][0])$=J-1;else return!0;return!1}});var mR=z((nN0,uR)=>{uR.exports=({stream:D=process.stdout}={})=>{return Boolean(D&&D.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}});var iR=z((iN0,nR)=>{function lR(D,F){var $=Object.keys(D);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(D);F&&(J=J.filter(function(Q){return Object.getOwnPropertyDescriptor(D,Q).enumerable})),$.push.apply($,J)}return $}function pR(D){for(var F=1;F<arguments.length;F++){var $=arguments[F]!=null?arguments[F]:{};F%2?lR(Object($),!0).forEach(function(J){J40(D,J,$[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors($)):lR(Object($)).forEach(function(J){Object.defineProperty(D,J,Object.getOwnPropertyDescriptor($,J))})}return D}function J40(D,F,$){if(F=cR(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function Q40(D,F){if(!(D instanceof F))throw TypeError("Cannot call a class as a function")}function dR(D,F){for(var $=0;$<F.length;$++){var J=F[$];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,cR(J.key),J)}}function Y40(D,F,$){if(F)dR(D.prototype,F);if($)dR(D,$);return Object.defineProperty(D,"prototype",{writable:!1}),D}function cR(D){var F=B40(D,"string");return typeof F==="symbol"?F:String(F)}function B40(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var J=$.call(D,F||"default");if(typeof J!=="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var X40=K0("buffer"),y7=X40.Buffer,G40=K0("util"),OB=G40.inspect,W40=OB&&OB.custom||"inspect";function H40(D,F,$){y7.prototype.copy.call(D,F,$)}nR.exports=function(){function D(){Q40(this,D),this.head=null,this.tail=null,this.length=0}return Y40(D,[{key:"push",value:function($){var J={data:$,next:null};if(this.length>0)this.tail.next=J;else this.head=J;this.tail=J,++this.length}},{key:"unshift",value:function($){var J={data:$,next:this.head};if(this.length===0)this.tail=J;this.head=J,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var $=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,$}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function($){if(this.length===0)return"";var J=this.head,Q=""+J.data;while(J=J.next)Q+=$+J.data;return Q}},{key:"concat",value:function($){if(this.length===0)return y7.alloc(0);var J=y7.allocUnsafe($>>>0),Q=this.head,Y=0;while(Q)H40(Q.data,J,Y),Y+=Q.data.length,Q=Q.next;return J}},{key:"consume",value:function($,J){var Q;if($<this.head.data.length)Q=this.head.data.slice(0,$),this.head.data=this.head.data.slice($);else if($===this.head.data.length)Q=this.shift();else Q=J?this._getString($):this._getBuffer($);return Q}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function($){var J=this.head,Q=1,Y=J.data;$-=Y.length;while(J=J.next){var B=J.data,X=$>B.length?B.length:$;if(X===B.length)Y+=B;else Y+=B.slice(0,$);if($-=X,$===0){if(X===B.length)if(++Q,J.next)this.head=J.next;else this.head=this.tail=null;else this.head=J,J.data=B.slice(X);break}++Q}return this.length-=Q,Y}},{key:"_getBuffer",value:function($){var J=y7.allocUnsafe($),Q=this.head,Y=1;Q.data.copy(J),$-=Q.data.length;while(Q=Q.next){var B=Q.data,X=$>B.length?B.length:$;if(B.copy(J,J.length-$,0,X),$-=X,$===0){if(X===B.length)if(++Y,Q.next)this.head=Q.next;else this.head=this.tail=null;else this.head=Q,Q.data=B.slice(X);break}++Y}return this.length-=Y,J}},{key:W40,value:function($,J){return OB(this,pR(pR({},J),{},{depth:0,customInspect:!1}))}}]),D}()});var TB=z((aN0,oR)=>{function q40(D,F){var $=this,J=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(J||Q){if(F)F(D);else if(D){if(!this._writableState)process.nextTick(wB,this,D);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(wB,this,D)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(D||null,function(Y){if(!F&&Y)if(!$._writableState)process.nextTick(aR,$,Y);else if(!$._writableState.errorEmitted)$._writableState.errorEmitted=!0,process.nextTick(aR,$,Y);else process.nextTick(x7,$);else if(F)process.nextTick(x7,$),F(Y);else process.nextTick(x7,$)}),this}function aR(D,F){wB(D,F),x7(D)}function x7(D){if(D._writableState&&!D._writableState.emitClose)return;if(D._readableState&&!D._readableState.emitClose)return;D.emit("close")}function K40(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function wB(D,F){D.emit("error",F)}function z40(D,F){var{_readableState:$,_writableState:J}=D;if($&&$.autoDestroy||J&&J.autoDestroy)D.destroy(F);else D.emit("error",F)}oR.exports={destroy:q40,undestroy:K40,errorOrDestroy:z40}});var T6=z((U40,tR)=>{var rR={};function E1(D,F,$){if(!$)$=Error;function J(Y,B,X){if(typeof F==="string")return F;else return F(Y,B,X)}class Q extends ${constructor(Y,B,X){super(J(Y,B,X))}}Q.prototype.name=$.name,Q.prototype.code=D,rR[D]=Q}function sR(D,F){if(Array.isArray(D)){let $=D.length;if(D=D.map((J)=>String(J)),$>2)return`one of ${F} ${D.slice(0,$-1).join(", ")}, or `+D[$-1];else if($===2)return`one of ${F} ${D[0]} or ${D[1]}`;else return`of ${F} ${D[0]}`}else return`of ${F} ${String(D)}`}function E40(D,F,$){return D.substr(!$||$<0?0:+$,F.length)===F}function V40(D,F,$){if($===void 0||$>D.length)$=D.length;return D.substring($-F.length,$)===F}function Z40(D,F,$){if(typeof $!=="number")$=0;if($+F.length>D.length)return!1;else return D.indexOf(F,$)!==-1}E1("ERR_INVALID_OPT_VALUE",function(D,F){return'The value "'+F+'" is invalid for option "'+D+'"'},TypeError);E1("ERR_INVALID_ARG_TYPE",function(D,F,$){let J;if(typeof F==="string"&&E40(F,"not "))J="must not be",F=F.replace(/^not /,"");else J="must be";let Q;if(V40(D," argument"))Q=`The ${D} ${J} ${sR(F,"type")}`;else{let Y=Z40(D,".")?"property":"argument";Q=`The "${D}" ${Y} ${J} ${sR(F,"type")}`}return Q+=`. Received type ${typeof $}`,Q},TypeError);E1("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");E1("ERR_METHOD_NOT_IMPLEMENTED",function(D){return"The "+D+" method is not implemented"});E1("ERR_STREAM_PREMATURE_CLOSE","Premature close");E1("ERR_STREAM_DESTROYED",function(D){return"Cannot call "+D+" after a stream was destroyed"});E1("ERR_MULTIPLE_CALLBACK","Callback called multiple times");E1("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");E1("ERR_STREAM_WRITE_AFTER_END","write after end");E1("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);E1("ERR_UNKNOWN_ENCODING",function(D){return"Unknown encoding: "+D},TypeError);E1("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");U40.codes=rR});var jB=z((oN0,eR)=>{var A40=T6().codes.ERR_INVALID_OPT_VALUE;function M40(D,F,$){return D.highWaterMark!=null?D.highWaterMark:F?D[$]:null}function N40(D,F,$,J){var Q=M40(F,J,$);if(Q!=null){if(!(isFinite(Q)&&Math.floor(Q)===Q)||Q<0){var Y=J?$:"highWaterMark";throw new A40(Y,Q)}return Math.floor(Q)}return D.objectMode?16:16384}eR.exports={getHighWaterMark:N40}});var DO=z((sN0,PB)=>{if(typeof Object.create==="function")PB.exports=function(F,$){if($)F.super_=$,F.prototype=Object.create($.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}})};else PB.exports=function(F,$){if($){F.super_=$;var J=function(){};J.prototype=$.prototype,F.prototype=new J,F.prototype.constructor=F}}});var Q4=z((rN0,IB)=>{try{if(_7=K0("util"),typeof _7.inherits!=="function")throw"";IB.exports=_7.inherits}catch(D){IB.exports=DO()}var _7});var $O=z((tN0,FO)=>{FO.exports=K0("util").deprecate});var vB=z((eN0,GO)=>{GO.exports=e0;function QO(D){var F=this;this.next=null,this.entry=null,this.finish=function(){a40(F,D)}}var k3;e0.WritableState=K5;var C40={deprecate:$O()},YO=K0("stream"),g7=K0("buffer").Buffer,R40=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function O40(D){return g7.from(D)}function w40(D){return g7.isBuffer(D)||D instanceof R40}var kB=TB(),T40=jB(),j40=T40.getHighWaterMark,j6=T6().codes,P40=j6.ERR_INVALID_ARG_TYPE,I40=j6.ERR_METHOD_NOT_IMPLEMENTED,S40=j6.ERR_MULTIPLE_CALLBACK,k40=j6.ERR_STREAM_CANNOT_PIPE,v40=j6.ERR_STREAM_DESTROYED,y40=j6.ERR_STREAM_NULL_VALUES,x40=j6.ERR_STREAM_WRITE_AFTER_END,_40=j6.ERR_UNKNOWN_ENCODING,v3=kB.errorOrDestroy;Q4()(e0,YO);function f40(){}function K5(D,F,$){if(k3=k3||Y4(),D=D||{},typeof $!=="boolean")$=F instanceof k3;if(this.objectMode=!!D.objectMode,$)this.objectMode=this.objectMode||!!D.writableObjectMode;this.highWaterMark=j40(this,D,"writableHighWaterMark",$),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var J=D.decodeStrings===!1;this.decodeStrings=!J,this.defaultEncoding=D.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){p40(F,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new QO(this)}K5.prototype.getBuffer=function(){var F=this.bufferedRequest,$=[];while(F)$.push(F),F=F.next;return $};(function(){try{Object.defineProperty(K5.prototype,"buffer",{get:C40.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(D){}})();var f7;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")f7=Function.prototype[Symbol.hasInstance],Object.defineProperty(e0,Symbol.hasInstance,{value:function(F){if(f7.call(this,F))return!0;if(this!==e0)return!1;return F&&F._writableState instanceof K5}});else f7=function(F){return F instanceof this};function e0(D){k3=k3||Y4();var F=this instanceof k3;if(!F&&!f7.call(e0,this))return new e0(D);if(this._writableState=new K5(D,this,F),this.writable=!0,D){if(typeof D.write==="function")this._write=D.write;if(typeof D.writev==="function")this._writev=D.writev;if(typeof D.destroy==="function")this._destroy=D.destroy;if(typeof D.final==="function")this._final=D.final}YO.call(this)}e0.prototype.pipe=function(){v3(this,new k40)};function g40(D,F){var $=new x40;v3(D,$),process.nextTick(F,$)}function h40(D,F,$,J){var Q;if($===null)Q=new y40;else if(typeof $!=="string"&&!F.objectMode)Q=new P40("chunk",["string","Buffer"],$);if(Q)return v3(D,Q),process.nextTick(J,Q),!1;return!0}e0.prototype.write=function(D,F,$){var J=this._writableState,Q=!1,Y=!J.objectMode&&w40(D);if(Y&&!g7.isBuffer(D))D=O40(D);if(typeof F==="function")$=F,F=null;if(Y)F="buffer";else if(!F)F=J.defaultEncoding;if(typeof $!=="function")$=f40;if(J.ending)g40(this,$);else if(Y||h40(this,J,D,$))J.pendingcb++,Q=u40(this,J,Y,D,F,$);return Q};e0.prototype.cork=function(){this._writableState.corked++};e0.prototype.uncork=function(){var D=this._writableState;if(D.corked){if(D.corked--,!D.writing&&!D.corked&&!D.bufferProcessing&&D.bufferedRequest)BO(this,D)}};e0.prototype.setDefaultEncoding=function(F){if(typeof F==="string")F=F.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((F+"").toLowerCase())>-1))throw new _40(F);return this._writableState.defaultEncoding=F,this};Object.defineProperty(e0.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function b40(D,F,$){if(!D.objectMode&&D.decodeStrings!==!1&&typeof F==="string")F=g7.from(F,$);return F}Object.defineProperty(e0.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function u40(D,F,$,J,Q,Y){if(!$){var B=b40(F,J,Q);if(J!==B)$=!0,Q="buffer",J=B}var X=F.objectMode?1:J.length;F.length+=X;var G=F.length<F.highWaterMark;if(!G)F.needDrain=!0;if(F.writing||F.corked){var H=F.lastBufferedRequest;if(F.lastBufferedRequest={chunk:J,encoding:Q,isBuf:$,callback:Y,next:null},H)H.next=F.lastBufferedRequest;else F.bufferedRequest=F.lastBufferedRequest;F.bufferedRequestCount+=1}else SB(D,F,!1,X,J,Q,Y);return G}function SB(D,F,$,J,Q,Y,B){if(F.writelen=J,F.writecb=B,F.writing=!0,F.sync=!0,F.destroyed)F.onwrite(new v40("write"));else if($)D._writev(Q,F.onwrite);else D._write(Q,Y,F.onwrite);F.sync=!1}function m40(D,F,$,J,Q){if(--F.pendingcb,$)process.nextTick(Q,J),process.nextTick(q5,D,F),D._writableState.errorEmitted=!0,v3(D,J);else Q(J),D._writableState.errorEmitted=!0,v3(D,J),q5(D,F)}function l40(D){D.writing=!1,D.writecb=null,D.length-=D.writelen,D.writelen=0}function p40(D,F){var $=D._writableState,J=$.sync,Q=$.writecb;if(typeof Q!=="function")throw new S40;if(l40($),F)m40(D,$,J,F,Q);else{var Y=XO($)||D.destroyed;if(!Y&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)BO(D,$);if(J)process.nextTick(JO,D,$,Y,Q);else JO(D,$,Y,Q)}}function JO(D,F,$,J){if(!$)d40(D,F);F.pendingcb--,J(),q5(D,F)}function d40(D,F){if(F.length===0&&F.needDrain)F.needDrain=!1,D.emit("drain")}function BO(D,F){F.bufferProcessing=!0;var $=F.bufferedRequest;if(D._writev&&$&&$.next){var J=F.bufferedRequestCount,Q=Array(J),Y=F.corkedRequestsFree;Y.entry=$;var B=0,X=!0;while($){if(Q[B]=$,!$.isBuf)X=!1;$=$.next,B+=1}if(Q.allBuffers=X,SB(D,F,!0,F.length,Q,"",Y.finish),F.pendingcb++,F.lastBufferedRequest=null,Y.next)F.corkedRequestsFree=Y.next,Y.next=null;else F.corkedRequestsFree=new QO(F);F.bufferedRequestCount=0}else{while($){var{chunk:G,encoding:H,callback:q}=$,K=F.objectMode?1:G.length;if(SB(D,F,!1,K,G,H,q),$=$.next,F.bufferedRequestCount--,F.writing)break}if($===null)F.lastBufferedRequest=null}F.bufferedRequest=$,F.bufferProcessing=!1}e0.prototype._write=function(D,F,$){$(new I40("_write()"))};e0.prototype._writev=null;e0.prototype.end=function(D,F,$){var J=this._writableState;if(typeof D==="function")$=D,D=null,F=null;else if(typeof F==="function")$=F,F=null;if(D!==null&&D!==void 0)this.write(D,F);if(J.corked)J.corked=1,this.uncork();if(!J.ending)i40(this,J,$);return this};Object.defineProperty(e0.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function XO(D){return D.ending&&D.length===0&&D.bufferedRequest===null&&!D.finished&&!D.writing}function c40(D,F){D._final(function($){if(F.pendingcb--,$)v3(D,$);F.prefinished=!0,D.emit("prefinish"),q5(D,F)})}function n40(D,F){if(!F.prefinished&&!F.finalCalled)if(typeof D._final==="function"&&!F.destroyed)F.pendingcb++,F.finalCalled=!0,process.nextTick(c40,D,F);else F.prefinished=!0,D.emit("prefinish")}function q5(D,F){var $=XO(F);if($){if(n40(D,F),F.pendingcb===0){if(F.finished=!0,D.emit("finish"),F.autoDestroy){var J=D._readableState;if(!J||J.autoDestroy&&J.endEmitted)D.destroy()}}}return $}function i40(D,F,$){if(F.ending=!0,q5(D,F),$)if(F.finished)process.nextTick($);else D.once("finish",$);F.ended=!0,D.writable=!1}function a40(D,F,$){var J=D.entry;D.entry=null;while(J){var Q=J.callback;F.pendingcb--,Q($),J=J.next}F.corkedRequestsFree.next=D}Object.defineProperty(e0.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(F){if(!this._writableState)return;this._writableState.destroyed=F}});e0.prototype.destroy=kB.destroy;e0.prototype._undestroy=kB.undestroy;e0.prototype._destroy=function(D,F){F(D)}});var Y4=z((DC0,HO)=>{var o40=Object.keys||function(D){var F=[];for(var $ in D)F.push($);return F};HO.exports=B8;var WO=xB(),yB=vB();Q4()(B8,WO);{h7=o40(yB.prototype);for(z5=0;z5<h7.length;z5++)if(E5=h7[z5],!B8.prototype[E5])B8.prototype[E5]=yB.prototype[E5]}var h7,E5,z5;function B8(D){if(!(this instanceof B8))return new B8(D);if(WO.call(this,D),yB.call(this,D),this.allowHalfOpen=!0,D){if(D.readable===!1)this.readable=!1;if(D.writable===!1)this.writable=!1;if(D.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",s40)}}Object.defineProperty(B8.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(B8.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(B8.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s40(){if(this._writableState.ended)return;process.nextTick(r40,this)}function r40(D){D.end()}Object.defineProperty(B8.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(F){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=F,this._writableState.destroyed=F}})});var zO=z((_B,KO)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var b7=K0("buffer"),X8=b7.Buffer;function qO(D,F){for(var $ in D)F[$]=D[$]}if(X8.from&&X8.alloc&&X8.allocUnsafe&&X8.allocUnsafeSlow)KO.exports=b7;else qO(b7,_B),_B.Buffer=B4;function B4(D,F,$){return X8(D,F,$)}B4.prototype=Object.create(X8.prototype);qO(X8,B4);B4.from=function(D,F,$){if(typeof D==="number")throw TypeError("Argument must not be a number");return X8(D,F,$)};B4.alloc=function(D,F,$){if(typeof D!=="number")throw TypeError("Argument must be a number");var J=X8(D);if(F!==void 0)if(typeof $==="string")J.fill(F,$);else J.fill(F);else J.fill(0);return J};B4.allocUnsafe=function(D){if(typeof D!=="number")throw TypeError("Argument must be a number");return X8(D)};B4.allocUnsafeSlow=function(D){if(typeof D!=="number")throw TypeError("Argument must be a number");return b7.SlowBuffer(D)}});var hB=z((q30)=>{var gB=zO().Buffer,EO=gB.isEncoding||function(D){switch(D=""+D,D&&D.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t40(D){if(!D)return"utf8";var F;while(!0)switch(D){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return D;default:if(F)return;D=(""+D).toLowerCase(),F=!0}}function e40(D){var F=t40(D);if(typeof F!=="string"&&(gB.isEncoding===EO||!EO(D)))throw Error("Unknown encoding: "+D);return F||D}q30.StringDecoder=V5;function V5(D){this.encoding=e40(D);var F;switch(this.encoding){case"utf16le":this.text=Y30,this.end=B30,F=4;break;case"utf8":this.fillLast=$30,F=4;break;case"base64":this.text=X30,this.end=G30,F=3;break;default:this.write=W30,this.end=H30;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=gB.allocUnsafe(F)}V5.prototype.write=function(D){if(D.length===0)return"";var F,$;if(this.lastNeed){if(F=this.fillLast(D),F===void 0)return"";$=this.lastNeed,this.lastNeed=0}else $=0;if($<D.length)return F?F+this.text(D,$):this.text(D,$);return F||""};V5.prototype.end=Q30;V5.prototype.text=J30;V5.prototype.fillLast=function(D){if(this.lastNeed<=D.length)return D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,D.length),this.lastNeed-=D.length};function fB(D){if(D<=127)return 0;else if(D>>5===6)return 2;else if(D>>4===14)return 3;else if(D>>3===30)return 4;return D>>6===2?-1:-2}function D30(D,F,$){var J=F.length-1;if(J<$)return 0;var Q=fB(F[J]);if(Q>=0){if(Q>0)D.lastNeed=Q-1;return Q}if(--J<$||Q===-2)return 0;if(Q=fB(F[J]),Q>=0){if(Q>0)D.lastNeed=Q-2;return Q}if(--J<$||Q===-2)return 0;if(Q=fB(F[J]),Q>=0){if(Q>0)if(Q===2)Q=0;else D.lastNeed=Q-3;return Q}return 0}function F30(D,F,$){if((F[0]&192)!==128)return D.lastNeed=0,"\uFFFD";if(D.lastNeed>1&&F.length>1){if((F[1]&192)!==128)return D.lastNeed=1,"\uFFFD";if(D.lastNeed>2&&F.length>2){if((F[2]&192)!==128)return D.lastNeed=2,"\uFFFD"}}}function $30(D){var F=this.lastTotal-this.lastNeed,$=F30(this,D,F);if($!==void 0)return $;if(this.lastNeed<=D.length)return D.copy(this.lastChar,F,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,F,0,D.length),this.lastNeed-=D.length}function J30(D,F){var $=D30(this,D,F);if(!this.lastNeed)return D.toString("utf8",F);this.lastTotal=$;var J=D.length-($-this.lastNeed);return D.copy(this.lastChar,0,J),D.toString("utf8",F,J)}function Q30(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed)return F+"\uFFFD";return F}function Y30(D,F){if((D.length-F)%2===0){var $=D.toString("utf16le",F);if($){var J=$.charCodeAt($.length-1);if(J>=55296&&J<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1],$.slice(0,-1)}return $}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=D[D.length-1],D.toString("utf16le",F,D.length-1)}function B30(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed){var $=this.lastTotal-this.lastNeed;return F+this.lastChar.toString("utf16le",0,$)}return F}function X30(D,F){var $=(D.length-F)%3;if($===0)return D.toString("base64",F);if(this.lastNeed=3-$,this.lastTotal=3,$===1)this.lastChar[0]=D[D.length-1];else this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1];return D.toString("base64",F,D.length-$)}function G30(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed)return F+this.lastChar.toString("base64",0,3-this.lastNeed);return F}function W30(D){return D.toString(this.encoding)}function H30(D){return D&&D.length?this.write(D):""}});var u7=z(($C0,UO)=>{var VO=T6().codes.ERR_STREAM_PREMATURE_CLOSE;function z30(D){var F=!1;return function(){if(F)return;F=!0;for(var $=arguments.length,J=Array($),Q=0;Q<$;Q++)J[Q]=arguments[Q];D.apply(this,J)}}function E30(){}function V30(D){return D.setHeader&&typeof D.abort==="function"}function ZO(D,F,$){if(typeof F==="function")return ZO(D,null,F);if(!F)F={};$=z30($||E30);var J=F.readable||F.readable!==!1&&D.readable,Q=F.writable||F.writable!==!1&&D.writable,Y=function(){if(!D.writable)X()},B=D._writableState&&D._writableState.finished,X=function(){if(Q=!1,B=!0,!J)$.call(D)},G=D._readableState&&D._readableState.endEmitted,H=function(){if(J=!1,G=!0,!Q)$.call(D)},q=function(Z){$.call(D,Z)},K=function(){var Z;if(J&&!G){if(!D._readableState||!D._readableState.ended)Z=new VO;return $.call(D,Z)}if(Q&&!B){if(!D._writableState||!D._writableState.ended)Z=new VO;return $.call(D,Z)}},V=function(){D.req.on("finish",X)};if(V30(D))if(D.on("complete",X),D.on("abort",K),D.req)V();else D.on("request",V);else if(Q&&!D._writableState)D.on("end",Y),D.on("close",Y);if(D.on("end",H),D.on("finish",X),F.error!==!1)D.on("error",q);return D.on("close",K),function(){if(D.removeListener("complete",X),D.removeListener("abort",K),D.removeListener("request",V),D.req)D.req.removeListener("finish",X);D.removeListener("end",Y),D.removeListener("close",Y),D.removeListener("finish",X),D.removeListener("end",H),D.removeListener("error",q),D.removeListener("close",K)}}UO.exports=ZO});var AO=z((JC0,LO)=>{var m7;function P6(D,F,$){if(F=Z30(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function Z30(D){var F=U30(D,"string");return typeof F==="symbol"?F:String(F)}function U30(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var J=$.call(D,F||"default");if(typeof J!=="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var L30=u7(),I6=Symbol("lastResolve"),X4=Symbol("lastReject"),Z5=Symbol("error"),l7=Symbol("ended"),G4=Symbol("lastPromise"),bB=Symbol("handlePromise"),W4=Symbol("stream");function S6(D,F){return{value:D,done:F}}function A30(D){var F=D[I6];if(F!==null){var $=D[W4].read();if($!==null)D[G4]=null,D[I6]=null,D[X4]=null,F(S6($,!1))}}function M30(D){process.nextTick(A30,D)}function N30(D,F){return function($,J){D.then(function(){if(F[l7]){$(S6(void 0,!0));return}F[bB]($,J)},J)}}var C30=Object.getPrototypeOf(function(){}),R30=Object.setPrototypeOf((m7={get stream(){return this[W4]},next:function(){var F=this,$=this[Z5];if($!==null)return Promise.reject($);if(this[l7])return Promise.resolve(S6(void 0,!0));if(this[W4].destroyed)return new Promise(function(B,X){process.nextTick(function(){if(F[Z5])X(F[Z5]);else B(S6(void 0,!0))})});var J=this[G4],Q;if(J)Q=new Promise(N30(J,this));else{var Y=this[W4].read();if(Y!==null)return Promise.resolve(S6(Y,!1));Q=new Promise(this[bB])}return this[G4]=Q,Q}},P6(m7,Symbol.asyncIterator,function(){return this}),P6(m7,"return",function(){var F=this;return new Promise(function($,J){F[W4].destroy(null,function(Q){if(Q){J(Q);return}$(S6(void 0,!0))})})}),m7),C30),O30=function(F){var $,J=Object.create(R30,($={},P6($,W4,{value:F,writable:!0}),P6($,I6,{value:null,writable:!0}),P6($,X4,{value:null,writable:!0}),P6($,Z5,{value:null,writable:!0}),P6($,l7,{value:F._readableState.endEmitted,writable:!0}),P6($,bB,{value:function(Y,B){var X=J[W4].read();if(X)J[G4]=null,J[I6]=null,J[X4]=null,Y(S6(X,!1));else J[I6]=Y,J[X4]=B},writable:!0}),$));return J[G4]=null,L30(F,function(Q){if(Q&&Q.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Y=J[X4];if(Y!==null)J[G4]=null,J[I6]=null,J[X4]=null,Y(Q);J[Z5]=Q;return}var B=J[I6];if(B!==null)J[G4]=null,J[I6]=null,J[X4]=null,B(S6(void 0,!0));J[l7]=!0}),F.on("readable",M30.bind(null,J)),J};LO.exports=O30});var RO=z((QC0,CO)=>{function MO(D,F,$,J,Q,Y,B){try{var X=D[Y](B),G=X.value}catch(H){$(H);return}if(X.done)F(G);else Promise.resolve(G).then(J,Q)}function w30(D){return function(){var F=this,$=arguments;return new Promise(function(J,Q){var Y=D.apply(F,$);function B(G){MO(Y,J,Q,B,X,"next",G)}function X(G){MO(Y,J,Q,B,X,"throw",G)}B(void 0)})}}function NO(D,F){var $=Object.keys(D);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(D);F&&(J=J.filter(function(Q){return Object.getOwnPropertyDescriptor(D,Q).enumerable})),$.push.apply($,J)}return $}function T30(D){for(var F=1;F<arguments.length;F++){var $=arguments[F]!=null?arguments[F]:{};F%2?NO(Object($),!0).forEach(function(J){j30(D,J,$[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors($)):NO(Object($)).forEach(function(J){Object.defineProperty(D,J,Object.getOwnPropertyDescriptor($,J))})}return D}function j30(D,F,$){if(F=P30(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function P30(D){var F=I30(D,"string");return typeof F==="symbol"?F:String(F)}function I30(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var J=$.call(D,F||"default");if(typeof J!=="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var S30=T6().codes.ERR_INVALID_ARG_TYPE;function k30(D,F,$){var J;if(F&&typeof F.next==="function")J=F;else if(F&&F[Symbol.asyncIterator])J=F[Symbol.asyncIterator]();else if(F&&F[Symbol.iterator])J=F[Symbol.iterator]();else throw new S30("iterable",["Iterable"],F);var Q=new D(T30({objectMode:!0},$)),Y=!1;Q._read=function(){if(!Y)Y=!0,B()};function B(){return X.apply(this,arguments)}function X(){return X=w30(function*(){try{var G=yield J.next(),H=G.value,q=G.done;if(q)Q.push(null);else if(Q.push(yield H))B();else Y=!1}catch(K){Q.destroy(K)}}),X.apply(this,arguments)}return Q}CO.exports=k30});var xB=z((BC0,yO)=>{yO.exports=C0;var y3;C0.ReadableState=jO;var YC0=K0("events").EventEmitter,TO=function(F,$){return F.listeners($).length},L5=K0("stream"),p7=K0("buffer").Buffer,v30=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function y30(D){return p7.from(D)}function x30(D){return p7.isBuffer(D)||D instanceof v30}var uB=K0("util"),q0;if(uB&&uB.debuglog)q0=uB.debuglog("stream");else q0=function(){};var _30=iR(),iB=TB(),f30=jB(),g30=f30.getHighWaterMark,d7=T6().codes,h30=d7.ERR_INVALID_ARG_TYPE,b30=d7.ERR_STREAM_PUSH_AFTER_EOF,u30=d7.ERR_METHOD_NOT_IMPLEMENTED,m30=d7.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x3,mB,lB;Q4()(C0,L5);var U5=iB.errorOrDestroy,pB=["error","close","destroy","pause","resume"];function l30(D,F,$){if(typeof D.prependListener==="function")return D.prependListener(F,$);if(!D._events||!D._events[F])D.on(F,$);else if(Array.isArray(D._events[F]))D._events[F].unshift($);else D._events[F]=[$,D._events[F]]}function jO(D,F,$){if(y3=y3||Y4(),D=D||{},typeof $!=="boolean")$=F instanceof y3;if(this.objectMode=!!D.objectMode,$)this.objectMode=this.objectMode||!!D.readableObjectMode;if(this.highWaterMark=g30(this,D,"readableHighWaterMark",$),this.buffer=new _30,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.destroyed=!1,this.defaultEncoding=D.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,D.encoding){if(!x3)x3=hB().StringDecoder;this.decoder=new x3(D.encoding),this.encoding=D.encoding}}function C0(D){if(y3=y3||Y4(),!(this instanceof C0))return new C0(D);var F=this instanceof y3;if(this._readableState=new jO(D,this,F),this.readable=!0,D){if(typeof D.read==="function")this._read=D.read;if(typeof D.destroy==="function")this._destroy=D.destroy}L5.call(this)}Object.defineProperty(C0.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(F){if(!this._readableState)return;this._readableState.destroyed=F}});C0.prototype.destroy=iB.destroy;C0.prototype._undestroy=iB.undestroy;C0.prototype._destroy=function(D,F){F(D)};C0.prototype.push=function(D,F){var $=this._readableState,J;if(!$.objectMode){if(typeof D==="string"){if(F=F||$.defaultEncoding,F!==$.encoding)D=p7.from(D,F),F="";J=!0}}else J=!0;return PO(this,D,F,!1,J)};C0.prototype.unshift=function(D){return PO(this,D,null,!0,!1)};function PO(D,F,$,J,Q){q0("readableAddChunk",F);var Y=D._readableState;if(F===null)Y.reading=!1,c30(D,Y);else{var B;if(!Q)B=p30(Y,F);if(B)U5(D,B);else if(Y.objectMode||F&&F.length>0){if(typeof F!=="string"&&!Y.objectMode&&Object.getPrototypeOf(F)!==p7.prototype)F=y30(F);if(J)if(Y.endEmitted)U5(D,new m30);else dB(D,Y,F,!0);else if(Y.ended)U5(D,new b30);else if(Y.destroyed)return!1;else if(Y.reading=!1,Y.decoder&&!$)if(F=Y.decoder.write(F),Y.objectMode||F.length!==0)dB(D,Y,F,!1);else nB(D,Y);else dB(D,Y,F,!1)}else if(!J)Y.reading=!1,nB(D,Y)}return!Y.ended&&(Y.length<Y.highWaterMark||Y.length===0)}function dB(D,F,$,J){if(F.flowing&&F.length===0&&!F.sync)F.awaitDrain=0,D.emit("data",$);else{if(F.length+=F.objectMode?1:$.length,J)F.buffer.unshift($);else F.buffer.push($);if(F.needReadable)c7(D)}nB(D,F)}function p30(D,F){var $;if(!x30(F)&&typeof F!=="string"&&F!==void 0&&!D.objectMode)$=new h30("chunk",["string","Buffer","Uint8Array"],F);return $}C0.prototype.isPaused=function(){return this._readableState.flowing===!1};C0.prototype.setEncoding=function(D){if(!x3)x3=hB().StringDecoder;var F=new x3(D);this._readableState.decoder=F,this._readableState.encoding=this._readableState.decoder.encoding;var $=this._readableState.buffer.head,J="";while($!==null)J+=F.write($.data),$=$.next;if(this._readableState.buffer.clear(),J!=="")this._readableState.buffer.push(J);return this._readableState.length=J.length,this};var OO=1073741824;function d30(D){if(D>=OO)D=OO;else D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++;return D}function wO(D,F){if(D<=0||F.length===0&&F.ended)return 0;if(F.objectMode)return 1;if(D!==D)if(F.flowing&&F.length)return F.buffer.head.data.length;else return F.length;if(D>F.highWaterMark)F.highWaterMark=d30(D);if(D<=F.length)return D;if(!F.ended)return F.needReadable=!0,0;return F.length}C0.prototype.read=function(D){q0("read",D),D=parseInt(D,10);var F=this._readableState,$=D;if(D!==0)F.emittedReadable=!1;if(D===0&&F.needReadable&&((F.highWaterMark!==0?F.length>=F.highWaterMark:F.length>0)||F.ended)){if(q0("read: emitReadable",F.length,F.ended),F.length===0&&F.ended)cB(this);else c7(this);return null}if(D=wO(D,F),D===0&&F.ended){if(F.length===0)cB(this);return null}var J=F.needReadable;if(q0("need readable",J),F.length===0||F.length-D<F.highWaterMark)J=!0,q0("length less than watermark",J);if(F.ended||F.reading)J=!1,q0("reading or ended",J);else if(J){if(q0("do read"),F.reading=!0,F.sync=!0,F.length===0)F.needReadable=!0;if(this._read(F.highWaterMark),F.sync=!1,!F.reading)D=wO($,F)}var Q;if(D>0)Q=kO(D,F);else Q=null;if(Q===null)F.needReadable=F.length<=F.highWaterMark,D=0;else F.length-=D,F.awaitDrain=0;if(F.length===0){if(!F.ended)F.needReadable=!0;if($!==D&&F.ended)cB(this)}if(Q!==null)this.emit("data",Q);return Q};function c30(D,F){if(q0("onEofChunk"),F.ended)return;if(F.decoder){var $=F.decoder.end();if($&&$.length)F.buffer.push($),F.length+=F.objectMode?1:$.length}if(F.ended=!0,F.sync)c7(D);else if(F.needReadable=!1,!F.emittedReadable)F.emittedReadable=!0,IO(D)}function c7(D){var F=D._readableState;if(q0("emitReadable",F.needReadable,F.emittedReadable),F.needReadable=!1,!F.emittedReadable)q0("emitReadable",F.flowing),F.emittedReadable=!0,process.nextTick(IO,D)}function IO(D){var F=D._readableState;if(q0("emitReadable_",F.destroyed,F.length,F.ended),!F.destroyed&&(F.length||F.ended))D.emit("readable"),F.emittedReadable=!1;F.needReadable=!F.flowing&&!F.ended&&F.length<=F.highWaterMark,aB(D)}function nB(D,F){if(!F.readingMore)F.readingMore=!0,process.nextTick(n30,D,F)}function n30(D,F){while(!F.reading&&!F.ended&&(F.length<F.highWaterMark||F.flowing&&F.length===0)){var $=F.length;if(q0("maybeReadMore read 0"),D.read(0),$===F.length)break}F.readingMore=!1}C0.prototype._read=function(D){U5(this,new u30("_read()"))};C0.prototype.pipe=function(D,F){var $=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=D;break;case 1:J.pipes=[J.pipes,D];break;default:J.pipes.push(D);break}J.pipesCount+=1,q0("pipe count=%d opts=%j",J.pipesCount,F);var Q=(!F||F.end!==!1)&&D!==process.stdout&&D!==process.stderr,Y=Q?X:L;if(J.endEmitted)process.nextTick(Y);else $.once("end",Y);D.on("unpipe",B);function B(A,M){if(q0("onunpipe"),A===$){if(M&&M.hasUnpiped===!1)M.hasUnpiped=!0,q()}}function X(){q0("onend"),D.end()}var G=i30($);D.on("drain",G);var H=!1;function q(){if(q0("cleanup"),D.removeListener("close",E),D.removeListener("finish",Z),D.removeListener("drain",G),D.removeListener("error",V),D.removeListener("unpipe",B),$.removeListener("end",X),$.removeListener("end",L),$.removeListener("data",K),H=!0,J.awaitDrain&&(!D._writableState||D._writableState.needDrain))G()}$.on("data",K);function K(A){q0("ondata");var M=D.write(A);if(q0("dest.write",M),M===!1){if((J.pipesCount===1&&J.pipes===D||J.pipesCount>1&&vO(J.pipes,D)!==-1)&&!H)q0("false write response, pause",J.awaitDrain),J.awaitDrain++;$.pause()}}function V(A){if(q0("onerror",A),L(),D.removeListener("error",V),TO(D,"error")===0)U5(D,A)}l30(D,"error",V);function E(){D.removeListener("finish",Z),L()}D.once("close",E);function Z(){q0("onfinish"),D.removeListener("close",E),L()}D.once("finish",Z);function L(){q0("unpipe"),$.unpipe(D)}if(D.emit("pipe",$),!J.flowing)q0("pipe resume"),$.resume();return D};function i30(D){return function(){var $=D._readableState;if(q0("pipeOnDrain",$.awaitDrain),$.awaitDrain)$.awaitDrain--;if($.awaitDrain===0&&TO(D,"data"))$.flowing=!0,aB(D)}}C0.prototype.unpipe=function(D){var F=this._readableState,$={hasUnpiped:!1};if(F.pipesCount===0)return this;if(F.pipesCount===1){if(D&&D!==F.pipes)return this;if(!D)D=F.pipes;if(F.pipes=null,F.pipesCount=0,F.flowing=!1,D)D.emit("unpipe",this,$);return this}if(!D){var{pipes:J,pipesCount:Q}=F;F.pipes=null,F.pipesCount=0,F.flowing=!1;for(var Y=0;Y<Q;Y++)J[Y].emit("unpipe",this,{hasUnpiped:!1});return this}var B=vO(F.pipes,D);if(B===-1)return this;if(F.pipes.splice(B,1),F.pipesCount-=1,F.pipesCount===1)F.pipes=F.pipes[0];return D.emit("unpipe",this,$),this};C0.prototype.on=function(D,F){var $=L5.prototype.on.call(this,D,F),J=this._readableState;if(D==="data"){if(J.readableListening=this.listenerCount("readable")>0,J.flowing!==!1)this.resume()}else if(D==="readable"){if(!J.endEmitted&&!J.readableListening){if(J.readableListening=J.needReadable=!0,J.flowing=!1,J.emittedReadable=!1,q0("on readable",J.length,J.reading),J.length)c7(this);else if(!J.reading)process.nextTick(a30,this)}}return $};C0.prototype.addListener=C0.prototype.on;C0.prototype.removeListener=function(D,F){var $=L5.prototype.removeListener.call(this,D,F);if(D==="readable")process.nextTick(SO,this);return $};C0.prototype.removeAllListeners=function(D){var F=L5.prototype.removeAllListeners.apply(this,arguments);if(D==="readable"||D===void 0)process.nextTick(SO,this);return F};function SO(D){var F=D._readableState;if(F.readableListening=D.listenerCount("readable")>0,F.resumeScheduled&&!F.paused)F.flowing=!0;else if(D.listenerCount("data")>0)D.resume()}function a30(D){q0("readable nexttick read 0"),D.read(0)}C0.prototype.resume=function(){var D=this._readableState;if(!D.flowing)q0("resume"),D.flowing=!D.readableListening,o30(this,D);return D.paused=!1,this};function o30(D,F){if(!F.resumeScheduled)F.resumeScheduled=!0,process.nextTick(s30,D,F)}function s30(D,F){if(q0("resume",F.reading),!F.reading)D.read(0);if(F.resumeScheduled=!1,D.emit("resume"),aB(D),F.flowing&&!F.reading)D.read(0)}C0.prototype.pause=function(){if(q0("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)q0("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function aB(D){var F=D._readableState;q0("flow",F.flowing);while(F.flowing&&D.read()!==null);}C0.prototype.wrap=function(D){var F=this,$=this._readableState,J=!1;D.on("end",function(){if(q0("wrapped end"),$.decoder&&!$.ended){var B=$.decoder.end();if(B&&B.length)F.push(B)}F.push(null)}),D.on("data",function(B){if(q0("wrapped data"),$.decoder)B=$.decoder.write(B);if($.objectMode&&(B===null||B===void 0))return;else if(!$.objectMode&&(!B||!B.length))return;var X=F.push(B);if(!X)J=!0,D.pause()});for(var Q in D)if(this[Q]===void 0&&typeof D[Q]==="function")this[Q]=function(X){return function(){return D[X].apply(D,arguments)}}(Q);for(var Y=0;Y<pB.length;Y++)D.on(pB[Y],this.emit.bind(this,pB[Y]));return this._read=function(B){if(q0("wrapped _read",B),J)J=!1,D.resume()},this};if(typeof Symbol==="function")C0.prototype[Symbol.asyncIterator]=function(){if(mB===void 0)mB=AO();return mB(this)};Object.defineProperty(C0.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(C0.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(C0.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(F){if(this._readableState)this._readableState.flowing=F}});C0._fromList=kO;Object.defineProperty(C0.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function kO(D,F){if(F.length===0)return null;var $;if(F.objectMode)$=F.buffer.shift();else if(!D||D>=F.length){if(F.decoder)$=F.buffer.join("");else if(F.buffer.length===1)$=F.buffer.first();else $=F.buffer.concat(F.length);F.buffer.clear()}else $=F.buffer.consume(D,F.decoder);return $}function cB(D){var F=D._readableState;if(q0("endReadable",F.endEmitted),!F.endEmitted)F.ended=!0,process.nextTick(r30,F,D)}function r30(D,F){if(q0("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0){if(D.endEmitted=!0,F.readable=!1,F.emit("end"),D.autoDestroy){var $=F._writableState;if(!$||$.autoDestroy&&$.finished)F.destroy()}}}if(typeof Symbol==="function")C0.from=function(D,F){if(lB===void 0)lB=RO();return lB(C0,D,F)};function vO(D,F){for(var $=0,J=D.length;$<J;$++)if(D[$]===F)return $;return-1}});var oB=z((XC0,_O)=>{_O.exports=x8;var n7=T6().codes,t30=n7.ERR_METHOD_NOT_IMPLEMENTED,e30=n7.ERR_MULTIPLE_CALLBACK,DF0=n7.ERR_TRANSFORM_ALREADY_TRANSFORMING,FF0=n7.ERR_TRANSFORM_WITH_LENGTH_0,i7=Y4();Q4()(x8,i7);function $F0(D,F){var $=this._transformState;$.transforming=!1;var J=$.writecb;if(J===null)return this.emit("error",new e30);if($.writechunk=null,$.writecb=null,F!=null)this.push(F);J(D);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length<Q.highWaterMark)this._read(Q.highWaterMark)}function x8(D){if(!(this instanceof x8))return new x8(D);if(i7.call(this,D),this._transformState={afterTransform:$F0.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,D){if(typeof D.transform==="function")this._transform=D.transform;if(typeof D.flush==="function")this._flush=D.flush}this.on("prefinish",JF0)}function JF0(){var D=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(F,$){xO(D,F,$)});else xO(this,null,null)}x8.prototype.push=function(D,F){return this._transformState.needTransform=!1,i7.prototype.push.call(this,D,F)};x8.prototype._transform=function(D,F,$){$(new t30("_transform()"))};x8.prototype._write=function(D,F,$){var J=this._transformState;if(J.writecb=$,J.writechunk=D,J.writeencoding=F,!J.transforming){var Q=this._readableState;if(J.needTransform||Q.needReadable||Q.length<Q.highWaterMark)this._read(Q.highWaterMark)}};x8.prototype._read=function(D){var F=this._transformState;if(F.writechunk!==null&&!F.transforming)F.transforming=!0,this._transform(F.writechunk,F.writeencoding,F.afterTransform);else F.needTransform=!0};x8.prototype._destroy=function(D,F){i7.prototype._destroy.call(this,D,function($){F($)})};function xO(D,F,$){if(F)return D.emit("error",F);if($!=null)D.push($);if(D._writableState.length)throw new FF0;if(D._transformState.transforming)throw new DF0;return D.push(null)}});var hO=z((GC0,gO)=>{gO.exports=A5;var fO=oB();Q4()(A5,fO);function A5(D){if(!(this instanceof A5))return new A5(D);fO.call(this,D)}A5.prototype._transform=function(D,F,$){$(null,D)}});var pO=z((WC0,lO)=>{var sB;function QF0(D){var F=!1;return function(){if(F)return;F=!0,D.apply(void 0,arguments)}}var mO=T6().codes,YF0=mO.ERR_MISSING_ARGS,BF0=mO.ERR_STREAM_DESTROYED;function bO(D){if(D)throw D}function XF0(D){return D.setHeader&&typeof D.abort==="function"}function GF0(D,F,$,J){J=QF0(J);var Q=!1;if(D.on("close",function(){Q=!0}),sB===void 0)sB=u7();sB(D,{readable:F,writable:$},function(B){if(B)return J(B);Q=!0,J()});var Y=!1;return function(B){if(Q)return;if(Y)return;if(Y=!0,XF0(D))return D.abort();if(typeof D.destroy==="function")return D.destroy();J(B||new BF0("pipe"))}}function uO(D){D()}function WF0(D,F){return D.pipe(F)}function HF0(D){if(!D.length)return bO;if(typeof D[D.length-1]!=="function")return bO;return D.pop()}function qF0(){for(var D=arguments.length,F=Array(D),$=0;$<D;$++)F[$]=arguments[$];var J=HF0(F);if(Array.isArray(F[0]))F=F[0];if(F.length<2)throw new YF0("streams");var Q,Y=F.map(function(B,X){var G=X<F.length-1,H=X>0;return GF0(B,G,H,function(q){if(!Q)Q=q;if(q)Y.forEach(uO);if(G)return;Y.forEach(uO),J(Q)})});return F.reduce(WF0)}lO.exports=qF0});var dO=z((V1,N5)=>{var M5=K0("stream");if(process.env.READABLE_STREAM==="disable"&&M5)N5.exports=M5.Readable,Object.assign(N5.exports,M5),N5.exports.Stream=M5;else V1=N5.exports=xB(),V1.Stream=M5||V1,V1.Readable=V1,V1.Writable=vB(),V1.Duplex=Y4(),V1.Transform=oB(),V1.PassThrough=hO(),V1.finished=u7(),V1.pipeline=pO()});var iO=z((HC0,nO)=>{var{Buffer:k1}=K0("buffer"),cO=Symbol.for("BufferList");function g0(D){if(!(this instanceof g0))return new g0(D);g0._init.call(this,D)}g0._init=function(F){if(Object.defineProperty(this,cO,{value:!0}),this._bufs=[],this.length=0,F)this.append(F)};g0.prototype._new=function(F){return new g0(F)};g0.prototype._offset=function(F){if(F===0)return[0,0];let $=0;for(let J=0;J<this._bufs.length;J++){let Q=$+this._bufs[J].length;if(F<Q||J===this._bufs.length-1)return[J,F-$];$=Q}};g0.prototype._reverseOffset=function(D){let F=D[0],$=D[1];for(let J=0;J<F;J++)$+=this._bufs[J].length;return $};g0.prototype.get=function(F){if(F>this.length||F<0)return;let $=this._offset(F);return this._bufs[$[0]][$[1]]};g0.prototype.slice=function(F,$){if(typeof F==="number"&&F<0)F+=this.length;if(typeof $==="number"&&$<0)$+=this.length;return this.copy(null,0,F,$)};g0.prototype.copy=function(F,$,J,Q){if(typeof J!=="number"||J<0)J=0;if(typeof Q!=="number"||Q>this.length)Q=this.length;if(J>=this.length)return F||k1.alloc(0);if(Q<=0)return F||k1.alloc(0);let Y=!!F,B=this._offset(J),X=Q-J,G=X,H=Y&&$||0,q=B[1];if(J===0&&Q===this.length){if(!Y)return this._bufs.length===1?this._bufs[0]:k1.concat(this._bufs,this.length);for(let K=0;K<this._bufs.length;K++)this._bufs[K].copy(F,H),H+=this._bufs[K].length;return F}if(G<=this._bufs[B[0]].length-q)return Y?this._bufs[B[0]].copy(F,$,q,q+G):this._bufs[B[0]].slice(q,q+G);if(!Y)F=k1.allocUnsafe(X);for(let K=B[0];K<this._bufs.length;K++){let V=this._bufs[K].length-q;if(G>V)this._bufs[K].copy(F,H,q),H+=V;else{this._bufs[K].copy(F,H,q,q+G),H+=V;break}if(G-=V,q)q=0}if(F.length>H)return F.slice(0,H);return F};g0.prototype.shallowSlice=function(F,$){if(F=F||0,$=typeof $!=="number"?this.length:$,F<0)F+=this.length;if($<0)$+=this.length;if(F===$)return this._new();let J=this._offset(F),Q=this._offset($),Y=this._bufs.slice(J[0],Q[0]+1);if(Q[1]===0)Y.pop();else Y[Y.length-1]=Y[Y.length-1].slice(0,Q[1]);if(J[1]!==0)Y[0]=Y[0].slice(J[1]);return this._new(Y)};g0.prototype.toString=function(F,$,J){return this.slice($,J).toString(F)};g0.prototype.consume=function(F){if(F=Math.trunc(F),Number.isNaN(F)||F<=0)return this;while(this._bufs.length)if(F>=this._bufs[0].length)F-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(F),this.length-=F;break}return this};g0.prototype.duplicate=function(){let F=this._new();for(let $=0;$<this._bufs.length;$++)F.append(this._bufs[$]);return F};g0.prototype.append=function(F){if(F==null)return this;if(F.buffer)this._appendBuffer(k1.from(F.buffer,F.byteOffset,F.byteLength));else if(Array.isArray(F))for(let $=0;$<F.length;$++)this.append(F[$]);else if(this._isBufferList(F))for(let $=0;$<F._bufs.length;$++)this.append(F._bufs[$]);else{if(typeof F==="number")F=F.toString();this._appendBuffer(k1.from(F))}return this};g0.prototype._appendBuffer=function(F){this._bufs.push(F),this.length+=F.length};g0.prototype.indexOf=function(D,F,$){if($===void 0&&typeof F==="string")$=F,F=void 0;if(typeof D==="function"||Array.isArray(D))throw TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');else if(typeof D==="number")D=k1.from([D]);else if(typeof D==="string")D=k1.from(D,$);else if(this._isBufferList(D))D=D.slice();else if(Array.isArray(D.buffer))D=k1.from(D.buffer,D.byteOffset,D.byteLength);else if(!k1.isBuffer(D))D=k1.from(D);if(F=Number(F||0),isNaN(F))F=0;if(F<0)F=this.length+F;if(F<0)F=0;if(D.length===0)return F>this.length?this.length:F;let J=this._offset(F),Q=J[0],Y=J[1];for(;Q<this._bufs.length;Q++){let B=this._bufs[Q];while(Y<B.length)if(B.length-Y>=D.length){let G=B.indexOf(D,Y);if(G!==-1)return this._reverseOffset([Q,G]);Y=B.length-D.length+1}else{let G=this._reverseOffset([Q,Y]);if(this._match(G,D))return G;Y++}Y=0}return-1};g0.prototype._match=function(D,F){if(this.length-D<F.length)return!1;for(let $=0;$<F.length;$++)if(this.get(D+$)!==F[$])return!1;return!0};(function(){let D={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let F in D)(function($){if(D[$]===null)g0.prototype[$]=function(J,Q){return this.slice(J,J+Q)[$](0,Q)};else g0.prototype[$]=function(J=0){return this.slice(J,J+D[$])[$](0)}})(F)})();g0.prototype._isBufferList=function(F){return F instanceof g0||g0.isBufferList(F)};g0.isBufferList=function(F){return F!=null&&F[cO]};nO.exports=g0});var aO=z((qC0,a7)=>{var rB=dO().Duplex,KF0=Q4(),C5=iO();function wD(D){if(!(this instanceof wD))return new wD(D);if(typeof D==="function"){this._callback=D;let F=function(J){if(this._callback)this._callback(J),this._callback=null}.bind(this);this.on("pipe",function(J){J.on("error",F)}),this.on("unpipe",function(J){J.removeListener("error",F)}),D=null}C5._init.call(this,D),rB.call(this)}KF0(wD,rB);Object.assign(wD.prototype,C5.prototype);wD.prototype._new=function(F){return new wD(F)};wD.prototype._write=function(F,$,J){if(this._appendBuffer(F),typeof J==="function")J()};wD.prototype._read=function(F){if(!this.length)return this.push(null);F=Math.min(F,this.length),this.push(this.slice(0,F)),this.consume(F)};wD.prototype.end=function(F){if(rB.prototype.end.call(this,F),this._callback)this._callback(null,this.slice()),this._callback=null};wD.prototype._destroy=function(F,$){this._bufs.length=0,this.length=0,$(F)};wD.prototype._isBufferList=function(F){return F instanceof wD||F instanceof C5||wD.isBufferList(F)};wD.isBufferList=C5.isBufferList;a7.exports=wD;a7.exports.BufferListStream=wD;a7.exports.BufferList=C5});var rO=z((KC0,F2)=>{var zF0=K0("readline"),EF0=ZB(),oO=OR(),o7=k7(),s7=SR(),VF0=J5(),ZF0=bR(),UF0=mR(),LF0=CB(),{BufferListStream:AF0}=aO(),tB=Symbol("text"),eB=Symbol("prefixText");class sO{constructor(){this.requests=0,this.mutedStream=new AF0,this.mutedStream.pipe(process.stdout);let D=this;this.ourEmit=function(F,$,...J){let{stdin:Q}=process;if(D.requests>0||Q.emit===D.ourEmit){if(F==="keypress")return;if(F==="data"&&$.includes(3))process.emit("SIGINT");Reflect.apply(D.oldEmit,this,[F,$,...J])}else Reflect.apply(process.stdin.emit,this,[F,$,...J])}}start(){if(this.requests++,this.requests===1)this.realStart()}stop(){if(this.requests<=0)throw Error("`stop` called more times than `start`");if(this.requests--,this.requests===0)this.realStop()}realStart(){if(process.platform==="win32")return;this.rl=zF0.createInterface({input:process.stdin,output:this.mutedStream}),this.rl.on("SIGINT",()=>{if(process.listenerCount("SIGINT")===0)process.emit("SIGINT");else this.rl.close(),process.kill(process.pid,"SIGINT")})}realStop(){if(process.platform==="win32")return;this.rl.close(),this.rl=void 0}}var r7;class D2{constructor(D){if(!r7)r7=new sO;if(typeof D==="string")D={text:D};this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:!0,...D},this.spinner=this.options.spinner,this.color=this.options.color,this.hideCursor=this.options.hideCursor!==!1,this.interval=this.options.interval||this.spinner.interval||100,this.stream=this.options.stream,this.id=void 0,this.isEnabled=typeof this.options.isEnabled==="boolean"?this.options.isEnabled:UF0({stream:this.stream}),this.isSilent=typeof this.options.isSilent==="boolean"?this.options.isSilent:!1,this.text=this.options.text,this.prefixText=this.options.prefixText,this.linesToClear=0,this.indent=this.options.indent,this.discardStdin=this.options.discardStdin,this.isDiscardingStdin=!1}get indent(){return this._indent}set indent(D=0){if(!(D>=0&&Number.isInteger(D)))throw Error("The `indent` option must be an integer from 0 and up");this._indent=D}_updateInterval(D){if(D!==void 0)this.interval=D}get spinner(){return this._spinner}set spinner(D){if(this.frameIndex=0,typeof D==="object"){if(D.frames===void 0)throw Error("The given spinner must have a `frames` property");this._spinner=D}else if(!LF0())this._spinner=o7.line;else if(D===void 0)this._spinner=o7.dots;else if(D!=="default"&&o7[D])this._spinner=o7[D];else throw Error(`There is no built-in spinner named '${D}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);this._updateInterval(this._spinner.interval)}get text(){return this[tB]}set text(D){this[tB]=D,this.updateLineCount()}get prefixText(){return this[eB]}set prefixText(D){this[eB]=D,this.updateLineCount()}get isSpinning(){return this.id!==void 0}getFullPrefixText(D=this[eB],F=" "){if(typeof D==="string")return D+F;if(typeof D==="function")return D()+F;return""}updateLineCount(){let D=this.stream.columns||80,F=this.getFullPrefixText(this.prefixText,"-");this.lineCount=0;for(let $ of VF0(F+"--"+this[tB]).split(`
45
+ `);if(Y!==-1)F=u60(F,Q,J,Y);return J+F+Q},KB,KR=(D,...F)=>{let[$]=F;if(!M7($)||!M7($.raw))return F.join(" ");let J=F.slice(1),Q=[$.raw[0]];for(let Y=1;Y<$.length;Y++)Q.push(String(J[Y-1]).replace(/[{}\\]/g,"\\$&"),String($.raw[Y]));if(KB===void 0)KB=BR();return KB(D,Q.join(""))};Object.defineProperties(N7.prototype,P3);var R7=N7();R7.supportsColor=zB;R7.stderr=N7({level:EB?EB.level:0});R7.stderr.supportsColor=EB;zR.exports=R7});var VR=z((vN0,UB)=>{var ER=(D,F)=>{for(let $ of Reflect.ownKeys(F))Object.defineProperty(D,$,Object.getOwnPropertyDescriptor(F,$));return D};UB.exports=ER;UB.exports.default=ER});var UR=z((yN0,w7)=>{var p60=VR(),O7=new WeakMap,ZR=(D,F={})=>{if(typeof D!=="function")throw TypeError("Expected a function");let $,J=0,Q=D.displayName||D.name||"<anonymous>",Y=function(...B){if(O7.set(Y,++J),J===1)$=D.apply(this,B),D=null;else if(F.throw===!0)throw Error(`Function \`${Q}\` can only be called once`);return $};return p60(Y,D),O7.set(Y,J),Y};w7.exports=ZR;w7.exports.default=ZR;w7.exports.callCount=(D)=>{if(!O7.has(D))throw Error(`The given function \`${D.name}\` is not wrapped by the \`onetime\` package`);return O7.get(D)}});var LR=z((xN0,T7)=>{T7.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")T7.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")T7.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var AR=z((_N0,S3)=>{var c0=global.process,F4=function(D){return D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function"};if(!F4(c0))S3.exports=function(){return function(){}};else{if(LB=K0("assert"),$4=LR(),AB=/^win/i.test(c0.platform),I3=K0("events"),typeof I3!=="function")I3=I3.EventEmitter;if(c0.__signal_exit_emitter__)WD=c0.__signal_exit_emitter__;else WD=c0.__signal_exit_emitter__=new I3,WD.count=0,WD.emitted={};if(!WD.infinite)WD.setMaxListeners(1/0),WD.infinite=!0;S3.exports=function(D,F){if(!F4(global.process))return function(){};if(LB.equal(typeof D,"function","a callback must be provided for exit handler"),J4===!1)j7();var $="exit";if(F&&F.alwaysLast)$="afterexit";var J=function(){if(WD.removeListener($,D),WD.listeners("exit").length===0&&WD.listeners("afterexit").length===0)X5()};return WD.on($,D),J},X5=function(){if(!J4||!F4(global.process))return;J4=!1,$4.forEach(function(F){try{c0.removeListener(F,G5[F])}catch($){}}),c0.emit=W5,c0.reallyExit=P7,WD.count-=1},S3.exports.unload=X5,O6=function(F,$,J){if(WD.emitted[F])return;WD.emitted[F]=!0,WD.emit(F,$,J)},G5={},$4.forEach(function(D){G5[D]=function(){if(!F4(global.process))return;var $=c0.listeners(D);if($.length===WD.count){if(X5(),O6("exit",null,D),O6("afterexit",null,D),AB&&D==="SIGHUP")D="SIGINT";c0.kill(c0.pid,D)}}}),S3.exports.signals=function(){return $4},J4=!1,j7=function(){if(J4||!F4(global.process))return;J4=!0,WD.count+=1,$4=$4.filter(function(F){try{return c0.on(F,G5[F]),!0}catch($){return!1}}),c0.emit=NB,c0.reallyExit=MB},S3.exports.load=j7,P7=c0.reallyExit,MB=function(F){if(!F4(global.process))return;c0.exitCode=F||0,O6("exit",c0.exitCode,null),O6("afterexit",c0.exitCode,null),P7.call(c0,c0.exitCode)},W5=c0.emit,NB=function(F,$){if(F==="exit"&&F4(global.process)){if($!==void 0)c0.exitCode=$;var J=W5.apply(this,arguments);return O6("exit",c0.exitCode,null),O6("afterexit",c0.exitCode,null),J}else return W5.apply(this,arguments)}}var LB,$4,AB,I3,WD,X5,O6,G5,J4,j7,P7,MB,W5,NB});var NR=z((fN0,MR)=>{var d60=UR(),c60=AR();MR.exports=d60(()=>{c60(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})})});var OR=z((i60)=>{var n60=NR(),I7=!1;i60.show=(D=process.stderr)=>{if(!D.isTTY)return;I7=!1,D.write("\x1B[?25h")};i60.hide=(D=process.stderr)=>{if(!D.isTTY)return;n60(),I7=!0,D.write("\x1B[?25l")};i60.toggle=(D,F)=>{if(D!==void 0)I7=D;if(I7)i60.show(F);else i60.hide(F)}});var wR=z((hN0,o60)=>{o60.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},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 ","\u2764\uFE0F "]},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:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},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:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\uD83C\uDF24 ","\u26C5\uFE0F ","\uD83C\uDF25 ","\u2601\uFE0F ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\u26C8 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\u2601\uFE0F ","\uD83C\uDF25 ","\u26C5\uFE0F ","\uD83C\uDF24 ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\uD83C\uDF32","\uD83C\uDF84"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\uD83E\uDD18 ","\uD83E\uDD1F ","\uD83D\uDD96 ","\u270B ","\uD83E\uDD1A ","\uD83D\uDC46 "]},fistBump:{interval:80,frames:["\uD83E\uDD1C\u3000\u3000\u3000\u3000\uD83E\uDD1B ","\uD83E\uDD1C\u3000\u3000\u3000\u3000\uD83E\uDD1B ","\uD83E\uDD1C\u3000\u3000\u3000\u3000\uD83E\uDD1B ","\u3000\uD83E\uDD1C\u3000\u3000\uD83E\uDD1B\u3000 ","\u3000\u3000\uD83E\uDD1C\uD83E\uDD1B\u3000\u3000 ","\u3000\uD83E\uDD1C\u2728\uD83E\uDD1B\u3000\u3000 ","\uD83E\uDD1C\u3000\u2728\u3000\uD83E\uDD1B\u3000 "]},soccerHeader:{interval:80,frames:[" \uD83E\uDDD1\u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F\uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \uD83E\uDDD1 ","\uD83E\uDDD1 \u26BD\uFE0F \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 ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},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:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var k7=z((bN0,jR)=>{var S7=Object.assign({},wR()),TR=Object.keys(S7);Object.defineProperty(S7,"random",{get(){let D=Math.floor(Math.random()*TR.length),F=TR[D];return S7[F]}});jR.exports=S7});var CB=z((uN0,PR)=>{PR.exports=()=>{if(process.platform!=="win32")return!0;return Boolean(process.env.CI)||Boolean(process.env.WT_SESSION)||process.env.TERM_PROGRAM==="vscode"||process.env.TERM==="xterm-256color"||process.env.TERM==="alacritty"}});var SR=z((mN0,IR)=>{var w6=ZB(),s60=CB(),r60={info:w6.blue("\u2139"),success:w6.green("\u2714"),warning:w6.yellow("\u26A0"),error:w6.red("\u2716")},t60={info:w6.blue("i"),success:w6.green("\u221A"),warning:w6.yellow("\u203C"),error:w6.red("\xD7")};IR.exports=s60()?r60:t60});var kR=z((lN0,v7)=>{var e60=function(){function D(B,X,G,H){var q;if(typeof X==="object")G=X.depth,H=X.prototype,q=X.filter,X=X.circular;var K=[],V=[],E=typeof Buffer<"u";if(typeof X>"u")X=!0;if(typeof G>"u")G=1/0;function Z(L,A){if(L===null)return null;if(A==0)return L;var M,R;if(typeof L!="object")return L;if(D.__isArray(L))M=[];else if(D.__isRegExp(L)){if(M=new RegExp(L.source,Y(L)),L.lastIndex)M.lastIndex=L.lastIndex}else if(D.__isDate(L))M=new Date(L.getTime());else if(E&&Buffer.isBuffer(L)){if(Buffer.allocUnsafe)M=Buffer.allocUnsafe(L.length);else M=new Buffer(L.length);return L.copy(M),M}else if(typeof H>"u")R=Object.getPrototypeOf(L),M=Object.create(R);else M=Object.create(H),R=H;if(X){var w=K.indexOf(L);if(w!=-1)return V[w];K.push(L),V.push(M)}for(var k in L){var O;if(R)O=Object.getOwnPropertyDescriptor(R,k);if(O&&O.set==null)continue;M[k]=Z(L[k],A-1)}return M}return Z(B,G)}D.clonePrototype=function(X){if(X===null)return null;var G=function(){};return G.prototype=X,new G};function F(B){return Object.prototype.toString.call(B)}D.__objToStr=F;function $(B){return typeof B==="object"&&F(B)==="[object Date]"}D.__isDate=$;function J(B){return typeof B==="object"&&F(B)==="[object Array]"}D.__isArray=J;function Q(B){return typeof B==="object"&&F(B)==="[object RegExp]"}D.__isRegExp=Q;function Y(B){var X="";if(B.global)X+="g";if(B.ignoreCase)X+="i";if(B.multiline)X+="m";return X}return D.__getRegExpFlags=Y,D}();if(typeof v7==="object"&&v7.exports)v7.exports=e60});var yR=z((pN0,vR)=>{var D40=kR();vR.exports=function(D,F){return D=D||{},Object.keys(F).forEach(function($){if(typeof D[$]>"u")D[$]=D40(F[$])}),D}});var _R=z((dN0,xR)=>{xR.exports=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]]});var bR=z((cN0,RB)=>{var F40=yR(),H5=_R(),gR={nul:0,control:0};RB.exports=function(F){return hR(F,gR)};RB.exports.config=function(D){return D=F40(D||{},gR),function($){return hR($,D)}};function hR(D,F){if(typeof D!=="string")return fR(D,F);var $=0;for(var J=0;J<D.length;J++){var Q=fR(D.charCodeAt(J),F);if(Q<0)return-1;$+=Q}return $}function fR(D,F){if(D===0)return F.nul;if(D<32||D>=127&&D<160)return F.control;if($40(D))return 0;return 1+(D>=4352&&(D<=4447||D==9001||D==9002||D>=11904&&D<=42191&&D!=12351||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65135||D>=65280&&D<=65376||D>=65504&&D<=65510||D>=131072&&D<=196605||D>=196608&&D<=262141))}function $40(D){var F=0,$=H5.length-1,J;if(D<H5[0][0]||D>H5[$][1])return!1;while($>=F)if(J=Math.floor((F+$)/2),D>H5[J][1])F=J+1;else if(D<H5[J][0])$=J-1;else return!0;return!1}});var mR=z((nN0,uR)=>{uR.exports=({stream:D=process.stdout}={})=>{return Boolean(D&&D.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}});var iR=z((iN0,nR)=>{function lR(D,F){var $=Object.keys(D);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(D);F&&(J=J.filter(function(Q){return Object.getOwnPropertyDescriptor(D,Q).enumerable})),$.push.apply($,J)}return $}function pR(D){for(var F=1;F<arguments.length;F++){var $=arguments[F]!=null?arguments[F]:{};F%2?lR(Object($),!0).forEach(function(J){J40(D,J,$[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors($)):lR(Object($)).forEach(function(J){Object.defineProperty(D,J,Object.getOwnPropertyDescriptor($,J))})}return D}function J40(D,F,$){if(F=cR(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function Q40(D,F){if(!(D instanceof F))throw TypeError("Cannot call a class as a function")}function dR(D,F){for(var $=0;$<F.length;$++){var J=F[$];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,cR(J.key),J)}}function Y40(D,F,$){if(F)dR(D.prototype,F);if($)dR(D,$);return Object.defineProperty(D,"prototype",{writable:!1}),D}function cR(D){var F=B40(D,"string");return typeof F==="symbol"?F:String(F)}function B40(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var J=$.call(D,F||"default");if(typeof J!=="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var X40=K0("buffer"),y7=X40.Buffer,G40=K0("util"),OB=G40.inspect,W40=OB&&OB.custom||"inspect";function H40(D,F,$){y7.prototype.copy.call(D,F,$)}nR.exports=function(){function D(){Q40(this,D),this.head=null,this.tail=null,this.length=0}return Y40(D,[{key:"push",value:function($){var J={data:$,next:null};if(this.length>0)this.tail.next=J;else this.head=J;this.tail=J,++this.length}},{key:"unshift",value:function($){var J={data:$,next:this.head};if(this.length===0)this.tail=J;this.head=J,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var $=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,$}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function($){if(this.length===0)return"";var J=this.head,Q=""+J.data;while(J=J.next)Q+=$+J.data;return Q}},{key:"concat",value:function($){if(this.length===0)return y7.alloc(0);var J=y7.allocUnsafe($>>>0),Q=this.head,Y=0;while(Q)H40(Q.data,J,Y),Y+=Q.data.length,Q=Q.next;return J}},{key:"consume",value:function($,J){var Q;if($<this.head.data.length)Q=this.head.data.slice(0,$),this.head.data=this.head.data.slice($);else if($===this.head.data.length)Q=this.shift();else Q=J?this._getString($):this._getBuffer($);return Q}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function($){var J=this.head,Q=1,Y=J.data;$-=Y.length;while(J=J.next){var B=J.data,X=$>B.length?B.length:$;if(X===B.length)Y+=B;else Y+=B.slice(0,$);if($-=X,$===0){if(X===B.length)if(++Q,J.next)this.head=J.next;else this.head=this.tail=null;else this.head=J,J.data=B.slice(X);break}++Q}return this.length-=Q,Y}},{key:"_getBuffer",value:function($){var J=y7.allocUnsafe($),Q=this.head,Y=1;Q.data.copy(J),$-=Q.data.length;while(Q=Q.next){var B=Q.data,X=$>B.length?B.length:$;if(B.copy(J,J.length-$,0,X),$-=X,$===0){if(X===B.length)if(++Y,Q.next)this.head=Q.next;else this.head=this.tail=null;else this.head=Q,Q.data=B.slice(X);break}++Y}return this.length-=Y,J}},{key:W40,value:function($,J){return OB(this,pR(pR({},J),{},{depth:0,customInspect:!1}))}}]),D}()});var TB=z((aN0,oR)=>{function q40(D,F){var $=this,J=this._readableState&&this._readableState.destroyed,Q=this._writableState&&this._writableState.destroyed;if(J||Q){if(F)F(D);else if(D){if(!this._writableState)process.nextTick(wB,this,D);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(wB,this,D)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(D||null,function(Y){if(!F&&Y)if(!$._writableState)process.nextTick(aR,$,Y);else if(!$._writableState.errorEmitted)$._writableState.errorEmitted=!0,process.nextTick(aR,$,Y);else process.nextTick(x7,$);else if(F)process.nextTick(x7,$),F(Y);else process.nextTick(x7,$)}),this}function aR(D,F){wB(D,F),x7(D)}function x7(D){if(D._writableState&&!D._writableState.emitClose)return;if(D._readableState&&!D._readableState.emitClose)return;D.emit("close")}function K40(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function wB(D,F){D.emit("error",F)}function z40(D,F){var{_readableState:$,_writableState:J}=D;if($&&$.autoDestroy||J&&J.autoDestroy)D.destroy(F);else D.emit("error",F)}oR.exports={destroy:q40,undestroy:K40,errorOrDestroy:z40}});var T6=z((U40,tR)=>{var rR={};function E1(D,F,$){if(!$)$=Error;function J(Y,B,X){if(typeof F==="string")return F;else return F(Y,B,X)}class Q extends ${constructor(Y,B,X){super(J(Y,B,X))}}Q.prototype.name=$.name,Q.prototype.code=D,rR[D]=Q}function sR(D,F){if(Array.isArray(D)){let $=D.length;if(D=D.map((J)=>String(J)),$>2)return`one of ${F} ${D.slice(0,$-1).join(", ")}, or `+D[$-1];else if($===2)return`one of ${F} ${D[0]} or ${D[1]}`;else return`of ${F} ${D[0]}`}else return`of ${F} ${String(D)}`}function E40(D,F,$){return D.substr(!$||$<0?0:+$,F.length)===F}function V40(D,F,$){if($===void 0||$>D.length)$=D.length;return D.substring($-F.length,$)===F}function Z40(D,F,$){if(typeof $!=="number")$=0;if($+F.length>D.length)return!1;else return D.indexOf(F,$)!==-1}E1("ERR_INVALID_OPT_VALUE",function(D,F){return'The value "'+F+'" is invalid for option "'+D+'"'},TypeError);E1("ERR_INVALID_ARG_TYPE",function(D,F,$){let J;if(typeof F==="string"&&E40(F,"not "))J="must not be",F=F.replace(/^not /,"");else J="must be";let Q;if(V40(D," argument"))Q=`The ${D} ${J} ${sR(F,"type")}`;else{let Y=Z40(D,".")?"property":"argument";Q=`The "${D}" ${Y} ${J} ${sR(F,"type")}`}return Q+=`. Received type ${typeof $}`,Q},TypeError);E1("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");E1("ERR_METHOD_NOT_IMPLEMENTED",function(D){return"The "+D+" method is not implemented"});E1("ERR_STREAM_PREMATURE_CLOSE","Premature close");E1("ERR_STREAM_DESTROYED",function(D){return"Cannot call "+D+" after a stream was destroyed"});E1("ERR_MULTIPLE_CALLBACK","Callback called multiple times");E1("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");E1("ERR_STREAM_WRITE_AFTER_END","write after end");E1("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);E1("ERR_UNKNOWN_ENCODING",function(D){return"Unknown encoding: "+D},TypeError);E1("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");U40.codes=rR});var jB=z((oN0,eR)=>{var A40=T6().codes.ERR_INVALID_OPT_VALUE;function M40(D,F,$){return D.highWaterMark!=null?D.highWaterMark:F?D[$]:null}function N40(D,F,$,J){var Q=M40(F,J,$);if(Q!=null){if(!(isFinite(Q)&&Math.floor(Q)===Q)||Q<0){var Y=J?$:"highWaterMark";throw new A40(Y,Q)}return Math.floor(Q)}return D.objectMode?16:16384}eR.exports={getHighWaterMark:N40}});var DO=z((sN0,PB)=>{if(typeof Object.create==="function")PB.exports=function(F,$){if($)F.super_=$,F.prototype=Object.create($.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}})};else PB.exports=function(F,$){if($){F.super_=$;var J=function(){};J.prototype=$.prototype,F.prototype=new J,F.prototype.constructor=F}}});var Q4=z((rN0,IB)=>{try{if(_7=K0("util"),typeof _7.inherits!=="function")throw"";IB.exports=_7.inherits}catch(D){IB.exports=DO()}var _7});var $O=z((tN0,FO)=>{FO.exports=K0("util").deprecate});var vB=z((eN0,GO)=>{GO.exports=e0;function QO(D){var F=this;this.next=null,this.entry=null,this.finish=function(){a40(F,D)}}var k3;e0.WritableState=K5;var C40={deprecate:$O()},YO=K0("stream"),g7=K0("buffer").Buffer,R40=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function O40(D){return g7.from(D)}function w40(D){return g7.isBuffer(D)||D instanceof R40}var kB=TB(),T40=jB(),j40=T40.getHighWaterMark,j6=T6().codes,P40=j6.ERR_INVALID_ARG_TYPE,I40=j6.ERR_METHOD_NOT_IMPLEMENTED,S40=j6.ERR_MULTIPLE_CALLBACK,k40=j6.ERR_STREAM_CANNOT_PIPE,v40=j6.ERR_STREAM_DESTROYED,y40=j6.ERR_STREAM_NULL_VALUES,x40=j6.ERR_STREAM_WRITE_AFTER_END,_40=j6.ERR_UNKNOWN_ENCODING,v3=kB.errorOrDestroy;Q4()(e0,YO);function f40(){}function K5(D,F,$){if(k3=k3||Y4(),D=D||{},typeof $!=="boolean")$=F instanceof k3;if(this.objectMode=!!D.objectMode,$)this.objectMode=this.objectMode||!!D.writableObjectMode;this.highWaterMark=j40(this,D,"writableHighWaterMark",$),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var J=D.decodeStrings===!1;this.decodeStrings=!J,this.defaultEncoding=D.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Q){p40(F,Q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new QO(this)}K5.prototype.getBuffer=function(){var F=this.bufferedRequest,$=[];while(F)$.push(F),F=F.next;return $};(function(){try{Object.defineProperty(K5.prototype,"buffer",{get:C40.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(D){}})();var f7;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")f7=Function.prototype[Symbol.hasInstance],Object.defineProperty(e0,Symbol.hasInstance,{value:function(F){if(f7.call(this,F))return!0;if(this!==e0)return!1;return F&&F._writableState instanceof K5}});else f7=function(F){return F instanceof this};function e0(D){k3=k3||Y4();var F=this instanceof k3;if(!F&&!f7.call(e0,this))return new e0(D);if(this._writableState=new K5(D,this,F),this.writable=!0,D){if(typeof D.write==="function")this._write=D.write;if(typeof D.writev==="function")this._writev=D.writev;if(typeof D.destroy==="function")this._destroy=D.destroy;if(typeof D.final==="function")this._final=D.final}YO.call(this)}e0.prototype.pipe=function(){v3(this,new k40)};function g40(D,F){var $=new x40;v3(D,$),process.nextTick(F,$)}function h40(D,F,$,J){var Q;if($===null)Q=new y40;else if(typeof $!=="string"&&!F.objectMode)Q=new P40("chunk",["string","Buffer"],$);if(Q)return v3(D,Q),process.nextTick(J,Q),!1;return!0}e0.prototype.write=function(D,F,$){var J=this._writableState,Q=!1,Y=!J.objectMode&&w40(D);if(Y&&!g7.isBuffer(D))D=O40(D);if(typeof F==="function")$=F,F=null;if(Y)F="buffer";else if(!F)F=J.defaultEncoding;if(typeof $!=="function")$=f40;if(J.ending)g40(this,$);else if(Y||h40(this,J,D,$))J.pendingcb++,Q=u40(this,J,Y,D,F,$);return Q};e0.prototype.cork=function(){this._writableState.corked++};e0.prototype.uncork=function(){var D=this._writableState;if(D.corked){if(D.corked--,!D.writing&&!D.corked&&!D.bufferProcessing&&D.bufferedRequest)BO(this,D)}};e0.prototype.setDefaultEncoding=function(F){if(typeof F==="string")F=F.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((F+"").toLowerCase())>-1))throw new _40(F);return this._writableState.defaultEncoding=F,this};Object.defineProperty(e0.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function b40(D,F,$){if(!D.objectMode&&D.decodeStrings!==!1&&typeof F==="string")F=g7.from(F,$);return F}Object.defineProperty(e0.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function u40(D,F,$,J,Q,Y){if(!$){var B=b40(F,J,Q);if(J!==B)$=!0,Q="buffer",J=B}var X=F.objectMode?1:J.length;F.length+=X;var G=F.length<F.highWaterMark;if(!G)F.needDrain=!0;if(F.writing||F.corked){var H=F.lastBufferedRequest;if(F.lastBufferedRequest={chunk:J,encoding:Q,isBuf:$,callback:Y,next:null},H)H.next=F.lastBufferedRequest;else F.bufferedRequest=F.lastBufferedRequest;F.bufferedRequestCount+=1}else SB(D,F,!1,X,J,Q,Y);return G}function SB(D,F,$,J,Q,Y,B){if(F.writelen=J,F.writecb=B,F.writing=!0,F.sync=!0,F.destroyed)F.onwrite(new v40("write"));else if($)D._writev(Q,F.onwrite);else D._write(Q,Y,F.onwrite);F.sync=!1}function m40(D,F,$,J,Q){if(--F.pendingcb,$)process.nextTick(Q,J),process.nextTick(q5,D,F),D._writableState.errorEmitted=!0,v3(D,J);else Q(J),D._writableState.errorEmitted=!0,v3(D,J),q5(D,F)}function l40(D){D.writing=!1,D.writecb=null,D.length-=D.writelen,D.writelen=0}function p40(D,F){var $=D._writableState,J=$.sync,Q=$.writecb;if(typeof Q!=="function")throw new S40;if(l40($),F)m40(D,$,J,F,Q);else{var Y=XO($)||D.destroyed;if(!Y&&!$.corked&&!$.bufferProcessing&&$.bufferedRequest)BO(D,$);if(J)process.nextTick(JO,D,$,Y,Q);else JO(D,$,Y,Q)}}function JO(D,F,$,J){if(!$)d40(D,F);F.pendingcb--,J(),q5(D,F)}function d40(D,F){if(F.length===0&&F.needDrain)F.needDrain=!1,D.emit("drain")}function BO(D,F){F.bufferProcessing=!0;var $=F.bufferedRequest;if(D._writev&&$&&$.next){var J=F.bufferedRequestCount,Q=Array(J),Y=F.corkedRequestsFree;Y.entry=$;var B=0,X=!0;while($){if(Q[B]=$,!$.isBuf)X=!1;$=$.next,B+=1}if(Q.allBuffers=X,SB(D,F,!0,F.length,Q,"",Y.finish),F.pendingcb++,F.lastBufferedRequest=null,Y.next)F.corkedRequestsFree=Y.next,Y.next=null;else F.corkedRequestsFree=new QO(F);F.bufferedRequestCount=0}else{while($){var{chunk:G,encoding:H,callback:q}=$,K=F.objectMode?1:G.length;if(SB(D,F,!1,K,G,H,q),$=$.next,F.bufferedRequestCount--,F.writing)break}if($===null)F.lastBufferedRequest=null}F.bufferedRequest=$,F.bufferProcessing=!1}e0.prototype._write=function(D,F,$){$(new I40("_write()"))};e0.prototype._writev=null;e0.prototype.end=function(D,F,$){var J=this._writableState;if(typeof D==="function")$=D,D=null,F=null;else if(typeof F==="function")$=F,F=null;if(D!==null&&D!==void 0)this.write(D,F);if(J.corked)J.corked=1,this.uncork();if(!J.ending)i40(this,J,$);return this};Object.defineProperty(e0.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function XO(D){return D.ending&&D.length===0&&D.bufferedRequest===null&&!D.finished&&!D.writing}function c40(D,F){D._final(function($){if(F.pendingcb--,$)v3(D,$);F.prefinished=!0,D.emit("prefinish"),q5(D,F)})}function n40(D,F){if(!F.prefinished&&!F.finalCalled)if(typeof D._final==="function"&&!F.destroyed)F.pendingcb++,F.finalCalled=!0,process.nextTick(c40,D,F);else F.prefinished=!0,D.emit("prefinish")}function q5(D,F){var $=XO(F);if($){if(n40(D,F),F.pendingcb===0){if(F.finished=!0,D.emit("finish"),F.autoDestroy){var J=D._readableState;if(!J||J.autoDestroy&&J.endEmitted)D.destroy()}}}return $}function i40(D,F,$){if(F.ending=!0,q5(D,F),$)if(F.finished)process.nextTick($);else D.once("finish",$);F.ended=!0,D.writable=!1}function a40(D,F,$){var J=D.entry;D.entry=null;while(J){var Q=J.callback;F.pendingcb--,Q($),J=J.next}F.corkedRequestsFree.next=D}Object.defineProperty(e0.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(F){if(!this._writableState)return;this._writableState.destroyed=F}});e0.prototype.destroy=kB.destroy;e0.prototype._undestroy=kB.undestroy;e0.prototype._destroy=function(D,F){F(D)}});var Y4=z((DC0,HO)=>{var o40=Object.keys||function(D){var F=[];for(var $ in D)F.push($);return F};HO.exports=B8;var WO=xB(),yB=vB();Q4()(B8,WO);{h7=o40(yB.prototype);for(z5=0;z5<h7.length;z5++)if(E5=h7[z5],!B8.prototype[E5])B8.prototype[E5]=yB.prototype[E5]}var h7,E5,z5;function B8(D){if(!(this instanceof B8))return new B8(D);if(WO.call(this,D),yB.call(this,D),this.allowHalfOpen=!0,D){if(D.readable===!1)this.readable=!1;if(D.writable===!1)this.writable=!1;if(D.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",s40)}}Object.defineProperty(B8.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(B8.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(B8.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s40(){if(this._writableState.ended)return;process.nextTick(r40,this)}function r40(D){D.end()}Object.defineProperty(B8.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(F){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=F,this._writableState.destroyed=F}})});var zO=z((_B,KO)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var b7=K0("buffer"),X8=b7.Buffer;function qO(D,F){for(var $ in D)F[$]=D[$]}if(X8.from&&X8.alloc&&X8.allocUnsafe&&X8.allocUnsafeSlow)KO.exports=b7;else qO(b7,_B),_B.Buffer=B4;function B4(D,F,$){return X8(D,F,$)}B4.prototype=Object.create(X8.prototype);qO(X8,B4);B4.from=function(D,F,$){if(typeof D==="number")throw TypeError("Argument must not be a number");return X8(D,F,$)};B4.alloc=function(D,F,$){if(typeof D!=="number")throw TypeError("Argument must be a number");var J=X8(D);if(F!==void 0)if(typeof $==="string")J.fill(F,$);else J.fill(F);else J.fill(0);return J};B4.allocUnsafe=function(D){if(typeof D!=="number")throw TypeError("Argument must be a number");return X8(D)};B4.allocUnsafeSlow=function(D){if(typeof D!=="number")throw TypeError("Argument must be a number");return b7.SlowBuffer(D)}});var hB=z((q30)=>{var gB=zO().Buffer,EO=gB.isEncoding||function(D){switch(D=""+D,D&&D.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t40(D){if(!D)return"utf8";var F;while(!0)switch(D){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return D;default:if(F)return;D=(""+D).toLowerCase(),F=!0}}function e40(D){var F=t40(D);if(typeof F!=="string"&&(gB.isEncoding===EO||!EO(D)))throw Error("Unknown encoding: "+D);return F||D}q30.StringDecoder=V5;function V5(D){this.encoding=e40(D);var F;switch(this.encoding){case"utf16le":this.text=Y30,this.end=B30,F=4;break;case"utf8":this.fillLast=$30,F=4;break;case"base64":this.text=X30,this.end=G30,F=3;break;default:this.write=W30,this.end=H30;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=gB.allocUnsafe(F)}V5.prototype.write=function(D){if(D.length===0)return"";var F,$;if(this.lastNeed){if(F=this.fillLast(D),F===void 0)return"";$=this.lastNeed,this.lastNeed=0}else $=0;if($<D.length)return F?F+this.text(D,$):this.text(D,$);return F||""};V5.prototype.end=Q30;V5.prototype.text=J30;V5.prototype.fillLast=function(D){if(this.lastNeed<=D.length)return D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,this.lastTotal-this.lastNeed,0,D.length),this.lastNeed-=D.length};function fB(D){if(D<=127)return 0;else if(D>>5===6)return 2;else if(D>>4===14)return 3;else if(D>>3===30)return 4;return D>>6===2?-1:-2}function D30(D,F,$){var J=F.length-1;if(J<$)return 0;var Q=fB(F[J]);if(Q>=0){if(Q>0)D.lastNeed=Q-1;return Q}if(--J<$||Q===-2)return 0;if(Q=fB(F[J]),Q>=0){if(Q>0)D.lastNeed=Q-2;return Q}if(--J<$||Q===-2)return 0;if(Q=fB(F[J]),Q>=0){if(Q>0)if(Q===2)Q=0;else D.lastNeed=Q-3;return Q}return 0}function F30(D,F,$){if((F[0]&192)!==128)return D.lastNeed=0,"\uFFFD";if(D.lastNeed>1&&F.length>1){if((F[1]&192)!==128)return D.lastNeed=1,"\uFFFD";if(D.lastNeed>2&&F.length>2){if((F[2]&192)!==128)return D.lastNeed=2,"\uFFFD"}}}function $30(D){var F=this.lastTotal-this.lastNeed,$=F30(this,D,F);if($!==void 0)return $;if(this.lastNeed<=D.length)return D.copy(this.lastChar,F,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);D.copy(this.lastChar,F,0,D.length),this.lastNeed-=D.length}function J30(D,F){var $=D30(this,D,F);if(!this.lastNeed)return D.toString("utf8",F);this.lastTotal=$;var J=D.length-($-this.lastNeed);return D.copy(this.lastChar,0,J),D.toString("utf8",F,J)}function Q30(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed)return F+"\uFFFD";return F}function Y30(D,F){if((D.length-F)%2===0){var $=D.toString("utf16le",F);if($){var J=$.charCodeAt($.length-1);if(J>=55296&&J<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1],$.slice(0,-1)}return $}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=D[D.length-1],D.toString("utf16le",F,D.length-1)}function B30(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed){var $=this.lastTotal-this.lastNeed;return F+this.lastChar.toString("utf16le",0,$)}return F}function X30(D,F){var $=(D.length-F)%3;if($===0)return D.toString("base64",F);if(this.lastNeed=3-$,this.lastTotal=3,$===1)this.lastChar[0]=D[D.length-1];else this.lastChar[0]=D[D.length-2],this.lastChar[1]=D[D.length-1];return D.toString("base64",F,D.length-$)}function G30(D){var F=D&&D.length?this.write(D):"";if(this.lastNeed)return F+this.lastChar.toString("base64",0,3-this.lastNeed);return F}function W30(D){return D.toString(this.encoding)}function H30(D){return D&&D.length?this.write(D):""}});var u7=z(($C0,UO)=>{var VO=T6().codes.ERR_STREAM_PREMATURE_CLOSE;function z30(D){var F=!1;return function(){if(F)return;F=!0;for(var $=arguments.length,J=Array($),Q=0;Q<$;Q++)J[Q]=arguments[Q];D.apply(this,J)}}function E30(){}function V30(D){return D.setHeader&&typeof D.abort==="function"}function ZO(D,F,$){if(typeof F==="function")return ZO(D,null,F);if(!F)F={};$=z30($||E30);var J=F.readable||F.readable!==!1&&D.readable,Q=F.writable||F.writable!==!1&&D.writable,Y=function(){if(!D.writable)X()},B=D._writableState&&D._writableState.finished,X=function(){if(Q=!1,B=!0,!J)$.call(D)},G=D._readableState&&D._readableState.endEmitted,H=function(){if(J=!1,G=!0,!Q)$.call(D)},q=function(Z){$.call(D,Z)},K=function(){var Z;if(J&&!G){if(!D._readableState||!D._readableState.ended)Z=new VO;return $.call(D,Z)}if(Q&&!B){if(!D._writableState||!D._writableState.ended)Z=new VO;return $.call(D,Z)}},V=function(){D.req.on("finish",X)};if(V30(D))if(D.on("complete",X),D.on("abort",K),D.req)V();else D.on("request",V);else if(Q&&!D._writableState)D.on("end",Y),D.on("close",Y);if(D.on("end",H),D.on("finish",X),F.error!==!1)D.on("error",q);return D.on("close",K),function(){if(D.removeListener("complete",X),D.removeListener("abort",K),D.removeListener("request",V),D.req)D.req.removeListener("finish",X);D.removeListener("end",Y),D.removeListener("close",Y),D.removeListener("finish",X),D.removeListener("end",H),D.removeListener("error",q),D.removeListener("close",K)}}UO.exports=ZO});var AO=z((JC0,LO)=>{var m7;function P6(D,F,$){if(F=Z30(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function Z30(D){var F=U30(D,"string");return typeof F==="symbol"?F:String(F)}function U30(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var J=$.call(D,F||"default");if(typeof J!=="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var L30=u7(),I6=Symbol("lastResolve"),X4=Symbol("lastReject"),Z5=Symbol("error"),l7=Symbol("ended"),G4=Symbol("lastPromise"),bB=Symbol("handlePromise"),W4=Symbol("stream");function S6(D,F){return{value:D,done:F}}function A30(D){var F=D[I6];if(F!==null){var $=D[W4].read();if($!==null)D[G4]=null,D[I6]=null,D[X4]=null,F(S6($,!1))}}function M30(D){process.nextTick(A30,D)}function N30(D,F){return function($,J){D.then(function(){if(F[l7]){$(S6(void 0,!0));return}F[bB]($,J)},J)}}var C30=Object.getPrototypeOf(function(){}),R30=Object.setPrototypeOf((m7={get stream(){return this[W4]},next:function(){var F=this,$=this[Z5];if($!==null)return Promise.reject($);if(this[l7])return Promise.resolve(S6(void 0,!0));if(this[W4].destroyed)return new Promise(function(B,X){process.nextTick(function(){if(F[Z5])X(F[Z5]);else B(S6(void 0,!0))})});var J=this[G4],Q;if(J)Q=new Promise(N30(J,this));else{var Y=this[W4].read();if(Y!==null)return Promise.resolve(S6(Y,!1));Q=new Promise(this[bB])}return this[G4]=Q,Q}},P6(m7,Symbol.asyncIterator,function(){return this}),P6(m7,"return",function(){var F=this;return new Promise(function($,J){F[W4].destroy(null,function(Q){if(Q){J(Q);return}$(S6(void 0,!0))})})}),m7),C30),O30=function(F){var $,J=Object.create(R30,($={},P6($,W4,{value:F,writable:!0}),P6($,I6,{value:null,writable:!0}),P6($,X4,{value:null,writable:!0}),P6($,Z5,{value:null,writable:!0}),P6($,l7,{value:F._readableState.endEmitted,writable:!0}),P6($,bB,{value:function(Y,B){var X=J[W4].read();if(X)J[G4]=null,J[I6]=null,J[X4]=null,Y(S6(X,!1));else J[I6]=Y,J[X4]=B},writable:!0}),$));return J[G4]=null,L30(F,function(Q){if(Q&&Q.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Y=J[X4];if(Y!==null)J[G4]=null,J[I6]=null,J[X4]=null,Y(Q);J[Z5]=Q;return}var B=J[I6];if(B!==null)J[G4]=null,J[I6]=null,J[X4]=null,B(S6(void 0,!0));J[l7]=!0}),F.on("readable",M30.bind(null,J)),J};LO.exports=O30});var RO=z((QC0,CO)=>{function MO(D,F,$,J,Q,Y,B){try{var X=D[Y](B),G=X.value}catch(H){$(H);return}if(X.done)F(G);else Promise.resolve(G).then(J,Q)}function w30(D){return function(){var F=this,$=arguments;return new Promise(function(J,Q){var Y=D.apply(F,$);function B(G){MO(Y,J,Q,B,X,"next",G)}function X(G){MO(Y,J,Q,B,X,"throw",G)}B(void 0)})}}function NO(D,F){var $=Object.keys(D);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(D);F&&(J=J.filter(function(Q){return Object.getOwnPropertyDescriptor(D,Q).enumerable})),$.push.apply($,J)}return $}function T30(D){for(var F=1;F<arguments.length;F++){var $=arguments[F]!=null?arguments[F]:{};F%2?NO(Object($),!0).forEach(function(J){j30(D,J,$[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors($)):NO(Object($)).forEach(function(J){Object.defineProperty(D,J,Object.getOwnPropertyDescriptor($,J))})}return D}function j30(D,F,$){if(F=P30(F),F in D)Object.defineProperty(D,F,{value:$,enumerable:!0,configurable:!0,writable:!0});else D[F]=$;return D}function P30(D){var F=I30(D,"string");return typeof F==="symbol"?F:String(F)}function I30(D,F){if(typeof D!=="object"||D===null)return D;var $=D[Symbol.toPrimitive];if($!==void 0){var J=$.call(D,F||"default");if(typeof J!=="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(D)}var S30=T6().codes.ERR_INVALID_ARG_TYPE;function k30(D,F,$){var J;if(F&&typeof F.next==="function")J=F;else if(F&&F[Symbol.asyncIterator])J=F[Symbol.asyncIterator]();else if(F&&F[Symbol.iterator])J=F[Symbol.iterator]();else throw new S30("iterable",["Iterable"],F);var Q=new D(T30({objectMode:!0},$)),Y=!1;Q._read=function(){if(!Y)Y=!0,B()};function B(){return X.apply(this,arguments)}function X(){return X=w30(function*(){try{var G=yield J.next(),H=G.value,q=G.done;if(q)Q.push(null);else if(Q.push(yield H))B();else Y=!1}catch(K){Q.destroy(K)}}),X.apply(this,arguments)}return Q}CO.exports=k30});var xB=z((BC0,yO)=>{yO.exports=C0;var y3;C0.ReadableState=jO;var YC0=K0("events").EventEmitter,TO=function(F,$){return F.listeners($).length},L5=K0("stream"),p7=K0("buffer").Buffer,v30=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function y30(D){return p7.from(D)}function x30(D){return p7.isBuffer(D)||D instanceof v30}var uB=K0("util"),q0;if(uB&&uB.debuglog)q0=uB.debuglog("stream");else q0=function(){};var _30=iR(),iB=TB(),f30=jB(),g30=f30.getHighWaterMark,d7=T6().codes,h30=d7.ERR_INVALID_ARG_TYPE,b30=d7.ERR_STREAM_PUSH_AFTER_EOF,u30=d7.ERR_METHOD_NOT_IMPLEMENTED,m30=d7.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x3,mB,lB;Q4()(C0,L5);var U5=iB.errorOrDestroy,pB=["error","close","destroy","pause","resume"];function l30(D,F,$){if(typeof D.prependListener==="function")return D.prependListener(F,$);if(!D._events||!D._events[F])D.on(F,$);else if(Array.isArray(D._events[F]))D._events[F].unshift($);else D._events[F]=[$,D._events[F]]}function jO(D,F,$){if(y3=y3||Y4(),D=D||{},typeof $!=="boolean")$=F instanceof y3;if(this.objectMode=!!D.objectMode,$)this.objectMode=this.objectMode||!!D.readableObjectMode;if(this.highWaterMark=g30(this,D,"readableHighWaterMark",$),this.buffer=new _30,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=D.emitClose!==!1,this.autoDestroy=!!D.autoDestroy,this.destroyed=!1,this.defaultEncoding=D.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,D.encoding){if(!x3)x3=hB().StringDecoder;this.decoder=new x3(D.encoding),this.encoding=D.encoding}}function C0(D){if(y3=y3||Y4(),!(this instanceof C0))return new C0(D);var F=this instanceof y3;if(this._readableState=new jO(D,this,F),this.readable=!0,D){if(typeof D.read==="function")this._read=D.read;if(typeof D.destroy==="function")this._destroy=D.destroy}L5.call(this)}Object.defineProperty(C0.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(F){if(!this._readableState)return;this._readableState.destroyed=F}});C0.prototype.destroy=iB.destroy;C0.prototype._undestroy=iB.undestroy;C0.prototype._destroy=function(D,F){F(D)};C0.prototype.push=function(D,F){var $=this._readableState,J;if(!$.objectMode){if(typeof D==="string"){if(F=F||$.defaultEncoding,F!==$.encoding)D=p7.from(D,F),F="";J=!0}}else J=!0;return PO(this,D,F,!1,J)};C0.prototype.unshift=function(D){return PO(this,D,null,!0,!1)};function PO(D,F,$,J,Q){q0("readableAddChunk",F);var Y=D._readableState;if(F===null)Y.reading=!1,c30(D,Y);else{var B;if(!Q)B=p30(Y,F);if(B)U5(D,B);else if(Y.objectMode||F&&F.length>0){if(typeof F!=="string"&&!Y.objectMode&&Object.getPrototypeOf(F)!==p7.prototype)F=y30(F);if(J)if(Y.endEmitted)U5(D,new m30);else dB(D,Y,F,!0);else if(Y.ended)U5(D,new b30);else if(Y.destroyed)return!1;else if(Y.reading=!1,Y.decoder&&!$)if(F=Y.decoder.write(F),Y.objectMode||F.length!==0)dB(D,Y,F,!1);else nB(D,Y);else dB(D,Y,F,!1)}else if(!J)Y.reading=!1,nB(D,Y)}return!Y.ended&&(Y.length<Y.highWaterMark||Y.length===0)}function dB(D,F,$,J){if(F.flowing&&F.length===0&&!F.sync)F.awaitDrain=0,D.emit("data",$);else{if(F.length+=F.objectMode?1:$.length,J)F.buffer.unshift($);else F.buffer.push($);if(F.needReadable)c7(D)}nB(D,F)}function p30(D,F){var $;if(!x30(F)&&typeof F!=="string"&&F!==void 0&&!D.objectMode)$=new h30("chunk",["string","Buffer","Uint8Array"],F);return $}C0.prototype.isPaused=function(){return this._readableState.flowing===!1};C0.prototype.setEncoding=function(D){if(!x3)x3=hB().StringDecoder;var F=new x3(D);this._readableState.decoder=F,this._readableState.encoding=this._readableState.decoder.encoding;var $=this._readableState.buffer.head,J="";while($!==null)J+=F.write($.data),$=$.next;if(this._readableState.buffer.clear(),J!=="")this._readableState.buffer.push(J);return this._readableState.length=J.length,this};var OO=1073741824;function d30(D){if(D>=OO)D=OO;else D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++;return D}function wO(D,F){if(D<=0||F.length===0&&F.ended)return 0;if(F.objectMode)return 1;if(D!==D)if(F.flowing&&F.length)return F.buffer.head.data.length;else return F.length;if(D>F.highWaterMark)F.highWaterMark=d30(D);if(D<=F.length)return D;if(!F.ended)return F.needReadable=!0,0;return F.length}C0.prototype.read=function(D){q0("read",D),D=parseInt(D,10);var F=this._readableState,$=D;if(D!==0)F.emittedReadable=!1;if(D===0&&F.needReadable&&((F.highWaterMark!==0?F.length>=F.highWaterMark:F.length>0)||F.ended)){if(q0("read: emitReadable",F.length,F.ended),F.length===0&&F.ended)cB(this);else c7(this);return null}if(D=wO(D,F),D===0&&F.ended){if(F.length===0)cB(this);return null}var J=F.needReadable;if(q0("need readable",J),F.length===0||F.length-D<F.highWaterMark)J=!0,q0("length less than watermark",J);if(F.ended||F.reading)J=!1,q0("reading or ended",J);else if(J){if(q0("do read"),F.reading=!0,F.sync=!0,F.length===0)F.needReadable=!0;if(this._read(F.highWaterMark),F.sync=!1,!F.reading)D=wO($,F)}var Q;if(D>0)Q=kO(D,F);else Q=null;if(Q===null)F.needReadable=F.length<=F.highWaterMark,D=0;else F.length-=D,F.awaitDrain=0;if(F.length===0){if(!F.ended)F.needReadable=!0;if($!==D&&F.ended)cB(this)}if(Q!==null)this.emit("data",Q);return Q};function c30(D,F){if(q0("onEofChunk"),F.ended)return;if(F.decoder){var $=F.decoder.end();if($&&$.length)F.buffer.push($),F.length+=F.objectMode?1:$.length}if(F.ended=!0,F.sync)c7(D);else if(F.needReadable=!1,!F.emittedReadable)F.emittedReadable=!0,IO(D)}function c7(D){var F=D._readableState;if(q0("emitReadable",F.needReadable,F.emittedReadable),F.needReadable=!1,!F.emittedReadable)q0("emitReadable",F.flowing),F.emittedReadable=!0,process.nextTick(IO,D)}function IO(D){var F=D._readableState;if(q0("emitReadable_",F.destroyed,F.length,F.ended),!F.destroyed&&(F.length||F.ended))D.emit("readable"),F.emittedReadable=!1;F.needReadable=!F.flowing&&!F.ended&&F.length<=F.highWaterMark,aB(D)}function nB(D,F){if(!F.readingMore)F.readingMore=!0,process.nextTick(n30,D,F)}function n30(D,F){while(!F.reading&&!F.ended&&(F.length<F.highWaterMark||F.flowing&&F.length===0)){var $=F.length;if(q0("maybeReadMore read 0"),D.read(0),$===F.length)break}F.readingMore=!1}C0.prototype._read=function(D){U5(this,new u30("_read()"))};C0.prototype.pipe=function(D,F){var $=this,J=this._readableState;switch(J.pipesCount){case 0:J.pipes=D;break;case 1:J.pipes=[J.pipes,D];break;default:J.pipes.push(D);break}J.pipesCount+=1,q0("pipe count=%d opts=%j",J.pipesCount,F);var Q=(!F||F.end!==!1)&&D!==process.stdout&&D!==process.stderr,Y=Q?X:L;if(J.endEmitted)process.nextTick(Y);else $.once("end",Y);D.on("unpipe",B);function B(A,M){if(q0("onunpipe"),A===$){if(M&&M.hasUnpiped===!1)M.hasUnpiped=!0,q()}}function X(){q0("onend"),D.end()}var G=i30($);D.on("drain",G);var H=!1;function q(){if(q0("cleanup"),D.removeListener("close",E),D.removeListener("finish",Z),D.removeListener("drain",G),D.removeListener("error",V),D.removeListener("unpipe",B),$.removeListener("end",X),$.removeListener("end",L),$.removeListener("data",K),H=!0,J.awaitDrain&&(!D._writableState||D._writableState.needDrain))G()}$.on("data",K);function K(A){q0("ondata");var M=D.write(A);if(q0("dest.write",M),M===!1){if((J.pipesCount===1&&J.pipes===D||J.pipesCount>1&&vO(J.pipes,D)!==-1)&&!H)q0("false write response, pause",J.awaitDrain),J.awaitDrain++;$.pause()}}function V(A){if(q0("onerror",A),L(),D.removeListener("error",V),TO(D,"error")===0)U5(D,A)}l30(D,"error",V);function E(){D.removeListener("finish",Z),L()}D.once("close",E);function Z(){q0("onfinish"),D.removeListener("close",E),L()}D.once("finish",Z);function L(){q0("unpipe"),$.unpipe(D)}if(D.emit("pipe",$),!J.flowing)q0("pipe resume"),$.resume();return D};function i30(D){return function(){var $=D._readableState;if(q0("pipeOnDrain",$.awaitDrain),$.awaitDrain)$.awaitDrain--;if($.awaitDrain===0&&TO(D,"data"))$.flowing=!0,aB(D)}}C0.prototype.unpipe=function(D){var F=this._readableState,$={hasUnpiped:!1};if(F.pipesCount===0)return this;if(F.pipesCount===1){if(D&&D!==F.pipes)return this;if(!D)D=F.pipes;if(F.pipes=null,F.pipesCount=0,F.flowing=!1,D)D.emit("unpipe",this,$);return this}if(!D){var{pipes:J,pipesCount:Q}=F;F.pipes=null,F.pipesCount=0,F.flowing=!1;for(var Y=0;Y<Q;Y++)J[Y].emit("unpipe",this,{hasUnpiped:!1});return this}var B=vO(F.pipes,D);if(B===-1)return this;if(F.pipes.splice(B,1),F.pipesCount-=1,F.pipesCount===1)F.pipes=F.pipes[0];return D.emit("unpipe",this,$),this};C0.prototype.on=function(D,F){var $=L5.prototype.on.call(this,D,F),J=this._readableState;if(D==="data"){if(J.readableListening=this.listenerCount("readable")>0,J.flowing!==!1)this.resume()}else if(D==="readable"){if(!J.endEmitted&&!J.readableListening){if(J.readableListening=J.needReadable=!0,J.flowing=!1,J.emittedReadable=!1,q0("on readable",J.length,J.reading),J.length)c7(this);else if(!J.reading)process.nextTick(a30,this)}}return $};C0.prototype.addListener=C0.prototype.on;C0.prototype.removeListener=function(D,F){var $=L5.prototype.removeListener.call(this,D,F);if(D==="readable")process.nextTick(SO,this);return $};C0.prototype.removeAllListeners=function(D){var F=L5.prototype.removeAllListeners.apply(this,arguments);if(D==="readable"||D===void 0)process.nextTick(SO,this);return F};function SO(D){var F=D._readableState;if(F.readableListening=D.listenerCount("readable")>0,F.resumeScheduled&&!F.paused)F.flowing=!0;else if(D.listenerCount("data")>0)D.resume()}function a30(D){q0("readable nexttick read 0"),D.read(0)}C0.prototype.resume=function(){var D=this._readableState;if(!D.flowing)q0("resume"),D.flowing=!D.readableListening,o30(this,D);return D.paused=!1,this};function o30(D,F){if(!F.resumeScheduled)F.resumeScheduled=!0,process.nextTick(s30,D,F)}function s30(D,F){if(q0("resume",F.reading),!F.reading)D.read(0);if(F.resumeScheduled=!1,D.emit("resume"),aB(D),F.flowing&&!F.reading)D.read(0)}C0.prototype.pause=function(){if(q0("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)q0("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function aB(D){var F=D._readableState;q0("flow",F.flowing);while(F.flowing&&D.read()!==null);}C0.prototype.wrap=function(D){var F=this,$=this._readableState,J=!1;D.on("end",function(){if(q0("wrapped end"),$.decoder&&!$.ended){var B=$.decoder.end();if(B&&B.length)F.push(B)}F.push(null)}),D.on("data",function(B){if(q0("wrapped data"),$.decoder)B=$.decoder.write(B);if($.objectMode&&(B===null||B===void 0))return;else if(!$.objectMode&&(!B||!B.length))return;var X=F.push(B);if(!X)J=!0,D.pause()});for(var Q in D)if(this[Q]===void 0&&typeof D[Q]==="function")this[Q]=function(X){return function(){return D[X].apply(D,arguments)}}(Q);for(var Y=0;Y<pB.length;Y++)D.on(pB[Y],this.emit.bind(this,pB[Y]));return this._read=function(B){if(q0("wrapped _read",B),J)J=!1,D.resume()},this};if(typeof Symbol==="function")C0.prototype[Symbol.asyncIterator]=function(){if(mB===void 0)mB=AO();return mB(this)};Object.defineProperty(C0.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(C0.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(C0.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(F){if(this._readableState)this._readableState.flowing=F}});C0._fromList=kO;Object.defineProperty(C0.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function kO(D,F){if(F.length===0)return null;var $;if(F.objectMode)$=F.buffer.shift();else if(!D||D>=F.length){if(F.decoder)$=F.buffer.join("");else if(F.buffer.length===1)$=F.buffer.first();else $=F.buffer.concat(F.length);F.buffer.clear()}else $=F.buffer.consume(D,F.decoder);return $}function cB(D){var F=D._readableState;if(q0("endReadable",F.endEmitted),!F.endEmitted)F.ended=!0,process.nextTick(r30,F,D)}function r30(D,F){if(q0("endReadableNT",D.endEmitted,D.length),!D.endEmitted&&D.length===0){if(D.endEmitted=!0,F.readable=!1,F.emit("end"),D.autoDestroy){var $=F._writableState;if(!$||$.autoDestroy&&$.finished)F.destroy()}}}if(typeof Symbol==="function")C0.from=function(D,F){if(lB===void 0)lB=RO();return lB(C0,D,F)};function vO(D,F){for(var $=0,J=D.length;$<J;$++)if(D[$]===F)return $;return-1}});var oB=z((XC0,_O)=>{_O.exports=x8;var n7=T6().codes,t30=n7.ERR_METHOD_NOT_IMPLEMENTED,e30=n7.ERR_MULTIPLE_CALLBACK,DF0=n7.ERR_TRANSFORM_ALREADY_TRANSFORMING,FF0=n7.ERR_TRANSFORM_WITH_LENGTH_0,i7=Y4();Q4()(x8,i7);function $F0(D,F){var $=this._transformState;$.transforming=!1;var J=$.writecb;if(J===null)return this.emit("error",new e30);if($.writechunk=null,$.writecb=null,F!=null)this.push(F);J(D);var Q=this._readableState;if(Q.reading=!1,Q.needReadable||Q.length<Q.highWaterMark)this._read(Q.highWaterMark)}function x8(D){if(!(this instanceof x8))return new x8(D);if(i7.call(this,D),this._transformState={afterTransform:$F0.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,D){if(typeof D.transform==="function")this._transform=D.transform;if(typeof D.flush==="function")this._flush=D.flush}this.on("prefinish",JF0)}function JF0(){var D=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(F,$){xO(D,F,$)});else xO(this,null,null)}x8.prototype.push=function(D,F){return this._transformState.needTransform=!1,i7.prototype.push.call(this,D,F)};x8.prototype._transform=function(D,F,$){$(new t30("_transform()"))};x8.prototype._write=function(D,F,$){var J=this._transformState;if(J.writecb=$,J.writechunk=D,J.writeencoding=F,!J.transforming){var Q=this._readableState;if(J.needTransform||Q.needReadable||Q.length<Q.highWaterMark)this._read(Q.highWaterMark)}};x8.prototype._read=function(D){var F=this._transformState;if(F.writechunk!==null&&!F.transforming)F.transforming=!0,this._transform(F.writechunk,F.writeencoding,F.afterTransform);else F.needTransform=!0};x8.prototype._destroy=function(D,F){i7.prototype._destroy.call(this,D,function($){F($)})};function xO(D,F,$){if(F)return D.emit("error",F);if($!=null)D.push($);if(D._writableState.length)throw new FF0;if(D._transformState.transforming)throw new DF0;return D.push(null)}});var hO=z((GC0,gO)=>{gO.exports=A5;var fO=oB();Q4()(A5,fO);function A5(D){if(!(this instanceof A5))return new A5(D);fO.call(this,D)}A5.prototype._transform=function(D,F,$){$(null,D)}});var pO=z((WC0,lO)=>{var sB;function QF0(D){var F=!1;return function(){if(F)return;F=!0,D.apply(void 0,arguments)}}var mO=T6().codes,YF0=mO.ERR_MISSING_ARGS,BF0=mO.ERR_STREAM_DESTROYED;function bO(D){if(D)throw D}function XF0(D){return D.setHeader&&typeof D.abort==="function"}function GF0(D,F,$,J){J=QF0(J);var Q=!1;if(D.on("close",function(){Q=!0}),sB===void 0)sB=u7();sB(D,{readable:F,writable:$},function(B){if(B)return J(B);Q=!0,J()});var Y=!1;return function(B){if(Q)return;if(Y)return;if(Y=!0,XF0(D))return D.abort();if(typeof D.destroy==="function")return D.destroy();J(B||new BF0("pipe"))}}function uO(D){D()}function WF0(D,F){return D.pipe(F)}function HF0(D){if(!D.length)return bO;if(typeof D[D.length-1]!=="function")return bO;return D.pop()}function qF0(){for(var D=arguments.length,F=Array(D),$=0;$<D;$++)F[$]=arguments[$];var J=HF0(F);if(Array.isArray(F[0]))F=F[0];if(F.length<2)throw new YF0("streams");var Q,Y=F.map(function(B,X){var G=X<F.length-1,H=X>0;return GF0(B,G,H,function(q){if(!Q)Q=q;if(q)Y.forEach(uO);if(G)return;Y.forEach(uO),J(Q)})});return F.reduce(WF0)}lO.exports=qF0});var dO=z((V1,N5)=>{var M5=K0("stream");if(process.env.READABLE_STREAM==="disable"&&M5)N5.exports=M5.Readable,Object.assign(N5.exports,M5),N5.exports.Stream=M5;else V1=N5.exports=xB(),V1.Stream=M5||V1,V1.Readable=V1,V1.Writable=vB(),V1.Duplex=Y4(),V1.Transform=oB(),V1.PassThrough=hO(),V1.finished=u7(),V1.pipeline=pO()});var iO=z((HC0,nO)=>{var{Buffer:k1}=K0("buffer"),cO=Symbol.for("BufferList");function g0(D){if(!(this instanceof g0))return new g0(D);g0._init.call(this,D)}g0._init=function(F){if(Object.defineProperty(this,cO,{value:!0}),this._bufs=[],this.length=0,F)this.append(F)};g0.prototype._new=function(F){return new g0(F)};g0.prototype._offset=function(F){if(F===0)return[0,0];let $=0;for(let J=0;J<this._bufs.length;J++){let Q=$+this._bufs[J].length;if(F<Q||J===this._bufs.length-1)return[J,F-$];$=Q}};g0.prototype._reverseOffset=function(D){let F=D[0],$=D[1];for(let J=0;J<F;J++)$+=this._bufs[J].length;return $};g0.prototype.get=function(F){if(F>this.length||F<0)return;let $=this._offset(F);return this._bufs[$[0]][$[1]]};g0.prototype.slice=function(F,$){if(typeof F==="number"&&F<0)F+=this.length;if(typeof $==="number"&&$<0)$+=this.length;return this.copy(null,0,F,$)};g0.prototype.copy=function(F,$,J,Q){if(typeof J!=="number"||J<0)J=0;if(typeof Q!=="number"||Q>this.length)Q=this.length;if(J>=this.length)return F||k1.alloc(0);if(Q<=0)return F||k1.alloc(0);let Y=!!F,B=this._offset(J),X=Q-J,G=X,H=Y&&$||0,q=B[1];if(J===0&&Q===this.length){if(!Y)return this._bufs.length===1?this._bufs[0]:k1.concat(this._bufs,this.length);for(let K=0;K<this._bufs.length;K++)this._bufs[K].copy(F,H),H+=this._bufs[K].length;return F}if(G<=this._bufs[B[0]].length-q)return Y?this._bufs[B[0]].copy(F,$,q,q+G):this._bufs[B[0]].slice(q,q+G);if(!Y)F=k1.allocUnsafe(X);for(let K=B[0];K<this._bufs.length;K++){let V=this._bufs[K].length-q;if(G>V)this._bufs[K].copy(F,H,q),H+=V;else{this._bufs[K].copy(F,H,q,q+G),H+=V;break}if(G-=V,q)q=0}if(F.length>H)return F.slice(0,H);return F};g0.prototype.shallowSlice=function(F,$){if(F=F||0,$=typeof $!=="number"?this.length:$,F<0)F+=this.length;if($<0)$+=this.length;if(F===$)return this._new();let J=this._offset(F),Q=this._offset($),Y=this._bufs.slice(J[0],Q[0]+1);if(Q[1]===0)Y.pop();else Y[Y.length-1]=Y[Y.length-1].slice(0,Q[1]);if(J[1]!==0)Y[0]=Y[0].slice(J[1]);return this._new(Y)};g0.prototype.toString=function(F,$,J){return this.slice($,J).toString(F)};g0.prototype.consume=function(F){if(F=Math.trunc(F),Number.isNaN(F)||F<=0)return this;while(this._bufs.length)if(F>=this._bufs[0].length)F-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(F),this.length-=F;break}return this};g0.prototype.duplicate=function(){let F=this._new();for(let $=0;$<this._bufs.length;$++)F.append(this._bufs[$]);return F};g0.prototype.append=function(F){if(F==null)return this;if(F.buffer)this._appendBuffer(k1.from(F.buffer,F.byteOffset,F.byteLength));else if(Array.isArray(F))for(let $=0;$<F.length;$++)this.append(F[$]);else if(this._isBufferList(F))for(let $=0;$<F._bufs.length;$++)this.append(F._bufs[$]);else{if(typeof F==="number")F=F.toString();this._appendBuffer(k1.from(F))}return this};g0.prototype._appendBuffer=function(F){this._bufs.push(F),this.length+=F.length};g0.prototype.indexOf=function(D,F,$){if($===void 0&&typeof F==="string")$=F,F=void 0;if(typeof D==="function"||Array.isArray(D))throw TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');else if(typeof D==="number")D=k1.from([D]);else if(typeof D==="string")D=k1.from(D,$);else if(this._isBufferList(D))D=D.slice();else if(Array.isArray(D.buffer))D=k1.from(D.buffer,D.byteOffset,D.byteLength);else if(!k1.isBuffer(D))D=k1.from(D);if(F=Number(F||0),isNaN(F))F=0;if(F<0)F=this.length+F;if(F<0)F=0;if(D.length===0)return F>this.length?this.length:F;let J=this._offset(F),Q=J[0],Y=J[1];for(;Q<this._bufs.length;Q++){let B=this._bufs[Q];while(Y<B.length)if(B.length-Y>=D.length){let G=B.indexOf(D,Y);if(G!==-1)return this._reverseOffset([Q,G]);Y=B.length-D.length+1}else{let G=this._reverseOffset([Q,Y]);if(this._match(G,D))return G;Y++}Y=0}return-1};g0.prototype._match=function(D,F){if(this.length-D<F.length)return!1;for(let $=0;$<F.length;$++)if(this.get(D+$)!==F[$])return!1;return!0};(function(){let D={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let F in D)(function($){if(D[$]===null)g0.prototype[$]=function(J,Q){return this.slice(J,J+Q)[$](0,Q)};else g0.prototype[$]=function(J=0){return this.slice(J,J+D[$])[$](0)}})(F)})();g0.prototype._isBufferList=function(F){return F instanceof g0||g0.isBufferList(F)};g0.isBufferList=function(F){return F!=null&&F[cO]};nO.exports=g0});var aO=z((qC0,a7)=>{var rB=dO().Duplex,KF0=Q4(),C5=iO();function wD(D){if(!(this instanceof wD))return new wD(D);if(typeof D==="function"){this._callback=D;let F=function(J){if(this._callback)this._callback(J),this._callback=null}.bind(this);this.on("pipe",function(J){J.on("error",F)}),this.on("unpipe",function(J){J.removeListener("error",F)}),D=null}C5._init.call(this,D),rB.call(this)}KF0(wD,rB);Object.assign(wD.prototype,C5.prototype);wD.prototype._new=function(F){return new wD(F)};wD.prototype._write=function(F,$,J){if(this._appendBuffer(F),typeof J==="function")J()};wD.prototype._read=function(F){if(!this.length)return this.push(null);F=Math.min(F,this.length),this.push(this.slice(0,F)),this.consume(F)};wD.prototype.end=function(F){if(rB.prototype.end.call(this,F),this._callback)this._callback(null,this.slice()),this._callback=null};wD.prototype._destroy=function(F,$){this._bufs.length=0,this.length=0,$(F)};wD.prototype._isBufferList=function(F){return F instanceof wD||F instanceof C5||wD.isBufferList(F)};wD.isBufferList=C5.isBufferList;a7.exports=wD;a7.exports.BufferListStream=wD;a7.exports.BufferList=C5});var rO=z((KC0,F2)=>{var zF0=K0("readline"),EF0=ZB(),oO=OR(),o7=k7(),s7=SR(),VF0=J5(),ZF0=bR(),UF0=mR(),LF0=CB(),{BufferListStream:AF0}=aO(),tB=Symbol("text"),eB=Symbol("prefixText");class sO{constructor(){this.requests=0,this.mutedStream=new AF0,this.mutedStream.pipe(process.stdout);let D=this;this.ourEmit=function(F,$,...J){let{stdin:Q}=process;if(D.requests>0||Q.emit===D.ourEmit){if(F==="keypress")return;if(F==="data"&&$.includes(3))process.emit("SIGINT");Reflect.apply(D.oldEmit,this,[F,$,...J])}else Reflect.apply(process.stdin.emit,this,[F,$,...J])}}start(){if(this.requests++,this.requests===1)this.realStart()}stop(){if(this.requests<=0)throw Error("`stop` called more times than `start`");if(this.requests--,this.requests===0)this.realStop()}realStart(){if(process.platform==="win32")return;this.rl=zF0.createInterface({input:process.stdin,output:this.mutedStream}),this.rl.on("SIGINT",()=>{if(process.listenerCount("SIGINT")===0)process.emit("SIGINT");else this.rl.close(),process.kill(process.pid,"SIGINT")})}realStop(){if(process.platform==="win32")return;this.rl.close(),this.rl=void 0}}var r7;class D2{constructor(D){if(!r7)r7=new sO;if(typeof D==="string")D={text:D};this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:!0,...D},this.spinner=this.options.spinner,this.color=this.options.color,this.hideCursor=this.options.hideCursor!==!1,this.interval=this.options.interval||this.spinner.interval||100,this.stream=this.options.stream,this.id=void 0,this.isEnabled=typeof this.options.isEnabled==="boolean"?this.options.isEnabled:UF0({stream:this.stream}),this.isSilent=typeof this.options.isSilent==="boolean"?this.options.isSilent:!1,this.text=this.options.text,this.prefixText=this.options.prefixText,this.linesToClear=0,this.indent=this.options.indent,this.discardStdin=this.options.discardStdin,this.isDiscardingStdin=!1}get indent(){return this._indent}set indent(D=0){if(!(D>=0&&Number.isInteger(D)))throw Error("The `indent` option must be an integer from 0 and up");this._indent=D}_updateInterval(D){if(D!==void 0)this.interval=D}get spinner(){return this._spinner}set spinner(D){if(this.frameIndex=0,typeof D==="object"){if(D.frames===void 0)throw Error("The given spinner must have a `frames` property");this._spinner=D}else if(!LF0())this._spinner=o7.line;else if(D===void 0)this._spinner=o7.dots;else if(D!=="default"&&o7[D])this._spinner=o7[D];else throw Error(`There is no built-in spinner named '${D}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);this._updateInterval(this._spinner.interval)}get text(){return this[tB]}set text(D){this[tB]=D,this.updateLineCount()}get prefixText(){return this[eB]}set prefixText(D){this[eB]=D,this.updateLineCount()}get isSpinning(){return this.id!==void 0}getFullPrefixText(D=this[eB],F=" "){if(typeof D==="string")return D+F;if(typeof D==="function")return D()+F;return""}updateLineCount(){let D=this.stream.columns||80,F=this.getFullPrefixText(this.prefixText,"-");this.lineCount=0;for(let $ of VF0(F+"--"+this[tB]).split(`
46
46
  `))this.lineCount+=Math.max(1,Math.ceil(ZF0($)/D))}get isEnabled(){return this._isEnabled&&!this.isSilent}set isEnabled(D){if(typeof D!=="boolean")throw TypeError("The `isEnabled` option must be a boolean");this._isEnabled=D}get isSilent(){return this._isSilent}set isSilent(D){if(typeof D!=="boolean")throw TypeError("The `isSilent` option must be a boolean");this._isSilent=D}frame(){let{frames:D}=this.spinner,F=D[this.frameIndex];if(this.color)F=EF0[this.color](F);this.frameIndex=++this.frameIndex%D.length;let $=typeof this.prefixText==="string"&&this.prefixText!==""?this.prefixText+" ":"",J=typeof this.text==="string"?" "+this.text:"";return $+F+J}clear(){if(!this.isEnabled||!this.stream.isTTY)return this;for(let D=0;D<this.linesToClear;D++){if(D>0)this.stream.moveCursor(0,-1);this.stream.clearLine(),this.stream.cursorTo(this.indent)}return this.linesToClear=0,this}render(){if(this.isSilent)return this;return this.clear(),this.stream.write(this.frame()),this.linesToClear=this.lineCount,this}start(D){if(D)this.text=D;if(this.isSilent)return this;if(!this.isEnabled){if(this.text)this.stream.write(`- ${this.text}
47
47
  `);return this}if(this.isSpinning)return this;if(this.hideCursor)oO.hide(this.stream);if(this.discardStdin&&process.stdin.isTTY)this.isDiscardingStdin=!0,r7.start();return this.render(),this.id=setInterval(this.render.bind(this),this.interval),this}stop(){if(!this.isEnabled)return this;if(clearInterval(this.id),this.id=void 0,this.frameIndex=0,this.clear(),this.hideCursor)oO.show(this.stream);if(this.discardStdin&&process.stdin.isTTY&&this.isDiscardingStdin)r7.stop(),this.isDiscardingStdin=!1;return this}succeed(D){return this.stopAndPersist({symbol:s7.success,text:D})}fail(D){return this.stopAndPersist({symbol:s7.error,text:D})}warn(D){return this.stopAndPersist({symbol:s7.warning,text:D})}info(D){return this.stopAndPersist({symbol:s7.info,text:D})}stopAndPersist(D={}){if(this.isSilent)return this;let F=D.prefixText||this.prefixText,$=D.text||this.text,J=typeof $==="string"?" "+$:"";return this.stop(),this.stream.write(`${this.getFullPrefixText(F," ")}${D.symbol||" "}${J}
48
48
  `),this}}var MF0=function(D){return new D2(D)};F2.exports=MF0;F2.exports.promise=(D,F)=>{if(typeof D.then!=="function")throw TypeError("Parameter `action` must be a Promise");let $=new D2(F);return $.start(),(async()=>{try{await D,$.succeed()}catch{$.fail()}})(),$}});var _3,t7=function(D,F){D.output.write(_3.default.cursorBackward(F))},tO=function(D,F){D.output.write(_3.default.cursorForward(F))},eO=function(D,F){D.output.write(_3.default.cursorUp(F))},$2=function(D,F){D.output.write(_3.default.cursorDown(F))},R5=function(D,F){D.output.write(_3.default.eraseLines(F))};var J2=P(()=>{_3=s(bF(),1)});function Fw(D){return D.split(`
@@ -85,17 +85,17 @@ ${F}`,E90,V90,Z90=(D,F,$)=>{let J=$===""?"":`with ${$.trim()}() `,Q=z90.bind(nul
85
85
  `:""},this._extScope=D,this._scope=new g1.Scope({parent:D}),this._nodes=[new cP]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,F){let $=this._extScope.value(D,F);return(this._values[$.prefix]||(this._values[$.prefix]=new Set)).add($),$}getScopeValue(D,F){return this._extScope.getValue(D,F)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,F,$,J){let Q=this._scope.toName(F);if($!==void 0&&J)this._constants[Q.str]=$;return this._leafNode(new bP(D,Q,$)),Q}const(D,F,$){return this._def(g1.varKinds.const,D,F,$)}let(D,F,$){return this._def(g1.varKinds.let,D,F,$)}var(D,F,$){return this._def(g1.varKinds.var,D,F,$)}assign(D,F,$){return this._leafNode(new lX(D,F,$))}add(D,F){return this._leafNode(new uP(D,oD.operators.ADD,F))}code(D){if(typeof D=="function")D();else if(D!==U0.nil)this._leafNode(new dP(D));return this}object(...D){let F=["{"];for(let[$,J]of D){if(F.length>1)F.push(",");if(F.push($),$!==J||this.opts.es5)F.push(":"),(0,U0.addCodeArg)(F,J)}return F.push("}"),new U0._Code(F)}if(D,F,$){if(this._blockNode(new u8(D)),F&&$)this.code(F).else().code($).endIf();else if(F)this.code(F).endIf();else if($)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new u8(D))}else(){return this._elseNode(new l5)}endIf(){return this._endBlockNode(u8,l5)}_for(D,F){if(this._blockNode(D),F)this.code(F).endFor();return this}for(D,F){return this._for(new nP(D),F)}forRange(D,F,$,J,Q=this.opts.es5?g1.varKinds.var:g1.varKinds.let){let Y=this._scope.toName(D);return this._for(new iP(Q,Y,F,$),()=>J(Y))}forOf(D,F,$,J=g1.varKinds.const){let Q=this._scope.toName(D);if(this.opts.es5){let Y=F instanceof U0.Name?F:this.var("_arr",F);return this.forRange("_i",0,U0._`${Y}.length`,(B)=>{this.var(Q,U0._`${Y}[${B}]`),$(Q)})}return this._for(new uX("of",J,Q,F),()=>$(Q))}forIn(D,F,$,J=this.opts.es5?g1.varKinds.var:g1.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,U0._`Object.keys(${F})`,$);let Q=this._scope.toName(D);return this._for(new uX("in",J,Q,F),()=>$(Q))}endFor(){return this._endBlockNode(s3)}label(D){return this._leafNode(new mP(D))}break(D){return this._leafNode(new lP(D))}return(D){let F=new c$;if(this._blockNode(F),this.code(D),F.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(c$)}try(D,F,$){if(!F&&!$)throw Error('CodeGen: "try" without "catch" and "finally"');let J=new aP;if(this._blockNode(J),this.code(D),F){let Q=this.name("e");this._currNode=J.catch=new n$(Q),F(Q)}if($)this._currNode=J.finally=new i$,this.code($);return this._endBlockNode(n$,i$)}throw(D){return this._leafNode(new pP(D))}block(D,F){if(this._blockStarts.push(this._nodes.length),D)this.code(D).endBlock(F);return this}endBlock(D){let F=this._blockStarts.pop();if(F===void 0)throw Error("CodeGen: not in self-balancing block");let $=this._nodes.length-F;if($<0||D!==void 0&&$!==D)throw Error(`CodeGen: wrong number of nodes: ${$} vs ${D} expected`);return this._nodes.length=F,this}func(D,F=U0.nil,$,J){if(this._blockNode(new d$(D,F,$)),J)this.code(J).endFunc();return this}endFunc(){return this._endBlockNode(d$)}optimize(D=1){while(D-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,F){let $=this._currNode;if($ instanceof D||F&&$ instanceof F)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${F?`${D.kind}/${F.kind}`:D.kind}"`)}_elseNode(D){let F=this._currNode;if(!(F instanceof u8))throw Error('CodeGen: "else" without "if"');return this._currNode=F.else=D,this}get _root(){return this._nodes[0]}get _currNode(){let D=this._nodes;return D[D.length-1]}set _currNode(D){let F=this._nodes;F[F.length-1]=D}}oD.CodeGen=oP;function U4(D,F){for(let $ in F)D[$]=(D[$]||0)+(F[$]||0);return D}function a$(D,F){return F instanceof U0._CodeOrName?U4(D,F.names):D}function r3(D,F,$){if(D instanceof U0.Name)return J(D);if(!Q(D))return D;return new U0._Code(D._items.reduce((Y,B)=>{if(B instanceof U0.Name)B=J(B);if(B instanceof U0._Code)Y.push(...B._items);else Y.push(B);return Y},[]));function J(Y){let B=$[Y.str];if(B===void 0||F[Y.str]!==1)return Y;return delete F[Y.str],B}function Q(Y){return Y instanceof U0._Code&&Y._items.some((B)=>B instanceof U0.Name&&F[B.str]===1&&$[B.str]!==void 0)}}function K70(D,F){for(let $ in F)D[$]=(D[$]||0)-(F[$]||0)}function sP(D){return typeof D=="boolean"||typeof D=="number"||D===null?!D:U0._`!${mX(D)}`}oD.not=sP;var z70=rP(oD.operators.AND);function E70(...D){return D.reduce(z70)}oD.and=E70;var V70=rP(oD.operators.OR);function Z70(...D){return D.reduce(V70)}oD.or=Z70;function rP(D){return(F,$)=>F===U0.nil?$:$===U0.nil?F:U0._`${mX(F)} ${D} ${mX($)}`}function mX(D){return D instanceof U0.Name?D:U0._`(${D})`}});var z0=z((BI)=>{Object.defineProperty(BI,"__esModule",{value:!0});BI.checkStrictMode=BI.getErrorPath=BI.Type=BI.useFunc=BI.setEvaluated=BI.evaluatedPropsToName=BI.mergeEvaluated=BI.eachItem=BI.unescapeJsonPointer=BI.escapeJsonPointer=BI.escapeFragment=BI.unescapeFragment=BI.schemaRefOrVal=BI.schemaHasRulesButRef=BI.schemaHasRules=BI.checkUnknownRules=BI.alwaysValidSchema=BI.toHash=void 0;var _0=t(),M70=m5();function N70(D){let F={};for(let $ of D)F[$]=!0;return F}BI.toHash=N70;function C70(D,F){if(typeof F=="boolean")return F;if(Object.keys(F).length===0)return!0;return FI(D,F),!$I(F,D.self.RULES.all)}BI.alwaysValidSchema=C70;function FI(D,F=D.schema){let{opts:$,self:J}=D;if(!$.strictSchema)return;if(typeof F==="boolean")return;let Q=J.RULES.keywords;for(let Y in F)if(!Q[Y])YI(D,`unknown keyword: "${Y}"`)}BI.checkUnknownRules=FI;function $I(D,F){if(typeof D=="boolean")return!D;for(let $ in D)if(F[$])return!0;return!1}BI.schemaHasRules=$I;function R70(D,F){if(typeof D=="boolean")return!D;for(let $ in D)if($!=="$ref"&&F.all[$])return!0;return!1}BI.schemaHasRulesButRef=R70;function O70({topSchemaRef:D,schemaPath:F},$,J,Q){if(!Q){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return _0._`${$}`}return _0._`${D}${F}${(0,_0.getProperty)(J)}`}BI.schemaRefOrVal=O70;function w70(D){return JI(decodeURIComponent(D))}BI.unescapeFragment=w70;function T70(D){return encodeURIComponent(dX(D))}BI.escapeFragment=T70;function dX(D){if(typeof D=="number")return`${D}`;return D.replace(/~/g,"~0").replace(/\//g,"~1")}BI.escapeJsonPointer=dX;function JI(D){return D.replace(/~1/g,"/").replace(/~0/g,"~")}BI.unescapeJsonPointer=JI;function j70(D,F){if(Array.isArray(D))for(let $ of D)F($);else F(D)}BI.eachItem=j70;function eP({mergeNames:D,mergeToName:F,mergeValues:$,resultToName:J}){return(Q,Y,B,X)=>{let G=B===void 0?Y:B instanceof _0.Name?(Y instanceof _0.Name?D(Q,Y,B):F(Q,Y,B),B):Y instanceof _0.Name?(F(Q,B,Y),Y):$(Y,B);return X===_0.Name&&!(G instanceof _0.Name)?J(Q,G):G}}BI.mergeEvaluated={props:eP({mergeNames:(D,F,$)=>D.if(_0._`${$} !== true && ${F} !== undefined`,()=>{D.if(_0._`${F} === true`,()=>D.assign($,!0),()=>D.assign($,_0._`${$} || {}`).code(_0._`Object.assign(${$}, ${F})`))}),mergeToName:(D,F,$)=>D.if(_0._`${$} !== true`,()=>{if(F===!0)D.assign($,!0);else D.assign($,_0._`${$} || {}`),cX(D,$,F)}),mergeValues:(D,F)=>D===!0?!0:{...D,...F},resultToName:QI}),items:eP({mergeNames:(D,F,$)=>D.if(_0._`${$} !== true && ${F} !== undefined`,()=>D.assign($,_0._`${F} === true ? true : ${$} > ${F} ? ${$} : ${F}`)),mergeToName:(D,F,$)=>D.if(_0._`${$} !== true`,()=>D.assign($,F===!0?!0:_0._`${$} > ${F} ? ${$} : ${F}`)),mergeValues:(D,F)=>D===!0?!0:Math.max(D,F),resultToName:(D,F)=>D.var("items",F)})};function QI(D,F){if(F===!0)return D.var("props",!0);let $=D.var("props",_0._`{}`);if(F!==void 0)cX(D,$,F);return $}BI.evaluatedPropsToName=QI;function cX(D,F,$){Object.keys($).forEach((J)=>D.assign(_0._`${F}${(0,_0.getProperty)(J)}`,!0))}BI.setEvaluated=cX;var DI={};function P70(D,F){return D.scopeValue("func",{ref:F,code:DI[F.code]||(DI[F.code]=new M70._Code(F.code))})}BI.useFunc=P70;var pX;(function(D){D[D.Num=0]="Num",D[D.Str=1]="Str"})(pX||(BI.Type=pX={}));function I70(D,F,$){if(D instanceof _0.Name){let J=F===pX.Num;return $?J?_0._`"[" + ${D} + "]"`:_0._`"['" + ${D} + "']"`:J?_0._`"/" + ${D}`:_0._`"/" + ${D}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0,_0.getProperty)(D).toString():"/"+dX(D)}BI.getErrorPath=I70;function YI(D,F,$=D.opts.strictSchema){if(!$)return;if(F=`strict mode: ${F}`,$===!0)throw Error(F);D.self.logger.warn(F)}BI.checkStrictMode=YI});var M1=z((GI)=>{Object.defineProperty(GI,"__esModule",{value:!0});var jD=t(),i70={data:new jD.Name("data"),valCxt:new jD.Name("valCxt"),instancePath:new jD.Name("instancePath"),parentData:new jD.Name("parentData"),parentDataProperty:new jD.Name("parentDataProperty"),rootData:new jD.Name("rootData"),dynamicAnchors:new jD.Name("dynamicAnchors"),vErrors:new jD.Name("vErrors"),errors:new jD.Name("errors"),this:new jD.Name("this"),self:new jD.Name("self"),scope:new jD.Name("scope"),json:new jD.Name("json"),jsonPos:new jD.Name("jsonPos"),jsonLen:new jD.Name("jsonLen"),jsonPart:new jD.Name("jsonPart")};GI.default=i70});var p5=z((KI)=>{Object.defineProperty(KI,"__esModule",{value:!0});KI.extendErrors=KI.resetErrorsCount=KI.reportExtraError=KI.reportError=KI.keyword$DataError=KI.keywordError=void 0;var M0=t(),t$=z0(),fD=M1();KI.keywordError={message:({keyword:D})=>M0.str`must pass "${D}" keyword validation`};KI.keyword$DataError={message:({keyword:D,schemaType:F})=>F?M0.str`"${D}" keyword must be ${F} ($data)`:M0.str`"${D}" keyword is invalid ($data)`};function o70(D,F=KI.keywordError,$,J){let{it:Q}=D,{gen:Y,compositeRule:B,allErrors:X}=Q,G=qI(D,F,$);if(J!==null&&J!==void 0?J:B||X)WI(Y,G);else HI(Q,M0._`[${G}]`)}KI.reportError=o70;function s70(D,F=KI.keywordError,$){let{it:J}=D,{gen:Q,compositeRule:Y,allErrors:B}=J,X=qI(D,F,$);if(WI(Q,X),!(Y||B))HI(J,fD.default.vErrors)}KI.reportExtraError=s70;function r70(D,F){D.assign(fD.default.errors,F),D.if(M0._`${fD.default.vErrors} !== null`,()=>D.if(F,()=>D.assign(M0._`${fD.default.vErrors}.length`,F),()=>D.assign(fD.default.vErrors,null)))}KI.resetErrorsCount=r70;function t70({gen:D,keyword:F,schemaValue:$,data:J,errsCount:Q,it:Y}){if(Q===void 0)throw Error("ajv implementation error");let B=D.name("err");D.forRange("i",Q,fD.default.errors,(X)=>{if(D.const(B,M0._`${fD.default.vErrors}[${X}]`),D.if(M0._`${B}.instancePath === undefined`,()=>D.assign(M0._`${B}.instancePath`,(0,M0.strConcat)(fD.default.instancePath,Y.errorPath))),D.assign(M0._`${B}.schemaPath`,M0.str`${Y.errSchemaPath}/${F}`),Y.opts.verbose)D.assign(M0._`${B}.schema`,$),D.assign(M0._`${B}.data`,J)})}KI.extendErrors=t70;function WI(D,F){let $=D.const("err",F);D.if(M0._`${fD.default.vErrors} === null`,()=>D.assign(fD.default.vErrors,M0._`[${$}]`),M0._`${fD.default.vErrors}.push(${$})`),D.code(M0._`${fD.default.errors}++`)}function HI(D,F){let{gen:$,validateName:J,schemaEnv:Q}=D;if(Q.$async)$.throw(M0._`new ${D.ValidationError}(${F})`);else $.assign(M0._`${J}.errors`,F),$.return(!1)}var L4={keyword:new M0.Name("keyword"),schemaPath:new M0.Name("schemaPath"),params:new M0.Name("params"),propertyName:new M0.Name("propertyName"),message:new M0.Name("message"),schema:new M0.Name("schema"),parentSchema:new M0.Name("parentSchema")};function qI(D,F,$){let{createErrors:J}=D.it;if(J===!1)return M0._`{}`;return e70(D,F,$)}function e70(D,F,$={}){let{gen:J,it:Q}=D,Y=[D$0(Q,$),F$0(D,$)];return $$0(D,F,Y),J.object(...Y)}function D$0({errorPath:D},{instancePath:F}){let $=F?M0.str`${D}${(0,t$.getErrorPath)(F,t$.Type.Str)}`:D;return[fD.default.instancePath,(0,M0.strConcat)(fD.default.instancePath,$)]}function F$0({keyword:D,it:{errSchemaPath:F}},{schemaPath:$,parentSchema:J}){let Q=J?F:M0.str`${F}/${D}`;if($)Q=M0.str`${Q}${(0,t$.getErrorPath)($,t$.Type.Str)}`;return[L4.schemaPath,Q]}function $$0(D,{params:F,message:$},J){let{keyword:Q,data:Y,schemaValue:B,it:X}=D,{opts:G,propertyName:H,topSchemaRef:q,schemaPath:K}=X;if(J.push([L4.keyword,Q],[L4.params,typeof F=="function"?F(D):F||M0._`{}`]),G.messages)J.push([L4.message,typeof $=="function"?$(D):$]);if(G.verbose)J.push([L4.schema,B],[L4.parentSchema,M0._`${q}${K}`],[fD.default.data,Y]);if(H)J.push([L4.propertyName,H])}});var UI=z((VI)=>{Object.defineProperty(VI,"__esModule",{value:!0});VI.boolOrEmptySchema=VI.topBoolOrEmptySchema=void 0;var X$0=p5(),G$0=t(),W$0=M1(),H$0={message:"boolean schema is false"};function q$0(D){let{gen:F,schema:$,validateName:J}=D;if($===!1)EI(D,!1);else if(typeof $=="object"&&$.$async===!0)F.return(W$0.default.data);else F.assign(G$0._`${J}.errors`,null),F.return(!0)}VI.topBoolOrEmptySchema=q$0;function K$0(D,F){let{gen:$,schema:J}=D;if(J===!1)$.var(F,!1),EI(D);else $.var(F,!0)}VI.boolOrEmptySchema=K$0;function EI(D,F){let{gen:$,data:J}=D,Q={gen:$,keyword:"false schema",data:J,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:D};(0,X$0.reportError)(Q,H$0,void 0,F)}});var iX=z((LI)=>{Object.defineProperty(LI,"__esModule",{value:!0});LI.getRules=LI.isJSONType=void 0;var E$0=["string","number","integer","boolean","null","object","array"],V$0=new Set(E$0);function Z$0(D){return typeof D=="string"&&V$0.has(D)}LI.isJSONType=Z$0;function U$0(){let D={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...D,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},D.number,D.string,D.array,D.object],post:{rules:[]},all:{},keywords:{}}}LI.getRules=U$0});var aX=z((CI)=>{Object.defineProperty(CI,"__esModule",{value:!0});CI.shouldUseRule=CI.shouldUseGroup=CI.schemaHasRulesForType=void 0;function A$0({schema:D,self:F},$){let J=F.RULES.types[$];return J&&J!==!0&&MI(D,J)}CI.schemaHasRulesForType=A$0;function MI(D,F){return F.rules.some(($)=>NI(D,$))}CI.shouldUseGroup=MI;function NI(D,F){var $;return D[F.keyword]!==void 0||(($=F.definition.implements)===null||$===void 0?void 0:$.some((J)=>D[J]!==void 0))}CI.shouldUseRule=NI});var d5=z((jI)=>{Object.defineProperty(jI,"__esModule",{value:!0});jI.reportTypeError=jI.checkDataTypes=jI.checkDataType=jI.coerceAndCheckDataType=jI.getJSONTypes=jI.getSchemaTypes=jI.DataType=void 0;var C$0=iX(),R$0=aX(),O$0=p5(),G0=t(),OI=z0(),t3;(function(D){D[D.Correct=0]="Correct",D[D.Wrong=1]="Wrong"})(t3||(jI.DataType=t3={}));function w$0(D){let F=wI(D.type);if(F.includes("null")){if(D.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!F.length&&D.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(D.nullable===!0)F.push("null")}return F}jI.getSchemaTypes=w$0;function wI(D){let F=Array.isArray(D)?D:D?[D]:[];if(F.every(C$0.isJSONType))return F;throw Error("type must be JSONType or JSONType[]: "+F.join(","))}jI.getJSONTypes=wI;function T$0(D,F){let{gen:$,data:J,opts:Q}=D,Y=j$0(F,Q.coerceTypes),B=F.length>0&&!(Y.length===0&&F.length===1&&(0,R$0.schemaHasRulesForType)(D,F[0]));if(B){let X=sX(F,J,Q.strictNumbers,t3.Wrong);$.if(X,()=>{if(Y.length)P$0(D,F,Y);else rX(D)})}return B}jI.coerceAndCheckDataType=T$0;var TI=new Set(["string","number","integer","boolean","null"]);function j$0(D,F){return F?D.filter(($)=>TI.has($)||F==="array"&&$==="array"):[]}function P$0(D,F,$){let{gen:J,data:Q,opts:Y}=D,B=J.let("dataType",G0._`typeof ${Q}`),X=J.let("coerced",G0._`undefined`);if(Y.coerceTypes==="array")J.if(G0._`${B} == 'object' && Array.isArray(${Q}) && ${Q}.length == 1`,()=>J.assign(Q,G0._`${Q}[0]`).assign(B,G0._`typeof ${Q}`).if(sX(F,Q,Y.strictNumbers),()=>J.assign(X,Q)));J.if(G0._`${X} !== undefined`);for(let H of $)if(TI.has(H)||H==="array"&&Y.coerceTypes==="array")G(H);J.else(),rX(D),J.endIf(),J.if(G0._`${X} !== undefined`,()=>{J.assign(Q,X),I$0(D,X)});function G(H){switch(H){case"string":J.elseIf(G0._`${B} == "number" || ${B} == "boolean"`).assign(X,G0._`"" + ${Q}`).elseIf(G0._`${Q} === null`).assign(X,G0._`""`);return;case"number":J.elseIf(G0._`${B} == "boolean" || ${Q} === null
86
86
  || (${B} == "string" && ${Q} && ${Q} == +${Q})`).assign(X,G0._`+${Q}`);return;case"integer":J.elseIf(G0._`${B} === "boolean" || ${Q} === null
87
87
  || (${B} === "string" && ${Q} && ${Q} == +${Q} && !(${Q} % 1))`).assign(X,G0._`+${Q}`);return;case"boolean":J.elseIf(G0._`${Q} === "false" || ${Q} === 0 || ${Q} === null`).assign(X,!1).elseIf(G0._`${Q} === "true" || ${Q} === 1`).assign(X,!0);return;case"null":J.elseIf(G0._`${Q} === "" || ${Q} === 0 || ${Q} === false`),J.assign(X,null);return;case"array":J.elseIf(G0._`${B} === "string" || ${B} === "number"
88
- || ${B} === "boolean" || ${Q} === null`).assign(X,G0._`[${Q}]`)}}}function I$0({gen:D,parentData:F,parentDataProperty:$},J){D.if(G0._`${F} !== undefined`,()=>D.assign(G0._`${F}[${$}]`,J))}function oX(D,F,$,J=t3.Correct){let Q=J===t3.Correct?G0.operators.EQ:G0.operators.NEQ,Y;switch(D){case"null":return G0._`${F} ${Q} null`;case"array":Y=G0._`Array.isArray(${F})`;break;case"object":Y=G0._`${F} && typeof ${F} == "object" && !Array.isArray(${F})`;break;case"integer":Y=B(G0._`!(${F} % 1) && !isNaN(${F})`);break;case"number":Y=B();break;default:return G0._`typeof ${F} ${Q} ${D}`}return J===t3.Correct?Y:(0,G0.not)(Y);function B(X=G0.nil){return(0,G0.and)(G0._`typeof ${F} == "number"`,X,$?G0._`isFinite(${F})`:G0.nil)}}jI.checkDataType=oX;function sX(D,F,$,J){if(D.length===1)return oX(D[0],F,$,J);let Q,Y=(0,OI.toHash)(D);if(Y.array&&Y.object){let B=G0._`typeof ${F} != "object"`;Q=Y.null?B:G0._`!${F} || ${B}`,delete Y.null,delete Y.array,delete Y.object}else Q=G0.nil;if(Y.number)delete Y.integer;for(let B in Y)Q=(0,G0.and)(Q,oX(B,F,$,J));return Q}jI.checkDataTypes=sX;var S$0={message:({schema:D})=>`must be ${D}`,params:({schema:D,schemaValue:F})=>typeof D=="string"?G0._`{type: ${D}}`:G0._`{type: ${F}}`};function rX(D){let F=k$0(D);(0,O$0.reportError)(F,S$0)}jI.reportTypeError=rX;function k$0(D){let{gen:F,data:$,schema:J}=D,Q=(0,OI.schemaRefOrVal)(D,J,"type");return{gen:F,keyword:"type",data:$,schema:J.type,schemaCode:Q,schemaValue:Q,parentSchema:J,params:{},it:D}}});var vI=z((SI)=>{Object.defineProperty(SI,"__esModule",{value:!0});SI.assignDefaults=void 0;var e3=t(),h$0=z0();function b$0(D,F){let{properties:$,items:J}=D.schema;if(F==="object"&&$)for(let Q in $)II(D,Q,$[Q].default);else if(F==="array"&&Array.isArray(J))J.forEach((Q,Y)=>II(D,Y,Q.default))}SI.assignDefaults=b$0;function II(D,F,$){let{gen:J,compositeRule:Q,data:Y,opts:B}=D;if($===void 0)return;let X=e3._`${Y}${(0,e3.getProperty)(F)}`;if(Q){(0,h$0.checkStrictMode)(D,`default is ignored for: ${X}`);return}let G=e3._`${X} === undefined`;if(B.useDefaults==="empty")G=e3._`${G} || ${X} === null || ${X} === ""`;J.if(G,e3._`${X} = ${(0,e3.stringify)($)}`)}});var N1=z((_I)=>{Object.defineProperty(_I,"__esModule",{value:!0});_I.validateUnion=_I.validateArray=_I.usePattern=_I.callValidateCode=_I.schemaProperties=_I.allSchemaProperties=_I.noPropertyInData=_I.propertyInData=_I.isOwnProperty=_I.hasPropFunc=_I.reportMissingProp=_I.checkMissingProp=_I.checkReportMissingProp=void 0;var u0=t(),tX=z0(),f6=M1(),u$0=z0();function m$0(D,F){let{gen:$,data:J,it:Q}=D;$.if(DG($,J,F,Q.opts.ownProperties),()=>{D.setParams({missingProperty:u0._`${F}`},!0),D.error()})}_I.checkReportMissingProp=m$0;function l$0({gen:D,data:F,it:{opts:$}},J,Q){return(0,u0.or)(...J.map((Y)=>(0,u0.and)(DG(D,F,Y,$.ownProperties),u0._`${Q} = ${Y}`)))}_I.checkMissingProp=l$0;function p$0(D,F){D.setParams({missingProperty:F},!0),D.error()}_I.reportMissingProp=p$0;function yI(D){return D.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:u0._`Object.prototype.hasOwnProperty`})}_I.hasPropFunc=yI;function eX(D,F,$){return u0._`${yI(D)}.call(${F}, ${$})`}_I.isOwnProperty=eX;function d$0(D,F,$,J){let Q=u0._`${F}${(0,u0.getProperty)($)} !== undefined`;return J?u0._`${Q} && ${eX(D,F,$)}`:Q}_I.propertyInData=d$0;function DG(D,F,$,J){let Q=u0._`${F}${(0,u0.getProperty)($)} === undefined`;return J?(0,u0.or)(Q,(0,u0.not)(eX(D,F,$))):Q}_I.noPropertyInData=DG;function xI(D){return D?Object.keys(D).filter((F)=>F!=="__proto__"):[]}_I.allSchemaProperties=xI;function c$0(D,F){return xI(F).filter(($)=>!(0,tX.alwaysValidSchema)(D,F[$]))}_I.schemaProperties=c$0;function n$0({schemaCode:D,data:F,it:{gen:$,topSchemaRef:J,schemaPath:Q,errorPath:Y},it:B},X,G,H){let q=H?u0._`${D}, ${F}, ${J}${Q}`:F,K=[[f6.default.instancePath,(0,u0.strConcat)(f6.default.instancePath,Y)],[f6.default.parentData,B.parentData],[f6.default.parentDataProperty,B.parentDataProperty],[f6.default.rootData,f6.default.rootData]];if(B.opts.dynamicRef)K.push([f6.default.dynamicAnchors,f6.default.dynamicAnchors]);let V=u0._`${q}, ${$.object(...K)}`;return G!==u0.nil?u0._`${X}.call(${G}, ${V})`:u0._`${X}(${V})`}_I.callValidateCode=n$0;var i$0=u0._`new RegExp`;function a$0({gen:D,it:{opts:F}},$){let J=F.unicodeRegExp?"u":"",{regExp:Q}=F.code,Y=Q($,J);return D.scopeValue("pattern",{key:Y.toString(),ref:Y,code:u0._`${Q.code==="new RegExp"?i$0:(0,u$0.useFunc)(D,Q)}(${$}, ${J})`})}_I.usePattern=a$0;function o$0(D){let{gen:F,data:$,keyword:J,it:Q}=D,Y=F.name("valid");if(Q.allErrors){let X=F.let("valid",!0);return B(()=>F.assign(X,!1)),X}return F.var(Y,!0),B(()=>F.break()),Y;function B(X){let G=F.const("len",u0._`${$}.length`);F.forRange("i",0,G,(H)=>{D.subschema({keyword:J,dataProp:H,dataPropType:tX.Type.Num},Y),F.if((0,u0.not)(Y),X)})}}_I.validateArray=o$0;function s$0(D){let{gen:F,schema:$,keyword:J,it:Q}=D;if(!Array.isArray($))throw Error("ajv implementation error");if($.some((G)=>(0,tX.alwaysValidSchema)(Q,G))&&!Q.opts.unevaluated)return;let B=F.let("valid",!1),X=F.name("_valid");F.block(()=>$.forEach((G,H)=>{let q=D.subschema({keyword:J,schemaProp:H,compositeRule:!0},X);if(F.assign(B,u0._`${B} || ${X}`),!D.mergeValidEvaluated(q,X))F.if((0,u0.not)(B))})),D.result(B,()=>D.reset(),()=>D.error(!0))}_I.validateUnion=s$0});var mI=z((bI)=>{Object.defineProperty(bI,"__esModule",{value:!0});bI.validateKeywordUsage=bI.validSchemaType=bI.funcKeywordCode=bI.macroKeywordCode=void 0;var gD=t(),A4=M1(),WJ0=N1(),HJ0=p5();function qJ0(D,F){let{gen:$,keyword:J,schema:Q,parentSchema:Y,it:B}=D,X=F.macro.call(B.self,Q,Y,B),G=hI($,J,X);if(B.opts.validateSchema!==!1)B.self.validateSchema(X,!0);let H=$.name("valid");D.subschema({schema:X,schemaPath:gD.nil,errSchemaPath:`${B.errSchemaPath}/${J}`,topSchemaRef:G,compositeRule:!0},H),D.pass(H,()=>D.error(!0))}bI.macroKeywordCode=qJ0;function KJ0(D,F){var $;let{gen:J,keyword:Q,schema:Y,parentSchema:B,$data:X,it:G}=D;EJ0(G,F);let H=!X&&F.compile?F.compile.call(G.self,Y,B,G):F.validate,q=hI(J,Q,H),K=J.let("valid");D.block$data(K,V),D.ok(($=F.valid)!==null&&$!==void 0?$:K);function V(){if(F.errors===!1){if(L(),F.modifying)gI(D);A(()=>D.error())}else{let M=F.async?E():Z();if(F.modifying)gI(D);A(()=>zJ0(D,M))}}function E(){let M=J.let("ruleErrs",null);return J.try(()=>L(gD._`await `),(O)=>J.assign(K,!1).if(gD._`${O} instanceof ${G.ValidationError}`,()=>J.assign(M,gD._`${O}.errors`),()=>J.throw(O))),M}function Z(){let M=gD._`${q}.errors`;return J.assign(M,null),L(gD.nil),M}function L(M=F.async?gD._`await `:gD.nil){let O=G.opts.passContext?A4.default.this:A4.default.self,w=!(("compile"in F)&&!X||F.schema===!1);J.assign(K,gD._`${M}${(0,WJ0.callValidateCode)(D,q,O,w)}`,F.modifying)}function A(M){var O;J.if((0,gD.not)((O=F.valid)!==null&&O!==void 0?O:K),M)}}bI.funcKeywordCode=KJ0;function gI(D){let{gen:F,data:$,it:J}=D;F.if(J.parentData,()=>F.assign($,gD._`${J.parentData}[${J.parentDataProperty}]`))}function zJ0(D,F){let{gen:$}=D;$.if(gD._`Array.isArray(${F})`,()=>{$.assign(A4.default.vErrors,gD._`${A4.default.vErrors} === null ? ${F} : ${A4.default.vErrors}.concat(${F})`).assign(A4.default.errors,gD._`${A4.default.vErrors}.length`),(0,HJ0.extendErrors)(D)},()=>D.error())}function EJ0({schemaEnv:D},F){if(F.async&&!D.$async)throw Error("async keyword in sync schema")}function hI(D,F,$){if($===void 0)throw Error(`keyword "${F}" failed to compile`);return D.scopeValue("keyword",typeof $=="function"?{ref:$}:{ref:$,code:(0,gD.stringify)($)})}function VJ0(D,F,$=!1){return!F.length||F.some((J)=>J==="array"?Array.isArray(D):J==="object"?D&&typeof D=="object"&&!Array.isArray(D):typeof D==J||$&&typeof D>"u")}bI.validSchemaType=VJ0;function ZJ0({schema:D,opts:F,self:$,errSchemaPath:J},Q,Y){if(Array.isArray(Q.keyword)?!Q.keyword.includes(Y):Q.keyword!==Y)throw Error("ajv implementation error");let B=Q.dependencies;if(B===null||B===void 0?void 0:B.some((X)=>!Object.prototype.hasOwnProperty.call(D,X)))throw Error(`parent schema must have dependencies of ${Y}: ${B.join(",")}`);if(Q.validateSchema){if(!Q.validateSchema(D[Y])){let G=`keyword "${Y}" value is invalid at path "${J}": `+$.errorsText(Q.validateSchema.errors);if(F.validateSchema==="log")$.logger.error(G);else throw Error(G)}}}bI.validateKeywordUsage=ZJ0});var cI=z((pI)=>{Object.defineProperty(pI,"__esModule",{value:!0});pI.extendSubschemaMode=pI.extendSubschemaData=pI.getSubschema=void 0;var Z8=t(),lI=z0();function MJ0(D,{keyword:F,schemaProp:$,schema:J,schemaPath:Q,errSchemaPath:Y,topSchemaRef:B}){if(F!==void 0&&J!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(F!==void 0){let X=D.schema[F];return $===void 0?{schema:X,schemaPath:Z8._`${D.schemaPath}${(0,Z8.getProperty)(F)}`,errSchemaPath:`${D.errSchemaPath}/${F}`}:{schema:X[$],schemaPath:Z8._`${D.schemaPath}${(0,Z8.getProperty)(F)}${(0,Z8.getProperty)($)}`,errSchemaPath:`${D.errSchemaPath}/${F}/${(0,lI.escapeFragment)($)}`}}if(J!==void 0){if(Q===void 0||Y===void 0||B===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:J,schemaPath:Q,topSchemaRef:B,errSchemaPath:Y}}throw Error('either "keyword" or "schema" must be passed')}pI.getSubschema=MJ0;function NJ0(D,F,{dataProp:$,dataPropType:J,data:Q,dataTypes:Y,propertyName:B}){if(Q!==void 0&&$!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:X}=F;if($!==void 0){let{errorPath:H,dataPathArr:q,opts:K}=F,V=X.let("data",Z8._`${F.data}${(0,Z8.getProperty)($)}`,!0);G(V),D.errorPath=Z8.str`${H}${(0,lI.getErrorPath)($,J,K.jsPropertySyntax)}`,D.parentDataProperty=Z8._`${$}`,D.dataPathArr=[...q,D.parentDataProperty]}if(Q!==void 0){let H=Q instanceof Z8.Name?Q:X.let("data",Q,!0);if(G(H),B!==void 0)D.propertyName=B}if(Y)D.dataTypes=Y;function G(H){D.data=H,D.dataLevel=F.dataLevel+1,D.dataTypes=[],F.definedProperties=new Set,D.parentData=F.data,D.dataNames=[...F.dataNames,H]}}pI.extendSubschemaData=NJ0;function CJ0(D,{jtdDiscriminator:F,jtdMetadata:$,compositeRule:J,createErrors:Q,allErrors:Y}){if(J!==void 0)D.compositeRule=J;if(Q!==void 0)D.createErrors=Q;if(Y!==void 0)D.allErrors=Y;D.jtdDiscriminator=F,D.jtdMetadata=$}pI.extendSubschemaMode=CJ0});var FG=z((_T0,nI)=>{nI.exports=function D(F,$){if(F===$)return!0;if(F&&$&&typeof F=="object"&&typeof $=="object"){if(F.constructor!==$.constructor)return!1;var J,Q,Y;if(Array.isArray(F)){if(J=F.length,J!=$.length)return!1;for(Q=J;Q--!==0;)if(!D(F[Q],$[Q]))return!1;return!0}if(F.constructor===RegExp)return F.source===$.source&&F.flags===$.flags;if(F.valueOf!==Object.prototype.valueOf)return F.valueOf()===$.valueOf();if(F.toString!==Object.prototype.toString)return F.toString()===$.toString();if(Y=Object.keys(F),J=Y.length,J!==Object.keys($).length)return!1;for(Q=J;Q--!==0;)if(!Object.prototype.hasOwnProperty.call($,Y[Q]))return!1;for(Q=J;Q--!==0;){var B=Y[Q];if(!D(F[B],$[B]))return!1}return!0}return F!==F&&$!==$}});var aI=z((fT0,iI)=>{var g6=iI.exports=function(D,F,$){if(typeof F=="function")$=F,F={};$=F.cb||$;var J=typeof $=="function"?$:$.pre||function(){},Q=$.post||function(){};e$(F,J,Q,D,"",D)};g6.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};g6.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};g6.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};g6.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e$(D,F,$,J,Q,Y,B,X,G,H){if(J&&typeof J=="object"&&!Array.isArray(J)){F(J,Q,Y,B,X,G,H);for(var q in J){var K=J[q];if(Array.isArray(K)){if(q in g6.arrayKeywords)for(var V=0;V<K.length;V++)e$(D,F,$,K[V],Q+"/"+q+"/"+V,Y,Q,q,J,V)}else if(q in g6.propsKeywords){if(K&&typeof K=="object")for(var E in K)e$(D,F,$,K[E],Q+"/"+q+"/"+wJ0(E),Y,Q,q,J,E)}else if(q in g6.keywords||D.allKeys&&!(q in g6.skipKeywords))e$(D,F,$,K,Q+"/"+q,Y,Q,q,J)}$(J,Q,Y,B,X,G,H)}}function wJ0(D){return D.replace(/~/g,"~0").replace(/\//g,"~1")}});var c5=z((tI)=>{Object.defineProperty(tI,"__esModule",{value:!0});tI.getSchemaRefs=tI.resolveUrl=tI.normalizeId=tI._getFullPath=tI.getFullPath=tI.inlineRef=void 0;var TJ0=z0(),jJ0=FG(),PJ0=aI(),IJ0=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function SJ0(D,F=!0){if(typeof D=="boolean")return!0;if(F===!0)return!$G(D);if(!F)return!1;return oI(D)<=F}tI.inlineRef=SJ0;var kJ0=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function $G(D){for(let F in D){if(kJ0.has(F))return!0;let $=D[F];if(Array.isArray($)&&$.some($G))return!0;if(typeof $=="object"&&$G($))return!0}return!1}function oI(D){let F=0;for(let $ in D){if($==="$ref")return 1/0;if(F++,IJ0.has($))continue;if(typeof D[$]=="object")(0,TJ0.eachItem)(D[$],(J)=>F+=oI(J));if(F===1/0)return 1/0}return F}function sI(D,F="",$){if($!==!1)F=DF(F);let J=D.parse(F);return rI(D,J)}tI.getFullPath=sI;function rI(D,F){return D.serialize(F).split("#")[0]+"#"}tI._getFullPath=rI;var vJ0=/#\/?$/;function DF(D){return D?D.replace(vJ0,""):""}tI.normalizeId=DF;function yJ0(D,F,$){return $=DF($),D.resolve(F,$)}tI.resolveUrl=yJ0;var xJ0=/^[a-z_][-a-z0-9._]*$/i;function _J0(D,F){if(typeof D=="boolean")return{};let{schemaId:$,uriResolver:J}=this.opts,Q=DF(D[$]||F),Y={"":Q},B=sI(J,Q,!1),X={},G=new Set;return PJ0(D,{allKeys:!0},(K,V,E,Z)=>{if(Z===void 0)return;let L=B+V,A=Y[Z];if(typeof K[$]=="string")A=M.call(this,K[$]);O.call(this,K.$anchor),O.call(this,K.$dynamicAnchor),Y[V]=A;function M(w){let k=this.opts.uriResolver.resolve;if(w=DF(A?k(A,w):w),G.has(w))throw q(w);G.add(w);let R=this.refs[w];if(typeof R=="string")R=this.refs[R];if(typeof R=="object")H(K,R.schema,w);else if(w!==DF(L))if(w[0]==="#")H(K,X[w],w),X[w]=K;else this.refs[w]=L;return w}function O(w){if(typeof w=="string"){if(!xJ0.test(w))throw Error(`invalid anchor "${w}"`);M.call(this,`#${w}`)}}}),X;function H(K,V,E){if(V!==void 0&&!jJ0(K,V))throw q(E)}function q(K){return Error(`reference "${K}" resolves to more than one schema`)}}tI.getSchemaRefs=_J0});var FF=z((ES)=>{Object.defineProperty(ES,"__esModule",{value:!0});ES.getData=ES.KeywordCxt=ES.validateFunctionCode=void 0;var QS=UI(),DS=d5(),QG=aX(),DJ=d5(),mJ0=vI(),i5=mI(),JG=cI(),c=t(),o=M1(),lJ0=c5(),m8=z0(),n5=p5();function pJ0(D){if(XS(D)){if(GS(D),BS(D)){nJ0(D);return}}YS(D,()=>(0,QS.topBoolOrEmptySchema)(D))}ES.validateFunctionCode=pJ0;function YS({gen:D,validateName:F,schema:$,schemaEnv:J,opts:Q},Y){if(Q.code.es5)D.func(F,c._`${o.default.data}, ${o.default.valCxt}`,J.$async,()=>{D.code(c._`"use strict"; ${FS($,Q)}`),cJ0(D,Q),D.code(Y)});else D.func(F,c._`${o.default.data}, ${dJ0(Q)}`,J.$async,()=>D.code(FS($,Q)).code(Y))}function dJ0(D){return c._`{${o.default.instancePath}="", ${o.default.parentData}, ${o.default.parentDataProperty}, ${o.default.rootData}=${o.default.data}${D.dynamicRef?c._`, ${o.default.dynamicAnchors}={}`:c.nil}}={}`}function cJ0(D,F){D.if(o.default.valCxt,()=>{if(D.var(o.default.instancePath,c._`${o.default.valCxt}.${o.default.instancePath}`),D.var(o.default.parentData,c._`${o.default.valCxt}.${o.default.parentData}`),D.var(o.default.parentDataProperty,c._`${o.default.valCxt}.${o.default.parentDataProperty}`),D.var(o.default.rootData,c._`${o.default.valCxt}.${o.default.rootData}`),F.dynamicRef)D.var(o.default.dynamicAnchors,c._`${o.default.valCxt}.${o.default.dynamicAnchors}`)},()=>{if(D.var(o.default.instancePath,c._`""`),D.var(o.default.parentData,c._`undefined`),D.var(o.default.parentDataProperty,c._`undefined`),D.var(o.default.rootData,o.default.data),F.dynamicRef)D.var(o.default.dynamicAnchors,c._`{}`)})}function nJ0(D){let{schema:F,opts:$,gen:J}=D;YS(D,()=>{if($.$comment&&F.$comment)HS(D);if(rJ0(D),J.let(o.default.vErrors,null),J.let(o.default.errors,0),$.unevaluated)iJ0(D);WS(D),DQ0(D)});return}function iJ0(D){let{gen:F,validateName:$}=D;D.evaluated=F.const("evaluated",c._`${$}.evaluated`),F.if(c._`${D.evaluated}.dynamicProps`,()=>F.assign(c._`${D.evaluated}.props`,c._`undefined`)),F.if(c._`${D.evaluated}.dynamicItems`,()=>F.assign(c._`${D.evaluated}.items`,c._`undefined`))}function FS(D,F){let $=typeof D=="object"&&D[F.schemaId];return $&&(F.code.source||F.code.process)?c._`/*# sourceURL=${$} */`:c.nil}function aJ0(D,F){if(XS(D)){if(GS(D),BS(D)){oJ0(D,F);return}}(0,QS.boolOrEmptySchema)(D,F)}function BS({schema:D,self:F}){if(typeof D=="boolean")return!D;for(let $ in D)if(F.RULES.all[$])return!0;return!1}function XS(D){return typeof D.schema!="boolean"}function oJ0(D,F){let{schema:$,gen:J,opts:Q}=D;if(Q.$comment&&$.$comment)HS(D);tJ0(D),eJ0(D);let Y=J.const("_errs",o.default.errors);WS(D,Y),J.var(F,c._`${Y} === ${o.default.errors}`)}function GS(D){(0,m8.checkUnknownRules)(D),sJ0(D)}function WS(D,F){if(D.opts.jtd)return $S(D,[],!1,F);let $=(0,DS.getSchemaTypes)(D.schema),J=(0,DS.coerceAndCheckDataType)(D,$);$S(D,$,!J,F)}function sJ0(D){let{schema:F,errSchemaPath:$,opts:J,self:Q}=D;if(F.$ref&&J.ignoreKeywordsWithRef&&(0,m8.schemaHasRulesButRef)(F,Q.RULES))Q.logger.warn(`$ref: keywords ignored in schema at path "${$}"`)}function rJ0(D){let{schema:F,opts:$}=D;if(F.default!==void 0&&$.useDefaults&&$.strictSchema)(0,m8.checkStrictMode)(D,"default is ignored in the schema root")}function tJ0(D){let F=D.schema[D.opts.schemaId];if(F)D.baseId=(0,lJ0.resolveUrl)(D.opts.uriResolver,D.baseId,F)}function eJ0(D){if(D.schema.$async&&!D.schemaEnv.$async)throw Error("async schema in sync schema")}function HS({gen:D,schemaEnv:F,schema:$,errSchemaPath:J,opts:Q}){let Y=$.$comment;if(Q.$comment===!0)D.code(c._`${o.default.self}.logger.log(${Y})`);else if(typeof Q.$comment=="function"){let B=c.str`${J}/$comment`,X=D.scopeValue("root",{ref:F.root});D.code(c._`${o.default.self}.opts.$comment(${Y}, ${B}, ${X}.schema)`)}}function DQ0(D){let{gen:F,schemaEnv:$,validateName:J,ValidationError:Q,opts:Y}=D;if($.$async)F.if(c._`${o.default.errors} === 0`,()=>F.return(o.default.data),()=>F.throw(c._`new ${Q}(${o.default.vErrors})`));else{if(F.assign(c._`${J}.errors`,o.default.vErrors),Y.unevaluated)FQ0(D);F.return(c._`${o.default.errors} === 0`)}}function FQ0({gen:D,evaluated:F,props:$,items:J}){if($ instanceof c.Name)D.assign(c._`${F}.props`,$);if(J instanceof c.Name)D.assign(c._`${F}.items`,J)}function $S(D,F,$,J){let{gen:Q,schema:Y,data:B,allErrors:X,opts:G,self:H}=D,{RULES:q}=H;if(Y.$ref&&(G.ignoreKeywordsWithRef||!(0,m8.schemaHasRulesButRef)(Y,q))){Q.block(()=>KS(D,"$ref",q.all.$ref.definition));return}if(!G.jtd)$Q0(D,F);Q.block(()=>{for(let V of q.rules)K(V);K(q.post)});function K(V){if(!(0,QG.shouldUseGroup)(Y,V))return;if(V.type){if(Q.if((0,DJ.checkDataType)(V.type,B,G.strictNumbers)),JS(D,V),F.length===1&&F[0]===V.type&&$)Q.else(),(0,DJ.reportTypeError)(D);Q.endIf()}else JS(D,V);if(!X)Q.if(c._`${o.default.errors} === ${J||0}`)}}function JS(D,F){let{gen:$,schema:J,opts:{useDefaults:Q}}=D;if(Q)(0,mJ0.assignDefaults)(D,F.type);$.block(()=>{for(let Y of F.rules)if((0,QG.shouldUseRule)(J,Y))KS(D,Y.keyword,Y.definition,F.type)})}function $Q0(D,F){if(D.schemaEnv.meta||!D.opts.strictTypes)return;if(JQ0(D,F),!D.opts.allowUnionTypes)QQ0(D,F);YQ0(D,D.dataTypes)}function JQ0(D,F){if(!F.length)return;if(!D.dataTypes.length){D.dataTypes=F;return}F.forEach(($)=>{if(!qS(D.dataTypes,$))YG(D,`type "${$}" not allowed by context "${D.dataTypes.join(",")}"`)}),XQ0(D,F)}function QQ0(D,F){if(F.length>1&&!(F.length===2&&F.includes("null")))YG(D,"use allowUnionTypes to allow union type keyword")}function YQ0(D,F){let $=D.self.RULES.all;for(let J in $){let Q=$[J];if(typeof Q=="object"&&(0,QG.shouldUseRule)(D.schema,Q)){let{type:Y}=Q.definition;if(Y.length&&!Y.some((B)=>BQ0(F,B)))YG(D,`missing type "${Y.join(",")}" for keyword "${J}"`)}}}function BQ0(D,F){return D.includes(F)||F==="number"&&D.includes("integer")}function qS(D,F){return D.includes(F)||F==="integer"&&D.includes("number")}function XQ0(D,F){let $=[];for(let J of D.dataTypes)if(qS(F,J))$.push(J);else if(F.includes("integer")&&J==="number")$.push("integer");D.dataTypes=$}function YG(D,F){let $=D.schemaEnv.baseId+D.errSchemaPath;F+=` at "${$}" (strictTypes)`,(0,m8.checkStrictMode)(D,F,D.opts.strictTypes)}class BG{constructor(D,F,$){if((0,i5.validateKeywordUsage)(D,F,$),this.gen=D.gen,this.allErrors=D.allErrors,this.keyword=$,this.data=D.data,this.schema=D.schema[$],this.$data=F.$data&&D.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m8.schemaRefOrVal)(D,this.schema,$,this.$data),this.schemaType=F.schemaType,this.parentSchema=D.schema,this.params={},this.it=D,this.def=F,this.$data)this.schemaCode=D.gen.const("vSchema",zS(this.$data,D));else if(this.schemaCode=this.schemaValue,!(0,i5.validSchemaType)(this.schema,F.schemaType,F.allowUndefined))throw Error(`${$} value must be ${JSON.stringify(F.schemaType)}`);if("code"in F?F.trackErrors:F.errors!==!1)this.errsCount=D.gen.const("_errs",o.default.errors)}result(D,F,$){this.failResult((0,c.not)(D),F,$)}failResult(D,F,$){if(this.gen.if(D),$)$();else this.error();if(F){if(this.gen.else(),F(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(D,F){this.failResult((0,c.not)(D),void 0,F)}fail(D){if(D===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(D),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(D){if(!this.$data)return this.fail(D);let{schemaCode:F}=this;this.fail(c._`${F} !== undefined && (${(0,c.or)(this.invalid$data(),D)})`)}error(D,F,$){if(F){this.setParams(F),this._error(D,$),this.setParams({});return}this._error(D,$)}_error(D,F){(D?n5.reportExtraError:n5.reportError)(this,this.def.error,F)}$dataError(){(0,n5.reportError)(this,this.def.$dataError||n5.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,n5.resetErrorsCount)(this.gen,this.errsCount)}ok(D){if(!this.allErrors)this.gen.if(D)}setParams(D,F){if(F)Object.assign(this.params,D);else this.params=D}block$data(D,F,$=c.nil){this.gen.block(()=>{this.check$data(D,$),F()})}check$data(D=c.nil,F=c.nil){if(!this.$data)return;let{gen:$,schemaCode:J,schemaType:Q,def:Y}=this;if($.if((0,c.or)(c._`${J} === undefined`,F)),D!==c.nil)$.assign(D,!0);if(Q.length||Y.validateSchema){if($.elseIf(this.invalid$data()),this.$dataError(),D!==c.nil)$.assign(D,!1)}$.else()}invalid$data(){let{gen:D,schemaCode:F,schemaType:$,def:J,it:Q}=this;return(0,c.or)(Y(),B());function Y(){if($.length){if(!(F instanceof c.Name))throw Error("ajv implementation error");let X=Array.isArray($)?$:[$];return c._`${(0,DJ.checkDataTypes)(X,F,Q.opts.strictNumbers,DJ.DataType.Wrong)}`}return c.nil}function B(){if(J.validateSchema){let X=D.scopeValue("validate$data",{ref:J.validateSchema});return c._`!${X}(${F})`}return c.nil}}subschema(D,F){let $=(0,JG.getSubschema)(this.it,D);(0,JG.extendSubschemaData)($,this.it,D),(0,JG.extendSubschemaMode)($,D);let J={...this.it,...$,items:void 0,props:void 0};return aJ0(J,F),J}mergeEvaluated(D,F){let{it:$,gen:J}=this;if(!$.opts.unevaluated)return;if($.props!==!0&&D.props!==void 0)$.props=m8.mergeEvaluated.props(J,D.props,$.props,F);if($.items!==!0&&D.items!==void 0)$.items=m8.mergeEvaluated.items(J,D.items,$.items,F)}mergeValidEvaluated(D,F){let{it:$,gen:J}=this;if($.opts.unevaluated&&($.props!==!0||$.items!==!0))return J.if(F,()=>this.mergeEvaluated(D,c.Name)),!0}}ES.KeywordCxt=BG;function KS(D,F,$,J){let Q=new BG(D,$,F);if("code"in $)$.code(Q,J);else if(Q.$data&&$.validate)(0,i5.funcKeywordCode)(Q,$);else if("macro"in $)(0,i5.macroKeywordCode)(Q,$);else if($.compile||$.validate)(0,i5.funcKeywordCode)(Q,$)}var GQ0=/^\/(?:[^~]|~0|~1)*$/,WQ0=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function zS(D,{dataLevel:F,dataNames:$,dataPathArr:J}){let Q,Y;if(D==="")return o.default.rootData;if(D[0]==="/"){if(!GQ0.test(D))throw Error(`Invalid JSON-pointer: ${D}`);Q=D,Y=o.default.rootData}else{let H=WQ0.exec(D);if(!H)throw Error(`Invalid JSON-pointer: ${D}`);let q=+H[1];if(Q=H[2],Q==="#"){if(q>=F)throw Error(G("property/index",q));return J[F-q]}if(q>F)throw Error(G("data",q));if(Y=$[F-q],!Q)return Y}let B=Y,X=Q.split("/");for(let H of X)if(H)Y=c._`${Y}${(0,c.getProperty)((0,m8.unescapeJsonPointer)(H))}`,B=c._`${B} && ${Y}`;return B;function G(H,q){return`Cannot access ${H} ${q} levels up, current level is ${F}`}}ES.getData=zS});var a5=z((US)=>{Object.defineProperty(US,"__esModule",{value:!0});class ZS extends Error{constructor(D){super("validation failed");this.errors=D,this.ajv=this.validation=!0}}US.default=ZS});var $F=z((AS)=>{Object.defineProperty(AS,"__esModule",{value:!0});var XG=c5();class LS extends Error{constructor(D,F,$,J){super(J||`can't resolve reference ${$} from id ${F}`);this.missingRef=(0,XG.resolveUrl)(D,F,$),this.missingSchema=(0,XG.normalizeId)((0,XG.getFullPath)(D,this.missingRef))}}AS.default=LS});var s5=z((CS)=>{Object.defineProperty(CS,"__esModule",{value:!0});CS.resolveSchema=CS.getCompilingSchema=CS.resolveRef=CS.compileSchema=CS.SchemaEnv=void 0;var h1=t(),EQ0=a5(),M4=M1(),b1=c5(),MS=z0(),VQ0=FF();class o5{constructor(D){var F;this.refs={},this.dynamicAnchors={};let $;if(typeof D.schema=="object")$=D.schema;this.schema=D.schema,this.schemaId=D.schemaId,this.root=D.root||this,this.baseId=(F=D.baseId)!==null&&F!==void 0?F:(0,b1.normalizeId)($===null||$===void 0?void 0:$[D.schemaId||"$id"]),this.schemaPath=D.schemaPath,this.localRefs=D.localRefs,this.meta=D.meta,this.$async=$===null||$===void 0?void 0:$.$async,this.refs={}}}CS.SchemaEnv=o5;function WG(D){let F=NS.call(this,D);if(F)return F;let $=(0,b1.getFullPath)(this.opts.uriResolver,D.root.baseId),{es5:J,lines:Q}=this.opts.code,{ownProperties:Y}=this.opts,B=new h1.CodeGen(this.scope,{es5:J,lines:Q,ownProperties:Y}),X;if(D.$async)X=B.scopeValue("Error",{ref:EQ0.default,code:h1._`require("ajv/dist/runtime/validation_error").default`});let G=B.scopeName("validate");D.validateName=G;let H={gen:B,allErrors:this.opts.allErrors,data:M4.default.data,parentData:M4.default.parentData,parentDataProperty:M4.default.parentDataProperty,dataNames:[M4.default.data],dataPathArr:[h1.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:B.scopeValue("schema",this.opts.code.source===!0?{ref:D.schema,code:(0,h1.stringify)(D.schema)}:{ref:D.schema}),validateName:G,ValidationError:X,schema:D.schema,schemaEnv:D,rootId:$,baseId:D.baseId||$,schemaPath:h1.nil,errSchemaPath:D.schemaPath||(this.opts.jtd?"":"#"),errorPath:h1._`""`,opts:this.opts,self:this},q;try{this._compilations.add(D),(0,VQ0.validateFunctionCode)(H),B.optimize(this.opts.code.optimize);let K=B.toString();if(q=`${B.scopeRefs(M4.default.scope)}return ${K}`,this.opts.code.process)q=this.opts.code.process(q,D);let E=Function(`${M4.default.self}`,`${M4.default.scope}`,q)(this,this.scope.get());if(this.scope.value(G,{ref:E}),E.errors=null,E.schema=D.schema,E.schemaEnv=D,D.$async)E.$async=!0;if(this.opts.code.source===!0)E.source={validateName:G,validateCode:K,scopeValues:B._values};if(this.opts.unevaluated){let{props:Z,items:L}=H;if(E.evaluated={props:Z instanceof h1.Name?void 0:Z,items:L instanceof h1.Name?void 0:L,dynamicProps:Z instanceof h1.Name,dynamicItems:L instanceof h1.Name},E.source)E.source.evaluated=(0,h1.stringify)(E.evaluated)}return D.validate=E,D}catch(K){if(delete D.validate,delete D.validateName,q)this.logger.error("Error compiling schema, function code:",q);throw K}finally{this._compilations.delete(D)}}CS.compileSchema=WG;function ZQ0(D,F,$){var J;$=(0,b1.resolveUrl)(this.opts.uriResolver,F,$);let Q=D.refs[$];if(Q)return Q;let Y=AQ0.call(this,D,$);if(Y===void 0){let B=(J=D.localRefs)===null||J===void 0?void 0:J[$],{schemaId:X}=this.opts;if(B)Y=new o5({schema:B,schemaId:X,root:D,baseId:F})}if(Y===void 0)return;return D.refs[$]=UQ0.call(this,Y)}CS.resolveRef=ZQ0;function UQ0(D){if((0,b1.inlineRef)(D.schema,this.opts.inlineRefs))return D.schema;return D.validate?D:WG.call(this,D)}function NS(D){for(let F of this._compilations)if(LQ0(F,D))return F}CS.getCompilingSchema=NS;function LQ0(D,F){return D.schema===F.schema&&D.root===F.root&&D.baseId===F.baseId}function AQ0(D,F){let $;while(typeof($=this.refs[F])=="string")F=$;return $||this.schemas[F]||FJ.call(this,D,F)}function FJ(D,F){let $=this.opts.uriResolver.parse(F),J=(0,b1._getFullPath)(this.opts.uriResolver,$),Q=(0,b1.getFullPath)(this.opts.uriResolver,D.baseId,void 0);if(Object.keys(D.schema).length>0&&J===Q)return GG.call(this,$,D);let Y=(0,b1.normalizeId)(J),B=this.refs[Y]||this.schemas[Y];if(typeof B=="string"){let X=FJ.call(this,D,B);if(typeof(X===null||X===void 0?void 0:X.schema)!=="object")return;return GG.call(this,$,X)}if(typeof(B===null||B===void 0?void 0:B.schema)!=="object")return;if(!B.validate)WG.call(this,B);if(Y===(0,b1.normalizeId)(F)){let{schema:X}=B,{schemaId:G}=this.opts,H=X[G];if(H)Q=(0,b1.resolveUrl)(this.opts.uriResolver,Q,H);return new o5({schema:X,schemaId:G,root:D,baseId:Q})}return GG.call(this,$,B)}CS.resolveSchema=FJ;var MQ0=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function GG(D,{baseId:F,schema:$,root:J}){var Q;if(((Q=D.fragment)===null||Q===void 0?void 0:Q[0])!=="/")return;for(let X of D.fragment.slice(1).split("/")){if(typeof $==="boolean")return;let G=$[(0,MS.unescapeFragment)(X)];if(G===void 0)return;$=G;let H=typeof $==="object"&&$[this.opts.schemaId];if(!MQ0.has(X)&&H)F=(0,b1.resolveUrl)(this.opts.uriResolver,F,H)}let Y;if(typeof $!="boolean"&&$.$ref&&!(0,MS.schemaHasRulesButRef)($,this.RULES)){let X=(0,b1.resolveUrl)(this.opts.uriResolver,F,$.$ref);Y=FJ.call(this,J,X)}let{schemaId:B}=this.opts;if(Y=Y||new o5({schema:$,schemaId:B,root:J,baseId:F}),Y.schema!==Y.root.schema)return Y;return}});var OS=z((lT0,wQ0)=>{wQ0.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var qG=z((pT0,PS)=>{var TQ0=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),TS=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function HG(D){let F="",$=0,J=0;for(J=0;J<D.length;J++){if($=D[J].charCodeAt(0),$===48)continue;if(!($>=48&&$<=57||$>=65&&$<=70||$>=97&&$<=102))return"";F+=D[J];break}for(J+=1;J<D.length;J++){if($=D[J].charCodeAt(0),!($>=48&&$<=57||$>=65&&$<=70||$>=97&&$<=102))return"";F+=D[J]}return F}var jQ0=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function wS(D){return D.length=0,!0}function PQ0(D,F,$){if(D.length){let J=HG(D);if(J!=="")F.push(J);else return $.error=!0,!1;D.length=0}return!0}function IQ0(D){let F=0,$={error:!1,address:"",zone:""},J=[],Q=[],Y=!1,B=!1,X=PQ0;for(let G=0;G<D.length;G++){let H=D[G];if(H==="["||H==="]")continue;if(H===":"){if(Y===!0)B=!0;if(!X(Q,J,$))break;if(++F>7){$.error=!0;break}if(G>0&&D[G-1]===":")Y=!0;J.push(":");continue}else if(H==="%"){if(!X(Q,J,$))break;X=wS}else{Q.push(H);continue}}if(Q.length)if(X===wS)$.zone=Q.join("");else if(B)J.push(Q.join(""));else J.push(HG(Q));return $.address=J.join(""),$}function jS(D){if(SQ0(D,":")<2)return{host:D,isIPV6:!1};let F=IQ0(D);if(!F.error){let{address:$,address:J}=F;if(F.zone)$+="%"+F.zone,J+="%25"+F.zone;return{host:$,isIPV6:!0,escapedHost:J}}else return{host:D,isIPV6:!1}}function SQ0(D,F){let $=0;for(let J=0;J<D.length;J++)if(D[J]===F)$++;return $}function kQ0(D){let F=D,$=[],J=-1,Q=0;while(Q=F.length){if(Q===1)if(F===".")break;else if(F==="/"){$.push("/");break}else{$.push(F);break}else if(Q===2){if(F[0]==="."){if(F[1]===".")break;else if(F[1]==="/"){F=F.slice(2);continue}}else if(F[0]==="/"){if(F[1]==="."||F[1]==="/"){$.push("/");break}}}else if(Q===3){if(F==="/.."){if($.length!==0)$.pop();$.push("/");break}}if(F[0]==="."){if(F[1]==="."){if(F[2]==="/"){F=F.slice(3);continue}}else if(F[1]==="/"){F=F.slice(2);continue}}else if(F[0]==="/"){if(F[1]==="."){if(F[2]==="/"){F=F.slice(2);continue}else if(F[2]==="."){if(F[3]==="/"){if(F=F.slice(3),$.length!==0)$.pop();continue}}}}if((J=F.indexOf("/",1))===-1){$.push(F);break}else $.push(F.slice(0,J)),F=F.slice(J)}return $.join("")}function vQ0(D,F){let $=F!==!0?escape:unescape;if(D.scheme!==void 0)D.scheme=$(D.scheme);if(D.userinfo!==void 0)D.userinfo=$(D.userinfo);if(D.host!==void 0)D.host=$(D.host);if(D.path!==void 0)D.path=$(D.path);if(D.query!==void 0)D.query=$(D.query);if(D.fragment!==void 0)D.fragment=$(D.fragment);return D}function yQ0(D){let F=[];if(D.userinfo!==void 0)F.push(D.userinfo),F.push("@");if(D.host!==void 0){let $=unescape(D.host);if(!TS($)){let J=jS($);if(J.isIPV6===!0)$=`[${J.escapedHost}]`;else $=D.host}F.push($)}if(typeof D.port==="number"||typeof D.port==="string")F.push(":"),F.push(String(D.port));return F.length?F.join(""):void 0}PS.exports={nonSimpleDomain:jQ0,recomposeAuthority:yQ0,normalizeComponentEncoding:vQ0,removeDotSegments:kQ0,isIPv4:TS,isUUID:TQ0,normalizeIPv6:jS,stringArrayToHexStripped:HG}});var yS=z((dT0,vS)=>{var{isUUID:xQ0}=qG(),_Q0=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,fQ0=["http","https","ws","wss","urn","urn:uuid"];function gQ0(D){return fQ0.indexOf(D)!==-1}function KG(D){if(D.secure===!0)return!0;else if(D.secure===!1)return!1;else if(D.scheme)return D.scheme.length===3&&(D.scheme[0]==="w"||D.scheme[0]==="W")&&(D.scheme[1]==="s"||D.scheme[1]==="S")&&(D.scheme[2]==="s"||D.scheme[2]==="S");else return!1}function IS(D){if(!D.host)D.error=D.error||"HTTP URIs must have a host.";return D}function SS(D){let F=String(D.scheme).toLowerCase()==="https";if(D.port===(F?443:80)||D.port==="")D.port=void 0;if(!D.path)D.path="/";return D}function hQ0(D){return D.secure=KG(D),D.resourceName=(D.path||"/")+(D.query?"?"+D.query:""),D.path=void 0,D.query=void 0,D}function bQ0(D){if(D.port===(KG(D)?443:80)||D.port==="")D.port=void 0;if(typeof D.secure==="boolean")D.scheme=D.secure?"wss":"ws",D.secure=void 0;if(D.resourceName){let[F,$]=D.resourceName.split("?");D.path=F&&F!=="/"?F:void 0,D.query=$,D.resourceName=void 0}return D.fragment=void 0,D}function uQ0(D,F){if(!D.path)return D.error="URN can not be parsed",D;let $=D.path.match(_Q0);if($){let J=F.scheme||D.scheme||"urn";D.nid=$[1].toLowerCase(),D.nss=$[2];let Q=`${J}:${F.nid||D.nid}`,Y=zG(Q);if(D.path=void 0,Y)D=Y.parse(D,F)}else D.error=D.error||"URN can not be parsed.";return D}function mQ0(D,F){if(D.nid===void 0)throw Error("URN without nid cannot be serialized");let $=F.scheme||D.scheme||"urn",J=D.nid.toLowerCase(),Q=`${$}:${F.nid||J}`,Y=zG(Q);if(Y)D=Y.serialize(D,F);let B=D,X=D.nss;return B.path=`${J||F.nid}:${X}`,F.skipEscape=!0,B}function lQ0(D,F){let $=D;if($.uuid=$.nss,$.nss=void 0,!F.tolerant&&(!$.uuid||!xQ0($.uuid)))$.error=$.error||"UUID is not valid.";return $}function pQ0(D){let F=D;return F.nss=(D.uuid||"").toLowerCase(),F}var kS={scheme:"http",domainHost:!0,parse:IS,serialize:SS},dQ0={scheme:"https",domainHost:kS.domainHost,parse:IS,serialize:SS},$J={scheme:"ws",domainHost:!0,parse:hQ0,serialize:bQ0},cQ0={scheme:"wss",domainHost:$J.domainHost,parse:$J.parse,serialize:$J.serialize},nQ0={scheme:"urn",parse:uQ0,serialize:mQ0,skipNormalize:!0},iQ0={scheme:"urn:uuid",parse:lQ0,serialize:pQ0,skipNormalize:!0},JJ={http:kS,https:dQ0,ws:$J,wss:cQ0,urn:nQ0,"urn:uuid":iQ0};Object.setPrototypeOf(JJ,null);function zG(D){return D&&(JJ[D]||JJ[D.toLowerCase()])||void 0}vS.exports={wsIsSecure:KG,SCHEMES:JJ,isValidSchemeName:gQ0,getSchemeHandler:zG}});var fS=z((cT0,YJ)=>{var{normalizeIPv6:aQ0,removeDotSegments:r5,recomposeAuthority:oQ0,normalizeComponentEncoding:QJ,isIPv4:sQ0,nonSimpleDomain:rQ0}=qG(),{SCHEMES:tQ0,getSchemeHandler:xS}=yS();function eQ0(D,F){if(typeof D==="string")D=U8(l8(D,F),F);else if(typeof D==="object")D=l8(U8(D,F),F);return D}function DY0(D,F,$){let J=$?Object.assign({scheme:"null"},$):{scheme:"null"},Q=_S(l8(D,J),l8(F,J),J,!0);return J.skipEscape=!0,U8(Q,J)}function _S(D,F,$,J){let Q={};if(!J)D=l8(U8(D,$),$),F=l8(U8(F,$),$);if($=$||{},!$.tolerant&&F.scheme)Q.scheme=F.scheme,Q.userinfo=F.userinfo,Q.host=F.host,Q.port=F.port,Q.path=r5(F.path||""),Q.query=F.query;else{if(F.userinfo!==void 0||F.host!==void 0||F.port!==void 0)Q.userinfo=F.userinfo,Q.host=F.host,Q.port=F.port,Q.path=r5(F.path||""),Q.query=F.query;else{if(!F.path)if(Q.path=D.path,F.query!==void 0)Q.query=F.query;else Q.query=D.query;else{if(F.path[0]==="/")Q.path=r5(F.path);else{if((D.userinfo!==void 0||D.host!==void 0||D.port!==void 0)&&!D.path)Q.path="/"+F.path;else if(!D.path)Q.path=F.path;else Q.path=D.path.slice(0,D.path.lastIndexOf("/")+1)+F.path;Q.path=r5(Q.path)}Q.query=F.query}Q.userinfo=D.userinfo,Q.host=D.host,Q.port=D.port}Q.scheme=D.scheme}return Q.fragment=F.fragment,Q}function FY0(D,F,$){if(typeof D==="string")D=unescape(D),D=U8(QJ(l8(D,$),!0),{...$,skipEscape:!0});else if(typeof D==="object")D=U8(QJ(D,!0),{...$,skipEscape:!0});if(typeof F==="string")F=unescape(F),F=U8(QJ(l8(F,$),!0),{...$,skipEscape:!0});else if(typeof F==="object")F=U8(QJ(F,!0),{...$,skipEscape:!0});return D.toLowerCase()===F.toLowerCase()}function U8(D,F){let $={host:D.host,scheme:D.scheme,userinfo:D.userinfo,port:D.port,path:D.path,query:D.query,nid:D.nid,nss:D.nss,uuid:D.uuid,fragment:D.fragment,reference:D.reference,resourceName:D.resourceName,secure:D.secure,error:""},J=Object.assign({},F),Q=[],Y=xS(J.scheme||$.scheme);if(Y&&Y.serialize)Y.serialize($,J);if($.path!==void 0)if(!J.skipEscape){if($.path=escape($.path),$.scheme!==void 0)$.path=$.path.split("%3A").join(":")}else $.path=unescape($.path);if(J.reference!=="suffix"&&$.scheme)Q.push($.scheme,":");let B=oQ0($);if(B!==void 0){if(J.reference!=="suffix")Q.push("//");if(Q.push(B),$.path&&$.path[0]!=="/")Q.push("/")}if($.path!==void 0){let X=$.path;if(!J.absolutePath&&(!Y||!Y.absolutePath))X=r5(X);if(B===void 0&&X[0]==="/"&&X[1]==="/")X="/%2F"+X.slice(2);Q.push(X)}if($.query!==void 0)Q.push("?",$.query);if($.fragment!==void 0)Q.push("#",$.fragment);return Q.join("")}var $Y0=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function l8(D,F){let $=Object.assign({},F),J={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},Q=!1;if($.reference==="suffix")if($.scheme)D=$.scheme+":"+D;else D="//"+D;let Y=D.match($Y0);if(Y){if(J.scheme=Y[1],J.userinfo=Y[3],J.host=Y[4],J.port=parseInt(Y[5],10),J.path=Y[6]||"",J.query=Y[7],J.fragment=Y[8],isNaN(J.port))J.port=Y[5];if(J.host)if(sQ0(J.host)===!1){let G=aQ0(J.host);J.host=G.host.toLowerCase(),Q=G.isIPV6}else Q=!0;if(J.scheme===void 0&&J.userinfo===void 0&&J.host===void 0&&J.port===void 0&&J.query===void 0&&!J.path)J.reference="same-document";else if(J.scheme===void 0)J.reference="relative";else if(J.fragment===void 0)J.reference="absolute";else J.reference="uri";if($.reference&&$.reference!=="suffix"&&$.reference!==J.reference)J.error=J.error||"URI is not a "+$.reference+" reference.";let B=xS($.scheme||J.scheme);if(!$.unicodeSupport&&(!B||!B.unicodeSupport)){if(J.host&&($.domainHost||B&&B.domainHost)&&Q===!1&&rQ0(J.host))try{J.host=URL.domainToASCII(J.host.toLowerCase())}catch(X){J.error=J.error||"Host's domain name can not be converted to ASCII: "+X}}if(!B||B&&!B.skipNormalize){if(D.indexOf("%")!==-1){if(J.scheme!==void 0)J.scheme=unescape(J.scheme);if(J.host!==void 0)J.host=unescape(J.host)}if(J.path)J.path=escape(unescape(J.path));if(J.fragment)J.fragment=encodeURI(decodeURIComponent(J.fragment))}if(B&&B.parse)B.parse(J,$)}else J.error=J.error||"URI can not be parsed.";return J}var EG={SCHEMES:tQ0,normalize:eQ0,resolve:DY0,resolveComponent:_S,equal:FY0,serialize:U8,parse:l8};YJ.exports=EG;YJ.exports.default=EG;YJ.exports.fastUri=EG});var bS=z((hS)=>{Object.defineProperty(hS,"__esModule",{value:!0});var gS=fS();gS.code='require("ajv/dist/runtime/uri").default';hS.default=gS});var UG=z((p8)=>{Object.defineProperty(p8,"__esModule",{value:!0});p8.CodeGen=p8.Name=p8.nil=p8.stringify=p8.str=p8._=p8.KeywordCxt=void 0;var QY0=FF();Object.defineProperty(p8,"KeywordCxt",{enumerable:!0,get:function(){return QY0.KeywordCxt}});var JF=t();Object.defineProperty(p8,"_",{enumerable:!0,get:function(){return JF._}});Object.defineProperty(p8,"str",{enumerable:!0,get:function(){return JF.str}});Object.defineProperty(p8,"stringify",{enumerable:!0,get:function(){return JF.stringify}});Object.defineProperty(p8,"nil",{enumerable:!0,get:function(){return JF.nil}});Object.defineProperty(p8,"Name",{enumerable:!0,get:function(){return JF.Name}});Object.defineProperty(p8,"CodeGen",{enumerable:!0,get:function(){return JF.CodeGen}});var YY0=a5(),dS=$F(),BY0=iX(),t5=s5(),XY0=t(),e5=c5(),BJ=d5(),ZG=z0(),uS=OS(),GY0=bS(),cS=(D,F)=>new RegExp(D,F);cS.code="new RegExp";var WY0=["removeAdditional","useDefaults","coerceTypes"],HY0=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),qY0={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},KY0={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},mS=200;function zY0(D){var F,$,J,Q,Y,B,X,G,H,q,K,V,E,Z,L,A,M,O,w,k,R,j,y,d,W0;let F0=D.strict,O0=(F=D.code)===null||F===void 0?void 0:F.optimize,e=O0===!0||O0===void 0?1:O0||0,N0=(J=($=D.code)===null||$===void 0?void 0:$.regExp)!==null&&J!==void 0?J:cS,GD=(Q=D.uriResolver)!==null&&Q!==void 0?Q:GY0.default;return{strictSchema:(B=(Y=D.strictSchema)!==null&&Y!==void 0?Y:F0)!==null&&B!==void 0?B:!0,strictNumbers:(G=(X=D.strictNumbers)!==null&&X!==void 0?X:F0)!==null&&G!==void 0?G:!0,strictTypes:(q=(H=D.strictTypes)!==null&&H!==void 0?H:F0)!==null&&q!==void 0?q:"log",strictTuples:(V=(K=D.strictTuples)!==null&&K!==void 0?K:F0)!==null&&V!==void 0?V:"log",strictRequired:(Z=(E=D.strictRequired)!==null&&E!==void 0?E:F0)!==null&&Z!==void 0?Z:!1,code:D.code?{...D.code,optimize:e,regExp:N0}:{optimize:e,regExp:N0},loopRequired:(L=D.loopRequired)!==null&&L!==void 0?L:mS,loopEnum:(A=D.loopEnum)!==null&&A!==void 0?A:mS,meta:(M=D.meta)!==null&&M!==void 0?M:!0,messages:(O=D.messages)!==null&&O!==void 0?O:!0,inlineRefs:(w=D.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(k=D.schemaId)!==null&&k!==void 0?k:"$id",addUsedSchema:(R=D.addUsedSchema)!==null&&R!==void 0?R:!0,validateSchema:(j=D.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(y=D.validateFormats)!==null&&y!==void 0?y:!0,unicodeRegExp:(d=D.unicodeRegExp)!==null&&d!==void 0?d:!0,int32range:(W0=D.int32range)!==null&&W0!==void 0?W0:!0,uriResolver:GD}}class XJ{constructor(D={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,D=this.opts={...D,...zY0(D)};let{es5:F,lines:$}=this.opts.code;this.scope=new XY0.ValueScope({scope:{},prefixes:HY0,es5:F,lines:$}),this.logger=AY0(D.logger);let J=D.validateFormats;if(D.validateFormats=!1,this.RULES=(0,BY0.getRules)(),lS.call(this,qY0,D,"NOT SUPPORTED"),lS.call(this,KY0,D,"DEPRECATED","warn"),this._metaOpts=UY0.call(this),D.formats)VY0.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),D.keywords)ZY0.call(this,D.keywords);if(typeof D.meta=="object")this.addMetaSchema(D.meta);EY0.call(this),D.validateFormats=J}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:D,meta:F,schemaId:$}=this.opts,J=uS;if($==="id")J={...uS},J.id=J.$id,delete J.$id;if(F&&D)this.addMetaSchema(J,J[$],!1)}defaultMeta(){let{meta:D,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof D=="object"?D[F]||D:void 0}validate(D,F){let $;if(typeof D=="string"){if($=this.getSchema(D),!$)throw Error(`no schema with key or ref "${D}"`)}else $=this.compile(D);let J=$(F);if(!("$async"in $))this.errors=$.errors;return J}compile(D,F){let $=this._addSchema(D,F);return $.validate||this._compileSchemaEnv($)}compileAsync(D,F){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:$}=this.opts;return J.call(this,D,F);async function J(H,q){await Q.call(this,H.$schema);let K=this._addSchema(H,q);return K.validate||Y.call(this,K)}async function Q(H){if(H&&!this.getSchema(H))await J.call(this,{$ref:H},!0)}async function Y(H){try{return this._compileSchemaEnv(H)}catch(q){if(!(q instanceof dS.default))throw q;return B.call(this,q),await X.call(this,q.missingSchema),Y.call(this,H)}}function B({missingSchema:H,missingRef:q}){if(this.refs[H])throw Error(`AnySchema ${H} is loaded but ${q} cannot be resolved`)}async function X(H){let q=await G.call(this,H);if(!this.refs[H])await Q.call(this,q.$schema);if(!this.refs[H])this.addSchema(q,H,F)}async function G(H){let q=this._loading[H];if(q)return q;try{return await(this._loading[H]=$(H))}finally{delete this._loading[H]}}}addSchema(D,F,$,J=this.opts.validateSchema){if(Array.isArray(D)){for(let Y of D)this.addSchema(Y,void 0,$,J);return this}let Q;if(typeof D==="object"){let{schemaId:Y}=this.opts;if(Q=D[Y],Q!==void 0&&typeof Q!="string")throw Error(`schema ${Y} must be string`)}return F=(0,e5.normalizeId)(F||Q),this._checkUnique(F),this.schemas[F]=this._addSchema(D,$,F,J,!0),this}addMetaSchema(D,F,$=this.opts.validateSchema){return this.addSchema(D,F,!0,$),this}validateSchema(D,F){if(typeof D=="boolean")return!0;let $;if($=D.$schema,$!==void 0&&typeof $!="string")throw Error("$schema must be a string");if($=$||this.opts.defaultMeta||this.defaultMeta(),!$)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let J=this.validate($,D);if(!J&&F){let Q="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(Q);else throw Error(Q)}return J}getSchema(D){let F;while(typeof(F=pS.call(this,D))=="string")D=F;if(F===void 0){let{schemaId:$}=this.opts,J=new t5.SchemaEnv({schema:{},schemaId:$});if(F=t5.resolveSchema.call(this,J,D),!F)return;this.refs[D]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(D){if(D instanceof RegExp)return this._removeAllSchemas(this.schemas,D),this._removeAllSchemas(this.refs,D),this;switch(typeof D){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let F=pS.call(this,D);if(typeof F=="object")this._cache.delete(F.schema);return delete this.schemas[D],delete this.refs[D],this}case"object":{let F=D;this._cache.delete(F);let $=D[this.opts.schemaId];if($)$=(0,e5.normalizeId)($),delete this.schemas[$],delete this.refs[$];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(D){for(let F of D)this.addKeyword(F);return this}addKeyword(D,F){let $;if(typeof D=="string"){if($=D,typeof F=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=$}else if(typeof D=="object"&&F===void 0){if(F=D,$=F.keyword,Array.isArray($)&&!$.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(NY0.call(this,$,F),!F)return(0,ZG.eachItem)($,(Q)=>VG.call(this,Q)),this;RY0.call(this,F);let J={...F,type:(0,BJ.getJSONTypes)(F.type),schemaType:(0,BJ.getJSONTypes)(F.schemaType)};return(0,ZG.eachItem)($,J.type.length===0?(Q)=>VG.call(this,Q,J):(Q)=>J.type.forEach((Y)=>VG.call(this,Q,J,Y))),this}getKeyword(D){let F=this.RULES.all[D];return typeof F=="object"?F.definition:!!F}removeKeyword(D){let{RULES:F}=this;delete F.keywords[D],delete F.all[D];for(let $ of F.rules){let J=$.rules.findIndex((Q)=>Q.keyword===D);if(J>=0)$.rules.splice(J,1)}return this}addFormat(D,F){if(typeof F=="string")F=new RegExp(F);return this.formats[D]=F,this}errorsText(D=this.errors,{separator:F=", ",dataVar:$="data"}={}){if(!D||D.length===0)return"No errors";return D.map((J)=>`${$}${J.instancePath} ${J.message}`).reduce((J,Q)=>J+F+Q)}$dataMetaSchema(D,F){let $=this.RULES.all;D=JSON.parse(JSON.stringify(D));for(let J of F){let Q=J.split("/").slice(1),Y=D;for(let B of Q)Y=Y[B];for(let B in $){let X=$[B];if(typeof X!="object")continue;let{$data:G}=X.definition,H=Y[B];if(G&&H)Y[B]=nS(H)}}return D}_removeAllSchemas(D,F){for(let $ in D){let J=D[$];if(!F||F.test($)){if(typeof J=="string")delete D[$];else if(J&&!J.meta)this._cache.delete(J.schema),delete D[$]}}}_addSchema(D,F,$,J=this.opts.validateSchema,Q=this.opts.addUsedSchema){let Y,{schemaId:B}=this.opts;if(typeof D=="object")Y=D[B];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof D!="boolean")throw Error("schema must be object or boolean");let X=this._cache.get(D);if(X!==void 0)return X;$=(0,e5.normalizeId)(Y||$);let G=e5.getSchemaRefs.call(this,D,$);if(X=new t5.SchemaEnv({schema:D,schemaId:B,meta:F,baseId:$,localRefs:G}),this._cache.set(X.schema,X),Q&&!$.startsWith("#")){if($)this._checkUnique($);this.refs[$]=X}if(J)this.validateSchema(D,!0);return X}_checkUnique(D){if(this.schemas[D]||this.refs[D])throw Error(`schema with key or id "${D}" already exists`)}_compileSchemaEnv(D){if(D.meta)this._compileMetaSchema(D);else t5.compileSchema.call(this,D);if(!D.validate)throw Error("ajv implementation error");return D.validate}_compileMetaSchema(D){let F=this.opts;this.opts=this._metaOpts;try{t5.compileSchema.call(this,D)}finally{this.opts=F}}}XJ.ValidationError=YY0.default;XJ.MissingRefError=dS.default;p8.default=XJ;function lS(D,F,$,J="error"){for(let Q in D){let Y=Q;if(Y in F)this.logger[J](`${$}: option ${Q}. ${D[Y]}`)}}function pS(D){return D=(0,e5.normalizeId)(D),this.schemas[D]||this.refs[D]}function EY0(){let D=this.opts.schemas;if(!D)return;if(Array.isArray(D))this.addSchema(D);else for(let F in D)this.addSchema(D[F],F)}function VY0(){for(let D in this.opts.formats){let F=this.opts.formats[D];if(F)this.addFormat(D,F)}}function ZY0(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let F in D){let $=D[F];if(!$.keyword)$.keyword=F;this.addKeyword($)}}function UY0(){let D={...this.opts};for(let F of WY0)delete D[F];return D}var LY0={log(){},warn(){},error(){}};function AY0(D){if(D===!1)return LY0;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw Error("logger must implement log, warn and error methods")}var MY0=/^[a-z_$][a-z0-9_$:-]*$/i;function NY0(D,F){let{RULES:$}=this;if((0,ZG.eachItem)(D,(J)=>{if($.keywords[J])throw Error(`Keyword ${J} is already defined`);if(!MY0.test(J))throw Error(`Keyword ${J} has invalid name`)}),!F)return;if(F.$data&&!(("code"in F)||("validate"in F)))throw Error('$data keyword must have "code" or "validate" function')}function VG(D,F,$){var J;let Q=F===null||F===void 0?void 0:F.post;if($&&Q)throw Error('keyword with "post" flag cannot have "type"');let{RULES:Y}=this,B=Q?Y.post:Y.rules.find(({type:G})=>G===$);if(!B)B={type:$,rules:[]},Y.rules.push(B);if(Y.keywords[D]=!0,!F)return;let X={keyword:D,definition:{...F,type:(0,BJ.getJSONTypes)(F.type),schemaType:(0,BJ.getJSONTypes)(F.schemaType)}};if(F.before)CY0.call(this,B,X,F.before);else B.rules.push(X);Y.all[D]=X,(J=F.implements)===null||J===void 0||J.forEach((G)=>this.addKeyword(G))}function CY0(D,F,$){let J=D.rules.findIndex((Q)=>Q.keyword===$);if(J>=0)D.rules.splice(J,0,F);else D.rules.push(F),this.logger.warn(`rule ${$} is not defined`)}function RY0(D){let{metaSchema:F}=D;if(F===void 0)return;if(D.$data&&this.opts.$data)F=nS(F);D.validateSchema=this.compile(F,!0)}var OY0={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function nS(D){return{anyOf:[D,OY0]}}});var aS=z((iS)=>{Object.defineProperty(iS,"__esModule",{value:!0});var jY0={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};iS.default=jY0});var HJ=z((tS)=>{Object.defineProperty(tS,"__esModule",{value:!0});tS.callRef=tS.getValidate=void 0;var IY0=$F(),oS=N1(),sD=t(),QF=M1(),sS=s5(),GJ=z0(),SY0={keyword:"$ref",schemaType:"string",code(D){let{gen:F,schema:$,it:J}=D,{baseId:Q,schemaEnv:Y,validateName:B,opts:X,self:G}=J,{root:H}=Y;if(($==="#"||$==="#/")&&Q===H.baseId)return K();let q=sS.resolveRef.call(G,H,Q,$);if(q===void 0)throw new IY0.default(J.opts.uriResolver,Q,$);if(q instanceof sS.SchemaEnv)return V(q);return E(q);function K(){if(Y===H)return WJ(D,B,Y,Y.$async);let Z=F.scopeValue("root",{ref:H});return WJ(D,sD._`${Z}.validate`,H,H.$async)}function V(Z){let L=rS(D,Z);WJ(D,L,Z,Z.$async)}function E(Z){let L=F.scopeValue("schema",X.code.source===!0?{ref:Z,code:(0,sD.stringify)(Z)}:{ref:Z}),A=F.name("valid"),M=D.subschema({schema:Z,dataTypes:[],schemaPath:sD.nil,topSchemaRef:L,errSchemaPath:$},A);D.mergeEvaluated(M),D.ok(A)}}};function rS(D,F){let{gen:$}=D;return F.validate?$.scopeValue("validate",{ref:F.validate}):sD._`${$.scopeValue("wrapper",{ref:F})}.validate`}tS.getValidate=rS;function WJ(D,F,$,J){let{gen:Q,it:Y}=D,{allErrors:B,schemaEnv:X,opts:G}=Y,H=G.passContext?QF.default.this:sD.nil;if(J)q();else K();function q(){if(!X.$async)throw Error("async schema referenced by sync schema");let Z=Q.let("valid");Q.try(()=>{if(Q.code(sD._`await ${(0,oS.callValidateCode)(D,F,H)}`),E(F),!B)Q.assign(Z,!0)},(L)=>{if(Q.if(sD._`!(${L} instanceof ${Y.ValidationError})`,()=>Q.throw(L)),V(L),!B)Q.assign(Z,!1)}),D.ok(Z)}function K(){D.result((0,oS.callValidateCode)(D,F,H),()=>E(F),()=>V(F))}function V(Z){let L=sD._`${Z}.errors`;Q.assign(QF.default.vErrors,sD._`${QF.default.vErrors} === null ? ${L} : ${QF.default.vErrors}.concat(${L})`),Q.assign(QF.default.errors,sD._`${QF.default.vErrors}.length`)}function E(Z){var L;if(!Y.opts.unevaluated)return;let A=(L=$===null||$===void 0?void 0:$.validate)===null||L===void 0?void 0:L.evaluated;if(Y.props!==!0)if(A&&!A.dynamicProps){if(A.props!==void 0)Y.props=GJ.mergeEvaluated.props(Q,A.props,Y.props)}else{let M=Q.var("props",sD._`${Z}.evaluated.props`);Y.props=GJ.mergeEvaluated.props(Q,M,Y.props,sD.Name)}if(Y.items!==!0)if(A&&!A.dynamicItems){if(A.items!==void 0)Y.items=GJ.mergeEvaluated.items(Q,A.items,Y.items)}else{let M=Q.var("items",sD._`${Z}.evaluated.items`);Y.items=GJ.mergeEvaluated.items(Q,M,Y.items,sD.Name)}}}tS.callRef=WJ;tS.default=SY0});var LG=z((Dk)=>{Object.defineProperty(Dk,"__esModule",{value:!0});var yY0=aS(),xY0=HJ(),_Y0=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",yY0.default,xY0.default];Dk.default=_Y0});var $k=z((Fk)=>{Object.defineProperty(Fk,"__esModule",{value:!0});var qJ=t(),h6=qJ.operators,KJ={maximum:{okStr:"<=",ok:h6.LTE,fail:h6.GT},minimum:{okStr:">=",ok:h6.GTE,fail:h6.LT},exclusiveMaximum:{okStr:"<",ok:h6.LT,fail:h6.GTE},exclusiveMinimum:{okStr:">",ok:h6.GT,fail:h6.LTE}},gY0={message:({keyword:D,schemaCode:F})=>qJ.str`must be ${KJ[D].okStr} ${F}`,params:({keyword:D,schemaCode:F})=>qJ._`{comparison: ${KJ[D].okStr}, limit: ${F}}`},hY0={keyword:Object.keys(KJ),type:"number",schemaType:"number",$data:!0,error:gY0,code(D){let{keyword:F,data:$,schemaCode:J}=D;D.fail$data(qJ._`${$} ${KJ[F].fail} ${J} || isNaN(${$})`)}};Fk.default=hY0});var Qk=z((Jk)=>{Object.defineProperty(Jk,"__esModule",{value:!0});var D9=t(),uY0={message:({schemaCode:D})=>D9.str`must be multiple of ${D}`,params:({schemaCode:D})=>D9._`{multipleOf: ${D}}`},mY0={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:uY0,code(D){let{gen:F,data:$,schemaCode:J,it:Q}=D,Y=Q.opts.multipleOfPrecision,B=F.let("res"),X=Y?D9._`Math.abs(Math.round(${B}) - ${B}) > 1e-${Y}`:D9._`${B} !== parseInt(${B})`;D.fail$data(D9._`(${J} === 0 || (${B} = ${$}/${J}, ${X}))`)}};Jk.default=mY0});var Xk=z((Bk)=>{Object.defineProperty(Bk,"__esModule",{value:!0});function Yk(D){let F=D.length,$=0,J=0,Q;while(J<F)if($++,Q=D.charCodeAt(J++),Q>=55296&&Q<=56319&&J<F){if(Q=D.charCodeAt(J),(Q&64512)===56320)J++}return $}Bk.default=Yk;Yk.code='require("ajv/dist/runtime/ucs2length").default'});var Wk=z((Gk)=>{Object.defineProperty(Gk,"__esModule",{value:!0});var N4=t(),dY0=z0(),cY0=Xk(),nY0={message({keyword:D,schemaCode:F}){let $=D==="maxLength"?"more":"fewer";return N4.str`must NOT have ${$} than ${F} characters`},params:({schemaCode:D})=>N4._`{limit: ${D}}`},iY0={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:nY0,code(D){let{keyword:F,data:$,schemaCode:J,it:Q}=D,Y=F==="maxLength"?N4.operators.GT:N4.operators.LT,B=Q.opts.unicode===!1?N4._`${$}.length`:N4._`${(0,dY0.useFunc)(D.gen,cY0.default)}(${$})`;D.fail$data(N4._`${B} ${Y} ${J}`)}};Gk.default=iY0});var qk=z((Hk)=>{Object.defineProperty(Hk,"__esModule",{value:!0});var oY0=N1(),zJ=t(),sY0={message:({schemaCode:D})=>zJ.str`must match pattern "${D}"`,params:({schemaCode:D})=>zJ._`{pattern: ${D}}`},rY0={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:sY0,code(D){let{data:F,$data:$,schema:J,schemaCode:Q,it:Y}=D,B=Y.opts.unicodeRegExp?"u":"",X=$?zJ._`(new RegExp(${Q}, ${B}))`:(0,oY0.usePattern)(D,J);D.fail$data(zJ._`!${X}.test(${F})`)}};Hk.default=rY0});var zk=z((Kk)=>{Object.defineProperty(Kk,"__esModule",{value:!0});var F9=t(),eY0={message({keyword:D,schemaCode:F}){let $=D==="maxProperties"?"more":"fewer";return F9.str`must NOT have ${$} than ${F} properties`},params:({schemaCode:D})=>F9._`{limit: ${D}}`},DB0={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:eY0,code(D){let{keyword:F,data:$,schemaCode:J}=D,Q=F==="maxProperties"?F9.operators.GT:F9.operators.LT;D.fail$data(F9._`Object.keys(${$}).length ${Q} ${J}`)}};Kk.default=DB0});var Vk=z((Ek)=>{Object.defineProperty(Ek,"__esModule",{value:!0});var $9=N1(),J9=t(),$B0=z0(),JB0={message:({params:{missingProperty:D}})=>J9.str`must have required property '${D}'`,params:({params:{missingProperty:D}})=>J9._`{missingProperty: ${D}}`},QB0={keyword:"required",type:"object",schemaType:"array",$data:!0,error:JB0,code(D){let{gen:F,schema:$,schemaCode:J,data:Q,$data:Y,it:B}=D,{opts:X}=B;if(!Y&&$.length===0)return;let G=$.length>=X.loopRequired;if(B.allErrors)H();else q();if(X.strictRequired){let E=D.parentSchema.properties,{definedProperties:Z}=D.it;for(let L of $)if((E===null||E===void 0?void 0:E[L])===void 0&&!Z.has(L)){let A=B.schemaEnv.baseId+B.errSchemaPath,M=`required property "${L}" is not defined at "${A}" (strictRequired)`;(0,$B0.checkStrictMode)(B,M,B.opts.strictRequired)}}function H(){if(G||Y)D.block$data(J9.nil,K);else for(let E of $)(0,$9.checkReportMissingProp)(D,E)}function q(){let E=F.let("missing");if(G||Y){let Z=F.let("valid",!0);D.block$data(Z,()=>V(E,Z)),D.ok(Z)}else F.if((0,$9.checkMissingProp)(D,$,E)),(0,$9.reportMissingProp)(D,E),F.else()}function K(){F.forOf("prop",J,(E)=>{D.setParams({missingProperty:E}),F.if((0,$9.noPropertyInData)(F,Q,E,X.ownProperties),()=>D.error())})}function V(E,Z){D.setParams({missingProperty:E}),F.forOf(E,J,()=>{F.assign(Z,(0,$9.propertyInData)(F,Q,E,X.ownProperties)),F.if((0,J9.not)(Z),()=>{D.error(),F.break()})},J9.nil)}}};Ek.default=QB0});var Uk=z((Zk)=>{Object.defineProperty(Zk,"__esModule",{value:!0});var Q9=t(),BB0={message({keyword:D,schemaCode:F}){let $=D==="maxItems"?"more":"fewer";return Q9.str`must NOT have ${$} than ${F} items`},params:({schemaCode:D})=>Q9._`{limit: ${D}}`},XB0={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:BB0,code(D){let{keyword:F,data:$,schemaCode:J}=D,Q=F==="maxItems"?Q9.operators.GT:Q9.operators.LT;D.fail$data(Q9._`${$}.length ${Q} ${J}`)}};Zk.default=XB0});var EJ=z((Ak)=>{Object.defineProperty(Ak,"__esModule",{value:!0});var Lk=FG();Lk.code='require("ajv/dist/runtime/equal").default';Ak.default=Lk});var Nk=z((Mk)=>{Object.defineProperty(Mk,"__esModule",{value:!0});var AG=d5(),MD=t(),HB0=z0(),qB0=EJ(),KB0={message:({params:{i:D,j:F}})=>MD.str`must NOT have duplicate items (items ## ${F} and ${D} are identical)`,params:({params:{i:D,j:F}})=>MD._`{i: ${D}, j: ${F}}`},zB0={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:KB0,code(D){let{gen:F,data:$,$data:J,schema:Q,parentSchema:Y,schemaCode:B,it:X}=D;if(!J&&!Q)return;let G=F.let("valid"),H=Y.items?(0,AG.getSchemaTypes)(Y.items):[];D.block$data(G,q,MD._`${B} === false`),D.ok(G);function q(){let Z=F.let("i",MD._`${$}.length`),L=F.let("j");D.setParams({i:Z,j:L}),F.assign(G,!0),F.if(MD._`${Z} > 1`,()=>(K()?V:E)(Z,L))}function K(){return H.length>0&&!H.some((Z)=>Z==="object"||Z==="array")}function V(Z,L){let A=F.name("item"),M=(0,AG.checkDataTypes)(H,A,X.opts.strictNumbers,AG.DataType.Wrong),O=F.const("indices",MD._`{}`);F.for(MD._`;${Z}--;`,()=>{if(F.let(A,MD._`${$}[${Z}]`),F.if(M,MD._`continue`),H.length>1)F.if(MD._`typeof ${A} == "string"`,MD._`${A} += "_"`);F.if(MD._`typeof ${O}[${A}] == "number"`,()=>{F.assign(L,MD._`${O}[${A}]`),D.error(),F.assign(G,!1).break()}).code(MD._`${O}[${A}] = ${Z}`)})}function E(Z,L){let A=(0,HB0.useFunc)(F,qB0.default),M=F.name("outer");F.label(M).for(MD._`;${Z}--;`,()=>F.for(MD._`${L} = ${Z}; ${L}--;`,()=>F.if(MD._`${A}(${$}[${Z}], ${$}[${L}])`,()=>{D.error(),F.assign(G,!1).break(M)})))}}};Mk.default=zB0});var Rk=z((Ck)=>{Object.defineProperty(Ck,"__esModule",{value:!0});var MG=t(),VB0=z0(),ZB0=EJ(),UB0={message:"must be equal to constant",params:({schemaCode:D})=>MG._`{allowedValue: ${D}}`},LB0={keyword:"const",$data:!0,error:UB0,code(D){let{gen:F,data:$,$data:J,schemaCode:Q,schema:Y}=D;if(J||Y&&typeof Y=="object")D.fail$data(MG._`!${(0,VB0.useFunc)(F,ZB0.default)}(${$}, ${Q})`);else D.fail(MG._`${Y} !== ${$}`)}};Ck.default=LB0});var wk=z((Ok)=>{Object.defineProperty(Ok,"__esModule",{value:!0});var Y9=t(),MB0=z0(),NB0=EJ(),CB0={message:"must be equal to one of the allowed values",params:({schemaCode:D})=>Y9._`{allowedValues: ${D}}`},RB0={keyword:"enum",schemaType:"array",$data:!0,error:CB0,code(D){let{gen:F,data:$,$data:J,schema:Q,schemaCode:Y,it:B}=D;if(!J&&Q.length===0)throw Error("enum must have non-empty array");let X=Q.length>=B.opts.loopEnum,G,H=()=>G!==null&&G!==void 0?G:G=(0,MB0.useFunc)(F,NB0.default),q;if(X||J)q=F.let("valid"),D.block$data(q,K);else{if(!Array.isArray(Q))throw Error("ajv implementation error");let E=F.const("vSchema",Y);q=(0,Y9.or)(...Q.map((Z,L)=>V(E,L)))}D.pass(q);function K(){F.assign(q,!1),F.forOf("v",Y,(E)=>F.if(Y9._`${H()}(${$}, ${E})`,()=>F.assign(q,!0).break()))}function V(E,Z){let L=Q[Z];return typeof L==="object"&&L!==null?Y9._`${H()}(${$}, ${E}[${Z}])`:Y9._`${$} === ${L}`}}};Ok.default=RB0});var NG=z((Tk)=>{Object.defineProperty(Tk,"__esModule",{value:!0});var wB0=$k(),TB0=Qk(),jB0=Wk(),PB0=qk(),IB0=zk(),SB0=Vk(),kB0=Uk(),vB0=Nk(),yB0=Rk(),xB0=wk(),_B0=[wB0.default,TB0.default,jB0.default,PB0.default,IB0.default,SB0.default,kB0.default,vB0.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},yB0.default,xB0.default];Tk.default=_B0});var RG=z((Pk)=>{Object.defineProperty(Pk,"__esModule",{value:!0});Pk.validateAdditionalItems=void 0;var C4=t(),CG=z0(),gB0={message:({params:{len:D}})=>C4.str`must NOT have more than ${D} items`,params:({params:{len:D}})=>C4._`{limit: ${D}}`},hB0={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:gB0,code(D){let{parentSchema:F,it:$}=D,{items:J}=F;if(!Array.isArray(J)){(0,CG.checkStrictMode)($,'"additionalItems" is ignored when "items" is not an array of schemas');return}jk(D,J)}};function jk(D,F){let{gen:$,schema:J,data:Q,keyword:Y,it:B}=D;B.items=!0;let X=$.const("len",C4._`${Q}.length`);if(J===!1)D.setParams({len:F.length}),D.pass(C4._`${X} <= ${F.length}`);else if(typeof J=="object"&&!(0,CG.alwaysValidSchema)(B,J)){let H=$.var("valid",C4._`${X} <= ${F.length}`);$.if((0,C4.not)(H),()=>G(H)),D.ok(H)}function G(H){$.forRange("i",F.length,X,(q)=>{if(D.subschema({keyword:Y,dataProp:q,dataPropType:CG.Type.Num},H),!B.allErrors)$.if((0,C4.not)(H),()=>$.break())})}}Pk.validateAdditionalItems=jk;Pk.default=hB0});var OG=z((vk)=>{Object.defineProperty(vk,"__esModule",{value:!0});vk.validateTuple=void 0;var Sk=t(),VJ=z0(),uB0=N1(),mB0={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(D){let{schema:F,it:$}=D;if(Array.isArray(F))return kk(D,"additionalItems",F);if($.items=!0,(0,VJ.alwaysValidSchema)($,F))return;D.ok((0,uB0.validateArray)(D))}};function kk(D,F,$=D.schema){let{gen:J,parentSchema:Q,data:Y,keyword:B,it:X}=D;if(q(Q),X.opts.unevaluated&&$.length&&X.items!==!0)X.items=VJ.mergeEvaluated.items(J,$.length,X.items);let G=J.name("valid"),H=J.const("len",Sk._`${Y}.length`);$.forEach((K,V)=>{if((0,VJ.alwaysValidSchema)(X,K))return;J.if(Sk._`${H} > ${V}`,()=>D.subschema({keyword:B,schemaProp:V,dataProp:V},G)),D.ok(G)});function q(K){let{opts:V,errSchemaPath:E}=X,Z=$.length,L=Z===K.minItems&&(Z===K.maxItems||K[F]===!1);if(V.strictTuples&&!L){let A=`"${B}" is ${Z}-tuple, but minItems or maxItems/${F} are not specified or different at path "${E}"`;(0,VJ.checkStrictMode)(X,A,V.strictTuples)}}}vk.validateTuple=kk;vk.default=mB0});var _k=z((xk)=>{Object.defineProperty(xk,"__esModule",{value:!0});var pB0=OG(),dB0={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(D)=>(0,pB0.validateTuple)(D,"items")};xk.default=dB0});var hk=z((gk)=>{Object.defineProperty(gk,"__esModule",{value:!0});var fk=t(),nB0=z0(),iB0=N1(),aB0=RG(),oB0={message:({params:{len:D}})=>fk.str`must NOT have more than ${D} items`,params:({params:{len:D}})=>fk._`{limit: ${D}}`},sB0={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:oB0,code(D){let{schema:F,parentSchema:$,it:J}=D,{prefixItems:Q}=$;if(J.items=!0,(0,nB0.alwaysValidSchema)(J,F))return;if(Q)(0,aB0.validateAdditionalItems)(D,Q);else D.ok((0,iB0.validateArray)(D))}};gk.default=sB0});var uk=z((bk)=>{Object.defineProperty(bk,"__esModule",{value:!0});var C1=t(),ZJ=z0(),tB0={message:({params:{min:D,max:F}})=>F===void 0?C1.str`must contain at least ${D} valid item(s)`:C1.str`must contain at least ${D} and no more than ${F} valid item(s)`,params:({params:{min:D,max:F}})=>F===void 0?C1._`{minContains: ${D}}`:C1._`{minContains: ${D}, maxContains: ${F}}`},eB0={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:tB0,code(D){let{gen:F,schema:$,parentSchema:J,data:Q,it:Y}=D,B,X,{minContains:G,maxContains:H}=J;if(Y.opts.next)B=G===void 0?1:G,X=H;else B=1;let q=F.const("len",C1._`${Q}.length`);if(D.setParams({min:B,max:X}),X===void 0&&B===0){(0,ZJ.checkStrictMode)(Y,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(X!==void 0&&B>X){(0,ZJ.checkStrictMode)(Y,'"minContains" > "maxContains" is always invalid'),D.fail();return}if((0,ZJ.alwaysValidSchema)(Y,$)){let L=C1._`${q} >= ${B}`;if(X!==void 0)L=C1._`${L} && ${q} <= ${X}`;D.pass(L);return}Y.items=!0;let K=F.name("valid");if(X===void 0&&B===1)E(K,()=>F.if(K,()=>F.break()));else if(B===0){if(F.let(K,!0),X!==void 0)F.if(C1._`${Q}.length > 0`,V)}else F.let(K,!1),V();D.result(K,()=>D.reset());function V(){let L=F.name("_valid"),A=F.let("count",0);E(L,()=>F.if(L,()=>Z(A)))}function E(L,A){F.forRange("i",0,q,(M)=>{D.subschema({keyword:"contains",dataProp:M,dataPropType:ZJ.Type.Num,compositeRule:!0},L),A()})}function Z(L){if(F.code(C1._`${L}++`),X===void 0)F.if(C1._`${L} >= ${B}`,()=>F.assign(K,!0).break());else if(F.if(C1._`${L} > ${X}`,()=>F.assign(K,!1).break()),B===1)F.assign(K,!0);else F.if(C1._`${L} >= ${B}`,()=>F.assign(K,!0))}}};bk.default=eB0});var UJ=z((pk)=>{Object.defineProperty(pk,"__esModule",{value:!0});pk.validateSchemaDeps=pk.validatePropertyDeps=pk.error=void 0;var wG=t(),F20=z0(),B9=N1();pk.error={message:({params:{property:D,depsCount:F,deps:$}})=>{let J=F===1?"property":"properties";return wG.str`must have ${J} ${$} when property ${D} is present`},params:({params:{property:D,depsCount:F,deps:$,missingProperty:J}})=>wG._`{property: ${D},
88
+ || ${B} === "boolean" || ${Q} === null`).assign(X,G0._`[${Q}]`)}}}function I$0({gen:D,parentData:F,parentDataProperty:$},J){D.if(G0._`${F} !== undefined`,()=>D.assign(G0._`${F}[${$}]`,J))}function oX(D,F,$,J=t3.Correct){let Q=J===t3.Correct?G0.operators.EQ:G0.operators.NEQ,Y;switch(D){case"null":return G0._`${F} ${Q} null`;case"array":Y=G0._`Array.isArray(${F})`;break;case"object":Y=G0._`${F} && typeof ${F} == "object" && !Array.isArray(${F})`;break;case"integer":Y=B(G0._`!(${F} % 1) && !isNaN(${F})`);break;case"number":Y=B();break;default:return G0._`typeof ${F} ${Q} ${D}`}return J===t3.Correct?Y:(0,G0.not)(Y);function B(X=G0.nil){return(0,G0.and)(G0._`typeof ${F} == "number"`,X,$?G0._`isFinite(${F})`:G0.nil)}}jI.checkDataType=oX;function sX(D,F,$,J){if(D.length===1)return oX(D[0],F,$,J);let Q,Y=(0,OI.toHash)(D);if(Y.array&&Y.object){let B=G0._`typeof ${F} != "object"`;Q=Y.null?B:G0._`!${F} || ${B}`,delete Y.null,delete Y.array,delete Y.object}else Q=G0.nil;if(Y.number)delete Y.integer;for(let B in Y)Q=(0,G0.and)(Q,oX(B,F,$,J));return Q}jI.checkDataTypes=sX;var S$0={message:({schema:D})=>`must be ${D}`,params:({schema:D,schemaValue:F})=>typeof D=="string"?G0._`{type: ${D}}`:G0._`{type: ${F}}`};function rX(D){let F=k$0(D);(0,O$0.reportError)(F,S$0)}jI.reportTypeError=rX;function k$0(D){let{gen:F,data:$,schema:J}=D,Q=(0,OI.schemaRefOrVal)(D,J,"type");return{gen:F,keyword:"type",data:$,schema:J.type,schemaCode:Q,schemaValue:Q,parentSchema:J,params:{},it:D}}});var vI=z((SI)=>{Object.defineProperty(SI,"__esModule",{value:!0});SI.assignDefaults=void 0;var e3=t(),h$0=z0();function b$0(D,F){let{properties:$,items:J}=D.schema;if(F==="object"&&$)for(let Q in $)II(D,Q,$[Q].default);else if(F==="array"&&Array.isArray(J))J.forEach((Q,Y)=>II(D,Y,Q.default))}SI.assignDefaults=b$0;function II(D,F,$){let{gen:J,compositeRule:Q,data:Y,opts:B}=D;if($===void 0)return;let X=e3._`${Y}${(0,e3.getProperty)(F)}`;if(Q){(0,h$0.checkStrictMode)(D,`default is ignored for: ${X}`);return}let G=e3._`${X} === undefined`;if(B.useDefaults==="empty")G=e3._`${G} || ${X} === null || ${X} === ""`;J.if(G,e3._`${X} = ${(0,e3.stringify)($)}`)}});var N1=z((_I)=>{Object.defineProperty(_I,"__esModule",{value:!0});_I.validateUnion=_I.validateArray=_I.usePattern=_I.callValidateCode=_I.schemaProperties=_I.allSchemaProperties=_I.noPropertyInData=_I.propertyInData=_I.isOwnProperty=_I.hasPropFunc=_I.reportMissingProp=_I.checkMissingProp=_I.checkReportMissingProp=void 0;var u0=t(),tX=z0(),f6=M1(),u$0=z0();function m$0(D,F){let{gen:$,data:J,it:Q}=D;$.if(DG($,J,F,Q.opts.ownProperties),()=>{D.setParams({missingProperty:u0._`${F}`},!0),D.error()})}_I.checkReportMissingProp=m$0;function l$0({gen:D,data:F,it:{opts:$}},J,Q){return(0,u0.or)(...J.map((Y)=>(0,u0.and)(DG(D,F,Y,$.ownProperties),u0._`${Q} = ${Y}`)))}_I.checkMissingProp=l$0;function p$0(D,F){D.setParams({missingProperty:F},!0),D.error()}_I.reportMissingProp=p$0;function yI(D){return D.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:u0._`Object.prototype.hasOwnProperty`})}_I.hasPropFunc=yI;function eX(D,F,$){return u0._`${yI(D)}.call(${F}, ${$})`}_I.isOwnProperty=eX;function d$0(D,F,$,J){let Q=u0._`${F}${(0,u0.getProperty)($)} !== undefined`;return J?u0._`${Q} && ${eX(D,F,$)}`:Q}_I.propertyInData=d$0;function DG(D,F,$,J){let Q=u0._`${F}${(0,u0.getProperty)($)} === undefined`;return J?(0,u0.or)(Q,(0,u0.not)(eX(D,F,$))):Q}_I.noPropertyInData=DG;function xI(D){return D?Object.keys(D).filter((F)=>F!=="__proto__"):[]}_I.allSchemaProperties=xI;function c$0(D,F){return xI(F).filter(($)=>!(0,tX.alwaysValidSchema)(D,F[$]))}_I.schemaProperties=c$0;function n$0({schemaCode:D,data:F,it:{gen:$,topSchemaRef:J,schemaPath:Q,errorPath:Y},it:B},X,G,H){let q=H?u0._`${D}, ${F}, ${J}${Q}`:F,K=[[f6.default.instancePath,(0,u0.strConcat)(f6.default.instancePath,Y)],[f6.default.parentData,B.parentData],[f6.default.parentDataProperty,B.parentDataProperty],[f6.default.rootData,f6.default.rootData]];if(B.opts.dynamicRef)K.push([f6.default.dynamicAnchors,f6.default.dynamicAnchors]);let V=u0._`${q}, ${$.object(...K)}`;return G!==u0.nil?u0._`${X}.call(${G}, ${V})`:u0._`${X}(${V})`}_I.callValidateCode=n$0;var i$0=u0._`new RegExp`;function a$0({gen:D,it:{opts:F}},$){let J=F.unicodeRegExp?"u":"",{regExp:Q}=F.code,Y=Q($,J);return D.scopeValue("pattern",{key:Y.toString(),ref:Y,code:u0._`${Q.code==="new RegExp"?i$0:(0,u$0.useFunc)(D,Q)}(${$}, ${J})`})}_I.usePattern=a$0;function o$0(D){let{gen:F,data:$,keyword:J,it:Q}=D,Y=F.name("valid");if(Q.allErrors){let X=F.let("valid",!0);return B(()=>F.assign(X,!1)),X}return F.var(Y,!0),B(()=>F.break()),Y;function B(X){let G=F.const("len",u0._`${$}.length`);F.forRange("i",0,G,(H)=>{D.subschema({keyword:J,dataProp:H,dataPropType:tX.Type.Num},Y),F.if((0,u0.not)(Y),X)})}}_I.validateArray=o$0;function s$0(D){let{gen:F,schema:$,keyword:J,it:Q}=D;if(!Array.isArray($))throw Error("ajv implementation error");if($.some((G)=>(0,tX.alwaysValidSchema)(Q,G))&&!Q.opts.unevaluated)return;let B=F.let("valid",!1),X=F.name("_valid");F.block(()=>$.forEach((G,H)=>{let q=D.subschema({keyword:J,schemaProp:H,compositeRule:!0},X);if(F.assign(B,u0._`${B} || ${X}`),!D.mergeValidEvaluated(q,X))F.if((0,u0.not)(B))})),D.result(B,()=>D.reset(),()=>D.error(!0))}_I.validateUnion=s$0});var mI=z((bI)=>{Object.defineProperty(bI,"__esModule",{value:!0});bI.validateKeywordUsage=bI.validSchemaType=bI.funcKeywordCode=bI.macroKeywordCode=void 0;var gD=t(),A4=M1(),WJ0=N1(),HJ0=p5();function qJ0(D,F){let{gen:$,keyword:J,schema:Q,parentSchema:Y,it:B}=D,X=F.macro.call(B.self,Q,Y,B),G=hI($,J,X);if(B.opts.validateSchema!==!1)B.self.validateSchema(X,!0);let H=$.name("valid");D.subschema({schema:X,schemaPath:gD.nil,errSchemaPath:`${B.errSchemaPath}/${J}`,topSchemaRef:G,compositeRule:!0},H),D.pass(H,()=>D.error(!0))}bI.macroKeywordCode=qJ0;function KJ0(D,F){var $;let{gen:J,keyword:Q,schema:Y,parentSchema:B,$data:X,it:G}=D;EJ0(G,F);let H=!X&&F.compile?F.compile.call(G.self,Y,B,G):F.validate,q=hI(J,Q,H),K=J.let("valid");D.block$data(K,V),D.ok(($=F.valid)!==null&&$!==void 0?$:K);function V(){if(F.errors===!1){if(L(),F.modifying)gI(D);A(()=>D.error())}else{let M=F.async?E():Z();if(F.modifying)gI(D);A(()=>zJ0(D,M))}}function E(){let M=J.let("ruleErrs",null);return J.try(()=>L(gD._`await `),(R)=>J.assign(K,!1).if(gD._`${R} instanceof ${G.ValidationError}`,()=>J.assign(M,gD._`${R}.errors`),()=>J.throw(R))),M}function Z(){let M=gD._`${q}.errors`;return J.assign(M,null),L(gD.nil),M}function L(M=F.async?gD._`await `:gD.nil){let R=G.opts.passContext?A4.default.this:A4.default.self,w=!(("compile"in F)&&!X||F.schema===!1);J.assign(K,gD._`${M}${(0,WJ0.callValidateCode)(D,q,R,w)}`,F.modifying)}function A(M){var R;J.if((0,gD.not)((R=F.valid)!==null&&R!==void 0?R:K),M)}}bI.funcKeywordCode=KJ0;function gI(D){let{gen:F,data:$,it:J}=D;F.if(J.parentData,()=>F.assign($,gD._`${J.parentData}[${J.parentDataProperty}]`))}function zJ0(D,F){let{gen:$}=D;$.if(gD._`Array.isArray(${F})`,()=>{$.assign(A4.default.vErrors,gD._`${A4.default.vErrors} === null ? ${F} : ${A4.default.vErrors}.concat(${F})`).assign(A4.default.errors,gD._`${A4.default.vErrors}.length`),(0,HJ0.extendErrors)(D)},()=>D.error())}function EJ0({schemaEnv:D},F){if(F.async&&!D.$async)throw Error("async keyword in sync schema")}function hI(D,F,$){if($===void 0)throw Error(`keyword "${F}" failed to compile`);return D.scopeValue("keyword",typeof $=="function"?{ref:$}:{ref:$,code:(0,gD.stringify)($)})}function VJ0(D,F,$=!1){return!F.length||F.some((J)=>J==="array"?Array.isArray(D):J==="object"?D&&typeof D=="object"&&!Array.isArray(D):typeof D==J||$&&typeof D>"u")}bI.validSchemaType=VJ0;function ZJ0({schema:D,opts:F,self:$,errSchemaPath:J},Q,Y){if(Array.isArray(Q.keyword)?!Q.keyword.includes(Y):Q.keyword!==Y)throw Error("ajv implementation error");let B=Q.dependencies;if(B===null||B===void 0?void 0:B.some((X)=>!Object.prototype.hasOwnProperty.call(D,X)))throw Error(`parent schema must have dependencies of ${Y}: ${B.join(",")}`);if(Q.validateSchema){if(!Q.validateSchema(D[Y])){let G=`keyword "${Y}" value is invalid at path "${J}": `+$.errorsText(Q.validateSchema.errors);if(F.validateSchema==="log")$.logger.error(G);else throw Error(G)}}}bI.validateKeywordUsage=ZJ0});var cI=z((pI)=>{Object.defineProperty(pI,"__esModule",{value:!0});pI.extendSubschemaMode=pI.extendSubschemaData=pI.getSubschema=void 0;var Z8=t(),lI=z0();function MJ0(D,{keyword:F,schemaProp:$,schema:J,schemaPath:Q,errSchemaPath:Y,topSchemaRef:B}){if(F!==void 0&&J!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(F!==void 0){let X=D.schema[F];return $===void 0?{schema:X,schemaPath:Z8._`${D.schemaPath}${(0,Z8.getProperty)(F)}`,errSchemaPath:`${D.errSchemaPath}/${F}`}:{schema:X[$],schemaPath:Z8._`${D.schemaPath}${(0,Z8.getProperty)(F)}${(0,Z8.getProperty)($)}`,errSchemaPath:`${D.errSchemaPath}/${F}/${(0,lI.escapeFragment)($)}`}}if(J!==void 0){if(Q===void 0||Y===void 0||B===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:J,schemaPath:Q,topSchemaRef:B,errSchemaPath:Y}}throw Error('either "keyword" or "schema" must be passed')}pI.getSubschema=MJ0;function NJ0(D,F,{dataProp:$,dataPropType:J,data:Q,dataTypes:Y,propertyName:B}){if(Q!==void 0&&$!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:X}=F;if($!==void 0){let{errorPath:H,dataPathArr:q,opts:K}=F,V=X.let("data",Z8._`${F.data}${(0,Z8.getProperty)($)}`,!0);G(V),D.errorPath=Z8.str`${H}${(0,lI.getErrorPath)($,J,K.jsPropertySyntax)}`,D.parentDataProperty=Z8._`${$}`,D.dataPathArr=[...q,D.parentDataProperty]}if(Q!==void 0){let H=Q instanceof Z8.Name?Q:X.let("data",Q,!0);if(G(H),B!==void 0)D.propertyName=B}if(Y)D.dataTypes=Y;function G(H){D.data=H,D.dataLevel=F.dataLevel+1,D.dataTypes=[],F.definedProperties=new Set,D.parentData=F.data,D.dataNames=[...F.dataNames,H]}}pI.extendSubschemaData=NJ0;function CJ0(D,{jtdDiscriminator:F,jtdMetadata:$,compositeRule:J,createErrors:Q,allErrors:Y}){if(J!==void 0)D.compositeRule=J;if(Q!==void 0)D.createErrors=Q;if(Y!==void 0)D.allErrors=Y;D.jtdDiscriminator=F,D.jtdMetadata=$}pI.extendSubschemaMode=CJ0});var FG=z((_T0,nI)=>{nI.exports=function D(F,$){if(F===$)return!0;if(F&&$&&typeof F=="object"&&typeof $=="object"){if(F.constructor!==$.constructor)return!1;var J,Q,Y;if(Array.isArray(F)){if(J=F.length,J!=$.length)return!1;for(Q=J;Q--!==0;)if(!D(F[Q],$[Q]))return!1;return!0}if(F.constructor===RegExp)return F.source===$.source&&F.flags===$.flags;if(F.valueOf!==Object.prototype.valueOf)return F.valueOf()===$.valueOf();if(F.toString!==Object.prototype.toString)return F.toString()===$.toString();if(Y=Object.keys(F),J=Y.length,J!==Object.keys($).length)return!1;for(Q=J;Q--!==0;)if(!Object.prototype.hasOwnProperty.call($,Y[Q]))return!1;for(Q=J;Q--!==0;){var B=Y[Q];if(!D(F[B],$[B]))return!1}return!0}return F!==F&&$!==$}});var aI=z((fT0,iI)=>{var g6=iI.exports=function(D,F,$){if(typeof F=="function")$=F,F={};$=F.cb||$;var J=typeof $=="function"?$:$.pre||function(){},Q=$.post||function(){};e$(F,J,Q,D,"",D)};g6.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};g6.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};g6.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};g6.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e$(D,F,$,J,Q,Y,B,X,G,H){if(J&&typeof J=="object"&&!Array.isArray(J)){F(J,Q,Y,B,X,G,H);for(var q in J){var K=J[q];if(Array.isArray(K)){if(q in g6.arrayKeywords)for(var V=0;V<K.length;V++)e$(D,F,$,K[V],Q+"/"+q+"/"+V,Y,Q,q,J,V)}else if(q in g6.propsKeywords){if(K&&typeof K=="object")for(var E in K)e$(D,F,$,K[E],Q+"/"+q+"/"+wJ0(E),Y,Q,q,J,E)}else if(q in g6.keywords||D.allKeys&&!(q in g6.skipKeywords))e$(D,F,$,K,Q+"/"+q,Y,Q,q,J)}$(J,Q,Y,B,X,G,H)}}function wJ0(D){return D.replace(/~/g,"~0").replace(/\//g,"~1")}});var c5=z((tI)=>{Object.defineProperty(tI,"__esModule",{value:!0});tI.getSchemaRefs=tI.resolveUrl=tI.normalizeId=tI._getFullPath=tI.getFullPath=tI.inlineRef=void 0;var TJ0=z0(),jJ0=FG(),PJ0=aI(),IJ0=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function SJ0(D,F=!0){if(typeof D=="boolean")return!0;if(F===!0)return!$G(D);if(!F)return!1;return oI(D)<=F}tI.inlineRef=SJ0;var kJ0=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function $G(D){for(let F in D){if(kJ0.has(F))return!0;let $=D[F];if(Array.isArray($)&&$.some($G))return!0;if(typeof $=="object"&&$G($))return!0}return!1}function oI(D){let F=0;for(let $ in D){if($==="$ref")return 1/0;if(F++,IJ0.has($))continue;if(typeof D[$]=="object")(0,TJ0.eachItem)(D[$],(J)=>F+=oI(J));if(F===1/0)return 1/0}return F}function sI(D,F="",$){if($!==!1)F=DF(F);let J=D.parse(F);return rI(D,J)}tI.getFullPath=sI;function rI(D,F){return D.serialize(F).split("#")[0]+"#"}tI._getFullPath=rI;var vJ0=/#\/?$/;function DF(D){return D?D.replace(vJ0,""):""}tI.normalizeId=DF;function yJ0(D,F,$){return $=DF($),D.resolve(F,$)}tI.resolveUrl=yJ0;var xJ0=/^[a-z_][-a-z0-9._]*$/i;function _J0(D,F){if(typeof D=="boolean")return{};let{schemaId:$,uriResolver:J}=this.opts,Q=DF(D[$]||F),Y={"":Q},B=sI(J,Q,!1),X={},G=new Set;return PJ0(D,{allKeys:!0},(K,V,E,Z)=>{if(Z===void 0)return;let L=B+V,A=Y[Z];if(typeof K[$]=="string")A=M.call(this,K[$]);R.call(this,K.$anchor),R.call(this,K.$dynamicAnchor),Y[V]=A;function M(w){let k=this.opts.uriResolver.resolve;if(w=DF(A?k(A,w):w),G.has(w))throw q(w);G.add(w);let O=this.refs[w];if(typeof O=="string")O=this.refs[O];if(typeof O=="object")H(K,O.schema,w);else if(w!==DF(L))if(w[0]==="#")H(K,X[w],w),X[w]=K;else this.refs[w]=L;return w}function R(w){if(typeof w=="string"){if(!xJ0.test(w))throw Error(`invalid anchor "${w}"`);M.call(this,`#${w}`)}}}),X;function H(K,V,E){if(V!==void 0&&!jJ0(K,V))throw q(E)}function q(K){return Error(`reference "${K}" resolves to more than one schema`)}}tI.getSchemaRefs=_J0});var FF=z((ES)=>{Object.defineProperty(ES,"__esModule",{value:!0});ES.getData=ES.KeywordCxt=ES.validateFunctionCode=void 0;var QS=UI(),DS=d5(),QG=aX(),DJ=d5(),mJ0=vI(),i5=mI(),JG=cI(),c=t(),o=M1(),lJ0=c5(),m8=z0(),n5=p5();function pJ0(D){if(XS(D)){if(GS(D),BS(D)){nJ0(D);return}}YS(D,()=>(0,QS.topBoolOrEmptySchema)(D))}ES.validateFunctionCode=pJ0;function YS({gen:D,validateName:F,schema:$,schemaEnv:J,opts:Q},Y){if(Q.code.es5)D.func(F,c._`${o.default.data}, ${o.default.valCxt}`,J.$async,()=>{D.code(c._`"use strict"; ${FS($,Q)}`),cJ0(D,Q),D.code(Y)});else D.func(F,c._`${o.default.data}, ${dJ0(Q)}`,J.$async,()=>D.code(FS($,Q)).code(Y))}function dJ0(D){return c._`{${o.default.instancePath}="", ${o.default.parentData}, ${o.default.parentDataProperty}, ${o.default.rootData}=${o.default.data}${D.dynamicRef?c._`, ${o.default.dynamicAnchors}={}`:c.nil}}={}`}function cJ0(D,F){D.if(o.default.valCxt,()=>{if(D.var(o.default.instancePath,c._`${o.default.valCxt}.${o.default.instancePath}`),D.var(o.default.parentData,c._`${o.default.valCxt}.${o.default.parentData}`),D.var(o.default.parentDataProperty,c._`${o.default.valCxt}.${o.default.parentDataProperty}`),D.var(o.default.rootData,c._`${o.default.valCxt}.${o.default.rootData}`),F.dynamicRef)D.var(o.default.dynamicAnchors,c._`${o.default.valCxt}.${o.default.dynamicAnchors}`)},()=>{if(D.var(o.default.instancePath,c._`""`),D.var(o.default.parentData,c._`undefined`),D.var(o.default.parentDataProperty,c._`undefined`),D.var(o.default.rootData,o.default.data),F.dynamicRef)D.var(o.default.dynamicAnchors,c._`{}`)})}function nJ0(D){let{schema:F,opts:$,gen:J}=D;YS(D,()=>{if($.$comment&&F.$comment)HS(D);if(rJ0(D),J.let(o.default.vErrors,null),J.let(o.default.errors,0),$.unevaluated)iJ0(D);WS(D),DQ0(D)});return}function iJ0(D){let{gen:F,validateName:$}=D;D.evaluated=F.const("evaluated",c._`${$}.evaluated`),F.if(c._`${D.evaluated}.dynamicProps`,()=>F.assign(c._`${D.evaluated}.props`,c._`undefined`)),F.if(c._`${D.evaluated}.dynamicItems`,()=>F.assign(c._`${D.evaluated}.items`,c._`undefined`))}function FS(D,F){let $=typeof D=="object"&&D[F.schemaId];return $&&(F.code.source||F.code.process)?c._`/*# sourceURL=${$} */`:c.nil}function aJ0(D,F){if(XS(D)){if(GS(D),BS(D)){oJ0(D,F);return}}(0,QS.boolOrEmptySchema)(D,F)}function BS({schema:D,self:F}){if(typeof D=="boolean")return!D;for(let $ in D)if(F.RULES.all[$])return!0;return!1}function XS(D){return typeof D.schema!="boolean"}function oJ0(D,F){let{schema:$,gen:J,opts:Q}=D;if(Q.$comment&&$.$comment)HS(D);tJ0(D),eJ0(D);let Y=J.const("_errs",o.default.errors);WS(D,Y),J.var(F,c._`${Y} === ${o.default.errors}`)}function GS(D){(0,m8.checkUnknownRules)(D),sJ0(D)}function WS(D,F){if(D.opts.jtd)return $S(D,[],!1,F);let $=(0,DS.getSchemaTypes)(D.schema),J=(0,DS.coerceAndCheckDataType)(D,$);$S(D,$,!J,F)}function sJ0(D){let{schema:F,errSchemaPath:$,opts:J,self:Q}=D;if(F.$ref&&J.ignoreKeywordsWithRef&&(0,m8.schemaHasRulesButRef)(F,Q.RULES))Q.logger.warn(`$ref: keywords ignored in schema at path "${$}"`)}function rJ0(D){let{schema:F,opts:$}=D;if(F.default!==void 0&&$.useDefaults&&$.strictSchema)(0,m8.checkStrictMode)(D,"default is ignored in the schema root")}function tJ0(D){let F=D.schema[D.opts.schemaId];if(F)D.baseId=(0,lJ0.resolveUrl)(D.opts.uriResolver,D.baseId,F)}function eJ0(D){if(D.schema.$async&&!D.schemaEnv.$async)throw Error("async schema in sync schema")}function HS({gen:D,schemaEnv:F,schema:$,errSchemaPath:J,opts:Q}){let Y=$.$comment;if(Q.$comment===!0)D.code(c._`${o.default.self}.logger.log(${Y})`);else if(typeof Q.$comment=="function"){let B=c.str`${J}/$comment`,X=D.scopeValue("root",{ref:F.root});D.code(c._`${o.default.self}.opts.$comment(${Y}, ${B}, ${X}.schema)`)}}function DQ0(D){let{gen:F,schemaEnv:$,validateName:J,ValidationError:Q,opts:Y}=D;if($.$async)F.if(c._`${o.default.errors} === 0`,()=>F.return(o.default.data),()=>F.throw(c._`new ${Q}(${o.default.vErrors})`));else{if(F.assign(c._`${J}.errors`,o.default.vErrors),Y.unevaluated)FQ0(D);F.return(c._`${o.default.errors} === 0`)}}function FQ0({gen:D,evaluated:F,props:$,items:J}){if($ instanceof c.Name)D.assign(c._`${F}.props`,$);if(J instanceof c.Name)D.assign(c._`${F}.items`,J)}function $S(D,F,$,J){let{gen:Q,schema:Y,data:B,allErrors:X,opts:G,self:H}=D,{RULES:q}=H;if(Y.$ref&&(G.ignoreKeywordsWithRef||!(0,m8.schemaHasRulesButRef)(Y,q))){Q.block(()=>KS(D,"$ref",q.all.$ref.definition));return}if(!G.jtd)$Q0(D,F);Q.block(()=>{for(let V of q.rules)K(V);K(q.post)});function K(V){if(!(0,QG.shouldUseGroup)(Y,V))return;if(V.type){if(Q.if((0,DJ.checkDataType)(V.type,B,G.strictNumbers)),JS(D,V),F.length===1&&F[0]===V.type&&$)Q.else(),(0,DJ.reportTypeError)(D);Q.endIf()}else JS(D,V);if(!X)Q.if(c._`${o.default.errors} === ${J||0}`)}}function JS(D,F){let{gen:$,schema:J,opts:{useDefaults:Q}}=D;if(Q)(0,mJ0.assignDefaults)(D,F.type);$.block(()=>{for(let Y of F.rules)if((0,QG.shouldUseRule)(J,Y))KS(D,Y.keyword,Y.definition,F.type)})}function $Q0(D,F){if(D.schemaEnv.meta||!D.opts.strictTypes)return;if(JQ0(D,F),!D.opts.allowUnionTypes)QQ0(D,F);YQ0(D,D.dataTypes)}function JQ0(D,F){if(!F.length)return;if(!D.dataTypes.length){D.dataTypes=F;return}F.forEach(($)=>{if(!qS(D.dataTypes,$))YG(D,`type "${$}" not allowed by context "${D.dataTypes.join(",")}"`)}),XQ0(D,F)}function QQ0(D,F){if(F.length>1&&!(F.length===2&&F.includes("null")))YG(D,"use allowUnionTypes to allow union type keyword")}function YQ0(D,F){let $=D.self.RULES.all;for(let J in $){let Q=$[J];if(typeof Q=="object"&&(0,QG.shouldUseRule)(D.schema,Q)){let{type:Y}=Q.definition;if(Y.length&&!Y.some((B)=>BQ0(F,B)))YG(D,`missing type "${Y.join(",")}" for keyword "${J}"`)}}}function BQ0(D,F){return D.includes(F)||F==="number"&&D.includes("integer")}function qS(D,F){return D.includes(F)||F==="integer"&&D.includes("number")}function XQ0(D,F){let $=[];for(let J of D.dataTypes)if(qS(F,J))$.push(J);else if(F.includes("integer")&&J==="number")$.push("integer");D.dataTypes=$}function YG(D,F){let $=D.schemaEnv.baseId+D.errSchemaPath;F+=` at "${$}" (strictTypes)`,(0,m8.checkStrictMode)(D,F,D.opts.strictTypes)}class BG{constructor(D,F,$){if((0,i5.validateKeywordUsage)(D,F,$),this.gen=D.gen,this.allErrors=D.allErrors,this.keyword=$,this.data=D.data,this.schema=D.schema[$],this.$data=F.$data&&D.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m8.schemaRefOrVal)(D,this.schema,$,this.$data),this.schemaType=F.schemaType,this.parentSchema=D.schema,this.params={},this.it=D,this.def=F,this.$data)this.schemaCode=D.gen.const("vSchema",zS(this.$data,D));else if(this.schemaCode=this.schemaValue,!(0,i5.validSchemaType)(this.schema,F.schemaType,F.allowUndefined))throw Error(`${$} value must be ${JSON.stringify(F.schemaType)}`);if("code"in F?F.trackErrors:F.errors!==!1)this.errsCount=D.gen.const("_errs",o.default.errors)}result(D,F,$){this.failResult((0,c.not)(D),F,$)}failResult(D,F,$){if(this.gen.if(D),$)$();else this.error();if(F){if(this.gen.else(),F(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(D,F){this.failResult((0,c.not)(D),void 0,F)}fail(D){if(D===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(D),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(D){if(!this.$data)return this.fail(D);let{schemaCode:F}=this;this.fail(c._`${F} !== undefined && (${(0,c.or)(this.invalid$data(),D)})`)}error(D,F,$){if(F){this.setParams(F),this._error(D,$),this.setParams({});return}this._error(D,$)}_error(D,F){(D?n5.reportExtraError:n5.reportError)(this,this.def.error,F)}$dataError(){(0,n5.reportError)(this,this.def.$dataError||n5.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,n5.resetErrorsCount)(this.gen,this.errsCount)}ok(D){if(!this.allErrors)this.gen.if(D)}setParams(D,F){if(F)Object.assign(this.params,D);else this.params=D}block$data(D,F,$=c.nil){this.gen.block(()=>{this.check$data(D,$),F()})}check$data(D=c.nil,F=c.nil){if(!this.$data)return;let{gen:$,schemaCode:J,schemaType:Q,def:Y}=this;if($.if((0,c.or)(c._`${J} === undefined`,F)),D!==c.nil)$.assign(D,!0);if(Q.length||Y.validateSchema){if($.elseIf(this.invalid$data()),this.$dataError(),D!==c.nil)$.assign(D,!1)}$.else()}invalid$data(){let{gen:D,schemaCode:F,schemaType:$,def:J,it:Q}=this;return(0,c.or)(Y(),B());function Y(){if($.length){if(!(F instanceof c.Name))throw Error("ajv implementation error");let X=Array.isArray($)?$:[$];return c._`${(0,DJ.checkDataTypes)(X,F,Q.opts.strictNumbers,DJ.DataType.Wrong)}`}return c.nil}function B(){if(J.validateSchema){let X=D.scopeValue("validate$data",{ref:J.validateSchema});return c._`!${X}(${F})`}return c.nil}}subschema(D,F){let $=(0,JG.getSubschema)(this.it,D);(0,JG.extendSubschemaData)($,this.it,D),(0,JG.extendSubschemaMode)($,D);let J={...this.it,...$,items:void 0,props:void 0};return aJ0(J,F),J}mergeEvaluated(D,F){let{it:$,gen:J}=this;if(!$.opts.unevaluated)return;if($.props!==!0&&D.props!==void 0)$.props=m8.mergeEvaluated.props(J,D.props,$.props,F);if($.items!==!0&&D.items!==void 0)$.items=m8.mergeEvaluated.items(J,D.items,$.items,F)}mergeValidEvaluated(D,F){let{it:$,gen:J}=this;if($.opts.unevaluated&&($.props!==!0||$.items!==!0))return J.if(F,()=>this.mergeEvaluated(D,c.Name)),!0}}ES.KeywordCxt=BG;function KS(D,F,$,J){let Q=new BG(D,$,F);if("code"in $)$.code(Q,J);else if(Q.$data&&$.validate)(0,i5.funcKeywordCode)(Q,$);else if("macro"in $)(0,i5.macroKeywordCode)(Q,$);else if($.compile||$.validate)(0,i5.funcKeywordCode)(Q,$)}var GQ0=/^\/(?:[^~]|~0|~1)*$/,WQ0=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function zS(D,{dataLevel:F,dataNames:$,dataPathArr:J}){let Q,Y;if(D==="")return o.default.rootData;if(D[0]==="/"){if(!GQ0.test(D))throw Error(`Invalid JSON-pointer: ${D}`);Q=D,Y=o.default.rootData}else{let H=WQ0.exec(D);if(!H)throw Error(`Invalid JSON-pointer: ${D}`);let q=+H[1];if(Q=H[2],Q==="#"){if(q>=F)throw Error(G("property/index",q));return J[F-q]}if(q>F)throw Error(G("data",q));if(Y=$[F-q],!Q)return Y}let B=Y,X=Q.split("/");for(let H of X)if(H)Y=c._`${Y}${(0,c.getProperty)((0,m8.unescapeJsonPointer)(H))}`,B=c._`${B} && ${Y}`;return B;function G(H,q){return`Cannot access ${H} ${q} levels up, current level is ${F}`}}ES.getData=zS});var a5=z((US)=>{Object.defineProperty(US,"__esModule",{value:!0});class ZS extends Error{constructor(D){super("validation failed");this.errors=D,this.ajv=this.validation=!0}}US.default=ZS});var $F=z((AS)=>{Object.defineProperty(AS,"__esModule",{value:!0});var XG=c5();class LS extends Error{constructor(D,F,$,J){super(J||`can't resolve reference ${$} from id ${F}`);this.missingRef=(0,XG.resolveUrl)(D,F,$),this.missingSchema=(0,XG.normalizeId)((0,XG.getFullPath)(D,this.missingRef))}}AS.default=LS});var s5=z((CS)=>{Object.defineProperty(CS,"__esModule",{value:!0});CS.resolveSchema=CS.getCompilingSchema=CS.resolveRef=CS.compileSchema=CS.SchemaEnv=void 0;var h1=t(),EQ0=a5(),M4=M1(),b1=c5(),MS=z0(),VQ0=FF();class o5{constructor(D){var F;this.refs={},this.dynamicAnchors={};let $;if(typeof D.schema=="object")$=D.schema;this.schema=D.schema,this.schemaId=D.schemaId,this.root=D.root||this,this.baseId=(F=D.baseId)!==null&&F!==void 0?F:(0,b1.normalizeId)($===null||$===void 0?void 0:$[D.schemaId||"$id"]),this.schemaPath=D.schemaPath,this.localRefs=D.localRefs,this.meta=D.meta,this.$async=$===null||$===void 0?void 0:$.$async,this.refs={}}}CS.SchemaEnv=o5;function WG(D){let F=NS.call(this,D);if(F)return F;let $=(0,b1.getFullPath)(this.opts.uriResolver,D.root.baseId),{es5:J,lines:Q}=this.opts.code,{ownProperties:Y}=this.opts,B=new h1.CodeGen(this.scope,{es5:J,lines:Q,ownProperties:Y}),X;if(D.$async)X=B.scopeValue("Error",{ref:EQ0.default,code:h1._`require("ajv/dist/runtime/validation_error").default`});let G=B.scopeName("validate");D.validateName=G;let H={gen:B,allErrors:this.opts.allErrors,data:M4.default.data,parentData:M4.default.parentData,parentDataProperty:M4.default.parentDataProperty,dataNames:[M4.default.data],dataPathArr:[h1.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:B.scopeValue("schema",this.opts.code.source===!0?{ref:D.schema,code:(0,h1.stringify)(D.schema)}:{ref:D.schema}),validateName:G,ValidationError:X,schema:D.schema,schemaEnv:D,rootId:$,baseId:D.baseId||$,schemaPath:h1.nil,errSchemaPath:D.schemaPath||(this.opts.jtd?"":"#"),errorPath:h1._`""`,opts:this.opts,self:this},q;try{this._compilations.add(D),(0,VQ0.validateFunctionCode)(H),B.optimize(this.opts.code.optimize);let K=B.toString();if(q=`${B.scopeRefs(M4.default.scope)}return ${K}`,this.opts.code.process)q=this.opts.code.process(q,D);let E=Function(`${M4.default.self}`,`${M4.default.scope}`,q)(this,this.scope.get());if(this.scope.value(G,{ref:E}),E.errors=null,E.schema=D.schema,E.schemaEnv=D,D.$async)E.$async=!0;if(this.opts.code.source===!0)E.source={validateName:G,validateCode:K,scopeValues:B._values};if(this.opts.unevaluated){let{props:Z,items:L}=H;if(E.evaluated={props:Z instanceof h1.Name?void 0:Z,items:L instanceof h1.Name?void 0:L,dynamicProps:Z instanceof h1.Name,dynamicItems:L instanceof h1.Name},E.source)E.source.evaluated=(0,h1.stringify)(E.evaluated)}return D.validate=E,D}catch(K){if(delete D.validate,delete D.validateName,q)this.logger.error("Error compiling schema, function code:",q);throw K}finally{this._compilations.delete(D)}}CS.compileSchema=WG;function ZQ0(D,F,$){var J;$=(0,b1.resolveUrl)(this.opts.uriResolver,F,$);let Q=D.refs[$];if(Q)return Q;let Y=AQ0.call(this,D,$);if(Y===void 0){let B=(J=D.localRefs)===null||J===void 0?void 0:J[$],{schemaId:X}=this.opts;if(B)Y=new o5({schema:B,schemaId:X,root:D,baseId:F})}if(Y===void 0)return;return D.refs[$]=UQ0.call(this,Y)}CS.resolveRef=ZQ0;function UQ0(D){if((0,b1.inlineRef)(D.schema,this.opts.inlineRefs))return D.schema;return D.validate?D:WG.call(this,D)}function NS(D){for(let F of this._compilations)if(LQ0(F,D))return F}CS.getCompilingSchema=NS;function LQ0(D,F){return D.schema===F.schema&&D.root===F.root&&D.baseId===F.baseId}function AQ0(D,F){let $;while(typeof($=this.refs[F])=="string")F=$;return $||this.schemas[F]||FJ.call(this,D,F)}function FJ(D,F){let $=this.opts.uriResolver.parse(F),J=(0,b1._getFullPath)(this.opts.uriResolver,$),Q=(0,b1.getFullPath)(this.opts.uriResolver,D.baseId,void 0);if(Object.keys(D.schema).length>0&&J===Q)return GG.call(this,$,D);let Y=(0,b1.normalizeId)(J),B=this.refs[Y]||this.schemas[Y];if(typeof B=="string"){let X=FJ.call(this,D,B);if(typeof(X===null||X===void 0?void 0:X.schema)!=="object")return;return GG.call(this,$,X)}if(typeof(B===null||B===void 0?void 0:B.schema)!=="object")return;if(!B.validate)WG.call(this,B);if(Y===(0,b1.normalizeId)(F)){let{schema:X}=B,{schemaId:G}=this.opts,H=X[G];if(H)Q=(0,b1.resolveUrl)(this.opts.uriResolver,Q,H);return new o5({schema:X,schemaId:G,root:D,baseId:Q})}return GG.call(this,$,B)}CS.resolveSchema=FJ;var MQ0=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function GG(D,{baseId:F,schema:$,root:J}){var Q;if(((Q=D.fragment)===null||Q===void 0?void 0:Q[0])!=="/")return;for(let X of D.fragment.slice(1).split("/")){if(typeof $==="boolean")return;let G=$[(0,MS.unescapeFragment)(X)];if(G===void 0)return;$=G;let H=typeof $==="object"&&$[this.opts.schemaId];if(!MQ0.has(X)&&H)F=(0,b1.resolveUrl)(this.opts.uriResolver,F,H)}let Y;if(typeof $!="boolean"&&$.$ref&&!(0,MS.schemaHasRulesButRef)($,this.RULES)){let X=(0,b1.resolveUrl)(this.opts.uriResolver,F,$.$ref);Y=FJ.call(this,J,X)}let{schemaId:B}=this.opts;if(Y=Y||new o5({schema:$,schemaId:B,root:J,baseId:F}),Y.schema!==Y.root.schema)return Y;return}});var OS=z((lT0,wQ0)=>{wQ0.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var qG=z((pT0,PS)=>{var TQ0=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),TS=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function HG(D){let F="",$=0,J=0;for(J=0;J<D.length;J++){if($=D[J].charCodeAt(0),$===48)continue;if(!($>=48&&$<=57||$>=65&&$<=70||$>=97&&$<=102))return"";F+=D[J];break}for(J+=1;J<D.length;J++){if($=D[J].charCodeAt(0),!($>=48&&$<=57||$>=65&&$<=70||$>=97&&$<=102))return"";F+=D[J]}return F}var jQ0=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function wS(D){return D.length=0,!0}function PQ0(D,F,$){if(D.length){let J=HG(D);if(J!=="")F.push(J);else return $.error=!0,!1;D.length=0}return!0}function IQ0(D){let F=0,$={error:!1,address:"",zone:""},J=[],Q=[],Y=!1,B=!1,X=PQ0;for(let G=0;G<D.length;G++){let H=D[G];if(H==="["||H==="]")continue;if(H===":"){if(Y===!0)B=!0;if(!X(Q,J,$))break;if(++F>7){$.error=!0;break}if(G>0&&D[G-1]===":")Y=!0;J.push(":");continue}else if(H==="%"){if(!X(Q,J,$))break;X=wS}else{Q.push(H);continue}}if(Q.length)if(X===wS)$.zone=Q.join("");else if(B)J.push(Q.join(""));else J.push(HG(Q));return $.address=J.join(""),$}function jS(D){if(SQ0(D,":")<2)return{host:D,isIPV6:!1};let F=IQ0(D);if(!F.error){let{address:$,address:J}=F;if(F.zone)$+="%"+F.zone,J+="%25"+F.zone;return{host:$,isIPV6:!0,escapedHost:J}}else return{host:D,isIPV6:!1}}function SQ0(D,F){let $=0;for(let J=0;J<D.length;J++)if(D[J]===F)$++;return $}function kQ0(D){let F=D,$=[],J=-1,Q=0;while(Q=F.length){if(Q===1)if(F===".")break;else if(F==="/"){$.push("/");break}else{$.push(F);break}else if(Q===2){if(F[0]==="."){if(F[1]===".")break;else if(F[1]==="/"){F=F.slice(2);continue}}else if(F[0]==="/"){if(F[1]==="."||F[1]==="/"){$.push("/");break}}}else if(Q===3){if(F==="/.."){if($.length!==0)$.pop();$.push("/");break}}if(F[0]==="."){if(F[1]==="."){if(F[2]==="/"){F=F.slice(3);continue}}else if(F[1]==="/"){F=F.slice(2);continue}}else if(F[0]==="/"){if(F[1]==="."){if(F[2]==="/"){F=F.slice(2);continue}else if(F[2]==="."){if(F[3]==="/"){if(F=F.slice(3),$.length!==0)$.pop();continue}}}}if((J=F.indexOf("/",1))===-1){$.push(F);break}else $.push(F.slice(0,J)),F=F.slice(J)}return $.join("")}function vQ0(D,F){let $=F!==!0?escape:unescape;if(D.scheme!==void 0)D.scheme=$(D.scheme);if(D.userinfo!==void 0)D.userinfo=$(D.userinfo);if(D.host!==void 0)D.host=$(D.host);if(D.path!==void 0)D.path=$(D.path);if(D.query!==void 0)D.query=$(D.query);if(D.fragment!==void 0)D.fragment=$(D.fragment);return D}function yQ0(D){let F=[];if(D.userinfo!==void 0)F.push(D.userinfo),F.push("@");if(D.host!==void 0){let $=unescape(D.host);if(!TS($)){let J=jS($);if(J.isIPV6===!0)$=`[${J.escapedHost}]`;else $=D.host}F.push($)}if(typeof D.port==="number"||typeof D.port==="string")F.push(":"),F.push(String(D.port));return F.length?F.join(""):void 0}PS.exports={nonSimpleDomain:jQ0,recomposeAuthority:yQ0,normalizeComponentEncoding:vQ0,removeDotSegments:kQ0,isIPv4:TS,isUUID:TQ0,normalizeIPv6:jS,stringArrayToHexStripped:HG}});var yS=z((dT0,vS)=>{var{isUUID:xQ0}=qG(),_Q0=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,fQ0=["http","https","ws","wss","urn","urn:uuid"];function gQ0(D){return fQ0.indexOf(D)!==-1}function KG(D){if(D.secure===!0)return!0;else if(D.secure===!1)return!1;else if(D.scheme)return D.scheme.length===3&&(D.scheme[0]==="w"||D.scheme[0]==="W")&&(D.scheme[1]==="s"||D.scheme[1]==="S")&&(D.scheme[2]==="s"||D.scheme[2]==="S");else return!1}function IS(D){if(!D.host)D.error=D.error||"HTTP URIs must have a host.";return D}function SS(D){let F=String(D.scheme).toLowerCase()==="https";if(D.port===(F?443:80)||D.port==="")D.port=void 0;if(!D.path)D.path="/";return D}function hQ0(D){return D.secure=KG(D),D.resourceName=(D.path||"/")+(D.query?"?"+D.query:""),D.path=void 0,D.query=void 0,D}function bQ0(D){if(D.port===(KG(D)?443:80)||D.port==="")D.port=void 0;if(typeof D.secure==="boolean")D.scheme=D.secure?"wss":"ws",D.secure=void 0;if(D.resourceName){let[F,$]=D.resourceName.split("?");D.path=F&&F!=="/"?F:void 0,D.query=$,D.resourceName=void 0}return D.fragment=void 0,D}function uQ0(D,F){if(!D.path)return D.error="URN can not be parsed",D;let $=D.path.match(_Q0);if($){let J=F.scheme||D.scheme||"urn";D.nid=$[1].toLowerCase(),D.nss=$[2];let Q=`${J}:${F.nid||D.nid}`,Y=zG(Q);if(D.path=void 0,Y)D=Y.parse(D,F)}else D.error=D.error||"URN can not be parsed.";return D}function mQ0(D,F){if(D.nid===void 0)throw Error("URN without nid cannot be serialized");let $=F.scheme||D.scheme||"urn",J=D.nid.toLowerCase(),Q=`${$}:${F.nid||J}`,Y=zG(Q);if(Y)D=Y.serialize(D,F);let B=D,X=D.nss;return B.path=`${J||F.nid}:${X}`,F.skipEscape=!0,B}function lQ0(D,F){let $=D;if($.uuid=$.nss,$.nss=void 0,!F.tolerant&&(!$.uuid||!xQ0($.uuid)))$.error=$.error||"UUID is not valid.";return $}function pQ0(D){let F=D;return F.nss=(D.uuid||"").toLowerCase(),F}var kS={scheme:"http",domainHost:!0,parse:IS,serialize:SS},dQ0={scheme:"https",domainHost:kS.domainHost,parse:IS,serialize:SS},$J={scheme:"ws",domainHost:!0,parse:hQ0,serialize:bQ0},cQ0={scheme:"wss",domainHost:$J.domainHost,parse:$J.parse,serialize:$J.serialize},nQ0={scheme:"urn",parse:uQ0,serialize:mQ0,skipNormalize:!0},iQ0={scheme:"urn:uuid",parse:lQ0,serialize:pQ0,skipNormalize:!0},JJ={http:kS,https:dQ0,ws:$J,wss:cQ0,urn:nQ0,"urn:uuid":iQ0};Object.setPrototypeOf(JJ,null);function zG(D){return D&&(JJ[D]||JJ[D.toLowerCase()])||void 0}vS.exports={wsIsSecure:KG,SCHEMES:JJ,isValidSchemeName:gQ0,getSchemeHandler:zG}});var fS=z((cT0,YJ)=>{var{normalizeIPv6:aQ0,removeDotSegments:r5,recomposeAuthority:oQ0,normalizeComponentEncoding:QJ,isIPv4:sQ0,nonSimpleDomain:rQ0}=qG(),{SCHEMES:tQ0,getSchemeHandler:xS}=yS();function eQ0(D,F){if(typeof D==="string")D=U8(l8(D,F),F);else if(typeof D==="object")D=l8(U8(D,F),F);return D}function DY0(D,F,$){let J=$?Object.assign({scheme:"null"},$):{scheme:"null"},Q=_S(l8(D,J),l8(F,J),J,!0);return J.skipEscape=!0,U8(Q,J)}function _S(D,F,$,J){let Q={};if(!J)D=l8(U8(D,$),$),F=l8(U8(F,$),$);if($=$||{},!$.tolerant&&F.scheme)Q.scheme=F.scheme,Q.userinfo=F.userinfo,Q.host=F.host,Q.port=F.port,Q.path=r5(F.path||""),Q.query=F.query;else{if(F.userinfo!==void 0||F.host!==void 0||F.port!==void 0)Q.userinfo=F.userinfo,Q.host=F.host,Q.port=F.port,Q.path=r5(F.path||""),Q.query=F.query;else{if(!F.path)if(Q.path=D.path,F.query!==void 0)Q.query=F.query;else Q.query=D.query;else{if(F.path[0]==="/")Q.path=r5(F.path);else{if((D.userinfo!==void 0||D.host!==void 0||D.port!==void 0)&&!D.path)Q.path="/"+F.path;else if(!D.path)Q.path=F.path;else Q.path=D.path.slice(0,D.path.lastIndexOf("/")+1)+F.path;Q.path=r5(Q.path)}Q.query=F.query}Q.userinfo=D.userinfo,Q.host=D.host,Q.port=D.port}Q.scheme=D.scheme}return Q.fragment=F.fragment,Q}function FY0(D,F,$){if(typeof D==="string")D=unescape(D),D=U8(QJ(l8(D,$),!0),{...$,skipEscape:!0});else if(typeof D==="object")D=U8(QJ(D,!0),{...$,skipEscape:!0});if(typeof F==="string")F=unescape(F),F=U8(QJ(l8(F,$),!0),{...$,skipEscape:!0});else if(typeof F==="object")F=U8(QJ(F,!0),{...$,skipEscape:!0});return D.toLowerCase()===F.toLowerCase()}function U8(D,F){let $={host:D.host,scheme:D.scheme,userinfo:D.userinfo,port:D.port,path:D.path,query:D.query,nid:D.nid,nss:D.nss,uuid:D.uuid,fragment:D.fragment,reference:D.reference,resourceName:D.resourceName,secure:D.secure,error:""},J=Object.assign({},F),Q=[],Y=xS(J.scheme||$.scheme);if(Y&&Y.serialize)Y.serialize($,J);if($.path!==void 0)if(!J.skipEscape){if($.path=escape($.path),$.scheme!==void 0)$.path=$.path.split("%3A").join(":")}else $.path=unescape($.path);if(J.reference!=="suffix"&&$.scheme)Q.push($.scheme,":");let B=oQ0($);if(B!==void 0){if(J.reference!=="suffix")Q.push("//");if(Q.push(B),$.path&&$.path[0]!=="/")Q.push("/")}if($.path!==void 0){let X=$.path;if(!J.absolutePath&&(!Y||!Y.absolutePath))X=r5(X);if(B===void 0&&X[0]==="/"&&X[1]==="/")X="/%2F"+X.slice(2);Q.push(X)}if($.query!==void 0)Q.push("?",$.query);if($.fragment!==void 0)Q.push("#",$.fragment);return Q.join("")}var $Y0=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function l8(D,F){let $=Object.assign({},F),J={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},Q=!1;if($.reference==="suffix")if($.scheme)D=$.scheme+":"+D;else D="//"+D;let Y=D.match($Y0);if(Y){if(J.scheme=Y[1],J.userinfo=Y[3],J.host=Y[4],J.port=parseInt(Y[5],10),J.path=Y[6]||"",J.query=Y[7],J.fragment=Y[8],isNaN(J.port))J.port=Y[5];if(J.host)if(sQ0(J.host)===!1){let G=aQ0(J.host);J.host=G.host.toLowerCase(),Q=G.isIPV6}else Q=!0;if(J.scheme===void 0&&J.userinfo===void 0&&J.host===void 0&&J.port===void 0&&J.query===void 0&&!J.path)J.reference="same-document";else if(J.scheme===void 0)J.reference="relative";else if(J.fragment===void 0)J.reference="absolute";else J.reference="uri";if($.reference&&$.reference!=="suffix"&&$.reference!==J.reference)J.error=J.error||"URI is not a "+$.reference+" reference.";let B=xS($.scheme||J.scheme);if(!$.unicodeSupport&&(!B||!B.unicodeSupport)){if(J.host&&($.domainHost||B&&B.domainHost)&&Q===!1&&rQ0(J.host))try{J.host=URL.domainToASCII(J.host.toLowerCase())}catch(X){J.error=J.error||"Host's domain name can not be converted to ASCII: "+X}}if(!B||B&&!B.skipNormalize){if(D.indexOf("%")!==-1){if(J.scheme!==void 0)J.scheme=unescape(J.scheme);if(J.host!==void 0)J.host=unescape(J.host)}if(J.path)J.path=escape(unescape(J.path));if(J.fragment)J.fragment=encodeURI(decodeURIComponent(J.fragment))}if(B&&B.parse)B.parse(J,$)}else J.error=J.error||"URI can not be parsed.";return J}var EG={SCHEMES:tQ0,normalize:eQ0,resolve:DY0,resolveComponent:_S,equal:FY0,serialize:U8,parse:l8};YJ.exports=EG;YJ.exports.default=EG;YJ.exports.fastUri=EG});var bS=z((hS)=>{Object.defineProperty(hS,"__esModule",{value:!0});var gS=fS();gS.code='require("ajv/dist/runtime/uri").default';hS.default=gS});var UG=z((p8)=>{Object.defineProperty(p8,"__esModule",{value:!0});p8.CodeGen=p8.Name=p8.nil=p8.stringify=p8.str=p8._=p8.KeywordCxt=void 0;var QY0=FF();Object.defineProperty(p8,"KeywordCxt",{enumerable:!0,get:function(){return QY0.KeywordCxt}});var JF=t();Object.defineProperty(p8,"_",{enumerable:!0,get:function(){return JF._}});Object.defineProperty(p8,"str",{enumerable:!0,get:function(){return JF.str}});Object.defineProperty(p8,"stringify",{enumerable:!0,get:function(){return JF.stringify}});Object.defineProperty(p8,"nil",{enumerable:!0,get:function(){return JF.nil}});Object.defineProperty(p8,"Name",{enumerable:!0,get:function(){return JF.Name}});Object.defineProperty(p8,"CodeGen",{enumerable:!0,get:function(){return JF.CodeGen}});var YY0=a5(),dS=$F(),BY0=iX(),t5=s5(),XY0=t(),e5=c5(),BJ=d5(),ZG=z0(),uS=OS(),GY0=bS(),cS=(D,F)=>new RegExp(D,F);cS.code="new RegExp";var WY0=["removeAdditional","useDefaults","coerceTypes"],HY0=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),qY0={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},KY0={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},mS=200;function zY0(D){var F,$,J,Q,Y,B,X,G,H,q,K,V,E,Z,L,A,M,R,w,k,O,j,y,d,W0;let F0=D.strict,O0=(F=D.code)===null||F===void 0?void 0:F.optimize,e=O0===!0||O0===void 0?1:O0||0,N0=(J=($=D.code)===null||$===void 0?void 0:$.regExp)!==null&&J!==void 0?J:cS,GD=(Q=D.uriResolver)!==null&&Q!==void 0?Q:GY0.default;return{strictSchema:(B=(Y=D.strictSchema)!==null&&Y!==void 0?Y:F0)!==null&&B!==void 0?B:!0,strictNumbers:(G=(X=D.strictNumbers)!==null&&X!==void 0?X:F0)!==null&&G!==void 0?G:!0,strictTypes:(q=(H=D.strictTypes)!==null&&H!==void 0?H:F0)!==null&&q!==void 0?q:"log",strictTuples:(V=(K=D.strictTuples)!==null&&K!==void 0?K:F0)!==null&&V!==void 0?V:"log",strictRequired:(Z=(E=D.strictRequired)!==null&&E!==void 0?E:F0)!==null&&Z!==void 0?Z:!1,code:D.code?{...D.code,optimize:e,regExp:N0}:{optimize:e,regExp:N0},loopRequired:(L=D.loopRequired)!==null&&L!==void 0?L:mS,loopEnum:(A=D.loopEnum)!==null&&A!==void 0?A:mS,meta:(M=D.meta)!==null&&M!==void 0?M:!0,messages:(R=D.messages)!==null&&R!==void 0?R:!0,inlineRefs:(w=D.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(k=D.schemaId)!==null&&k!==void 0?k:"$id",addUsedSchema:(O=D.addUsedSchema)!==null&&O!==void 0?O:!0,validateSchema:(j=D.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(y=D.validateFormats)!==null&&y!==void 0?y:!0,unicodeRegExp:(d=D.unicodeRegExp)!==null&&d!==void 0?d:!0,int32range:(W0=D.int32range)!==null&&W0!==void 0?W0:!0,uriResolver:GD}}class XJ{constructor(D={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,D=this.opts={...D,...zY0(D)};let{es5:F,lines:$}=this.opts.code;this.scope=new XY0.ValueScope({scope:{},prefixes:HY0,es5:F,lines:$}),this.logger=AY0(D.logger);let J=D.validateFormats;if(D.validateFormats=!1,this.RULES=(0,BY0.getRules)(),lS.call(this,qY0,D,"NOT SUPPORTED"),lS.call(this,KY0,D,"DEPRECATED","warn"),this._metaOpts=UY0.call(this),D.formats)VY0.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),D.keywords)ZY0.call(this,D.keywords);if(typeof D.meta=="object")this.addMetaSchema(D.meta);EY0.call(this),D.validateFormats=J}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:D,meta:F,schemaId:$}=this.opts,J=uS;if($==="id")J={...uS},J.id=J.$id,delete J.$id;if(F&&D)this.addMetaSchema(J,J[$],!1)}defaultMeta(){let{meta:D,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof D=="object"?D[F]||D:void 0}validate(D,F){let $;if(typeof D=="string"){if($=this.getSchema(D),!$)throw Error(`no schema with key or ref "${D}"`)}else $=this.compile(D);let J=$(F);if(!("$async"in $))this.errors=$.errors;return J}compile(D,F){let $=this._addSchema(D,F);return $.validate||this._compileSchemaEnv($)}compileAsync(D,F){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:$}=this.opts;return J.call(this,D,F);async function J(H,q){await Q.call(this,H.$schema);let K=this._addSchema(H,q);return K.validate||Y.call(this,K)}async function Q(H){if(H&&!this.getSchema(H))await J.call(this,{$ref:H},!0)}async function Y(H){try{return this._compileSchemaEnv(H)}catch(q){if(!(q instanceof dS.default))throw q;return B.call(this,q),await X.call(this,q.missingSchema),Y.call(this,H)}}function B({missingSchema:H,missingRef:q}){if(this.refs[H])throw Error(`AnySchema ${H} is loaded but ${q} cannot be resolved`)}async function X(H){let q=await G.call(this,H);if(!this.refs[H])await Q.call(this,q.$schema);if(!this.refs[H])this.addSchema(q,H,F)}async function G(H){let q=this._loading[H];if(q)return q;try{return await(this._loading[H]=$(H))}finally{delete this._loading[H]}}}addSchema(D,F,$,J=this.opts.validateSchema){if(Array.isArray(D)){for(let Y of D)this.addSchema(Y,void 0,$,J);return this}let Q;if(typeof D==="object"){let{schemaId:Y}=this.opts;if(Q=D[Y],Q!==void 0&&typeof Q!="string")throw Error(`schema ${Y} must be string`)}return F=(0,e5.normalizeId)(F||Q),this._checkUnique(F),this.schemas[F]=this._addSchema(D,$,F,J,!0),this}addMetaSchema(D,F,$=this.opts.validateSchema){return this.addSchema(D,F,!0,$),this}validateSchema(D,F){if(typeof D=="boolean")return!0;let $;if($=D.$schema,$!==void 0&&typeof $!="string")throw Error("$schema must be a string");if($=$||this.opts.defaultMeta||this.defaultMeta(),!$)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let J=this.validate($,D);if(!J&&F){let Q="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(Q);else throw Error(Q)}return J}getSchema(D){let F;while(typeof(F=pS.call(this,D))=="string")D=F;if(F===void 0){let{schemaId:$}=this.opts,J=new t5.SchemaEnv({schema:{},schemaId:$});if(F=t5.resolveSchema.call(this,J,D),!F)return;this.refs[D]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(D){if(D instanceof RegExp)return this._removeAllSchemas(this.schemas,D),this._removeAllSchemas(this.refs,D),this;switch(typeof D){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let F=pS.call(this,D);if(typeof F=="object")this._cache.delete(F.schema);return delete this.schemas[D],delete this.refs[D],this}case"object":{let F=D;this._cache.delete(F);let $=D[this.opts.schemaId];if($)$=(0,e5.normalizeId)($),delete this.schemas[$],delete this.refs[$];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(D){for(let F of D)this.addKeyword(F);return this}addKeyword(D,F){let $;if(typeof D=="string"){if($=D,typeof F=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=$}else if(typeof D=="object"&&F===void 0){if(F=D,$=F.keyword,Array.isArray($)&&!$.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(NY0.call(this,$,F),!F)return(0,ZG.eachItem)($,(Q)=>VG.call(this,Q)),this;RY0.call(this,F);let J={...F,type:(0,BJ.getJSONTypes)(F.type),schemaType:(0,BJ.getJSONTypes)(F.schemaType)};return(0,ZG.eachItem)($,J.type.length===0?(Q)=>VG.call(this,Q,J):(Q)=>J.type.forEach((Y)=>VG.call(this,Q,J,Y))),this}getKeyword(D){let F=this.RULES.all[D];return typeof F=="object"?F.definition:!!F}removeKeyword(D){let{RULES:F}=this;delete F.keywords[D],delete F.all[D];for(let $ of F.rules){let J=$.rules.findIndex((Q)=>Q.keyword===D);if(J>=0)$.rules.splice(J,1)}return this}addFormat(D,F){if(typeof F=="string")F=new RegExp(F);return this.formats[D]=F,this}errorsText(D=this.errors,{separator:F=", ",dataVar:$="data"}={}){if(!D||D.length===0)return"No errors";return D.map((J)=>`${$}${J.instancePath} ${J.message}`).reduce((J,Q)=>J+F+Q)}$dataMetaSchema(D,F){let $=this.RULES.all;D=JSON.parse(JSON.stringify(D));for(let J of F){let Q=J.split("/").slice(1),Y=D;for(let B of Q)Y=Y[B];for(let B in $){let X=$[B];if(typeof X!="object")continue;let{$data:G}=X.definition,H=Y[B];if(G&&H)Y[B]=nS(H)}}return D}_removeAllSchemas(D,F){for(let $ in D){let J=D[$];if(!F||F.test($)){if(typeof J=="string")delete D[$];else if(J&&!J.meta)this._cache.delete(J.schema),delete D[$]}}}_addSchema(D,F,$,J=this.opts.validateSchema,Q=this.opts.addUsedSchema){let Y,{schemaId:B}=this.opts;if(typeof D=="object")Y=D[B];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof D!="boolean")throw Error("schema must be object or boolean");let X=this._cache.get(D);if(X!==void 0)return X;$=(0,e5.normalizeId)(Y||$);let G=e5.getSchemaRefs.call(this,D,$);if(X=new t5.SchemaEnv({schema:D,schemaId:B,meta:F,baseId:$,localRefs:G}),this._cache.set(X.schema,X),Q&&!$.startsWith("#")){if($)this._checkUnique($);this.refs[$]=X}if(J)this.validateSchema(D,!0);return X}_checkUnique(D){if(this.schemas[D]||this.refs[D])throw Error(`schema with key or id "${D}" already exists`)}_compileSchemaEnv(D){if(D.meta)this._compileMetaSchema(D);else t5.compileSchema.call(this,D);if(!D.validate)throw Error("ajv implementation error");return D.validate}_compileMetaSchema(D){let F=this.opts;this.opts=this._metaOpts;try{t5.compileSchema.call(this,D)}finally{this.opts=F}}}XJ.ValidationError=YY0.default;XJ.MissingRefError=dS.default;p8.default=XJ;function lS(D,F,$,J="error"){for(let Q in D){let Y=Q;if(Y in F)this.logger[J](`${$}: option ${Q}. ${D[Y]}`)}}function pS(D){return D=(0,e5.normalizeId)(D),this.schemas[D]||this.refs[D]}function EY0(){let D=this.opts.schemas;if(!D)return;if(Array.isArray(D))this.addSchema(D);else for(let F in D)this.addSchema(D[F],F)}function VY0(){for(let D in this.opts.formats){let F=this.opts.formats[D];if(F)this.addFormat(D,F)}}function ZY0(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let F in D){let $=D[F];if(!$.keyword)$.keyword=F;this.addKeyword($)}}function UY0(){let D={...this.opts};for(let F of WY0)delete D[F];return D}var LY0={log(){},warn(){},error(){}};function AY0(D){if(D===!1)return LY0;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw Error("logger must implement log, warn and error methods")}var MY0=/^[a-z_$][a-z0-9_$:-]*$/i;function NY0(D,F){let{RULES:$}=this;if((0,ZG.eachItem)(D,(J)=>{if($.keywords[J])throw Error(`Keyword ${J} is already defined`);if(!MY0.test(J))throw Error(`Keyword ${J} has invalid name`)}),!F)return;if(F.$data&&!(("code"in F)||("validate"in F)))throw Error('$data keyword must have "code" or "validate" function')}function VG(D,F,$){var J;let Q=F===null||F===void 0?void 0:F.post;if($&&Q)throw Error('keyword with "post" flag cannot have "type"');let{RULES:Y}=this,B=Q?Y.post:Y.rules.find(({type:G})=>G===$);if(!B)B={type:$,rules:[]},Y.rules.push(B);if(Y.keywords[D]=!0,!F)return;let X={keyword:D,definition:{...F,type:(0,BJ.getJSONTypes)(F.type),schemaType:(0,BJ.getJSONTypes)(F.schemaType)}};if(F.before)CY0.call(this,B,X,F.before);else B.rules.push(X);Y.all[D]=X,(J=F.implements)===null||J===void 0||J.forEach((G)=>this.addKeyword(G))}function CY0(D,F,$){let J=D.rules.findIndex((Q)=>Q.keyword===$);if(J>=0)D.rules.splice(J,0,F);else D.rules.push(F),this.logger.warn(`rule ${$} is not defined`)}function RY0(D){let{metaSchema:F}=D;if(F===void 0)return;if(D.$data&&this.opts.$data)F=nS(F);D.validateSchema=this.compile(F,!0)}var OY0={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function nS(D){return{anyOf:[D,OY0]}}});var aS=z((iS)=>{Object.defineProperty(iS,"__esModule",{value:!0});var jY0={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};iS.default=jY0});var HJ=z((tS)=>{Object.defineProperty(tS,"__esModule",{value:!0});tS.callRef=tS.getValidate=void 0;var IY0=$F(),oS=N1(),sD=t(),QF=M1(),sS=s5(),GJ=z0(),SY0={keyword:"$ref",schemaType:"string",code(D){let{gen:F,schema:$,it:J}=D,{baseId:Q,schemaEnv:Y,validateName:B,opts:X,self:G}=J,{root:H}=Y;if(($==="#"||$==="#/")&&Q===H.baseId)return K();let q=sS.resolveRef.call(G,H,Q,$);if(q===void 0)throw new IY0.default(J.opts.uriResolver,Q,$);if(q instanceof sS.SchemaEnv)return V(q);return E(q);function K(){if(Y===H)return WJ(D,B,Y,Y.$async);let Z=F.scopeValue("root",{ref:H});return WJ(D,sD._`${Z}.validate`,H,H.$async)}function V(Z){let L=rS(D,Z);WJ(D,L,Z,Z.$async)}function E(Z){let L=F.scopeValue("schema",X.code.source===!0?{ref:Z,code:(0,sD.stringify)(Z)}:{ref:Z}),A=F.name("valid"),M=D.subschema({schema:Z,dataTypes:[],schemaPath:sD.nil,topSchemaRef:L,errSchemaPath:$},A);D.mergeEvaluated(M),D.ok(A)}}};function rS(D,F){let{gen:$}=D;return F.validate?$.scopeValue("validate",{ref:F.validate}):sD._`${$.scopeValue("wrapper",{ref:F})}.validate`}tS.getValidate=rS;function WJ(D,F,$,J){let{gen:Q,it:Y}=D,{allErrors:B,schemaEnv:X,opts:G}=Y,H=G.passContext?QF.default.this:sD.nil;if(J)q();else K();function q(){if(!X.$async)throw Error("async schema referenced by sync schema");let Z=Q.let("valid");Q.try(()=>{if(Q.code(sD._`await ${(0,oS.callValidateCode)(D,F,H)}`),E(F),!B)Q.assign(Z,!0)},(L)=>{if(Q.if(sD._`!(${L} instanceof ${Y.ValidationError})`,()=>Q.throw(L)),V(L),!B)Q.assign(Z,!1)}),D.ok(Z)}function K(){D.result((0,oS.callValidateCode)(D,F,H),()=>E(F),()=>V(F))}function V(Z){let L=sD._`${Z}.errors`;Q.assign(QF.default.vErrors,sD._`${QF.default.vErrors} === null ? ${L} : ${QF.default.vErrors}.concat(${L})`),Q.assign(QF.default.errors,sD._`${QF.default.vErrors}.length`)}function E(Z){var L;if(!Y.opts.unevaluated)return;let A=(L=$===null||$===void 0?void 0:$.validate)===null||L===void 0?void 0:L.evaluated;if(Y.props!==!0)if(A&&!A.dynamicProps){if(A.props!==void 0)Y.props=GJ.mergeEvaluated.props(Q,A.props,Y.props)}else{let M=Q.var("props",sD._`${Z}.evaluated.props`);Y.props=GJ.mergeEvaluated.props(Q,M,Y.props,sD.Name)}if(Y.items!==!0)if(A&&!A.dynamicItems){if(A.items!==void 0)Y.items=GJ.mergeEvaluated.items(Q,A.items,Y.items)}else{let M=Q.var("items",sD._`${Z}.evaluated.items`);Y.items=GJ.mergeEvaluated.items(Q,M,Y.items,sD.Name)}}}tS.callRef=WJ;tS.default=SY0});var LG=z((Dk)=>{Object.defineProperty(Dk,"__esModule",{value:!0});var yY0=aS(),xY0=HJ(),_Y0=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",yY0.default,xY0.default];Dk.default=_Y0});var $k=z((Fk)=>{Object.defineProperty(Fk,"__esModule",{value:!0});var qJ=t(),h6=qJ.operators,KJ={maximum:{okStr:"<=",ok:h6.LTE,fail:h6.GT},minimum:{okStr:">=",ok:h6.GTE,fail:h6.LT},exclusiveMaximum:{okStr:"<",ok:h6.LT,fail:h6.GTE},exclusiveMinimum:{okStr:">",ok:h6.GT,fail:h6.LTE}},gY0={message:({keyword:D,schemaCode:F})=>qJ.str`must be ${KJ[D].okStr} ${F}`,params:({keyword:D,schemaCode:F})=>qJ._`{comparison: ${KJ[D].okStr}, limit: ${F}}`},hY0={keyword:Object.keys(KJ),type:"number",schemaType:"number",$data:!0,error:gY0,code(D){let{keyword:F,data:$,schemaCode:J}=D;D.fail$data(qJ._`${$} ${KJ[F].fail} ${J} || isNaN(${$})`)}};Fk.default=hY0});var Qk=z((Jk)=>{Object.defineProperty(Jk,"__esModule",{value:!0});var D9=t(),uY0={message:({schemaCode:D})=>D9.str`must be multiple of ${D}`,params:({schemaCode:D})=>D9._`{multipleOf: ${D}}`},mY0={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:uY0,code(D){let{gen:F,data:$,schemaCode:J,it:Q}=D,Y=Q.opts.multipleOfPrecision,B=F.let("res"),X=Y?D9._`Math.abs(Math.round(${B}) - ${B}) > 1e-${Y}`:D9._`${B} !== parseInt(${B})`;D.fail$data(D9._`(${J} === 0 || (${B} = ${$}/${J}, ${X}))`)}};Jk.default=mY0});var Xk=z((Bk)=>{Object.defineProperty(Bk,"__esModule",{value:!0});function Yk(D){let F=D.length,$=0,J=0,Q;while(J<F)if($++,Q=D.charCodeAt(J++),Q>=55296&&Q<=56319&&J<F){if(Q=D.charCodeAt(J),(Q&64512)===56320)J++}return $}Bk.default=Yk;Yk.code='require("ajv/dist/runtime/ucs2length").default'});var Wk=z((Gk)=>{Object.defineProperty(Gk,"__esModule",{value:!0});var N4=t(),dY0=z0(),cY0=Xk(),nY0={message({keyword:D,schemaCode:F}){let $=D==="maxLength"?"more":"fewer";return N4.str`must NOT have ${$} than ${F} characters`},params:({schemaCode:D})=>N4._`{limit: ${D}}`},iY0={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:nY0,code(D){let{keyword:F,data:$,schemaCode:J,it:Q}=D,Y=F==="maxLength"?N4.operators.GT:N4.operators.LT,B=Q.opts.unicode===!1?N4._`${$}.length`:N4._`${(0,dY0.useFunc)(D.gen,cY0.default)}(${$})`;D.fail$data(N4._`${B} ${Y} ${J}`)}};Gk.default=iY0});var qk=z((Hk)=>{Object.defineProperty(Hk,"__esModule",{value:!0});var oY0=N1(),zJ=t(),sY0={message:({schemaCode:D})=>zJ.str`must match pattern "${D}"`,params:({schemaCode:D})=>zJ._`{pattern: ${D}}`},rY0={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:sY0,code(D){let{data:F,$data:$,schema:J,schemaCode:Q,it:Y}=D,B=Y.opts.unicodeRegExp?"u":"",X=$?zJ._`(new RegExp(${Q}, ${B}))`:(0,oY0.usePattern)(D,J);D.fail$data(zJ._`!${X}.test(${F})`)}};Hk.default=rY0});var zk=z((Kk)=>{Object.defineProperty(Kk,"__esModule",{value:!0});var F9=t(),eY0={message({keyword:D,schemaCode:F}){let $=D==="maxProperties"?"more":"fewer";return F9.str`must NOT have ${$} than ${F} properties`},params:({schemaCode:D})=>F9._`{limit: ${D}}`},DB0={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:eY0,code(D){let{keyword:F,data:$,schemaCode:J}=D,Q=F==="maxProperties"?F9.operators.GT:F9.operators.LT;D.fail$data(F9._`Object.keys(${$}).length ${Q} ${J}`)}};Kk.default=DB0});var Vk=z((Ek)=>{Object.defineProperty(Ek,"__esModule",{value:!0});var $9=N1(),J9=t(),$B0=z0(),JB0={message:({params:{missingProperty:D}})=>J9.str`must have required property '${D}'`,params:({params:{missingProperty:D}})=>J9._`{missingProperty: ${D}}`},QB0={keyword:"required",type:"object",schemaType:"array",$data:!0,error:JB0,code(D){let{gen:F,schema:$,schemaCode:J,data:Q,$data:Y,it:B}=D,{opts:X}=B;if(!Y&&$.length===0)return;let G=$.length>=X.loopRequired;if(B.allErrors)H();else q();if(X.strictRequired){let E=D.parentSchema.properties,{definedProperties:Z}=D.it;for(let L of $)if((E===null||E===void 0?void 0:E[L])===void 0&&!Z.has(L)){let A=B.schemaEnv.baseId+B.errSchemaPath,M=`required property "${L}" is not defined at "${A}" (strictRequired)`;(0,$B0.checkStrictMode)(B,M,B.opts.strictRequired)}}function H(){if(G||Y)D.block$data(J9.nil,K);else for(let E of $)(0,$9.checkReportMissingProp)(D,E)}function q(){let E=F.let("missing");if(G||Y){let Z=F.let("valid",!0);D.block$data(Z,()=>V(E,Z)),D.ok(Z)}else F.if((0,$9.checkMissingProp)(D,$,E)),(0,$9.reportMissingProp)(D,E),F.else()}function K(){F.forOf("prop",J,(E)=>{D.setParams({missingProperty:E}),F.if((0,$9.noPropertyInData)(F,Q,E,X.ownProperties),()=>D.error())})}function V(E,Z){D.setParams({missingProperty:E}),F.forOf(E,J,()=>{F.assign(Z,(0,$9.propertyInData)(F,Q,E,X.ownProperties)),F.if((0,J9.not)(Z),()=>{D.error(),F.break()})},J9.nil)}}};Ek.default=QB0});var Uk=z((Zk)=>{Object.defineProperty(Zk,"__esModule",{value:!0});var Q9=t(),BB0={message({keyword:D,schemaCode:F}){let $=D==="maxItems"?"more":"fewer";return Q9.str`must NOT have ${$} than ${F} items`},params:({schemaCode:D})=>Q9._`{limit: ${D}}`},XB0={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:BB0,code(D){let{keyword:F,data:$,schemaCode:J}=D,Q=F==="maxItems"?Q9.operators.GT:Q9.operators.LT;D.fail$data(Q9._`${$}.length ${Q} ${J}`)}};Zk.default=XB0});var EJ=z((Ak)=>{Object.defineProperty(Ak,"__esModule",{value:!0});var Lk=FG();Lk.code='require("ajv/dist/runtime/equal").default';Ak.default=Lk});var Nk=z((Mk)=>{Object.defineProperty(Mk,"__esModule",{value:!0});var AG=d5(),MD=t(),HB0=z0(),qB0=EJ(),KB0={message:({params:{i:D,j:F}})=>MD.str`must NOT have duplicate items (items ## ${F} and ${D} are identical)`,params:({params:{i:D,j:F}})=>MD._`{i: ${D}, j: ${F}}`},zB0={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:KB0,code(D){let{gen:F,data:$,$data:J,schema:Q,parentSchema:Y,schemaCode:B,it:X}=D;if(!J&&!Q)return;let G=F.let("valid"),H=Y.items?(0,AG.getSchemaTypes)(Y.items):[];D.block$data(G,q,MD._`${B} === false`),D.ok(G);function q(){let Z=F.let("i",MD._`${$}.length`),L=F.let("j");D.setParams({i:Z,j:L}),F.assign(G,!0),F.if(MD._`${Z} > 1`,()=>(K()?V:E)(Z,L))}function K(){return H.length>0&&!H.some((Z)=>Z==="object"||Z==="array")}function V(Z,L){let A=F.name("item"),M=(0,AG.checkDataTypes)(H,A,X.opts.strictNumbers,AG.DataType.Wrong),R=F.const("indices",MD._`{}`);F.for(MD._`;${Z}--;`,()=>{if(F.let(A,MD._`${$}[${Z}]`),F.if(M,MD._`continue`),H.length>1)F.if(MD._`typeof ${A} == "string"`,MD._`${A} += "_"`);F.if(MD._`typeof ${R}[${A}] == "number"`,()=>{F.assign(L,MD._`${R}[${A}]`),D.error(),F.assign(G,!1).break()}).code(MD._`${R}[${A}] = ${Z}`)})}function E(Z,L){let A=(0,HB0.useFunc)(F,qB0.default),M=F.name("outer");F.label(M).for(MD._`;${Z}--;`,()=>F.for(MD._`${L} = ${Z}; ${L}--;`,()=>F.if(MD._`${A}(${$}[${Z}], ${$}[${L}])`,()=>{D.error(),F.assign(G,!1).break(M)})))}}};Mk.default=zB0});var Rk=z((Ck)=>{Object.defineProperty(Ck,"__esModule",{value:!0});var MG=t(),VB0=z0(),ZB0=EJ(),UB0={message:"must be equal to constant",params:({schemaCode:D})=>MG._`{allowedValue: ${D}}`},LB0={keyword:"const",$data:!0,error:UB0,code(D){let{gen:F,data:$,$data:J,schemaCode:Q,schema:Y}=D;if(J||Y&&typeof Y=="object")D.fail$data(MG._`!${(0,VB0.useFunc)(F,ZB0.default)}(${$}, ${Q})`);else D.fail(MG._`${Y} !== ${$}`)}};Ck.default=LB0});var wk=z((Ok)=>{Object.defineProperty(Ok,"__esModule",{value:!0});var Y9=t(),MB0=z0(),NB0=EJ(),CB0={message:"must be equal to one of the allowed values",params:({schemaCode:D})=>Y9._`{allowedValues: ${D}}`},RB0={keyword:"enum",schemaType:"array",$data:!0,error:CB0,code(D){let{gen:F,data:$,$data:J,schema:Q,schemaCode:Y,it:B}=D;if(!J&&Q.length===0)throw Error("enum must have non-empty array");let X=Q.length>=B.opts.loopEnum,G,H=()=>G!==null&&G!==void 0?G:G=(0,MB0.useFunc)(F,NB0.default),q;if(X||J)q=F.let("valid"),D.block$data(q,K);else{if(!Array.isArray(Q))throw Error("ajv implementation error");let E=F.const("vSchema",Y);q=(0,Y9.or)(...Q.map((Z,L)=>V(E,L)))}D.pass(q);function K(){F.assign(q,!1),F.forOf("v",Y,(E)=>F.if(Y9._`${H()}(${$}, ${E})`,()=>F.assign(q,!0).break()))}function V(E,Z){let L=Q[Z];return typeof L==="object"&&L!==null?Y9._`${H()}(${$}, ${E}[${Z}])`:Y9._`${$} === ${L}`}}};Ok.default=RB0});var NG=z((Tk)=>{Object.defineProperty(Tk,"__esModule",{value:!0});var wB0=$k(),TB0=Qk(),jB0=Wk(),PB0=qk(),IB0=zk(),SB0=Vk(),kB0=Uk(),vB0=Nk(),yB0=Rk(),xB0=wk(),_B0=[wB0.default,TB0.default,jB0.default,PB0.default,IB0.default,SB0.default,kB0.default,vB0.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},yB0.default,xB0.default];Tk.default=_B0});var RG=z((Pk)=>{Object.defineProperty(Pk,"__esModule",{value:!0});Pk.validateAdditionalItems=void 0;var C4=t(),CG=z0(),gB0={message:({params:{len:D}})=>C4.str`must NOT have more than ${D} items`,params:({params:{len:D}})=>C4._`{limit: ${D}}`},hB0={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:gB0,code(D){let{parentSchema:F,it:$}=D,{items:J}=F;if(!Array.isArray(J)){(0,CG.checkStrictMode)($,'"additionalItems" is ignored when "items" is not an array of schemas');return}jk(D,J)}};function jk(D,F){let{gen:$,schema:J,data:Q,keyword:Y,it:B}=D;B.items=!0;let X=$.const("len",C4._`${Q}.length`);if(J===!1)D.setParams({len:F.length}),D.pass(C4._`${X} <= ${F.length}`);else if(typeof J=="object"&&!(0,CG.alwaysValidSchema)(B,J)){let H=$.var("valid",C4._`${X} <= ${F.length}`);$.if((0,C4.not)(H),()=>G(H)),D.ok(H)}function G(H){$.forRange("i",F.length,X,(q)=>{if(D.subschema({keyword:Y,dataProp:q,dataPropType:CG.Type.Num},H),!B.allErrors)$.if((0,C4.not)(H),()=>$.break())})}}Pk.validateAdditionalItems=jk;Pk.default=hB0});var OG=z((vk)=>{Object.defineProperty(vk,"__esModule",{value:!0});vk.validateTuple=void 0;var Sk=t(),VJ=z0(),uB0=N1(),mB0={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(D){let{schema:F,it:$}=D;if(Array.isArray(F))return kk(D,"additionalItems",F);if($.items=!0,(0,VJ.alwaysValidSchema)($,F))return;D.ok((0,uB0.validateArray)(D))}};function kk(D,F,$=D.schema){let{gen:J,parentSchema:Q,data:Y,keyword:B,it:X}=D;if(q(Q),X.opts.unevaluated&&$.length&&X.items!==!0)X.items=VJ.mergeEvaluated.items(J,$.length,X.items);let G=J.name("valid"),H=J.const("len",Sk._`${Y}.length`);$.forEach((K,V)=>{if((0,VJ.alwaysValidSchema)(X,K))return;J.if(Sk._`${H} > ${V}`,()=>D.subschema({keyword:B,schemaProp:V,dataProp:V},G)),D.ok(G)});function q(K){let{opts:V,errSchemaPath:E}=X,Z=$.length,L=Z===K.minItems&&(Z===K.maxItems||K[F]===!1);if(V.strictTuples&&!L){let A=`"${B}" is ${Z}-tuple, but minItems or maxItems/${F} are not specified or different at path "${E}"`;(0,VJ.checkStrictMode)(X,A,V.strictTuples)}}}vk.validateTuple=kk;vk.default=mB0});var _k=z((xk)=>{Object.defineProperty(xk,"__esModule",{value:!0});var pB0=OG(),dB0={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(D)=>(0,pB0.validateTuple)(D,"items")};xk.default=dB0});var hk=z((gk)=>{Object.defineProperty(gk,"__esModule",{value:!0});var fk=t(),nB0=z0(),iB0=N1(),aB0=RG(),oB0={message:({params:{len:D}})=>fk.str`must NOT have more than ${D} items`,params:({params:{len:D}})=>fk._`{limit: ${D}}`},sB0={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:oB0,code(D){let{schema:F,parentSchema:$,it:J}=D,{prefixItems:Q}=$;if(J.items=!0,(0,nB0.alwaysValidSchema)(J,F))return;if(Q)(0,aB0.validateAdditionalItems)(D,Q);else D.ok((0,iB0.validateArray)(D))}};gk.default=sB0});var uk=z((bk)=>{Object.defineProperty(bk,"__esModule",{value:!0});var C1=t(),ZJ=z0(),tB0={message:({params:{min:D,max:F}})=>F===void 0?C1.str`must contain at least ${D} valid item(s)`:C1.str`must contain at least ${D} and no more than ${F} valid item(s)`,params:({params:{min:D,max:F}})=>F===void 0?C1._`{minContains: ${D}}`:C1._`{minContains: ${D}, maxContains: ${F}}`},eB0={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:tB0,code(D){let{gen:F,schema:$,parentSchema:J,data:Q,it:Y}=D,B,X,{minContains:G,maxContains:H}=J;if(Y.opts.next)B=G===void 0?1:G,X=H;else B=1;let q=F.const("len",C1._`${Q}.length`);if(D.setParams({min:B,max:X}),X===void 0&&B===0){(0,ZJ.checkStrictMode)(Y,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(X!==void 0&&B>X){(0,ZJ.checkStrictMode)(Y,'"minContains" > "maxContains" is always invalid'),D.fail();return}if((0,ZJ.alwaysValidSchema)(Y,$)){let L=C1._`${q} >= ${B}`;if(X!==void 0)L=C1._`${L} && ${q} <= ${X}`;D.pass(L);return}Y.items=!0;let K=F.name("valid");if(X===void 0&&B===1)E(K,()=>F.if(K,()=>F.break()));else if(B===0){if(F.let(K,!0),X!==void 0)F.if(C1._`${Q}.length > 0`,V)}else F.let(K,!1),V();D.result(K,()=>D.reset());function V(){let L=F.name("_valid"),A=F.let("count",0);E(L,()=>F.if(L,()=>Z(A)))}function E(L,A){F.forRange("i",0,q,(M)=>{D.subschema({keyword:"contains",dataProp:M,dataPropType:ZJ.Type.Num,compositeRule:!0},L),A()})}function Z(L){if(F.code(C1._`${L}++`),X===void 0)F.if(C1._`${L} >= ${B}`,()=>F.assign(K,!0).break());else if(F.if(C1._`${L} > ${X}`,()=>F.assign(K,!1).break()),B===1)F.assign(K,!0);else F.if(C1._`${L} >= ${B}`,()=>F.assign(K,!0))}}};bk.default=eB0});var UJ=z((pk)=>{Object.defineProperty(pk,"__esModule",{value:!0});pk.validateSchemaDeps=pk.validatePropertyDeps=pk.error=void 0;var wG=t(),F20=z0(),B9=N1();pk.error={message:({params:{property:D,depsCount:F,deps:$}})=>{let J=F===1?"property":"properties";return wG.str`must have ${J} ${$} when property ${D} is present`},params:({params:{property:D,depsCount:F,deps:$,missingProperty:J}})=>wG._`{property: ${D},
89
89
  missingProperty: ${J},
90
90
  depsCount: ${F},
91
- deps: ${$}}`};var $20={keyword:"dependencies",type:"object",schemaType:"object",error:pk.error,code(D){let[F,$]=J20(D);mk(D,F),lk(D,$)}};function J20({schema:D}){let F={},$={};for(let J in D){if(J==="__proto__")continue;let Q=Array.isArray(D[J])?F:$;Q[J]=D[J]}return[F,$]}function mk(D,F=D.schema){let{gen:$,data:J,it:Q}=D;if(Object.keys(F).length===0)return;let Y=$.let("missing");for(let B in F){let X=F[B];if(X.length===0)continue;let G=(0,B9.propertyInData)($,J,B,Q.opts.ownProperties);if(D.setParams({property:B,depsCount:X.length,deps:X.join(", ")}),Q.allErrors)$.if(G,()=>{for(let H of X)(0,B9.checkReportMissingProp)(D,H)});else $.if(wG._`${G} && (${(0,B9.checkMissingProp)(D,X,Y)})`),(0,B9.reportMissingProp)(D,Y),$.else()}}pk.validatePropertyDeps=mk;function lk(D,F=D.schema){let{gen:$,data:J,keyword:Q,it:Y}=D,B=$.name("valid");for(let X in F){if((0,F20.alwaysValidSchema)(Y,F[X]))continue;$.if((0,B9.propertyInData)($,J,X,Y.opts.ownProperties),()=>{let G=D.subschema({keyword:Q,schemaProp:X},B);D.mergeValidEvaluated(G,B)},()=>$.var(B,!0)),D.ok(B)}}pk.validateSchemaDeps=lk;pk.default=$20});var ak=z((ik)=>{Object.defineProperty(ik,"__esModule",{value:!0});var nk=t(),B20=z0(),X20={message:"property name must be valid",params:({params:D})=>nk._`{propertyName: ${D.propertyName}}`},G20={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:X20,code(D){let{gen:F,schema:$,data:J,it:Q}=D;if((0,B20.alwaysValidSchema)(Q,$))return;let Y=F.name("valid");F.forIn("key",J,(B)=>{D.setParams({propertyName:B}),D.subschema({keyword:"propertyNames",data:B,dataTypes:["string"],propertyName:B,compositeRule:!0},Y),F.if((0,nk.not)(Y),()=>{if(D.error(!0),!Q.allErrors)F.break()})}),D.ok(Y)}};ik.default=G20});var TG=z((ok)=>{Object.defineProperty(ok,"__esModule",{value:!0});var LJ=N1(),u1=t(),H20=M1(),AJ=z0(),q20={message:"must NOT have additional properties",params:({params:D})=>u1._`{additionalProperty: ${D.additionalProperty}}`},K20={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:q20,code(D){let{gen:F,schema:$,parentSchema:J,data:Q,errsCount:Y,it:B}=D;if(!Y)throw Error("ajv implementation error");let{allErrors:X,opts:G}=B;if(B.props=!0,G.removeAdditional!=="all"&&(0,AJ.alwaysValidSchema)(B,$))return;let H=(0,LJ.allSchemaProperties)(J.properties),q=(0,LJ.allSchemaProperties)(J.patternProperties);K(),D.ok(u1._`${Y} === ${H20.default.errors}`);function K(){F.forIn("key",Q,(A)=>{if(!H.length&&!q.length)Z(A);else F.if(V(A),()=>Z(A))})}function V(A){let M;if(H.length>8){let O=(0,AJ.schemaRefOrVal)(B,J.properties,"properties");M=(0,LJ.isOwnProperty)(F,O,A)}else if(H.length)M=(0,u1.or)(...H.map((O)=>u1._`${A} === ${O}`));else M=u1.nil;if(q.length)M=(0,u1.or)(M,...q.map((O)=>u1._`${(0,LJ.usePattern)(D,O)}.test(${A})`));return(0,u1.not)(M)}function E(A){F.code(u1._`delete ${Q}[${A}]`)}function Z(A){if(G.removeAdditional==="all"||G.removeAdditional&&$===!1){E(A);return}if($===!1){if(D.setParams({additionalProperty:A}),D.error(),!X)F.break();return}if(typeof $=="object"&&!(0,AJ.alwaysValidSchema)(B,$)){let M=F.name("valid");if(G.removeAdditional==="failing")L(A,M,!1),F.if((0,u1.not)(M),()=>{D.reset(),E(A)});else if(L(A,M),!X)F.if((0,u1.not)(M),()=>F.break())}}function L(A,M,O){let w={keyword:"additionalProperties",dataProp:A,dataPropType:AJ.Type.Str};if(O===!1)Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1});D.subschema(w,M)}}};ok.default=K20});var ek=z((tk)=>{Object.defineProperty(tk,"__esModule",{value:!0});var E20=FF(),sk=N1(),jG=z0(),rk=TG(),V20={keyword:"properties",type:"object",schemaType:"object",code(D){let{gen:F,schema:$,parentSchema:J,data:Q,it:Y}=D;if(Y.opts.removeAdditional==="all"&&J.additionalProperties===void 0)rk.default.code(new E20.KeywordCxt(Y,rk.default,"additionalProperties"));let B=(0,sk.allSchemaProperties)($);for(let K of B)Y.definedProperties.add(K);if(Y.opts.unevaluated&&B.length&&Y.props!==!0)Y.props=jG.mergeEvaluated.props(F,(0,jG.toHash)(B),Y.props);let X=B.filter((K)=>!(0,jG.alwaysValidSchema)(Y,$[K]));if(X.length===0)return;let G=F.name("valid");for(let K of X){if(H(K))q(K);else{if(F.if((0,sk.propertyInData)(F,Q,K,Y.opts.ownProperties)),q(K),!Y.allErrors)F.else().var(G,!0);F.endIf()}D.it.definedProperties.add(K),D.ok(G)}function H(K){return Y.opts.useDefaults&&!Y.compositeRule&&$[K].default!==void 0}function q(K){D.subschema({keyword:"properties",schemaProp:K,dataProp:K},G)}}};tk.default=V20});var Qv=z((Jv)=>{Object.defineProperty(Jv,"__esModule",{value:!0});var Dv=N1(),MJ=t(),Fv=z0(),$v=z0(),U20={keyword:"patternProperties",type:"object",schemaType:"object",code(D){let{gen:F,schema:$,data:J,parentSchema:Q,it:Y}=D,{opts:B}=Y,X=(0,Dv.allSchemaProperties)($),G=X.filter((L)=>(0,Fv.alwaysValidSchema)(Y,$[L]));if(X.length===0||G.length===X.length&&(!Y.opts.unevaluated||Y.props===!0))return;let H=B.strictSchema&&!B.allowMatchingProperties&&Q.properties,q=F.name("valid");if(Y.props!==!0&&!(Y.props instanceof MJ.Name))Y.props=(0,$v.evaluatedPropsToName)(F,Y.props);let{props:K}=Y;V();function V(){for(let L of X){if(H)E(L);if(Y.allErrors)Z(L);else F.var(q,!0),Z(L),F.if(q)}}function E(L){for(let A in H)if(new RegExp(L).test(A))(0,Fv.checkStrictMode)(Y,`property ${A} matches pattern ${L} (use allowMatchingProperties)`)}function Z(L){F.forIn("key",J,(A)=>{F.if(MJ._`${(0,Dv.usePattern)(D,L)}.test(${A})`,()=>{let M=G.includes(L);if(!M)D.subschema({keyword:"patternProperties",schemaProp:L,dataProp:A,dataPropType:$v.Type.Str},q);if(Y.opts.unevaluated&&K!==!0)F.assign(MJ._`${K}[${A}]`,!0);else if(!M&&!Y.allErrors)F.if((0,MJ.not)(q),()=>F.break())})})}}};Jv.default=U20});var Bv=z((Yv)=>{Object.defineProperty(Yv,"__esModule",{value:!0});var A20=z0(),M20={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(D){let{gen:F,schema:$,it:J}=D;if((0,A20.alwaysValidSchema)(J,$)){D.fail();return}let Q=F.name("valid");D.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},Q),D.failResult(Q,()=>D.reset(),()=>D.error())},error:{message:"must NOT be valid"}};Yv.default=M20});var Gv=z((Xv)=>{Object.defineProperty(Xv,"__esModule",{value:!0});var C20=N1(),R20={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:C20.validateUnion,error:{message:"must match a schema in anyOf"}};Xv.default=R20});var Hv=z((Wv)=>{Object.defineProperty(Wv,"__esModule",{value:!0});var NJ=t(),w20=z0(),T20={message:"must match exactly one schema in oneOf",params:({params:D})=>NJ._`{passingSchemas: ${D.passing}}`},j20={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:T20,code(D){let{gen:F,schema:$,parentSchema:J,it:Q}=D;if(!Array.isArray($))throw Error("ajv implementation error");if(Q.opts.discriminator&&J.discriminator)return;let Y=$,B=F.let("valid",!1),X=F.let("passing",null),G=F.name("_valid");D.setParams({passing:X}),F.block(H),D.result(B,()=>D.reset(),()=>D.error(!0));function H(){Y.forEach((q,K)=>{let V;if((0,w20.alwaysValidSchema)(Q,q))F.var(G,!0);else V=D.subschema({keyword:"oneOf",schemaProp:K,compositeRule:!0},G);if(K>0)F.if(NJ._`${G} && ${B}`).assign(B,!1).assign(X,NJ._`[${X}, ${K}]`).else();F.if(G,()=>{if(F.assign(B,!0),F.assign(X,K),V)D.mergeEvaluated(V,NJ.Name)})})}}};Wv.default=j20});var Kv=z((qv)=>{Object.defineProperty(qv,"__esModule",{value:!0});var I20=z0(),S20={keyword:"allOf",schemaType:"array",code(D){let{gen:F,schema:$,it:J}=D;if(!Array.isArray($))throw Error("ajv implementation error");let Q=F.name("valid");$.forEach((Y,B)=>{if((0,I20.alwaysValidSchema)(J,Y))return;let X=D.subschema({keyword:"allOf",schemaProp:B},Q);D.ok(Q),D.mergeEvaluated(X)})}};qv.default=S20});var Zv=z((Vv)=>{Object.defineProperty(Vv,"__esModule",{value:!0});var CJ=t(),Ev=z0(),v20={message:({params:D})=>CJ.str`must match "${D.ifClause}" schema`,params:({params:D})=>CJ._`{failingKeyword: ${D.ifClause}}`},y20={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:v20,code(D){let{gen:F,parentSchema:$,it:J}=D;if($.then===void 0&&$.else===void 0)(0,Ev.checkStrictMode)(J,'"if" without "then" and "else" is ignored');let Q=zv(J,"then"),Y=zv(J,"else");if(!Q&&!Y)return;let B=F.let("valid",!0),X=F.name("_valid");if(G(),D.reset(),Q&&Y){let q=F.let("ifClause");D.setParams({ifClause:q}),F.if(X,H("then",q),H("else",q))}else if(Q)F.if(X,H("then"));else F.if((0,CJ.not)(X),H("else"));D.pass(B,()=>D.error(!0));function G(){let q=D.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},X);D.mergeEvaluated(q)}function H(q,K){return()=>{let V=D.subschema({keyword:q},X);if(F.assign(B,X),D.mergeValidEvaluated(V,B),K)F.assign(K,CJ._`${q}`);else D.setParams({ifClause:q})}}}};function zv(D,F){let $=D.schema[F];return $!==void 0&&!(0,Ev.alwaysValidSchema)(D,$)}Vv.default=y20});var Lv=z((Uv)=>{Object.defineProperty(Uv,"__esModule",{value:!0});var _20=z0(),f20={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:D,parentSchema:F,it:$}){if(F.if===void 0)(0,_20.checkStrictMode)($,`"${D}" without "if" is ignored`)}};Uv.default=f20});var PG=z((Av)=>{Object.defineProperty(Av,"__esModule",{value:!0});var h20=RG(),b20=_k(),u20=OG(),m20=hk(),l20=uk(),p20=UJ(),d20=ak(),c20=TG(),n20=ek(),i20=Qv(),a20=Bv(),o20=Gv(),s20=Hv(),r20=Kv(),t20=Zv(),e20=Lv();function DX0(D=!1){let F=[a20.default,o20.default,s20.default,r20.default,t20.default,e20.default,d20.default,c20.default,p20.default,n20.default,i20.default];if(D)F.push(b20.default,m20.default);else F.push(h20.default,u20.default);return F.push(l20.default),F}Av.default=DX0});var SG=z((Cv)=>{Object.defineProperty(Cv,"__esModule",{value:!0});Cv.dynamicAnchor=void 0;var IG=t(),$X0=M1(),Mv=s5(),JX0=HJ(),QX0={keyword:"$dynamicAnchor",schemaType:"string",code:(D)=>Nv(D,D.schema)};function Nv(D,F){let{gen:$,it:J}=D;J.schemaEnv.root.dynamicAnchors[F]=!0;let Q=IG._`${$X0.default.dynamicAnchors}${(0,IG.getProperty)(F)}`,Y=J.errSchemaPath==="#"?J.validateName:YX0(D);$.if(IG._`!${Q}`,()=>$.assign(Q,Y))}Cv.dynamicAnchor=Nv;function YX0(D){let{schemaEnv:F,schema:$,self:J}=D.it,{root:Q,baseId:Y,localRefs:B,meta:X}=F.root,{schemaId:G}=J.opts,H=new Mv.SchemaEnv({schema:$,schemaId:G,root:Q,baseId:Y,localRefs:B,meta:X});return Mv.compileSchema.call(J,H),(0,JX0.getValidate)(D,H)}Cv.default=QX0});var kG=z((jv)=>{Object.defineProperty(jv,"__esModule",{value:!0});jv.dynamicRef=void 0;var Ov=t(),XX0=M1(),wv=HJ(),GX0={keyword:"$dynamicRef",schemaType:"string",code:(D)=>Tv(D,D.schema)};function Tv(D,F){let{gen:$,keyword:J,it:Q}=D;if(F[0]!=="#")throw Error(`"${J}" only supports hash fragment reference`);let Y=F.slice(1);if(Q.allErrors)B();else{let G=$.let("valid",!1);B(G),D.ok(G)}function B(G){if(Q.schemaEnv.root.dynamicAnchors[Y]){let H=$.let("_v",Ov._`${XX0.default.dynamicAnchors}${(0,Ov.getProperty)(Y)}`);$.if(H,X(H,G),X(Q.validateName,G))}else X(Q.validateName,G)()}function X(G,H){return H?()=>$.block(()=>{(0,wv.callRef)(D,G),$.let(H,!0)}):()=>(0,wv.callRef)(D,G)}}jv.dynamicRef=Tv;jv.default=GX0});var Sv=z((Iv)=>{Object.defineProperty(Iv,"__esModule",{value:!0});var HX0=SG(),qX0=z0(),KX0={keyword:"$recursiveAnchor",schemaType:"boolean",code(D){if(D.schema)(0,HX0.dynamicAnchor)(D,"");else(0,qX0.checkStrictMode)(D.it,"$recursiveAnchor: false is ignored")}};Iv.default=KX0});var vv=z((kv)=>{Object.defineProperty(kv,"__esModule",{value:!0});var EX0=kG(),VX0={keyword:"$recursiveRef",schemaType:"string",code:(D)=>(0,EX0.dynamicRef)(D,D.schema)};kv.default=VX0});var xv=z((yv)=>{Object.defineProperty(yv,"__esModule",{value:!0});var UX0=SG(),LX0=kG(),AX0=Sv(),MX0=vv(),NX0=[UX0.default,LX0.default,AX0.default,MX0.default];yv.default=NX0});var gv=z((fv)=>{Object.defineProperty(fv,"__esModule",{value:!0});var _v=UJ(),RX0={keyword:"dependentRequired",type:"object",schemaType:"object",error:_v.error,code:(D)=>(0,_v.validatePropertyDeps)(D)};fv.default=RX0});var bv=z((hv)=>{Object.defineProperty(hv,"__esModule",{value:!0});var wX0=UJ(),TX0={keyword:"dependentSchemas",type:"object",schemaType:"object",code:(D)=>(0,wX0.validateSchemaDeps)(D)};hv.default=TX0});var mv=z((uv)=>{Object.defineProperty(uv,"__esModule",{value:!0});var PX0=z0(),IX0={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:D,parentSchema:F,it:$}){if(F.contains===void 0)(0,PX0.checkStrictMode)($,`"${D}" without "contains" is ignored`)}};uv.default=IX0});var pv=z((lv)=>{Object.defineProperty(lv,"__esModule",{value:!0});var kX0=gv(),vX0=bv(),yX0=mv(),xX0=[kX0.default,vX0.default,yX0.default];lv.default=xX0});var nv=z((cv)=>{Object.defineProperty(cv,"__esModule",{value:!0});var b6=t(),dv=z0(),fX0=M1(),gX0={message:"must NOT have unevaluated properties",params:({params:D})=>b6._`{unevaluatedProperty: ${D.unevaluatedProperty}}`},hX0={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:gX0,code(D){let{gen:F,schema:$,data:J,errsCount:Q,it:Y}=D;if(!Q)throw Error("ajv implementation error");let{allErrors:B,props:X}=Y;if(X instanceof b6.Name)F.if(b6._`${X} !== true`,()=>F.forIn("key",J,(K)=>F.if(H(X,K),()=>G(K))));else if(X!==!0)F.forIn("key",J,(K)=>X===void 0?G(K):F.if(q(X,K),()=>G(K)));Y.props=!0,D.ok(b6._`${Q} === ${fX0.default.errors}`);function G(K){if($===!1){if(D.setParams({unevaluatedProperty:K}),D.error(),!B)F.break();return}if(!(0,dv.alwaysValidSchema)(Y,$)){let V=F.name("valid");if(D.subschema({keyword:"unevaluatedProperties",dataProp:K,dataPropType:dv.Type.Str},V),!B)F.if((0,b6.not)(V),()=>F.break())}}function H(K,V){return b6._`!${K} || !${K}[${V}]`}function q(K,V){let E=[];for(let Z in K)if(K[Z]===!0)E.push(b6._`${V} !== ${Z}`);return(0,b6.and)(...E)}}};cv.default=hX0});var ov=z((av)=>{Object.defineProperty(av,"__esModule",{value:!0});var R4=t(),iv=z0(),uX0={message:({params:{len:D}})=>R4.str`must NOT have more than ${D} items`,params:({params:{len:D}})=>R4._`{limit: ${D}}`},mX0={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:uX0,code(D){let{gen:F,schema:$,data:J,it:Q}=D,Y=Q.items||0;if(Y===!0)return;let B=F.const("len",R4._`${J}.length`);if($===!1)D.setParams({len:Y}),D.fail(R4._`${B} > ${Y}`);else if(typeof $=="object"&&!(0,iv.alwaysValidSchema)(Q,$)){let G=F.var("valid",R4._`${B} <= ${Y}`);F.if((0,R4.not)(G),()=>X(G,Y)),D.ok(G)}Q.items=!0;function X(G,H){F.forRange("i",H,B,(q)=>{if(D.subschema({keyword:"unevaluatedItems",dataProp:q,dataPropType:iv.Type.Num},G),!Q.allErrors)F.if((0,R4.not)(G),()=>F.break())})}}};av.default=mX0});var rv=z((sv)=>{Object.defineProperty(sv,"__esModule",{value:!0});var pX0=nv(),dX0=ov(),cX0=[pX0.default,dX0.default];sv.default=cX0});var ev=z((tv)=>{Object.defineProperty(tv,"__esModule",{value:!0});var $D=t(),iX0={message:({schemaCode:D})=>$D.str`must match format "${D}"`,params:({schemaCode:D})=>$D._`{format: ${D}}`},aX0={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:iX0,code(D,F){let{gen:$,data:J,$data:Q,schema:Y,schemaCode:B,it:X}=D,{opts:G,errSchemaPath:H,schemaEnv:q,self:K}=X;if(!G.validateFormats)return;if(Q)V();else E();function V(){let Z=$.scopeValue("formats",{ref:K.formats,code:G.code.formats}),L=$.const("fDef",$D._`${Z}[${B}]`),A=$.let("fType"),M=$.let("format");$.if($D._`typeof ${L} == "object" && !(${L} instanceof RegExp)`,()=>$.assign(A,$D._`${L}.type || "string"`).assign(M,$D._`${L}.validate`),()=>$.assign(A,$D._`"string"`).assign(M,L)),D.fail$data((0,$D.or)(O(),w()));function O(){if(G.strictSchema===!1)return $D.nil;return $D._`${B} && !${M}`}function w(){let k=q.$async?$D._`(${L}.async ? await ${M}(${J}) : ${M}(${J}))`:$D._`${M}(${J})`,R=$D._`(typeof ${M} == "function" ? ${k} : ${M}.test(${J}))`;return $D._`${M} && ${M} !== true && ${A} === ${F} && !${R}`}}function E(){let Z=K.formats[Y];if(!Z){O();return}if(Z===!0)return;let[L,A,M]=w(Z);if(L===F)D.pass(k());function O(){if(G.strictSchema===!1){K.logger.warn(R());return}throw Error(R());function R(){return`unknown format "${Y}" ignored in schema at path "${H}"`}}function w(R){let j=R instanceof RegExp?(0,$D.regexpCode)(R):G.code.formats?$D._`${G.code.formats}${(0,$D.getProperty)(Y)}`:void 0,y=$.scopeValue("formats",{key:Y,ref:R,code:j});if(typeof R=="object"&&!(R instanceof RegExp))return[R.type||"string",R.validate,$D._`${y}.validate`];return["string",R,y]}function k(){if(typeof Z=="object"&&!(Z instanceof RegExp)&&Z.async){if(!q.$async)throw Error("async format in sync schema");return $D._`await ${M}(${J})`}return typeof A=="function"?$D._`${M}(${J})`:$D._`${M}.test(${J})`}}}};tv.default=aX0});var vG=z((Dy)=>{Object.defineProperty(Dy,"__esModule",{value:!0});var sX0=ev(),rX0=[sX0.default];Dy.default=rX0});var yG=z((Fy)=>{Object.defineProperty(Fy,"__esModule",{value:!0});Fy.contentVocabulary=Fy.metadataVocabulary=void 0;Fy.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Fy.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Yy=z((Qy)=>{Object.defineProperty(Qy,"__esModule",{value:!0});var DG0=LG(),FG0=NG(),$G0=PG(),JG0=xv(),QG0=pv(),YG0=rv(),BG0=vG(),Jy=yG(),XG0=[JG0.default,DG0.default,FG0.default,(0,$G0.default)(!0),BG0.default,Jy.metadataVocabulary,Jy.contentVocabulary,QG0.default,YG0.default];Qy.default=XG0});var Wy=z((Xy)=>{Object.defineProperty(Xy,"__esModule",{value:!0});Xy.DiscrError=void 0;var By;(function(D){D.Tag="tag",D.Mapping="mapping"})(By||(Xy.DiscrError=By={}))});var _G=z((qy)=>{Object.defineProperty(qy,"__esModule",{value:!0});var YF=t(),xG=Wy(),Hy=s5(),WG0=$F(),HG0=z0(),qG0={message:({params:{discrError:D,tagName:F}})=>D===xG.DiscrError.Tag?`tag "${F}" must be string`:`value of tag "${F}" must be in oneOf`,params:({params:{discrError:D,tag:F,tagName:$}})=>YF._`{error: ${D}, tag: ${$}, tagValue: ${F}}`},KG0={keyword:"discriminator",type:"object",schemaType:"object",error:qG0,code(D){let{gen:F,data:$,schema:J,parentSchema:Q,it:Y}=D,{oneOf:B}=Q;if(!Y.opts.discriminator)throw Error("discriminator: requires discriminator option");let X=J.propertyName;if(typeof X!="string")throw Error("discriminator: requires propertyName");if(J.mapping)throw Error("discriminator: mapping is not supported");if(!B)throw Error("discriminator: requires oneOf keyword");let G=F.let("valid",!1),H=F.const("tag",YF._`${$}${(0,YF.getProperty)(X)}`);F.if(YF._`typeof ${H} == "string"`,()=>q(),()=>D.error(!1,{discrError:xG.DiscrError.Tag,tag:H,tagName:X})),D.ok(G);function q(){let E=V();F.if(!1);for(let Z in E)F.elseIf(YF._`${H} === ${Z}`),F.assign(G,K(E[Z]));F.else(),D.error(!1,{discrError:xG.DiscrError.Mapping,tag:H,tagName:X}),F.endIf()}function K(E){let Z=F.name("valid"),L=D.subschema({keyword:"oneOf",schemaProp:E},Z);return D.mergeEvaluated(L,YF.Name),Z}function V(){var E;let Z={},L=M(Q),A=!0;for(let k=0;k<B.length;k++){let R=B[k];if((R===null||R===void 0?void 0:R.$ref)&&!(0,HG0.schemaHasRulesButRef)(R,Y.self.RULES)){let y=R.$ref;if(R=Hy.resolveRef.call(Y.self,Y.schemaEnv.root,Y.baseId,y),R instanceof Hy.SchemaEnv)R=R.schema;if(R===void 0)throw new WG0.default(Y.opts.uriResolver,Y.baseId,y)}let j=(E=R===null||R===void 0?void 0:R.properties)===null||E===void 0?void 0:E[X];if(typeof j!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${X}"`);A=A&&(L||M(R)),O(j,k)}if(!A)throw Error(`discriminator: "${X}" must be required`);return Z;function M({required:k}){return Array.isArray(k)&&k.includes(X)}function O(k,R){if(k.const)w(k.const,R);else if(k.enum)for(let j of k.enum)w(j,R);else throw Error(`discriminator: "properties/${X}" must have "const" or "enum"`)}function w(k,R){if(typeof k!="string"||k in Z)throw Error(`discriminator: "${X}" values must be unique strings`);Z[k]=R}}}};qy.default=KG0});var Ky=z((rj0,EG0)=>{EG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var zy=z((tj0,VG0)=>{VG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var Ey=z((ej0,ZG0)=>{ZG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var Vy=z((DP0,UG0)=>{UG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var Zy=z((FP0,LG0)=>{LG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var Uy=z(($P0,AG0)=>{AG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var Ly=z((JP0,MG0)=>{MG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var Ay=z((QP0,NG0)=>{NG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var Ny=z((My)=>{Object.defineProperty(My,"__esModule",{value:!0});var CG0=Ky(),RG0=zy(),OG0=Ey(),wG0=Vy(),TG0=Zy(),jG0=Uy(),PG0=Ly(),IG0=Ay(),SG0=["/properties"];function kG0(D){return[CG0,RG0,OG0,wG0,TG0,F(this,jG0),PG0,F(this,IG0)].forEach(($)=>this.addMetaSchema($,void 0,!1)),this;function F($,J){return D?$.$dataMetaSchema(J,SG0):J}}My.default=kG0});var Cy=z((rD,gG)=>{Object.defineProperty(rD,"__esModule",{value:!0});rD.MissingRefError=rD.ValidationError=rD.CodeGen=rD.Name=rD.nil=rD.stringify=rD.str=rD._=rD.KeywordCxt=rD.Ajv2020=void 0;var yG0=UG(),xG0=Yy(),_G0=_G(),fG0=Ny(),fG="https://json-schema.org/draft/2020-12/schema";class X9 extends yG0.default{constructor(D={}){super({...D,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){if(super._addVocabularies(),xG0.default.forEach((D)=>this.addVocabulary(D)),this.opts.discriminator)this.addKeyword(_G0.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:D,meta:F}=this.opts;if(!F)return;fG0.default.call(this,D),this.refs["http://json-schema.org/schema"]=fG}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(fG)?fG:void 0)}}rD.Ajv2020=X9;gG.exports=rD=X9;gG.exports.Ajv2020=X9;Object.defineProperty(rD,"__esModule",{value:!0});rD.default=X9;var gG0=FF();Object.defineProperty(rD,"KeywordCxt",{enumerable:!0,get:function(){return gG0.KeywordCxt}});var BF=t();Object.defineProperty(rD,"_",{enumerable:!0,get:function(){return BF._}});Object.defineProperty(rD,"str",{enumerable:!0,get:function(){return BF.str}});Object.defineProperty(rD,"stringify",{enumerable:!0,get:function(){return BF.stringify}});Object.defineProperty(rD,"nil",{enumerable:!0,get:function(){return BF.nil}});Object.defineProperty(rD,"Name",{enumerable:!0,get:function(){return BF.Name}});Object.defineProperty(rD,"CodeGen",{enumerable:!0,get:function(){return BF.CodeGen}});var hG0=a5();Object.defineProperty(rD,"ValidationError",{enumerable:!0,get:function(){return hG0.default}});var bG0=$F();Object.defineProperty(rD,"MissingRefError",{enumerable:!0,get:function(){return bG0.default}})});var vy=z((Sy)=>{Object.defineProperty(Sy,"__esModule",{value:!0});Sy.formatNames=Sy.fastFormats=Sy.fullFormats=void 0;function L8(D,F){return{validate:D,compare:F}}Sy.fullFormats={date:L8(Ty,mG),time:L8(bG(!0),lG),"date-time":L8(Ry(!0),Py),"iso-time":L8(bG(),jy),"iso-date-time":L8(Ry(),Iy),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:iG0,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:DW0,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:aG0,int32:{type:"number",validate:rG0},int64:{type:"number",validate:tG0},float:{type:"number",validate:wy},double:{type:"number",validate:wy},password:!0,binary:!0};Sy.fastFormats={...Sy.fullFormats,date:L8(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,mG),time:L8(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,lG),"date-time":L8(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Py),"iso-time":L8(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,jy),"iso-date-time":L8(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Iy),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Sy.formatNames=Object.keys(Sy.fullFormats);function lG0(D){return D%4===0&&(D%100!==0||D%400===0)}var pG0=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,dG0=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Ty(D){let F=pG0.exec(D);if(!F)return!1;let $=+F[1],J=+F[2],Q=+F[3];return J>=1&&J<=12&&Q>=1&&Q<=(J===2&&lG0($)?29:dG0[J])}function mG(D,F){if(!(D&&F))return;if(D>F)return 1;if(D<F)return-1;return 0}var hG=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function bG(D){return function($){let J=hG.exec($);if(!J)return!1;let Q=+J[1],Y=+J[2],B=+J[3],X=J[4],G=J[5]==="-"?-1:1,H=+(J[6]||0),q=+(J[7]||0);if(H>23||q>59||D&&!X)return!1;if(Q<=23&&Y<=59&&B<60)return!0;let K=Y-q*G,V=Q-H*G-(K<0?1:0);return(V===23||V===-1)&&(K===59||K===-1)&&B<61}}function lG(D,F){if(!(D&&F))return;let $=new Date("2020-01-01T"+D).valueOf(),J=new Date("2020-01-01T"+F).valueOf();if(!($&&J))return;return $-J}function jy(D,F){if(!(D&&F))return;let $=hG.exec(D),J=hG.exec(F);if(!($&&J))return;if(D=$[1]+$[2]+$[3],F=J[1]+J[2]+J[3],D>F)return 1;if(D<F)return-1;return 0}var uG=/t|\s/i;function Ry(D){let F=bG(D);return function(J){let Q=J.split(uG);return Q.length===2&&Ty(Q[0])&&F(Q[1])}}function Py(D,F){if(!(D&&F))return;let $=new Date(D).valueOf(),J=new Date(F).valueOf();if(!($&&J))return;return $-J}function Iy(D,F){if(!(D&&F))return;let[$,J]=D.split(uG),[Q,Y]=F.split(uG),B=mG($,Q);if(B===void 0)return;return B||lG(J,Y)}var cG0=/\/|:/,nG0=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function iG0(D){return cG0.test(D)&&nG0.test(D)}var Oy=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function aG0(D){return Oy.lastIndex=0,Oy.test(D)}var oG0=-2147483648,sG0=2147483647;function rG0(D){return Number.isInteger(D)&&D<=sG0&&D>=oG0}function tG0(D){return Number.isInteger(D)}function wy(){return!0}var eG0=/[^\\]\\Z/;function DW0(D){if(eG0.test(D))return!1;try{return new RegExp(D),!0}catch(F){return!1}}});var _y=z((xy)=>{Object.defineProperty(xy,"__esModule",{value:!0});var $W0=LG(),JW0=NG(),QW0=PG(),YW0=vG(),yy=yG(),BW0=[$W0.default,JW0.default,(0,QW0.default)(),YW0.default,yy.metadataVocabulary,yy.contentVocabulary];xy.default=BW0});var fy=z((ZP0,GW0)=>{GW0.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var hy=z((tD,dG)=>{Object.defineProperty(tD,"__esModule",{value:!0});tD.MissingRefError=tD.ValidationError=tD.CodeGen=tD.Name=tD.nil=tD.stringify=tD.str=tD._=tD.KeywordCxt=tD.Ajv=void 0;var WW0=UG(),HW0=_y(),qW0=_G(),gy=fy(),KW0=["/properties"],RJ="http://json-schema.org/draft-07/schema";class G9 extends WW0.default{_addVocabularies(){if(super._addVocabularies(),HW0.default.forEach((D)=>this.addVocabulary(D)),this.opts.discriminator)this.addKeyword(qW0.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let D=this.opts.$data?this.$dataMetaSchema(gy,KW0):gy;this.addMetaSchema(D,RJ,!1),this.refs["http://json-schema.org/schema"]=RJ}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(RJ)?RJ:void 0)}}tD.Ajv=G9;dG.exports=tD=G9;dG.exports.Ajv=G9;Object.defineProperty(tD,"__esModule",{value:!0});tD.default=G9;var zW0=FF();Object.defineProperty(tD,"KeywordCxt",{enumerable:!0,get:function(){return zW0.KeywordCxt}});var XF=t();Object.defineProperty(tD,"_",{enumerable:!0,get:function(){return XF._}});Object.defineProperty(tD,"str",{enumerable:!0,get:function(){return XF.str}});Object.defineProperty(tD,"stringify",{enumerable:!0,get:function(){return XF.stringify}});Object.defineProperty(tD,"nil",{enumerable:!0,get:function(){return XF.nil}});Object.defineProperty(tD,"Name",{enumerable:!0,get:function(){return XF.Name}});Object.defineProperty(tD,"CodeGen",{enumerable:!0,get:function(){return XF.CodeGen}});var EW0=a5();Object.defineProperty(tD,"ValidationError",{enumerable:!0,get:function(){return EW0.default}});var VW0=$F();Object.defineProperty(tD,"MissingRefError",{enumerable:!0,get:function(){return VW0.default}})});var uy=z((by)=>{Object.defineProperty(by,"__esModule",{value:!0});by.formatLimitDefinition=void 0;var LW0=hy(),m1=t(),u6=m1.operators,OJ={formatMaximum:{okStr:"<=",ok:u6.LTE,fail:u6.GT},formatMinimum:{okStr:">=",ok:u6.GTE,fail:u6.LT},formatExclusiveMaximum:{okStr:"<",ok:u6.LT,fail:u6.GTE},formatExclusiveMinimum:{okStr:">",ok:u6.GT,fail:u6.LTE}},AW0={message:({keyword:D,schemaCode:F})=>m1.str`should be ${OJ[D].okStr} ${F}`,params:({keyword:D,schemaCode:F})=>m1._`{comparison: ${OJ[D].okStr}, limit: ${F}}`};by.formatLimitDefinition={keyword:Object.keys(OJ),type:"string",schemaType:"string",$data:!0,error:AW0,code(D){let{gen:F,data:$,schemaCode:J,keyword:Q,it:Y}=D,{opts:B,self:X}=Y;if(!B.validateFormats)return;let G=new LW0.KeywordCxt(Y,X.RULES.all.format.definition,"format");if(G.$data)H();else q();function H(){let V=F.scopeValue("formats",{ref:X.formats,code:B.code.formats}),E=F.const("fmt",m1._`${V}[${G.schemaCode}]`);D.fail$data((0,m1.or)(m1._`typeof ${E} != "object"`,m1._`${E} instanceof RegExp`,m1._`typeof ${E}.compare != "function"`,K(E)))}function q(){let V=G.schema,E=X.formats[V];if(!E||E===!0)return;if(typeof E!="object"||E instanceof RegExp||typeof E.compare!="function")throw Error(`"${Q}": format "${V}" does not define "compare" function`);let Z=F.scopeValue("formats",{key:V,ref:E,code:B.code.formats?m1._`${B.code.formats}${(0,m1.getProperty)(V)}`:void 0});D.fail$data(K(Z))}function K(V){return m1._`${V}.compare(${$}, ${J}) ${OJ[Q].fail} 0`}},dependencies:["format"]};var MW0=(D)=>{return D.addKeyword(by.formatLimitDefinition),D};by.default=MW0});var dy=z((W9,py)=>{Object.defineProperty(W9,"__esModule",{value:!0});var GF=vy(),CW0=uy(),nG=t(),my=new nG.Name("fullFormats"),RW0=new nG.Name("fastFormats"),iG=(D,F={keywords:!0})=>{if(Array.isArray(F))return ly(D,F,GF.fullFormats,my),D;let[$,J]=F.mode==="fast"?[GF.fastFormats,RW0]:[GF.fullFormats,my],Q=F.formats||GF.formatNames;if(ly(D,Q,$,J),F.keywords)(0,CW0.default)(D);return D};iG.get=(D,F="full")=>{let J=(F==="fast"?GF.fastFormats:GF.fullFormats)[D];if(!J)throw Error(`Unknown format "${D}"`);return J};function ly(D,F,$,J){var Q,Y;(Q=(Y=D.opts.code).formats)!==null&&Q!==void 0||(Y.formats=nG._`require("ajv-formats/dist/formats").${J}`);for(let B of F)D.addFormat(B,$[B])}py.exports=W9=iG;Object.defineProperty(W9,"__esModule",{value:!0});W9.default=iG});var OW0=(D,F={})=>{if(typeof D!=="function")throw TypeError(`Expected the first argument to be a function, got \`${typeof D}\``);let{wait:$=0,maxWait:J=Number.POSITIVE_INFINITY,before:Q=!1,after:Y=!0}=F;if($<0||J<0)throw RangeError("`wait` and `maxWait` must not be negative.");if(!Q&&!Y)throw Error("Both `before` and `after` are false, function wouldn't be called.");let B,X,G,H=function(...q){let K=this,V=()=>{if(B=void 0,X)clearTimeout(X),X=void 0;if(Y)G=D.apply(K,q)},E=()=>{if(X=void 0,B)clearTimeout(B),B=void 0;if(Y)G=D.apply(K,q)},Z=Q&&!B;if(clearTimeout(B),B=setTimeout(V,$),J>0&&J!==Number.POSITIVE_INFINITY&&!X)X=setTimeout(E,J);if(Z)G=D.apply(K,q);return G};return y5(H,D),H.cancel=()=>{if(B)clearTimeout(B),B=void 0;if(X)clearTimeout(X),X=void 0},H},aG;var cy=P(()=>{QX();aG=OW0});var H9=z((PP0,ny)=>{var wW0=Number.MAX_SAFE_INTEGER||9007199254740991,TW0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ny.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:wW0,RELEASE_TYPES:TW0,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var q9=z((IP0,iy)=>{var jW0=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...D)=>console.error("SEMVER",...D):()=>{};iy.exports=jW0});var WF=z((A8,ay)=>{var{MAX_SAFE_COMPONENT_LENGTH:oG,MAX_SAFE_BUILD_LENGTH:PW0,MAX_LENGTH:IW0}=H9(),SW0=q9();A8=ay.exports={};var kW0=A8.re=[],vW0=A8.safeRe=[],_=A8.src=[],yW0=A8.safeSrc=[],f=A8.t={},xW0=0,sG="[a-zA-Z0-9-]",_W0=[["\\s",1],["\\d",IW0],[sG,PW0]],fW0=(D)=>{for(let[F,$]of _W0)D=D.split(`${F}*`).join(`${F}{0,${$}}`).split(`${F}+`).join(`${F}{1,${$}}`);return D},$0=(D,F,$)=>{let J=fW0(F),Q=xW0++;SW0(D,Q,F),f[D]=Q,_[Q]=F,yW0[Q]=J,kW0[Q]=new RegExp(F,$?"g":void 0),vW0[Q]=new RegExp(J,$?"g":void 0)};$0("NUMERICIDENTIFIER","0|[1-9]\\d*");$0("NUMERICIDENTIFIERLOOSE","\\d+");$0("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${sG}*`);$0("MAINVERSION",`(${_[f.NUMERICIDENTIFIER]})\\.(${_[f.NUMERICIDENTIFIER]})\\.(${_[f.NUMERICIDENTIFIER]})`);$0("MAINVERSIONLOOSE",`(${_[f.NUMERICIDENTIFIERLOOSE]})\\.(${_[f.NUMERICIDENTIFIERLOOSE]})\\.(${_[f.NUMERICIDENTIFIERLOOSE]})`);$0("PRERELEASEIDENTIFIER",`(?:${_[f.NONNUMERICIDENTIFIER]}|${_[f.NUMERICIDENTIFIER]})`);$0("PRERELEASEIDENTIFIERLOOSE",`(?:${_[f.NONNUMERICIDENTIFIER]}|${_[f.NUMERICIDENTIFIERLOOSE]})`);$0("PRERELEASE",`(?:-(${_[f.PRERELEASEIDENTIFIER]}(?:\\.${_[f.PRERELEASEIDENTIFIER]})*))`);$0("PRERELEASELOOSE",`(?:-?(${_[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[f.PRERELEASEIDENTIFIERLOOSE]})*))`);$0("BUILDIDENTIFIER",`${sG}+`);$0("BUILD",`(?:\\+(${_[f.BUILDIDENTIFIER]}(?:\\.${_[f.BUILDIDENTIFIER]})*))`);$0("FULLPLAIN",`v?${_[f.MAINVERSION]}${_[f.PRERELEASE]}?${_[f.BUILD]}?`);$0("FULL",`^${_[f.FULLPLAIN]}$`);$0("LOOSEPLAIN",`[v=\\s]*${_[f.MAINVERSIONLOOSE]}${_[f.PRERELEASELOOSE]}?${_[f.BUILD]}?`);$0("LOOSE",`^${_[f.LOOSEPLAIN]}$`);$0("GTLT","((?:<|>)?=?)");$0("XRANGEIDENTIFIERLOOSE",`${_[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);$0("XRANGEIDENTIFIER",`${_[f.NUMERICIDENTIFIER]}|x|X|\\*`);$0("XRANGEPLAIN",`[v=\\s]*(${_[f.XRANGEIDENTIFIER]})(?:\\.(${_[f.XRANGEIDENTIFIER]})(?:\\.(${_[f.XRANGEIDENTIFIER]})(?:${_[f.PRERELEASE]})?${_[f.BUILD]}?)?)?`);$0("XRANGEPLAINLOOSE",`[v=\\s]*(${_[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[f.XRANGEIDENTIFIERLOOSE]})(?:${_[f.PRERELEASELOOSE]})?${_[f.BUILD]}?)?)?`);$0("XRANGE",`^${_[f.GTLT]}\\s*${_[f.XRANGEPLAIN]}$`);$0("XRANGELOOSE",`^${_[f.GTLT]}\\s*${_[f.XRANGEPLAINLOOSE]}$`);$0("COERCEPLAIN",`(^|[^\\d])(\\d{1,${oG}})(?:\\.(\\d{1,${oG}}))?(?:\\.(\\d{1,${oG}}))?`);$0("COERCE",`${_[f.COERCEPLAIN]}(?:$|[^\\d])`);$0("COERCEFULL",_[f.COERCEPLAIN]+`(?:${_[f.PRERELEASE]})?(?:${_[f.BUILD]})?(?:$|[^\\d])`);$0("COERCERTL",_[f.COERCE],!0);$0("COERCERTLFULL",_[f.COERCEFULL],!0);$0("LONETILDE","(?:~>?)");$0("TILDETRIM",`(\\s*)${_[f.LONETILDE]}\\s+`,!0);A8.tildeTrimReplace="$1~";$0("TILDE",`^${_[f.LONETILDE]}${_[f.XRANGEPLAIN]}$`);$0("TILDELOOSE",`^${_[f.LONETILDE]}${_[f.XRANGEPLAINLOOSE]}$`);$0("LONECARET","(?:\\^)");$0("CARETTRIM",`(\\s*)${_[f.LONECARET]}\\s+`,!0);A8.caretTrimReplace="$1^";$0("CARET",`^${_[f.LONECARET]}${_[f.XRANGEPLAIN]}$`);$0("CARETLOOSE",`^${_[f.LONECARET]}${_[f.XRANGEPLAINLOOSE]}$`);$0("COMPARATORLOOSE",`^${_[f.GTLT]}\\s*(${_[f.LOOSEPLAIN]})$|^$`);$0("COMPARATOR",`^${_[f.GTLT]}\\s*(${_[f.FULLPLAIN]})$|^$`);$0("COMPARATORTRIM",`(\\s*)${_[f.GTLT]}\\s*(${_[f.LOOSEPLAIN]}|${_[f.XRANGEPLAIN]})`,!0);A8.comparatorTrimReplace="$1$2$3";$0("HYPHENRANGE",`^\\s*(${_[f.XRANGEPLAIN]})\\s+-\\s+(${_[f.XRANGEPLAIN]})\\s*$`);$0("HYPHENRANGELOOSE",`^\\s*(${_[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${_[f.XRANGEPLAINLOOSE]})\\s*$`);$0("STAR","(<|>)?=?\\s*\\*");$0("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");$0("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var wJ=z((SP0,oy)=>{var gW0=Object.freeze({loose:!0}),hW0=Object.freeze({}),bW0=(D)=>{if(!D)return hW0;if(typeof D!=="object")return gW0;return D};oy.exports=bW0});var rG=z((kP0,ty)=>{var sy=/^[0-9]+$/,ry=(D,F)=>{if(typeof D==="number"&&typeof F==="number")return D===F?0:D<F?-1:1;let $=sy.test(D),J=sy.test(F);if($&&J)D=+D,F=+F;return D===F?0:$&&!J?-1:J&&!$?1:D<F?-1:1},uW0=(D,F)=>ry(F,D);ty.exports={compareIdentifiers:ry,rcompareIdentifiers:uW0}});var PD=z((vP0,Dx)=>{var TJ=q9(),{MAX_LENGTH:ey,MAX_SAFE_INTEGER:jJ}=H9(),{safeRe:PJ,t:IJ}=WF(),mW0=wJ(),{compareIdentifiers:tG}=rG();class l1{constructor(D,F){if(F=mW0(F),D instanceof l1)if(D.loose===!!F.loose&&D.includePrerelease===!!F.includePrerelease)return D;else D=D.version;else if(typeof D!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof D}".`);if(D.length>ey)throw TypeError(`version is longer than ${ey} characters`);TJ("SemVer",D,F),this.options=F,this.loose=!!F.loose,this.includePrerelease=!!F.includePrerelease;let $=D.trim().match(F.loose?PJ[IJ.LOOSE]:PJ[IJ.FULL]);if(!$)throw TypeError(`Invalid Version: ${D}`);if(this.raw=D,this.major=+$[1],this.minor=+$[2],this.patch=+$[3],this.major>jJ||this.major<0)throw TypeError("Invalid major version");if(this.minor>jJ||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>jJ||this.patch<0)throw TypeError("Invalid patch version");if(!$[4])this.prerelease=[];else this.prerelease=$[4].split(".").map((J)=>{if(/^[0-9]+$/.test(J)){let Q=+J;if(Q>=0&&Q<jJ)return Q}return J});this.build=$[5]?$[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(D){if(TJ("SemVer.compare",this.version,this.options,D),!(D instanceof l1)){if(typeof D==="string"&&D===this.version)return 0;D=new l1(D,this.options)}if(D.version===this.version)return 0;return this.compareMain(D)||this.comparePre(D)}compareMain(D){if(!(D instanceof l1))D=new l1(D,this.options);if(this.major<D.major)return-1;if(this.major>D.major)return 1;if(this.minor<D.minor)return-1;if(this.minor>D.minor)return 1;if(this.patch<D.patch)return-1;if(this.patch>D.patch)return 1;return 0}comparePre(D){if(!(D instanceof l1))D=new l1(D,this.options);if(this.prerelease.length&&!D.prerelease.length)return-1;else if(!this.prerelease.length&&D.prerelease.length)return 1;else if(!this.prerelease.length&&!D.prerelease.length)return 0;let F=0;do{let $=this.prerelease[F],J=D.prerelease[F];if(TJ("prerelease compare",F,$,J),$===void 0&&J===void 0)return 0;else if(J===void 0)return 1;else if($===void 0)return-1;else if($===J)continue;else return tG($,J)}while(++F)}compareBuild(D){if(!(D instanceof l1))D=new l1(D,this.options);let F=0;do{let $=this.build[F],J=D.build[F];if(TJ("build compare",F,$,J),$===void 0&&J===void 0)return 0;else if(J===void 0)return 1;else if($===void 0)return-1;else if($===J)continue;else return tG($,J)}while(++F)}inc(D,F,$){if(D.startsWith("pre")){if(!F&&$===!1)throw Error("invalid increment argument: identifier is empty");if(F){let J=`-${F}`.match(this.options.loose?PJ[IJ.PRERELEASELOOSE]:PJ[IJ.PRERELEASE]);if(!J||J[1]!==F)throw Error(`invalid identifier: ${F}`)}}switch(D){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",F,$);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",F,$);break;case"prepatch":this.prerelease.length=0,this.inc("patch",F,$),this.inc("pre",F,$);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",F,$);this.inc("pre",F,$);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let J=Number($)?1:0;if(this.prerelease.length===0)this.prerelease=[J];else{let Q=this.prerelease.length;while(--Q>=0)if(typeof this.prerelease[Q]==="number")this.prerelease[Q]++,Q=-2;if(Q===-1){if(F===this.prerelease.join(".")&&$===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(J)}}if(F){let Q=[F,J];if($===!1)Q=[F];if(tG(this.prerelease[0],F)===0){if(isNaN(this.prerelease[1]))this.prerelease=Q}else this.prerelease=Q}break}default:throw Error(`invalid increment argument: ${D}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}Dx.exports=l1});var O4=z((yP0,$x)=>{var Fx=PD(),lW0=(D,F,$=!1)=>{if(D instanceof Fx)return D;try{return new Fx(D,F)}catch(J){if(!$)return null;throw J}};$x.exports=lW0});var Qx=z((xP0,Jx)=>{var pW0=O4(),dW0=(D,F)=>{let $=pW0(D,F);return $?$.version:null};Jx.exports=dW0});var Bx=z((_P0,Yx)=>{var cW0=O4(),nW0=(D,F)=>{let $=cW0(D.trim().replace(/^[=v]+/,""),F);return $?$.version:null};Yx.exports=nW0});var Wx=z((fP0,Gx)=>{var Xx=PD(),iW0=(D,F,$,J,Q)=>{if(typeof $==="string")Q=J,J=$,$=void 0;try{return new Xx(D instanceof Xx?D.version:D,$).inc(F,J,Q).version}catch(Y){return null}};Gx.exports=iW0});var Kx=z((gP0,qx)=>{var Hx=O4(),aW0=(D,F)=>{let $=Hx(D,null,!0),J=Hx(F,null,!0),Q=$.compare(J);if(Q===0)return null;let Y=Q>0,B=Y?$:J,X=Y?J:$,G=!!B.prerelease.length;if(!!X.prerelease.length&&!G){if(!X.patch&&!X.minor)return"major";if(X.compareMain(B)===0){if(X.minor&&!X.patch)return"minor";return"patch"}}let q=G?"pre":"";if($.major!==J.major)return q+"major";if($.minor!==J.minor)return q+"minor";if($.patch!==J.patch)return q+"patch";return"prerelease"};qx.exports=aW0});var Ex=z((hP0,zx)=>{var oW0=PD(),sW0=(D,F)=>new oW0(D,F).major;zx.exports=sW0});var Zx=z((bP0,Vx)=>{var rW0=PD(),tW0=(D,F)=>new rW0(D,F).minor;Vx.exports=tW0});var Lx=z((uP0,Ux)=>{var eW0=PD(),DH0=(D,F)=>new eW0(D,F).patch;Ux.exports=DH0});var Mx=z((mP0,Ax)=>{var FH0=O4(),$H0=(D,F)=>{let $=FH0(D,F);return $&&$.prerelease.length?$.prerelease:null};Ax.exports=$H0});var R1=z((lP0,Cx)=>{var Nx=PD(),JH0=(D,F,$)=>new Nx(D,$).compare(new Nx(F,$));Cx.exports=JH0});var Ox=z((pP0,Rx)=>{var QH0=R1(),YH0=(D,F,$)=>QH0(F,D,$);Rx.exports=YH0});var Tx=z((dP0,wx)=>{var BH0=R1(),XH0=(D,F)=>BH0(D,F,!0);wx.exports=XH0});var SJ=z((cP0,Px)=>{var jx=PD(),GH0=(D,F,$)=>{let J=new jx(D,$),Q=new jx(F,$);return J.compare(Q)||J.compareBuild(Q)};Px.exports=GH0});var Sx=z((nP0,Ix)=>{var WH0=SJ(),HH0=(D,F)=>D.sort(($,J)=>WH0($,J,F));Ix.exports=HH0});var vx=z((iP0,kx)=>{var qH0=SJ(),KH0=(D,F)=>D.sort(($,J)=>qH0(J,$,F));kx.exports=KH0});var K9=z((aP0,yx)=>{var zH0=R1(),EH0=(D,F,$)=>zH0(D,F,$)>0;yx.exports=EH0});var kJ=z((oP0,xx)=>{var VH0=R1(),ZH0=(D,F,$)=>VH0(D,F,$)<0;xx.exports=ZH0});var eG=z((sP0,_x)=>{var UH0=R1(),LH0=(D,F,$)=>UH0(D,F,$)===0;_x.exports=LH0});var DW=z((rP0,fx)=>{var AH0=R1(),MH0=(D,F,$)=>AH0(D,F,$)!==0;fx.exports=MH0});var vJ=z((tP0,gx)=>{var NH0=R1(),CH0=(D,F,$)=>NH0(D,F,$)>=0;gx.exports=CH0});var yJ=z((eP0,hx)=>{var RH0=R1(),OH0=(D,F,$)=>RH0(D,F,$)<=0;hx.exports=OH0});var FW=z((DI0,bx)=>{var wH0=eG(),TH0=DW(),jH0=K9(),PH0=vJ(),IH0=kJ(),SH0=yJ(),kH0=(D,F,$,J)=>{switch(F){case"===":if(typeof D==="object")D=D.version;if(typeof $==="object")$=$.version;return D===$;case"!==":if(typeof D==="object")D=D.version;if(typeof $==="object")$=$.version;return D!==$;case"":case"=":case"==":return wH0(D,$,J);case"!=":return TH0(D,$,J);case">":return jH0(D,$,J);case">=":return PH0(D,$,J);case"<":return IH0(D,$,J);case"<=":return SH0(D,$,J);default:throw TypeError(`Invalid operator: ${F}`)}};bx.exports=kH0});var mx=z((FI0,ux)=>{var vH0=PD(),yH0=O4(),{safeRe:xJ,t:_J}=WF(),xH0=(D,F)=>{if(D instanceof vH0)return D;if(typeof D==="number")D=String(D);if(typeof D!=="string")return null;F=F||{};let $=null;if(!F.rtl)$=D.match(F.includePrerelease?xJ[_J.COERCEFULL]:xJ[_J.COERCE]);else{let G=F.includePrerelease?xJ[_J.COERCERTLFULL]:xJ[_J.COERCERTL],H;while((H=G.exec(D))&&(!$||$.index+$[0].length!==D.length)){if(!$||H.index+H[0].length!==$.index+$[0].length)$=H;G.lastIndex=H.index+H[1].length+H[2].length}G.lastIndex=-1}if($===null)return null;let J=$[2],Q=$[3]||"0",Y=$[4]||"0",B=F.includePrerelease&&$[5]?`-${$[5]}`:"",X=F.includePrerelease&&$[6]?`+${$[6]}`:"";return yH0(`${J}.${Q}.${Y}${B}${X}`,F)};ux.exports=xH0});var dx=z(($I0,px)=>{class lx{constructor(){this.max=1000,this.map=new Map}get(D){let F=this.map.get(D);if(F===void 0)return;else return this.map.delete(D),this.map.set(D,F),F}delete(D){return this.map.delete(D)}set(D,F){if(!this.delete(D)&&F!==void 0){if(this.map.size>=this.max){let J=this.map.keys().next().value;this.delete(J)}this.map.set(D,F)}return this}}px.exports=lx});var O1=z((JI0,ax)=>{var _H0=/\s+/g;class z9{constructor(D,F){if(F=gH0(F),D instanceof z9)if(D.loose===!!F.loose&&D.includePrerelease===!!F.includePrerelease)return D;else return new z9(D.raw,F);if(D instanceof $W)return this.raw=D.value,this.set=[[D]],this.formatted=void 0,this;if(this.options=F,this.loose=!!F.loose,this.includePrerelease=!!F.includePrerelease,this.raw=D.trim().replace(_H0," "),this.set=this.raw.split("||").map(($)=>this.parseRange($.trim())).filter(($)=>$.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let $=this.set[0];if(this.set=this.set.filter((J)=>!nx(J[0])),this.set.length===0)this.set=[$];else if(this.set.length>1){for(let J of this.set)if(J.length===1&&dH0(J[0])){this.set=[J];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let D=0;D<this.set.length;D++){if(D>0)this.formatted+="||";let F=this.set[D];for(let $=0;$<F.length;$++){if($>0)this.formatted+=" ";this.formatted+=F[$].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(D){let $=((this.options.includePrerelease&&lH0)|(this.options.loose&&pH0))+":"+D,J=cx.get($);if(J)return J;let Q=this.options.loose,Y=Q?hD[ID.HYPHENRANGELOOSE]:hD[ID.HYPHENRANGE];D=D.replace(Y,Dq0(this.options.includePrerelease)),m0("hyphen replace",D),D=D.replace(hD[ID.COMPARATORTRIM],bH0),m0("comparator trim",D),D=D.replace(hD[ID.TILDETRIM],uH0),m0("tilde trim",D),D=D.replace(hD[ID.CARETTRIM],mH0),m0("caret trim",D);let B=D.split(" ").map((q)=>cH0(q,this.options)).join(" ").split(/\s+/).map((q)=>eH0(q,this.options));if(Q)B=B.filter((q)=>{return m0("loose invalid filter",q,this.options),!!q.match(hD[ID.COMPARATORLOOSE])});m0("range list",B);let X=new Map,G=B.map((q)=>new $W(q,this.options));for(let q of G){if(nx(q))return[q];X.set(q.value,q)}if(X.size>1&&X.has(""))X.delete("");let H=[...X.values()];return cx.set($,H),H}intersects(D,F){if(!(D instanceof z9))throw TypeError("a Range is required");return this.set.some(($)=>{return ix($,F)&&D.set.some((J)=>{return ix(J,F)&&$.every((Q)=>{return J.every((Y)=>{return Q.intersects(Y,F)})})})})}test(D){if(!D)return!1;if(typeof D==="string")try{D=new hH0(D,this.options)}catch(F){return!1}for(let F=0;F<this.set.length;F++)if(Fq0(this.set[F],D,this.options))return!0;return!1}}ax.exports=z9;var fH0=dx(),cx=new fH0,gH0=wJ(),$W=E9(),m0=q9(),hH0=PD(),{safeRe:hD,t:ID,comparatorTrimReplace:bH0,tildeTrimReplace:uH0,caretTrimReplace:mH0}=WF(),{FLAG_INCLUDE_PRERELEASE:lH0,FLAG_LOOSE:pH0}=H9(),nx=(D)=>D.value==="<0.0.0-0",dH0=(D)=>D.value==="",ix=(D,F)=>{let $=!0,J=D.slice(),Q=J.pop();while($&&J.length)$=J.every((Y)=>{return Q.intersects(Y,F)}),Q=J.pop();return $},cH0=(D,F)=>{return D=D.replace(hD[ID.BUILD],""),m0("comp",D,F),D=aH0(D,F),m0("caret",D),D=nH0(D,F),m0("tildes",D),D=sH0(D,F),m0("xrange",D),D=tH0(D,F),m0("stars",D),D},bD=(D)=>!D||D.toLowerCase()==="x"||D==="*",nH0=(D,F)=>{return D.trim().split(/\s+/).map(($)=>iH0($,F)).join(" ")},iH0=(D,F)=>{let $=F.loose?hD[ID.TILDELOOSE]:hD[ID.TILDE];return D.replace($,(J,Q,Y,B,X)=>{m0("tilde",D,J,Q,Y,B,X);let G;if(bD(Q))G="";else if(bD(Y))G=`>=${Q}.0.0 <${+Q+1}.0.0-0`;else if(bD(B))G=`>=${Q}.${Y}.0 <${Q}.${+Y+1}.0-0`;else if(X)m0("replaceTilde pr",X),G=`>=${Q}.${Y}.${B}-${X} <${Q}.${+Y+1}.0-0`;else G=`>=${Q}.${Y}.${B} <${Q}.${+Y+1}.0-0`;return m0("tilde return",G),G})},aH0=(D,F)=>{return D.trim().split(/\s+/).map(($)=>oH0($,F)).join(" ")},oH0=(D,F)=>{m0("caret",D,F);let $=F.loose?hD[ID.CARETLOOSE]:hD[ID.CARET],J=F.includePrerelease?"-0":"";return D.replace($,(Q,Y,B,X,G)=>{m0("caret",D,Q,Y,B,X,G);let H;if(bD(Y))H="";else if(bD(B))H=`>=${Y}.0.0${J} <${+Y+1}.0.0-0`;else if(bD(X))if(Y==="0")H=`>=${Y}.${B}.0${J} <${Y}.${+B+1}.0-0`;else H=`>=${Y}.${B}.0${J} <${+Y+1}.0.0-0`;else if(G)if(m0("replaceCaret pr",G),Y==="0")if(B==="0")H=`>=${Y}.${B}.${X}-${G} <${Y}.${B}.${+X+1}-0`;else H=`>=${Y}.${B}.${X}-${G} <${Y}.${+B+1}.0-0`;else H=`>=${Y}.${B}.${X}-${G} <${+Y+1}.0.0-0`;else if(m0("no pr"),Y==="0")if(B==="0")H=`>=${Y}.${B}.${X}${J} <${Y}.${B}.${+X+1}-0`;else H=`>=${Y}.${B}.${X}${J} <${Y}.${+B+1}.0-0`;else H=`>=${Y}.${B}.${X} <${+Y+1}.0.0-0`;return m0("caret return",H),H})},sH0=(D,F)=>{return m0("replaceXRanges",D,F),D.split(/\s+/).map(($)=>rH0($,F)).join(" ")},rH0=(D,F)=>{D=D.trim();let $=F.loose?hD[ID.XRANGELOOSE]:hD[ID.XRANGE];return D.replace($,(J,Q,Y,B,X,G)=>{m0("xRange",D,J,Q,Y,B,X,G);let H=bD(Y),q=H||bD(B),K=q||bD(X),V=K;if(Q==="="&&V)Q="";if(G=F.includePrerelease?"-0":"",H)if(Q===">"||Q==="<")J="<0.0.0-0";else J="*";else if(Q&&V){if(q)B=0;if(X=0,Q===">")if(Q=">=",q)Y=+Y+1,B=0,X=0;else B=+B+1,X=0;else if(Q==="<=")if(Q="<",q)Y=+Y+1;else B=+B+1;if(Q==="<")G="-0";J=`${Q+Y}.${B}.${X}${G}`}else if(q)J=`>=${Y}.0.0${G} <${+Y+1}.0.0-0`;else if(K)J=`>=${Y}.${B}.0${G} <${Y}.${+B+1}.0-0`;return m0("xRange return",J),J})},tH0=(D,F)=>{return m0("replaceStars",D,F),D.trim().replace(hD[ID.STAR],"")},eH0=(D,F)=>{return m0("replaceGTE0",D,F),D.trim().replace(hD[F.includePrerelease?ID.GTE0PRE:ID.GTE0],"")},Dq0=(D)=>(F,$,J,Q,Y,B,X,G,H,q,K,V)=>{if(bD(J))$="";else if(bD(Q))$=`>=${J}.0.0${D?"-0":""}`;else if(bD(Y))$=`>=${J}.${Q}.0${D?"-0":""}`;else if(B)$=`>=${$}`;else $=`>=${$}${D?"-0":""}`;if(bD(H))G="";else if(bD(q))G=`<${+H+1}.0.0-0`;else if(bD(K))G=`<${H}.${+q+1}.0-0`;else if(V)G=`<=${H}.${q}.${K}-${V}`;else if(D)G=`<${H}.${q}.${+K+1}-0`;else G=`<=${G}`;return`${$} ${G}`.trim()},Fq0=(D,F,$)=>{for(let J=0;J<D.length;J++)if(!D[J].test(F))return!1;if(F.prerelease.length&&!$.includePrerelease){for(let J=0;J<D.length;J++){if(m0(D[J].semver),D[J].semver===$W.ANY)continue;if(D[J].semver.prerelease.length>0){let Q=D[J].semver;if(Q.major===F.major&&Q.minor===F.minor&&Q.patch===F.patch)return!0}}return!1}return!0}});var E9=z((QI0,D_)=>{var V9=Symbol("SemVer ANY");class fJ{static get ANY(){return V9}constructor(D,F){if(F=ox(F),D instanceof fJ)if(D.loose===!!F.loose)return D;else D=D.value;if(D=D.trim().split(/\s+/).join(" "),QW("comparator",D,F),this.options=F,this.loose=!!F.loose,this.parse(D),this.semver===V9)this.value="";else this.value=this.operator+this.semver.version;QW("comp",this)}parse(D){let F=this.options.loose?sx[rx.COMPARATORLOOSE]:sx[rx.COMPARATOR],$=D.match(F);if(!$)throw TypeError(`Invalid comparator: ${D}`);if(this.operator=$[1]!==void 0?$[1]:"",this.operator==="=")this.operator="";if(!$[2])this.semver=V9;else this.semver=new tx($[2],this.options.loose)}toString(){return this.value}test(D){if(QW("Comparator.test",D,this.options.loose),this.semver===V9||D===V9)return!0;if(typeof D==="string")try{D=new tx(D,this.options)}catch(F){return!1}return JW(D,this.operator,this.semver,this.options)}intersects(D,F){if(!(D instanceof fJ))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new ex(D.value,F).test(this.value)}else if(D.operator===""){if(D.value==="")return!0;return new ex(this.value,F).test(D.semver)}if(F=ox(F),F.includePrerelease&&(this.value==="<0.0.0-0"||D.value==="<0.0.0-0"))return!1;if(!F.includePrerelease&&(this.value.startsWith("<0.0.0")||D.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&D.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&D.operator.startsWith("<"))return!0;if(this.semver.version===D.semver.version&&this.operator.includes("=")&&D.operator.includes("="))return!0;if(JW(this.semver,"<",D.semver,F)&&this.operator.startsWith(">")&&D.operator.startsWith("<"))return!0;if(JW(this.semver,">",D.semver,F)&&this.operator.startsWith("<")&&D.operator.startsWith(">"))return!0;return!1}}D_.exports=fJ;var ox=wJ(),{safeRe:sx,t:rx}=WF(),JW=FW(),QW=q9(),tx=PD(),ex=O1()});var Z9=z((YI0,F_)=>{var $q0=O1(),Jq0=(D,F,$)=>{try{F=new $q0(F,$)}catch(J){return!1}return F.test(D)};F_.exports=Jq0});var J_=z((BI0,$_)=>{var Qq0=O1(),Yq0=(D,F)=>new Qq0(D,F).set.map(($)=>$.map((J)=>J.value).join(" ").trim().split(" "));$_.exports=Yq0});var Y_=z((XI0,Q_)=>{var Bq0=PD(),Xq0=O1(),Gq0=(D,F,$)=>{let J=null,Q=null,Y=null;try{Y=new Xq0(F,$)}catch(B){return null}return D.forEach((B)=>{if(Y.test(B)){if(!J||Q.compare(B)===-1)J=B,Q=new Bq0(J,$)}}),J};Q_.exports=Gq0});var X_=z((GI0,B_)=>{var Wq0=PD(),Hq0=O1(),qq0=(D,F,$)=>{let J=null,Q=null,Y=null;try{Y=new Hq0(F,$)}catch(B){return null}return D.forEach((B)=>{if(Y.test(B)){if(!J||Q.compare(B)===1)J=B,Q=new Wq0(J,$)}}),J};B_.exports=qq0});var H_=z((WI0,W_)=>{var YW=PD(),Kq0=O1(),G_=K9(),zq0=(D,F)=>{D=new Kq0(D,F);let $=new YW("0.0.0");if(D.test($))return $;if($=new YW("0.0.0-0"),D.test($))return $;$=null;for(let J=0;J<D.set.length;++J){let Q=D.set[J],Y=null;if(Q.forEach((B)=>{let X=new YW(B.semver.version);switch(B.operator){case">":if(X.prerelease.length===0)X.patch++;else X.prerelease.push(0);X.raw=X.format();case"":case">=":if(!Y||G_(X,Y))Y=X;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${B.operator}`)}}),Y&&(!$||G_($,Y)))$=Y}if($&&D.test($))return $;return null};W_.exports=zq0});var K_=z((HI0,q_)=>{var Eq0=O1(),Vq0=(D,F)=>{try{return new Eq0(D,F).range||"*"}catch($){return null}};q_.exports=Vq0});var gJ=z((qI0,Z_)=>{var Zq0=PD(),V_=E9(),{ANY:Uq0}=V_,Lq0=O1(),Aq0=Z9(),z_=K9(),E_=kJ(),Mq0=yJ(),Nq0=vJ(),Cq0=(D,F,$,J)=>{D=new Zq0(D,J),F=new Lq0(F,J);let Q,Y,B,X,G;switch($){case">":Q=z_,Y=Mq0,B=E_,X=">",G=">=";break;case"<":Q=E_,Y=Nq0,B=z_,X="<",G="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(Aq0(D,F,J))return!1;for(let H=0;H<F.set.length;++H){let q=F.set[H],K=null,V=null;if(q.forEach((E)=>{if(E.semver===Uq0)E=new V_(">=0.0.0");if(K=K||E,V=V||E,Q(E.semver,K.semver,J))K=E;else if(B(E.semver,V.semver,J))V=E}),K.operator===X||K.operator===G)return!1;if((!V.operator||V.operator===X)&&Y(D,V.semver))return!1;else if(V.operator===G&&B(D,V.semver))return!1}return!0};Z_.exports=Cq0});var L_=z((KI0,U_)=>{var Rq0=gJ(),Oq0=(D,F,$)=>Rq0(D,F,">",$);U_.exports=Oq0});var M_=z((zI0,A_)=>{var wq0=gJ(),Tq0=(D,F,$)=>wq0(D,F,"<",$);A_.exports=Tq0});var R_=z((EI0,C_)=>{var N_=O1(),jq0=(D,F,$)=>{return D=new N_(D,$),F=new N_(F,$),D.intersects(F,$)};C_.exports=jq0});var w_=z((VI0,O_)=>{var Pq0=Z9(),Iq0=R1();O_.exports=(D,F,$)=>{let J=[],Q=null,Y=null,B=D.sort((q,K)=>Iq0(q,K,$));for(let q of B)if(Pq0(q,F,$)){if(Y=q,!Q)Q=q}else{if(Y)J.push([Q,Y]);Y=null,Q=null}if(Q)J.push([Q,null]);let X=[];for(let[q,K]of J)if(q===K)X.push(q);else if(!K&&q===B[0])X.push("*");else if(!K)X.push(`>=${q}`);else if(q===B[0])X.push(`<=${K}`);else X.push(`${q} - ${K}`);let G=X.join(" || "),H=typeof F.raw==="string"?F.raw:String(F);return G.length<H.length?G:F}});var k_=z((ZI0,S_)=>{var T_=O1(),XW=E9(),{ANY:BW}=XW,U9=Z9(),GW=R1(),Sq0=(D,F,$={})=>{if(D===F)return!0;D=new T_(D,$),F=new T_(F,$);let J=!1;D:for(let Q of D.set){for(let Y of F.set){let B=vq0(Q,Y,$);if(J=J||B!==null,B)continue D}if(J)return!1}return!0},kq0=[new XW(">=0.0.0-0")],j_=[new XW(">=0.0.0")],vq0=(D,F,$)=>{if(D===F)return!0;if(D.length===1&&D[0].semver===BW)if(F.length===1&&F[0].semver===BW)return!0;else if($.includePrerelease)D=kq0;else D=j_;if(F.length===1&&F[0].semver===BW)if($.includePrerelease)return!0;else F=j_;let J=new Set,Q,Y;for(let E of D)if(E.operator===">"||E.operator===">=")Q=P_(Q,E,$);else if(E.operator==="<"||E.operator==="<=")Y=I_(Y,E,$);else J.add(E.semver);if(J.size>1)return null;let B;if(Q&&Y){if(B=GW(Q.semver,Y.semver,$),B>0)return null;else if(B===0&&(Q.operator!==">="||Y.operator!=="<="))return null}for(let E of J){if(Q&&!U9(E,String(Q),$))return null;if(Y&&!U9(E,String(Y),$))return null;for(let Z of F)if(!U9(E,String(Z),$))return!1;return!0}let X,G,H,q,K=Y&&!$.includePrerelease&&Y.semver.prerelease.length?Y.semver:!1,V=Q&&!$.includePrerelease&&Q.semver.prerelease.length?Q.semver:!1;if(K&&K.prerelease.length===1&&Y.operator==="<"&&K.prerelease[0]===0)K=!1;for(let E of F){if(q=q||E.operator===">"||E.operator===">=",H=H||E.operator==="<"||E.operator==="<=",Q){if(V){if(E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===V.major&&E.semver.minor===V.minor&&E.semver.patch===V.patch)V=!1}if(E.operator===">"||E.operator===">="){if(X=P_(Q,E,$),X===E&&X!==Q)return!1}else if(Q.operator===">="&&!U9(Q.semver,String(E),$))return!1}if(Y){if(K){if(E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===K.major&&E.semver.minor===K.minor&&E.semver.patch===K.patch)K=!1}if(E.operator==="<"||E.operator==="<="){if(G=I_(Y,E,$),G===E&&G!==Y)return!1}else if(Y.operator==="<="&&!U9(Y.semver,String(E),$))return!1}if(!E.operator&&(Y||Q)&&B!==0)return!1}if(Q&&H&&!Y&&B!==0)return!1;if(Y&&q&&!Q&&B!==0)return!1;if(V||K)return!1;return!0},P_=(D,F,$)=>{if(!D)return F;let J=GW(D.semver,F.semver,$);return J>0?D:J<0?F:F.operator===">"&&D.operator===">="?F:D},I_=(D,F,$)=>{if(!D)return F;let J=GW(D.semver,F.semver,$);return J<0?D:J>0?F:F.operator==="<"&&D.operator==="<="?F:D};S_.exports=Sq0});var __=z((UI0,x_)=>{var WW=WF(),v_=H9(),yq0=PD(),y_=rG(),xq0=O4(),_q0=Qx(),fq0=Bx(),gq0=Wx(),hq0=Kx(),bq0=Ex(),uq0=Zx(),mq0=Lx(),lq0=Mx(),pq0=R1(),dq0=Ox(),cq0=Tx(),nq0=SJ(),iq0=Sx(),aq0=vx(),oq0=K9(),sq0=kJ(),rq0=eG(),tq0=DW(),eq0=vJ(),DK0=yJ(),FK0=FW(),$K0=mx(),JK0=E9(),QK0=O1(),YK0=Z9(),BK0=J_(),XK0=Y_(),GK0=X_(),WK0=H_(),HK0=K_(),qK0=gJ(),KK0=L_(),zK0=M_(),EK0=R_(),VK0=w_(),ZK0=k_();x_.exports={parse:xq0,valid:_q0,clean:fq0,inc:gq0,diff:hq0,major:bq0,minor:uq0,patch:mq0,prerelease:lq0,compare:pq0,rcompare:dq0,compareLoose:cq0,compareBuild:nq0,sort:iq0,rsort:aq0,gt:oq0,lt:sq0,eq:rq0,neq:tq0,gte:eq0,lte:DK0,cmp:FK0,coerce:$K0,Comparator:JK0,Range:QK0,satisfies:YK0,toComparators:BK0,maxSatisfying:XK0,minSatisfying:GK0,minVersion:WK0,validRange:HK0,outside:qK0,gtr:KK0,ltr:zK0,intersects:EK0,simplifyRange:VK0,subset:ZK0,SemVer:yq0,re:WW.re,src:WW.src,tokens:WW.t,SEMVER_SPEC_VERSION:v_.SEMVER_SPEC_VERSION,RELEASE_TYPES:v_.RELEASE_TYPES,compareIdentifiers:y_.compareIdentifiers,rcompareIdentifiers:y_.rcompareIdentifiers}});function g_(D,F,$){if(!D)return!1;if(D.constructor===F)return!0;return UK0.call(D)===$}function h_(D){return g_(D,Uint8Array,"[object Uint8Array]")}function LK0(D){return g_(D,ArrayBuffer,"[object ArrayBuffer]")}function AK0(D){return h_(D)||LK0(D)}function MK0(D){if(!h_(D))throw TypeError(`Expected \`Uint8Array\`, got \`${typeof D}\``)}function NK0(D){if(!AK0(D))throw TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof D}\``)}function HW(D,F){if(D.length===0)return new Uint8Array(0);F??=D.reduce((Q,Y)=>Q+Y.length,0);let $=new Uint8Array(F),J=0;for(let Q of D)MK0(Q),$.set(Q,J),J+=Q.length;return $}function qW(D,F="utf8"){return NK0(D),f_[F]??=new globalThis.TextDecoder(F),f_[F].decode(D)}function CK0(D){if(typeof D!=="string")throw TypeError(`Expected \`string\`, got \`${typeof D}\``)}function hJ(D){return CK0(D),RK0.encode(D)}var UK0,f_,RK0,LI0;var b_=P(()=>{UK0=Object.prototype.toString;f_={utf8:new globalThis.TextDecoder("utf8")};RK0=new globalThis.TextEncoder;LI0=Array.from({length:256},(D,F)=>F.toString(16).padStart(2,"0"))});import{isDeepStrictEqual as OK0}from"util";import u_ from"process";import w4 from"fs";import m_ from"path";import L9 from"crypto";import wK0 from"assert";var p_,d_,T4,TK0,l_="aes-256-cbc",HF=()=>Object.create(null),jK0=(D)=>D!==void 0&&D!==null,PK0=(D,F)=>{let $=new Set(["undefined","symbol","function"]),J=typeof F;if($.has(J))throw TypeError(`Setting a value of type \`${J}\` for key \`${D}\` is not allowed as it's not supported by JSON`)},bJ="__internal__",KW,uJ;var c_=P(()=>{tj();DP();SP();cy();b_();p_=s(Cy(),1),d_=s(dy(),1),T4=s(__(),1),TK0=d_.default.default,KW=`${bJ}.migrations.version`;uJ=class uJ{path;events;#$;#F;#D;#Q={};constructor(D={}){let F={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...D};if(!F.cwd){if(!F.projectName)throw Error("Please specify the `projectName` option.");F.cwd=CX(F.projectName,{suffix:F.projectSuffix}).config}if(this.#D=F,F.schema??F.ajvOptions??F.rootSchema){if(F.schema&&typeof F.schema!=="object")throw TypeError("The `schema` option must be an object.");let Y=new p_.Ajv2020({allErrors:!0,useDefaults:!0,...F.ajvOptions});TK0(Y);let B={...F.rootSchema,type:"object",properties:F.schema};this.#$=Y.compile(B);for(let[X,G]of Object.entries(F.schema??{}))if(G?.default)this.#Q[X]=G.default}if(F.defaults)this.#Q={...this.#Q,...F.defaults};if(F.serialize)this._serialize=F.serialize;if(F.deserialize)this._deserialize=F.deserialize;this.events=new EventTarget,this.#F=F.encryptionKey;let $=F.fileExtension?`.${F.fileExtension}`:"";this.path=m_.resolve(F.cwd,`${F.configName??"config"}${$}`);let J=this.store,Q=Object.assign(HF(),F.defaults,J);if(F.migrations){if(!F.projectVersion)throw Error("Please specify the `projectVersion` option.");this._migrate(F.migrations,F.projectVersion,F.beforeEachMigration)}this._validate(Q);try{wK0.deepEqual(J,Q)}catch{this.store=Q}if(F.watch)this._watch()}get(D,F){if(this.#D.accessPropertiesByDotNotation)return this._get(D,F);let{store:$}=this;return D in $?$[D]:F}set(D,F){if(typeof D!=="string"&&typeof D!=="object")throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof D}`);if(typeof D!=="object"&&F===void 0)throw TypeError("Use `delete()` to clear values");if(this._containsReservedKey(D))throw TypeError(`Please don't use the ${bJ} key, as it's used to manage this module internal operations.`);let{store:$}=this,J=(Q,Y)=>{if(PK0(Q,Y),this.#D.accessPropertiesByDotNotation)AX($,Q,Y);else $[Q]=Y};if(typeof D==="object"){let Q=D;for(let[Y,B]of Object.entries(Q))J(Y,B)}else J(D,F);this.store=$}has(D){if(this.#D.accessPropertiesByDotNotation)return rj(this.store,D);return D in this.store}reset(...D){for(let F of D)if(jK0(this.#Q[F]))this.set(F,this.#Q[F])}delete(D){let{store:F}=this;if(this.#D.accessPropertiesByDotNotation)sj(F,D);else delete F[D];this.store=F}clear(){this.store=HF();for(let D of Object.keys(this.#Q))this.reset(D)}onDidChange(D,F){if(typeof D!=="string")throw TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof D}`);if(typeof F!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof F}`);return this._handleChange(()=>this.get(D),F)}onDidAnyChange(D){if(typeof D!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof D}`);return this._handleChange(()=>this.store,D)}get size(){return Object.keys(this.store).length}get store(){try{let D=w4.readFileSync(this.path,this.#F?null:"utf8"),F=this._encryptData(D),$=this._deserialize(F);return this._validate($),Object.assign(HF(),$)}catch(D){if(D?.code==="ENOENT")return this._ensureDirectory(),HF();if(this.#D.clearInvalidConfig&&D.name==="SyntaxError")return HF();throw D}}set store(D){this._ensureDirectory(),this._validate(D),this._write(D),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(let[D,F]of Object.entries(this.store))yield[D,F]}_encryptData(D){if(!this.#F)return typeof D==="string"?D:qW(D);try{let F=D.slice(0,16),$=L9.pbkdf2Sync(this.#F,F.toString(),1e4,32,"sha512"),J=L9.createDecipheriv(l_,$,F),Q=D.slice(17),Y=typeof Q==="string"?hJ(Q):Q;return qW(HW([J.update(Y),J.final()]))}catch{}return D.toString()}_handleChange(D,F){let $=D(),J=()=>{let Q=$,Y=D();if(OK0(Y,Q))return;$=Y,F.call(this,Y,Q)};return this.events.addEventListener("change",J),()=>{this.events.removeEventListener("change",J)}}_deserialize=(D)=>JSON.parse(D);_serialize=(D)=>JSON.stringify(D,void 0,"\t");_validate(D){if(!this.#$)return;if(this.#$(D)||!this.#$.errors)return;let $=this.#$.errors.map(({instancePath:J,message:Q=""})=>`\`${J.slice(1)}\` ${Q}`);throw Error("Config schema violation: "+$.join("; "))}_ensureDirectory(){w4.mkdirSync(m_.dirname(this.path),{recursive:!0})}_write(D){let F=this._serialize(D);if(this.#F){let $=L9.randomBytes(16),J=L9.pbkdf2Sync(this.#F,$.toString(),1e4,32,"sha512"),Q=L9.createCipheriv(l_,J,$);F=HW([$,hJ(":"),Q.update(hJ(F)),Q.final()])}if(u_.env.SNAP)w4.writeFileSync(this.path,F,{mode:this.#D.configFileMode});else try{yX(this.path,F,{mode:this.#D.configFileMode})}catch($){if($?.code==="EXDEV"){w4.writeFileSync(this.path,F,{mode:this.#D.configFileMode});return}throw $}}_watch(){if(this._ensureDirectory(),!w4.existsSync(this.path))this._write(HF());if(u_.platform==="win32")w4.watch(this.path,{persistent:!1},aG(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100}));else w4.watchFile(this.path,{persistent:!1},aG(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5000}))}_migrate(D,F,$){let J=this._get(KW,"0.0.0"),Q=Object.keys(D).filter((B)=>this._shouldPerformMigration(B,J,F)),Y={...this.store};for(let B of Q)try{if($)$(this,{fromVersion:J,toVersion:B,finalVersion:F,versions:Q});let X=D[B];X?.(this),this._set(KW,B),J=B,Y={...this.store}}catch(X){throw this.store=Y,Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${X}`)}if(this._isVersionInRangeFormat(J)||!T4.default.eq(J,F))this._set(KW,F)}_containsReservedKey(D){if(typeof D==="object"){if(Object.keys(D)[0]===bJ)return!0}if(typeof D!=="string")return!1;if(this.#D.accessPropertiesByDotNotation){if(D.startsWith(`${bJ}.`))return!0;return!1}return!1}_isVersionInRangeFormat(D){return T4.default.clean(D)===null}_shouldPerformMigration(D,F,$){if(this._isVersionInRangeFormat(D)){if(F!=="0.0.0"&&T4.default.satisfies(F,D))return!1;return T4.default.satisfies($,D)}if(T4.default.lte(D,F))return!1;if(T4.default.gt(D,$))return!1;return!0}_get(D,F){return oj(this.store,D,F)}_set(D,F){let{store:$}=this;AX($,D,F),this.store=$}}});var E0,zW,S,M8=(D)=>{switch(typeof D){case"undefined":return S.undefined;case"string":return S.string;case"number":return Number.isNaN(D)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":if(Array.isArray(D))return S.array;if(D===null)return S.null;if(D.then&&typeof D.then==="function"&&D.catch&&typeof D.catch==="function")return S.promise;if(typeof Map<"u"&&D instanceof Map)return S.map;if(typeof Set<"u"&&D instanceof Set)return S.set;if(typeof Date<"u"&&D instanceof Date)return S.date;return S.object;default:return S.unknown}};var A9=P(()=>{(function(D){D.assertEqual=(Q)=>{};function F(Q){}D.assertIs=F;function $(Q){throw Error()}D.assertNever=$,D.arrayToEnum=(Q)=>{let Y={};for(let B of Q)Y[B]=B;return Y},D.getValidEnumValues=(Q)=>{let Y=D.objectKeys(Q).filter((X)=>typeof Q[Q[X]]!=="number"),B={};for(let X of Y)B[X]=Q[X];return D.objectValues(B)},D.objectValues=(Q)=>{return D.objectKeys(Q).map(function(Y){return Q[Y]})},D.objectKeys=typeof Object.keys==="function"?(Q)=>Object.keys(Q):(Q)=>{let Y=[];for(let B in Q)if(Object.prototype.hasOwnProperty.call(Q,B))Y.push(B);return Y},D.find=(Q,Y)=>{for(let B of Q)if(Y(B))return B;return},D.isInteger=typeof Number.isInteger==="function"?(Q)=>Number.isInteger(Q):(Q)=>typeof Q==="number"&&Number.isFinite(Q)&&Math.floor(Q)===Q;function J(Q,Y=" | "){return Q.map((B)=>typeof B==="string"?`'${B}'`:B).join(Y)}D.joinValues=J,D.jsonStringifyReplacer=(Q,Y)=>{if(typeof Y==="bigint")return Y.toString();return Y}})(E0||(E0={}));(function(D){D.mergeShapes=(F,$)=>{return{...F,...$}}})(zW||(zW={}));S=E0.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var T,IK0=(D)=>{return JSON.stringify(D,null,2).replace(/"([^"]+)":/g,"$1:")},eD;var mJ=P(()=>{A9();T=E0.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);eD=class eD extends Error{get errors(){return this.issues}constructor(D){super();this.issues=[],this.addIssue=($)=>{this.issues=[...this.issues,$]},this.addIssues=($=[])=>{this.issues=[...this.issues,...$]};let F=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,F);else this.__proto__=F;this.name="ZodError",this.issues=D}format(D){let F=D||function(Q){return Q.message},$={_errors:[]},J=(Q)=>{for(let Y of Q.issues)if(Y.code==="invalid_union")Y.unionErrors.map(J);else if(Y.code==="invalid_return_type")J(Y.returnTypeError);else if(Y.code==="invalid_arguments")J(Y.argumentsError);else if(Y.path.length===0)$._errors.push(F(Y));else{let B=$,X=0;while(X<Y.path.length){let G=Y.path[X];if(X!==Y.path.length-1)B[G]=B[G]||{_errors:[]};else B[G]=B[G]||{_errors:[]},B[G]._errors.push(F(Y));B=B[G],X++}}};return J(this),$}static assert(D){if(!(D instanceof eD))throw Error(`Not a ZodError: ${D}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,E0.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(D=(F)=>F.message){let F={},$=[];for(let J of this.issues)if(J.path.length>0){let Q=J.path[0];F[Q]=F[Q]||[],F[Q].push(D(J))}else $.push(D(J));return{formErrors:$,fieldErrors:F}}get formErrors(){return this.flatten()}};eD.create=(D)=>{return new eD(D)}});var SK0=(D,F)=>{let $;switch(D.code){case T.invalid_type:if(D.received===S.undefined)$="Required";else $=`Expected ${D.expected}, received ${D.received}`;break;case T.invalid_literal:$=`Invalid literal value, expected ${JSON.stringify(D.expected,E0.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:$=`Unrecognized key(s) in object: ${E0.joinValues(D.keys,", ")}`;break;case T.invalid_union:$="Invalid input";break;case T.invalid_union_discriminator:$=`Invalid discriminator value. Expected ${E0.joinValues(D.options)}`;break;case T.invalid_enum_value:$=`Invalid enum value. Expected ${E0.joinValues(D.options)}, received '${D.received}'`;break;case T.invalid_arguments:$="Invalid function arguments";break;case T.invalid_return_type:$="Invalid function return type";break;case T.invalid_date:$="Invalid date";break;case T.invalid_string:if(typeof D.validation==="object")if("includes"in D.validation){if($=`Invalid input: must include "${D.validation.includes}"`,typeof D.validation.position==="number")$=`${$} at one or more positions greater than or equal to ${D.validation.position}`}else if("startsWith"in D.validation)$=`Invalid input: must start with "${D.validation.startsWith}"`;else if("endsWith"in D.validation)$=`Invalid input: must end with "${D.validation.endsWith}"`;else E0.assertNever(D.validation);else if(D.validation!=="regex")$=`Invalid ${D.validation}`;else $="Invalid";break;case T.too_small:if(D.type==="array")$=`Array must contain ${D.exact?"exactly":D.inclusive?"at least":"more than"} ${D.minimum} element(s)`;else if(D.type==="string")$=`String must contain ${D.exact?"exactly":D.inclusive?"at least":"over"} ${D.minimum} character(s)`;else if(D.type==="number")$=`Number must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${D.minimum}`;else if(D.type==="bigint")$=`Number must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${D.minimum}`;else if(D.type==="date")$=`Date must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(D.minimum))}`;else $="Invalid input";break;case T.too_big:if(D.type==="array")$=`Array must contain ${D.exact?"exactly":D.inclusive?"at most":"less than"} ${D.maximum} element(s)`;else if(D.type==="string")$=`String must contain ${D.exact?"exactly":D.inclusive?"at most":"under"} ${D.maximum} character(s)`;else if(D.type==="number")$=`Number must be ${D.exact?"exactly":D.inclusive?"less than or equal to":"less than"} ${D.maximum}`;else if(D.type==="bigint")$=`BigInt must be ${D.exact?"exactly":D.inclusive?"less than or equal to":"less than"} ${D.maximum}`;else if(D.type==="date")$=`Date must be ${D.exact?"exactly":D.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(D.maximum))}`;else $="Invalid input";break;case T.custom:$="Invalid input";break;case T.invalid_intersection_types:$="Intersection results could not be merged";break;case T.not_multiple_of:$=`Number must be a multiple of ${D.multipleOf}`;break;case T.not_finite:$="Number must be finite";break;default:$=F.defaultError,E0.assertNever(D)}return{message:$}},d8;var EW=P(()=>{mJ();A9();d8=SK0});function kK0(D){n_=D}function qF(){return n_}var n_;var lJ=P(()=>{EW();n_=d8});function v(D,F){let $=qF(),J=M9({issueData:F,data:D.data,path:D.path,errorMaps:[D.common.contextualErrorMap,D.schemaErrorMap,$,$===d8?void 0:d8].filter((Q)=>!!Q)});D.common.issues.push(J)}class ND{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(D,F){let $=[];for(let J of F){if(J.status==="aborted")return i;if(J.status==="dirty")D.dirty();$.push(J.value)}return{status:D.value,value:$}}static async mergeObjectAsync(D,F){let $=[];for(let J of F){let Q=await J.key,Y=await J.value;$.push({key:Q,value:Y})}return ND.mergeObjectSync(D,$)}static mergeObjectSync(D,F){let $={};for(let J of F){let{key:Q,value:Y}=J;if(Q.status==="aborted")return i;if(Y.status==="aborted")return i;if(Q.status==="dirty")D.dirty();if(Y.status==="dirty")D.dirty();if(Q.value!=="__proto__"&&(typeof Y.value<"u"||J.alwaysSet))$[Q.value]=Y.value}return{status:D.value,value:$}}}var M9=(D)=>{let{data:F,path:$,errorMaps:J,issueData:Q}=D,Y=[...$,...Q.path||[]],B={...Q,path:Y};if(Q.message!==void 0)return{...Q,path:Y,message:Q.message};let X="",G=J.filter((H)=>!!H).slice().reverse();for(let H of G)X=H(B,{data:F,defaultError:X}).message;return{...Q,path:Y,message:X}},vK0,i,j4=(D)=>({status:"dirty",value:D}),SD=(D)=>({status:"valid",value:D}),pJ=(D)=>D.status==="aborted",dJ=(D)=>D.status==="dirty",m6=(D)=>D.status==="valid",KF=(D)=>typeof Promise<"u"&&D instanceof Promise;var VW=P(()=>{lJ();EW();vK0=[];i=Object.freeze({status:"aborted"})});var i_=()=>{};var m;var a_=P(()=>{(function(D){D.errToObj=(F)=>typeof F==="string"?{message:F}:F||{},D.toString=(F)=>typeof F==="string"?F:F?.message})(m||(m={}))});class n1{constructor(D,F,$,J){this._cachedPath=[],this.parent=D,this.data=F,this._path=$,this._key=J}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function B0(D){if(!D)return{};let{errorMap:F,invalid_type_error:$,required_error:J,description:Q}=D;if(F&&($||J))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(F)return{errorMap:F,description:Q};return{errorMap:(B,X)=>{let{message:G}=D;if(B.code==="invalid_enum_value")return{message:G??X.defaultError};if(typeof X.data>"u")return{message:G??J??X.defaultError};if(B.code!=="invalid_type")return{message:X.defaultError};return{message:G??$??X.defaultError}},description:Q}}class H0{get description(){return this._def.description}_getType(D){return M8(D.data)}_getOrReturnCtx(D,F){return F||{common:D.parent.common,data:D.data,parsedType:M8(D.data),schemaErrorMap:this._def.errorMap,path:D.path,parent:D.parent}}_processInputParams(D){return{status:new ND,ctx:{common:D.parent.common,data:D.data,parsedType:M8(D.data),schemaErrorMap:this._def.errorMap,path:D.path,parent:D.parent}}}_parseSync(D){let F=this._parse(D);if(KF(F))throw Error("Synchronous parse encountered promise.");return F}_parseAsync(D){let F=this._parse(D);return Promise.resolve(F)}parse(D,F){let $=this.safeParse(D,F);if($.success)return $.data;throw $.error}safeParse(D,F){let $={common:{issues:[],async:F?.async??!1,contextualErrorMap:F?.errorMap},path:F?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:M8(D)},J=this._parseSync({data:D,path:$.path,parent:$});return o_($,J)}"~validate"(D){let F={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:M8(D)};if(!this["~standard"].async)try{let $=this._parseSync({data:D,path:[],parent:F});return m6($)?{value:$.value}:{issues:F.common.issues}}catch($){if($?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;F.common={issues:[],async:!0}}return this._parseAsync({data:D,path:[],parent:F}).then(($)=>m6($)?{value:$.value}:{issues:F.common.issues})}async parseAsync(D,F){let $=await this.safeParseAsync(D,F);if($.success)return $.data;throw $.error}async safeParseAsync(D,F){let $={common:{issues:[],contextualErrorMap:F?.errorMap,async:!0},path:F?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:M8(D)},J=this._parse({data:D,path:$.path,parent:$}),Q=await(KF(J)?J:Promise.resolve(J));return o_($,Q)}refine(D,F){let $=(J)=>{if(typeof F==="string"||typeof F>"u")return{message:F};else if(typeof F==="function")return F(J);else return F};return this._refinement((J,Q)=>{let Y=D(J),B=()=>Q.addIssue({code:T.custom,...$(J)});if(typeof Promise<"u"&&Y instanceof Promise)return Y.then((X)=>{if(!X)return B(),!1;else return!0});if(!Y)return B(),!1;else return!0})}refinement(D,F){return this._refinement(($,J)=>{if(!D($))return J.addIssue(typeof F==="function"?F($,J):F),!1;else return!0})}_refinement(D){return new i1({schema:this,typeName:a.ZodEffects,effect:{type:"refinement",refinement:D}})}superRefine(D){return this._refinement(D)}constructor(D){this.spa=this.safeParseAsync,this._def=D,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(F)=>this["~validate"](F)}}optional(){return c1.create(this,this._def)}nullable(){return n8.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return d1.create(this)}promise(){return k4.create(this,this._def)}or(D){return LF.create([this,D],this._def)}and(D){return AF.create(this,D,this._def)}transform(D){return new i1({...B0(this._def),schema:this,typeName:a.ZodEffects,effect:{type:"transform",transform:D}})}default(D){let F=typeof D==="function"?D:()=>D;return new RF({...B0(this._def),innerType:this,defaultValue:F,typeName:a.ZodDefault})}brand(){return new nJ({typeName:a.ZodBranded,type:this,...B0(this._def)})}catch(D){let F=typeof D==="function"?D:()=>D;return new OF({...B0(this._def),innerType:this,catchValue:F,typeName:a.ZodCatch})}describe(D){return new this.constructor({...this._def,description:D})}pipe(D){return T9.create(this,D)}readonly(){return wF.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function t_(D){let F="[0-5]\\d";if(D.precision)F=`${F}\\.\\d{${D.precision}}`;else if(D.precision==null)F=`${F}(\\.\\d+)?`;let $=D.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${F})${$}`}function oK0(D){return new RegExp(`^${t_(D)}$`)}function e_(D){let F=`${r_}T${t_(D)}`,$=[];if($.push(D.local?"Z?":"Z"),D.offset)$.push("([+-]\\d{2}:?\\d{2})");return F=`${F}(${$.join("|")})`,new RegExp(`^${F}$`)}function sK0(D,F){if((F==="v4"||!F)&&lK0.test(D))return!0;if((F==="v6"||!F)&&dK0.test(D))return!0;return!1}function rK0(D,F){if(!hK0.test(D))return!1;try{let[$]=D.split(".");if(!$)return!1;let J=$.replace(/-/g,"+").replace(/_/g,"/").padEnd($.length+(4-$.length%4)%4,"="),Q=JSON.parse(atob(J));if(typeof Q!=="object"||Q===null)return!1;if("typ"in Q&&Q?.typ!=="JWT")return!1;if(!Q.alg)return!1;if(F&&Q.alg!==F)return!1;return!0}catch{return!1}}function tK0(D,F){if((F==="v4"||!F)&&pK0.test(D))return!0;if((F==="v6"||!F)&&cK0.test(D))return!0;return!1}function eK0(D,F){let $=(D.toString().split(".")[1]||"").length,J=(F.toString().split(".")[1]||"").length,Q=$>J?$:J,Y=Number.parseInt(D.toFixed(Q).replace(".","")),B=Number.parseInt(F.toFixed(Q).replace(".",""));return Y%B/10**Q}function zF(D){if(D instanceof s0){let F={};for(let $ in D.shape){let J=D.shape[$];F[$]=c1.create(zF(J))}return new s0({...D._def,shape:()=>F})}else if(D instanceof d1)return new d1({...D._def,type:zF(D.element)});else if(D instanceof c1)return c1.create(zF(D.unwrap()));else if(D instanceof n8)return n8.create(zF(D.unwrap()));else if(D instanceof C8)return C8.create(D.items.map((F)=>zF(F)));else return D}function UW(D,F){let $=M8(D),J=M8(F);if(D===F)return{valid:!0,data:D};else if($===S.object&&J===S.object){let Q=E0.objectKeys(F),Y=E0.objectKeys(D).filter((X)=>Q.indexOf(X)!==-1),B={...D,...F};for(let X of Y){let G=UW(D[X],F[X]);if(!G.valid)return{valid:!1};B[X]=G.data}return{valid:!0,data:B}}else if($===S.array&&J===S.array){if(D.length!==F.length)return{valid:!1};let Q=[];for(let Y=0;Y<D.length;Y++){let B=D[Y],X=F[Y],G=UW(B,X);if(!G.valid)return{valid:!1};Q.push(G.data)}return{valid:!0,data:Q}}else if($===S.date&&J===S.date&&+D===+F)return{valid:!0,data:D};else return{valid:!1}}function Df(D,F){return new c6({values:D,typeName:a.ZodEnum,...B0(F)})}function s_(D,F){let $=typeof D==="function"?D(F):typeof D==="string"?{message:D}:D;return typeof $==="string"?{message:$}:$}function Ff(D,F={},$){if(D)return I4.create().superRefine((J,Q)=>{let Y=D(J);if(Y instanceof Promise)return Y.then((B)=>{if(!B){let X=s_(F,J),G=X.fatal??$??!0;Q.addIssue({code:"custom",...X,fatal:G})}});if(!Y){let B=s_(F,J),X=B.fatal??$??!0;Q.addIssue({code:"custom",...B,fatal:X})}return});return I4.create()}var o_=(D,F)=>{if(m6(F))return{success:!0,data:F.value};else{if(!D.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let $=new eD(D.common.issues);return this._error=$,this._error}}}},yK0,xK0,_K0,fK0,gK0,hK0,bK0,uK0,mK0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ZW,lK0,pK0,dK0,cK0,nK0,iK0,r_="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",aK0,p1,p6,d6,VF,P4,N9,ZF,UF,I4,l6,N8,C9,d1,s0,LF,c8=(D)=>{if(D instanceof MF)return c8(D.schema);else if(D instanceof i1)return c8(D.innerType());else if(D instanceof NF)return[D.value];else if(D instanceof c6)return D.options;else if(D instanceof CF)return E0.objectValues(D.enum);else if(D instanceof RF)return c8(D._def.innerType);else if(D instanceof ZF)return[void 0];else if(D instanceof UF)return[null];else if(D instanceof c1)return[void 0,...c8(D.unwrap())];else if(D instanceof n8)return[null,...c8(D.unwrap())];else if(D instanceof nJ)return c8(D.unwrap());else if(D instanceof wF)return c8(D.unwrap());else if(D instanceof OF)return c8(D._def.innerType);else return[]},cJ,AF,C8,R9,O9,S4,EF,MF,NF,c6,CF,k4,i1,c1,n8,RF,OF,w9,Dz0,nJ,T9,wF,Fz0,a,$z0=(D,F={message:`Input not instance of ${D.name}`})=>Ff(($)=>$ instanceof D,F),$f,Jf,Jz0,Qz0,Qf,Yz0,Bz0,Xz0,Gz0,Wz0,Hz0,qz0,Kz0,zz0,Ez0,Vz0,Zz0,Uz0,Lz0,Az0,Mz0,Nz0,Cz0,Rz0,Oz0,wz0,Tz0,jz0,Pz0,Iz0,Sz0,kz0,vz0,yz0,xz0=()=>$f().optional(),_z0=()=>Jf().optional(),fz0=()=>Qf().optional(),gz0,hz0;var Yf=P(()=>{mJ();lJ();a_();VW();A9();yK0=/^c[^\s-]{8,}$/i,xK0=/^[0-9a-z]+$/,_K0=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fK0=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,gK0=/^[a-z0-9_-]{21}$/i,hK0=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,bK0=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,uK0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lK0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,pK0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,dK0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,cK0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,nK0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,iK0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,aK0=new RegExp(`^${r_}$`);p1=class p1 extends H0{_parse(D){if(this._def.coerce)D.data=String(D.data);if(this._getType(D)!==S.string){let Q=this._getOrReturnCtx(D);return v(Q,{code:T.invalid_type,expected:S.string,received:Q.parsedType}),i}let $=new ND,J=void 0;for(let Q of this._def.checks)if(Q.kind==="min"){if(D.data.length<Q.value)J=this._getOrReturnCtx(D,J),v(J,{code:T.too_small,minimum:Q.value,type:"string",inclusive:!0,exact:!1,message:Q.message}),$.dirty()}else if(Q.kind==="max"){if(D.data.length>Q.value)J=this._getOrReturnCtx(D,J),v(J,{code:T.too_big,maximum:Q.value,type:"string",inclusive:!0,exact:!1,message:Q.message}),$.dirty()}else if(Q.kind==="length"){let Y=D.data.length>Q.value,B=D.data.length<Q.value;if(Y||B){if(J=this._getOrReturnCtx(D,J),Y)v(J,{code:T.too_big,maximum:Q.value,type:"string",inclusive:!0,exact:!0,message:Q.message});else if(B)v(J,{code:T.too_small,minimum:Q.value,type:"string",inclusive:!0,exact:!0,message:Q.message});$.dirty()}}else if(Q.kind==="email"){if(!uK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"email",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="emoji"){if(!ZW)ZW=new RegExp(mK0,"u");if(!ZW.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"emoji",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="uuid"){if(!fK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"uuid",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="nanoid"){if(!gK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"nanoid",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="cuid"){if(!yK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"cuid",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="cuid2"){if(!xK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"cuid2",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="ulid"){if(!_K0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"ulid",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="url")try{new URL(D.data)}catch{J=this._getOrReturnCtx(D,J),v(J,{validation:"url",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="regex"){if(Q.regex.lastIndex=0,!Q.regex.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"regex",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="trim")D.data=D.data.trim();else if(Q.kind==="includes"){if(!D.data.includes(Q.value,Q.position))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:{includes:Q.value,position:Q.position},message:Q.message}),$.dirty()}else if(Q.kind==="toLowerCase")D.data=D.data.toLowerCase();else if(Q.kind==="toUpperCase")D.data=D.data.toUpperCase();else if(Q.kind==="startsWith"){if(!D.data.startsWith(Q.value))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:{startsWith:Q.value},message:Q.message}),$.dirty()}else if(Q.kind==="endsWith"){if(!D.data.endsWith(Q.value))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:{endsWith:Q.value},message:Q.message}),$.dirty()}else if(Q.kind==="datetime"){if(!e_(Q).test(D.data))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:"datetime",message:Q.message}),$.dirty()}else if(Q.kind==="date"){if(!aK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:"date",message:Q.message}),$.dirty()}else if(Q.kind==="time"){if(!oK0(Q).test(D.data))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:"time",message:Q.message}),$.dirty()}else if(Q.kind==="duration"){if(!bK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"duration",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="ip"){if(!sK0(D.data,Q.version))J=this._getOrReturnCtx(D,J),v(J,{validation:"ip",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="jwt"){if(!rK0(D.data,Q.alg))J=this._getOrReturnCtx(D,J),v(J,{validation:"jwt",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="cidr"){if(!tK0(D.data,Q.version))J=this._getOrReturnCtx(D,J),v(J,{validation:"cidr",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="base64"){if(!nK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"base64",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="base64url"){if(!iK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"base64url",code:T.invalid_string,message:Q.message}),$.dirty()}else E0.assertNever(Q);return{status:$.value,value:D.data}}_regex(D,F,$){return this.refinement((J)=>D.test(J),{validation:F,code:T.invalid_string,...m.errToObj($)})}_addCheck(D){return new p1({...this._def,checks:[...this._def.checks,D]})}email(D){return this._addCheck({kind:"email",...m.errToObj(D)})}url(D){return this._addCheck({kind:"url",...m.errToObj(D)})}emoji(D){return this._addCheck({kind:"emoji",...m.errToObj(D)})}uuid(D){return this._addCheck({kind:"uuid",...m.errToObj(D)})}nanoid(D){return this._addCheck({kind:"nanoid",...m.errToObj(D)})}cuid(D){return this._addCheck({kind:"cuid",...m.errToObj(D)})}cuid2(D){return this._addCheck({kind:"cuid2",...m.errToObj(D)})}ulid(D){return this._addCheck({kind:"ulid",...m.errToObj(D)})}base64(D){return this._addCheck({kind:"base64",...m.errToObj(D)})}base64url(D){return this._addCheck({kind:"base64url",...m.errToObj(D)})}jwt(D){return this._addCheck({kind:"jwt",...m.errToObj(D)})}ip(D){return this._addCheck({kind:"ip",...m.errToObj(D)})}cidr(D){return this._addCheck({kind:"cidr",...m.errToObj(D)})}datetime(D){if(typeof D==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:D});return this._addCheck({kind:"datetime",precision:typeof D?.precision>"u"?null:D?.precision,offset:D?.offset??!1,local:D?.local??!1,...m.errToObj(D?.message)})}date(D){return this._addCheck({kind:"date",message:D})}time(D){if(typeof D==="string")return this._addCheck({kind:"time",precision:null,message:D});return this._addCheck({kind:"time",precision:typeof D?.precision>"u"?null:D?.precision,...m.errToObj(D?.message)})}duration(D){return this._addCheck({kind:"duration",...m.errToObj(D)})}regex(D,F){return this._addCheck({kind:"regex",regex:D,...m.errToObj(F)})}includes(D,F){return this._addCheck({kind:"includes",value:D,position:F?.position,...m.errToObj(F?.message)})}startsWith(D,F){return this._addCheck({kind:"startsWith",value:D,...m.errToObj(F)})}endsWith(D,F){return this._addCheck({kind:"endsWith",value:D,...m.errToObj(F)})}min(D,F){return this._addCheck({kind:"min",value:D,...m.errToObj(F)})}max(D,F){return this._addCheck({kind:"max",value:D,...m.errToObj(F)})}length(D,F){return this._addCheck({kind:"length",value:D,...m.errToObj(F)})}nonempty(D){return this.min(1,m.errToObj(D))}trim(){return new p1({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new p1({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new p1({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((D)=>D.kind==="datetime")}get isDate(){return!!this._def.checks.find((D)=>D.kind==="date")}get isTime(){return!!this._def.checks.find((D)=>D.kind==="time")}get isDuration(){return!!this._def.checks.find((D)=>D.kind==="duration")}get isEmail(){return!!this._def.checks.find((D)=>D.kind==="email")}get isURL(){return!!this._def.checks.find((D)=>D.kind==="url")}get isEmoji(){return!!this._def.checks.find((D)=>D.kind==="emoji")}get isUUID(){return!!this._def.checks.find((D)=>D.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((D)=>D.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((D)=>D.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((D)=>D.kind==="cuid2")}get isULID(){return!!this._def.checks.find((D)=>D.kind==="ulid")}get isIP(){return!!this._def.checks.find((D)=>D.kind==="ip")}get isCIDR(){return!!this._def.checks.find((D)=>D.kind==="cidr")}get isBase64(){return!!this._def.checks.find((D)=>D.kind==="base64")}get isBase64url(){return!!this._def.checks.find((D)=>D.kind==="base64url")}get minLength(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxLength(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}};p1.create=(D)=>{return new p1({checks:[],typeName:a.ZodString,coerce:D?.coerce??!1,...B0(D)})};p6=class p6 extends H0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(D){if(this._def.coerce)D.data=Number(D.data);if(this._getType(D)!==S.number){let Q=this._getOrReturnCtx(D);return v(Q,{code:T.invalid_type,expected:S.number,received:Q.parsedType}),i}let $=void 0,J=new ND;for(let Q of this._def.checks)if(Q.kind==="int"){if(!E0.isInteger(D.data))$=this._getOrReturnCtx(D,$),v($,{code:T.invalid_type,expected:"integer",received:"float",message:Q.message}),J.dirty()}else if(Q.kind==="min"){if(Q.inclusive?D.data<Q.value:D.data<=Q.value)$=this._getOrReturnCtx(D,$),v($,{code:T.too_small,minimum:Q.value,type:"number",inclusive:Q.inclusive,exact:!1,message:Q.message}),J.dirty()}else if(Q.kind==="max"){if(Q.inclusive?D.data>Q.value:D.data>=Q.value)$=this._getOrReturnCtx(D,$),v($,{code:T.too_big,maximum:Q.value,type:"number",inclusive:Q.inclusive,exact:!1,message:Q.message}),J.dirty()}else if(Q.kind==="multipleOf"){if(eK0(D.data,Q.value)!==0)$=this._getOrReturnCtx(D,$),v($,{code:T.not_multiple_of,multipleOf:Q.value,message:Q.message}),J.dirty()}else if(Q.kind==="finite"){if(!Number.isFinite(D.data))$=this._getOrReturnCtx(D,$),v($,{code:T.not_finite,message:Q.message}),J.dirty()}else E0.assertNever(Q);return{status:J.value,value:D.data}}gte(D,F){return this.setLimit("min",D,!0,m.toString(F))}gt(D,F){return this.setLimit("min",D,!1,m.toString(F))}lte(D,F){return this.setLimit("max",D,!0,m.toString(F))}lt(D,F){return this.setLimit("max",D,!1,m.toString(F))}setLimit(D,F,$,J){return new p6({...this._def,checks:[...this._def.checks,{kind:D,value:F,inclusive:$,message:m.toString(J)}]})}_addCheck(D){return new p6({...this._def,checks:[...this._def.checks,D]})}int(D){return this._addCheck({kind:"int",message:m.toString(D)})}positive(D){return this._addCheck({kind:"min",value:0,inclusive:!1,message:m.toString(D)})}negative(D){return this._addCheck({kind:"max",value:0,inclusive:!1,message:m.toString(D)})}nonpositive(D){return this._addCheck({kind:"max",value:0,inclusive:!0,message:m.toString(D)})}nonnegative(D){return this._addCheck({kind:"min",value:0,inclusive:!0,message:m.toString(D)})}multipleOf(D,F){return this._addCheck({kind:"multipleOf",value:D,message:m.toString(F)})}finite(D){return this._addCheck({kind:"finite",message:m.toString(D)})}safe(D){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:m.toString(D)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:m.toString(D)})}get minValue(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxValue(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}get isInt(){return!!this._def.checks.find((D)=>D.kind==="int"||D.kind==="multipleOf"&&E0.isInteger(D.value))}get isFinite(){let D=null,F=null;for(let $ of this._def.checks)if($.kind==="finite"||$.kind==="int"||$.kind==="multipleOf")return!0;else if($.kind==="min"){if(F===null||$.value>F)F=$.value}else if($.kind==="max"){if(D===null||$.value<D)D=$.value}return Number.isFinite(F)&&Number.isFinite(D)}};p6.create=(D)=>{return new p6({checks:[],typeName:a.ZodNumber,coerce:D?.coerce||!1,...B0(D)})};d6=class d6 extends H0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(D){if(this._def.coerce)try{D.data=BigInt(D.data)}catch{return this._getInvalidInput(D)}if(this._getType(D)!==S.bigint)return this._getInvalidInput(D);let $=void 0,J=new ND;for(let Q of this._def.checks)if(Q.kind==="min"){if(Q.inclusive?D.data<Q.value:D.data<=Q.value)$=this._getOrReturnCtx(D,$),v($,{code:T.too_small,type:"bigint",minimum:Q.value,inclusive:Q.inclusive,message:Q.message}),J.dirty()}else if(Q.kind==="max"){if(Q.inclusive?D.data>Q.value:D.data>=Q.value)$=this._getOrReturnCtx(D,$),v($,{code:T.too_big,type:"bigint",maximum:Q.value,inclusive:Q.inclusive,message:Q.message}),J.dirty()}else if(Q.kind==="multipleOf"){if(D.data%Q.value!==BigInt(0))$=this._getOrReturnCtx(D,$),v($,{code:T.not_multiple_of,multipleOf:Q.value,message:Q.message}),J.dirty()}else E0.assertNever(Q);return{status:J.value,value:D.data}}_getInvalidInput(D){let F=this._getOrReturnCtx(D);return v(F,{code:T.invalid_type,expected:S.bigint,received:F.parsedType}),i}gte(D,F){return this.setLimit("min",D,!0,m.toString(F))}gt(D,F){return this.setLimit("min",D,!1,m.toString(F))}lte(D,F){return this.setLimit("max",D,!0,m.toString(F))}lt(D,F){return this.setLimit("max",D,!1,m.toString(F))}setLimit(D,F,$,J){return new d6({...this._def,checks:[...this._def.checks,{kind:D,value:F,inclusive:$,message:m.toString(J)}]})}_addCheck(D){return new d6({...this._def,checks:[...this._def.checks,D]})}positive(D){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:m.toString(D)})}negative(D){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:m.toString(D)})}nonpositive(D){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:m.toString(D)})}nonnegative(D){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:m.toString(D)})}multipleOf(D,F){return this._addCheck({kind:"multipleOf",value:D,message:m.toString(F)})}get minValue(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxValue(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}};d6.create=(D)=>{return new d6({checks:[],typeName:a.ZodBigInt,coerce:D?.coerce??!1,...B0(D)})};VF=class VF extends H0{_parse(D){if(this._def.coerce)D.data=Boolean(D.data);if(this._getType(D)!==S.boolean){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.boolean,received:$.parsedType}),i}return SD(D.data)}};VF.create=(D)=>{return new VF({typeName:a.ZodBoolean,coerce:D?.coerce||!1,...B0(D)})};P4=class P4 extends H0{_parse(D){if(this._def.coerce)D.data=new Date(D.data);if(this._getType(D)!==S.date){let Q=this._getOrReturnCtx(D);return v(Q,{code:T.invalid_type,expected:S.date,received:Q.parsedType}),i}if(Number.isNaN(D.data.getTime())){let Q=this._getOrReturnCtx(D);return v(Q,{code:T.invalid_date}),i}let $=new ND,J=void 0;for(let Q of this._def.checks)if(Q.kind==="min"){if(D.data.getTime()<Q.value)J=this._getOrReturnCtx(D,J),v(J,{code:T.too_small,message:Q.message,inclusive:!0,exact:!1,minimum:Q.value,type:"date"}),$.dirty()}else if(Q.kind==="max"){if(D.data.getTime()>Q.value)J=this._getOrReturnCtx(D,J),v(J,{code:T.too_big,message:Q.message,inclusive:!0,exact:!1,maximum:Q.value,type:"date"}),$.dirty()}else E0.assertNever(Q);return{status:$.value,value:new Date(D.data.getTime())}}_addCheck(D){return new P4({...this._def,checks:[...this._def.checks,D]})}min(D,F){return this._addCheck({kind:"min",value:D.getTime(),message:m.toString(F)})}max(D,F){return this._addCheck({kind:"max",value:D.getTime(),message:m.toString(F)})}get minDate(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D!=null?new Date(D):null}get maxDate(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D!=null?new Date(D):null}};P4.create=(D)=>{return new P4({checks:[],coerce:D?.coerce||!1,typeName:a.ZodDate,...B0(D)})};N9=class N9 extends H0{_parse(D){if(this._getType(D)!==S.symbol){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.symbol,received:$.parsedType}),i}return SD(D.data)}};N9.create=(D)=>{return new N9({typeName:a.ZodSymbol,...B0(D)})};ZF=class ZF extends H0{_parse(D){if(this._getType(D)!==S.undefined){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.undefined,received:$.parsedType}),i}return SD(D.data)}};ZF.create=(D)=>{return new ZF({typeName:a.ZodUndefined,...B0(D)})};UF=class UF extends H0{_parse(D){if(this._getType(D)!==S.null){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.null,received:$.parsedType}),i}return SD(D.data)}};UF.create=(D)=>{return new UF({typeName:a.ZodNull,...B0(D)})};I4=class I4 extends H0{constructor(){super(...arguments);this._any=!0}_parse(D){return SD(D.data)}};I4.create=(D)=>{return new I4({typeName:a.ZodAny,...B0(D)})};l6=class l6 extends H0{constructor(){super(...arguments);this._unknown=!0}_parse(D){return SD(D.data)}};l6.create=(D)=>{return new l6({typeName:a.ZodUnknown,...B0(D)})};N8=class N8 extends H0{_parse(D){let F=this._getOrReturnCtx(D);return v(F,{code:T.invalid_type,expected:S.never,received:F.parsedType}),i}};N8.create=(D)=>{return new N8({typeName:a.ZodNever,...B0(D)})};C9=class C9 extends H0{_parse(D){if(this._getType(D)!==S.undefined){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.void,received:$.parsedType}),i}return SD(D.data)}};C9.create=(D)=>{return new C9({typeName:a.ZodVoid,...B0(D)})};d1=class d1 extends H0{_parse(D){let{ctx:F,status:$}=this._processInputParams(D),J=this._def;if(F.parsedType!==S.array)return v(F,{code:T.invalid_type,expected:S.array,received:F.parsedType}),i;if(J.exactLength!==null){let Y=F.data.length>J.exactLength.value,B=F.data.length<J.exactLength.value;if(Y||B)v(F,{code:Y?T.too_big:T.too_small,minimum:B?J.exactLength.value:void 0,maximum:Y?J.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:J.exactLength.message}),$.dirty()}if(J.minLength!==null){if(F.data.length<J.minLength.value)v(F,{code:T.too_small,minimum:J.minLength.value,type:"array",inclusive:!0,exact:!1,message:J.minLength.message}),$.dirty()}if(J.maxLength!==null){if(F.data.length>J.maxLength.value)v(F,{code:T.too_big,maximum:J.maxLength.value,type:"array",inclusive:!0,exact:!1,message:J.maxLength.message}),$.dirty()}if(F.common.async)return Promise.all([...F.data].map((Y,B)=>{return J.type._parseAsync(new n1(F,Y,F.path,B))})).then((Y)=>{return ND.mergeArray($,Y)});let Q=[...F.data].map((Y,B)=>{return J.type._parseSync(new n1(F,Y,F.path,B))});return ND.mergeArray($,Q)}get element(){return this._def.type}min(D,F){return new d1({...this._def,minLength:{value:D,message:m.toString(F)}})}max(D,F){return new d1({...this._def,maxLength:{value:D,message:m.toString(F)}})}length(D,F){return new d1({...this._def,exactLength:{value:D,message:m.toString(F)}})}nonempty(D){return this.min(1,D)}};d1.create=(D,F)=>{return new d1({type:D,minLength:null,maxLength:null,exactLength:null,typeName:a.ZodArray,...B0(F)})};s0=class s0 extends H0{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let D=this._def.shape(),F=E0.objectKeys(D);return this._cached={shape:D,keys:F},this._cached}_parse(D){if(this._getType(D)!==S.object){let G=this._getOrReturnCtx(D);return v(G,{code:T.invalid_type,expected:S.object,received:G.parsedType}),i}let{status:$,ctx:J}=this._processInputParams(D),{shape:Q,keys:Y}=this._getCached(),B=[];if(!(this._def.catchall instanceof N8&&this._def.unknownKeys==="strip")){for(let G in J.data)if(!Y.includes(G))B.push(G)}let X=[];for(let G of Y){let H=Q[G],q=J.data[G];X.push({key:{status:"valid",value:G},value:H._parse(new n1(J,q,J.path,G)),alwaysSet:G in J.data})}if(this._def.catchall instanceof N8){let G=this._def.unknownKeys;if(G==="passthrough")for(let H of B)X.push({key:{status:"valid",value:H},value:{status:"valid",value:J.data[H]}});else if(G==="strict"){if(B.length>0)v(J,{code:T.unrecognized_keys,keys:B}),$.dirty()}else if(G==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let G=this._def.catchall;for(let H of B){let q=J.data[H];X.push({key:{status:"valid",value:H},value:G._parse(new n1(J,q,J.path,H)),alwaysSet:H in J.data})}}if(J.common.async)return Promise.resolve().then(async()=>{let G=[];for(let H of X){let q=await H.key,K=await H.value;G.push({key:q,value:K,alwaysSet:H.alwaysSet})}return G}).then((G)=>{return ND.mergeObjectSync($,G)});else return ND.mergeObjectSync($,X)}get shape(){return this._def.shape()}strict(D){return m.errToObj,new s0({...this._def,unknownKeys:"strict",...D!==void 0?{errorMap:(F,$)=>{let J=this._def.errorMap?.(F,$).message??$.defaultError;if(F.code==="unrecognized_keys")return{message:m.errToObj(D).message??J};return{message:J}}}:{}})}strip(){return new s0({...this._def,unknownKeys:"strip"})}passthrough(){return new s0({...this._def,unknownKeys:"passthrough"})}extend(D){return new s0({...this._def,shape:()=>({...this._def.shape(),...D})})}merge(D){return new s0({unknownKeys:D._def.unknownKeys,catchall:D._def.catchall,shape:()=>({...this._def.shape(),...D._def.shape()}),typeName:a.ZodObject})}setKey(D,F){return this.augment({[D]:F})}catchall(D){return new s0({...this._def,catchall:D})}pick(D){let F={};for(let $ of E0.objectKeys(D))if(D[$]&&this.shape[$])F[$]=this.shape[$];return new s0({...this._def,shape:()=>F})}omit(D){let F={};for(let $ of E0.objectKeys(this.shape))if(!D[$])F[$]=this.shape[$];return new s0({...this._def,shape:()=>F})}deepPartial(){return zF(this)}partial(D){let F={};for(let $ of E0.objectKeys(this.shape)){let J=this.shape[$];if(D&&!D[$])F[$]=J;else F[$]=J.optional()}return new s0({...this._def,shape:()=>F})}required(D){let F={};for(let $ of E0.objectKeys(this.shape))if(D&&!D[$])F[$]=this.shape[$];else{let Q=this.shape[$];while(Q instanceof c1)Q=Q._def.innerType;F[$]=Q}return new s0({...this._def,shape:()=>F})}keyof(){return Df(E0.objectKeys(this.shape))}};s0.create=(D,F)=>{return new s0({shape:()=>D,unknownKeys:"strip",catchall:N8.create(),typeName:a.ZodObject,...B0(F)})};s0.strictCreate=(D,F)=>{return new s0({shape:()=>D,unknownKeys:"strict",catchall:N8.create(),typeName:a.ZodObject,...B0(F)})};s0.lazycreate=(D,F)=>{return new s0({shape:D,unknownKeys:"strip",catchall:N8.create(),typeName:a.ZodObject,...B0(F)})};LF=class LF extends H0{_parse(D){let{ctx:F}=this._processInputParams(D),$=this._def.options;function J(Q){for(let B of Q)if(B.result.status==="valid")return B.result;for(let B of Q)if(B.result.status==="dirty")return F.common.issues.push(...B.ctx.common.issues),B.result;let Y=Q.map((B)=>new eD(B.ctx.common.issues));return v(F,{code:T.invalid_union,unionErrors:Y}),i}if(F.common.async)return Promise.all($.map(async(Q)=>{let Y={...F,common:{...F.common,issues:[]},parent:null};return{result:await Q._parseAsync({data:F.data,path:F.path,parent:Y}),ctx:Y}})).then(J);else{let Q=void 0,Y=[];for(let X of $){let G={...F,common:{...F.common,issues:[]},parent:null},H=X._parseSync({data:F.data,path:F.path,parent:G});if(H.status==="valid")return H;else if(H.status==="dirty"&&!Q)Q={result:H,ctx:G};if(G.common.issues.length)Y.push(G.common.issues)}if(Q)return F.common.issues.push(...Q.ctx.common.issues),Q.result;let B=Y.map((X)=>new eD(X));return v(F,{code:T.invalid_union,unionErrors:B}),i}}get options(){return this._def.options}};LF.create=(D,F)=>{return new LF({options:D,typeName:a.ZodUnion,...B0(F)})};cJ=class cJ extends H0{_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==S.object)return v(F,{code:T.invalid_type,expected:S.object,received:F.parsedType}),i;let $=this.discriminator,J=F.data[$],Q=this.optionsMap.get(J);if(!Q)return v(F,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[$]}),i;if(F.common.async)return Q._parseAsync({data:F.data,path:F.path,parent:F});else return Q._parseSync({data:F.data,path:F.path,parent:F})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(D,F,$){let J=new Map;for(let Q of F){let Y=c8(Q.shape[D]);if(!Y.length)throw Error(`A discriminator value for key \`${D}\` could not be extracted from all schema options`);for(let B of Y){if(J.has(B))throw Error(`Discriminator property ${String(D)} has duplicate value ${String(B)}`);J.set(B,Q)}}return new cJ({typeName:a.ZodDiscriminatedUnion,discriminator:D,options:F,optionsMap:J,...B0($)})}};AF=class AF extends H0{_parse(D){let{status:F,ctx:$}=this._processInputParams(D),J=(Q,Y)=>{if(pJ(Q)||pJ(Y))return i;let B=UW(Q.value,Y.value);if(!B.valid)return v($,{code:T.invalid_intersection_types}),i;if(dJ(Q)||dJ(Y))F.dirty();return{status:F.value,value:B.data}};if($.common.async)return Promise.all([this._def.left._parseAsync({data:$.data,path:$.path,parent:$}),this._def.right._parseAsync({data:$.data,path:$.path,parent:$})]).then(([Q,Y])=>J(Q,Y));else return J(this._def.left._parseSync({data:$.data,path:$.path,parent:$}),this._def.right._parseSync({data:$.data,path:$.path,parent:$}))}};AF.create=(D,F,$)=>{return new AF({left:D,right:F,typeName:a.ZodIntersection,...B0($)})};C8=class C8 extends H0{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==S.array)return v($,{code:T.invalid_type,expected:S.array,received:$.parsedType}),i;if($.data.length<this._def.items.length)return v($,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i;if(!this._def.rest&&$.data.length>this._def.items.length)v($,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F.dirty();let Q=[...$.data].map((Y,B)=>{let X=this._def.items[B]||this._def.rest;if(!X)return null;return X._parse(new n1($,Y,$.path,B))}).filter((Y)=>!!Y);if($.common.async)return Promise.all(Q).then((Y)=>{return ND.mergeArray(F,Y)});else return ND.mergeArray(F,Q)}get items(){return this._def.items}rest(D){return new C8({...this._def,rest:D})}};C8.create=(D,F)=>{if(!Array.isArray(D))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new C8({items:D,typeName:a.ZodTuple,rest:null,...B0(F)})};R9=class R9 extends H0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==S.object)return v($,{code:T.invalid_type,expected:S.object,received:$.parsedType}),i;let J=[],Q=this._def.keyType,Y=this._def.valueType;for(let B in $.data)J.push({key:Q._parse(new n1($,B,$.path,B)),value:Y._parse(new n1($,$.data[B],$.path,B)),alwaysSet:B in $.data});if($.common.async)return ND.mergeObjectAsync(F,J);else return ND.mergeObjectSync(F,J)}get element(){return this._def.valueType}static create(D,F,$){if(F instanceof H0)return new R9({keyType:D,valueType:F,typeName:a.ZodRecord,...B0($)});return new R9({keyType:p1.create(),valueType:D,typeName:a.ZodRecord,...B0(F)})}};O9=class O9 extends H0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==S.map)return v($,{code:T.invalid_type,expected:S.map,received:$.parsedType}),i;let J=this._def.keyType,Q=this._def.valueType,Y=[...$.data.entries()].map(([B,X],G)=>{return{key:J._parse(new n1($,B,$.path,[G,"key"])),value:Q._parse(new n1($,X,$.path,[G,"value"]))}});if($.common.async){let B=new Map;return Promise.resolve().then(async()=>{for(let X of Y){let G=await X.key,H=await X.value;if(G.status==="aborted"||H.status==="aborted")return i;if(G.status==="dirty"||H.status==="dirty")F.dirty();B.set(G.value,H.value)}return{status:F.value,value:B}})}else{let B=new Map;for(let X of Y){let{key:G,value:H}=X;if(G.status==="aborted"||H.status==="aborted")return i;if(G.status==="dirty"||H.status==="dirty")F.dirty();B.set(G.value,H.value)}return{status:F.value,value:B}}}};O9.create=(D,F,$)=>{return new O9({valueType:F,keyType:D,typeName:a.ZodMap,...B0($)})};S4=class S4 extends H0{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==S.set)return v($,{code:T.invalid_type,expected:S.set,received:$.parsedType}),i;let J=this._def;if(J.minSize!==null){if($.data.size<J.minSize.value)v($,{code:T.too_small,minimum:J.minSize.value,type:"set",inclusive:!0,exact:!1,message:J.minSize.message}),F.dirty()}if(J.maxSize!==null){if($.data.size>J.maxSize.value)v($,{code:T.too_big,maximum:J.maxSize.value,type:"set",inclusive:!0,exact:!1,message:J.maxSize.message}),F.dirty()}let Q=this._def.valueType;function Y(X){let G=new Set;for(let H of X){if(H.status==="aborted")return i;if(H.status==="dirty")F.dirty();G.add(H.value)}return{status:F.value,value:G}}let B=[...$.data.values()].map((X,G)=>Q._parse(new n1($,X,$.path,G)));if($.common.async)return Promise.all(B).then((X)=>Y(X));else return Y(B)}min(D,F){return new S4({...this._def,minSize:{value:D,message:m.toString(F)}})}max(D,F){return new S4({...this._def,maxSize:{value:D,message:m.toString(F)}})}size(D,F){return this.min(D,F).max(D,F)}nonempty(D){return this.min(1,D)}};S4.create=(D,F)=>{return new S4({valueType:D,minSize:null,maxSize:null,typeName:a.ZodSet,...B0(F)})};EF=class EF extends H0{constructor(){super(...arguments);this.validate=this.implement}_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==S.function)return v(F,{code:T.invalid_type,expected:S.function,received:F.parsedType}),i;function $(B,X){return M9({data:B,path:F.path,errorMaps:[F.common.contextualErrorMap,F.schemaErrorMap,qF(),d8].filter((G)=>!!G),issueData:{code:T.invalid_arguments,argumentsError:X}})}function J(B,X){return M9({data:B,path:F.path,errorMaps:[F.common.contextualErrorMap,F.schemaErrorMap,qF(),d8].filter((G)=>!!G),issueData:{code:T.invalid_return_type,returnTypeError:X}})}let Q={errorMap:F.common.contextualErrorMap},Y=F.data;if(this._def.returns instanceof k4){let B=this;return SD(async function(...X){let G=new eD([]),H=await B._def.args.parseAsync(X,Q).catch((V)=>{throw G.addIssue($(X,V)),G}),q=await Reflect.apply(Y,this,H);return await B._def.returns._def.type.parseAsync(q,Q).catch((V)=>{throw G.addIssue(J(q,V)),G})})}else{let B=this;return SD(function(...X){let G=B._def.args.safeParse(X,Q);if(!G.success)throw new eD([$(X,G.error)]);let H=Reflect.apply(Y,this,G.data),q=B._def.returns.safeParse(H,Q);if(!q.success)throw new eD([J(H,q.error)]);return q.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...D){return new EF({...this._def,args:C8.create(D).rest(l6.create())})}returns(D){return new EF({...this._def,returns:D})}implement(D){return this.parse(D)}strictImplement(D){return this.parse(D)}static create(D,F,$){return new EF({args:D?D:C8.create([]).rest(l6.create()),returns:F||l6.create(),typeName:a.ZodFunction,...B0($)})}};MF=class MF extends H0{get schema(){return this._def.getter()}_parse(D){let{ctx:F}=this._processInputParams(D);return this._def.getter()._parse({data:F.data,path:F.path,parent:F})}};MF.create=(D,F)=>{return new MF({getter:D,typeName:a.ZodLazy,...B0(F)})};NF=class NF extends H0{_parse(D){if(D.data!==this._def.value){let F=this._getOrReturnCtx(D);return v(F,{received:F.data,code:T.invalid_literal,expected:this._def.value}),i}return{status:"valid",value:D.data}}get value(){return this._def.value}};NF.create=(D,F)=>{return new NF({value:D,typeName:a.ZodLiteral,...B0(F)})};c6=class c6 extends H0{_parse(D){if(typeof D.data!=="string"){let F=this._getOrReturnCtx(D),$=this._def.values;return v(F,{expected:E0.joinValues($),received:F.parsedType,code:T.invalid_type}),i}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(D.data)){let F=this._getOrReturnCtx(D),$=this._def.values;return v(F,{received:F.data,code:T.invalid_enum_value,options:$}),i}return SD(D.data)}get options(){return this._def.values}get enum(){let D={};for(let F of this._def.values)D[F]=F;return D}get Values(){let D={};for(let F of this._def.values)D[F]=F;return D}get Enum(){let D={};for(let F of this._def.values)D[F]=F;return D}extract(D,F=this._def){return c6.create(D,{...this._def,...F})}exclude(D,F=this._def){return c6.create(this.options.filter(($)=>!D.includes($)),{...this._def,...F})}};c6.create=Df;CF=class CF extends H0{_parse(D){let F=E0.getValidEnumValues(this._def.values),$=this._getOrReturnCtx(D);if($.parsedType!==S.string&&$.parsedType!==S.number){let J=E0.objectValues(F);return v($,{expected:E0.joinValues(J),received:$.parsedType,code:T.invalid_type}),i}if(!this._cache)this._cache=new Set(E0.getValidEnumValues(this._def.values));if(!this._cache.has(D.data)){let J=E0.objectValues(F);return v($,{received:$.data,code:T.invalid_enum_value,options:J}),i}return SD(D.data)}get enum(){return this._def.values}};CF.create=(D,F)=>{return new CF({values:D,typeName:a.ZodNativeEnum,...B0(F)})};k4=class k4 extends H0{unwrap(){return this._def.type}_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==S.promise&&F.common.async===!1)return v(F,{code:T.invalid_type,expected:S.promise,received:F.parsedType}),i;let $=F.parsedType===S.promise?F.data:Promise.resolve(F.data);return SD($.then((J)=>{return this._def.type.parseAsync(J,{path:F.path,errorMap:F.common.contextualErrorMap})}))}};k4.create=(D,F)=>{return new k4({type:D,typeName:a.ZodPromise,...B0(F)})};i1=class i1 extends H0{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===a.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(D){let{status:F,ctx:$}=this._processInputParams(D),J=this._def.effect||null,Q={addIssue:(Y)=>{if(v($,Y),Y.fatal)F.abort();else F.dirty()},get path(){return $.path}};if(Q.addIssue=Q.addIssue.bind(Q),J.type==="preprocess"){let Y=J.transform($.data,Q);if($.common.async)return Promise.resolve(Y).then(async(B)=>{if(F.value==="aborted")return i;let X=await this._def.schema._parseAsync({data:B,path:$.path,parent:$});if(X.status==="aborted")return i;if(X.status==="dirty")return j4(X.value);if(F.value==="dirty")return j4(X.value);return X});else{if(F.value==="aborted")return i;let B=this._def.schema._parseSync({data:Y,path:$.path,parent:$});if(B.status==="aborted")return i;if(B.status==="dirty")return j4(B.value);if(F.value==="dirty")return j4(B.value);return B}}if(J.type==="refinement"){let Y=(B)=>{let X=J.refinement(B,Q);if($.common.async)return Promise.resolve(X);if(X instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return B};if($.common.async===!1){let B=this._def.schema._parseSync({data:$.data,path:$.path,parent:$});if(B.status==="aborted")return i;if(B.status==="dirty")F.dirty();return Y(B.value),{status:F.value,value:B.value}}else return this._def.schema._parseAsync({data:$.data,path:$.path,parent:$}).then((B)=>{if(B.status==="aborted")return i;if(B.status==="dirty")F.dirty();return Y(B.value).then(()=>{return{status:F.value,value:B.value}})})}if(J.type==="transform")if($.common.async===!1){let Y=this._def.schema._parseSync({data:$.data,path:$.path,parent:$});if(!m6(Y))return i;let B=J.transform(Y.value,Q);if(B instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:F.value,value:B}}else return this._def.schema._parseAsync({data:$.data,path:$.path,parent:$}).then((Y)=>{if(!m6(Y))return i;return Promise.resolve(J.transform(Y.value,Q)).then((B)=>({status:F.value,value:B}))});E0.assertNever(J)}};i1.create=(D,F,$)=>{return new i1({schema:D,typeName:a.ZodEffects,effect:F,...B0($)})};i1.createWithPreprocess=(D,F,$)=>{return new i1({schema:F,effect:{type:"preprocess",transform:D},typeName:a.ZodEffects,...B0($)})};c1=class c1 extends H0{_parse(D){if(this._getType(D)===S.undefined)return SD(void 0);return this._def.innerType._parse(D)}unwrap(){return this._def.innerType}};c1.create=(D,F)=>{return new c1({innerType:D,typeName:a.ZodOptional,...B0(F)})};n8=class n8 extends H0{_parse(D){if(this._getType(D)===S.null)return SD(null);return this._def.innerType._parse(D)}unwrap(){return this._def.innerType}};n8.create=(D,F)=>{return new n8({innerType:D,typeName:a.ZodNullable,...B0(F)})};RF=class RF extends H0{_parse(D){let{ctx:F}=this._processInputParams(D),$=F.data;if(F.parsedType===S.undefined)$=this._def.defaultValue();return this._def.innerType._parse({data:$,path:F.path,parent:F})}removeDefault(){return this._def.innerType}};RF.create=(D,F)=>{return new RF({innerType:D,typeName:a.ZodDefault,defaultValue:typeof F.default==="function"?F.default:()=>F.default,...B0(F)})};OF=class OF extends H0{_parse(D){let{ctx:F}=this._processInputParams(D),$={...F,common:{...F.common,issues:[]}},J=this._def.innerType._parse({data:$.data,path:$.path,parent:{...$}});if(KF(J))return J.then((Q)=>{return{status:"valid",value:Q.status==="valid"?Q.value:this._def.catchValue({get error(){return new eD($.common.issues)},input:$.data})}});else return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new eD($.common.issues)},input:$.data})}}removeCatch(){return this._def.innerType}};OF.create=(D,F)=>{return new OF({innerType:D,typeName:a.ZodCatch,catchValue:typeof F.catch==="function"?F.catch:()=>F.catch,...B0(F)})};w9=class w9 extends H0{_parse(D){if(this._getType(D)!==S.nan){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.nan,received:$.parsedType}),i}return{status:"valid",value:D.data}}};w9.create=(D)=>{return new w9({typeName:a.ZodNaN,...B0(D)})};Dz0=Symbol("zod_brand");nJ=class nJ extends H0{_parse(D){let{ctx:F}=this._processInputParams(D),$=F.data;return this._def.type._parse({data:$,path:F.path,parent:F})}unwrap(){return this._def.type}};T9=class T9 extends H0{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.common.async)return(async()=>{let Q=await this._def.in._parseAsync({data:$.data,path:$.path,parent:$});if(Q.status==="aborted")return i;if(Q.status==="dirty")return F.dirty(),j4(Q.value);else return this._def.out._parseAsync({data:Q.value,path:$.path,parent:$})})();else{let J=this._def.in._parseSync({data:$.data,path:$.path,parent:$});if(J.status==="aborted")return i;if(J.status==="dirty")return F.dirty(),{status:"dirty",value:J.value};else return this._def.out._parseSync({data:J.value,path:$.path,parent:$})}}static create(D,F){return new T9({in:D,out:F,typeName:a.ZodPipeline})}};wF=class wF extends H0{_parse(D){let F=this._def.innerType._parse(D),$=(J)=>{if(m6(J))J.value=Object.freeze(J.value);return J};return KF(F)?F.then((J)=>$(J)):$(F)}unwrap(){return this._def.innerType}};wF.create=(D,F)=>{return new wF({innerType:D,typeName:a.ZodReadonly,...B0(F)})};Fz0={object:s0.lazycreate};(function(D){D.ZodString="ZodString",D.ZodNumber="ZodNumber",D.ZodNaN="ZodNaN",D.ZodBigInt="ZodBigInt",D.ZodBoolean="ZodBoolean",D.ZodDate="ZodDate",D.ZodSymbol="ZodSymbol",D.ZodUndefined="ZodUndefined",D.ZodNull="ZodNull",D.ZodAny="ZodAny",D.ZodUnknown="ZodUnknown",D.ZodNever="ZodNever",D.ZodVoid="ZodVoid",D.ZodArray="ZodArray",D.ZodObject="ZodObject",D.ZodUnion="ZodUnion",D.ZodDiscriminatedUnion="ZodDiscriminatedUnion",D.ZodIntersection="ZodIntersection",D.ZodTuple="ZodTuple",D.ZodRecord="ZodRecord",D.ZodMap="ZodMap",D.ZodSet="ZodSet",D.ZodFunction="ZodFunction",D.ZodLazy="ZodLazy",D.ZodLiteral="ZodLiteral",D.ZodEnum="ZodEnum",D.ZodEffects="ZodEffects",D.ZodNativeEnum="ZodNativeEnum",D.ZodOptional="ZodOptional",D.ZodNullable="ZodNullable",D.ZodDefault="ZodDefault",D.ZodCatch="ZodCatch",D.ZodPromise="ZodPromise",D.ZodBranded="ZodBranded",D.ZodPipeline="ZodPipeline",D.ZodReadonly="ZodReadonly"})(a||(a={}));$f=p1.create,Jf=p6.create,Jz0=w9.create,Qz0=d6.create,Qf=VF.create,Yz0=P4.create,Bz0=N9.create,Xz0=ZF.create,Gz0=UF.create,Wz0=I4.create,Hz0=l6.create,qz0=N8.create,Kz0=C9.create,zz0=d1.create,Ez0=s0.create,Vz0=s0.strictCreate,Zz0=LF.create,Uz0=cJ.create,Lz0=AF.create,Az0=C8.create,Mz0=R9.create,Nz0=O9.create,Cz0=S4.create,Rz0=EF.create,Oz0=MF.create,wz0=NF.create,Tz0=c6.create,jz0=CF.create,Pz0=k4.create,Iz0=i1.create,Sz0=c1.create,kz0=n8.create,vz0=i1.createWithPreprocess,yz0=T9.create,gz0={string:(D)=>p1.create({...D,coerce:!0}),number:(D)=>p6.create({...D,coerce:!0}),boolean:(D)=>VF.create({...D,coerce:!0}),bigint:(D)=>d6.create({...D,coerce:!0}),date:(D)=>P4.create({...D,coerce:!0})},hz0=i});var B1={};c4(B1,{void:()=>Kz0,util:()=>E0,unknown:()=>Hz0,union:()=>Zz0,undefined:()=>Xz0,tuple:()=>Az0,transformer:()=>Iz0,symbol:()=>Bz0,string:()=>$f,strictObject:()=>Vz0,setErrorMap:()=>kK0,set:()=>Cz0,record:()=>Mz0,quotelessJson:()=>IK0,promise:()=>Pz0,preprocess:()=>vz0,pipeline:()=>yz0,ostring:()=>xz0,optional:()=>Sz0,onumber:()=>_z0,oboolean:()=>fz0,objectUtil:()=>zW,object:()=>Ez0,number:()=>Jf,nullable:()=>kz0,null:()=>Gz0,never:()=>qz0,nativeEnum:()=>jz0,nan:()=>Jz0,map:()=>Nz0,makeIssue:()=>M9,literal:()=>wz0,lazy:()=>Oz0,late:()=>Fz0,isValid:()=>m6,isDirty:()=>dJ,isAsync:()=>KF,isAborted:()=>pJ,intersection:()=>Lz0,instanceof:()=>$z0,getParsedType:()=>M8,getErrorMap:()=>qF,function:()=>Rz0,enum:()=>Tz0,effect:()=>Iz0,discriminatedUnion:()=>Uz0,defaultErrorMap:()=>d8,datetimeRegex:()=>e_,date:()=>Yz0,custom:()=>Ff,coerce:()=>gz0,boolean:()=>Qf,bigint:()=>Qz0,array:()=>zz0,any:()=>Wz0,addIssueToContext:()=>v,ZodVoid:()=>C9,ZodUnknown:()=>l6,ZodUnion:()=>LF,ZodUndefined:()=>ZF,ZodType:()=>H0,ZodTuple:()=>C8,ZodTransformer:()=>i1,ZodSymbol:()=>N9,ZodString:()=>p1,ZodSet:()=>S4,ZodSchema:()=>H0,ZodRecord:()=>R9,ZodReadonly:()=>wF,ZodPromise:()=>k4,ZodPipeline:()=>T9,ZodParsedType:()=>S,ZodOptional:()=>c1,ZodObject:()=>s0,ZodNumber:()=>p6,ZodNullable:()=>n8,ZodNull:()=>UF,ZodNever:()=>N8,ZodNativeEnum:()=>CF,ZodNaN:()=>w9,ZodMap:()=>O9,ZodLiteral:()=>NF,ZodLazy:()=>MF,ZodIssueCode:()=>T,ZodIntersection:()=>AF,ZodFunction:()=>EF,ZodFirstPartyTypeKind:()=>a,ZodError:()=>eD,ZodEnum:()=>c6,ZodEffects:()=>i1,ZodDiscriminatedUnion:()=>cJ,ZodDefault:()=>RF,ZodDate:()=>P4,ZodCatch:()=>OF,ZodBranded:()=>nJ,ZodBoolean:()=>VF,ZodBigInt:()=>d6,ZodArray:()=>d1,ZodAny:()=>I4,Schema:()=>H0,ParseStatus:()=>ND,OK:()=>SD,NEVER:()=>hz0,INVALID:()=>i,EMPTY_PATH:()=>vK0,DIRTY:()=>j4,BRAND:()=>Dz0});var LW=P(()=>{lJ();VW();i_();A9();Yf();mJ()});var Bf=P(()=>{LW();LW()});import{copyFileSync as bz0,existsSync as Xf,mkdirSync as uz0}from"fs";import{homedir as iJ}from"os";import{join as TF}from"path";function lz0(D){let F=D.trim().replace(/\/+$/,"");try{let $=new URL(F);return $.protocol=$.protocol.toLowerCase(),$.host=$.host.toLowerCase(),$.toString().replace(/\/+$/,"")}catch{return console.error(`[nemar] could not parse stored apiUrl ${JSON.stringify(D)}; leaving as-is`),F}}function pz0(){if(process.env.NEMAR_CONFIG_DIR)return;let D=TF(AW,"config.json");if(Xf(D))return;let F=[];if(process.platform==="darwin")F.push(TF(iJ(),"Library","Preferences","nemar-nodejs","config.json"));if(process.platform==="win32"){let $=process.env.APPDATA||TF(iJ(),"AppData","Roaming");F.push(TF($,"nemar-nodejs","config.json"))}F.push(TF(iJ(),".config","nemar-nodejs","config.json"));for(let $ of F)if(Xf($))try{uz0(AW,{recursive:!0}),bz0($,D),console.error(`[nemar] Config migrated from ${$} to ${D}
91
+ deps: ${$}}`};var $20={keyword:"dependencies",type:"object",schemaType:"object",error:pk.error,code(D){let[F,$]=J20(D);mk(D,F),lk(D,$)}};function J20({schema:D}){let F={},$={};for(let J in D){if(J==="__proto__")continue;let Q=Array.isArray(D[J])?F:$;Q[J]=D[J]}return[F,$]}function mk(D,F=D.schema){let{gen:$,data:J,it:Q}=D;if(Object.keys(F).length===0)return;let Y=$.let("missing");for(let B in F){let X=F[B];if(X.length===0)continue;let G=(0,B9.propertyInData)($,J,B,Q.opts.ownProperties);if(D.setParams({property:B,depsCount:X.length,deps:X.join(", ")}),Q.allErrors)$.if(G,()=>{for(let H of X)(0,B9.checkReportMissingProp)(D,H)});else $.if(wG._`${G} && (${(0,B9.checkMissingProp)(D,X,Y)})`),(0,B9.reportMissingProp)(D,Y),$.else()}}pk.validatePropertyDeps=mk;function lk(D,F=D.schema){let{gen:$,data:J,keyword:Q,it:Y}=D,B=$.name("valid");for(let X in F){if((0,F20.alwaysValidSchema)(Y,F[X]))continue;$.if((0,B9.propertyInData)($,J,X,Y.opts.ownProperties),()=>{let G=D.subschema({keyword:Q,schemaProp:X},B);D.mergeValidEvaluated(G,B)},()=>$.var(B,!0)),D.ok(B)}}pk.validateSchemaDeps=lk;pk.default=$20});var ak=z((ik)=>{Object.defineProperty(ik,"__esModule",{value:!0});var nk=t(),B20=z0(),X20={message:"property name must be valid",params:({params:D})=>nk._`{propertyName: ${D.propertyName}}`},G20={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:X20,code(D){let{gen:F,schema:$,data:J,it:Q}=D;if((0,B20.alwaysValidSchema)(Q,$))return;let Y=F.name("valid");F.forIn("key",J,(B)=>{D.setParams({propertyName:B}),D.subschema({keyword:"propertyNames",data:B,dataTypes:["string"],propertyName:B,compositeRule:!0},Y),F.if((0,nk.not)(Y),()=>{if(D.error(!0),!Q.allErrors)F.break()})}),D.ok(Y)}};ik.default=G20});var TG=z((ok)=>{Object.defineProperty(ok,"__esModule",{value:!0});var LJ=N1(),u1=t(),H20=M1(),AJ=z0(),q20={message:"must NOT have additional properties",params:({params:D})=>u1._`{additionalProperty: ${D.additionalProperty}}`},K20={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:q20,code(D){let{gen:F,schema:$,parentSchema:J,data:Q,errsCount:Y,it:B}=D;if(!Y)throw Error("ajv implementation error");let{allErrors:X,opts:G}=B;if(B.props=!0,G.removeAdditional!=="all"&&(0,AJ.alwaysValidSchema)(B,$))return;let H=(0,LJ.allSchemaProperties)(J.properties),q=(0,LJ.allSchemaProperties)(J.patternProperties);K(),D.ok(u1._`${Y} === ${H20.default.errors}`);function K(){F.forIn("key",Q,(A)=>{if(!H.length&&!q.length)Z(A);else F.if(V(A),()=>Z(A))})}function V(A){let M;if(H.length>8){let R=(0,AJ.schemaRefOrVal)(B,J.properties,"properties");M=(0,LJ.isOwnProperty)(F,R,A)}else if(H.length)M=(0,u1.or)(...H.map((R)=>u1._`${A} === ${R}`));else M=u1.nil;if(q.length)M=(0,u1.or)(M,...q.map((R)=>u1._`${(0,LJ.usePattern)(D,R)}.test(${A})`));return(0,u1.not)(M)}function E(A){F.code(u1._`delete ${Q}[${A}]`)}function Z(A){if(G.removeAdditional==="all"||G.removeAdditional&&$===!1){E(A);return}if($===!1){if(D.setParams({additionalProperty:A}),D.error(),!X)F.break();return}if(typeof $=="object"&&!(0,AJ.alwaysValidSchema)(B,$)){let M=F.name("valid");if(G.removeAdditional==="failing")L(A,M,!1),F.if((0,u1.not)(M),()=>{D.reset(),E(A)});else if(L(A,M),!X)F.if((0,u1.not)(M),()=>F.break())}}function L(A,M,R){let w={keyword:"additionalProperties",dataProp:A,dataPropType:AJ.Type.Str};if(R===!1)Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1});D.subschema(w,M)}}};ok.default=K20});var ek=z((tk)=>{Object.defineProperty(tk,"__esModule",{value:!0});var E20=FF(),sk=N1(),jG=z0(),rk=TG(),V20={keyword:"properties",type:"object",schemaType:"object",code(D){let{gen:F,schema:$,parentSchema:J,data:Q,it:Y}=D;if(Y.opts.removeAdditional==="all"&&J.additionalProperties===void 0)rk.default.code(new E20.KeywordCxt(Y,rk.default,"additionalProperties"));let B=(0,sk.allSchemaProperties)($);for(let K of B)Y.definedProperties.add(K);if(Y.opts.unevaluated&&B.length&&Y.props!==!0)Y.props=jG.mergeEvaluated.props(F,(0,jG.toHash)(B),Y.props);let X=B.filter((K)=>!(0,jG.alwaysValidSchema)(Y,$[K]));if(X.length===0)return;let G=F.name("valid");for(let K of X){if(H(K))q(K);else{if(F.if((0,sk.propertyInData)(F,Q,K,Y.opts.ownProperties)),q(K),!Y.allErrors)F.else().var(G,!0);F.endIf()}D.it.definedProperties.add(K),D.ok(G)}function H(K){return Y.opts.useDefaults&&!Y.compositeRule&&$[K].default!==void 0}function q(K){D.subschema({keyword:"properties",schemaProp:K,dataProp:K},G)}}};tk.default=V20});var Qv=z((Jv)=>{Object.defineProperty(Jv,"__esModule",{value:!0});var Dv=N1(),MJ=t(),Fv=z0(),$v=z0(),U20={keyword:"patternProperties",type:"object",schemaType:"object",code(D){let{gen:F,schema:$,data:J,parentSchema:Q,it:Y}=D,{opts:B}=Y,X=(0,Dv.allSchemaProperties)($),G=X.filter((L)=>(0,Fv.alwaysValidSchema)(Y,$[L]));if(X.length===0||G.length===X.length&&(!Y.opts.unevaluated||Y.props===!0))return;let H=B.strictSchema&&!B.allowMatchingProperties&&Q.properties,q=F.name("valid");if(Y.props!==!0&&!(Y.props instanceof MJ.Name))Y.props=(0,$v.evaluatedPropsToName)(F,Y.props);let{props:K}=Y;V();function V(){for(let L of X){if(H)E(L);if(Y.allErrors)Z(L);else F.var(q,!0),Z(L),F.if(q)}}function E(L){for(let A in H)if(new RegExp(L).test(A))(0,Fv.checkStrictMode)(Y,`property ${A} matches pattern ${L} (use allowMatchingProperties)`)}function Z(L){F.forIn("key",J,(A)=>{F.if(MJ._`${(0,Dv.usePattern)(D,L)}.test(${A})`,()=>{let M=G.includes(L);if(!M)D.subschema({keyword:"patternProperties",schemaProp:L,dataProp:A,dataPropType:$v.Type.Str},q);if(Y.opts.unevaluated&&K!==!0)F.assign(MJ._`${K}[${A}]`,!0);else if(!M&&!Y.allErrors)F.if((0,MJ.not)(q),()=>F.break())})})}}};Jv.default=U20});var Bv=z((Yv)=>{Object.defineProperty(Yv,"__esModule",{value:!0});var A20=z0(),M20={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(D){let{gen:F,schema:$,it:J}=D;if((0,A20.alwaysValidSchema)(J,$)){D.fail();return}let Q=F.name("valid");D.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},Q),D.failResult(Q,()=>D.reset(),()=>D.error())},error:{message:"must NOT be valid"}};Yv.default=M20});var Gv=z((Xv)=>{Object.defineProperty(Xv,"__esModule",{value:!0});var C20=N1(),R20={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:C20.validateUnion,error:{message:"must match a schema in anyOf"}};Xv.default=R20});var Hv=z((Wv)=>{Object.defineProperty(Wv,"__esModule",{value:!0});var NJ=t(),w20=z0(),T20={message:"must match exactly one schema in oneOf",params:({params:D})=>NJ._`{passingSchemas: ${D.passing}}`},j20={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:T20,code(D){let{gen:F,schema:$,parentSchema:J,it:Q}=D;if(!Array.isArray($))throw Error("ajv implementation error");if(Q.opts.discriminator&&J.discriminator)return;let Y=$,B=F.let("valid",!1),X=F.let("passing",null),G=F.name("_valid");D.setParams({passing:X}),F.block(H),D.result(B,()=>D.reset(),()=>D.error(!0));function H(){Y.forEach((q,K)=>{let V;if((0,w20.alwaysValidSchema)(Q,q))F.var(G,!0);else V=D.subschema({keyword:"oneOf",schemaProp:K,compositeRule:!0},G);if(K>0)F.if(NJ._`${G} && ${B}`).assign(B,!1).assign(X,NJ._`[${X}, ${K}]`).else();F.if(G,()=>{if(F.assign(B,!0),F.assign(X,K),V)D.mergeEvaluated(V,NJ.Name)})})}}};Wv.default=j20});var Kv=z((qv)=>{Object.defineProperty(qv,"__esModule",{value:!0});var I20=z0(),S20={keyword:"allOf",schemaType:"array",code(D){let{gen:F,schema:$,it:J}=D;if(!Array.isArray($))throw Error("ajv implementation error");let Q=F.name("valid");$.forEach((Y,B)=>{if((0,I20.alwaysValidSchema)(J,Y))return;let X=D.subschema({keyword:"allOf",schemaProp:B},Q);D.ok(Q),D.mergeEvaluated(X)})}};qv.default=S20});var Zv=z((Vv)=>{Object.defineProperty(Vv,"__esModule",{value:!0});var CJ=t(),Ev=z0(),v20={message:({params:D})=>CJ.str`must match "${D.ifClause}" schema`,params:({params:D})=>CJ._`{failingKeyword: ${D.ifClause}}`},y20={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:v20,code(D){let{gen:F,parentSchema:$,it:J}=D;if($.then===void 0&&$.else===void 0)(0,Ev.checkStrictMode)(J,'"if" without "then" and "else" is ignored');let Q=zv(J,"then"),Y=zv(J,"else");if(!Q&&!Y)return;let B=F.let("valid",!0),X=F.name("_valid");if(G(),D.reset(),Q&&Y){let q=F.let("ifClause");D.setParams({ifClause:q}),F.if(X,H("then",q),H("else",q))}else if(Q)F.if(X,H("then"));else F.if((0,CJ.not)(X),H("else"));D.pass(B,()=>D.error(!0));function G(){let q=D.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},X);D.mergeEvaluated(q)}function H(q,K){return()=>{let V=D.subschema({keyword:q},X);if(F.assign(B,X),D.mergeValidEvaluated(V,B),K)F.assign(K,CJ._`${q}`);else D.setParams({ifClause:q})}}}};function zv(D,F){let $=D.schema[F];return $!==void 0&&!(0,Ev.alwaysValidSchema)(D,$)}Vv.default=y20});var Lv=z((Uv)=>{Object.defineProperty(Uv,"__esModule",{value:!0});var _20=z0(),f20={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:D,parentSchema:F,it:$}){if(F.if===void 0)(0,_20.checkStrictMode)($,`"${D}" without "if" is ignored`)}};Uv.default=f20});var PG=z((Av)=>{Object.defineProperty(Av,"__esModule",{value:!0});var h20=RG(),b20=_k(),u20=OG(),m20=hk(),l20=uk(),p20=UJ(),d20=ak(),c20=TG(),n20=ek(),i20=Qv(),a20=Bv(),o20=Gv(),s20=Hv(),r20=Kv(),t20=Zv(),e20=Lv();function DX0(D=!1){let F=[a20.default,o20.default,s20.default,r20.default,t20.default,e20.default,d20.default,c20.default,p20.default,n20.default,i20.default];if(D)F.push(b20.default,m20.default);else F.push(h20.default,u20.default);return F.push(l20.default),F}Av.default=DX0});var SG=z((Cv)=>{Object.defineProperty(Cv,"__esModule",{value:!0});Cv.dynamicAnchor=void 0;var IG=t(),$X0=M1(),Mv=s5(),JX0=HJ(),QX0={keyword:"$dynamicAnchor",schemaType:"string",code:(D)=>Nv(D,D.schema)};function Nv(D,F){let{gen:$,it:J}=D;J.schemaEnv.root.dynamicAnchors[F]=!0;let Q=IG._`${$X0.default.dynamicAnchors}${(0,IG.getProperty)(F)}`,Y=J.errSchemaPath==="#"?J.validateName:YX0(D);$.if(IG._`!${Q}`,()=>$.assign(Q,Y))}Cv.dynamicAnchor=Nv;function YX0(D){let{schemaEnv:F,schema:$,self:J}=D.it,{root:Q,baseId:Y,localRefs:B,meta:X}=F.root,{schemaId:G}=J.opts,H=new Mv.SchemaEnv({schema:$,schemaId:G,root:Q,baseId:Y,localRefs:B,meta:X});return Mv.compileSchema.call(J,H),(0,JX0.getValidate)(D,H)}Cv.default=QX0});var kG=z((jv)=>{Object.defineProperty(jv,"__esModule",{value:!0});jv.dynamicRef=void 0;var Ov=t(),XX0=M1(),wv=HJ(),GX0={keyword:"$dynamicRef",schemaType:"string",code:(D)=>Tv(D,D.schema)};function Tv(D,F){let{gen:$,keyword:J,it:Q}=D;if(F[0]!=="#")throw Error(`"${J}" only supports hash fragment reference`);let Y=F.slice(1);if(Q.allErrors)B();else{let G=$.let("valid",!1);B(G),D.ok(G)}function B(G){if(Q.schemaEnv.root.dynamicAnchors[Y]){let H=$.let("_v",Ov._`${XX0.default.dynamicAnchors}${(0,Ov.getProperty)(Y)}`);$.if(H,X(H,G),X(Q.validateName,G))}else X(Q.validateName,G)()}function X(G,H){return H?()=>$.block(()=>{(0,wv.callRef)(D,G),$.let(H,!0)}):()=>(0,wv.callRef)(D,G)}}jv.dynamicRef=Tv;jv.default=GX0});var Sv=z((Iv)=>{Object.defineProperty(Iv,"__esModule",{value:!0});var HX0=SG(),qX0=z0(),KX0={keyword:"$recursiveAnchor",schemaType:"boolean",code(D){if(D.schema)(0,HX0.dynamicAnchor)(D,"");else(0,qX0.checkStrictMode)(D.it,"$recursiveAnchor: false is ignored")}};Iv.default=KX0});var vv=z((kv)=>{Object.defineProperty(kv,"__esModule",{value:!0});var EX0=kG(),VX0={keyword:"$recursiveRef",schemaType:"string",code:(D)=>(0,EX0.dynamicRef)(D,D.schema)};kv.default=VX0});var xv=z((yv)=>{Object.defineProperty(yv,"__esModule",{value:!0});var UX0=SG(),LX0=kG(),AX0=Sv(),MX0=vv(),NX0=[UX0.default,LX0.default,AX0.default,MX0.default];yv.default=NX0});var gv=z((fv)=>{Object.defineProperty(fv,"__esModule",{value:!0});var _v=UJ(),RX0={keyword:"dependentRequired",type:"object",schemaType:"object",error:_v.error,code:(D)=>(0,_v.validatePropertyDeps)(D)};fv.default=RX0});var bv=z((hv)=>{Object.defineProperty(hv,"__esModule",{value:!0});var wX0=UJ(),TX0={keyword:"dependentSchemas",type:"object",schemaType:"object",code:(D)=>(0,wX0.validateSchemaDeps)(D)};hv.default=TX0});var mv=z((uv)=>{Object.defineProperty(uv,"__esModule",{value:!0});var PX0=z0(),IX0={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:D,parentSchema:F,it:$}){if(F.contains===void 0)(0,PX0.checkStrictMode)($,`"${D}" without "contains" is ignored`)}};uv.default=IX0});var pv=z((lv)=>{Object.defineProperty(lv,"__esModule",{value:!0});var kX0=gv(),vX0=bv(),yX0=mv(),xX0=[kX0.default,vX0.default,yX0.default];lv.default=xX0});var nv=z((cv)=>{Object.defineProperty(cv,"__esModule",{value:!0});var b6=t(),dv=z0(),fX0=M1(),gX0={message:"must NOT have unevaluated properties",params:({params:D})=>b6._`{unevaluatedProperty: ${D.unevaluatedProperty}}`},hX0={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:gX0,code(D){let{gen:F,schema:$,data:J,errsCount:Q,it:Y}=D;if(!Q)throw Error("ajv implementation error");let{allErrors:B,props:X}=Y;if(X instanceof b6.Name)F.if(b6._`${X} !== true`,()=>F.forIn("key",J,(K)=>F.if(H(X,K),()=>G(K))));else if(X!==!0)F.forIn("key",J,(K)=>X===void 0?G(K):F.if(q(X,K),()=>G(K)));Y.props=!0,D.ok(b6._`${Q} === ${fX0.default.errors}`);function G(K){if($===!1){if(D.setParams({unevaluatedProperty:K}),D.error(),!B)F.break();return}if(!(0,dv.alwaysValidSchema)(Y,$)){let V=F.name("valid");if(D.subschema({keyword:"unevaluatedProperties",dataProp:K,dataPropType:dv.Type.Str},V),!B)F.if((0,b6.not)(V),()=>F.break())}}function H(K,V){return b6._`!${K} || !${K}[${V}]`}function q(K,V){let E=[];for(let Z in K)if(K[Z]===!0)E.push(b6._`${V} !== ${Z}`);return(0,b6.and)(...E)}}};cv.default=hX0});var ov=z((av)=>{Object.defineProperty(av,"__esModule",{value:!0});var R4=t(),iv=z0(),uX0={message:({params:{len:D}})=>R4.str`must NOT have more than ${D} items`,params:({params:{len:D}})=>R4._`{limit: ${D}}`},mX0={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:uX0,code(D){let{gen:F,schema:$,data:J,it:Q}=D,Y=Q.items||0;if(Y===!0)return;let B=F.const("len",R4._`${J}.length`);if($===!1)D.setParams({len:Y}),D.fail(R4._`${B} > ${Y}`);else if(typeof $=="object"&&!(0,iv.alwaysValidSchema)(Q,$)){let G=F.var("valid",R4._`${B} <= ${Y}`);F.if((0,R4.not)(G),()=>X(G,Y)),D.ok(G)}Q.items=!0;function X(G,H){F.forRange("i",H,B,(q)=>{if(D.subschema({keyword:"unevaluatedItems",dataProp:q,dataPropType:iv.Type.Num},G),!Q.allErrors)F.if((0,R4.not)(G),()=>F.break())})}}};av.default=mX0});var rv=z((sv)=>{Object.defineProperty(sv,"__esModule",{value:!0});var pX0=nv(),dX0=ov(),cX0=[pX0.default,dX0.default];sv.default=cX0});var ev=z((tv)=>{Object.defineProperty(tv,"__esModule",{value:!0});var $D=t(),iX0={message:({schemaCode:D})=>$D.str`must match format "${D}"`,params:({schemaCode:D})=>$D._`{format: ${D}}`},aX0={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:iX0,code(D,F){let{gen:$,data:J,$data:Q,schema:Y,schemaCode:B,it:X}=D,{opts:G,errSchemaPath:H,schemaEnv:q,self:K}=X;if(!G.validateFormats)return;if(Q)V();else E();function V(){let Z=$.scopeValue("formats",{ref:K.formats,code:G.code.formats}),L=$.const("fDef",$D._`${Z}[${B}]`),A=$.let("fType"),M=$.let("format");$.if($D._`typeof ${L} == "object" && !(${L} instanceof RegExp)`,()=>$.assign(A,$D._`${L}.type || "string"`).assign(M,$D._`${L}.validate`),()=>$.assign(A,$D._`"string"`).assign(M,L)),D.fail$data((0,$D.or)(R(),w()));function R(){if(G.strictSchema===!1)return $D.nil;return $D._`${B} && !${M}`}function w(){let k=q.$async?$D._`(${L}.async ? await ${M}(${J}) : ${M}(${J}))`:$D._`${M}(${J})`,O=$D._`(typeof ${M} == "function" ? ${k} : ${M}.test(${J}))`;return $D._`${M} && ${M} !== true && ${A} === ${F} && !${O}`}}function E(){let Z=K.formats[Y];if(!Z){R();return}if(Z===!0)return;let[L,A,M]=w(Z);if(L===F)D.pass(k());function R(){if(G.strictSchema===!1){K.logger.warn(O());return}throw Error(O());function O(){return`unknown format "${Y}" ignored in schema at path "${H}"`}}function w(O){let j=O instanceof RegExp?(0,$D.regexpCode)(O):G.code.formats?$D._`${G.code.formats}${(0,$D.getProperty)(Y)}`:void 0,y=$.scopeValue("formats",{key:Y,ref:O,code:j});if(typeof O=="object"&&!(O instanceof RegExp))return[O.type||"string",O.validate,$D._`${y}.validate`];return["string",O,y]}function k(){if(typeof Z=="object"&&!(Z instanceof RegExp)&&Z.async){if(!q.$async)throw Error("async format in sync schema");return $D._`await ${M}(${J})`}return typeof A=="function"?$D._`${M}(${J})`:$D._`${M}.test(${J})`}}}};tv.default=aX0});var vG=z((Dy)=>{Object.defineProperty(Dy,"__esModule",{value:!0});var sX0=ev(),rX0=[sX0.default];Dy.default=rX0});var yG=z((Fy)=>{Object.defineProperty(Fy,"__esModule",{value:!0});Fy.contentVocabulary=Fy.metadataVocabulary=void 0;Fy.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Fy.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Yy=z((Qy)=>{Object.defineProperty(Qy,"__esModule",{value:!0});var DG0=LG(),FG0=NG(),$G0=PG(),JG0=xv(),QG0=pv(),YG0=rv(),BG0=vG(),Jy=yG(),XG0=[JG0.default,DG0.default,FG0.default,(0,$G0.default)(!0),BG0.default,Jy.metadataVocabulary,Jy.contentVocabulary,QG0.default,YG0.default];Qy.default=XG0});var Wy=z((Xy)=>{Object.defineProperty(Xy,"__esModule",{value:!0});Xy.DiscrError=void 0;var By;(function(D){D.Tag="tag",D.Mapping="mapping"})(By||(Xy.DiscrError=By={}))});var _G=z((qy)=>{Object.defineProperty(qy,"__esModule",{value:!0});var YF=t(),xG=Wy(),Hy=s5(),WG0=$F(),HG0=z0(),qG0={message:({params:{discrError:D,tagName:F}})=>D===xG.DiscrError.Tag?`tag "${F}" must be string`:`value of tag "${F}" must be in oneOf`,params:({params:{discrError:D,tag:F,tagName:$}})=>YF._`{error: ${D}, tag: ${$}, tagValue: ${F}}`},KG0={keyword:"discriminator",type:"object",schemaType:"object",error:qG0,code(D){let{gen:F,data:$,schema:J,parentSchema:Q,it:Y}=D,{oneOf:B}=Q;if(!Y.opts.discriminator)throw Error("discriminator: requires discriminator option");let X=J.propertyName;if(typeof X!="string")throw Error("discriminator: requires propertyName");if(J.mapping)throw Error("discriminator: mapping is not supported");if(!B)throw Error("discriminator: requires oneOf keyword");let G=F.let("valid",!1),H=F.const("tag",YF._`${$}${(0,YF.getProperty)(X)}`);F.if(YF._`typeof ${H} == "string"`,()=>q(),()=>D.error(!1,{discrError:xG.DiscrError.Tag,tag:H,tagName:X})),D.ok(G);function q(){let E=V();F.if(!1);for(let Z in E)F.elseIf(YF._`${H} === ${Z}`),F.assign(G,K(E[Z]));F.else(),D.error(!1,{discrError:xG.DiscrError.Mapping,tag:H,tagName:X}),F.endIf()}function K(E){let Z=F.name("valid"),L=D.subschema({keyword:"oneOf",schemaProp:E},Z);return D.mergeEvaluated(L,YF.Name),Z}function V(){var E;let Z={},L=M(Q),A=!0;for(let k=0;k<B.length;k++){let O=B[k];if((O===null||O===void 0?void 0:O.$ref)&&!(0,HG0.schemaHasRulesButRef)(O,Y.self.RULES)){let y=O.$ref;if(O=Hy.resolveRef.call(Y.self,Y.schemaEnv.root,Y.baseId,y),O instanceof Hy.SchemaEnv)O=O.schema;if(O===void 0)throw new WG0.default(Y.opts.uriResolver,Y.baseId,y)}let j=(E=O===null||O===void 0?void 0:O.properties)===null||E===void 0?void 0:E[X];if(typeof j!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${X}"`);A=A&&(L||M(O)),R(j,k)}if(!A)throw Error(`discriminator: "${X}" must be required`);return Z;function M({required:k}){return Array.isArray(k)&&k.includes(X)}function R(k,O){if(k.const)w(k.const,O);else if(k.enum)for(let j of k.enum)w(j,O);else throw Error(`discriminator: "properties/${X}" must have "const" or "enum"`)}function w(k,O){if(typeof k!="string"||k in Z)throw Error(`discriminator: "${X}" values must be unique strings`);Z[k]=O}}}};qy.default=KG0});var Ky=z((rj0,EG0)=>{EG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var zy=z((tj0,VG0)=>{VG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var Ey=z((ej0,ZG0)=>{ZG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var Vy=z((DP0,UG0)=>{UG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var Zy=z((FP0,LG0)=>{LG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var Uy=z(($P0,AG0)=>{AG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var Ly=z((JP0,MG0)=>{MG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var Ay=z((QP0,NG0)=>{NG0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var Ny=z((My)=>{Object.defineProperty(My,"__esModule",{value:!0});var CG0=Ky(),RG0=zy(),OG0=Ey(),wG0=Vy(),TG0=Zy(),jG0=Uy(),PG0=Ly(),IG0=Ay(),SG0=["/properties"];function kG0(D){return[CG0,RG0,OG0,wG0,TG0,F(this,jG0),PG0,F(this,IG0)].forEach(($)=>this.addMetaSchema($,void 0,!1)),this;function F($,J){return D?$.$dataMetaSchema(J,SG0):J}}My.default=kG0});var Cy=z((rD,gG)=>{Object.defineProperty(rD,"__esModule",{value:!0});rD.MissingRefError=rD.ValidationError=rD.CodeGen=rD.Name=rD.nil=rD.stringify=rD.str=rD._=rD.KeywordCxt=rD.Ajv2020=void 0;var yG0=UG(),xG0=Yy(),_G0=_G(),fG0=Ny(),fG="https://json-schema.org/draft/2020-12/schema";class X9 extends yG0.default{constructor(D={}){super({...D,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){if(super._addVocabularies(),xG0.default.forEach((D)=>this.addVocabulary(D)),this.opts.discriminator)this.addKeyword(_G0.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:D,meta:F}=this.opts;if(!F)return;fG0.default.call(this,D),this.refs["http://json-schema.org/schema"]=fG}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(fG)?fG:void 0)}}rD.Ajv2020=X9;gG.exports=rD=X9;gG.exports.Ajv2020=X9;Object.defineProperty(rD,"__esModule",{value:!0});rD.default=X9;var gG0=FF();Object.defineProperty(rD,"KeywordCxt",{enumerable:!0,get:function(){return gG0.KeywordCxt}});var BF=t();Object.defineProperty(rD,"_",{enumerable:!0,get:function(){return BF._}});Object.defineProperty(rD,"str",{enumerable:!0,get:function(){return BF.str}});Object.defineProperty(rD,"stringify",{enumerable:!0,get:function(){return BF.stringify}});Object.defineProperty(rD,"nil",{enumerable:!0,get:function(){return BF.nil}});Object.defineProperty(rD,"Name",{enumerable:!0,get:function(){return BF.Name}});Object.defineProperty(rD,"CodeGen",{enumerable:!0,get:function(){return BF.CodeGen}});var hG0=a5();Object.defineProperty(rD,"ValidationError",{enumerable:!0,get:function(){return hG0.default}});var bG0=$F();Object.defineProperty(rD,"MissingRefError",{enumerable:!0,get:function(){return bG0.default}})});var vy=z((Sy)=>{Object.defineProperty(Sy,"__esModule",{value:!0});Sy.formatNames=Sy.fastFormats=Sy.fullFormats=void 0;function L8(D,F){return{validate:D,compare:F}}Sy.fullFormats={date:L8(Ty,mG),time:L8(bG(!0),lG),"date-time":L8(Ry(!0),Py),"iso-time":L8(bG(),jy),"iso-date-time":L8(Ry(),Iy),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:iG0,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:DW0,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:aG0,int32:{type:"number",validate:rG0},int64:{type:"number",validate:tG0},float:{type:"number",validate:wy},double:{type:"number",validate:wy},password:!0,binary:!0};Sy.fastFormats={...Sy.fullFormats,date:L8(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,mG),time:L8(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,lG),"date-time":L8(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Py),"iso-time":L8(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,jy),"iso-date-time":L8(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Iy),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Sy.formatNames=Object.keys(Sy.fullFormats);function lG0(D){return D%4===0&&(D%100!==0||D%400===0)}var pG0=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,dG0=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Ty(D){let F=pG0.exec(D);if(!F)return!1;let $=+F[1],J=+F[2],Q=+F[3];return J>=1&&J<=12&&Q>=1&&Q<=(J===2&&lG0($)?29:dG0[J])}function mG(D,F){if(!(D&&F))return;if(D>F)return 1;if(D<F)return-1;return 0}var hG=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function bG(D){return function($){let J=hG.exec($);if(!J)return!1;let Q=+J[1],Y=+J[2],B=+J[3],X=J[4],G=J[5]==="-"?-1:1,H=+(J[6]||0),q=+(J[7]||0);if(H>23||q>59||D&&!X)return!1;if(Q<=23&&Y<=59&&B<60)return!0;let K=Y-q*G,V=Q-H*G-(K<0?1:0);return(V===23||V===-1)&&(K===59||K===-1)&&B<61}}function lG(D,F){if(!(D&&F))return;let $=new Date("2020-01-01T"+D).valueOf(),J=new Date("2020-01-01T"+F).valueOf();if(!($&&J))return;return $-J}function jy(D,F){if(!(D&&F))return;let $=hG.exec(D),J=hG.exec(F);if(!($&&J))return;if(D=$[1]+$[2]+$[3],F=J[1]+J[2]+J[3],D>F)return 1;if(D<F)return-1;return 0}var uG=/t|\s/i;function Ry(D){let F=bG(D);return function(J){let Q=J.split(uG);return Q.length===2&&Ty(Q[0])&&F(Q[1])}}function Py(D,F){if(!(D&&F))return;let $=new Date(D).valueOf(),J=new Date(F).valueOf();if(!($&&J))return;return $-J}function Iy(D,F){if(!(D&&F))return;let[$,J]=D.split(uG),[Q,Y]=F.split(uG),B=mG($,Q);if(B===void 0)return;return B||lG(J,Y)}var cG0=/\/|:/,nG0=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function iG0(D){return cG0.test(D)&&nG0.test(D)}var Oy=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function aG0(D){return Oy.lastIndex=0,Oy.test(D)}var oG0=-2147483648,sG0=2147483647;function rG0(D){return Number.isInteger(D)&&D<=sG0&&D>=oG0}function tG0(D){return Number.isInteger(D)}function wy(){return!0}var eG0=/[^\\]\\Z/;function DW0(D){if(eG0.test(D))return!1;try{return new RegExp(D),!0}catch(F){return!1}}});var _y=z((xy)=>{Object.defineProperty(xy,"__esModule",{value:!0});var $W0=LG(),JW0=NG(),QW0=PG(),YW0=vG(),yy=yG(),BW0=[$W0.default,JW0.default,(0,QW0.default)(),YW0.default,yy.metadataVocabulary,yy.contentVocabulary];xy.default=BW0});var fy=z((ZP0,GW0)=>{GW0.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var hy=z((tD,dG)=>{Object.defineProperty(tD,"__esModule",{value:!0});tD.MissingRefError=tD.ValidationError=tD.CodeGen=tD.Name=tD.nil=tD.stringify=tD.str=tD._=tD.KeywordCxt=tD.Ajv=void 0;var WW0=UG(),HW0=_y(),qW0=_G(),gy=fy(),KW0=["/properties"],RJ="http://json-schema.org/draft-07/schema";class G9 extends WW0.default{_addVocabularies(){if(super._addVocabularies(),HW0.default.forEach((D)=>this.addVocabulary(D)),this.opts.discriminator)this.addKeyword(qW0.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let D=this.opts.$data?this.$dataMetaSchema(gy,KW0):gy;this.addMetaSchema(D,RJ,!1),this.refs["http://json-schema.org/schema"]=RJ}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(RJ)?RJ:void 0)}}tD.Ajv=G9;dG.exports=tD=G9;dG.exports.Ajv=G9;Object.defineProperty(tD,"__esModule",{value:!0});tD.default=G9;var zW0=FF();Object.defineProperty(tD,"KeywordCxt",{enumerable:!0,get:function(){return zW0.KeywordCxt}});var XF=t();Object.defineProperty(tD,"_",{enumerable:!0,get:function(){return XF._}});Object.defineProperty(tD,"str",{enumerable:!0,get:function(){return XF.str}});Object.defineProperty(tD,"stringify",{enumerable:!0,get:function(){return XF.stringify}});Object.defineProperty(tD,"nil",{enumerable:!0,get:function(){return XF.nil}});Object.defineProperty(tD,"Name",{enumerable:!0,get:function(){return XF.Name}});Object.defineProperty(tD,"CodeGen",{enumerable:!0,get:function(){return XF.CodeGen}});var EW0=a5();Object.defineProperty(tD,"ValidationError",{enumerable:!0,get:function(){return EW0.default}});var VW0=$F();Object.defineProperty(tD,"MissingRefError",{enumerable:!0,get:function(){return VW0.default}})});var uy=z((by)=>{Object.defineProperty(by,"__esModule",{value:!0});by.formatLimitDefinition=void 0;var LW0=hy(),m1=t(),u6=m1.operators,OJ={formatMaximum:{okStr:"<=",ok:u6.LTE,fail:u6.GT},formatMinimum:{okStr:">=",ok:u6.GTE,fail:u6.LT},formatExclusiveMaximum:{okStr:"<",ok:u6.LT,fail:u6.GTE},formatExclusiveMinimum:{okStr:">",ok:u6.GT,fail:u6.LTE}},AW0={message:({keyword:D,schemaCode:F})=>m1.str`should be ${OJ[D].okStr} ${F}`,params:({keyword:D,schemaCode:F})=>m1._`{comparison: ${OJ[D].okStr}, limit: ${F}}`};by.formatLimitDefinition={keyword:Object.keys(OJ),type:"string",schemaType:"string",$data:!0,error:AW0,code(D){let{gen:F,data:$,schemaCode:J,keyword:Q,it:Y}=D,{opts:B,self:X}=Y;if(!B.validateFormats)return;let G=new LW0.KeywordCxt(Y,X.RULES.all.format.definition,"format");if(G.$data)H();else q();function H(){let V=F.scopeValue("formats",{ref:X.formats,code:B.code.formats}),E=F.const("fmt",m1._`${V}[${G.schemaCode}]`);D.fail$data((0,m1.or)(m1._`typeof ${E} != "object"`,m1._`${E} instanceof RegExp`,m1._`typeof ${E}.compare != "function"`,K(E)))}function q(){let V=G.schema,E=X.formats[V];if(!E||E===!0)return;if(typeof E!="object"||E instanceof RegExp||typeof E.compare!="function")throw Error(`"${Q}": format "${V}" does not define "compare" function`);let Z=F.scopeValue("formats",{key:V,ref:E,code:B.code.formats?m1._`${B.code.formats}${(0,m1.getProperty)(V)}`:void 0});D.fail$data(K(Z))}function K(V){return m1._`${V}.compare(${$}, ${J}) ${OJ[Q].fail} 0`}},dependencies:["format"]};var MW0=(D)=>{return D.addKeyword(by.formatLimitDefinition),D};by.default=MW0});var dy=z((W9,py)=>{Object.defineProperty(W9,"__esModule",{value:!0});var GF=vy(),CW0=uy(),nG=t(),my=new nG.Name("fullFormats"),RW0=new nG.Name("fastFormats"),iG=(D,F={keywords:!0})=>{if(Array.isArray(F))return ly(D,F,GF.fullFormats,my),D;let[$,J]=F.mode==="fast"?[GF.fastFormats,RW0]:[GF.fullFormats,my],Q=F.formats||GF.formatNames;if(ly(D,Q,$,J),F.keywords)(0,CW0.default)(D);return D};iG.get=(D,F="full")=>{let J=(F==="fast"?GF.fastFormats:GF.fullFormats)[D];if(!J)throw Error(`Unknown format "${D}"`);return J};function ly(D,F,$,J){var Q,Y;(Q=(Y=D.opts.code).formats)!==null&&Q!==void 0||(Y.formats=nG._`require("ajv-formats/dist/formats").${J}`);for(let B of F)D.addFormat(B,$[B])}py.exports=W9=iG;Object.defineProperty(W9,"__esModule",{value:!0});W9.default=iG});var OW0=(D,F={})=>{if(typeof D!=="function")throw TypeError(`Expected the first argument to be a function, got \`${typeof D}\``);let{wait:$=0,maxWait:J=Number.POSITIVE_INFINITY,before:Q=!1,after:Y=!0}=F;if($<0||J<0)throw RangeError("`wait` and `maxWait` must not be negative.");if(!Q&&!Y)throw Error("Both `before` and `after` are false, function wouldn't be called.");let B,X,G,H=function(...q){let K=this,V=()=>{if(B=void 0,X)clearTimeout(X),X=void 0;if(Y)G=D.apply(K,q)},E=()=>{if(X=void 0,B)clearTimeout(B),B=void 0;if(Y)G=D.apply(K,q)},Z=Q&&!B;if(clearTimeout(B),B=setTimeout(V,$),J>0&&J!==Number.POSITIVE_INFINITY&&!X)X=setTimeout(E,J);if(Z)G=D.apply(K,q);return G};return y5(H,D),H.cancel=()=>{if(B)clearTimeout(B),B=void 0;if(X)clearTimeout(X),X=void 0},H},aG;var cy=P(()=>{QX();aG=OW0});var H9=z((PP0,ny)=>{var wW0=Number.MAX_SAFE_INTEGER||9007199254740991,TW0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];ny.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:wW0,RELEASE_TYPES:TW0,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var q9=z((IP0,iy)=>{var jW0=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...D)=>console.error("SEMVER",...D):()=>{};iy.exports=jW0});var WF=z((A8,ay)=>{var{MAX_SAFE_COMPONENT_LENGTH:oG,MAX_SAFE_BUILD_LENGTH:PW0,MAX_LENGTH:IW0}=H9(),SW0=q9();A8=ay.exports={};var kW0=A8.re=[],vW0=A8.safeRe=[],_=A8.src=[],yW0=A8.safeSrc=[],f=A8.t={},xW0=0,sG="[a-zA-Z0-9-]",_W0=[["\\s",1],["\\d",IW0],[sG,PW0]],fW0=(D)=>{for(let[F,$]of _W0)D=D.split(`${F}*`).join(`${F}{0,${$}}`).split(`${F}+`).join(`${F}{1,${$}}`);return D},$0=(D,F,$)=>{let J=fW0(F),Q=xW0++;SW0(D,Q,F),f[D]=Q,_[Q]=F,yW0[Q]=J,kW0[Q]=new RegExp(F,$?"g":void 0),vW0[Q]=new RegExp(J,$?"g":void 0)};$0("NUMERICIDENTIFIER","0|[1-9]\\d*");$0("NUMERICIDENTIFIERLOOSE","\\d+");$0("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${sG}*`);$0("MAINVERSION",`(${_[f.NUMERICIDENTIFIER]})\\.(${_[f.NUMERICIDENTIFIER]})\\.(${_[f.NUMERICIDENTIFIER]})`);$0("MAINVERSIONLOOSE",`(${_[f.NUMERICIDENTIFIERLOOSE]})\\.(${_[f.NUMERICIDENTIFIERLOOSE]})\\.(${_[f.NUMERICIDENTIFIERLOOSE]})`);$0("PRERELEASEIDENTIFIER",`(?:${_[f.NONNUMERICIDENTIFIER]}|${_[f.NUMERICIDENTIFIER]})`);$0("PRERELEASEIDENTIFIERLOOSE",`(?:${_[f.NONNUMERICIDENTIFIER]}|${_[f.NUMERICIDENTIFIERLOOSE]})`);$0("PRERELEASE",`(?:-(${_[f.PRERELEASEIDENTIFIER]}(?:\\.${_[f.PRERELEASEIDENTIFIER]})*))`);$0("PRERELEASELOOSE",`(?:-?(${_[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[f.PRERELEASEIDENTIFIERLOOSE]})*))`);$0("BUILDIDENTIFIER",`${sG}+`);$0("BUILD",`(?:\\+(${_[f.BUILDIDENTIFIER]}(?:\\.${_[f.BUILDIDENTIFIER]})*))`);$0("FULLPLAIN",`v?${_[f.MAINVERSION]}${_[f.PRERELEASE]}?${_[f.BUILD]}?`);$0("FULL",`^${_[f.FULLPLAIN]}$`);$0("LOOSEPLAIN",`[v=\\s]*${_[f.MAINVERSIONLOOSE]}${_[f.PRERELEASELOOSE]}?${_[f.BUILD]}?`);$0("LOOSE",`^${_[f.LOOSEPLAIN]}$`);$0("GTLT","((?:<|>)?=?)");$0("XRANGEIDENTIFIERLOOSE",`${_[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);$0("XRANGEIDENTIFIER",`${_[f.NUMERICIDENTIFIER]}|x|X|\\*`);$0("XRANGEPLAIN",`[v=\\s]*(${_[f.XRANGEIDENTIFIER]})(?:\\.(${_[f.XRANGEIDENTIFIER]})(?:\\.(${_[f.XRANGEIDENTIFIER]})(?:${_[f.PRERELEASE]})?${_[f.BUILD]}?)?)?`);$0("XRANGEPLAINLOOSE",`[v=\\s]*(${_[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[f.XRANGEIDENTIFIERLOOSE]})(?:${_[f.PRERELEASELOOSE]})?${_[f.BUILD]}?)?)?`);$0("XRANGE",`^${_[f.GTLT]}\\s*${_[f.XRANGEPLAIN]}$`);$0("XRANGELOOSE",`^${_[f.GTLT]}\\s*${_[f.XRANGEPLAINLOOSE]}$`);$0("COERCEPLAIN",`(^|[^\\d])(\\d{1,${oG}})(?:\\.(\\d{1,${oG}}))?(?:\\.(\\d{1,${oG}}))?`);$0("COERCE",`${_[f.COERCEPLAIN]}(?:$|[^\\d])`);$0("COERCEFULL",_[f.COERCEPLAIN]+`(?:${_[f.PRERELEASE]})?(?:${_[f.BUILD]})?(?:$|[^\\d])`);$0("COERCERTL",_[f.COERCE],!0);$0("COERCERTLFULL",_[f.COERCEFULL],!0);$0("LONETILDE","(?:~>?)");$0("TILDETRIM",`(\\s*)${_[f.LONETILDE]}\\s+`,!0);A8.tildeTrimReplace="$1~";$0("TILDE",`^${_[f.LONETILDE]}${_[f.XRANGEPLAIN]}$`);$0("TILDELOOSE",`^${_[f.LONETILDE]}${_[f.XRANGEPLAINLOOSE]}$`);$0("LONECARET","(?:\\^)");$0("CARETTRIM",`(\\s*)${_[f.LONECARET]}\\s+`,!0);A8.caretTrimReplace="$1^";$0("CARET",`^${_[f.LONECARET]}${_[f.XRANGEPLAIN]}$`);$0("CARETLOOSE",`^${_[f.LONECARET]}${_[f.XRANGEPLAINLOOSE]}$`);$0("COMPARATORLOOSE",`^${_[f.GTLT]}\\s*(${_[f.LOOSEPLAIN]})$|^$`);$0("COMPARATOR",`^${_[f.GTLT]}\\s*(${_[f.FULLPLAIN]})$|^$`);$0("COMPARATORTRIM",`(\\s*)${_[f.GTLT]}\\s*(${_[f.LOOSEPLAIN]}|${_[f.XRANGEPLAIN]})`,!0);A8.comparatorTrimReplace="$1$2$3";$0("HYPHENRANGE",`^\\s*(${_[f.XRANGEPLAIN]})\\s+-\\s+(${_[f.XRANGEPLAIN]})\\s*$`);$0("HYPHENRANGELOOSE",`^\\s*(${_[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${_[f.XRANGEPLAINLOOSE]})\\s*$`);$0("STAR","(<|>)?=?\\s*\\*");$0("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");$0("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var wJ=z((SP0,oy)=>{var gW0=Object.freeze({loose:!0}),hW0=Object.freeze({}),bW0=(D)=>{if(!D)return hW0;if(typeof D!=="object")return gW0;return D};oy.exports=bW0});var rG=z((kP0,ty)=>{var sy=/^[0-9]+$/,ry=(D,F)=>{if(typeof D==="number"&&typeof F==="number")return D===F?0:D<F?-1:1;let $=sy.test(D),J=sy.test(F);if($&&J)D=+D,F=+F;return D===F?0:$&&!J?-1:J&&!$?1:D<F?-1:1},uW0=(D,F)=>ry(F,D);ty.exports={compareIdentifiers:ry,rcompareIdentifiers:uW0}});var PD=z((vP0,Dx)=>{var TJ=q9(),{MAX_LENGTH:ey,MAX_SAFE_INTEGER:jJ}=H9(),{safeRe:PJ,t:IJ}=WF(),mW0=wJ(),{compareIdentifiers:tG}=rG();class l1{constructor(D,F){if(F=mW0(F),D instanceof l1)if(D.loose===!!F.loose&&D.includePrerelease===!!F.includePrerelease)return D;else D=D.version;else if(typeof D!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof D}".`);if(D.length>ey)throw TypeError(`version is longer than ${ey} characters`);TJ("SemVer",D,F),this.options=F,this.loose=!!F.loose,this.includePrerelease=!!F.includePrerelease;let $=D.trim().match(F.loose?PJ[IJ.LOOSE]:PJ[IJ.FULL]);if(!$)throw TypeError(`Invalid Version: ${D}`);if(this.raw=D,this.major=+$[1],this.minor=+$[2],this.patch=+$[3],this.major>jJ||this.major<0)throw TypeError("Invalid major version");if(this.minor>jJ||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>jJ||this.patch<0)throw TypeError("Invalid patch version");if(!$[4])this.prerelease=[];else this.prerelease=$[4].split(".").map((J)=>{if(/^[0-9]+$/.test(J)){let Q=+J;if(Q>=0&&Q<jJ)return Q}return J});this.build=$[5]?$[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(D){if(TJ("SemVer.compare",this.version,this.options,D),!(D instanceof l1)){if(typeof D==="string"&&D===this.version)return 0;D=new l1(D,this.options)}if(D.version===this.version)return 0;return this.compareMain(D)||this.comparePre(D)}compareMain(D){if(!(D instanceof l1))D=new l1(D,this.options);if(this.major<D.major)return-1;if(this.major>D.major)return 1;if(this.minor<D.minor)return-1;if(this.minor>D.minor)return 1;if(this.patch<D.patch)return-1;if(this.patch>D.patch)return 1;return 0}comparePre(D){if(!(D instanceof l1))D=new l1(D,this.options);if(this.prerelease.length&&!D.prerelease.length)return-1;else if(!this.prerelease.length&&D.prerelease.length)return 1;else if(!this.prerelease.length&&!D.prerelease.length)return 0;let F=0;do{let $=this.prerelease[F],J=D.prerelease[F];if(TJ("prerelease compare",F,$,J),$===void 0&&J===void 0)return 0;else if(J===void 0)return 1;else if($===void 0)return-1;else if($===J)continue;else return tG($,J)}while(++F)}compareBuild(D){if(!(D instanceof l1))D=new l1(D,this.options);let F=0;do{let $=this.build[F],J=D.build[F];if(TJ("build compare",F,$,J),$===void 0&&J===void 0)return 0;else if(J===void 0)return 1;else if($===void 0)return-1;else if($===J)continue;else return tG($,J)}while(++F)}inc(D,F,$){if(D.startsWith("pre")){if(!F&&$===!1)throw Error("invalid increment argument: identifier is empty");if(F){let J=`-${F}`.match(this.options.loose?PJ[IJ.PRERELEASELOOSE]:PJ[IJ.PRERELEASE]);if(!J||J[1]!==F)throw Error(`invalid identifier: ${F}`)}}switch(D){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",F,$);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",F,$);break;case"prepatch":this.prerelease.length=0,this.inc("patch",F,$),this.inc("pre",F,$);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",F,$);this.inc("pre",F,$);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{let J=Number($)?1:0;if(this.prerelease.length===0)this.prerelease=[J];else{let Q=this.prerelease.length;while(--Q>=0)if(typeof this.prerelease[Q]==="number")this.prerelease[Q]++,Q=-2;if(Q===-1){if(F===this.prerelease.join(".")&&$===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(J)}}if(F){let Q=[F,J];if($===!1)Q=[F];if(tG(this.prerelease[0],F)===0){if(isNaN(this.prerelease[1]))this.prerelease=Q}else this.prerelease=Q}break}default:throw Error(`invalid increment argument: ${D}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}Dx.exports=l1});var O4=z((yP0,$x)=>{var Fx=PD(),lW0=(D,F,$=!1)=>{if(D instanceof Fx)return D;try{return new Fx(D,F)}catch(J){if(!$)return null;throw J}};$x.exports=lW0});var Qx=z((xP0,Jx)=>{var pW0=O4(),dW0=(D,F)=>{let $=pW0(D,F);return $?$.version:null};Jx.exports=dW0});var Bx=z((_P0,Yx)=>{var cW0=O4(),nW0=(D,F)=>{let $=cW0(D.trim().replace(/^[=v]+/,""),F);return $?$.version:null};Yx.exports=nW0});var Wx=z((fP0,Gx)=>{var Xx=PD(),iW0=(D,F,$,J,Q)=>{if(typeof $==="string")Q=J,J=$,$=void 0;try{return new Xx(D instanceof Xx?D.version:D,$).inc(F,J,Q).version}catch(Y){return null}};Gx.exports=iW0});var Kx=z((gP0,qx)=>{var Hx=O4(),aW0=(D,F)=>{let $=Hx(D,null,!0),J=Hx(F,null,!0),Q=$.compare(J);if(Q===0)return null;let Y=Q>0,B=Y?$:J,X=Y?J:$,G=!!B.prerelease.length;if(!!X.prerelease.length&&!G){if(!X.patch&&!X.minor)return"major";if(X.compareMain(B)===0){if(X.minor&&!X.patch)return"minor";return"patch"}}let q=G?"pre":"";if($.major!==J.major)return q+"major";if($.minor!==J.minor)return q+"minor";if($.patch!==J.patch)return q+"patch";return"prerelease"};qx.exports=aW0});var Ex=z((hP0,zx)=>{var oW0=PD(),sW0=(D,F)=>new oW0(D,F).major;zx.exports=sW0});var Zx=z((bP0,Vx)=>{var rW0=PD(),tW0=(D,F)=>new rW0(D,F).minor;Vx.exports=tW0});var Lx=z((uP0,Ux)=>{var eW0=PD(),DH0=(D,F)=>new eW0(D,F).patch;Ux.exports=DH0});var Mx=z((mP0,Ax)=>{var FH0=O4(),$H0=(D,F)=>{let $=FH0(D,F);return $&&$.prerelease.length?$.prerelease:null};Ax.exports=$H0});var R1=z((lP0,Cx)=>{var Nx=PD(),JH0=(D,F,$)=>new Nx(D,$).compare(new Nx(F,$));Cx.exports=JH0});var Ox=z((pP0,Rx)=>{var QH0=R1(),YH0=(D,F,$)=>QH0(F,D,$);Rx.exports=YH0});var Tx=z((dP0,wx)=>{var BH0=R1(),XH0=(D,F)=>BH0(D,F,!0);wx.exports=XH0});var SJ=z((cP0,Px)=>{var jx=PD(),GH0=(D,F,$)=>{let J=new jx(D,$),Q=new jx(F,$);return J.compare(Q)||J.compareBuild(Q)};Px.exports=GH0});var Sx=z((nP0,Ix)=>{var WH0=SJ(),HH0=(D,F)=>D.sort(($,J)=>WH0($,J,F));Ix.exports=HH0});var vx=z((iP0,kx)=>{var qH0=SJ(),KH0=(D,F)=>D.sort(($,J)=>qH0(J,$,F));kx.exports=KH0});var K9=z((aP0,yx)=>{var zH0=R1(),EH0=(D,F,$)=>zH0(D,F,$)>0;yx.exports=EH0});var kJ=z((oP0,xx)=>{var VH0=R1(),ZH0=(D,F,$)=>VH0(D,F,$)<0;xx.exports=ZH0});var eG=z((sP0,_x)=>{var UH0=R1(),LH0=(D,F,$)=>UH0(D,F,$)===0;_x.exports=LH0});var DW=z((rP0,fx)=>{var AH0=R1(),MH0=(D,F,$)=>AH0(D,F,$)!==0;fx.exports=MH0});var vJ=z((tP0,gx)=>{var NH0=R1(),CH0=(D,F,$)=>NH0(D,F,$)>=0;gx.exports=CH0});var yJ=z((eP0,hx)=>{var RH0=R1(),OH0=(D,F,$)=>RH0(D,F,$)<=0;hx.exports=OH0});var FW=z((DI0,bx)=>{var wH0=eG(),TH0=DW(),jH0=K9(),PH0=vJ(),IH0=kJ(),SH0=yJ(),kH0=(D,F,$,J)=>{switch(F){case"===":if(typeof D==="object")D=D.version;if(typeof $==="object")$=$.version;return D===$;case"!==":if(typeof D==="object")D=D.version;if(typeof $==="object")$=$.version;return D!==$;case"":case"=":case"==":return wH0(D,$,J);case"!=":return TH0(D,$,J);case">":return jH0(D,$,J);case">=":return PH0(D,$,J);case"<":return IH0(D,$,J);case"<=":return SH0(D,$,J);default:throw TypeError(`Invalid operator: ${F}`)}};bx.exports=kH0});var mx=z((FI0,ux)=>{var vH0=PD(),yH0=O4(),{safeRe:xJ,t:_J}=WF(),xH0=(D,F)=>{if(D instanceof vH0)return D;if(typeof D==="number")D=String(D);if(typeof D!=="string")return null;F=F||{};let $=null;if(!F.rtl)$=D.match(F.includePrerelease?xJ[_J.COERCEFULL]:xJ[_J.COERCE]);else{let G=F.includePrerelease?xJ[_J.COERCERTLFULL]:xJ[_J.COERCERTL],H;while((H=G.exec(D))&&(!$||$.index+$[0].length!==D.length)){if(!$||H.index+H[0].length!==$.index+$[0].length)$=H;G.lastIndex=H.index+H[1].length+H[2].length}G.lastIndex=-1}if($===null)return null;let J=$[2],Q=$[3]||"0",Y=$[4]||"0",B=F.includePrerelease&&$[5]?`-${$[5]}`:"",X=F.includePrerelease&&$[6]?`+${$[6]}`:"";return yH0(`${J}.${Q}.${Y}${B}${X}`,F)};ux.exports=xH0});var dx=z(($I0,px)=>{class lx{constructor(){this.max=1000,this.map=new Map}get(D){let F=this.map.get(D);if(F===void 0)return;else return this.map.delete(D),this.map.set(D,F),F}delete(D){return this.map.delete(D)}set(D,F){if(!this.delete(D)&&F!==void 0){if(this.map.size>=this.max){let J=this.map.keys().next().value;this.delete(J)}this.map.set(D,F)}return this}}px.exports=lx});var O1=z((JI0,ax)=>{var _H0=/\s+/g;class z9{constructor(D,F){if(F=gH0(F),D instanceof z9)if(D.loose===!!F.loose&&D.includePrerelease===!!F.includePrerelease)return D;else return new z9(D.raw,F);if(D instanceof $W)return this.raw=D.value,this.set=[[D]],this.formatted=void 0,this;if(this.options=F,this.loose=!!F.loose,this.includePrerelease=!!F.includePrerelease,this.raw=D.trim().replace(_H0," "),this.set=this.raw.split("||").map(($)=>this.parseRange($.trim())).filter(($)=>$.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let $=this.set[0];if(this.set=this.set.filter((J)=>!nx(J[0])),this.set.length===0)this.set=[$];else if(this.set.length>1){for(let J of this.set)if(J.length===1&&dH0(J[0])){this.set=[J];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let D=0;D<this.set.length;D++){if(D>0)this.formatted+="||";let F=this.set[D];for(let $=0;$<F.length;$++){if($>0)this.formatted+=" ";this.formatted+=F[$].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(D){let $=((this.options.includePrerelease&&lH0)|(this.options.loose&&pH0))+":"+D,J=cx.get($);if(J)return J;let Q=this.options.loose,Y=Q?hD[ID.HYPHENRANGELOOSE]:hD[ID.HYPHENRANGE];D=D.replace(Y,Dq0(this.options.includePrerelease)),m0("hyphen replace",D),D=D.replace(hD[ID.COMPARATORTRIM],bH0),m0("comparator trim",D),D=D.replace(hD[ID.TILDETRIM],uH0),m0("tilde trim",D),D=D.replace(hD[ID.CARETTRIM],mH0),m0("caret trim",D);let B=D.split(" ").map((q)=>cH0(q,this.options)).join(" ").split(/\s+/).map((q)=>eH0(q,this.options));if(Q)B=B.filter((q)=>{return m0("loose invalid filter",q,this.options),!!q.match(hD[ID.COMPARATORLOOSE])});m0("range list",B);let X=new Map,G=B.map((q)=>new $W(q,this.options));for(let q of G){if(nx(q))return[q];X.set(q.value,q)}if(X.size>1&&X.has(""))X.delete("");let H=[...X.values()];return cx.set($,H),H}intersects(D,F){if(!(D instanceof z9))throw TypeError("a Range is required");return this.set.some(($)=>{return ix($,F)&&D.set.some((J)=>{return ix(J,F)&&$.every((Q)=>{return J.every((Y)=>{return Q.intersects(Y,F)})})})})}test(D){if(!D)return!1;if(typeof D==="string")try{D=new hH0(D,this.options)}catch(F){return!1}for(let F=0;F<this.set.length;F++)if(Fq0(this.set[F],D,this.options))return!0;return!1}}ax.exports=z9;var fH0=dx(),cx=new fH0,gH0=wJ(),$W=E9(),m0=q9(),hH0=PD(),{safeRe:hD,t:ID,comparatorTrimReplace:bH0,tildeTrimReplace:uH0,caretTrimReplace:mH0}=WF(),{FLAG_INCLUDE_PRERELEASE:lH0,FLAG_LOOSE:pH0}=H9(),nx=(D)=>D.value==="<0.0.0-0",dH0=(D)=>D.value==="",ix=(D,F)=>{let $=!0,J=D.slice(),Q=J.pop();while($&&J.length)$=J.every((Y)=>{return Q.intersects(Y,F)}),Q=J.pop();return $},cH0=(D,F)=>{return D=D.replace(hD[ID.BUILD],""),m0("comp",D,F),D=aH0(D,F),m0("caret",D),D=nH0(D,F),m0("tildes",D),D=sH0(D,F),m0("xrange",D),D=tH0(D,F),m0("stars",D),D},bD=(D)=>!D||D.toLowerCase()==="x"||D==="*",nH0=(D,F)=>{return D.trim().split(/\s+/).map(($)=>iH0($,F)).join(" ")},iH0=(D,F)=>{let $=F.loose?hD[ID.TILDELOOSE]:hD[ID.TILDE];return D.replace($,(J,Q,Y,B,X)=>{m0("tilde",D,J,Q,Y,B,X);let G;if(bD(Q))G="";else if(bD(Y))G=`>=${Q}.0.0 <${+Q+1}.0.0-0`;else if(bD(B))G=`>=${Q}.${Y}.0 <${Q}.${+Y+1}.0-0`;else if(X)m0("replaceTilde pr",X),G=`>=${Q}.${Y}.${B}-${X} <${Q}.${+Y+1}.0-0`;else G=`>=${Q}.${Y}.${B} <${Q}.${+Y+1}.0-0`;return m0("tilde return",G),G})},aH0=(D,F)=>{return D.trim().split(/\s+/).map(($)=>oH0($,F)).join(" ")},oH0=(D,F)=>{m0("caret",D,F);let $=F.loose?hD[ID.CARETLOOSE]:hD[ID.CARET],J=F.includePrerelease?"-0":"";return D.replace($,(Q,Y,B,X,G)=>{m0("caret",D,Q,Y,B,X,G);let H;if(bD(Y))H="";else if(bD(B))H=`>=${Y}.0.0${J} <${+Y+1}.0.0-0`;else if(bD(X))if(Y==="0")H=`>=${Y}.${B}.0${J} <${Y}.${+B+1}.0-0`;else H=`>=${Y}.${B}.0${J} <${+Y+1}.0.0-0`;else if(G)if(m0("replaceCaret pr",G),Y==="0")if(B==="0")H=`>=${Y}.${B}.${X}-${G} <${Y}.${B}.${+X+1}-0`;else H=`>=${Y}.${B}.${X}-${G} <${Y}.${+B+1}.0-0`;else H=`>=${Y}.${B}.${X}-${G} <${+Y+1}.0.0-0`;else if(m0("no pr"),Y==="0")if(B==="0")H=`>=${Y}.${B}.${X}${J} <${Y}.${B}.${+X+1}-0`;else H=`>=${Y}.${B}.${X}${J} <${Y}.${+B+1}.0-0`;else H=`>=${Y}.${B}.${X} <${+Y+1}.0.0-0`;return m0("caret return",H),H})},sH0=(D,F)=>{return m0("replaceXRanges",D,F),D.split(/\s+/).map(($)=>rH0($,F)).join(" ")},rH0=(D,F)=>{D=D.trim();let $=F.loose?hD[ID.XRANGELOOSE]:hD[ID.XRANGE];return D.replace($,(J,Q,Y,B,X,G)=>{m0("xRange",D,J,Q,Y,B,X,G);let H=bD(Y),q=H||bD(B),K=q||bD(X),V=K;if(Q==="="&&V)Q="";if(G=F.includePrerelease?"-0":"",H)if(Q===">"||Q==="<")J="<0.0.0-0";else J="*";else if(Q&&V){if(q)B=0;if(X=0,Q===">")if(Q=">=",q)Y=+Y+1,B=0,X=0;else B=+B+1,X=0;else if(Q==="<=")if(Q="<",q)Y=+Y+1;else B=+B+1;if(Q==="<")G="-0";J=`${Q+Y}.${B}.${X}${G}`}else if(q)J=`>=${Y}.0.0${G} <${+Y+1}.0.0-0`;else if(K)J=`>=${Y}.${B}.0${G} <${Y}.${+B+1}.0-0`;return m0("xRange return",J),J})},tH0=(D,F)=>{return m0("replaceStars",D,F),D.trim().replace(hD[ID.STAR],"")},eH0=(D,F)=>{return m0("replaceGTE0",D,F),D.trim().replace(hD[F.includePrerelease?ID.GTE0PRE:ID.GTE0],"")},Dq0=(D)=>(F,$,J,Q,Y,B,X,G,H,q,K,V)=>{if(bD(J))$="";else if(bD(Q))$=`>=${J}.0.0${D?"-0":""}`;else if(bD(Y))$=`>=${J}.${Q}.0${D?"-0":""}`;else if(B)$=`>=${$}`;else $=`>=${$}${D?"-0":""}`;if(bD(H))G="";else if(bD(q))G=`<${+H+1}.0.0-0`;else if(bD(K))G=`<${H}.${+q+1}.0-0`;else if(V)G=`<=${H}.${q}.${K}-${V}`;else if(D)G=`<${H}.${q}.${+K+1}-0`;else G=`<=${G}`;return`${$} ${G}`.trim()},Fq0=(D,F,$)=>{for(let J=0;J<D.length;J++)if(!D[J].test(F))return!1;if(F.prerelease.length&&!$.includePrerelease){for(let J=0;J<D.length;J++){if(m0(D[J].semver),D[J].semver===$W.ANY)continue;if(D[J].semver.prerelease.length>0){let Q=D[J].semver;if(Q.major===F.major&&Q.minor===F.minor&&Q.patch===F.patch)return!0}}return!1}return!0}});var E9=z((QI0,D_)=>{var V9=Symbol("SemVer ANY");class fJ{static get ANY(){return V9}constructor(D,F){if(F=ox(F),D instanceof fJ)if(D.loose===!!F.loose)return D;else D=D.value;if(D=D.trim().split(/\s+/).join(" "),QW("comparator",D,F),this.options=F,this.loose=!!F.loose,this.parse(D),this.semver===V9)this.value="";else this.value=this.operator+this.semver.version;QW("comp",this)}parse(D){let F=this.options.loose?sx[rx.COMPARATORLOOSE]:sx[rx.COMPARATOR],$=D.match(F);if(!$)throw TypeError(`Invalid comparator: ${D}`);if(this.operator=$[1]!==void 0?$[1]:"",this.operator==="=")this.operator="";if(!$[2])this.semver=V9;else this.semver=new tx($[2],this.options.loose)}toString(){return this.value}test(D){if(QW("Comparator.test",D,this.options.loose),this.semver===V9||D===V9)return!0;if(typeof D==="string")try{D=new tx(D,this.options)}catch(F){return!1}return JW(D,this.operator,this.semver,this.options)}intersects(D,F){if(!(D instanceof fJ))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new ex(D.value,F).test(this.value)}else if(D.operator===""){if(D.value==="")return!0;return new ex(this.value,F).test(D.semver)}if(F=ox(F),F.includePrerelease&&(this.value==="<0.0.0-0"||D.value==="<0.0.0-0"))return!1;if(!F.includePrerelease&&(this.value.startsWith("<0.0.0")||D.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&D.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&D.operator.startsWith("<"))return!0;if(this.semver.version===D.semver.version&&this.operator.includes("=")&&D.operator.includes("="))return!0;if(JW(this.semver,"<",D.semver,F)&&this.operator.startsWith(">")&&D.operator.startsWith("<"))return!0;if(JW(this.semver,">",D.semver,F)&&this.operator.startsWith("<")&&D.operator.startsWith(">"))return!0;return!1}}D_.exports=fJ;var ox=wJ(),{safeRe:sx,t:rx}=WF(),JW=FW(),QW=q9(),tx=PD(),ex=O1()});var Z9=z((YI0,F_)=>{var $q0=O1(),Jq0=(D,F,$)=>{try{F=new $q0(F,$)}catch(J){return!1}return F.test(D)};F_.exports=Jq0});var J_=z((BI0,$_)=>{var Qq0=O1(),Yq0=(D,F)=>new Qq0(D,F).set.map(($)=>$.map((J)=>J.value).join(" ").trim().split(" "));$_.exports=Yq0});var Y_=z((XI0,Q_)=>{var Bq0=PD(),Xq0=O1(),Gq0=(D,F,$)=>{let J=null,Q=null,Y=null;try{Y=new Xq0(F,$)}catch(B){return null}return D.forEach((B)=>{if(Y.test(B)){if(!J||Q.compare(B)===-1)J=B,Q=new Bq0(J,$)}}),J};Q_.exports=Gq0});var X_=z((GI0,B_)=>{var Wq0=PD(),Hq0=O1(),qq0=(D,F,$)=>{let J=null,Q=null,Y=null;try{Y=new Hq0(F,$)}catch(B){return null}return D.forEach((B)=>{if(Y.test(B)){if(!J||Q.compare(B)===1)J=B,Q=new Wq0(J,$)}}),J};B_.exports=qq0});var H_=z((WI0,W_)=>{var YW=PD(),Kq0=O1(),G_=K9(),zq0=(D,F)=>{D=new Kq0(D,F);let $=new YW("0.0.0");if(D.test($))return $;if($=new YW("0.0.0-0"),D.test($))return $;$=null;for(let J=0;J<D.set.length;++J){let Q=D.set[J],Y=null;if(Q.forEach((B)=>{let X=new YW(B.semver.version);switch(B.operator){case">":if(X.prerelease.length===0)X.patch++;else X.prerelease.push(0);X.raw=X.format();case"":case">=":if(!Y||G_(X,Y))Y=X;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${B.operator}`)}}),Y&&(!$||G_($,Y)))$=Y}if($&&D.test($))return $;return null};W_.exports=zq0});var K_=z((HI0,q_)=>{var Eq0=O1(),Vq0=(D,F)=>{try{return new Eq0(D,F).range||"*"}catch($){return null}};q_.exports=Vq0});var gJ=z((qI0,Z_)=>{var Zq0=PD(),V_=E9(),{ANY:Uq0}=V_,Lq0=O1(),Aq0=Z9(),z_=K9(),E_=kJ(),Mq0=yJ(),Nq0=vJ(),Cq0=(D,F,$,J)=>{D=new Zq0(D,J),F=new Lq0(F,J);let Q,Y,B,X,G;switch($){case">":Q=z_,Y=Mq0,B=E_,X=">",G=">=";break;case"<":Q=E_,Y=Nq0,B=z_,X="<",G="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(Aq0(D,F,J))return!1;for(let H=0;H<F.set.length;++H){let q=F.set[H],K=null,V=null;if(q.forEach((E)=>{if(E.semver===Uq0)E=new V_(">=0.0.0");if(K=K||E,V=V||E,Q(E.semver,K.semver,J))K=E;else if(B(E.semver,V.semver,J))V=E}),K.operator===X||K.operator===G)return!1;if((!V.operator||V.operator===X)&&Y(D,V.semver))return!1;else if(V.operator===G&&B(D,V.semver))return!1}return!0};Z_.exports=Cq0});var L_=z((KI0,U_)=>{var Rq0=gJ(),Oq0=(D,F,$)=>Rq0(D,F,">",$);U_.exports=Oq0});var M_=z((zI0,A_)=>{var wq0=gJ(),Tq0=(D,F,$)=>wq0(D,F,"<",$);A_.exports=Tq0});var R_=z((EI0,C_)=>{var N_=O1(),jq0=(D,F,$)=>{return D=new N_(D,$),F=new N_(F,$),D.intersects(F,$)};C_.exports=jq0});var w_=z((VI0,O_)=>{var Pq0=Z9(),Iq0=R1();O_.exports=(D,F,$)=>{let J=[],Q=null,Y=null,B=D.sort((q,K)=>Iq0(q,K,$));for(let q of B)if(Pq0(q,F,$)){if(Y=q,!Q)Q=q}else{if(Y)J.push([Q,Y]);Y=null,Q=null}if(Q)J.push([Q,null]);let X=[];for(let[q,K]of J)if(q===K)X.push(q);else if(!K&&q===B[0])X.push("*");else if(!K)X.push(`>=${q}`);else if(q===B[0])X.push(`<=${K}`);else X.push(`${q} - ${K}`);let G=X.join(" || "),H=typeof F.raw==="string"?F.raw:String(F);return G.length<H.length?G:F}});var k_=z((ZI0,S_)=>{var T_=O1(),XW=E9(),{ANY:BW}=XW,U9=Z9(),GW=R1(),Sq0=(D,F,$={})=>{if(D===F)return!0;D=new T_(D,$),F=new T_(F,$);let J=!1;D:for(let Q of D.set){for(let Y of F.set){let B=vq0(Q,Y,$);if(J=J||B!==null,B)continue D}if(J)return!1}return!0},kq0=[new XW(">=0.0.0-0")],j_=[new XW(">=0.0.0")],vq0=(D,F,$)=>{if(D===F)return!0;if(D.length===1&&D[0].semver===BW)if(F.length===1&&F[0].semver===BW)return!0;else if($.includePrerelease)D=kq0;else D=j_;if(F.length===1&&F[0].semver===BW)if($.includePrerelease)return!0;else F=j_;let J=new Set,Q,Y;for(let E of D)if(E.operator===">"||E.operator===">=")Q=P_(Q,E,$);else if(E.operator==="<"||E.operator==="<=")Y=I_(Y,E,$);else J.add(E.semver);if(J.size>1)return null;let B;if(Q&&Y){if(B=GW(Q.semver,Y.semver,$),B>0)return null;else if(B===0&&(Q.operator!==">="||Y.operator!=="<="))return null}for(let E of J){if(Q&&!U9(E,String(Q),$))return null;if(Y&&!U9(E,String(Y),$))return null;for(let Z of F)if(!U9(E,String(Z),$))return!1;return!0}let X,G,H,q,K=Y&&!$.includePrerelease&&Y.semver.prerelease.length?Y.semver:!1,V=Q&&!$.includePrerelease&&Q.semver.prerelease.length?Q.semver:!1;if(K&&K.prerelease.length===1&&Y.operator==="<"&&K.prerelease[0]===0)K=!1;for(let E of F){if(q=q||E.operator===">"||E.operator===">=",H=H||E.operator==="<"||E.operator==="<=",Q){if(V){if(E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===V.major&&E.semver.minor===V.minor&&E.semver.patch===V.patch)V=!1}if(E.operator===">"||E.operator===">="){if(X=P_(Q,E,$),X===E&&X!==Q)return!1}else if(Q.operator===">="&&!U9(Q.semver,String(E),$))return!1}if(Y){if(K){if(E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===K.major&&E.semver.minor===K.minor&&E.semver.patch===K.patch)K=!1}if(E.operator==="<"||E.operator==="<="){if(G=I_(Y,E,$),G===E&&G!==Y)return!1}else if(Y.operator==="<="&&!U9(Y.semver,String(E),$))return!1}if(!E.operator&&(Y||Q)&&B!==0)return!1}if(Q&&H&&!Y&&B!==0)return!1;if(Y&&q&&!Q&&B!==0)return!1;if(V||K)return!1;return!0},P_=(D,F,$)=>{if(!D)return F;let J=GW(D.semver,F.semver,$);return J>0?D:J<0?F:F.operator===">"&&D.operator===">="?F:D},I_=(D,F,$)=>{if(!D)return F;let J=GW(D.semver,F.semver,$);return J<0?D:J>0?F:F.operator==="<"&&D.operator==="<="?F:D};S_.exports=Sq0});var __=z((UI0,x_)=>{var WW=WF(),v_=H9(),yq0=PD(),y_=rG(),xq0=O4(),_q0=Qx(),fq0=Bx(),gq0=Wx(),hq0=Kx(),bq0=Ex(),uq0=Zx(),mq0=Lx(),lq0=Mx(),pq0=R1(),dq0=Ox(),cq0=Tx(),nq0=SJ(),iq0=Sx(),aq0=vx(),oq0=K9(),sq0=kJ(),rq0=eG(),tq0=DW(),eq0=vJ(),DK0=yJ(),FK0=FW(),$K0=mx(),JK0=E9(),QK0=O1(),YK0=Z9(),BK0=J_(),XK0=Y_(),GK0=X_(),WK0=H_(),HK0=K_(),qK0=gJ(),KK0=L_(),zK0=M_(),EK0=R_(),VK0=w_(),ZK0=k_();x_.exports={parse:xq0,valid:_q0,clean:fq0,inc:gq0,diff:hq0,major:bq0,minor:uq0,patch:mq0,prerelease:lq0,compare:pq0,rcompare:dq0,compareLoose:cq0,compareBuild:nq0,sort:iq0,rsort:aq0,gt:oq0,lt:sq0,eq:rq0,neq:tq0,gte:eq0,lte:DK0,cmp:FK0,coerce:$K0,Comparator:JK0,Range:QK0,satisfies:YK0,toComparators:BK0,maxSatisfying:XK0,minSatisfying:GK0,minVersion:WK0,validRange:HK0,outside:qK0,gtr:KK0,ltr:zK0,intersects:EK0,simplifyRange:VK0,subset:ZK0,SemVer:yq0,re:WW.re,src:WW.src,tokens:WW.t,SEMVER_SPEC_VERSION:v_.SEMVER_SPEC_VERSION,RELEASE_TYPES:v_.RELEASE_TYPES,compareIdentifiers:y_.compareIdentifiers,rcompareIdentifiers:y_.rcompareIdentifiers}});function g_(D,F,$){if(!D)return!1;if(D.constructor===F)return!0;return UK0.call(D)===$}function h_(D){return g_(D,Uint8Array,"[object Uint8Array]")}function LK0(D){return g_(D,ArrayBuffer,"[object ArrayBuffer]")}function AK0(D){return h_(D)||LK0(D)}function MK0(D){if(!h_(D))throw TypeError(`Expected \`Uint8Array\`, got \`${typeof D}\``)}function NK0(D){if(!AK0(D))throw TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof D}\``)}function HW(D,F){if(D.length===0)return new Uint8Array(0);F??=D.reduce((Q,Y)=>Q+Y.length,0);let $=new Uint8Array(F),J=0;for(let Q of D)MK0(Q),$.set(Q,J),J+=Q.length;return $}function qW(D,F="utf8"){return NK0(D),f_[F]??=new globalThis.TextDecoder(F),f_[F].decode(D)}function CK0(D){if(typeof D!=="string")throw TypeError(`Expected \`string\`, got \`${typeof D}\``)}function hJ(D){return CK0(D),RK0.encode(D)}var UK0,f_,RK0,LI0;var b_=P(()=>{UK0=Object.prototype.toString;f_={utf8:new globalThis.TextDecoder("utf8")};RK0=new globalThis.TextEncoder;LI0=Array.from({length:256},(D,F)=>F.toString(16).padStart(2,"0"))});import{isDeepStrictEqual as OK0}from"util";import u_ from"process";import w4 from"fs";import m_ from"path";import L9 from"crypto";import wK0 from"assert";var p_,d_,T4,TK0,l_="aes-256-cbc",HF=()=>Object.create(null),jK0=(D)=>D!==void 0&&D!==null,PK0=(D,F)=>{let $=new Set(["undefined","symbol","function"]),J=typeof F;if($.has(J))throw TypeError(`Setting a value of type \`${J}\` for key \`${D}\` is not allowed as it's not supported by JSON`)},bJ="__internal__",KW,uJ;var c_=P(()=>{tj();DP();SP();cy();b_();p_=s(Cy(),1),d_=s(dy(),1),T4=s(__(),1),TK0=d_.default.default,KW=`${bJ}.migrations.version`;uJ=class uJ{path;events;#$;#F;#D;#Q={};constructor(D={}){let F={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...D};if(!F.cwd){if(!F.projectName)throw Error("Please specify the `projectName` option.");F.cwd=CX(F.projectName,{suffix:F.projectSuffix}).config}if(this.#D=F,F.schema??F.ajvOptions??F.rootSchema){if(F.schema&&typeof F.schema!=="object")throw TypeError("The `schema` option must be an object.");let Y=new p_.Ajv2020({allErrors:!0,useDefaults:!0,...F.ajvOptions});TK0(Y);let B={...F.rootSchema,type:"object",properties:F.schema};this.#$=Y.compile(B);for(let[X,G]of Object.entries(F.schema??{}))if(G?.default)this.#Q[X]=G.default}if(F.defaults)this.#Q={...this.#Q,...F.defaults};if(F.serialize)this._serialize=F.serialize;if(F.deserialize)this._deserialize=F.deserialize;this.events=new EventTarget,this.#F=F.encryptionKey;let $=F.fileExtension?`.${F.fileExtension}`:"";this.path=m_.resolve(F.cwd,`${F.configName??"config"}${$}`);let J=this.store,Q=Object.assign(HF(),F.defaults,J);if(F.migrations){if(!F.projectVersion)throw Error("Please specify the `projectVersion` option.");this._migrate(F.migrations,F.projectVersion,F.beforeEachMigration)}this._validate(Q);try{wK0.deepEqual(J,Q)}catch{this.store=Q}if(F.watch)this._watch()}get(D,F){if(this.#D.accessPropertiesByDotNotation)return this._get(D,F);let{store:$}=this;return D in $?$[D]:F}set(D,F){if(typeof D!=="string"&&typeof D!=="object")throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof D}`);if(typeof D!=="object"&&F===void 0)throw TypeError("Use `delete()` to clear values");if(this._containsReservedKey(D))throw TypeError(`Please don't use the ${bJ} key, as it's used to manage this module internal operations.`);let{store:$}=this,J=(Q,Y)=>{if(PK0(Q,Y),this.#D.accessPropertiesByDotNotation)AX($,Q,Y);else $[Q]=Y};if(typeof D==="object"){let Q=D;for(let[Y,B]of Object.entries(Q))J(Y,B)}else J(D,F);this.store=$}has(D){if(this.#D.accessPropertiesByDotNotation)return rj(this.store,D);return D in this.store}reset(...D){for(let F of D)if(jK0(this.#Q[F]))this.set(F,this.#Q[F])}delete(D){let{store:F}=this;if(this.#D.accessPropertiesByDotNotation)sj(F,D);else delete F[D];this.store=F}clear(){this.store=HF();for(let D of Object.keys(this.#Q))this.reset(D)}onDidChange(D,F){if(typeof D!=="string")throw TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof D}`);if(typeof F!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof F}`);return this._handleChange(()=>this.get(D),F)}onDidAnyChange(D){if(typeof D!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof D}`);return this._handleChange(()=>this.store,D)}get size(){return Object.keys(this.store).length}get store(){try{let D=w4.readFileSync(this.path,this.#F?null:"utf8"),F=this._encryptData(D),$=this._deserialize(F);return this._validate($),Object.assign(HF(),$)}catch(D){if(D?.code==="ENOENT")return this._ensureDirectory(),HF();if(this.#D.clearInvalidConfig&&D.name==="SyntaxError")return HF();throw D}}set store(D){this._ensureDirectory(),this._validate(D),this._write(D),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(let[D,F]of Object.entries(this.store))yield[D,F]}_encryptData(D){if(!this.#F)return typeof D==="string"?D:qW(D);try{let F=D.slice(0,16),$=L9.pbkdf2Sync(this.#F,F.toString(),1e4,32,"sha512"),J=L9.createDecipheriv(l_,$,F),Q=D.slice(17),Y=typeof Q==="string"?hJ(Q):Q;return qW(HW([J.update(Y),J.final()]))}catch{}return D.toString()}_handleChange(D,F){let $=D(),J=()=>{let Q=$,Y=D();if(OK0(Y,Q))return;$=Y,F.call(this,Y,Q)};return this.events.addEventListener("change",J),()=>{this.events.removeEventListener("change",J)}}_deserialize=(D)=>JSON.parse(D);_serialize=(D)=>JSON.stringify(D,void 0,"\t");_validate(D){if(!this.#$)return;if(this.#$(D)||!this.#$.errors)return;let $=this.#$.errors.map(({instancePath:J,message:Q=""})=>`\`${J.slice(1)}\` ${Q}`);throw Error("Config schema violation: "+$.join("; "))}_ensureDirectory(){w4.mkdirSync(m_.dirname(this.path),{recursive:!0})}_write(D){let F=this._serialize(D);if(this.#F){let $=L9.randomBytes(16),J=L9.pbkdf2Sync(this.#F,$.toString(),1e4,32,"sha512"),Q=L9.createCipheriv(l_,J,$);F=HW([$,hJ(":"),Q.update(hJ(F)),Q.final()])}if(u_.env.SNAP)w4.writeFileSync(this.path,F,{mode:this.#D.configFileMode});else try{yX(this.path,F,{mode:this.#D.configFileMode})}catch($){if($?.code==="EXDEV"){w4.writeFileSync(this.path,F,{mode:this.#D.configFileMode});return}throw $}}_watch(){if(this._ensureDirectory(),!w4.existsSync(this.path))this._write(HF());if(u_.platform==="win32")w4.watch(this.path,{persistent:!1},aG(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100}));else w4.watchFile(this.path,{persistent:!1},aG(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5000}))}_migrate(D,F,$){let J=this._get(KW,"0.0.0"),Q=Object.keys(D).filter((B)=>this._shouldPerformMigration(B,J,F)),Y={...this.store};for(let B of Q)try{if($)$(this,{fromVersion:J,toVersion:B,finalVersion:F,versions:Q});let X=D[B];X?.(this),this._set(KW,B),J=B,Y={...this.store}}catch(X){throw this.store=Y,Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${X}`)}if(this._isVersionInRangeFormat(J)||!T4.default.eq(J,F))this._set(KW,F)}_containsReservedKey(D){if(typeof D==="object"){if(Object.keys(D)[0]===bJ)return!0}if(typeof D!=="string")return!1;if(this.#D.accessPropertiesByDotNotation){if(D.startsWith(`${bJ}.`))return!0;return!1}return!1}_isVersionInRangeFormat(D){return T4.default.clean(D)===null}_shouldPerformMigration(D,F,$){if(this._isVersionInRangeFormat(D)){if(F!=="0.0.0"&&T4.default.satisfies(F,D))return!1;return T4.default.satisfies($,D)}if(T4.default.lte(D,F))return!1;if(T4.default.gt(D,$))return!1;return!0}_get(D,F){return oj(this.store,D,F)}_set(D,F){let{store:$}=this;AX($,D,F),this.store=$}}});var E0,zW,S,M8=(D)=>{switch(typeof D){case"undefined":return S.undefined;case"string":return S.string;case"number":return Number.isNaN(D)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":if(Array.isArray(D))return S.array;if(D===null)return S.null;if(D.then&&typeof D.then==="function"&&D.catch&&typeof D.catch==="function")return S.promise;if(typeof Map<"u"&&D instanceof Map)return S.map;if(typeof Set<"u"&&D instanceof Set)return S.set;if(typeof Date<"u"&&D instanceof Date)return S.date;return S.object;default:return S.unknown}};var A9=P(()=>{(function(D){D.assertEqual=(Q)=>{};function F(Q){}D.assertIs=F;function $(Q){throw Error()}D.assertNever=$,D.arrayToEnum=(Q)=>{let Y={};for(let B of Q)Y[B]=B;return Y},D.getValidEnumValues=(Q)=>{let Y=D.objectKeys(Q).filter((X)=>typeof Q[Q[X]]!=="number"),B={};for(let X of Y)B[X]=Q[X];return D.objectValues(B)},D.objectValues=(Q)=>{return D.objectKeys(Q).map(function(Y){return Q[Y]})},D.objectKeys=typeof Object.keys==="function"?(Q)=>Object.keys(Q):(Q)=>{let Y=[];for(let B in Q)if(Object.prototype.hasOwnProperty.call(Q,B))Y.push(B);return Y},D.find=(Q,Y)=>{for(let B of Q)if(Y(B))return B;return},D.isInteger=typeof Number.isInteger==="function"?(Q)=>Number.isInteger(Q):(Q)=>typeof Q==="number"&&Number.isFinite(Q)&&Math.floor(Q)===Q;function J(Q,Y=" | "){return Q.map((B)=>typeof B==="string"?`'${B}'`:B).join(Y)}D.joinValues=J,D.jsonStringifyReplacer=(Q,Y)=>{if(typeof Y==="bigint")return Y.toString();return Y}})(E0||(E0={}));(function(D){D.mergeShapes=(F,$)=>{return{...F,...$}}})(zW||(zW={}));S=E0.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var T,IK0=(D)=>{return JSON.stringify(D,null,2).replace(/"([^"]+)":/g,"$1:")},eD;var mJ=P(()=>{A9();T=E0.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);eD=class eD extends Error{get errors(){return this.issues}constructor(D){super();this.issues=[],this.addIssue=($)=>{this.issues=[...this.issues,$]},this.addIssues=($=[])=>{this.issues=[...this.issues,...$]};let F=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,F);else this.__proto__=F;this.name="ZodError",this.issues=D}format(D){let F=D||function(Q){return Q.message},$={_errors:[]},J=(Q)=>{for(let Y of Q.issues)if(Y.code==="invalid_union")Y.unionErrors.map(J);else if(Y.code==="invalid_return_type")J(Y.returnTypeError);else if(Y.code==="invalid_arguments")J(Y.argumentsError);else if(Y.path.length===0)$._errors.push(F(Y));else{let B=$,X=0;while(X<Y.path.length){let G=Y.path[X];if(X!==Y.path.length-1)B[G]=B[G]||{_errors:[]};else B[G]=B[G]||{_errors:[]},B[G]._errors.push(F(Y));B=B[G],X++}}};return J(this),$}static assert(D){if(!(D instanceof eD))throw Error(`Not a ZodError: ${D}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,E0.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(D=(F)=>F.message){let F={},$=[];for(let J of this.issues)if(J.path.length>0){let Q=J.path[0];F[Q]=F[Q]||[],F[Q].push(D(J))}else $.push(D(J));return{formErrors:$,fieldErrors:F}}get formErrors(){return this.flatten()}};eD.create=(D)=>{return new eD(D)}});var SK0=(D,F)=>{let $;switch(D.code){case T.invalid_type:if(D.received===S.undefined)$="Required";else $=`Expected ${D.expected}, received ${D.received}`;break;case T.invalid_literal:$=`Invalid literal value, expected ${JSON.stringify(D.expected,E0.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:$=`Unrecognized key(s) in object: ${E0.joinValues(D.keys,", ")}`;break;case T.invalid_union:$="Invalid input";break;case T.invalid_union_discriminator:$=`Invalid discriminator value. Expected ${E0.joinValues(D.options)}`;break;case T.invalid_enum_value:$=`Invalid enum value. Expected ${E0.joinValues(D.options)}, received '${D.received}'`;break;case T.invalid_arguments:$="Invalid function arguments";break;case T.invalid_return_type:$="Invalid function return type";break;case T.invalid_date:$="Invalid date";break;case T.invalid_string:if(typeof D.validation==="object")if("includes"in D.validation){if($=`Invalid input: must include "${D.validation.includes}"`,typeof D.validation.position==="number")$=`${$} at one or more positions greater than or equal to ${D.validation.position}`}else if("startsWith"in D.validation)$=`Invalid input: must start with "${D.validation.startsWith}"`;else if("endsWith"in D.validation)$=`Invalid input: must end with "${D.validation.endsWith}"`;else E0.assertNever(D.validation);else if(D.validation!=="regex")$=`Invalid ${D.validation}`;else $="Invalid";break;case T.too_small:if(D.type==="array")$=`Array must contain ${D.exact?"exactly":D.inclusive?"at least":"more than"} ${D.minimum} element(s)`;else if(D.type==="string")$=`String must contain ${D.exact?"exactly":D.inclusive?"at least":"over"} ${D.minimum} character(s)`;else if(D.type==="number")$=`Number must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${D.minimum}`;else if(D.type==="bigint")$=`Number must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${D.minimum}`;else if(D.type==="date")$=`Date must be ${D.exact?"exactly equal to ":D.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(D.minimum))}`;else $="Invalid input";break;case T.too_big:if(D.type==="array")$=`Array must contain ${D.exact?"exactly":D.inclusive?"at most":"less than"} ${D.maximum} element(s)`;else if(D.type==="string")$=`String must contain ${D.exact?"exactly":D.inclusive?"at most":"under"} ${D.maximum} character(s)`;else if(D.type==="number")$=`Number must be ${D.exact?"exactly":D.inclusive?"less than or equal to":"less than"} ${D.maximum}`;else if(D.type==="bigint")$=`BigInt must be ${D.exact?"exactly":D.inclusive?"less than or equal to":"less than"} ${D.maximum}`;else if(D.type==="date")$=`Date must be ${D.exact?"exactly":D.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(D.maximum))}`;else $="Invalid input";break;case T.custom:$="Invalid input";break;case T.invalid_intersection_types:$="Intersection results could not be merged";break;case T.not_multiple_of:$=`Number must be a multiple of ${D.multipleOf}`;break;case T.not_finite:$="Number must be finite";break;default:$=F.defaultError,E0.assertNever(D)}return{message:$}},d8;var EW=P(()=>{mJ();A9();d8=SK0});function kK0(D){n_=D}function qF(){return n_}var n_;var lJ=P(()=>{EW();n_=d8});function v(D,F){let $=qF(),J=M9({issueData:F,data:D.data,path:D.path,errorMaps:[D.common.contextualErrorMap,D.schemaErrorMap,$,$===d8?void 0:d8].filter((Q)=>!!Q)});D.common.issues.push(J)}class ND{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(D,F){let $=[];for(let J of F){if(J.status==="aborted")return i;if(J.status==="dirty")D.dirty();$.push(J.value)}return{status:D.value,value:$}}static async mergeObjectAsync(D,F){let $=[];for(let J of F){let Q=await J.key,Y=await J.value;$.push({key:Q,value:Y})}return ND.mergeObjectSync(D,$)}static mergeObjectSync(D,F){let $={};for(let J of F){let{key:Q,value:Y}=J;if(Q.status==="aborted")return i;if(Y.status==="aborted")return i;if(Q.status==="dirty")D.dirty();if(Y.status==="dirty")D.dirty();if(Q.value!=="__proto__"&&(typeof Y.value<"u"||J.alwaysSet))$[Q.value]=Y.value}return{status:D.value,value:$}}}var M9=(D)=>{let{data:F,path:$,errorMaps:J,issueData:Q}=D,Y=[...$,...Q.path||[]],B={...Q,path:Y};if(Q.message!==void 0)return{...Q,path:Y,message:Q.message};let X="",G=J.filter((H)=>!!H).slice().reverse();for(let H of G)X=H(B,{data:F,defaultError:X}).message;return{...Q,path:Y,message:X}},vK0,i,j4=(D)=>({status:"dirty",value:D}),SD=(D)=>({status:"valid",value:D}),pJ=(D)=>D.status==="aborted",dJ=(D)=>D.status==="dirty",m6=(D)=>D.status==="valid",KF=(D)=>typeof Promise<"u"&&D instanceof Promise;var VW=P(()=>{lJ();EW();vK0=[];i=Object.freeze({status:"aborted"})});var i_=()=>{};var m;var a_=P(()=>{(function(D){D.errToObj=(F)=>typeof F==="string"?{message:F}:F||{},D.toString=(F)=>typeof F==="string"?F:F?.message})(m||(m={}))});class n1{constructor(D,F,$,J){this._cachedPath=[],this.parent=D,this.data=F,this._path=$,this._key=J}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}function B0(D){if(!D)return{};let{errorMap:F,invalid_type_error:$,required_error:J,description:Q}=D;if(F&&($||J))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(F)return{errorMap:F,description:Q};return{errorMap:(B,X)=>{let{message:G}=D;if(B.code==="invalid_enum_value")return{message:G??X.defaultError};if(typeof X.data>"u")return{message:G??J??X.defaultError};if(B.code!=="invalid_type")return{message:X.defaultError};return{message:G??$??X.defaultError}},description:Q}}class H0{get description(){return this._def.description}_getType(D){return M8(D.data)}_getOrReturnCtx(D,F){return F||{common:D.parent.common,data:D.data,parsedType:M8(D.data),schemaErrorMap:this._def.errorMap,path:D.path,parent:D.parent}}_processInputParams(D){return{status:new ND,ctx:{common:D.parent.common,data:D.data,parsedType:M8(D.data),schemaErrorMap:this._def.errorMap,path:D.path,parent:D.parent}}}_parseSync(D){let F=this._parse(D);if(KF(F))throw Error("Synchronous parse encountered promise.");return F}_parseAsync(D){let F=this._parse(D);return Promise.resolve(F)}parse(D,F){let $=this.safeParse(D,F);if($.success)return $.data;throw $.error}safeParse(D,F){let $={common:{issues:[],async:F?.async??!1,contextualErrorMap:F?.errorMap},path:F?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:M8(D)},J=this._parseSync({data:D,path:$.path,parent:$});return o_($,J)}"~validate"(D){let F={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:M8(D)};if(!this["~standard"].async)try{let $=this._parseSync({data:D,path:[],parent:F});return m6($)?{value:$.value}:{issues:F.common.issues}}catch($){if($?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;F.common={issues:[],async:!0}}return this._parseAsync({data:D,path:[],parent:F}).then(($)=>m6($)?{value:$.value}:{issues:F.common.issues})}async parseAsync(D,F){let $=await this.safeParseAsync(D,F);if($.success)return $.data;throw $.error}async safeParseAsync(D,F){let $={common:{issues:[],contextualErrorMap:F?.errorMap,async:!0},path:F?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:D,parsedType:M8(D)},J=this._parse({data:D,path:$.path,parent:$}),Q=await(KF(J)?J:Promise.resolve(J));return o_($,Q)}refine(D,F){let $=(J)=>{if(typeof F==="string"||typeof F>"u")return{message:F};else if(typeof F==="function")return F(J);else return F};return this._refinement((J,Q)=>{let Y=D(J),B=()=>Q.addIssue({code:T.custom,...$(J)});if(typeof Promise<"u"&&Y instanceof Promise)return Y.then((X)=>{if(!X)return B(),!1;else return!0});if(!Y)return B(),!1;else return!0})}refinement(D,F){return this._refinement(($,J)=>{if(!D($))return J.addIssue(typeof F==="function"?F($,J):F),!1;else return!0})}_refinement(D){return new i1({schema:this,typeName:a.ZodEffects,effect:{type:"refinement",refinement:D}})}superRefine(D){return this._refinement(D)}constructor(D){this.spa=this.safeParseAsync,this._def=D,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(F)=>this["~validate"](F)}}optional(){return c1.create(this,this._def)}nullable(){return n8.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return d1.create(this)}promise(){return k4.create(this,this._def)}or(D){return LF.create([this,D],this._def)}and(D){return AF.create(this,D,this._def)}transform(D){return new i1({...B0(this._def),schema:this,typeName:a.ZodEffects,effect:{type:"transform",transform:D}})}default(D){let F=typeof D==="function"?D:()=>D;return new RF({...B0(this._def),innerType:this,defaultValue:F,typeName:a.ZodDefault})}brand(){return new nJ({typeName:a.ZodBranded,type:this,...B0(this._def)})}catch(D){let F=typeof D==="function"?D:()=>D;return new OF({...B0(this._def),innerType:this,catchValue:F,typeName:a.ZodCatch})}describe(D){return new this.constructor({...this._def,description:D})}pipe(D){return T9.create(this,D)}readonly(){return wF.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function t_(D){let F="[0-5]\\d";if(D.precision)F=`${F}\\.\\d{${D.precision}}`;else if(D.precision==null)F=`${F}(\\.\\d+)?`;let $=D.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${F})${$}`}function oK0(D){return new RegExp(`^${t_(D)}$`)}function e_(D){let F=`${r_}T${t_(D)}`,$=[];if($.push(D.local?"Z?":"Z"),D.offset)$.push("([+-]\\d{2}:?\\d{2})");return F=`${F}(${$.join("|")})`,new RegExp(`^${F}$`)}function sK0(D,F){if((F==="v4"||!F)&&lK0.test(D))return!0;if((F==="v6"||!F)&&dK0.test(D))return!0;return!1}function rK0(D,F){if(!hK0.test(D))return!1;try{let[$]=D.split(".");if(!$)return!1;let J=$.replace(/-/g,"+").replace(/_/g,"/").padEnd($.length+(4-$.length%4)%4,"="),Q=JSON.parse(atob(J));if(typeof Q!=="object"||Q===null)return!1;if("typ"in Q&&Q?.typ!=="JWT")return!1;if(!Q.alg)return!1;if(F&&Q.alg!==F)return!1;return!0}catch{return!1}}function tK0(D,F){if((F==="v4"||!F)&&pK0.test(D))return!0;if((F==="v6"||!F)&&cK0.test(D))return!0;return!1}function eK0(D,F){let $=(D.toString().split(".")[1]||"").length,J=(F.toString().split(".")[1]||"").length,Q=$>J?$:J,Y=Number.parseInt(D.toFixed(Q).replace(".","")),B=Number.parseInt(F.toFixed(Q).replace(".",""));return Y%B/10**Q}function zF(D){if(D instanceof s0){let F={};for(let $ in D.shape){let J=D.shape[$];F[$]=c1.create(zF(J))}return new s0({...D._def,shape:()=>F})}else if(D instanceof d1)return new d1({...D._def,type:zF(D.element)});else if(D instanceof c1)return c1.create(zF(D.unwrap()));else if(D instanceof n8)return n8.create(zF(D.unwrap()));else if(D instanceof C8)return C8.create(D.items.map((F)=>zF(F)));else return D}function UW(D,F){let $=M8(D),J=M8(F);if(D===F)return{valid:!0,data:D};else if($===S.object&&J===S.object){let Q=E0.objectKeys(F),Y=E0.objectKeys(D).filter((X)=>Q.indexOf(X)!==-1),B={...D,...F};for(let X of Y){let G=UW(D[X],F[X]);if(!G.valid)return{valid:!1};B[X]=G.data}return{valid:!0,data:B}}else if($===S.array&&J===S.array){if(D.length!==F.length)return{valid:!1};let Q=[];for(let Y=0;Y<D.length;Y++){let B=D[Y],X=F[Y],G=UW(B,X);if(!G.valid)return{valid:!1};Q.push(G.data)}return{valid:!0,data:Q}}else if($===S.date&&J===S.date&&+D===+F)return{valid:!0,data:D};else return{valid:!1}}function Df(D,F){return new c6({values:D,typeName:a.ZodEnum,...B0(F)})}function s_(D,F){let $=typeof D==="function"?D(F):typeof D==="string"?{message:D}:D;return typeof $==="string"?{message:$}:$}function Ff(D,F={},$){if(D)return I4.create().superRefine((J,Q)=>{let Y=D(J);if(Y instanceof Promise)return Y.then((B)=>{if(!B){let X=s_(F,J),G=X.fatal??$??!0;Q.addIssue({code:"custom",...X,fatal:G})}});if(!Y){let B=s_(F,J),X=B.fatal??$??!0;Q.addIssue({code:"custom",...B,fatal:X})}return});return I4.create()}var o_=(D,F)=>{if(m6(F))return{success:!0,data:F.value};else{if(!D.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let $=new eD(D.common.issues);return this._error=$,this._error}}}},yK0,xK0,_K0,fK0,gK0,hK0,bK0,uK0,mK0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ZW,lK0,pK0,dK0,cK0,nK0,iK0,r_="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",aK0,p1,p6,d6,VF,P4,N9,ZF,UF,I4,l6,N8,C9,d1,s0,LF,c8=(D)=>{if(D instanceof MF)return c8(D.schema);else if(D instanceof i1)return c8(D.innerType());else if(D instanceof NF)return[D.value];else if(D instanceof c6)return D.options;else if(D instanceof CF)return E0.objectValues(D.enum);else if(D instanceof RF)return c8(D._def.innerType);else if(D instanceof ZF)return[void 0];else if(D instanceof UF)return[null];else if(D instanceof c1)return[void 0,...c8(D.unwrap())];else if(D instanceof n8)return[null,...c8(D.unwrap())];else if(D instanceof nJ)return c8(D.unwrap());else if(D instanceof wF)return c8(D.unwrap());else if(D instanceof OF)return c8(D._def.innerType);else return[]},cJ,AF,C8,R9,O9,S4,EF,MF,NF,c6,CF,k4,i1,c1,n8,RF,OF,w9,Dz0,nJ,T9,wF,Fz0,a,$z0=(D,F={message:`Input not instance of ${D.name}`})=>Ff(($)=>$ instanceof D,F),$f,Jf,Jz0,Qz0,Qf,Yz0,Bz0,Xz0,Gz0,Wz0,Hz0,qz0,Kz0,zz0,Ez0,Vz0,Zz0,Uz0,Lz0,Az0,Mz0,Nz0,Cz0,Rz0,Oz0,wz0,Tz0,jz0,Pz0,Iz0,Sz0,kz0,vz0,yz0,xz0=()=>$f().optional(),_z0=()=>Jf().optional(),fz0=()=>Qf().optional(),gz0,hz0;var Yf=P(()=>{mJ();lJ();a_();VW();A9();yK0=/^c[^\s-]{8,}$/i,xK0=/^[0-9a-z]+$/,_K0=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fK0=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,gK0=/^[a-z0-9_-]{21}$/i,hK0=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,bK0=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,uK0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lK0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,pK0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,dK0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,cK0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,nK0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,iK0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,aK0=new RegExp(`^${r_}$`);p1=class p1 extends H0{_parse(D){if(this._def.coerce)D.data=String(D.data);if(this._getType(D)!==S.string){let Q=this._getOrReturnCtx(D);return v(Q,{code:T.invalid_type,expected:S.string,received:Q.parsedType}),i}let $=new ND,J=void 0;for(let Q of this._def.checks)if(Q.kind==="min"){if(D.data.length<Q.value)J=this._getOrReturnCtx(D,J),v(J,{code:T.too_small,minimum:Q.value,type:"string",inclusive:!0,exact:!1,message:Q.message}),$.dirty()}else if(Q.kind==="max"){if(D.data.length>Q.value)J=this._getOrReturnCtx(D,J),v(J,{code:T.too_big,maximum:Q.value,type:"string",inclusive:!0,exact:!1,message:Q.message}),$.dirty()}else if(Q.kind==="length"){let Y=D.data.length>Q.value,B=D.data.length<Q.value;if(Y||B){if(J=this._getOrReturnCtx(D,J),Y)v(J,{code:T.too_big,maximum:Q.value,type:"string",inclusive:!0,exact:!0,message:Q.message});else if(B)v(J,{code:T.too_small,minimum:Q.value,type:"string",inclusive:!0,exact:!0,message:Q.message});$.dirty()}}else if(Q.kind==="email"){if(!uK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"email",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="emoji"){if(!ZW)ZW=new RegExp(mK0,"u");if(!ZW.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"emoji",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="uuid"){if(!fK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"uuid",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="nanoid"){if(!gK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"nanoid",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="cuid"){if(!yK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"cuid",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="cuid2"){if(!xK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"cuid2",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="ulid"){if(!_K0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"ulid",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="url")try{new URL(D.data)}catch{J=this._getOrReturnCtx(D,J),v(J,{validation:"url",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="regex"){if(Q.regex.lastIndex=0,!Q.regex.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"regex",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="trim")D.data=D.data.trim();else if(Q.kind==="includes"){if(!D.data.includes(Q.value,Q.position))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:{includes:Q.value,position:Q.position},message:Q.message}),$.dirty()}else if(Q.kind==="toLowerCase")D.data=D.data.toLowerCase();else if(Q.kind==="toUpperCase")D.data=D.data.toUpperCase();else if(Q.kind==="startsWith"){if(!D.data.startsWith(Q.value))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:{startsWith:Q.value},message:Q.message}),$.dirty()}else if(Q.kind==="endsWith"){if(!D.data.endsWith(Q.value))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:{endsWith:Q.value},message:Q.message}),$.dirty()}else if(Q.kind==="datetime"){if(!e_(Q).test(D.data))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:"datetime",message:Q.message}),$.dirty()}else if(Q.kind==="date"){if(!aK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:"date",message:Q.message}),$.dirty()}else if(Q.kind==="time"){if(!oK0(Q).test(D.data))J=this._getOrReturnCtx(D,J),v(J,{code:T.invalid_string,validation:"time",message:Q.message}),$.dirty()}else if(Q.kind==="duration"){if(!bK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"duration",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="ip"){if(!sK0(D.data,Q.version))J=this._getOrReturnCtx(D,J),v(J,{validation:"ip",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="jwt"){if(!rK0(D.data,Q.alg))J=this._getOrReturnCtx(D,J),v(J,{validation:"jwt",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="cidr"){if(!tK0(D.data,Q.version))J=this._getOrReturnCtx(D,J),v(J,{validation:"cidr",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="base64"){if(!nK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"base64",code:T.invalid_string,message:Q.message}),$.dirty()}else if(Q.kind==="base64url"){if(!iK0.test(D.data))J=this._getOrReturnCtx(D,J),v(J,{validation:"base64url",code:T.invalid_string,message:Q.message}),$.dirty()}else E0.assertNever(Q);return{status:$.value,value:D.data}}_regex(D,F,$){return this.refinement((J)=>D.test(J),{validation:F,code:T.invalid_string,...m.errToObj($)})}_addCheck(D){return new p1({...this._def,checks:[...this._def.checks,D]})}email(D){return this._addCheck({kind:"email",...m.errToObj(D)})}url(D){return this._addCheck({kind:"url",...m.errToObj(D)})}emoji(D){return this._addCheck({kind:"emoji",...m.errToObj(D)})}uuid(D){return this._addCheck({kind:"uuid",...m.errToObj(D)})}nanoid(D){return this._addCheck({kind:"nanoid",...m.errToObj(D)})}cuid(D){return this._addCheck({kind:"cuid",...m.errToObj(D)})}cuid2(D){return this._addCheck({kind:"cuid2",...m.errToObj(D)})}ulid(D){return this._addCheck({kind:"ulid",...m.errToObj(D)})}base64(D){return this._addCheck({kind:"base64",...m.errToObj(D)})}base64url(D){return this._addCheck({kind:"base64url",...m.errToObj(D)})}jwt(D){return this._addCheck({kind:"jwt",...m.errToObj(D)})}ip(D){return this._addCheck({kind:"ip",...m.errToObj(D)})}cidr(D){return this._addCheck({kind:"cidr",...m.errToObj(D)})}datetime(D){if(typeof D==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:D});return this._addCheck({kind:"datetime",precision:typeof D?.precision>"u"?null:D?.precision,offset:D?.offset??!1,local:D?.local??!1,...m.errToObj(D?.message)})}date(D){return this._addCheck({kind:"date",message:D})}time(D){if(typeof D==="string")return this._addCheck({kind:"time",precision:null,message:D});return this._addCheck({kind:"time",precision:typeof D?.precision>"u"?null:D?.precision,...m.errToObj(D?.message)})}duration(D){return this._addCheck({kind:"duration",...m.errToObj(D)})}regex(D,F){return this._addCheck({kind:"regex",regex:D,...m.errToObj(F)})}includes(D,F){return this._addCheck({kind:"includes",value:D,position:F?.position,...m.errToObj(F?.message)})}startsWith(D,F){return this._addCheck({kind:"startsWith",value:D,...m.errToObj(F)})}endsWith(D,F){return this._addCheck({kind:"endsWith",value:D,...m.errToObj(F)})}min(D,F){return this._addCheck({kind:"min",value:D,...m.errToObj(F)})}max(D,F){return this._addCheck({kind:"max",value:D,...m.errToObj(F)})}length(D,F){return this._addCheck({kind:"length",value:D,...m.errToObj(F)})}nonempty(D){return this.min(1,m.errToObj(D))}trim(){return new p1({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new p1({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new p1({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((D)=>D.kind==="datetime")}get isDate(){return!!this._def.checks.find((D)=>D.kind==="date")}get isTime(){return!!this._def.checks.find((D)=>D.kind==="time")}get isDuration(){return!!this._def.checks.find((D)=>D.kind==="duration")}get isEmail(){return!!this._def.checks.find((D)=>D.kind==="email")}get isURL(){return!!this._def.checks.find((D)=>D.kind==="url")}get isEmoji(){return!!this._def.checks.find((D)=>D.kind==="emoji")}get isUUID(){return!!this._def.checks.find((D)=>D.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((D)=>D.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((D)=>D.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((D)=>D.kind==="cuid2")}get isULID(){return!!this._def.checks.find((D)=>D.kind==="ulid")}get isIP(){return!!this._def.checks.find((D)=>D.kind==="ip")}get isCIDR(){return!!this._def.checks.find((D)=>D.kind==="cidr")}get isBase64(){return!!this._def.checks.find((D)=>D.kind==="base64")}get isBase64url(){return!!this._def.checks.find((D)=>D.kind==="base64url")}get minLength(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxLength(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}};p1.create=(D)=>{return new p1({checks:[],typeName:a.ZodString,coerce:D?.coerce??!1,...B0(D)})};p6=class p6 extends H0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(D){if(this._def.coerce)D.data=Number(D.data);if(this._getType(D)!==S.number){let Q=this._getOrReturnCtx(D);return v(Q,{code:T.invalid_type,expected:S.number,received:Q.parsedType}),i}let $=void 0,J=new ND;for(let Q of this._def.checks)if(Q.kind==="int"){if(!E0.isInteger(D.data))$=this._getOrReturnCtx(D,$),v($,{code:T.invalid_type,expected:"integer",received:"float",message:Q.message}),J.dirty()}else if(Q.kind==="min"){if(Q.inclusive?D.data<Q.value:D.data<=Q.value)$=this._getOrReturnCtx(D,$),v($,{code:T.too_small,minimum:Q.value,type:"number",inclusive:Q.inclusive,exact:!1,message:Q.message}),J.dirty()}else if(Q.kind==="max"){if(Q.inclusive?D.data>Q.value:D.data>=Q.value)$=this._getOrReturnCtx(D,$),v($,{code:T.too_big,maximum:Q.value,type:"number",inclusive:Q.inclusive,exact:!1,message:Q.message}),J.dirty()}else if(Q.kind==="multipleOf"){if(eK0(D.data,Q.value)!==0)$=this._getOrReturnCtx(D,$),v($,{code:T.not_multiple_of,multipleOf:Q.value,message:Q.message}),J.dirty()}else if(Q.kind==="finite"){if(!Number.isFinite(D.data))$=this._getOrReturnCtx(D,$),v($,{code:T.not_finite,message:Q.message}),J.dirty()}else E0.assertNever(Q);return{status:J.value,value:D.data}}gte(D,F){return this.setLimit("min",D,!0,m.toString(F))}gt(D,F){return this.setLimit("min",D,!1,m.toString(F))}lte(D,F){return this.setLimit("max",D,!0,m.toString(F))}lt(D,F){return this.setLimit("max",D,!1,m.toString(F))}setLimit(D,F,$,J){return new p6({...this._def,checks:[...this._def.checks,{kind:D,value:F,inclusive:$,message:m.toString(J)}]})}_addCheck(D){return new p6({...this._def,checks:[...this._def.checks,D]})}int(D){return this._addCheck({kind:"int",message:m.toString(D)})}positive(D){return this._addCheck({kind:"min",value:0,inclusive:!1,message:m.toString(D)})}negative(D){return this._addCheck({kind:"max",value:0,inclusive:!1,message:m.toString(D)})}nonpositive(D){return this._addCheck({kind:"max",value:0,inclusive:!0,message:m.toString(D)})}nonnegative(D){return this._addCheck({kind:"min",value:0,inclusive:!0,message:m.toString(D)})}multipleOf(D,F){return this._addCheck({kind:"multipleOf",value:D,message:m.toString(F)})}finite(D){return this._addCheck({kind:"finite",message:m.toString(D)})}safe(D){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:m.toString(D)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:m.toString(D)})}get minValue(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxValue(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}get isInt(){return!!this._def.checks.find((D)=>D.kind==="int"||D.kind==="multipleOf"&&E0.isInteger(D.value))}get isFinite(){let D=null,F=null;for(let $ of this._def.checks)if($.kind==="finite"||$.kind==="int"||$.kind==="multipleOf")return!0;else if($.kind==="min"){if(F===null||$.value>F)F=$.value}else if($.kind==="max"){if(D===null||$.value<D)D=$.value}return Number.isFinite(F)&&Number.isFinite(D)}};p6.create=(D)=>{return new p6({checks:[],typeName:a.ZodNumber,coerce:D?.coerce||!1,...B0(D)})};d6=class d6 extends H0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(D){if(this._def.coerce)try{D.data=BigInt(D.data)}catch{return this._getInvalidInput(D)}if(this._getType(D)!==S.bigint)return this._getInvalidInput(D);let $=void 0,J=new ND;for(let Q of this._def.checks)if(Q.kind==="min"){if(Q.inclusive?D.data<Q.value:D.data<=Q.value)$=this._getOrReturnCtx(D,$),v($,{code:T.too_small,type:"bigint",minimum:Q.value,inclusive:Q.inclusive,message:Q.message}),J.dirty()}else if(Q.kind==="max"){if(Q.inclusive?D.data>Q.value:D.data>=Q.value)$=this._getOrReturnCtx(D,$),v($,{code:T.too_big,type:"bigint",maximum:Q.value,inclusive:Q.inclusive,message:Q.message}),J.dirty()}else if(Q.kind==="multipleOf"){if(D.data%Q.value!==BigInt(0))$=this._getOrReturnCtx(D,$),v($,{code:T.not_multiple_of,multipleOf:Q.value,message:Q.message}),J.dirty()}else E0.assertNever(Q);return{status:J.value,value:D.data}}_getInvalidInput(D){let F=this._getOrReturnCtx(D);return v(F,{code:T.invalid_type,expected:S.bigint,received:F.parsedType}),i}gte(D,F){return this.setLimit("min",D,!0,m.toString(F))}gt(D,F){return this.setLimit("min",D,!1,m.toString(F))}lte(D,F){return this.setLimit("max",D,!0,m.toString(F))}lt(D,F){return this.setLimit("max",D,!1,m.toString(F))}setLimit(D,F,$,J){return new d6({...this._def,checks:[...this._def.checks,{kind:D,value:F,inclusive:$,message:m.toString(J)}]})}_addCheck(D){return new d6({...this._def,checks:[...this._def.checks,D]})}positive(D){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:m.toString(D)})}negative(D){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:m.toString(D)})}nonpositive(D){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:m.toString(D)})}nonnegative(D){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:m.toString(D)})}multipleOf(D,F){return this._addCheck({kind:"multipleOf",value:D,message:m.toString(F)})}get minValue(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D}get maxValue(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D}};d6.create=(D)=>{return new d6({checks:[],typeName:a.ZodBigInt,coerce:D?.coerce??!1,...B0(D)})};VF=class VF extends H0{_parse(D){if(this._def.coerce)D.data=Boolean(D.data);if(this._getType(D)!==S.boolean){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.boolean,received:$.parsedType}),i}return SD(D.data)}};VF.create=(D)=>{return new VF({typeName:a.ZodBoolean,coerce:D?.coerce||!1,...B0(D)})};P4=class P4 extends H0{_parse(D){if(this._def.coerce)D.data=new Date(D.data);if(this._getType(D)!==S.date){let Q=this._getOrReturnCtx(D);return v(Q,{code:T.invalid_type,expected:S.date,received:Q.parsedType}),i}if(Number.isNaN(D.data.getTime())){let Q=this._getOrReturnCtx(D);return v(Q,{code:T.invalid_date}),i}let $=new ND,J=void 0;for(let Q of this._def.checks)if(Q.kind==="min"){if(D.data.getTime()<Q.value)J=this._getOrReturnCtx(D,J),v(J,{code:T.too_small,message:Q.message,inclusive:!0,exact:!1,minimum:Q.value,type:"date"}),$.dirty()}else if(Q.kind==="max"){if(D.data.getTime()>Q.value)J=this._getOrReturnCtx(D,J),v(J,{code:T.too_big,message:Q.message,inclusive:!0,exact:!1,maximum:Q.value,type:"date"}),$.dirty()}else E0.assertNever(Q);return{status:$.value,value:new Date(D.data.getTime())}}_addCheck(D){return new P4({...this._def,checks:[...this._def.checks,D]})}min(D,F){return this._addCheck({kind:"min",value:D.getTime(),message:m.toString(F)})}max(D,F){return this._addCheck({kind:"max",value:D.getTime(),message:m.toString(F)})}get minDate(){let D=null;for(let F of this._def.checks)if(F.kind==="min"){if(D===null||F.value>D)D=F.value}return D!=null?new Date(D):null}get maxDate(){let D=null;for(let F of this._def.checks)if(F.kind==="max"){if(D===null||F.value<D)D=F.value}return D!=null?new Date(D):null}};P4.create=(D)=>{return new P4({checks:[],coerce:D?.coerce||!1,typeName:a.ZodDate,...B0(D)})};N9=class N9 extends H0{_parse(D){if(this._getType(D)!==S.symbol){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.symbol,received:$.parsedType}),i}return SD(D.data)}};N9.create=(D)=>{return new N9({typeName:a.ZodSymbol,...B0(D)})};ZF=class ZF extends H0{_parse(D){if(this._getType(D)!==S.undefined){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.undefined,received:$.parsedType}),i}return SD(D.data)}};ZF.create=(D)=>{return new ZF({typeName:a.ZodUndefined,...B0(D)})};UF=class UF extends H0{_parse(D){if(this._getType(D)!==S.null){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.null,received:$.parsedType}),i}return SD(D.data)}};UF.create=(D)=>{return new UF({typeName:a.ZodNull,...B0(D)})};I4=class I4 extends H0{constructor(){super(...arguments);this._any=!0}_parse(D){return SD(D.data)}};I4.create=(D)=>{return new I4({typeName:a.ZodAny,...B0(D)})};l6=class l6 extends H0{constructor(){super(...arguments);this._unknown=!0}_parse(D){return SD(D.data)}};l6.create=(D)=>{return new l6({typeName:a.ZodUnknown,...B0(D)})};N8=class N8 extends H0{_parse(D){let F=this._getOrReturnCtx(D);return v(F,{code:T.invalid_type,expected:S.never,received:F.parsedType}),i}};N8.create=(D)=>{return new N8({typeName:a.ZodNever,...B0(D)})};C9=class C9 extends H0{_parse(D){if(this._getType(D)!==S.undefined){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.void,received:$.parsedType}),i}return SD(D.data)}};C9.create=(D)=>{return new C9({typeName:a.ZodVoid,...B0(D)})};d1=class d1 extends H0{_parse(D){let{ctx:F,status:$}=this._processInputParams(D),J=this._def;if(F.parsedType!==S.array)return v(F,{code:T.invalid_type,expected:S.array,received:F.parsedType}),i;if(J.exactLength!==null){let Y=F.data.length>J.exactLength.value,B=F.data.length<J.exactLength.value;if(Y||B)v(F,{code:Y?T.too_big:T.too_small,minimum:B?J.exactLength.value:void 0,maximum:Y?J.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:J.exactLength.message}),$.dirty()}if(J.minLength!==null){if(F.data.length<J.minLength.value)v(F,{code:T.too_small,minimum:J.minLength.value,type:"array",inclusive:!0,exact:!1,message:J.minLength.message}),$.dirty()}if(J.maxLength!==null){if(F.data.length>J.maxLength.value)v(F,{code:T.too_big,maximum:J.maxLength.value,type:"array",inclusive:!0,exact:!1,message:J.maxLength.message}),$.dirty()}if(F.common.async)return Promise.all([...F.data].map((Y,B)=>{return J.type._parseAsync(new n1(F,Y,F.path,B))})).then((Y)=>{return ND.mergeArray($,Y)});let Q=[...F.data].map((Y,B)=>{return J.type._parseSync(new n1(F,Y,F.path,B))});return ND.mergeArray($,Q)}get element(){return this._def.type}min(D,F){return new d1({...this._def,minLength:{value:D,message:m.toString(F)}})}max(D,F){return new d1({...this._def,maxLength:{value:D,message:m.toString(F)}})}length(D,F){return new d1({...this._def,exactLength:{value:D,message:m.toString(F)}})}nonempty(D){return this.min(1,D)}};d1.create=(D,F)=>{return new d1({type:D,minLength:null,maxLength:null,exactLength:null,typeName:a.ZodArray,...B0(F)})};s0=class s0 extends H0{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let D=this._def.shape(),F=E0.objectKeys(D);return this._cached={shape:D,keys:F},this._cached}_parse(D){if(this._getType(D)!==S.object){let G=this._getOrReturnCtx(D);return v(G,{code:T.invalid_type,expected:S.object,received:G.parsedType}),i}let{status:$,ctx:J}=this._processInputParams(D),{shape:Q,keys:Y}=this._getCached(),B=[];if(!(this._def.catchall instanceof N8&&this._def.unknownKeys==="strip")){for(let G in J.data)if(!Y.includes(G))B.push(G)}let X=[];for(let G of Y){let H=Q[G],q=J.data[G];X.push({key:{status:"valid",value:G},value:H._parse(new n1(J,q,J.path,G)),alwaysSet:G in J.data})}if(this._def.catchall instanceof N8){let G=this._def.unknownKeys;if(G==="passthrough")for(let H of B)X.push({key:{status:"valid",value:H},value:{status:"valid",value:J.data[H]}});else if(G==="strict"){if(B.length>0)v(J,{code:T.unrecognized_keys,keys:B}),$.dirty()}else if(G==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let G=this._def.catchall;for(let H of B){let q=J.data[H];X.push({key:{status:"valid",value:H},value:G._parse(new n1(J,q,J.path,H)),alwaysSet:H in J.data})}}if(J.common.async)return Promise.resolve().then(async()=>{let G=[];for(let H of X){let q=await H.key,K=await H.value;G.push({key:q,value:K,alwaysSet:H.alwaysSet})}return G}).then((G)=>{return ND.mergeObjectSync($,G)});else return ND.mergeObjectSync($,X)}get shape(){return this._def.shape()}strict(D){return m.errToObj,new s0({...this._def,unknownKeys:"strict",...D!==void 0?{errorMap:(F,$)=>{let J=this._def.errorMap?.(F,$).message??$.defaultError;if(F.code==="unrecognized_keys")return{message:m.errToObj(D).message??J};return{message:J}}}:{}})}strip(){return new s0({...this._def,unknownKeys:"strip"})}passthrough(){return new s0({...this._def,unknownKeys:"passthrough"})}extend(D){return new s0({...this._def,shape:()=>({...this._def.shape(),...D})})}merge(D){return new s0({unknownKeys:D._def.unknownKeys,catchall:D._def.catchall,shape:()=>({...this._def.shape(),...D._def.shape()}),typeName:a.ZodObject})}setKey(D,F){return this.augment({[D]:F})}catchall(D){return new s0({...this._def,catchall:D})}pick(D){let F={};for(let $ of E0.objectKeys(D))if(D[$]&&this.shape[$])F[$]=this.shape[$];return new s0({...this._def,shape:()=>F})}omit(D){let F={};for(let $ of E0.objectKeys(this.shape))if(!D[$])F[$]=this.shape[$];return new s0({...this._def,shape:()=>F})}deepPartial(){return zF(this)}partial(D){let F={};for(let $ of E0.objectKeys(this.shape)){let J=this.shape[$];if(D&&!D[$])F[$]=J;else F[$]=J.optional()}return new s0({...this._def,shape:()=>F})}required(D){let F={};for(let $ of E0.objectKeys(this.shape))if(D&&!D[$])F[$]=this.shape[$];else{let Q=this.shape[$];while(Q instanceof c1)Q=Q._def.innerType;F[$]=Q}return new s0({...this._def,shape:()=>F})}keyof(){return Df(E0.objectKeys(this.shape))}};s0.create=(D,F)=>{return new s0({shape:()=>D,unknownKeys:"strip",catchall:N8.create(),typeName:a.ZodObject,...B0(F)})};s0.strictCreate=(D,F)=>{return new s0({shape:()=>D,unknownKeys:"strict",catchall:N8.create(),typeName:a.ZodObject,...B0(F)})};s0.lazycreate=(D,F)=>{return new s0({shape:D,unknownKeys:"strip",catchall:N8.create(),typeName:a.ZodObject,...B0(F)})};LF=class LF extends H0{_parse(D){let{ctx:F}=this._processInputParams(D),$=this._def.options;function J(Q){for(let B of Q)if(B.result.status==="valid")return B.result;for(let B of Q)if(B.result.status==="dirty")return F.common.issues.push(...B.ctx.common.issues),B.result;let Y=Q.map((B)=>new eD(B.ctx.common.issues));return v(F,{code:T.invalid_union,unionErrors:Y}),i}if(F.common.async)return Promise.all($.map(async(Q)=>{let Y={...F,common:{...F.common,issues:[]},parent:null};return{result:await Q._parseAsync({data:F.data,path:F.path,parent:Y}),ctx:Y}})).then(J);else{let Q=void 0,Y=[];for(let X of $){let G={...F,common:{...F.common,issues:[]},parent:null},H=X._parseSync({data:F.data,path:F.path,parent:G});if(H.status==="valid")return H;else if(H.status==="dirty"&&!Q)Q={result:H,ctx:G};if(G.common.issues.length)Y.push(G.common.issues)}if(Q)return F.common.issues.push(...Q.ctx.common.issues),Q.result;let B=Y.map((X)=>new eD(X));return v(F,{code:T.invalid_union,unionErrors:B}),i}}get options(){return this._def.options}};LF.create=(D,F)=>{return new LF({options:D,typeName:a.ZodUnion,...B0(F)})};cJ=class cJ extends H0{_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==S.object)return v(F,{code:T.invalid_type,expected:S.object,received:F.parsedType}),i;let $=this.discriminator,J=F.data[$],Q=this.optionsMap.get(J);if(!Q)return v(F,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[$]}),i;if(F.common.async)return Q._parseAsync({data:F.data,path:F.path,parent:F});else return Q._parseSync({data:F.data,path:F.path,parent:F})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(D,F,$){let J=new Map;for(let Q of F){let Y=c8(Q.shape[D]);if(!Y.length)throw Error(`A discriminator value for key \`${D}\` could not be extracted from all schema options`);for(let B of Y){if(J.has(B))throw Error(`Discriminator property ${String(D)} has duplicate value ${String(B)}`);J.set(B,Q)}}return new cJ({typeName:a.ZodDiscriminatedUnion,discriminator:D,options:F,optionsMap:J,...B0($)})}};AF=class AF extends H0{_parse(D){let{status:F,ctx:$}=this._processInputParams(D),J=(Q,Y)=>{if(pJ(Q)||pJ(Y))return i;let B=UW(Q.value,Y.value);if(!B.valid)return v($,{code:T.invalid_intersection_types}),i;if(dJ(Q)||dJ(Y))F.dirty();return{status:F.value,value:B.data}};if($.common.async)return Promise.all([this._def.left._parseAsync({data:$.data,path:$.path,parent:$}),this._def.right._parseAsync({data:$.data,path:$.path,parent:$})]).then(([Q,Y])=>J(Q,Y));else return J(this._def.left._parseSync({data:$.data,path:$.path,parent:$}),this._def.right._parseSync({data:$.data,path:$.path,parent:$}))}};AF.create=(D,F,$)=>{return new AF({left:D,right:F,typeName:a.ZodIntersection,...B0($)})};C8=class C8 extends H0{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==S.array)return v($,{code:T.invalid_type,expected:S.array,received:$.parsedType}),i;if($.data.length<this._def.items.length)return v($,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i;if(!this._def.rest&&$.data.length>this._def.items.length)v($,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F.dirty();let Q=[...$.data].map((Y,B)=>{let X=this._def.items[B]||this._def.rest;if(!X)return null;return X._parse(new n1($,Y,$.path,B))}).filter((Y)=>!!Y);if($.common.async)return Promise.all(Q).then((Y)=>{return ND.mergeArray(F,Y)});else return ND.mergeArray(F,Q)}get items(){return this._def.items}rest(D){return new C8({...this._def,rest:D})}};C8.create=(D,F)=>{if(!Array.isArray(D))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new C8({items:D,typeName:a.ZodTuple,rest:null,...B0(F)})};R9=class R9 extends H0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==S.object)return v($,{code:T.invalid_type,expected:S.object,received:$.parsedType}),i;let J=[],Q=this._def.keyType,Y=this._def.valueType;for(let B in $.data)J.push({key:Q._parse(new n1($,B,$.path,B)),value:Y._parse(new n1($,$.data[B],$.path,B)),alwaysSet:B in $.data});if($.common.async)return ND.mergeObjectAsync(F,J);else return ND.mergeObjectSync(F,J)}get element(){return this._def.valueType}static create(D,F,$){if(F instanceof H0)return new R9({keyType:D,valueType:F,typeName:a.ZodRecord,...B0($)});return new R9({keyType:p1.create(),valueType:D,typeName:a.ZodRecord,...B0(F)})}};O9=class O9 extends H0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==S.map)return v($,{code:T.invalid_type,expected:S.map,received:$.parsedType}),i;let J=this._def.keyType,Q=this._def.valueType,Y=[...$.data.entries()].map(([B,X],G)=>{return{key:J._parse(new n1($,B,$.path,[G,"key"])),value:Q._parse(new n1($,X,$.path,[G,"value"]))}});if($.common.async){let B=new Map;return Promise.resolve().then(async()=>{for(let X of Y){let G=await X.key,H=await X.value;if(G.status==="aborted"||H.status==="aborted")return i;if(G.status==="dirty"||H.status==="dirty")F.dirty();B.set(G.value,H.value)}return{status:F.value,value:B}})}else{let B=new Map;for(let X of Y){let{key:G,value:H}=X;if(G.status==="aborted"||H.status==="aborted")return i;if(G.status==="dirty"||H.status==="dirty")F.dirty();B.set(G.value,H.value)}return{status:F.value,value:B}}}};O9.create=(D,F,$)=>{return new O9({valueType:F,keyType:D,typeName:a.ZodMap,...B0($)})};S4=class S4 extends H0{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.parsedType!==S.set)return v($,{code:T.invalid_type,expected:S.set,received:$.parsedType}),i;let J=this._def;if(J.minSize!==null){if($.data.size<J.minSize.value)v($,{code:T.too_small,minimum:J.minSize.value,type:"set",inclusive:!0,exact:!1,message:J.minSize.message}),F.dirty()}if(J.maxSize!==null){if($.data.size>J.maxSize.value)v($,{code:T.too_big,maximum:J.maxSize.value,type:"set",inclusive:!0,exact:!1,message:J.maxSize.message}),F.dirty()}let Q=this._def.valueType;function Y(X){let G=new Set;for(let H of X){if(H.status==="aborted")return i;if(H.status==="dirty")F.dirty();G.add(H.value)}return{status:F.value,value:G}}let B=[...$.data.values()].map((X,G)=>Q._parse(new n1($,X,$.path,G)));if($.common.async)return Promise.all(B).then((X)=>Y(X));else return Y(B)}min(D,F){return new S4({...this._def,minSize:{value:D,message:m.toString(F)}})}max(D,F){return new S4({...this._def,maxSize:{value:D,message:m.toString(F)}})}size(D,F){return this.min(D,F).max(D,F)}nonempty(D){return this.min(1,D)}};S4.create=(D,F)=>{return new S4({valueType:D,minSize:null,maxSize:null,typeName:a.ZodSet,...B0(F)})};EF=class EF extends H0{constructor(){super(...arguments);this.validate=this.implement}_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==S.function)return v(F,{code:T.invalid_type,expected:S.function,received:F.parsedType}),i;function $(B,X){return M9({data:B,path:F.path,errorMaps:[F.common.contextualErrorMap,F.schemaErrorMap,qF(),d8].filter((G)=>!!G),issueData:{code:T.invalid_arguments,argumentsError:X}})}function J(B,X){return M9({data:B,path:F.path,errorMaps:[F.common.contextualErrorMap,F.schemaErrorMap,qF(),d8].filter((G)=>!!G),issueData:{code:T.invalid_return_type,returnTypeError:X}})}let Q={errorMap:F.common.contextualErrorMap},Y=F.data;if(this._def.returns instanceof k4){let B=this;return SD(async function(...X){let G=new eD([]),H=await B._def.args.parseAsync(X,Q).catch((V)=>{throw G.addIssue($(X,V)),G}),q=await Reflect.apply(Y,this,H);return await B._def.returns._def.type.parseAsync(q,Q).catch((V)=>{throw G.addIssue(J(q,V)),G})})}else{let B=this;return SD(function(...X){let G=B._def.args.safeParse(X,Q);if(!G.success)throw new eD([$(X,G.error)]);let H=Reflect.apply(Y,this,G.data),q=B._def.returns.safeParse(H,Q);if(!q.success)throw new eD([J(H,q.error)]);return q.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...D){return new EF({...this._def,args:C8.create(D).rest(l6.create())})}returns(D){return new EF({...this._def,returns:D})}implement(D){return this.parse(D)}strictImplement(D){return this.parse(D)}static create(D,F,$){return new EF({args:D?D:C8.create([]).rest(l6.create()),returns:F||l6.create(),typeName:a.ZodFunction,...B0($)})}};MF=class MF extends H0{get schema(){return this._def.getter()}_parse(D){let{ctx:F}=this._processInputParams(D);return this._def.getter()._parse({data:F.data,path:F.path,parent:F})}};MF.create=(D,F)=>{return new MF({getter:D,typeName:a.ZodLazy,...B0(F)})};NF=class NF extends H0{_parse(D){if(D.data!==this._def.value){let F=this._getOrReturnCtx(D);return v(F,{received:F.data,code:T.invalid_literal,expected:this._def.value}),i}return{status:"valid",value:D.data}}get value(){return this._def.value}};NF.create=(D,F)=>{return new NF({value:D,typeName:a.ZodLiteral,...B0(F)})};c6=class c6 extends H0{_parse(D){if(typeof D.data!=="string"){let F=this._getOrReturnCtx(D),$=this._def.values;return v(F,{expected:E0.joinValues($),received:F.parsedType,code:T.invalid_type}),i}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(D.data)){let F=this._getOrReturnCtx(D),$=this._def.values;return v(F,{received:F.data,code:T.invalid_enum_value,options:$}),i}return SD(D.data)}get options(){return this._def.values}get enum(){let D={};for(let F of this._def.values)D[F]=F;return D}get Values(){let D={};for(let F of this._def.values)D[F]=F;return D}get Enum(){let D={};for(let F of this._def.values)D[F]=F;return D}extract(D,F=this._def){return c6.create(D,{...this._def,...F})}exclude(D,F=this._def){return c6.create(this.options.filter(($)=>!D.includes($)),{...this._def,...F})}};c6.create=Df;CF=class CF extends H0{_parse(D){let F=E0.getValidEnumValues(this._def.values),$=this._getOrReturnCtx(D);if($.parsedType!==S.string&&$.parsedType!==S.number){let J=E0.objectValues(F);return v($,{expected:E0.joinValues(J),received:$.parsedType,code:T.invalid_type}),i}if(!this._cache)this._cache=new Set(E0.getValidEnumValues(this._def.values));if(!this._cache.has(D.data)){let J=E0.objectValues(F);return v($,{received:$.data,code:T.invalid_enum_value,options:J}),i}return SD(D.data)}get enum(){return this._def.values}};CF.create=(D,F)=>{return new CF({values:D,typeName:a.ZodNativeEnum,...B0(F)})};k4=class k4 extends H0{unwrap(){return this._def.type}_parse(D){let{ctx:F}=this._processInputParams(D);if(F.parsedType!==S.promise&&F.common.async===!1)return v(F,{code:T.invalid_type,expected:S.promise,received:F.parsedType}),i;let $=F.parsedType===S.promise?F.data:Promise.resolve(F.data);return SD($.then((J)=>{return this._def.type.parseAsync(J,{path:F.path,errorMap:F.common.contextualErrorMap})}))}};k4.create=(D,F)=>{return new k4({type:D,typeName:a.ZodPromise,...B0(F)})};i1=class i1 extends H0{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===a.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(D){let{status:F,ctx:$}=this._processInputParams(D),J=this._def.effect||null,Q={addIssue:(Y)=>{if(v($,Y),Y.fatal)F.abort();else F.dirty()},get path(){return $.path}};if(Q.addIssue=Q.addIssue.bind(Q),J.type==="preprocess"){let Y=J.transform($.data,Q);if($.common.async)return Promise.resolve(Y).then(async(B)=>{if(F.value==="aborted")return i;let X=await this._def.schema._parseAsync({data:B,path:$.path,parent:$});if(X.status==="aborted")return i;if(X.status==="dirty")return j4(X.value);if(F.value==="dirty")return j4(X.value);return X});else{if(F.value==="aborted")return i;let B=this._def.schema._parseSync({data:Y,path:$.path,parent:$});if(B.status==="aborted")return i;if(B.status==="dirty")return j4(B.value);if(F.value==="dirty")return j4(B.value);return B}}if(J.type==="refinement"){let Y=(B)=>{let X=J.refinement(B,Q);if($.common.async)return Promise.resolve(X);if(X instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return B};if($.common.async===!1){let B=this._def.schema._parseSync({data:$.data,path:$.path,parent:$});if(B.status==="aborted")return i;if(B.status==="dirty")F.dirty();return Y(B.value),{status:F.value,value:B.value}}else return this._def.schema._parseAsync({data:$.data,path:$.path,parent:$}).then((B)=>{if(B.status==="aborted")return i;if(B.status==="dirty")F.dirty();return Y(B.value).then(()=>{return{status:F.value,value:B.value}})})}if(J.type==="transform")if($.common.async===!1){let Y=this._def.schema._parseSync({data:$.data,path:$.path,parent:$});if(!m6(Y))return i;let B=J.transform(Y.value,Q);if(B instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:F.value,value:B}}else return this._def.schema._parseAsync({data:$.data,path:$.path,parent:$}).then((Y)=>{if(!m6(Y))return i;return Promise.resolve(J.transform(Y.value,Q)).then((B)=>({status:F.value,value:B}))});E0.assertNever(J)}};i1.create=(D,F,$)=>{return new i1({schema:D,typeName:a.ZodEffects,effect:F,...B0($)})};i1.createWithPreprocess=(D,F,$)=>{return new i1({schema:F,effect:{type:"preprocess",transform:D},typeName:a.ZodEffects,...B0($)})};c1=class c1 extends H0{_parse(D){if(this._getType(D)===S.undefined)return SD(void 0);return this._def.innerType._parse(D)}unwrap(){return this._def.innerType}};c1.create=(D,F)=>{return new c1({innerType:D,typeName:a.ZodOptional,...B0(F)})};n8=class n8 extends H0{_parse(D){if(this._getType(D)===S.null)return SD(null);return this._def.innerType._parse(D)}unwrap(){return this._def.innerType}};n8.create=(D,F)=>{return new n8({innerType:D,typeName:a.ZodNullable,...B0(F)})};RF=class RF extends H0{_parse(D){let{ctx:F}=this._processInputParams(D),$=F.data;if(F.parsedType===S.undefined)$=this._def.defaultValue();return this._def.innerType._parse({data:$,path:F.path,parent:F})}removeDefault(){return this._def.innerType}};RF.create=(D,F)=>{return new RF({innerType:D,typeName:a.ZodDefault,defaultValue:typeof F.default==="function"?F.default:()=>F.default,...B0(F)})};OF=class OF extends H0{_parse(D){let{ctx:F}=this._processInputParams(D),$={...F,common:{...F.common,issues:[]}},J=this._def.innerType._parse({data:$.data,path:$.path,parent:{...$}});if(KF(J))return J.then((Q)=>{return{status:"valid",value:Q.status==="valid"?Q.value:this._def.catchValue({get error(){return new eD($.common.issues)},input:$.data})}});else return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new eD($.common.issues)},input:$.data})}}removeCatch(){return this._def.innerType}};OF.create=(D,F)=>{return new OF({innerType:D,typeName:a.ZodCatch,catchValue:typeof F.catch==="function"?F.catch:()=>F.catch,...B0(F)})};w9=class w9 extends H0{_parse(D){if(this._getType(D)!==S.nan){let $=this._getOrReturnCtx(D);return v($,{code:T.invalid_type,expected:S.nan,received:$.parsedType}),i}return{status:"valid",value:D.data}}};w9.create=(D)=>{return new w9({typeName:a.ZodNaN,...B0(D)})};Dz0=Symbol("zod_brand");nJ=class nJ extends H0{_parse(D){let{ctx:F}=this._processInputParams(D),$=F.data;return this._def.type._parse({data:$,path:F.path,parent:F})}unwrap(){return this._def.type}};T9=class T9 extends H0{_parse(D){let{status:F,ctx:$}=this._processInputParams(D);if($.common.async)return(async()=>{let Q=await this._def.in._parseAsync({data:$.data,path:$.path,parent:$});if(Q.status==="aborted")return i;if(Q.status==="dirty")return F.dirty(),j4(Q.value);else return this._def.out._parseAsync({data:Q.value,path:$.path,parent:$})})();else{let J=this._def.in._parseSync({data:$.data,path:$.path,parent:$});if(J.status==="aborted")return i;if(J.status==="dirty")return F.dirty(),{status:"dirty",value:J.value};else return this._def.out._parseSync({data:J.value,path:$.path,parent:$})}}static create(D,F){return new T9({in:D,out:F,typeName:a.ZodPipeline})}};wF=class wF extends H0{_parse(D){let F=this._def.innerType._parse(D),$=(J)=>{if(m6(J))J.value=Object.freeze(J.value);return J};return KF(F)?F.then((J)=>$(J)):$(F)}unwrap(){return this._def.innerType}};wF.create=(D,F)=>{return new wF({innerType:D,typeName:a.ZodReadonly,...B0(F)})};Fz0={object:s0.lazycreate};(function(D){D.ZodString="ZodString",D.ZodNumber="ZodNumber",D.ZodNaN="ZodNaN",D.ZodBigInt="ZodBigInt",D.ZodBoolean="ZodBoolean",D.ZodDate="ZodDate",D.ZodSymbol="ZodSymbol",D.ZodUndefined="ZodUndefined",D.ZodNull="ZodNull",D.ZodAny="ZodAny",D.ZodUnknown="ZodUnknown",D.ZodNever="ZodNever",D.ZodVoid="ZodVoid",D.ZodArray="ZodArray",D.ZodObject="ZodObject",D.ZodUnion="ZodUnion",D.ZodDiscriminatedUnion="ZodDiscriminatedUnion",D.ZodIntersection="ZodIntersection",D.ZodTuple="ZodTuple",D.ZodRecord="ZodRecord",D.ZodMap="ZodMap",D.ZodSet="ZodSet",D.ZodFunction="ZodFunction",D.ZodLazy="ZodLazy",D.ZodLiteral="ZodLiteral",D.ZodEnum="ZodEnum",D.ZodEffects="ZodEffects",D.ZodNativeEnum="ZodNativeEnum",D.ZodOptional="ZodOptional",D.ZodNullable="ZodNullable",D.ZodDefault="ZodDefault",D.ZodCatch="ZodCatch",D.ZodPromise="ZodPromise",D.ZodBranded="ZodBranded",D.ZodPipeline="ZodPipeline",D.ZodReadonly="ZodReadonly"})(a||(a={}));$f=p1.create,Jf=p6.create,Jz0=w9.create,Qz0=d6.create,Qf=VF.create,Yz0=P4.create,Bz0=N9.create,Xz0=ZF.create,Gz0=UF.create,Wz0=I4.create,Hz0=l6.create,qz0=N8.create,Kz0=C9.create,zz0=d1.create,Ez0=s0.create,Vz0=s0.strictCreate,Zz0=LF.create,Uz0=cJ.create,Lz0=AF.create,Az0=C8.create,Mz0=R9.create,Nz0=O9.create,Cz0=S4.create,Rz0=EF.create,Oz0=MF.create,wz0=NF.create,Tz0=c6.create,jz0=CF.create,Pz0=k4.create,Iz0=i1.create,Sz0=c1.create,kz0=n8.create,vz0=i1.createWithPreprocess,yz0=T9.create,gz0={string:(D)=>p1.create({...D,coerce:!0}),number:(D)=>p6.create({...D,coerce:!0}),boolean:(D)=>VF.create({...D,coerce:!0}),bigint:(D)=>d6.create({...D,coerce:!0}),date:(D)=>P4.create({...D,coerce:!0})},hz0=i});var B1={};c4(B1,{void:()=>Kz0,util:()=>E0,unknown:()=>Hz0,union:()=>Zz0,undefined:()=>Xz0,tuple:()=>Az0,transformer:()=>Iz0,symbol:()=>Bz0,string:()=>$f,strictObject:()=>Vz0,setErrorMap:()=>kK0,set:()=>Cz0,record:()=>Mz0,quotelessJson:()=>IK0,promise:()=>Pz0,preprocess:()=>vz0,pipeline:()=>yz0,ostring:()=>xz0,optional:()=>Sz0,onumber:()=>_z0,oboolean:()=>fz0,objectUtil:()=>zW,object:()=>Ez0,number:()=>Jf,nullable:()=>kz0,null:()=>Gz0,never:()=>qz0,nativeEnum:()=>jz0,nan:()=>Jz0,map:()=>Nz0,makeIssue:()=>M9,literal:()=>wz0,lazy:()=>Oz0,late:()=>Fz0,isValid:()=>m6,isDirty:()=>dJ,isAsync:()=>KF,isAborted:()=>pJ,intersection:()=>Lz0,instanceof:()=>$z0,getParsedType:()=>M8,getErrorMap:()=>qF,function:()=>Rz0,enum:()=>Tz0,effect:()=>Iz0,discriminatedUnion:()=>Uz0,defaultErrorMap:()=>d8,datetimeRegex:()=>e_,date:()=>Yz0,custom:()=>Ff,coerce:()=>gz0,boolean:()=>Qf,bigint:()=>Qz0,array:()=>zz0,any:()=>Wz0,addIssueToContext:()=>v,ZodVoid:()=>C9,ZodUnknown:()=>l6,ZodUnion:()=>LF,ZodUndefined:()=>ZF,ZodType:()=>H0,ZodTuple:()=>C8,ZodTransformer:()=>i1,ZodSymbol:()=>N9,ZodString:()=>p1,ZodSet:()=>S4,ZodSchema:()=>H0,ZodRecord:()=>R9,ZodReadonly:()=>wF,ZodPromise:()=>k4,ZodPipeline:()=>T9,ZodParsedType:()=>S,ZodOptional:()=>c1,ZodObject:()=>s0,ZodNumber:()=>p6,ZodNullable:()=>n8,ZodNull:()=>UF,ZodNever:()=>N8,ZodNativeEnum:()=>CF,ZodNaN:()=>w9,ZodMap:()=>O9,ZodLiteral:()=>NF,ZodLazy:()=>MF,ZodIssueCode:()=>T,ZodIntersection:()=>AF,ZodFunction:()=>EF,ZodFirstPartyTypeKind:()=>a,ZodError:()=>eD,ZodEnum:()=>c6,ZodEffects:()=>i1,ZodDiscriminatedUnion:()=>cJ,ZodDefault:()=>RF,ZodDate:()=>P4,ZodCatch:()=>OF,ZodBranded:()=>nJ,ZodBoolean:()=>VF,ZodBigInt:()=>d6,ZodArray:()=>d1,ZodAny:()=>I4,Schema:()=>H0,ParseStatus:()=>ND,OK:()=>SD,NEVER:()=>hz0,INVALID:()=>i,EMPTY_PATH:()=>vK0,DIRTY:()=>j4,BRAND:()=>Dz0});var LW=P(()=>{lJ();VW();i_();A9();Yf();mJ()});var Bf=P(()=>{LW();LW()});import{copyFileSync as bz0,existsSync as Xf,mkdirSync as uz0}from"fs";import{homedir as iJ}from"os";import{join as TF}from"path";function lz0(D){let F=D.trim().replace(/\/+$/,"");try{let $=new URL(F);return $.protocol=$.protocol.toLowerCase(),$.host=$.host.toLowerCase(),$.toString().replace(/\/+$/,"")}catch{return console.error(`[nemar] could not parse stored apiUrl ${JSON.stringify(D)}; leaving as-is`),F}}function pz0(){if(process.env.NEMAR_CONFIG_DIR)return;let D=TF(AW,"config.json");if(Xf(D))return;let F=[];if(process.platform==="darwin")F.push(TF(iJ(),"Library","Preferences","nemar-nodejs","config.json"));if(process.platform==="win32"){let $=process.env.APPDATA||TF(iJ(),"AppData","Roaming");F.push(TF($,"nemar-nodejs","config.json"))}F.push(TF(iJ(),".config","nemar-nodejs","config.json"));for(let $ of F)if(Xf($))try{uz0(AW,{recursive:!0}),bz0($,D),console.error(`[nemar] Config migrated from ${$} to ${D}
92
92
  [nemar] You can safely remove the old file.`);return}catch(J){console.error(`[nemar] Failed to migrate config from ${$}:`,J,`
93
93
  [nemar] You can manually copy ${$} to ${D}`)}}function cz0(){let D=h0.get("accounts");if(D&&Object.keys(D).length>0)return;let F=h0.get("apiKey"),$=h0.get("username");if(!F&&!$)return;try{let J=$||"default",Q={};for(let Y of dz0){let B=h0.get(Y);if(B!==void 0)Q[Y]=B}h0.store={activeAccount:J,accounts:{[J]:Q}}}catch(J){console.error("Config migration failed (legacy config preserved):",J)}}function nz0(){let D=h0.store,F=D.accounts,$=!1;if(F)for(let[Q,Y]of Object.entries(F)){let B=Y?.apiUrl;if(!B)continue;if(mz0.has(lz0(B)))F[Q]={...Y,apiUrl:v4},console.error(`[nemar] migrated stored apiUrl for account "${Q}": ${B} -> ${v4}`),$=!0}let J=D.apiUrl;if(F&&Object.keys(F).length>0&&J!==void 0){let{apiUrl:Q,...Y}=D;try{h0.store=Y,console.error(`[nemar] removed stale top-level apiUrl from config (was: ${J})`),$=!1}catch(B){console.error("API URL cleanup failed (config file unchanged):",B)}}if($)try{h0.store={...h0.store,accounts:F}}catch(Q){console.error("API URL migration failed (config file unchanged):",Q)}}function j9(){return h0.get("activeAccount")}function y4(){return h0.get("accounts")||{}}function JD(){let D={apiUrl:v4},F=j9();if(!F)return D;return y4()[F]||D}function Gf(){return!!JD().sandboxCompleted}function a1(D,F){let $=j9()||"default",J=y4();if(!J[$])J[$]={apiUrl:v4};J[$][D]=F,h0.store={...h0.store,accounts:J,activeAccount:$}}function MW(D){let F=j9();if(!F)return;let $=y4();if($[F])delete $[F][D],h0.set("accounts",$)}function Wf(){let D=j9();if(!D){h0.clear();return}let F=y4();delete F[D];let $=Object.keys(F);if($.length>0)h0.store={...h0.store,accounts:F,activeAccount:$[0]};else h0.clear()}function Hf(){h0.clear()}function L0(){return!!JD().apiKey}function qf(){return h0.path}function P9(){let D=y4(),F=j9();return Object.entries(D).map(([$,J])=>({username:J.username||$,email:J.email,githubUsername:J.githubUsername,active:$===F}))}function Kf(D,F){let $=y4();$[D]=F,h0.store={...h0.store,accounts:$,activeAccount:D}}function zf(D){let F=y4();if(F[D])return h0.store={...h0.store,activeAccount:D},F[D];for(let[$,J]of Object.entries(F))if(J.githubUsername===D)return h0.store={...h0.store,activeAccount:$},J;return null}var v4="https://api.nemar.org",mz0,AW,WS0,h0,dz0;var x4=P(()=>{c_();Bf();mz0=new Set(["https://api.osc.earth/nemar","https://nemar-api.neuromechanist.workers.dev","https://nemar-api-dev.shirazi-10f.workers.dev"]);AW=process.env.NEMAR_CONFIG_DIR||TF(iJ(),".config","nemar"),WS0=B1.object({apiKey:B1.string().optional(),apiUrl:B1.string().url().default(v4),username:B1.string().optional(),email:B1.string().email().optional(),githubUsername:B1.string().optional(),sandboxCompleted:B1.boolean().optional(),sandboxDatasetId:B1.string().optional(),dismissedNoticeIds:B1.array(B1.number()).optional()});pz0();h0=new uJ({projectName:"nemar",schema:{activeAccount:{type:"string"},accounts:{type:"object"},apiKey:{type:"string"},apiUrl:{type:"string"},username:{type:"string"},email:{type:"string"},githubUsername:{type:"string"},sandboxCompleted:{type:"boolean"},sandboxDatasetId:{type:"string"}},cwd:AW}),dz0=["apiKey","apiUrl","username","email","githubUsername","sandboxCompleted","sandboxDatasetId","dismissedNoticeIds"];cz0();nz0()});function aJ(D){if(Ef)return;Ef=!0;let F=W.yellow("\u2500".repeat(60)),$=W.yellow.bold("[MAINTENANCE]"),J=W.dim(`mode: ${D.mode}`),Q=D.eta?`
94
94
  ${W.dim(`eta: ${D.eta}`)}`:"";process.stderr.write(`${F}
95
95
  ${$} ${D.message}
96
96
  ${J}${Q}
97
97
  ${F}
98
- `)}var Ef=!1;var NW=P(()=>{xD()});var Zf;var Vf=P(()=>{Zf={name:"nemar-cli",version:"0.8.14-PR465.a485d13",description:"CLI for NEMAR (Neuroelectromagnetic Data Archive and Tools Resource) dataset management",type:"module",main:"dist/index.js",bin:{nemar:"dist/index.js"},scripts:{dev:"bun run src/index.ts",build:"bun build src/index.ts --outdir dist --target bun --minify && sed '1s|#!/usr/bin/env node|#!/usr/bin/env bun|' dist/index.js > dist/index.js.tmp && mv dist/index.js.tmp dist/index.js",test:"bun test",lint:"biome check src/","lint:fix":"biome check --fix src/",format:"biome format --write src/",typecheck:"tsc --noEmit",prepublishOnly:"bun run build","docs:generate":"bun run scripts/generate-docs.ts","docs:serve":"mkdocs serve","docs:build":"mkdocs build",prepare:"husky",deploy:"wrangler deploy",preview:"wrangler dev"},keywords:["nemar","bids","neuroimaging","eeg","emg","datalad","cli"],author:"NEMAR Team",license:"CC-BY-NC-ND-4.0",repository:{type:"git",url:"git+https://github.com/nemarOrg/nemar-cli.git"},bugs:{url:"https://github.com/nemarOrg/nemar-cli/issues"},homepage:"https://nemar-cli.pages.dev",engines:{bun:">=1.0.0"},files:["dist","README.md","LICENSE"],dependencies:{chalk:"^5.3.0",commander:"^12.1.0",conf:"^13.0.1","fuse.js":"^7.1.0",inquirer:"^9.2.15",ora:"^8.0.1",zod:"^3.23.8"},"lint-staged":{"src/**/*.{ts,tsx}":["biome check --fix"],"backend/src/**/*.{ts,tsx}":["biome check --fix"]},devDependencies:{"@biomejs/biome":"1.9.4","@types/bcryptjs":"^3.0.0","@types/bun":"latest","@types/inquirer":"^9.0.7",bcryptjs:"^3.0.3",husky:"^9.1.7","lint-staged":"^16.3.2",typescript:"^5.5.4",wrangler:"^4.70.0",yaml:"^2.8.4"}}});var _4;var oJ=P(()=>{Vf();_4=Zf.version});function w0(D){if(D instanceof Error)return D.message;return String(D)}function Uf(){if(process.env.TEST_API_URL)return process.env.TEST_API_URL;if(RW)return CW;return JD().apiUrl||CW}async function b(D,F={},$=!1){let J=`${Uf()}${D}`,Q={"Content-Type":"application/json","X-CLI-Version":_4,...F.headers};if($){let X=JD();if(!X.apiKey&&$===!0)throw new p(401,"Not authenticated. Run 'nemar auth login' first.");if(X.apiKey)Q.Authorization=`Bearer ${X.apiKey}`}let Y;try{Y=await fetch(J,{...F,headers:Q})}catch(X){throw new p(0,`Network error: Could not connect to ${Uf()}`,{originalError:X instanceof Error?X.message:String(X)})}let B;try{B=await Y.json()}catch{throw new p(Y.status,`Invalid response from server (status ${Y.status})`)}if(!Y.ok){if(Y.status===503&&(B.mode==="read-only"||B.mode==="full")){let X=typeof B.message==="string"?B.message:"NEMAR is in maintenance mode. Please retry shortly.",G=typeof B.eta==="string"?B.eta:null,H=new rJ(B.mode,X,G,B.details);throw aJ(H),H}throw new p(Y.status,B.error||B.message||"Request failed",B.details,typeof B.step==="string"?B.step:void 0)}return B}async function Af(D){return b(`/auth/check-username?username=${encodeURIComponent(D)}`)}async function Mf(D){return b(`/auth/check-github?username=${encodeURIComponent(D)}`)}async function Nf(D){return b("/auth/signup",{method:"POST",body:JSON.stringify(D)})}async function Cf(D){return b("/auth/login",{method:"POST",body:JSON.stringify({api_key:D})})}async function Rf(D){return b("/auth/resend-verification",{method:"POST",body:JSON.stringify({email:D})})}async function Of(D,F){return b("/auth/retrieve-key",{method:"POST",body:JSON.stringify({email:D,password:F})})}async function wf(D){return b("/auth/request-key-regeneration",{method:"POST",body:JSON.stringify({email:D})})}async function tJ(){return b("/users/me",{},!0)}async function Tf(D,F){let $=new URLSearchParams;if(D)$.set("status",D);if(F)$.set("role",F);let J=$.toString()?`?${$.toString()}`:"";return b(`/admin/users${J}`,{},!0)}async function jf(D){return b(`/admin/approve/${D}`,{method:"POST"},!0)}async function Pf(D){return b(`/admin/revoke/${D}`,{method:"POST"},!0)}async function If(D,F){return b(`/admin/users/${D}/role`,{method:"POST",body:JSON.stringify({role:F})},!0)}async function OW(D,F){return b(`/admin/datasets/${D}/visibility`,{method:"PATCH",body:JSON.stringify({visibility:F})},!0)}async function Sf(D){return b(`/datasets/${D}/publish`,{method:"POST"},!0)}async function kf(D){return b(`/admin/datasets/${D}/ci`,{},!0)}async function f4(D){return b(`/admin/datasets/${D}/ci`,{method:"POST"},!0)}async function wW(D){return b(`/admin/datasets/${D}/ci/sync`,{method:"POST"},!0)}async function eJ(D){return b(`/datasets/${D}/ci/status`,{},!0)}async function vf(D){return b(`/datasets/${D}/manifest`,{},!0)}async function DQ(D,F){return b(`/datasets/${D}/manifest/${F}`,{},!0)}function yf(D){let F=D;if(!F.status)F.status="active";else if(!["active","archived","deleted"].includes(F.status))throw Error(`Invalid dataset status: ${F.status}`);if(!F.visibility)F.visibility="private";else if(!["public","private"].includes(F.visibility))throw Error(`Invalid dataset visibility: ${F.visibility}`);return F}async function I9(D={}){let F=new URLSearchParams;if(D.mine)F.set("mine","true");if(D.search)F.set("search",D.search);if(D.modality)F.set("modality",D.modality);if(D.author)F.set("author",D.author);if(D.task)F.set("task",D.task);if(D.hasDoi)F.set("has_doi","true");if(D.recent)F.set("recent",String(D.recent));if(D.sort)F.set("sort",D.sort);if(D.limit!=null)F.set("limit",String(D.limit));if(D.offset!=null)F.set("offset",String(D.offset));if(D.owner)F.set("owner",D.owner);let $=F.toString()?`?${F.toString()}`:"",J=await b(`/datasets${$}`,{},D.mine?!0:"optional");return J.datasets=J.datasets.map(yf),J}async function xf(D){return b(`/datasets/resolve/${D}`,{},"optional")}async function _f(D,F={}){let $=new URLSearchParams({q:D});if(F.modality)$.set("modality",F.modality);if(F.limit)$.set("limit",String(F.limit));return b(`/datasets/search?${$.toString()}`,{},"optional")}async function uD(D){let F=await b(`/datasets/${D}`,{},"optional");return yf(F.dataset)}async function ff(D){return b(`/datasets/${D}/versions`,{},!0)}async function FQ(D){return b("/datasets",{method:"POST",body:JSON.stringify(D)},!0)}async function $Q(D){return b(`/datasets/${D}/finalize`,{method:"POST"},!0)}async function R8(D,F){return b(`/datasets/${D}/upload-credentials`,{method:"POST",body:JSON.stringify({duration_seconds:F})},!0)}async function JQ(D,F){return b(`/datasets/${D}/download-credentials`,{method:"POST",body:JSON.stringify({duration_seconds:F})},!0)}async function gf(D,F){return b(`/admin/datasets/${D}/doi/concept`,{method:"POST",body:JSON.stringify(F)},!0)}async function S9(D){return b(`/admin/datasets/${D}/doi`,{},!0)}async function TW(D,F){return b(`/admin/datasets/${D}/doi/update`,{method:"POST",body:JSON.stringify(F)},!0)}async function jW(D){return b(`/datasets/${D}/request-access`,{method:"POST"},!0)}async function hf(D,F){return b(`/datasets/${D}/invite`,{method:"POST",body:JSON.stringify({username:F})},!0)}async function bf(D){return b(`/datasets/${D}/collaborators`,{},!0)}async function uf(D){return b("/sandbox/complete",{method:"POST",body:JSON.stringify({dataset_id:D})},!0)}async function mf(){return b("/sandbox/reset",{method:"POST"},!0)}async function lf(){return b("/sandbox/status",{},!0)}async function QQ(D){return b(`/datasets/${D}/publish/request`,{method:"POST"},!0)}async function pf(D){return b(`/datasets/${D}/publish/status`,{},!0)}async function df(D){return b(`/datasets/${D}/publish/resend`,{method:"POST"},!0)}async function cf(D){let F=D?`?status=${D}`:"";return b(`/admin/publish/requests${F}`,{},!0)}async function nf(D,F){return b(`/admin/publish/${D}/deny`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:F})},!0)}function az0(D){if(!(D instanceof p))return!1;if(D.statusCode===0)return!0;if(D.statusCode===429)return!0;if(D.statusCode>=500&&D.statusCode<600)return!0;if(D.statusCode===403&&/repository has been locked/i.test(D.message))return!0;return!1}async function YQ(D,F=!1,$=!1,J=!1,Q){let X,G=F,H=[],q;for(let K=1;K<=5;K++)try{let V,E=!0;do{if(V=await b(`/admin/publish/${D}/approve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({resume:E?G:!0,sandbox:$,s3_lock_continuation_token:X,skip_ci_check:J})},!0),E=!1,V.step_results)H.push(...V.step_results);if(V.hasMore&&V.s3_lock_continuation_token!==void 0)X=V.s3_lock_continuation_token;else break}while(V.hasMore);if(H.length>0)V.step_results=Lf(H);return V}catch(V){if(q=V,K===5||!az0(V)){if(V instanceof p&&H.length>0)V.stepResults=Lf(H);throw V}let Z=V;Q?.({attempt:K,maxAttempts:5,delayMs:1e4,step:Z.step,error:Z.message}),await new Promise((L)=>setTimeout(L,1e4)),G=!0}throw q}function Lf(D){let F=new Map;for(let $ of D)F.set($.step,$);return Array.from(F.values())}async function af(D,F){return b(`/admin/datasets/${D}/enrichment`,{method:"POST",body:JSON.stringify(F)},!0)}async function of(D){return b(`/admin/datasets/${D}/files`,{},!0)}async function sf(D){let F,$=0,J=[],Q=!0;while(Q){let Y=await b(`/admin/datasets/${D}/s3-lock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({continuation_token:F})},!0);if($+=Y.locked,Y.failed?.length)J.push(...Y.failed);if(Q=Y.hasMore,F=Y.continuation_token,Q&&!F)throw new p(500,"S3 lock paginated response missing continuation_token; aborting to avoid infinite loop")}return{locked:$,failed:J}}async function rf(D){return b(`/admin/datasets/${D}/reset`,{method:"POST"},!0)}async function tf(D,F=!1){return b(`/admin/datasets/${D}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({force:F})},!0)}async function ef(D){return b("/admin/datasets/bulk-delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataset_ids:D})},!0)}async function Dg(D){return b("/admin/datasets/import",{method:"POST",body:JSON.stringify(D)},!0)}async function Fg(D){return b(`/admin/datasets/${D}/sync`,{method:"POST"},!0)}async function $g(){return b("/admin/sync/status",{},!0)}async function Jg(D,F){return b(`/admin/datasets/${D}/reindex`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F??{})},!0)}async function Qg(D,F){return b("/admin/datasets/reindex/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filter:D,...F??{}})},!0)}async function Yg(){return b("/admin/email-preferences",{},!0)}async function Bg(D){return b("/admin/email-preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)},!0)}async function Xg(){return b("/notices",{},"optional")}async function Gg(){return b("/admin/notices",{},!0)}async function Wg(D){return b("/admin/notices",{method:"POST",body:JSON.stringify(D)},!0)}async function Hg(D){return b(`/admin/notices/${D}`,{method:"DELETE"},!0)}async function PW(D){return b("/admin/notify",{method:"POST",body:JSON.stringify(D)},!0)}var CW="https://api.nemar.org",sJ,p,rJ,RW;var i8=P(()=>{x4();NW();oJ();sJ=/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/;p=class p extends Error{statusCode;details;step;constructor(D,F,$,J){super(F);this.statusCode=D;this.details=$;this.step=J;this.name="ApiError"}};rJ=class rJ extends p{mode;eta;constructor(D,F,$,J){super(503,F,J);this.mode=D;this.eta=$;this.name="MaintenanceError"}};RW=CW.includes("workers.dev")});function Kg(D){IW=D}function SW(){return IW}function k9(D){if(IW)process.stderr.write(`${D}
98
+ `)}var Ef=!1;var NW=P(()=>{xD()});var Zf;var Vf=P(()=>{Zf={name:"nemar-cli",version:"0.8.14-PR466.0997777",description:"CLI for NEMAR (Neuroelectromagnetic Data Archive and Tools Resource) dataset management",type:"module",main:"dist/index.js",bin:{nemar:"dist/index.js"},scripts:{dev:"bun run src/index.ts",build:"bun build src/index.ts --outdir dist --target bun --minify && sed '1s|#!/usr/bin/env node|#!/usr/bin/env bun|' dist/index.js > dist/index.js.tmp && mv dist/index.js.tmp dist/index.js",test:"bun test",lint:"biome check src/","lint:fix":"biome check --fix src/",format:"biome format --write src/",typecheck:"tsc --noEmit",prepublishOnly:"bun run build","docs:generate":"bun run scripts/generate-docs.ts","docs:serve":"mkdocs serve","docs:build":"mkdocs build",prepare:"husky",deploy:"wrangler deploy",preview:"wrangler dev"},keywords:["nemar","bids","neuroimaging","eeg","emg","datalad","cli"],author:"NEMAR Team",license:"CC-BY-NC-ND-4.0",repository:{type:"git",url:"git+https://github.com/nemarOrg/nemar-cli.git"},bugs:{url:"https://github.com/nemarOrg/nemar-cli/issues"},homepage:"https://nemar-cli.pages.dev",engines:{bun:">=1.0.0"},files:["dist","README.md","LICENSE"],dependencies:{chalk:"^5.3.0",commander:"^12.1.0",conf:"^13.0.1","fuse.js":"^7.1.0",inquirer:"^9.2.15",ora:"^8.0.1",zod:"^3.23.8"},"lint-staged":{"src/**/*.{ts,tsx}":["biome check --fix"],"backend/src/**/*.{ts,tsx}":["biome check --fix"]},devDependencies:{"@biomejs/biome":"1.9.4","@types/bcryptjs":"^3.0.0","@types/bun":"latest","@types/inquirer":"^9.0.7",bcryptjs:"^3.0.3",husky:"^9.1.7","lint-staged":"^16.3.2",typescript:"^5.5.4",wrangler:"^4.70.0",yaml:"^2.8.4"}}});var _4;var oJ=P(()=>{Vf();_4=Zf.version});function w0(D){if(D instanceof Error)return D.message;return String(D)}function Uf(){if(process.env.TEST_API_URL)return process.env.TEST_API_URL;if(RW)return CW;return JD().apiUrl||CW}async function b(D,F={},$=!1){let J=`${Uf()}${D}`,Q={"Content-Type":"application/json","X-CLI-Version":_4,...F.headers};if($){let X=JD();if(!X.apiKey&&$===!0)throw new p(401,"Not authenticated. Run 'nemar auth login' first.");if(X.apiKey)Q.Authorization=`Bearer ${X.apiKey}`}let Y;try{Y=await fetch(J,{...F,headers:Q})}catch(X){throw new p(0,`Network error: Could not connect to ${Uf()}`,{originalError:X instanceof Error?X.message:String(X)})}let B;try{B=await Y.json()}catch{throw new p(Y.status,`Invalid response from server (status ${Y.status})`)}if(!Y.ok){if(Y.status===503&&(B.mode==="read-only"||B.mode==="full")){let X=typeof B.message==="string"?B.message:"NEMAR is in maintenance mode. Please retry shortly.",G=typeof B.eta==="string"?B.eta:null,H=new rJ(B.mode,X,G,B.details);throw aJ(H),H}throw new p(Y.status,B.error||B.message||"Request failed",B.details,typeof B.step==="string"?B.step:void 0)}return B}async function Af(D){return b(`/auth/check-username?username=${encodeURIComponent(D)}`)}async function Mf(D){return b(`/auth/check-github?username=${encodeURIComponent(D)}`)}async function Nf(D){return b("/auth/signup",{method:"POST",body:JSON.stringify(D)})}async function Cf(D){return b("/auth/login",{method:"POST",body:JSON.stringify({api_key:D})})}async function Rf(D){return b("/auth/resend-verification",{method:"POST",body:JSON.stringify({email:D})})}async function Of(D,F){return b("/auth/retrieve-key",{method:"POST",body:JSON.stringify({email:D,password:F})})}async function wf(D){return b("/auth/request-key-regeneration",{method:"POST",body:JSON.stringify({email:D})})}async function tJ(){return b("/users/me",{},!0)}async function Tf(D,F){let $=new URLSearchParams;if(D)$.set("status",D);if(F)$.set("role",F);let J=$.toString()?`?${$.toString()}`:"";return b(`/admin/users${J}`,{},!0)}async function jf(D){return b(`/admin/approve/${D}`,{method:"POST"},!0)}async function Pf(D){return b(`/admin/revoke/${D}`,{method:"POST"},!0)}async function If(D,F){return b(`/admin/users/${D}/role`,{method:"POST",body:JSON.stringify({role:F})},!0)}async function OW(D,F){return b(`/admin/datasets/${D}/visibility`,{method:"PATCH",body:JSON.stringify({visibility:F})},!0)}async function Sf(D){return b(`/datasets/${D}/publish`,{method:"POST"},!0)}async function kf(D){return b(`/admin/datasets/${D}/ci`,{},!0)}async function f4(D){return b(`/admin/datasets/${D}/ci`,{method:"POST"},!0)}async function wW(D){return b(`/admin/datasets/${D}/ci/sync`,{method:"POST"},!0)}async function eJ(D){return b(`/datasets/${D}/ci/status`,{},!0)}async function vf(D){return b(`/datasets/${D}/manifest`,{},!0)}async function DQ(D,F){return b(`/datasets/${D}/manifest/${F}`,{},!0)}function yf(D){let F=D;if(!F.status)F.status="active";else if(!["active","archived","deleted"].includes(F.status))throw Error(`Invalid dataset status: ${F.status}`);if(!F.visibility)F.visibility="private";else if(!["public","private"].includes(F.visibility))throw Error(`Invalid dataset visibility: ${F.visibility}`);return F}async function I9(D={}){let F=new URLSearchParams;if(D.mine)F.set("mine","true");if(D.search)F.set("search",D.search);if(D.modality)F.set("modality",D.modality);if(D.author)F.set("author",D.author);if(D.task)F.set("task",D.task);if(D.hasDoi)F.set("has_doi","true");if(D.recent)F.set("recent",String(D.recent));if(D.sort)F.set("sort",D.sort);if(D.limit!=null)F.set("limit",String(D.limit));if(D.offset!=null)F.set("offset",String(D.offset));if(D.owner)F.set("owner",D.owner);let $=F.toString()?`?${F.toString()}`:"",J=await b(`/datasets${$}`,{},D.mine?!0:"optional");return J.datasets=J.datasets.map(yf),J}async function xf(D){return b(`/datasets/resolve/${D}`,{},"optional")}async function _f(D,F={}){let $=new URLSearchParams({q:D});if(F.modality)$.set("modality",F.modality);if(F.limit)$.set("limit",String(F.limit));return b(`/datasets/search?${$.toString()}`,{},"optional")}async function uD(D){let F=await b(`/datasets/${D}`,{},"optional");return yf(F.dataset)}async function ff(D){return b(`/datasets/${D}/versions`,{},!0)}async function FQ(D){return b("/datasets",{method:"POST",body:JSON.stringify(D)},!0)}async function $Q(D){return b(`/datasets/${D}/finalize`,{method:"POST"},!0)}async function R8(D,F){return b(`/datasets/${D}/upload-credentials`,{method:"POST",body:JSON.stringify({duration_seconds:F})},!0)}async function JQ(D,F){return b(`/datasets/${D}/download-credentials`,{method:"POST",body:JSON.stringify({duration_seconds:F})},!0)}async function gf(D,F){return b(`/admin/datasets/${D}/doi/concept`,{method:"POST",body:JSON.stringify(F)},!0)}async function S9(D){return b(`/admin/datasets/${D}/doi`,{},!0)}async function TW(D,F){return b(`/admin/datasets/${D}/doi/update`,{method:"POST",body:JSON.stringify(F)},!0)}async function jW(D){return b(`/datasets/${D}/request-access`,{method:"POST"},!0)}async function hf(D,F){return b(`/datasets/${D}/invite`,{method:"POST",body:JSON.stringify({username:F})},!0)}async function bf(D){return b(`/datasets/${D}/collaborators`,{},!0)}async function uf(D){return b("/sandbox/complete",{method:"POST",body:JSON.stringify({dataset_id:D})},!0)}async function mf(){return b("/sandbox/reset",{method:"POST"},!0)}async function lf(){return b("/sandbox/status",{},!0)}async function QQ(D){return b(`/datasets/${D}/publish/request`,{method:"POST"},!0)}async function pf(D){return b(`/datasets/${D}/publish/status`,{},!0)}async function df(D){return b(`/datasets/${D}/publish/resend`,{method:"POST"},!0)}async function cf(D){let F=D?`?status=${D}`:"";return b(`/admin/publish/requests${F}`,{},!0)}async function nf(D,F){return b(`/admin/publish/${D}/deny`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:F})},!0)}function az0(D){if(!(D instanceof p))return!1;if(D.statusCode===0)return!0;if(D.statusCode===429)return!0;if(D.statusCode>=500&&D.statusCode<600)return!0;if(D.statusCode===403&&/repository has been locked/i.test(D.message))return!0;return!1}async function YQ(D,F=!1,$=!1,J=!1,Q){let X,G=F,H=[],q;for(let K=1;K<=5;K++)try{let V,E=!0;do{if(V=await b(`/admin/publish/${D}/approve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({resume:E?G:!0,sandbox:$,s3_lock_continuation_token:X,skip_ci_check:J})},!0),E=!1,V.step_results)H.push(...V.step_results);if(V.hasMore&&V.s3_lock_continuation_token!==void 0)X=V.s3_lock_continuation_token;else break}while(V.hasMore);if(H.length>0)V.step_results=Lf(H);return V}catch(V){if(q=V,K===5||!az0(V)){if(V instanceof p&&H.length>0)V.stepResults=Lf(H);throw V}let Z=V;Q?.({attempt:K,maxAttempts:5,delayMs:1e4,step:Z.step,error:Z.message}),await new Promise((L)=>setTimeout(L,1e4)),G=!0}throw q}function Lf(D){let F=new Map;for(let $ of D)F.set($.step,$);return Array.from(F.values())}async function af(D,F){return b(`/admin/datasets/${D}/enrichment`,{method:"POST",body:JSON.stringify(F)},!0)}async function of(D){return b(`/admin/datasets/${D}/files`,{},!0)}async function sf(D){let F,$=0,J=[],Q=!0;while(Q){let Y=await b(`/admin/datasets/${D}/s3-lock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({continuation_token:F})},!0);if($+=Y.locked,Y.failed?.length)J.push(...Y.failed);if(Q=Y.hasMore,F=Y.continuation_token,Q&&!F)throw new p(500,"S3 lock paginated response missing continuation_token; aborting to avoid infinite loop")}return{locked:$,failed:J}}async function rf(D){return b(`/admin/datasets/${D}/reset`,{method:"POST"},!0)}async function tf(D,F=!1){return b(`/admin/datasets/${D}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({force:F})},!0)}async function ef(D){return b("/admin/datasets/bulk-delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataset_ids:D})},!0)}async function Dg(D){return b("/admin/datasets/import",{method:"POST",body:JSON.stringify(D)},!0)}async function Fg(D){return b(`/admin/datasets/${D}/sync`,{method:"POST"},!0)}async function $g(){return b("/admin/sync/status",{},!0)}async function Jg(D,F){return b(`/admin/datasets/${D}/reindex`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F??{})},!0)}async function Qg(D,F){return b("/admin/datasets/reindex/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filter:D,...F??{}})},!0)}async function Yg(){return b("/admin/email-preferences",{},!0)}async function Bg(D){return b("/admin/email-preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)},!0)}async function Xg(){return b("/notices",{},"optional")}async function Gg(){return b("/admin/notices",{},!0)}async function Wg(D){return b("/admin/notices",{method:"POST",body:JSON.stringify(D)},!0)}async function Hg(D){return b(`/admin/notices/${D}`,{method:"DELETE"},!0)}async function PW(D){return b("/admin/notify",{method:"POST",body:JSON.stringify(D)},!0)}var CW="https://api.nemar.org",sJ,p,rJ,RW;var i8=P(()=>{x4();NW();oJ();sJ=/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/;p=class p extends Error{statusCode;details;step;constructor(D,F,$,J){super(F);this.statusCode=D;this.details=$;this.step=J;this.name="ApiError"}};rJ=class rJ extends p{mode;eta;constructor(D,F,$,J){super(503,F,J);this.mode=D;this.eta=$;this.name="MaintenanceError"}};RW=CW.includes("workers.dev")});function Kg(D){IW=D}function SW(){return IW}function k9(D){if(IW)process.stderr.write(`${D}
99
99
  `)}var IW=!1;function XD(D){if(D===0)return"0 B";let F=["B","KB","MB","GB","TB"],$=Math.min(Math.floor(Math.log(D)/Math.log(1024)),F.length-1);return`${(D/1024**$).toFixed($===0?0:1)} ${F[$]}`}function zg(D){return`${XD(D)}/s`}function oz0(D){if(D<60)return`${Math.round(D)}s`;if(D<3600)return`${Math.floor(D/60)}m ${Math.round(D%60)}s`;return`${Math.floor(D/3600)}h ${Math.floor(D%3600/60)}m`}function sz0(D,F=20){let $=Math.round(D/100*F),J=F-$;return`[${"=".repeat($)}${" ".repeat(J)}]`}class BQ{filesCompleted=0;filesTotal;bytesTotal=0;inFlight=new Map;currentFile="";startTime;lastUpdateTime;lastBytesTransferred=0;totalBytesTransferred=0;speedSamples=[];lastRenderedLine="";constructor(D=0,F=0){this.filesTotal=D,this.bytesTotal=F,this.startTime=Date.now(),this.lastUpdateTime=this.startTime}inFlightBytes(){let D=0;for(let F of this.inFlight.values())D+=F.transferred;return D}processLine(D){let F=D.file??D.action?.file;if(D.ok===!0||D.success===!0){this.filesCompleted++;let $=F??this.currentFile,J=$?this.inFlight.get($):void 0,Q=J?J.total||J.transferred:0;if(this.totalBytesTransferred+=Q,$)this.inFlight.delete($);this.render();return}if(D["byte-progress"]!==void 0){let $=F??this.currentFile;if(!$)return;this.currentFile=$;let J=this.inFlight.get($)??{transferred:0,total:0};if(J.transferred=D["byte-progress"]??J.transferred,D["total-size"]!==void 0)J.total=D["total-size"];this.inFlight.set($,J);let Q=Date.now(),Y=(Q-this.lastUpdateTime)/1000;if(Y>0.5){let B=this.totalBytesTransferred+this.inFlightBytes(),G=(B-this.lastBytesTransferred)/Y;if(G>0){if(this.speedSamples.push(G),this.speedSamples.length>5)this.speedSamples.shift()}this.lastBytesTransferred=B,this.lastUpdateTime=Q}this.render()}}incrementFilesCompleted(){this.filesCompleted++}setFilesTotal(D){this.filesTotal=D}setBytesTotal(D){this.bytesTotal=D}getPercent(){let D=this.totalBytesTransferred+this.inFlightBytes();if(this.bytesTotal>0)return Math.min(100,Math.round(D/this.bytesTotal*100));if(this.filesTotal>0)return Math.min(100,Math.round(this.filesCompleted/this.filesTotal*100));return null}getProgress(){return{filesCompleted:this.filesCompleted,filesTotal:this.filesTotal,bytesTransferred:this.totalBytesTransferred+this.inFlightBytes(),bytesTotal:this.bytesTotal,currentFile:this.currentFile||void 0}}render(){let D=this.speedSamples.length>0?this.speedSamples.reduce((B,X)=>B+X,0)/this.speedSamples.length:0,F=this.totalBytesTransferred+this.inFlightBytes(),$=0,J=!1;if(this.bytesTotal>0)$=Math.min(100,Math.round(F/this.bytesTotal*100)),J=!0;else if(this.filesTotal>0)$=Math.min(100,Math.round(this.filesCompleted/this.filesTotal*100)),J=!0;let Q=this.filesTotal>0?`${this.filesCompleted}/${this.filesTotal} files`:`${this.filesCompleted} files`,Y;if(J)Y=`${sz0($)} ${$}% ${Q}`;else Y=Q;if(F>0){let B=this.bytesTotal>0?`${XD(F)}/${XD(this.bytesTotal)}`:XD(F);Y+=` | ${B}`}if(D>0)Y+=` | ${zg(D)}`;if(D>0){let B=0;if(this.bytesTotal>0)B=Math.max(0,this.bytesTotal-F);else for(let X of this.inFlight.values())if(X.total>X.transferred)B+=X.total-X.transferred;if(B>0){let X=B/D;if(X>0)Y+=` | ETA ${oz0(X)}`}}if(Y!==this.lastRenderedLine)process.stderr.write(`\r${W.cyan(Y)}${" ".repeat(10)}`),this.lastRenderedLine=Y}finish(D){let F=(Date.now()-this.startTime)/1000;if(process.stderr.write(`\r${" ".repeat(this.lastRenderedLine.length+15)}\r`),D>0){let $=F>0?`${zg(this.totalBytesTransferred/F)}`:"",J=[`${D} file${D!==1?"s":""} downloaded`,this.totalBytesTransferred>0?XD(this.totalBytesTransferred):"",$].filter(Boolean).join(" | ");process.stderr.write(`${W.green(J)}
100
100
  `)}}}var kW=P(()=>{xD()});var Tg={};c4(Tg,{verifyGitHubAuth:()=>y9,toS3Credentials:()=>CD,switchBranch:()=>BE0,setKeyPresent:()=>wg,selectAnnexS3Remote:()=>bW,saveDataset:()=>o8,runCommand:()=>I,resolveUpstreamRef:()=>iW,readRemoteHeadDatasetVersion:()=>nW,readLocalDatasetVersion:()=>cW,pushToGitHub:()=>o1,pushBranch:()=>PF,markInheritedOpenNeuroRemotesIgnored:()=>hW,listDatasetVersions:()=>mW,isWorkingTreeDirty:()=>aW,isGitAnnexDataset:()=>w1,isDataladDataset:()=>qE0,initOrEnableSpecialRemote:()=>Cg,initDataset:()=>n6,gitMergeFastForward:()=>sW,gitFetchOrigin:()=>oW,gitAnnexAdd:()=>i6,getVersionCommit:()=>lW,getRemoteUuid:()=>DH,getLocalDatasetInfo:()=>uW,getKeyHashDirs:()=>WE0,getKeyHashDir:()=>Og,getDatasetStats:()=>JE0,getDatasetIdFromRemote:()=>r8,getDatasetData:()=>WQ,getCurrentBranch:()=>s8,getAnnexWhereisAll:()=>eW,getAnnexS3Remotes:()=>_9,formatBytes:()=>XD,ensureLocalMainBranch:()=>f9,ensureGitAnnexInitialized:()=>fW,enableS3Remote:()=>h4,dropUnusedAnnexObjects:()=>rW,dropFiles:()=>gW,createRevertBranch:()=>pW,createDataladDataset:()=>HE0,countPendingDownload:()=>GQ,copyToAnnexRemote:()=>w8,configureS3Remote:()=>O8,configureLargefiles:()=>g4,configureGitHubRemote:()=>a8,commitRevert:()=>dW,collectFileManifest:()=>tW,cloneDataset:()=>s1,clearAnnexCredentials:()=>kD,checkPrerequisites:()=>v9,checkGitHubSSH:()=>Lg,checkGitAnnexInstalled:()=>_W,checkDownloadPrerequisites:()=>jF,checkAWSCredentials:()=>DE0,batchSetKeysPresent:()=>FH,annexRemoteExists:()=>Ng,acceptGitHubInvitation:()=>x9,NEMAR_S3_REMOTE_NAME:()=>XQ,ANNEX_REMOTE_EXISTS_RE:()=>Mg});import{existsSync as yW,readFileSync as rz0,statSync as tz0}from"fs";import{join as xW}from"path";var{spawn:Ug}=globalThis.Bun;async function I(D,F={}){let $=Ug({cmd:D,cwd:F.cwd,stdout:"pipe",stderr:"pipe",env:{...process.env,GIT_TERMINAL_PROMPT:"0",...F.env}}),J=!1,Q;if(F.timeout)Q=setTimeout(()=>{J=!0,$.kill()},F.timeout);if(SW()){let G=F.cwd?` (cwd=${F.cwd})`:"";k9(W.dim(`$ ${D.join(" ")}${G}`))}let Y=await new Response($.stdout).text(),B=await new Response($.stderr).text(),X=await $.exited;if(Q)clearTimeout(Q);if(SW()){if(Y.trim())k9(W.dim(Y.trimEnd()));if(B.trim())k9(W.yellow(B.trimEnd()));k9(W.dim(`(exit ${X})`))}if(J)return{stdout:Y,stderr:B||`Command timed out after ${Math.round(F.timeout/1000)}s`,exitCode:X??1};return{stdout:Y,stderr:B,exitCode:X}}function Eg(D){return D.split(".").map((F)=>{let $=Number.parseInt(F.replace(/[^0-9]/g,""),10);return Number.isNaN($)?0:$})}function ez0(D,F){let $=Eg(D),J=Eg(F);for(let Q=0;Q<Math.max($.length,J.length);Q++){let Y=$[Q]||0,B=J[Q]||0;if(Y>B)return!0;if(Y<B)return!1}return!0}async function _W(){try{let{stdout:F,exitCode:$,stderr:J}=await I(["git-annex","version"]);if($!==0)return console.warn("git-annex version returned non-zero exit code:",$),console.warn("stderr:",J),{installed:!1,minVersion:"10.0",error:`Version check failed: ${J.trim()}`};let Q=F.match(/version:\s*(\d+\.\d+)/),Y=Q?Q[1]:void 0;if(!Y)console.warn("Could not parse git-annex version from output:",F);return{installed:!0,version:Y,minVersion:"10.0",compatible:Y?ez0(Y,"10.0"):void 0}}catch(F){let $=F instanceof Error?F.message:String(F);if($.includes("ENOENT")||$.includes("not found"))return console.info("git-annex not found in PATH"),{installed:!1,minVersion:"10.0"};return console.error("Error checking git-annex installation:",$),{installed:!1,minVersion:"10.0",error:$}}}async function Lg(){if(process.env.GH_TOKEN)return{accessible:!0,username:"token-auth",useHttps:!0};try{let{stdout:D,stderr:F}=await I(["ssh","-T","-o","BatchMode=yes","-o","StrictHostKeyChecking=accept-new","-o","ConnectTimeout=10","git@github.com"]),$=D+F,J=$.match(/Hi ([^!]+)!/);if(J)return{accessible:!0,username:J[1]};if($.includes("Permission denied"))return{accessible:!1};return{accessible:$.includes("successfully authenticated")}}catch(D){let F=D instanceof Error?D.message:String(D);if(F.includes("ENOENT")||F.includes("not found"))console.info("SSH command not found");else console.error("Error checking GitHub SSH access:",F);return{accessible:!1}}}async function DE0(){if(process.env.AWS_ACCESS_KEY_ID&&process.env.AWS_SECRET_ACCESS_KEY)return{configured:!0,source:"environment"};try{let{stdout:D,exitCode:F}=await I(["aws","configure","get","aws_access_key_id"]);if(F===0&&D.trim())return{configured:!0,source:"aws-cli"}}catch(D){let F=D instanceof Error?D.message:String(D);if(F.includes("ENOENT")||F.includes("not found"))console.info("AWS CLI not found in PATH");else console.error("Error checking AWS credentials:",F)}return{configured:!1}}function Ag(){let D=process.platform;if(D==="darwin")return"brew install git-annex";if(D==="linux")return"apt install git-annex (Debian/Ubuntu)";return"See https://git-annex.branchable.com/install/"}async function v9(){let[D,F]=await Promise.all([_W(),Lg()]),$=[];if(!D.installed)$.push(`git-annex is not installed. Install: ${Ag()}`);else if(D.compatible===!1)$.push(`git-annex version ${D.version} is too old. Required: >= ${D.minVersion}`);if(!F.accessible){if(!(await Rg()).token)$.push("GitHub authentication not configured. Run 'gh auth login' to authenticate.")}return{gitAnnex:D,githubSSH:F,allPassed:$.length===0,errors:$}}async function w1(D){if(!yW(xW(D,".git")))return!1;try{let{exitCode:F}=await I(["git","annex","info"],{cwd:D});return F===0}catch(F){let $=F instanceof Error?F.message:String(F);if(!$.includes("ENOENT")&&!$.includes("not found"))console.error(`Error checking if ${D} is a git-annex dataset:`,$);return!1}}async function n6(D,F={}){if(!F.force&&await w1(D))return{success:!0};try{let $={};if(F.author)$.GIT_AUTHOR_NAME=F.author.name,$.GIT_AUTHOR_EMAIL=F.author.email,$.GIT_COMMITTER_NAME=F.author.name,$.GIT_COMMITTER_EMAIL=F.author.email;let{stderr:J,exitCode:Q}=await I(["git","init","-b","main",D],{...Object.keys($).length>0?{env:$}:{}});if(Q!==0)return{success:!1,error:J.trim()||"Failed to initialize git repository"};let Y=Object.keys($).length>0?{env:$}:{},{stderr:B,exitCode:X}=await I(["git","annex","init"],{cwd:D,...Y});if(X!==0)return{success:!1,error:B.trim()||"Failed to initialize git-annex"};let{stderr:G,exitCode:H}=await I(["git","commit","--allow-empty","-m","Initialize dataset"],{cwd:D,...Y});if(H!==0)return{success:!1,error:G.trim()||"Failed to create initial commit"};let{stderr:q,exitCode:K}=await I(["git","annex","adjust","--unlock"],{cwd:D,...Y});if(K!==0)return{success:!1,error:q.trim()||"Failed to switch to unlocked mode"};return{success:!0}}catch($){return{success:!1,error:$.message}}}async function fW(D){try{let{exitCode:F,stderr:$}=await I(["git","annex","info"],{cwd:D});if(F===0)return{success:!0};if($.includes("First run: git-annex init")){let{stderr:J,exitCode:Q}=await I(["git","annex","init"],{cwd:D});if(Q!==0)return{success:!1,error:J.trim()||"Failed to initialize git-annex"};return{success:!0}}return{success:!1,error:$.trim()||"Failed to check git-annex status"}}catch(F){return{success:!1,error:F.message}}}async function g4(D,F){let $=["*.edf","*.bdf","*.set","*.fif","*.vhdr","*.eeg","*.cnt","*.fdt"],J=["*.tsv","*.json","*.md","*.txt","*.yml","*.yaml","README*","LICENSE*","CHANGES*",".bidsignore",".gitignore"],Q=$.map((G)=>`include=${G}`).join(" or "),Y=J.map((G)=>`exclude=${G}`).join(" and "),B=`(${Q} or largerthan=100kb) and ${Y}`,X=F||B;try{let{stderr:G,exitCode:H}=await I(["git","annex","config","--set","annex.largefiles",X],{cwd:D});if(H!==0)return{success:!1,error:G.trim()||"Failed to configure largefiles"};return{success:!0}}catch(G){return{success:!1,error:G.message}}}async function i6(D,F="."){try{let{stderr:$,exitCode:J}=await I(["git","annex","add",F],{cwd:D});if(J!==0)return{success:!1,error:$.trim()||"Failed to add files to git-annex"};return{success:!0}}catch($){return{success:!1,error:$.message}}}function CD(D){return{accessKeyId:D.access_key_id,secretAccessKey:D.secret_access_key,sessionToken:D.session_token}}function vW(D){let F=[/^\(merging .* into .*\.\.\.\)$/,/^\(recording state in git\.\.\.\)$/,/^\(scanning for /,/^\(checking /];return D.split(`
101
101
  `).filter(($)=>{let J=$.trim();if(!J)return!1;if(J.includes("setting annex-ignore"))return!1;if(F.some((Q)=>Q.test(J)))return!1;return!0}).join(`
@@ -113,7 +113,7 @@ Fix one of these:
113
113
  Add the public key to https://github.com/settings/keys
114
114
  Test with: ssh -T git@github.com`}}}try{let{stdout:Q}=await I(["git","remote","get-url",$],{cwd:D});if(Q.trim()){let{stderr:Y,exitCode:B}=await I(["git","remote","set-url",$,J],{cwd:D});if(B!==0)return{success:!1,error:Y.trim()}}else{let{stderr:Y,exitCode:B}=await I(["git","remote","add",$,J],{cwd:D});if(B!==0)return{success:!1,error:Y.trim()}}return{success:!0}}catch(Q){return{success:!1,error:Q.message}}}async function o8(D,F,$){try{let J={};if($)J.GIT_AUTHOR_NAME=$.name,J.GIT_AUTHOR_EMAIL=$.email,J.GIT_COMMITTER_NAME=$.name,J.GIT_COMMITTER_EMAIL=$.email;let{stderr:Q,exitCode:Y}=await I(["git","add","-A"],{cwd:D,...Object.keys(J).length>0?{env:J}:{}});if(Y!==0)return{success:!1,error:Q.trim()||"Failed to stage changes"};let{stdout:B,exitCode:X,stderr:G}=await I(["git","status","--porcelain"],{cwd:D});if(X!==0)return{success:!1,error:G.trim()||"Failed to check git status"};if(!B.trim())return{success:!0};let{stderr:H,exitCode:q}=await I(["git","commit","-m",F],{cwd:D,...Object.keys(J).length>0?{env:J}:{}});if(q!==0){if(H.includes("nothing to commit"))return{success:!0};return{success:!1,error:H.trim()||"Failed to commit changes"}}return{success:!0}}catch(J){return{success:!1,error:J.message}}}async function o1(D,F="origin",$){try{let J=$;if(!J){let G=await s8(D);if(!G||G==="HEAD"){let{exitCode:H}=await I(["git","log","-1","--oneline"],{cwd:D});if(H!==0)return{success:!1,error:"No commits found. The repository may not have been initialized correctly, or no changes were saved before pushing."};if(G==="HEAD")J="HEAD:main";else return{success:!1,error:"Could not detect current branch"}}else if(G.startsWith("adjusted/")){let H=G.replace(/^adjusted\//,"").replace(/\(.*\)$/,"");J=`${G}:${H}`}else J=G}let{stderr:Q,exitCode:Y}=await I(["git","push","-u",F,J],{cwd:D});if(Y!==0)return{success:!1,error:Q.trim()||"Failed to push to GitHub"};let{stderr:B,exitCode:X}=await I(["git","push",F,"git-annex"],{cwd:D});if(X!==0)return{success:!0,warning:`Main branch pushed, but git-annex branch failed: ${B.trim()}. Clone operations may have issues.`};return{success:!0}}catch(J){return{success:!1,error:J.message}}}async function JE0(D){try{let{stdout:J,exitCode:Q}=await I(["git","annex","info","--json"],{cwd:D});if(Q===0){let Y=JSON.parse(J);return{totalFiles:Y["local annex keys"]||0,totalSize:Y["local annex size"]||0,annexedFiles:Y["local annex keys"]||0,annexedSize:Y["local annex size"]||0}}}catch(J){let Q=J instanceof Error?J.message:String(J);console.warn("git annex info failed, falling back to manual counting:",Q)}let{stdout:F}=await I(["find",D,"-type","f"],{cwd:D});return{totalFiles:F.trim().split(`
115
115
  `).filter(Boolean).length,totalSize:0,annexedFiles:0,annexedSize:0}}async function jF(){let D=await _W(),F=[];if(!D.installed)F.push(`git-annex is not installed. Install: ${Ag()}`);else if(D.compatible===!1)F.push(`git-annex version ${D.version} is too old. Required: >= ${D.minVersion}`);return{gitAnnex:D,allPassed:F.length===0,errors:F}}async function s1(D,F){try{let{stderr:$,exitCode:J}=await I(["git","clone",D,F]);if(J!==0)return{success:!1,error:$.trim()||"Failed to clone dataset"};let{stderr:Q,exitCode:Y}=await I(["git","annex","init"],{cwd:F});if(Y!==0){let{exitCode:B}=await I(["git","annex","info"],{cwd:F});if(B!==0)return{success:!1,error:`Cloned repository but git-annex initialization failed: ${Q.trim()}`};console.warn("git annex init returned non-zero but annex is initialized")}return{success:!0}}catch($){return{success:!1,error:$.message}}}async function GQ(D,F,$){let J=F&&F.length>0?F:["."],Q=$&&$.length>0?$:[];try{let{stdout:Y,stderr:B,exitCode:X}=await I(["git","annex","find","--not","--in=here",...Q,"--json",...J],{cwd:D});if(X!==0){if(process.env.VERBOSE&&B.trim())console.warn(`countPendingDownload: git annex find failed: ${B.trim()}`);return null}let G=0,H=0,q=!1,K=!1;for(let V of Y.split(`
116
- `)){let E=V.trim();if(!E)continue;if(K=!0,!E.startsWith("{")){q=!0;continue}try{let Z=JSON.parse(E);if(G++,Z.bytesize){let L=Number.parseInt(Z.bytesize,10);if(Number.isFinite(L))H+=L}}catch{q=!0}}if(G===0&&K&&q)return null;return{fileCount:G,totalBytes:H}}catch(Y){if(process.env.VERBOSE)console.warn(`countPendingDownload: ${Y.message}`);return null}}async function WQ(D,F={}){let $=F.jobs||4,J=F.paths&&F.paths.length>0?F.paths:["."],Q=F.extraArgs??[],Y=Boolean(F.onProgress),B={};if(F.credentials){if(B.AWS_ACCESS_KEY_ID=F.credentials.accessKeyId,B.AWS_SECRET_ACCESS_KEY=F.credentials.secretAccessKey,F.credentials.sessionToken)B.AWS_SESSION_TOKEN=F.credentials.sessionToken}let X=Object.fromEntries(Object.entries({...process.env,...B}).filter((G)=>G[1]!=null));try{if(Y){let Z=["git","annex","get","--json","--json-progress","-J",$.toString(),...Q,...J],L=Ug({cmd:Z,cwd:D,stdout:"pipe",stderr:"pipe",env:X}),A=0,M="",O=[],w=(async()=>{let d=L.stderr.getReader(),W0=new TextDecoder;for(;;){let{done:F0,value:O0}=await d.read();if(F0)break;O.push(O0)}M=W0.decode(O.reduce((F0,O0)=>{let e=new Uint8Array(F0.length+O0.length);return e.set(F0),e.set(O0,F0.length),e},new Uint8Array))})(),k=L.stdout.getReader(),R=new TextDecoder,j="";for(;;){let{done:d,value:W0}=await k.read();if(d)break;j+=R.decode(W0,{stream:!0});let F0=j.split(`
116
+ `)){let E=V.trim();if(!E)continue;if(K=!0,!E.startsWith("{")){q=!0;continue}try{let Z=JSON.parse(E);if(G++,Z.bytesize){let L=Number.parseInt(Z.bytesize,10);if(Number.isFinite(L))H+=L}}catch{q=!0}}if(G===0&&K&&q)return null;return{fileCount:G,totalBytes:H}}catch(Y){if(process.env.VERBOSE)console.warn(`countPendingDownload: ${Y.message}`);return null}}async function WQ(D,F={}){let $=F.jobs||4,J=F.paths&&F.paths.length>0?F.paths:["."],Q=F.extraArgs??[],Y=Boolean(F.onProgress),B={};if(F.credentials){if(B.AWS_ACCESS_KEY_ID=F.credentials.accessKeyId,B.AWS_SECRET_ACCESS_KEY=F.credentials.secretAccessKey,F.credentials.sessionToken)B.AWS_SESSION_TOKEN=F.credentials.sessionToken}let X=Object.fromEntries(Object.entries({...process.env,...B}).filter((G)=>G[1]!=null));try{if(Y){let Z=["git","annex","get","--json","--json-progress","-J",$.toString(),...Q,...J],L=Ug({cmd:Z,cwd:D,stdout:"pipe",stderr:"pipe",env:X}),A=0,M="",R=[],w=(async()=>{let d=L.stderr.getReader(),W0=new TextDecoder;for(;;){let{done:F0,value:O0}=await d.read();if(F0)break;R.push(O0)}M=W0.decode(R.reduce((F0,O0)=>{let e=new Uint8Array(F0.length+O0.length);return e.set(F0),e.set(O0,F0.length),e},new Uint8Array))})(),k=L.stdout.getReader(),O=new TextDecoder,j="";for(;;){let{done:d,value:W0}=await k.read();if(d)break;j+=O.decode(W0,{stream:!0});let F0=j.split(`
117
117
  `);j=F0.pop()??"";for(let O0 of F0){let e=O0.trim();if(!e||!e.startsWith("{"))continue;try{let N0=JSON.parse(e);if(F.onProgress?.(N0),N0.ok===!0||N0.success===!0)A++}catch{}}}if(j.trim().startsWith("{"))try{let d=JSON.parse(j.trim());if(F.onProgress?.(d),d.ok===!0||d.success===!0)A++}catch{}if(await w,await L.exited!==0)return{success:!1,error:M.trim()||"Failed to get dataset data"};return{success:!0,filesDownloaded:A}}let G=["git","annex","get","-J",$.toString(),...Q,...J],{stdout:H,stderr:q,exitCode:K}=await I(G,{cwd:D,...Object.keys(B).length>0&&{env:X}});if(K!==0)return{success:!1,error:q.trim()||"Failed to get dataset data"};let V=H.match(/^get .+ ok$/gm);return{success:!0,filesDownloaded:V?V.length:0}}catch(G){return{success:!1,error:G.message}}}async function gW(D,F){let $=F&&F.length>0?F:["."];try{let J=["git","annex","drop",...$],{stdout:Q,stderr:Y,exitCode:B}=await I(J,{cwd:D});if(B!==0){let H=[];for(let V of Y.split(`
118
118
  `)){let E=V.match(/^drop (.+) \(unsafe\)/);if(E)H.push(E[1])}let q=Q.match(/^drop .+ ok$/gm),K=q?q.length:0;return{success:!1,error:Y.trim(),dropped:K,kept:H}}let X=Q.match(/^drop .+ ok$/gm);return{success:!0,dropped:X?X.length:0,kept:[]}}catch(J){return{success:!1,error:(J instanceof Error?J.message:String(J))||"Unknown error during drop",dropped:0,kept:[]}}}async function QE0(D,F){let{stdout:$,exitCode:J}=await I(["git","config",`remote.${F}.annex-ignore`],{cwd:D});if(J!==0)return!1;return $.trim().toLowerCase()==="true"}async function _9(D){let F=[],{stdout:$,exitCode:J}=await I(["git","config","--get-regexp","^remote\\..*\\.annex-s3"],{cwd:D});if(J===0&&$.trim())for(let B of $.trim().split(`
119
119
  `)){let X=B.match(/^remote\.(.+?)\.annex-/);if(X&&Zg.test(X[1]))F.push(X[1])}if(F.length===0){let{stdout:B,exitCode:X,stderr:G}=await I(["git","annex","info","--json"],{cwd:D});if(X!==0){if(G.trim())console.error(`git annex info failed: ${G.trim()}`);return[]}if(!B.trim())return[];let H;try{H=JSON.parse(B)}catch(K){let V=K instanceof Error?K.message:String(K);return console.error(`Failed to parse git-annex info JSON: ${V}`),[]}let q=[...Array.isArray(H["trusted repositories"])?H["trusted repositories"]:[],...Array.isArray(H["semitrusted repositories"])?H["semitrusted repositories"]:[],...Array.isArray(H["untrusted repositories"])?H["untrusted repositories"]:[]];for(let K of q){if(!K?.description?.includes("["))continue;let V=K.description.match(/\[(.+?)\]/);if(!V)continue;let E=V[1];if(!Zg.test(E))continue;let{stdout:Z}=await I(["git","config",`remote.${E}.annex-s3`],{cwd:D});if(Z.trim())F.push(E)}}let Q=[...new Set(F)],Y=[];for(let B of Q){if(await QE0(D,B))continue;Y.push(B)}return Y}async function hW(D,F){let $=[];for(let J of["s3-PUBLIC","s3-PRIVATE"]){let Q=await I(["git","config",`remote.${J}.annex-uuid`],{cwd:D});if(Q.exitCode!==0||!Q.stdout.trim())continue;let Y=await I(["git","config",`remote.${J}.annex-ignore`,"true"],{cwd:D});if(Y.exitCode!==0){F?.(J,Y.stderr.trim()||"unknown error");continue}$.push(J)}return $}async function bW(D,F){if(F.length===0)return null;if(F.length===1)return F[0];if(F.includes(XQ))return XQ;let{stdout:$,exitCode:J}=await I(["git","annex","info","--json"],{cwd:D});if(J===0&&$.trim())try{let Q=JSON.parse($),Y=[...Array.isArray(Q["trusted repositories"])?Q["trusted repositories"]:[],...Array.isArray(Q["semitrusted repositories"])?Q["semitrusted repositories"]:[],...Array.isArray(Q["untrusted repositories"])?Q["untrusted repositories"]:[]];for(let B of Y){if(B?.description!==`[${XQ}]`)continue;let X=typeof B.uuid==="string"?B.uuid:null;if(!X)continue;for(let G of F){let{stdout:H}=await I(["git","config",`remote.${G}.annex-uuid`],{cwd:D});if(H.trim()===X)return G}}}catch(Q){let Y=Q instanceof Error?Q.message:String(Q);console.warn(`Could not parse git annex info JSON for remote selection: ${Y}`)}return F[0]}async function w8(D,F,$=4,J){try{let Q=["git","annex","copy","--to",F,"-J",$.toString(),"."],Y=J?{AWS_ACCESS_KEY_ID:J.accessKeyId,AWS_SECRET_ACCESS_KEY:J.secretAccessKey,...J.sessionToken?{AWS_SESSION_TOKEN:J.sessionToken}:{}}:void 0,{stdout:B,stderr:X,exitCode:G}=await I(Q,{cwd:D,env:Y});if(G!==0)return{success:!1,error:X.trim()||"Failed to copy to remote",filesCopied:0};let H=B.match(/^copy .+ ok$/gm);return{success:!0,filesCopied:H?H.length:0}}catch(Q){return{success:!1,error:(Q instanceof Error?Q.message:String(Q))||"Unknown error during copy",filesCopied:0}}}async function uW(D){if(!yW(D))return null;try{let{stdout:F,exitCode:$}=await I(["git","annex","info","--json"],{cwd:D});if($===0){let J=JSON.parse(F),Q=0,Y=J["local annex size"]||"0 bytes",B=Y.match(/([\d.]+)\s*(bytes?|KB|MB|GB|TB)/i);if(B){let H=Number.parseFloat(B[1]),q=B[2].toLowerCase();Q=H*({byte:1,bytes:1,kb:1024,mb:1048576,gb:1073741824,tb:1099511627776}[q]||1)}let X=J["annexed files in working tree"]||0,G=J["local annex keys"]||0;return{files:X,size:Y,sizeBytes:Q,annexedFiles:X,presentFiles:G,missingFiles:X-G}}}catch(F){let $=F instanceof Error?F.message:String(F);console.warn(`Failed to get git-annex info for ${D}: ${$}`)}try{let{stdout:F}=await I(["find",".","-type","f","-not","-path","./.git/*"],{cwd:D}),$=F.trim().split(`
@@ -126,12 +126,12 @@ Fix one of these:
126
126
  `)}async function OE0(D,F,$){let J=await I(["bash","-c",`curl -sfL '${D}' | aws s3 cp - '${F}' --region '${$}'`],{});if(J.exitCode!==0)return{success:!1,error:J.stderr.trim()};return{success:!0}}async function wE0(D,F,$,J){let Q=0,Y=[];for(let B=0;B<D.length;B+=$){let X=D.slice(B,B+$),G=await Promise.allSettled(X.map(async(H)=>{let q=await OE0(H.sourceUrl,H.destUri,F);if(!q.success)throw Error(q.error||"Unknown S3 copy error");return H.key}));for(let H=0;H<G.length;H++){let q=G[H];if(q.status==="fulfilled")Q++;else Y.push({key:X[H].key,error:q.reason?.message||"Unknown error"})}J?.(Q,D.length,X[X.length-1].key)}return{copied:Q,failed:Y}}async function TE0(D,F={}){let $=AE0(D),J=F.workDir||zE0(g9(ZE0(),`nemar-import-${$}-`)),Q=g9(J,$);console.log(W.cyan(`
127
127
  Importing OpenNeuro dataset ${D} -> ${$}
128
128
  `)),console.log(W.dim(`Working directory: ${J}`));let Y=C("Cloning OpenNeuro dataset...").start(),B=`https://github.com/${UE0}/${D}.git`,X=await s1(B,Q);if(!X.success)Y.fail(`Failed to clone: ${X.error}`),process.exit(1);if(Y.succeed(`Cloned ${D}`),!await f9(Q,{yes:!0}))console.error(W.red("Cannot proceed with import: branch must be named 'main'.")),process.exit(1);let H=ME0(Q),q=H.Name||D,K=CE0(H);if(console.log(W.dim(` Dataset: ${q}`)),K)console.log(W.dim(` OpenNeuro DOI: ${K}`));let V=C("Creating NEMAR dataset record...").start();try{let g=await Dg({dataset_id:$,name:q,description:`Imported from OpenNeuro ${D}`,source:"openneuro",source_id:D});V.succeed(`Created ${g.dataset_id} (${g.github_repo})`)}catch(g){let J0=g instanceof Error?g.message:String(g);if(J0.includes("already exists")||J0.includes("409"))V.warn(`Dataset ${$} already exists, continuing...`);else V.fail(`Failed to create dataset: ${J0}`),process.exit(1)}let E=new Map;if(!F.skipData){let g=C("Mapping annexed files from OpenNeuro S3...").start(),J0=await I(["git","annex","enableremote","s3-PUBLIC"],{cwd:Q});if(J0.exitCode!==0)g.fail(`Failed to enable s3-PUBLIC remote: ${J0.stderr.trim()}`),process.exit(1);if(E=await eW(Q),E.size===0)g.warn("No annexed files found, skipping data copy");else g.succeed(`Found ${E.size} annexed files`)}await hW(Q,(g,J0)=>{console.log(W.yellow(` Warning: could not mark ${g} as annex-ignore (${J0}). Future pushes may try to upload to ${g}; run 'git config remote.${g}.annex-ignore true' manually.`))});let Z=C("Configuring NEMAR remote...").start(),L=await I(["git","remote","remove","origin"],{cwd:Q});if(L.exitCode!==0&&!L.stderr.includes("No such remote"))Z.fail(`Failed to remove OpenNeuro remote: ${L.stderr.trim()}`),process.exit(1);let A=`git@github.com:nemarDatasets/${$}.git`,M=await a8(Q,A,"origin");if(!M.success)Z.fail(`Failed to configure remote: ${M.error}`),process.exit(1);if(Z.succeed("Configured NEMAR remote"),!F.skipData&&E.size>0){let g=C("Setting up NEMAR S3 remote...").start(),J0=NE0(),V0=await O8(Q,{name:"nemar-s3",bucket:jg,prefix:`${$}/objects`,region:Pg},J0);if(!V0.success)g.fail(`Failed to configure S3 remote: ${V0.error}`),process.exit(1);let BD=await DH(Q,"nemar-s3");if(!BD)g.fail("Failed to get NEMAR S3 remote UUID"),process.exit(1);g.succeed("Configured NEMAR S3 remote");let yD=C("Preparing S3-to-S3 copy...").start(),W1=[],yF=[];for(let[lD,c9]of E){if(!c9.startsWith("http")){yF.push(lD);continue}let Hb=`s3://${jg}/${$}/objects/${lD}`;W1.push({key:lD,sourceUrl:c9,destUri:Hb})}if(yF.length>0)console.log(W.yellow(` Skipped ${yF.length} keys (no source URL)`));yD.succeed(`Prepared ${W1.length} files for S3-to-S3 copy`);let e8=C(`Copying ${W1.length} files to NEMAR S3...`).start(),OD=await wE0(W1,Pg,8,(lD,c9)=>{e8.text=`Copying files to NEMAR S3... ${lD}/${c9}`});if(OD.failed.length>0){console.error(W.red(`
129
- Failed to copy ${OD.failed.length} files:`));for(let lD of OD.failed.slice(0,5))console.error(W.red(` ${lD.key}: ${lD.error}`));if(OD.failed.length>5)console.error(W.red(` ... and ${OD.failed.length-5} more`));e8.fail(`${OD.failed.length} of ${W1.length} files failed to copy. Re-run to retry.`),process.exit(1)}e8.succeed(`Copied ${OD.copied} files to NEMAR S3`);let Xb=C("Registering files in git-annex...").start(),Gb=new Set(OD.failed.map((lD)=>lD.key)),Wb=W1.filter((lD)=>!Gb.has(lD.key)).map((lD)=>lD.key),OQ=await FH(Q,Wb,BD);if(OQ.failed>0)console.log(W.yellow(` ${OQ.failed} keys failed to register (non-fatal)`));Xb.succeed(`Registered ${OQ.success} files in git-annex`)}let O=C("Seeding metadata...").start();try{RE0(Q,$,D,H,K)}catch(g){O.fail(`Failed to seed metadata: ${g instanceof Error?g.message:String(g)}`),process.exit(1)}let w=await I(["git","add",".nemar/metadata.json"],{cwd:Q});if(w.exitCode!==0)O.fail(`Failed to stage metadata: ${w.stderr.trim()}`),process.exit(1);let k=await I(["git","commit","-m",`Add NEMAR metadata (imported from OpenNeuro ${D})`],{cwd:Q});if(k.exitCode!==0&&!k.stdout.includes("nothing to commit"))O.fail(`Failed to commit metadata: ${k.stderr.trim()}`),process.exit(1);O.succeed("Seeded .nemar/metadata.json");let R=C("Pushing to nemarDatasets...").start(),j=await o1(Q,"origin");if(!j.success)R.fail(`Failed to push: ${j.error}`),process.exit(1);if(j.warning)R.fail(`Pushed main but git-annex branch failed: ${j.warning}. Aborting \u2014 published dataset would be uncloneable. Investigate the git-annex push failure and re-run.`),process.exit(1);R.succeed("Pushed to nemarDatasets");let y=!1,d=C("Deploying CI workflows...").start();try{await f4($),d.succeed("CI workflows deployed (BIDS validation, LLM enrichment, archive generation)"),y=!0}catch(g){let J0=g instanceof Error?g.message:String(g);d.fail(`CI deployment failed: ${J0}`),console.log(W.dim(` After fixing the deploy failure, run 'nemar admin ci add ${$}' and 'nemar admin publish request/approve ${$}' to resume.`))}let W0=null;if(y){let g=C("Waiting for BIDS validation run to register...").start();if(W0=await LE0($,g),W0.kind==="found")g.succeed("BIDS validation run registered; deferring to ci_check at approval");else if(W0.kind==="timeout"){let J0=F.trustUpstream?"trusting upstream OpenNeuro validation (--trust-upstream)":"no --trust-upstream \u2014 aborting";g.warn(`BIDS validation run did not register within 120s; ${J0}`)}else{let J0=W0.lastError instanceof Error?W0.lastError.message:String(W0.lastError);g.fail(`All BIDS validation polls failed (last error: ${J0})`)}}let F0=Sg({ciDeployed:y,poll:W0,trustUpstream:F.trustUpstream??!1});if(F0.abortReason)console.error(W.red(F0.abortReason)),process.exit(1);let O0=F0.skipCiCheck,e=5,N0=300000,GD=C("Requesting publication...").start(),N=!1;for(let g=1;g<=e;g++)try{await QQ($),N=!0;break}catch(J0){let V0=J0 instanceof Error?J0.message:String(J0);if(!V0.includes("BIDS validation is currently running"))GD.fail(`Failed to request publication: ${V0}`),process.exit(1);if(g===e)GD.fail(`BIDS validation still in progress after ${e} attempts (~${Math.round(e*N0/60000)}min). Re-run 'nemar admin publish request/approve ${$}' once validation completes.`),process.exit(1);GD.text=`Waiting for BIDS validation to complete... (attempt ${g}/${e}, next retry in 5min)`,await new Promise((yD)=>setTimeout(yD,N0))}if(N)GD.succeed("Publication requested");let n=C("Approving publication...").start(),h=10,P0=!1;for(let g=1;g<=h;g++)try{await YQ($,g>1,!1,O0),P0=!0;break}catch(J0){let V0=J0 instanceof Error?J0.message:String(J0);if(g<h)n.text=`Approving publication... (attempt ${g+1}/${h})`,await new Promise((BD)=>setTimeout(BD,3000));else n.fail(`Failed to approve publication after ${h} attempts: ${V0}`),process.exit(1)}if(P0)n.succeed("Publication approved");console.log(W.green(`
129
+ Failed to copy ${OD.failed.length} files:`));for(let lD of OD.failed.slice(0,5))console.error(W.red(` ${lD.key}: ${lD.error}`));if(OD.failed.length>5)console.error(W.red(` ... and ${OD.failed.length-5} more`));e8.fail(`${OD.failed.length} of ${W1.length} files failed to copy. Re-run to retry.`),process.exit(1)}e8.succeed(`Copied ${OD.copied} files to NEMAR S3`);let Xb=C("Registering files in git-annex...").start(),Gb=new Set(OD.failed.map((lD)=>lD.key)),Wb=W1.filter((lD)=>!Gb.has(lD.key)).map((lD)=>lD.key),OQ=await FH(Q,Wb,BD);if(OQ.failed>0)console.log(W.yellow(` ${OQ.failed} keys failed to register (non-fatal)`));Xb.succeed(`Registered ${OQ.success} files in git-annex`)}let R=C("Seeding metadata...").start();try{RE0(Q,$,D,H,K)}catch(g){R.fail(`Failed to seed metadata: ${g instanceof Error?g.message:String(g)}`),process.exit(1)}let w=await I(["git","add",".nemar/metadata.json"],{cwd:Q});if(w.exitCode!==0)R.fail(`Failed to stage metadata: ${w.stderr.trim()}`),process.exit(1);let k=await I(["git","commit","-m",`Add NEMAR metadata (imported from OpenNeuro ${D})`],{cwd:Q});if(k.exitCode!==0&&!k.stdout.includes("nothing to commit"))R.fail(`Failed to commit metadata: ${k.stderr.trim()}`),process.exit(1);R.succeed("Seeded .nemar/metadata.json");let O=C("Pushing to nemarDatasets...").start(),j=await o1(Q,"origin");if(!j.success)O.fail(`Failed to push: ${j.error}`),process.exit(1);if(j.warning)O.fail(`Pushed main but git-annex branch failed: ${j.warning}. Aborting \u2014 published dataset would be uncloneable. Investigate the git-annex push failure and re-run.`),process.exit(1);O.succeed("Pushed to nemarDatasets");let y=!1,d=C("Deploying CI workflows...").start();try{await f4($),d.succeed("CI workflows deployed (BIDS validation, LLM enrichment, archive generation)"),y=!0}catch(g){let J0=g instanceof Error?g.message:String(g);d.fail(`CI deployment failed: ${J0}`),console.log(W.dim(` After fixing the deploy failure, run 'nemar admin ci add ${$}' and 'nemar admin publish request/approve ${$}' to resume.`))}let W0=null;if(y){let g=C("Waiting for BIDS validation run to register...").start();if(W0=await LE0($,g),W0.kind==="found")g.succeed("BIDS validation run registered; deferring to ci_check at approval");else if(W0.kind==="timeout"){let J0=F.trustUpstream?"trusting upstream OpenNeuro validation (--trust-upstream)":"no --trust-upstream \u2014 aborting";g.warn(`BIDS validation run did not register within 120s; ${J0}`)}else{let J0=W0.lastError instanceof Error?W0.lastError.message:String(W0.lastError);g.fail(`All BIDS validation polls failed (last error: ${J0})`)}}let F0=Sg({ciDeployed:y,poll:W0,trustUpstream:F.trustUpstream??!1});if(F0.abortReason)console.error(W.red(F0.abortReason)),process.exit(1);let O0=F0.skipCiCheck,e=5,N0=300000,GD=C("Requesting publication...").start(),N=!1;for(let g=1;g<=e;g++)try{await QQ($),N=!0;break}catch(J0){let V0=J0 instanceof Error?J0.message:String(J0);if(!V0.includes("BIDS validation is currently running"))GD.fail(`Failed to request publication: ${V0}`),process.exit(1);if(g===e)GD.fail(`BIDS validation still in progress after ${e} attempts (~${Math.round(e*N0/60000)}min). Re-run 'nemar admin publish request/approve ${$}' once validation completes.`),process.exit(1);GD.text=`Waiting for BIDS validation to complete... (attempt ${g}/${e}, next retry in 5min)`,await new Promise((yD)=>setTimeout(yD,N0))}if(N)GD.succeed("Publication requested");let n=C("Approving publication...").start(),h=10,P0=!1;for(let g=1;g<=h;g++)try{await YQ($,g>1,!1,O0),P0=!0;break}catch(J0){let V0=J0 instanceof Error?J0.message:String(J0);if(g<h)n.text=`Approving publication... (attempt ${g+1}/${h})`,await new Promise((BD)=>setTimeout(BD,3000));else n.fail(`Failed to approve publication after ${h} attempts: ${V0}`),process.exit(1)}if(P0)n.succeed("Publication approved");console.log(W.green(`
130
130
  Import and publish complete: ${D} -> ${$}`)),console.log(W.dim(` GitHub: https://github.com/nemarDatasets/${$}`)),console.log(W.dim(` Working dir: ${Q}`))}var UE0="OpenNeuroDatasets",jg="nemar",Pg="us-east-2";var vg=P(()=>{xD();n3();i8();a6()});var gg={};c4(gg,{runE2ETest:()=>yE0});import{cpSync as jE0,existsSync as YH,mkdirSync as PE0,mkdtempSync as yg,readFileSync as IE0,rmSync as $H,writeFileSync as JH}from"fs";import{tmpdir as xg}from"os";import{join as t8,resolve as QH}from"path";var{spawn:SE0}=globalThis.Bun;function vD(D,...F){if(D.verbose)console.log(" ",...F)}async function fg(D,F){let $=performance.now();try{return await F(),{name:D,passed:!0,duration_ms:Math.round(performance.now()-$)}}catch(J){let Q=J instanceof Error?J.message:String(J);return{name:D,passed:!1,duration_ms:Math.round(performance.now()-$),error:Q}}}async function kE0(D){let F=[];for(let{name:$,fn:J}of D){let Q=await fg($,J);if(F.push(Q),!Q.passed)break}return F}async function IF(D,F={}){let $=SE0({cmd:D,cwd:F.cwd,stdout:"pipe",stderr:"pipe",env:{...process.env,...F.env}}),J=await new Response($.stdout).text(),Q=await new Response($.stderr).text(),Y=await $.exited;return{stdout:J,stderr:Q,exitCode:Y}}function X1(D,F){if(!D.success)throw Error(`${F}: ${D.error}`)}function _g(D){if(!D.creds)throw Error("credentials not yet fetched");return D.creds}function vE0(){let D=[QH(__dirname,"../../test/fixtures/bids-minimal"),QH(__dirname,"../test/fixtures/bids-minimal"),QH(process.cwd(),"test/fixtures/bids-minimal")];for(let F of D)if(YH(F))return F;throw Error("Could not find test/fixtures/bids-minimal. Run from the nemar-cli root directory.")}async function yE0(D){let F=D.verbose??!1,$=performance.now(),J=yg(t8(xg(),"nemar-e2e-upload-")),Q=yg(t8(xg(),"nemar-e2e-clone-")),Y={uploadDir:J,cloneDir:Q,verbose:F},B=[];if(!D.skipReset)B.push({name:"Reset nm099999",fn:async()=>{let G=await rf(b4);if(vD(Y,`S3 objects deleted: ${G.steps.s3_deleted}`),vD(Y,`GitHub recreated: ${G.steps.github_recreated}`),vD(Y,`D1 cleaned: ${G.steps.d1_cleaned}`),!G.success){let H=[];if(!G.steps.github_recreated)H.push("GitHub");if(!G.steps.d1_cleaned)H.push("D1");throw Error(`Reset partially failed: ${H.join(", ")}`)}}});B.push({name:"Prepare upload",fn:async()=>{let G=vE0();jE0(G,J,{recursive:!0});for(let H of[".git",".nemar",".gitattributes"]){let q=t8(J,H);if(YH(q)){let K=await IF(["chmod","-R","u+w",q]);if(K.exitCode!==0)console.warn(`chmod failed for ${q} (exit ${K.exitCode}): ${K.stderr}`);$H(q,{recursive:!0,force:!0})}}vD(Y,`Copied fixtures to ${J}`)}},{name:"Init git + annex",fn:async()=>{X1(await n6(J,{force:!0}),"initDataset"),X1(await g4(J),"configureLargefiles"),vD(Y,"Git + git-annex initialized")}},{name:"Configure remotes",fn:async()=>{Y.creds=await R8(b4),vD(Y,`S3 prefix: ${Y.creds.s3.prefix}`),X1(await O8(J,{name:"nemar-s3",bucket:Y.creds.s3.bucket,prefix:`${b4}/objects`,region:Y.creds.s3.region,publicUrl:`https://${Y.creds.s3.bucket}.s3.${Y.creds.s3.region}.amazonaws.com/${b4}/objects`},CD(Y.creds.credentials)),"configureS3Remote");let G=`git@github.com:nemarDatasets/${b4}.git`;X1(await a8(J,G),"configureGitHubRemote"),vD(Y,"S3 + GitHub remotes configured")}},{name:"Upload to S3",fn:async()=>{X1(await i6(J),"gitAnnexAdd"),X1(await o8(J,"Initial BIDS dataset"),"saveDataset");let G=await w8(J,"nemar-s3",4,CD(_g(Y).credentials));X1(G,"copyToAnnexRemote"),vD(Y,`Files copied to S3: ${G.filesCopied}`),await kD(J)}},{name:"Push to GitHub",fn:async()=>{let G=await o1(J);if(X1(G,"pushToGitHub"),G.warning)vD(Y,`Warning: ${G.warning}`);vD(Y,"Pushed to GitHub (main + git-annex branches)")}},{name:"Clone fresh",fn:async()=>{let G=`git@github.com:nemarDatasets/${b4}.git`;X1(await s1(G,Q),"cloneDataset");let H=await h4(Q,"nemar-s3");if(!H.success)throw Error(`enableS3Remote: ${H.error}`);vD(Y,`Clone at ${Q}, S3 remote enabled: ${H.enabled}`)}},{name:"Download + verify",fn:async()=>{let G=CD(_g(Y).credentials),H={AWS_ACCESS_KEY_ID:G.accessKeyId,AWS_SECRET_ACCESS_KEY:G.secretAccessKey};if(G.sessionToken)H.AWS_SESSION_TOKEN=G.sessionToken;let{stdout:q,stderr:K,exitCode:V}=await IF(["git","annex","get","."],{cwd:Q,env:H});if(V!==0)throw Error(`getDatasetData: ${K.trim()}`);let E=q.match(/^get .+ ok$/gm);vD(Y,`Files downloaded: ${E?E.length:0}`);let Z=t8(Q,"sub-01/eeg/sub-01_task-rest_eeg.edf");if(!YH(Z))throw Error("EDF file not found after download");let{size:L}=Bun.file(Z);if(L<512)throw Error(`EDF file too small: ${L} bytes`);vD(Y,`EDF file verified: ${L} bytes`)}},{name:"Update cycle",fn:async()=>{let G=t8(Q,"sub-02/eeg");PE0(G,{recursive:!0});let H=Buffer.alloc(1024);H.write("0".padEnd(8),0,"ascii"),JH(t8(G,"sub-02_task-rest_eeg.edf"),H),JH(t8(G,"sub-02_task-rest_eeg.json"),JSON.stringify({TaskName:"rest",SamplingFrequency:256}));let q=IE0(t8(Q,"participants.tsv"),"utf-8");JH(t8(Q,"participants.tsv"),`${q.trimEnd()}
131
131
  sub-02 30 F
132
- `);let K=`e2e-update-${Date.now()}`,{exitCode:V}=await IF(["git","checkout","-b",K],{cwd:Q});if(V!==0)throw Error("Failed to create update branch");X1(await i6(Q),"gitAnnexAdd (update)"),X1(await o8(Q,"Add sub-02"),"saveDataset (update)"),Y.creds=await R8(b4);let E=await w8(Q,"nemar-s3",4,CD(Y.creds.credentials));X1(E,"copyToAnnexRemote (update)"),vD(Y,`Update files copied to S3: ${E.filesCopied}`),await kD(Q);let Z=await o1(Q,"origin",K);X1(Z,"pushToGitHub (update branch)");let{exitCode:L,stderr:A}=await IF(["git","push","origin","git-annex"],{cwd:Q});if(L!==0)throw Error(`Failed to push git-annex branch: ${A.trim()}`);vD(Y,`Update pushed to branch: ${K}`)}});let X=await kE0(B);if(!D.skipCleanup&&X.every((G)=>G.passed))X.push(await fg("Cleanup",async()=>{await IF(["chmod","-R","u+w",J]),await IF(["chmod","-R","u+w",Q]),$H(J,{recursive:!0,force:!0}),$H(Q,{recursive:!0,force:!0}),vD(Y,"Temp directories cleaned up")}));return xE0(X,$,J,Q,D.skipCleanup)}function xE0(D,F,$,J,Q){let Y={passed:D.every((B)=>B.passed),steps:D,total_duration_ms:Math.round(performance.now()-F)};if(Q)Y.upload_dir=$,Y.clone_dir=J;return Y}var __dirname="/home/runner/work/nemar-cli/nemar-cli/src/lib",b4="nm099999";var hg=P(()=>{i8();a6()});var vh,ck0;var yh=P(()=>{vh=["IsCitedBy","Cites","IsSupplementTo","IsSupplementedBy","IsContinuedBy","Continues","IsDescribedBy","Describes","HasMetadata","IsMetadataFor","HasVersion","IsVersionOf","IsNewVersionOf","IsPreviousVersionOf","IsPartOf","HasPart","IsReferencedBy","References","IsDocumentedBy","Documents","IsCompiledBy","Compiles","IsVariantFormOf","IsOriginalFormOf","IsIdenticalTo","IsCollectedBy","Collects","IsRequiredBy","Requires","IsObsoletedBy","Obsoletes","IsDerivedFrom","IsSourceOf","IsReviewedBy","Reviews","IsPublishedIn","HasTranslation","IsTranslationOf"],ck0=new Set(vh)});function SH(D){return D.replace(/^(doi:|https?:\/\/(dx\.)?doi\.org\/)/i,"").trim()}function xh(D){let F=D.split(",").map(($)=>$.trim());if(F.length>=2)return{name:D,familyName:F[0],givenName:F.slice(1).join(", ")};return{name:D}}var _h=P(()=>{yh()});var dh={};c4(dh,{queryDataCiteDoi:()=>mh,queryCrossrefDoi:()=>lh,mergeOrcidDiscoveries:()=>xV0,matchCreatorsToAuthors:()=>ph,extractDoisFromRelatedIdentifiers:()=>kV0,extractDoisFromBids:()=>bh,discoverOrcidsFromReferencedDois:()=>_V0});function bh(D){let F=[],$=new Set,J=(Q,Y)=>{let B=SH(Q).trim();if(hh.test(B)&&!$.has(B))$.add(B),F.push({doi:B,source:Y})};if(Array.isArray(D.SourceDatasets))for(let Q of D.SourceDatasets){if(!Q||typeof Q!=="object")continue;let Y=Q;if(typeof Y.DOI==="string")J(Y.DOI,"SourceDatasets");else if(typeof Y.URL==="string"){let B=Y.URL.match(/(?:doi\.org\/|doi:)(10\.\d{4,}\/.+)/);if(B)J(B[1],"SourceDatasets")}}if(Array.isArray(D.ReferencesAndLinks))for(let Q of D.ReferencesAndLinks){if(typeof Q!=="string"||!Q)continue;let Y=Q.match(/(?:doi\.org\/|^)(10\.\d{4,}\/[^\s]+)/);if(Y)J(Y[1],"ReferencesAndLinks")}if(typeof D.HowToAcknowledge==="string"){let Y=D.HowToAcknowledge.matchAll(/(?:doi\.org\/|(?<=\s|^))(10\.\d{4,}\/[^\s,)]+)/g);for(let B of Y)J(B[1].replace(/[.;:]+$/,""),"HowToAcknowledge")}return F}function kV0(D,F){let $=[];for(let J of D){if(!J||typeof J.identifier!=="string")continue;if(J.identifier_type!=="DOI")continue;let Q=SH(J.identifier).trim();if(hh.test(Q)&&!F.has(Q))F.add(Q),$.push({doi:Q,source:"RelatedIdentifiers"})}return $}function uh(D,F,$){let J=$ instanceof Error?$.message:String($);if(J.includes("AbortError")||J.includes("timeout")||J.includes("fetch"))console.warn(`[orcid-discovery] ${D} query failed for ${F}: ${J}`);else console.error(`[orcid-discovery] Unexpected error querying ${D} for ${F}:`,$)}async function mh(D){try{let F=await fetch(`${vV0}/${encodeURIComponent(D)}`,{headers:{Accept:"application/vnd.datacite.datacite+json"},signal:AbortSignal.timeout(1e4)});if(!F.ok){if(F.status!==404)console.warn(`[orcid-discovery] DataCite returned HTTP ${F.status} for ${D}`);return null}let $=await F.json();return{doi:D,creators:Array.isArray($.creators)?$.creators:[]}}catch(F){return uh("DataCite",D,F),null}}async function lh(D){try{let F=await fetch(`https://api.crossref.org/works/${encodeURIComponent(D)}`,{headers:{Accept:"application/json","User-Agent":"NEMAR/1.0 (https://nemar.org; mailto:nemar@ucsd.edu)"},signal:AbortSignal.timeout(1e4)});if(!F.ok){if(F.status!==404)console.warn(`[orcid-discovery] Crossref returned HTTP ${F.status} for ${D}`);return null}let J=(await F.json()).message?.author;if(!Array.isArray(J)||J.length===0)return null;let Q=J.map((Y)=>{let B=[];if(Y.ORCID)B.push({nameIdentifier:Y.ORCID,nameIdentifierScheme:"ORCID"});return{name:Y.family&&Y.given?`${Y.family}, ${Y.given}`:Y.name||Y.family||"",givenName:Y.given,familyName:Y.family,nameIdentifiers:B,affiliation:(Y.affiliation||[]).filter((X)=>X.name)}}).filter((Y)=>Y.name.trim()!=="");return{doi:D,creators:Q}}catch(F){return uh("Crossref",D,F),null}}async function yV0(D){let F=await mh(D),$=await lh(D);if(!F)return $;if(!$)return F;for(let J of F.creators){if(J.nameIdentifiers?.some((X)=>X.nameIdentifierScheme==="ORCID")||!J.familyName)continue;let B=$.creators.find((X)=>X.familyName&&T1(X.familyName)===T1(J.familyName))?.nameIdentifiers?.find((X)=>X.nameIdentifierScheme==="ORCID");if(B)J.nameIdentifiers=[...J.nameIdentifiers??[],B]}return F}function T1(D){return D.normalize("NFD").replace(/\p{Diacritic}/gu,"").replace(/\./g,"").toLowerCase().trim()}function fh(D){if(!D)return"";return T1(D).charAt(0)}function ph(D,F){let $=[],J=new Set,Q=new Set,Y=F.map((B)=>({original:B,parsed:xh(B)}));for(let B=0;B<D.length;B++){if(Q.has(B))continue;let X=D[B],G=T1(X.name);for(let H of Y){if(J.has(H.original))continue;if(T1(H.original)===G){$.push({bidsAuthor:H.original,matchedCreator:X,confidence:"exact"}),J.add(H.original),Q.add(B);break}if(H.parsed.familyName&&H.parsed.givenName){if(T1(`${H.parsed.givenName} ${H.parsed.familyName}`)===G){$.push({bidsAuthor:H.original,matchedCreator:X,confidence:"exact"}),J.add(H.original),Q.add(B);break}}if(X.givenName&&X.familyName){let q=T1(`${X.givenName} ${X.familyName}`);if(T1(H.original)===q){$.push({bidsAuthor:H.original,matchedCreator:X,confidence:"exact"}),J.add(H.original),Q.add(B);break}}}}for(let B=0;B<D.length;B++){if(Q.has(B))continue;let X=D[B];if(!X.familyName)continue;let G=T1(X.familyName),H=fh(X.givenName);for(let q of Y){if(J.has(q.original))continue;if(!q.parsed.familyName)continue;if(T1(q.parsed.familyName)!==G)continue;let V=fh(q.parsed.givenName);if(V&&H&&V===H){$.push({bidsAuthor:q.original,matchedCreator:X,confidence:"high"}),J.add(q.original),Q.add(B);break}}}for(let B=0;B<D.length;B++){if(Q.has(B))continue;let X=D[B];if(!X.familyName)continue;let G=T1(X.familyName);for(let H of Y){if(J.has(H.original))continue;if(!H.parsed.familyName)continue;if(T1(H.parsed.familyName)===G){$.push({bidsAuthor:H.original,matchedCreator:X,confidence:"medium"}),J.add(H.original),Q.add(B);break}}}return $}function xV0(D,F){let $={...D};for(let[J,Q]of Object.entries(F))$[J]={...$[J],orcid:Q.orcid,affiliations:Q.affiliations??$[J]?.affiliations};return $}async function _V0(D,F,$){let J=bh(D);if($?.length)J.push(...$);if(J.length===0)return{discoveries:{},unresolvedDois:[],totalDoisQueried:0};let Q=Array.isArray(D.Authors)?D.Authors.filter((q)=>typeof q==="string"):[];if(Q.length===0)return{discoveries:{},unresolvedDois:[],totalDoisQueried:J.length};let Y=new Set;if(F){for(let[q,K]of Object.entries(F))if(K.orcid)Y.add(q)}let B=Q.filter((q)=>!Y.has(q));if(B.length===0)return{discoveries:{},unresolvedDois:[],totalDoisQueried:J.length};let X=[],G=new Map;for(let q=0;q<J.length;q+=gh){let K=J.slice(q,q+gh),V=await Promise.all(K.map((E)=>yV0(E.doi)));for(let E=0;E<K.length;E++)if(V[E])G.set(K[E].doi,V[E]?.creators??[]);else X.push(K[E].doi)}let H={};for(let[q,K]of G){let V=K.filter((Z)=>Z.nameIdentifiers?.some((L)=>L.nameIdentifierScheme==="ORCID"));if(V.length===0)continue;let E=ph(V,B);for(let Z of E){if(H[Z.bidsAuthor])continue;let L=Z.matchedCreator.nameIdentifiers.find((O)=>O.nameIdentifierScheme==="ORCID");if(!L)continue;let A=L.nameIdentifier.replace(/^https?:\/\/orcid\.org\//i,"").trim();if(!SV0.test(A))continue;let M=Z.matchedCreator.affiliation?.filter((O)=>O.name).map((O)=>({name:O.name,...O.affiliationIdentifier&&{identifier:O.affiliationIdentifier},...O.affiliationIdentifierScheme&&{scheme:O.affiliationIdentifierScheme}}));H[Z.bidsAuthor]={orcid:A,affiliations:M?.length?M:void 0,sourceDoi:q,confidence:Z.confidence}}}return{discoveries:H,unresolvedDois:X,totalDoisQueried:J.length}}var hh,SV0,vV0="https://api.datacite.org/application/vnd.datacite.datacite+json",gh=5;var ch=P(()=>{_h();hh=/^10\.\d{4,}\/[^\s]+$/,SV0=/^\d{4}-\d{4}-\d{4}-[\dX]{4}$/});xD();var Bq=s(Yq(),1),{program:yZ0,createCommand:xZ0,createArgument:_Z0,createOption:fZ0,CommanderError:gZ0,InvalidArgumentError:hZ0,InvalidOptionArgumentError:bZ0,Command:i0,Argument:uZ0,Option:mZ0,Help:lZ0}=Bq.default;var Gq=process.argv.includes("--help-all");if(process.argv.includes("--no-color"))W.level=0;var Xq=process.argv.indexOf("--help-all");if(Xq!==-1)process.argv[Xq]="--help";var gF=i0.prototype.addHelpText,Wq=`
132
+ `);let K=`e2e-update-${Date.now()}`,{exitCode:V}=await IF(["git","checkout","-b",K],{cwd:Q});if(V!==0)throw Error("Failed to create update branch");X1(await i6(Q),"gitAnnexAdd (update)"),X1(await o8(Q,"Add sub-02"),"saveDataset (update)"),Y.creds=await R8(b4);let E=await w8(Q,"nemar-s3",4,CD(Y.creds.credentials));X1(E,"copyToAnnexRemote (update)"),vD(Y,`Update files copied to S3: ${E.filesCopied}`),await kD(Q);let Z=await o1(Q,"origin",K);X1(Z,"pushToGitHub (update branch)");let{exitCode:L,stderr:A}=await IF(["git","push","origin","git-annex"],{cwd:Q});if(L!==0)throw Error(`Failed to push git-annex branch: ${A.trim()}`);vD(Y,`Update pushed to branch: ${K}`)}});let X=await kE0(B);if(!D.skipCleanup&&X.every((G)=>G.passed))X.push(await fg("Cleanup",async()=>{await IF(["chmod","-R","u+w",J]),await IF(["chmod","-R","u+w",Q]),$H(J,{recursive:!0,force:!0}),$H(Q,{recursive:!0,force:!0}),vD(Y,"Temp directories cleaned up")}));return xE0(X,$,J,Q,D.skipCleanup)}function xE0(D,F,$,J,Q){let Y={passed:D.every((B)=>B.passed),steps:D,total_duration_ms:Math.round(performance.now()-F)};if(Q)Y.upload_dir=$,Y.clone_dir=J;return Y}var __dirname="/home/runner/work/nemar-cli/nemar-cli/src/lib",b4="nm099999";var hg=P(()=>{i8();a6()});var vh,ck0;var yh=P(()=>{vh=["IsCitedBy","Cites","IsSupplementTo","IsSupplementedBy","IsContinuedBy","Continues","IsDescribedBy","Describes","HasMetadata","IsMetadataFor","HasVersion","IsVersionOf","IsNewVersionOf","IsPreviousVersionOf","IsPartOf","HasPart","IsReferencedBy","References","IsDocumentedBy","Documents","IsCompiledBy","Compiles","IsVariantFormOf","IsOriginalFormOf","IsIdenticalTo","IsCollectedBy","Collects","IsRequiredBy","Requires","IsObsoletedBy","Obsoletes","IsDerivedFrom","IsSourceOf","IsReviewedBy","Reviews","IsPublishedIn","HasTranslation","IsTranslationOf"],ck0=new Set(vh)});function SH(D){return D.replace(/^(doi:|https?:\/\/(dx\.)?doi\.org\/)/i,"").trim()}function xh(D){let F=D.split(",").map(($)=>$.trim());if(F.length>=2)return{name:D,familyName:F[0],givenName:F.slice(1).join(", ")};return{name:D}}var _h=P(()=>{yh()});var dh={};c4(dh,{queryDataCiteDoi:()=>mh,queryCrossrefDoi:()=>lh,mergeOrcidDiscoveries:()=>xV0,matchCreatorsToAuthors:()=>ph,extractDoisFromRelatedIdentifiers:()=>kV0,extractDoisFromBids:()=>bh,discoverOrcidsFromReferencedDois:()=>_V0});function bh(D){let F=[],$=new Set,J=(Q,Y)=>{let B=SH(Q).trim();if(hh.test(B)&&!$.has(B))$.add(B),F.push({doi:B,source:Y})};if(Array.isArray(D.SourceDatasets))for(let Q of D.SourceDatasets){if(!Q||typeof Q!=="object")continue;let Y=Q;if(typeof Y.DOI==="string")J(Y.DOI,"SourceDatasets");else if(typeof Y.URL==="string"){let B=Y.URL.match(/(?:doi\.org\/|doi:)(10\.\d{4,}\/.+)/);if(B)J(B[1],"SourceDatasets")}}if(Array.isArray(D.ReferencesAndLinks))for(let Q of D.ReferencesAndLinks){if(typeof Q!=="string"||!Q)continue;let Y=Q.match(/(?:doi\.org\/|^)(10\.\d{4,}\/[^\s]+)/);if(Y)J(Y[1],"ReferencesAndLinks")}if(typeof D.HowToAcknowledge==="string"){let Y=D.HowToAcknowledge.matchAll(/(?:doi\.org\/|(?<=\s|^))(10\.\d{4,}\/[^\s,)]+)/g);for(let B of Y)J(B[1].replace(/[.;:]+$/,""),"HowToAcknowledge")}return F}function kV0(D,F){let $=[];for(let J of D){if(!J||typeof J.identifier!=="string")continue;if(J.identifier_type!=="DOI")continue;let Q=SH(J.identifier).trim();if(hh.test(Q)&&!F.has(Q))F.add(Q),$.push({doi:Q,source:"RelatedIdentifiers"})}return $}function uh(D,F,$){let J=$ instanceof Error?$.message:String($);if(J.includes("AbortError")||J.includes("timeout")||J.includes("fetch"))console.warn(`[orcid-discovery] ${D} query failed for ${F}: ${J}`);else console.error(`[orcid-discovery] Unexpected error querying ${D} for ${F}:`,$)}async function mh(D){try{let F=await fetch(`${vV0}/${encodeURIComponent(D)}`,{headers:{Accept:"application/vnd.datacite.datacite+json"},signal:AbortSignal.timeout(1e4)});if(!F.ok){if(F.status!==404)console.warn(`[orcid-discovery] DataCite returned HTTP ${F.status} for ${D}`);return null}let $=await F.json();return{doi:D,creators:Array.isArray($.creators)?$.creators:[]}}catch(F){return uh("DataCite",D,F),null}}async function lh(D){try{let F=await fetch(`https://api.crossref.org/works/${encodeURIComponent(D)}`,{headers:{Accept:"application/json","User-Agent":"NEMAR/1.0 (https://nemar.org; mailto:nemar@ucsd.edu)"},signal:AbortSignal.timeout(1e4)});if(!F.ok){if(F.status!==404)console.warn(`[orcid-discovery] Crossref returned HTTP ${F.status} for ${D}`);return null}let J=(await F.json()).message?.author;if(!Array.isArray(J)||J.length===0)return null;let Q=J.map((Y)=>{let B=[];if(Y.ORCID)B.push({nameIdentifier:Y.ORCID,nameIdentifierScheme:"ORCID"});return{name:Y.family&&Y.given?`${Y.family}, ${Y.given}`:Y.name||Y.family||"",givenName:Y.given,familyName:Y.family,nameIdentifiers:B,affiliation:(Y.affiliation||[]).filter((X)=>X.name)}}).filter((Y)=>Y.name.trim()!=="");return{doi:D,creators:Q}}catch(F){return uh("Crossref",D,F),null}}async function yV0(D){let F=await mh(D),$=await lh(D);if(!F)return $;if(!$)return F;for(let J of F.creators){if(J.nameIdentifiers?.some((X)=>X.nameIdentifierScheme==="ORCID")||!J.familyName)continue;let B=$.creators.find((X)=>X.familyName&&T1(X.familyName)===T1(J.familyName))?.nameIdentifiers?.find((X)=>X.nameIdentifierScheme==="ORCID");if(B)J.nameIdentifiers=[...J.nameIdentifiers??[],B]}return F}function T1(D){return D.normalize("NFD").replace(/\p{Diacritic}/gu,"").replace(/\./g,"").toLowerCase().trim()}function fh(D){if(!D)return"";return T1(D).charAt(0)}function ph(D,F){let $=[],J=new Set,Q=new Set,Y=F.map((B)=>({original:B,parsed:xh(B)}));for(let B=0;B<D.length;B++){if(Q.has(B))continue;let X=D[B],G=T1(X.name);for(let H of Y){if(J.has(H.original))continue;if(T1(H.original)===G){$.push({bidsAuthor:H.original,matchedCreator:X,confidence:"exact"}),J.add(H.original),Q.add(B);break}if(H.parsed.familyName&&H.parsed.givenName){if(T1(`${H.parsed.givenName} ${H.parsed.familyName}`)===G){$.push({bidsAuthor:H.original,matchedCreator:X,confidence:"exact"}),J.add(H.original),Q.add(B);break}}if(X.givenName&&X.familyName){let q=T1(`${X.givenName} ${X.familyName}`);if(T1(H.original)===q){$.push({bidsAuthor:H.original,matchedCreator:X,confidence:"exact"}),J.add(H.original),Q.add(B);break}}}}for(let B=0;B<D.length;B++){if(Q.has(B))continue;let X=D[B];if(!X.familyName)continue;let G=T1(X.familyName),H=fh(X.givenName);for(let q of Y){if(J.has(q.original))continue;if(!q.parsed.familyName)continue;if(T1(q.parsed.familyName)!==G)continue;let V=fh(q.parsed.givenName);if(V&&H&&V===H){$.push({bidsAuthor:q.original,matchedCreator:X,confidence:"high"}),J.add(q.original),Q.add(B);break}}}for(let B=0;B<D.length;B++){if(Q.has(B))continue;let X=D[B];if(!X.familyName)continue;let G=T1(X.familyName);for(let H of Y){if(J.has(H.original))continue;if(!H.parsed.familyName)continue;if(T1(H.parsed.familyName)===G){$.push({bidsAuthor:H.original,matchedCreator:X,confidence:"medium"}),J.add(H.original),Q.add(B);break}}}return $}function xV0(D,F){let $={...D};for(let[J,Q]of Object.entries(F))$[J]={...$[J],orcid:Q.orcid,affiliations:Q.affiliations??$[J]?.affiliations};return $}async function _V0(D,F,$){let J=bh(D);if($?.length)J.push(...$);if(J.length===0)return{discoveries:{},unresolvedDois:[],totalDoisQueried:0};let Q=Array.isArray(D.Authors)?D.Authors.filter((q)=>typeof q==="string"):[];if(Q.length===0)return{discoveries:{},unresolvedDois:[],totalDoisQueried:J.length};let Y=new Set;if(F){for(let[q,K]of Object.entries(F))if(K.orcid)Y.add(q)}let B=Q.filter((q)=>!Y.has(q));if(B.length===0)return{discoveries:{},unresolvedDois:[],totalDoisQueried:J.length};let X=[],G=new Map;for(let q=0;q<J.length;q+=gh){let K=J.slice(q,q+gh),V=await Promise.all(K.map((E)=>yV0(E.doi)));for(let E=0;E<K.length;E++)if(V[E])G.set(K[E].doi,V[E]?.creators??[]);else X.push(K[E].doi)}let H={};for(let[q,K]of G){let V=K.filter((Z)=>Z.nameIdentifiers?.some((L)=>L.nameIdentifierScheme==="ORCID"));if(V.length===0)continue;let E=ph(V,B);for(let Z of E){if(H[Z.bidsAuthor])continue;let L=Z.matchedCreator.nameIdentifiers.find((R)=>R.nameIdentifierScheme==="ORCID");if(!L)continue;let A=L.nameIdentifier.replace(/^https?:\/\/orcid\.org\//i,"").trim();if(!SV0.test(A))continue;let M=Z.matchedCreator.affiliation?.filter((R)=>R.name).map((R)=>({name:R.name,...R.affiliationIdentifier&&{identifier:R.affiliationIdentifier},...R.affiliationIdentifierScheme&&{scheme:R.affiliationIdentifierScheme}}));H[Z.bidsAuthor]={orcid:A,affiliations:M?.length?M:void 0,sourceDoi:q,confidence:Z.confidence}}}return{discoveries:H,unresolvedDois:X,totalDoisQueried:J.length}}var hh,SV0,vV0="https://api.datacite.org/application/vnd.datacite.datacite+json",gh=5;var ch=P(()=>{_h();hh=/^10\.\d{4,}\/[^\s]+$/,SV0=/^\d{4}-\d{4}-\d{4}-[\dX]{4}$/});xD();var Bq=s(Yq(),1),{program:yZ0,createCommand:xZ0,createArgument:_Z0,createOption:fZ0,CommanderError:gZ0,InvalidArgumentError:hZ0,InvalidOptionArgumentError:bZ0,Command:i0,Argument:uZ0,Option:mZ0,Help:lZ0}=Bq.default;var Gq=process.argv.includes("--help-all");if(process.argv.includes("--no-color"))W.level=0;var Xq=process.argv.indexOf("--help-all");if(Xq!==-1)process.argv[Xq]="--help";var gF=i0.prototype.addHelpText,Wq=`
133
133
  Run with --help-all for examples and detailed descriptions.
134
- `,o9=new WeakSet;i0.prototype.addHelpText=function(D,F){if(D==="after"||D==="afterAll"){if(Gq)return gF.call(this,D,F);if(!o9.has(this))return o9.add(this),gF.call(this,D,Wq);return this}return gF.call(this,D,F)};var Ru={formatHelp(D,F){let $=F.padWidth(D,F),J=F.helpWidth??80,Q=2,Y=2;function B(Z,L,A){if(A){let M=" ".repeat(Math.max(0,$+2-Z.length)),O=`${L}${M}${A}`;return F.wrap(O,J-2,$+2)}return L}function X(Z){return Z.join(`
134
+ `,o9=new WeakSet;i0.prototype.addHelpText=function(D,F){if(D==="after"||D==="afterAll"){if(Gq)return gF.call(this,D,F);if(!o9.has(this))return o9.add(this),gF.call(this,D,Wq);return this}return gF.call(this,D,F)};var Ru={formatHelp(D,F){let $=F.padWidth(D,F),J=F.helpWidth??80,Q=2,Y=2;function B(Z,L,A){if(A){let M=" ".repeat(Math.max(0,$+2-Z.length)),R=`${L}${M}${A}`;return F.wrap(R,J-2,$+2)}return L}function X(Z){return Z.join(`
135
135
  `).replace(/^/gm," ".repeat(2))}let G=[];G.push(`Usage: ${F.commandUsage(D)}`,"");let H=F.commandDescription(D);if(H.length>0)G.push(F.wrap(H,J,0),"");let q=F.visibleArguments(D).map((Z)=>{let L=F.argumentTerm(Z);return B(L,W.blue(L),F.argumentDescription(Z))});if(q.length>0)G.push(W.bold("Arguments:"),X(q),"");let K=F.visibleOptions(D).map((Z)=>{let L=F.optionTerm(Z);return B(L,W.cyan(L),F.optionDescription(Z))});if(K.length>0)G.push(W.bold("Options:"),X(K),"");let E=F.visibleCommands(D).sort((Z,L)=>Z.name().localeCompare(L.name())).map((Z)=>{let L=F.subcommandTerm(Z);return B(L,W.bold.cyan(L),F.subcommandDescription(Z))});if(E.length>0)G.push(W.bold("Commands:"),X(E),"");return G.join(`
136
136
  `)}};function Hq(D){qq(D)}function qq(D){D.configureHelp(Ru);for(let F of D.commands)qq(F)}function r6(D,F){if(Gq)gF.call(D,"after",F);else if(!o9.has(D))o9.add(D),gF.call(D,"after",Wq)}xD();xD();import{existsSync as mg,readFileSync as _E0}from"fs";import{join as fE0}from"path";k6();n3();i8();x4();k6();async function k0(D,F,$=!1){if(F.no)return"declined";if(F.yes)return"confirmed";try{let{confirmed:J}=await D0.prompt([{type:"confirm",name:"confirmed",message:D,default:$}]);return J?"confirmed":"cancelled"}catch(J){let Q=J instanceof Error?J.message:String(J);if(Q.includes("closed")||Q.includes("TTY")||Q.includes("SIGINT")||Q.includes("readline"))console.error("Interactive prompt unavailable (non-interactive terminal or interrupted)"),console.error(" Use --yes or --no flags for non-interactive mode");else console.error("Prompt error:",Q);return"cancelled"}}async function qg(D,F,$){if($.no)return"declined";if($.yes)return"confirmed";try{let{input:J}=await D0.prompt([{type:"input",name:"input",message:D,validate:(Q)=>{if(Q!==F)return`Input does not match. Expected: ${F}`;return!0}}]);return J===F?"confirmed":"cancelled"}catch(J){let Q=J instanceof Error?J.message:String(J);if(Q.includes("closed")||Q.includes("TTY")||Q.includes("SIGINT")||Q.includes("readline"))console.error("Interactive prompt unavailable (non-interactive terminal or interrupted)"),console.error(" Use --yes or --no flags for non-interactive mode");else console.error("Prompt error:",Q);return"cancelled"}}var T0="-y, --yes",b0="-n, --no",j0="Skip confirmation and proceed",y0="Skip confirmation and decline";a6();function QD(D,F,$,J){if(D instanceof p){F.fail(D.message);let Q=J?.[D.statusCode];if(Q)console.log(W.dim(` ${Q}`));else if(D.statusCode===403)console.log(W.dim(" This command requires admin privileges"))}else F.fail($),console.log(W.dim(` Error details: ${w0(D)}`))}async function bg(D,F){let{spawn:$}=awaitPromise.resolve(globalThis.Bun),J=F==="README"?`repos/${D}/readme`:`repos/${D}/contents/${F}`,Q=$({cmd:["gh","api",J,"--jq",".content"],stdout:"pipe",stderr:"pipe"}),Y=await new Response(Q.stdout).text(),B=await new Response(Q.stderr).text();if(await Q.exited!==0){if(B.trim()&&!B.includes("404"))console.warn(`[fetchGitHubFileContent] Error fetching ${F}: ${B.trim()}`);return null}if(!Y.trim())return null;return Buffer.from(Y.trim(),"base64").toString("utf-8")}var r0=new i0("admin").description("Admin commands (requires admin privileges)").addHelpText("after",`
137
137
  Description:
@@ -208,7 +208,7 @@ Deploy CI workflows to: ${D}
208
208
  `)),console.log("This will add the following workflows:"),console.log(" 1. BIDS Validation (runs on PRs)"),console.log(" 2. Version Check (ensures version bump on PRs)"),console.log(" 3. PR Merge Handler (creates releases, publishes DOIs)"),console.log();let $=await k0(`Deploy CI workflows to ${D}?`,F);if($!=="confirmed"){console.log(W.dim($==="declined"?"Skipped":"Cancelled"));return}let J=C(`Deploying CI workflows to ${D}...`).start();try{let Q=await f4(D);J.succeed("CI workflows deployed"),console.log();for(let Y of Q.workflows_deployed)console.log(` ${W.green("[x]")} ${Y}`);console.log()}catch(Q){QD(Q,J,"Failed to deploy CI workflows",{404:"Dataset not found"})}});HQ.command("sync").description("Sync deployed CI workflows to current templates (only writes drifted/missing files)").argument("[dataset-id]","Dataset ID (e.g., nm000104)").option("--all","Sync across all dataset repositories").option(T0,j0).option(b0,y0).action(async(D,F)=>{if(!f0())return;if(F.all){let J=C("Fetching dataset list...").start(),Q;try{if(Q=(await I9({limit:1000})).datasets,J.succeed(`Found ${Q.length} datasets`),Q.length>=1000)console.log(W.yellow("Warning: reached 1000 dataset limit; some datasets may be skipped"))}catch(H){QD(H,J,"Failed to fetch datasets");return}console.log(W.cyan(`
209
209
  Sync CI templates across ${Q.length} datasets (writes only diffs)
210
210
  `));let Y=await k0(`Sync templates on all ${Q.length} datasets?`,F);if(Y!=="confirmed"){console.log(W.dim(Y==="declined"?"Skipped":"Cancelled"));return}let B=0,X=0,G=0;for(let H of Q){let q=C(`Syncing ${H.dataset_id}...`).start();try{let K=await wW(H.dataset_id),V=K.changed.length+K.added.length;if(K.errors.length>0)q.warn(`${H.dataset_id}: ${V} updated, ${K.errors.length} error(s)`),G++;else if(V===0)q.succeed(`${H.dataset_id}: up to date`),B++;else{let E=[];if(K.added.length>0)E.push(`+${K.added.length} added`);if(K.changed.length>0)E.push(`~${K.changed.length} updated`);q.succeed(`${H.dataset_id}: ${E.join(", ")}`),X++}}catch(K){let V=K instanceof p?K.message:String(K);q.fail(`${H.dataset_id}: ${V}`),G++}}console.log(),console.log(W.cyan(`Done: ${B} up-to-date, ${X} updated, ${G} with errors`));return}if(!D){console.error(W.red("Error: dataset-id is required (or use --all)"));return}let $=C(`Syncing CI templates for ${D}...`).start();try{let J=await wW(D),Q=J.changed.length+J.added.length;if(J.errors.length>0)$.warn(`${D}: ${J.errors.length} error(s)`);else if(Q===0)$.succeed(`${D}: already up to date`);else $.succeed(`${D}: synced`);if(console.log(),console.log(` ${W.dim("Checked:")} ${J.checked.join(", ")}`),J.added.length>0)console.log(` ${W.green("Added:")} ${J.added.join(", ")}`);if(J.changed.length>0)console.log(` ${W.yellow("Updated:")} ${J.changed.join(", ")}`);if(!J.committed&&Q>0&&J.errors.length===0)console.log(` ${W.yellow("Note:")} listed changes were not committed`);if(J.list_failed)console.log(` ${W.red("Warning:")} workflow directory listing failed; presence is unknown`);if(J.errors.length>0){console.log(` ${W.red("Errors:")}`);for(let Y of J.errors)console.log(` - ${Y}`)}console.log()}catch(J){QD(J,$,"Failed to sync CI templates",{404:"Dataset not found"})}});r0.addCommand(HQ);var h9=new i0("doi").description("DOI management");h9.command("create").description("Create concept DOI for a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("--title <title>","DOI title (defaults to dataset name)").option("--description <desc>","DOI description").option("--provider <provider>","DOI provider: ezid (default) or zenodo","ezid").option("--sandbox","Use sandbox/test DOI").option(T0,j0).option(b0,y0).action(async(D,F)=>{if(!f0())return;let $=C("Fetching dataset info...").start(),J;try{J=await uD(D),$.succeed(`Found dataset: ${J.name}`)}catch(G){if(G instanceof p){if($.fail(G.message),G.statusCode===404)console.log(W.dim(" Dataset not found"))}else $.fail("Failed to fetch dataset");return}try{let G=await S9(D);if(G.concept_doi){if(console.log(W.yellow(`
211
- Dataset already has a concept DOI:`)),console.log(` Concept DOI: ${W.cyan(G.concept_doi)}`),G.zenodo_concept_url)console.log(` Zenodo URL: ${G.zenodo_concept_url}`);return}}catch(G){if(process.env.DEBUG)console.error("[debug] DOI info fetch:",G)}if(console.log(),console.log(W.cyan("Dataset Information:")),console.log(` ID: ${J.dataset_id}`),console.log(` Name: ${J.name}`),J.github_repo)console.log(` GitHub: ${J.github_repo}`);if(F.sandbox)console.log(` Mode: ${W.yellow("SANDBOX (test DOI)")}`);console.log();let Q=F.provider==="zenodo"?"zenodo":"ezid";if(F.sandbox){if(console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow.bold(" SANDBOX MODE ENABLED")),console.log(W.yellow("\u2501".repeat(60))),Q==="zenodo")console.log(W.yellow(" \u2022 Using Zenodo sandbox (sandbox.zenodo.org)"));else console.log(W.yellow(" \u2022 Using EZID test shoulder (doi:10.5072/FK2)")),console.log(W.yellow(" \u2022 Test DOIs auto-delete after 2 weeks"));console.log(W.yellow(" \u2022 DOI will NOT be indexed by DataCite")),console.log(W.yellow(" \u2022 DOI will NOT resolve in production")),console.log(W.yellow(" \u2022 Use this for testing workflows only")),console.log(W.yellow("\u2501".repeat(60))),console.log()}console.log(W.red("WARNING: DOIs are PERMANENT and cannot be deleted!")),console.log(W.dim("The DOI will be pre-reserved but not published until the first version release.")),console.log(` Provider: ${W.cyan(Q.toUpperCase())}`),console.log();let Y=F.sandbox?`Create TEST concept DOI via ${Q.toUpperCase()} SANDBOX?`:`Create PERMANENT concept DOI via ${Q.toUpperCase()} PRODUCTION?`,B=await k0(Y,F);if(B!=="confirmed"){console.log(W.dim(B==="declined"?"Skipped":"Cancelled"));return}let X=C(`Creating concept DOI via ${Q.toUpperCase()}...`).start();try{let G=await gf(D,{title:F.title,description:F.description,sandbox:F.sandbox,provider:Q});X.succeed("Concept DOI created successfully");let H=C("Applying branch protection...").start();try{let q=await $Q(D);if(q.warnings&&q.warnings.length>0){H.warn("Branch protection applied with warnings");for(let K of q.warnings)console.log(W.yellow(` Warning: ${K}`))}else H.succeed("Branch protection applied")}catch(q){if(H.warn("Could not apply branch protection"),q instanceof p){if(console.log(W.dim(` ${q.message}`)),q.statusCode===403)console.log(W.dim(" Check admin credentials and permissions"))}else console.log(W.dim(` ${q instanceof Error?q.message:"Unknown error"}`));console.log(W.dim(" Manual setup: Go to GitHub repo Settings > Branches > Add rule"))}if(console.log(),console.log(W.green("DOI Information:")),console.log(` Concept DOI: ${W.cyan(G.concept_doi)}`),console.log(` Provider: ${G.provider.toUpperCase()}`),G.provider==="ezid")console.log(` DOI URL: ${G.doi_url}`),console.log(` EZID ID: ${G.ezid_identifier}`);else console.log(` Zenodo URL: ${G.zenodo_url}`);if(G.metadata_warning)console.log(W.yellow(` Warning: ${G.metadata_warning}`));if(console.log(),console.log(W.yellow("Next steps:")),console.log(" 1. Update dataset_description.json with DatasetDOI field"),console.log(" 2. Create a PR and merge it to trigger version DOI publication"),console.log(),F.sandbox)console.log(W.dim("Note: This is a sandbox DOI and will not resolve in production."))}catch(G){if(G instanceof p){if(X.fail(G.message),G.statusCode===403)console.log(W.dim(" This command requires admin privileges"))}else X.fail("Failed to create concept DOI"),console.log(W.dim(` ${w0(G)}`))}});h9.command("info").description("Get DOI info for a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").action(async(D)=>{if(!f0())return;let F=C("Fetching DOI info...").start();try{let $=await S9(D);if(F.stop(),console.log(),console.log(W.cyan(`DOI Information for ${D}:`)),console.log(` Dataset Name: ${$.name}`),console.log(),$.concept_doi){if(console.log(W.green("Concept DOI:")),console.log(` DOI: ${$.concept_doi}`),console.log(` URL: https://doi.org/${$.concept_doi}`),console.log(` Provider: ${($.doi_provider||"zenodo").toUpperCase()}`),$.doi_provider==="ezid"){if($.ezid_identifier)console.log(` EZID ID: ${$.ezid_identifier}`);if($.ezid_status){let J=$.ezid_status==="public"?W.green:W.yellow;console.log(` Status: ${J($.ezid_status)}`)}}if($.zenodo_concept_url){if(console.log(` Zenodo: ${$.zenodo_concept_url}`),$.zenodo_concept_url.includes("sandbox.zenodo.org"))console.log(),console.log(W.yellow("Mode: SANDBOX (test DOI)")),console.log(W.yellow(" This DOI is not indexed by DataCite and will not resolve in production"))}}else console.log(W.yellow("No concept DOI created yet")),console.log(W.dim(" Use 'nemar admin doi create' to create one"));if(console.log(),$.latest_version_doi){if(console.log(W.green("Latest Version DOI:")),console.log(` DOI: ${$.latest_version_doi}`),console.log(` URL: https://doi.org/${$.latest_version_doi}`),$.zenodo_latest_version_url)console.log(` Zenodo: ${$.zenodo_latest_version_url}`)}else if($.concept_doi)console.log(W.yellow("No version DOI published yet")),console.log(W.dim(" Version DOIs are created automatically on PR merge"))}catch($){if($ instanceof p){if(F.fail($.message),$.statusCode===404)console.log(W.dim(" Dataset not found"));else if($.statusCode===403)console.log(W.dim(" This command requires admin privileges"))}else F.fail("Failed to fetch DOI info")}});h9.command("update").description("Update EZID DOI metadata or status").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("--make-public","Transition DOI from reserved to public (permanent)").option("--refresh","Refresh metadata from dataset_description.json and .nemar/metadata.json").option(T0,j0).option(b0,y0).action(async(D,F)=>{if(!f0())return;if(!F.makePublic&&!F.refresh){console.log(W.yellow("No action specified. Use --make-public and/or --refresh."));return}if(F.makePublic){console.log(W.red("WARNING: Making a DOI public is PERMANENT!")),console.log(W.dim(" The DOI will be findable in DataCite and cannot be reverted.")),console.log();let J=await k0(`Make DOI for ${D} PUBLIC and permanent?`,F);if(J!=="confirmed"){console.log(W.dim(J==="declined"?"Skipped":"Cancelled"));return}}let $=C("Updating DOI...").start();try{let J=await TW(D,{status:F.makePublic?"public":void 0,refresh_metadata:F.refresh});$.succeed("DOI updated successfully"),console.log(),console.log(` EZID ID: ${W.cyan(J.ezid_identifier)}`),console.log(` Status: ${J.status==="public"?W.green(J.status):W.yellow(J.status)}`),console.log(` URL: ${J.doi_url}`)}catch(J){if(J instanceof p){if($.fail(J.message),J.statusCode===400)console.log(W.dim(" DOI update is only supported for EZID-managed DOIs"))}else $.fail("Failed to update DOI"),console.log(W.dim(` ${w0(J)}`))}});h9.command("enrich").description("Enrich DOI metadata with ORCIDs, descriptions, funding, and more").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("--no-llm","Skip LLM-based enrichment from README").option("--sandbox","Use sandbox DOI").option(T0,j0).option(b0,y0).action(async(D,F)=>{if(!f0())return;let $=C("Fetching dataset and existing enrichment...").start(),J;try{J=await uD(D),$.succeed(`Dataset: ${J.name}`)}catch(E){if(E instanceof p)$.fail(E.message);else $.fail("Failed to fetch dataset");return}let Q,Y=!1;try{Q=await S9(D)}catch(E){if(E instanceof p&&E.statusCode===404);else Y=!0,console.log(W.yellow(` Warning: Could not fetch DOI info: ${w0(E)}`))}if(Q?.concept_doi)console.log(` DOI: ${W.cyan(Q.concept_doi)}`);let B={version:"2.0"};if(J.github_repo){let E=C("Reading existing metadata...").start(),Z=await bg(J.github_repo,".nemar/metadata.json");if(Z)try{let L=JSON.parse(Z);if(L&&typeof L==="object"&&L.version==="2.0")B=L,E.succeed(`Loaded existing metadata (stage: ${L.pipeline_stage||"unknown"})`);else E.warn("Existing metadata has unsupported version, starting fresh")}catch(L){E.warn(`Could not parse existing metadata (${L instanceof Error?L.message:String(L)}), starting fresh`)}else E.info("No existing .nemar/metadata.json found, starting fresh")}if(F.llm!==!1&&J.github_repo){console.log(),console.log(W.cyan("--- Running LLM enrichment pipeline (CI workflow) ---"));let E=C("Triggering llm-enrichment workflow...").start();try{let{spawn:Z}=awaitPromise.resolve(globalThis.Bun),L=J.github_repo,A=Z({cmd:["gh","workflow","run","llm-enrichment.yml","--repo",L,"--ref","main"],stdout:"pipe",stderr:"pipe"}),M=await new Response(A.stderr).text();if(await A.exited!==0)throw Error(`Failed to trigger workflow: ${M.trim()}`);E.text="Waiting for workflow to register...",await new Promise((y)=>setTimeout(y,3000)),E.text="Polling workflow status...";let w=60,k="",R=0;for(let y=0;y<w;y++){let d=Z({cmd:["gh","run","list","--repo",L,"--workflow","llm-enrichment.yml","-L","1","--json","databaseId,status,conclusion"],stdout:"pipe",stderr:"pipe"}),W0=await new Response(d.stdout).text(),F0=await new Response(d.stderr).text();if(await d.exited!==0){if(R++,R>=3){E.warn(`gh CLI error: ${F0.trim()}`);break}await new Promise((e)=>setTimeout(e,5000));continue}try{let e=JSON.parse(W0.trim());if(R=0,e.length>0){let N0=e[0];if(N0.status==="completed"){k=N0.conclusion||"unknown";break}E.text=`Workflow ${N0.status}... (${y*5}s)`}}catch(e){if(R++,R>=3){E.warn(`Unable to parse workflow status: ${e instanceof Error?e.message:String(e)} (raw: ${W0.trim().slice(0,200)})`);break}}await new Promise((e)=>setTimeout(e,5000))}let j=!1;if(!k)E.warn("Workflow timed out after 5 minutes (may still be running)");else if(k==="success"){E.succeed("LLM enrichment workflow completed successfully");let y=await bg(L,".nemar/metadata.json");if(y)try{let d=JSON.parse(y);if(d&&typeof d==="object"&&d.version==="2.0"){Object.assign(B,d),j=!0;let W0=d.pipeline_stage||"unknown";if(console.log(W.dim(` Pipeline stage: ${W0}`)),B.authors){let F0=Object.keys(B.authors).length;console.log(W.dim(` Authors: ${F0}`))}}}catch(d){console.log(W.yellow(` Warning: Could not parse updated metadata: ${d instanceof Error?d.message:String(d)}`)),console.log(W.dim(" Using pre-workflow enrichment data"))}else console.log(W.yellow(" Warning: Could not fetch updated metadata after successful workflow.")),console.log(W.dim(" Author data below may be from a previous run."))}else E.fail(`LLM enrichment workflow failed (conclusion: ${k})`);if(!j)console.log(W.yellow(" ORCID discovery did not complete. Authors below may be from previous metadata."))}catch(Z){E.fail("LLM enrichment pipeline failed"),console.log(W.dim(` ${w0(Z)}`)),console.log(W.yellow(" ORCID discovery did not run. You will need to enter ORCIDs manually."))}}console.log(),console.log(W.cyan("--- Author ORCIDs ---"));let X=B.authors||{},G=Object.keys(X);if(G.length>0){let E=G.filter((L)=>X[L]?.orcid),Z=G.filter((L)=>!X[L]?.orcid);console.log(W.dim(` Discovered ${G.length} authors from pipeline:`));for(let L of E)console.log(W.green(` [x] ${L}: ${X[L]?.orcid}`));for(let L of Z)console.log(W.yellow(` [ ] ${L}: no ORCID found`));if(Z.length>0)console.log(W.dim(` ${Z.length} author(s) missing ORCIDs.`))}let{updateAuthors:H}=await D0.prompt([{type:"confirm",name:"updateAuthors",message:G.length>0?"Add or correct author ORCIDs?":"Add author ORCIDs manually?",default:!1}]);if(H){let E={},Z=!0;while(Z){let{authorName:L}=await D0.prompt([{type:"input",name:"authorName",message:'Author name (as in BIDS, e.g., "Shirazi, Yahya"):'}]);if(!L)break;let A=X[L];if(A?.orcid)console.log(W.dim(` Current ORCID: ${A.orcid}`));let{orcid:M}=await D0.prompt([{type:"input",name:"orcid",message:`ORCID for "${L}" (Enter to ${A?.orcid?"keep current":"skip"}):`,validate:(R)=>{if(!R)return!0;return sJ.test(R)||"Invalid ORCID format (XXXX-XXXX-XXXX-XXXX)"}}]),O={};if(M)O.orcid=M;let{affiliation:w}=await D0.prompt([{type:"input",name:"affiliation",message:`Affiliation for "${L}" (optional):`}]);if(w)O.affiliations=[{name:w}];if(O.orcid||O.affiliations)E[L]=O;let{more:k}=await D0.prompt([{type:"confirm",name:"more",message:"Add another author?",default:!0}]);Z=k}if(Object.keys(E).length>0){let L={...B.authors||{}};for(let[A,M]of Object.entries(E)){let O=L[A]||{};L[A]={...O,...M,orcid:M.orcid||O.orcid}}B.authors=L}}console.log(),console.log(W.cyan("--- Dataset stats ---"));let q=C("Computing dataset sizes and formats...").start();try{let E=await of(D),Z=XD(E.total_size);B.sizes=[`${Z} (${E.file_count} files)`],B.formats=E.extensions,q.succeed(`Sizes: ${Z} (${E.file_count} files), Formats: ${E.extensions.join(", ")}`)}catch(E){q.warn("Could not compute dataset stats"),console.log(W.dim(` ${w0(E)}`))}console.log(),console.log(W.cyan("--- Review ---")),console.log(JSON.stringify(B,null,2)),console.log();let K=await k0("Commit to repo and refresh DOI?",F,!0);if(K!=="confirmed"){console.log(W.dim(K==="declined"?"Skipped":"Cancelled"));return}let V=C("Saving enrichment...").start();try{let E=await af(D,B);if(V.succeed(E.message),E.bidsignore_updated)console.log(W.dim(" .bidsignore updated to include .nemar/"));if(!Q&&Y)try{Q=await S9(D)}catch(Z){if(process.env.DEBUG)console.error("[debug] DOI info re-fetch:",Z)}if(Q?.ezid_identifier){let Z=C("Refreshing DOI metadata...").start();try{await TW(D,{refresh_metadata:!0}),Z.succeed("DOI metadata refreshed")}catch(L){Z.warn("Could not refresh DOI metadata"),console.log(W.dim(` ${w0(L)}`))}}else if(Y)console.log(W.yellow(" DOI refresh skipped: could not verify DOI exists. Run 'nemar admin doi update --refresh' manually."))}catch(E){if(E instanceof p)V.fail(E.message);else V.fail("Failed to save enrichment"),console.log(W.dim(` ${w0(E)}`))}});r0.addCommand(h9);var qQ=new i0("publish").description("Publication workflow management");qQ.command("list").description("List publication requests").option("-s, --status <status>","Filter by status (requested, approving, published, denied)").addHelpText("after",`
211
+ Dataset already has a concept DOI:`)),console.log(` Concept DOI: ${W.cyan(G.concept_doi)}`),G.zenodo_concept_url)console.log(` Zenodo URL: ${G.zenodo_concept_url}`);return}}catch(G){if(process.env.DEBUG)console.error("[debug] DOI info fetch:",G)}if(console.log(),console.log(W.cyan("Dataset Information:")),console.log(` ID: ${J.dataset_id}`),console.log(` Name: ${J.name}`),J.github_repo)console.log(` GitHub: ${J.github_repo}`);if(F.sandbox)console.log(` Mode: ${W.yellow("SANDBOX (test DOI)")}`);console.log();let Q=F.provider==="zenodo"?"zenodo":"ezid";if(F.sandbox){if(console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow.bold(" SANDBOX MODE ENABLED")),console.log(W.yellow("\u2501".repeat(60))),Q==="zenodo")console.log(W.yellow(" \u2022 Using Zenodo sandbox (sandbox.zenodo.org)"));else console.log(W.yellow(" \u2022 Using EZID test shoulder (doi:10.5072/FK2)")),console.log(W.yellow(" \u2022 Test DOIs auto-delete after 2 weeks"));console.log(W.yellow(" \u2022 DOI will NOT be indexed by DataCite")),console.log(W.yellow(" \u2022 DOI will NOT resolve in production")),console.log(W.yellow(" \u2022 Use this for testing workflows only")),console.log(W.yellow("\u2501".repeat(60))),console.log()}console.log(W.red("WARNING: DOIs are PERMANENT and cannot be deleted!")),console.log(W.dim("The DOI will be pre-reserved but not published until the first version release.")),console.log(` Provider: ${W.cyan(Q.toUpperCase())}`),console.log();let Y=F.sandbox?`Create TEST concept DOI via ${Q.toUpperCase()} SANDBOX?`:`Create PERMANENT concept DOI via ${Q.toUpperCase()} PRODUCTION?`,B=await k0(Y,F);if(B!=="confirmed"){console.log(W.dim(B==="declined"?"Skipped":"Cancelled"));return}let X=C(`Creating concept DOI via ${Q.toUpperCase()}...`).start();try{let G=await gf(D,{title:F.title,description:F.description,sandbox:F.sandbox,provider:Q});X.succeed("Concept DOI created successfully");let H=C("Applying branch protection...").start();try{let q=await $Q(D);if(q.warnings&&q.warnings.length>0){H.warn("Branch protection applied with warnings");for(let K of q.warnings)console.log(W.yellow(` Warning: ${K}`))}else H.succeed("Branch protection applied")}catch(q){if(H.warn("Could not apply branch protection"),q instanceof p){if(console.log(W.dim(` ${q.message}`)),q.statusCode===403)console.log(W.dim(" Check admin credentials and permissions"))}else console.log(W.dim(` ${q instanceof Error?q.message:"Unknown error"}`));console.log(W.dim(" Manual setup: Go to GitHub repo Settings > Branches > Add rule"))}if(console.log(),console.log(W.green("DOI Information:")),console.log(` Concept DOI: ${W.cyan(G.concept_doi)}`),console.log(` Provider: ${G.provider.toUpperCase()}`),G.provider==="ezid")console.log(` DOI URL: ${G.doi_url}`),console.log(` EZID ID: ${G.ezid_identifier}`);else console.log(` Zenodo URL: ${G.zenodo_url}`);if(G.metadata_warning)console.log(W.yellow(` Warning: ${G.metadata_warning}`));if(console.log(),console.log(W.yellow("Next steps:")),console.log(" 1. Update dataset_description.json with DatasetDOI field"),console.log(" 2. Create a PR and merge it to trigger version DOI publication"),console.log(),F.sandbox)console.log(W.dim("Note: This is a sandbox DOI and will not resolve in production."))}catch(G){if(G instanceof p){if(X.fail(G.message),G.statusCode===403)console.log(W.dim(" This command requires admin privileges"))}else X.fail("Failed to create concept DOI"),console.log(W.dim(` ${w0(G)}`))}});h9.command("info").description("Get DOI info for a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").action(async(D)=>{if(!f0())return;let F=C("Fetching DOI info...").start();try{let $=await S9(D);if(F.stop(),console.log(),console.log(W.cyan(`DOI Information for ${D}:`)),console.log(` Dataset Name: ${$.name}`),console.log(),$.concept_doi){if(console.log(W.green("Concept DOI:")),console.log(` DOI: ${$.concept_doi}`),console.log(` URL: https://doi.org/${$.concept_doi}`),console.log(` Provider: ${($.doi_provider||"zenodo").toUpperCase()}`),$.doi_provider==="ezid"){if($.ezid_identifier)console.log(` EZID ID: ${$.ezid_identifier}`);if($.ezid_status){let J=$.ezid_status==="public"?W.green:W.yellow;console.log(` Status: ${J($.ezid_status)}`)}}if($.zenodo_concept_url){if(console.log(` Zenodo: ${$.zenodo_concept_url}`),$.zenodo_concept_url.includes("sandbox.zenodo.org"))console.log(),console.log(W.yellow("Mode: SANDBOX (test DOI)")),console.log(W.yellow(" This DOI is not indexed by DataCite and will not resolve in production"))}}else console.log(W.yellow("No concept DOI created yet")),console.log(W.dim(" Use 'nemar admin doi create' to create one"));if(console.log(),$.latest_version_doi){if(console.log(W.green("Latest Version DOI:")),console.log(` DOI: ${$.latest_version_doi}`),console.log(` URL: https://doi.org/${$.latest_version_doi}`),$.zenodo_latest_version_url)console.log(` Zenodo: ${$.zenodo_latest_version_url}`)}else if($.concept_doi)console.log(W.yellow("No version DOI published yet")),console.log(W.dim(" Version DOIs are created automatically on PR merge"))}catch($){if($ instanceof p){if(F.fail($.message),$.statusCode===404)console.log(W.dim(" Dataset not found"));else if($.statusCode===403)console.log(W.dim(" This command requires admin privileges"))}else F.fail("Failed to fetch DOI info")}});h9.command("update").description("Update EZID DOI metadata or status").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("--make-public","Transition DOI from reserved to public (permanent)").option("--refresh","Refresh metadata from dataset_description.json and .nemar/metadata.json").option(T0,j0).option(b0,y0).action(async(D,F)=>{if(!f0())return;if(!F.makePublic&&!F.refresh){console.log(W.yellow("No action specified. Use --make-public and/or --refresh."));return}if(F.makePublic){console.log(W.red("WARNING: Making a DOI public is PERMANENT!")),console.log(W.dim(" The DOI will be findable in DataCite and cannot be reverted.")),console.log();let J=await k0(`Make DOI for ${D} PUBLIC and permanent?`,F);if(J!=="confirmed"){console.log(W.dim(J==="declined"?"Skipped":"Cancelled"));return}}let $=C("Updating DOI...").start();try{let J=await TW(D,{status:F.makePublic?"public":void 0,refresh_metadata:F.refresh});$.succeed("DOI updated successfully"),console.log(),console.log(` EZID ID: ${W.cyan(J.ezid_identifier)}`),console.log(` Status: ${J.status==="public"?W.green(J.status):W.yellow(J.status)}`),console.log(` URL: ${J.doi_url}`)}catch(J){if(J instanceof p){if($.fail(J.message),J.statusCode===400)console.log(W.dim(" DOI update is only supported for EZID-managed DOIs"))}else $.fail("Failed to update DOI"),console.log(W.dim(` ${w0(J)}`))}});h9.command("enrich").description("Enrich DOI metadata with ORCIDs, descriptions, funding, and more").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("--no-llm","Skip LLM-based enrichment from README").option("--sandbox","Use sandbox DOI").option(T0,j0).option(b0,y0).action(async(D,F)=>{if(!f0())return;let $=C("Fetching dataset and existing enrichment...").start(),J;try{J=await uD(D),$.succeed(`Dataset: ${J.name}`)}catch(E){if(E instanceof p)$.fail(E.message);else $.fail("Failed to fetch dataset");return}let Q,Y=!1;try{Q=await S9(D)}catch(E){if(E instanceof p&&E.statusCode===404);else Y=!0,console.log(W.yellow(` Warning: Could not fetch DOI info: ${w0(E)}`))}if(Q?.concept_doi)console.log(` DOI: ${W.cyan(Q.concept_doi)}`);let B={version:"2.0"};if(J.github_repo){let E=C("Reading existing metadata...").start(),Z=await bg(J.github_repo,".nemar/metadata.json");if(Z)try{let L=JSON.parse(Z);if(L&&typeof L==="object"&&L.version==="2.0")B=L,E.succeed(`Loaded existing metadata (stage: ${L.pipeline_stage||"unknown"})`);else E.warn("Existing metadata has unsupported version, starting fresh")}catch(L){E.warn(`Could not parse existing metadata (${L instanceof Error?L.message:String(L)}), starting fresh`)}else E.info("No existing .nemar/metadata.json found, starting fresh")}if(F.llm!==!1&&J.github_repo){console.log(),console.log(W.cyan("--- Running LLM enrichment pipeline (CI workflow) ---"));let E=C("Triggering llm-enrichment workflow...").start();try{let{spawn:Z}=awaitPromise.resolve(globalThis.Bun),L=J.github_repo,A=Z({cmd:["gh","workflow","run","llm-enrichment.yml","--repo",L,"--ref","main"],stdout:"pipe",stderr:"pipe"}),M=await new Response(A.stderr).text();if(await A.exited!==0)throw Error(`Failed to trigger workflow: ${M.trim()}`);E.text="Waiting for workflow to register...",await new Promise((y)=>setTimeout(y,3000)),E.text="Polling workflow status...";let w=60,k="",O=0;for(let y=0;y<w;y++){let d=Z({cmd:["gh","run","list","--repo",L,"--workflow","llm-enrichment.yml","-L","1","--json","databaseId,status,conclusion"],stdout:"pipe",stderr:"pipe"}),W0=await new Response(d.stdout).text(),F0=await new Response(d.stderr).text();if(await d.exited!==0){if(O++,O>=3){E.warn(`gh CLI error: ${F0.trim()}`);break}await new Promise((e)=>setTimeout(e,5000));continue}try{let e=JSON.parse(W0.trim());if(O=0,e.length>0){let N0=e[0];if(N0.status==="completed"){k=N0.conclusion||"unknown";break}E.text=`Workflow ${N0.status}... (${y*5}s)`}}catch(e){if(O++,O>=3){E.warn(`Unable to parse workflow status: ${e instanceof Error?e.message:String(e)} (raw: ${W0.trim().slice(0,200)})`);break}}await new Promise((e)=>setTimeout(e,5000))}let j=!1;if(!k)E.warn("Workflow timed out after 5 minutes (may still be running)");else if(k==="success"){E.succeed("LLM enrichment workflow completed successfully");let y=await bg(L,".nemar/metadata.json");if(y)try{let d=JSON.parse(y);if(d&&typeof d==="object"&&d.version==="2.0"){Object.assign(B,d),j=!0;let W0=d.pipeline_stage||"unknown";if(console.log(W.dim(` Pipeline stage: ${W0}`)),B.authors){let F0=Object.keys(B.authors).length;console.log(W.dim(` Authors: ${F0}`))}}}catch(d){console.log(W.yellow(` Warning: Could not parse updated metadata: ${d instanceof Error?d.message:String(d)}`)),console.log(W.dim(" Using pre-workflow enrichment data"))}else console.log(W.yellow(" Warning: Could not fetch updated metadata after successful workflow.")),console.log(W.dim(" Author data below may be from a previous run."))}else E.fail(`LLM enrichment workflow failed (conclusion: ${k})`);if(!j)console.log(W.yellow(" ORCID discovery did not complete. Authors below may be from previous metadata."))}catch(Z){E.fail("LLM enrichment pipeline failed"),console.log(W.dim(` ${w0(Z)}`)),console.log(W.yellow(" ORCID discovery did not run. You will need to enter ORCIDs manually."))}}console.log(),console.log(W.cyan("--- Author ORCIDs ---"));let X=B.authors||{},G=Object.keys(X);if(G.length>0){let E=G.filter((L)=>X[L]?.orcid),Z=G.filter((L)=>!X[L]?.orcid);console.log(W.dim(` Discovered ${G.length} authors from pipeline:`));for(let L of E)console.log(W.green(` [x] ${L}: ${X[L]?.orcid}`));for(let L of Z)console.log(W.yellow(` [ ] ${L}: no ORCID found`));if(Z.length>0)console.log(W.dim(` ${Z.length} author(s) missing ORCIDs.`))}let{updateAuthors:H}=await D0.prompt([{type:"confirm",name:"updateAuthors",message:G.length>0?"Add or correct author ORCIDs?":"Add author ORCIDs manually?",default:!1}]);if(H){let E={},Z=!0;while(Z){let{authorName:L}=await D0.prompt([{type:"input",name:"authorName",message:'Author name (as in BIDS, e.g., "Shirazi, Yahya"):'}]);if(!L)break;let A=X[L];if(A?.orcid)console.log(W.dim(` Current ORCID: ${A.orcid}`));let{orcid:M}=await D0.prompt([{type:"input",name:"orcid",message:`ORCID for "${L}" (Enter to ${A?.orcid?"keep current":"skip"}):`,validate:(O)=>{if(!O)return!0;return sJ.test(O)||"Invalid ORCID format (XXXX-XXXX-XXXX-XXXX)"}}]),R={};if(M)R.orcid=M;let{affiliation:w}=await D0.prompt([{type:"input",name:"affiliation",message:`Affiliation for "${L}" (optional):`}]);if(w)R.affiliations=[{name:w}];if(R.orcid||R.affiliations)E[L]=R;let{more:k}=await D0.prompt([{type:"confirm",name:"more",message:"Add another author?",default:!0}]);Z=k}if(Object.keys(E).length>0){let L={...B.authors||{}};for(let[A,M]of Object.entries(E)){let R=L[A]||{};L[A]={...R,...M,orcid:M.orcid||R.orcid}}B.authors=L}}console.log(),console.log(W.cyan("--- Dataset stats ---"));let q=C("Computing dataset sizes and formats...").start();try{let E=await of(D),Z=XD(E.total_size);B.sizes=[`${Z} (${E.file_count} files)`],B.formats=E.extensions,q.succeed(`Sizes: ${Z} (${E.file_count} files), Formats: ${E.extensions.join(", ")}`)}catch(E){q.warn("Could not compute dataset stats"),console.log(W.dim(` ${w0(E)}`))}console.log(),console.log(W.cyan("--- Review ---")),console.log(JSON.stringify(B,null,2)),console.log();let K=await k0("Commit to repo and refresh DOI?",F,!0);if(K!=="confirmed"){console.log(W.dim(K==="declined"?"Skipped":"Cancelled"));return}let V=C("Saving enrichment...").start();try{let E=await af(D,B);if(V.succeed(E.message),E.bidsignore_updated)console.log(W.dim(" .bidsignore updated to include .nemar/"));if(!Q&&Y)try{Q=await S9(D)}catch(Z){if(process.env.DEBUG)console.error("[debug] DOI info re-fetch:",Z)}if(Q?.ezid_identifier){let Z=C("Refreshing DOI metadata...").start();try{await TW(D,{refresh_metadata:!0}),Z.succeed("DOI metadata refreshed")}catch(L){Z.warn("Could not refresh DOI metadata"),console.log(W.dim(` ${w0(L)}`))}}else if(Y)console.log(W.yellow(" DOI refresh skipped: could not verify DOI exists. Run 'nemar admin doi update --refresh' manually."))}catch(E){if(E instanceof p)V.fail(E.message);else V.fail("Failed to save enrichment"),console.log(W.dim(` ${w0(E)}`))}});r0.addCommand(h9);var qQ=new i0("publish").description("Publication workflow management");qQ.command("list").description("List publication requests").option("-s, --status <status>","Filter by status (requested, approving, published, denied)").addHelpText("after",`
212
212
  Description:
213
213
  List all publication requests from users, with optional filtering by status.
214
214
  Shows dataset ID, status, requesting user, and current progress.
@@ -287,17 +287,17 @@ After Approval:
287
287
  - Tags are protected (prevents version manipulation)
288
288
  - Data is protected by S3 Object Lock`).action(async(D,F)=>{if(!f0())return;let $=F.resume?`Resume publication of ${D}`:`Approve and publish ${D}`;if(console.log(W.cyan(`
289
289
  ${$}
290
- `)),console.log("This will run the following 15-step orchestrator:"),console.log(" 1. Check CI 9. Create version tag"),console.log(" 2. Enrichment check 10. Create GitHub release"),console.log(" 3. Make repo public 11. Upload to Zenodo"),console.log(" 4. S3 public read 12. Publish DOI (irreversible)"),console.log(" 5. Tag protection 13. S3 Object Lock"),console.log(F.sandbox?" 6. Create DOI (SANDBOX) 14. Generate archive":" 6. Create DOI 14. Generate archive"),console.log(" 7. Update metadata 15. Notify user"),console.log(" 8. Update README"),console.log(),F.sandbox)console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow.bold(" SANDBOX MODE ENABLED")),console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow(" \u2022 DOI will be created in sandbox mode (EZID test shoulder)")),console.log(W.yellow(" \u2022 DOI will NOT be indexed by DataCite")),console.log(W.yellow(" \u2022 DOI will NOT resolve in production")),console.log(W.yellow(" \u2022 Use this for testing workflows only")),console.log(W.yellow("\u2501".repeat(60))),console.log();let J=await k0(`${$}?`,F);if(J!=="confirmed"){console.log(W.dim(J==="declined"?"Skipped":"Cancelled"));return}let Q=C("Running publication workflow (this may take a few minutes)...").start();try{let Y=await YQ(D,!!F.resume,!!F.sandbox,!!F.skipCiCheck,(B)=>{Q.stop();let X=B.step?B.step.replace(/_/g," "):"step";console.log(W.yellow(` [!] ${X} failed: ${B.error}`)),console.log(W.dim(` Retrying in ${Math.round(B.delayMs/1000)}s (attempt ${B.attempt+1}/${B.maxAttempts})...`)),Q.start("Running publication workflow (this may take a few minutes)...")});if(Q.succeed(Y.message),Y.step_results&&Y.step_results.length>0){console.log();let B=Y.step_results,X=B.length;B.forEach((G,H)=>{let q=`[${String(H+1).padStart(2," ")}/${X}]`,K=G.step.replace(/_/g," ");if(G.status==="completed"){let V=(G.duration_ms/1000).toFixed(1),E=G.attempts>1?` (attempt ${G.attempts})`:"";console.log(` ${W.green("[x]")} ${W.dim(q)} ${K} ${W.dim(`(${V}s${E})`)}`)}else if(G.status==="failed")console.log(` ${W.red("[!]")} ${W.dim(q)} ${K}${G.error?`: ${W.red(G.error)}`:""}`);else console.log(` ${W.dim("[-]")} ${W.dim(q)} ${W.dim(K)} ${W.dim("(skipped)")}`)}),console.log()}else if(Y.steps_completed){console.log();for(let B of Y.steps_completed)console.log(` ${W.green("[x]")} ${B.replace(/_/g," ")}`);console.log()}}catch(Y){QD(Y,Q,"Failed to approve publication",{422:"Fix the CI issues and retry with --resume"});let B=Y.stepResults;if(B&&B.length>0){console.log(),console.log(W.dim("Step timeline (last attempt):"));let X=B.length;B.forEach((G,H)=>{let q=`[${String(H+1).padStart(2," ")}/${X}]`,K=G.step.replace(/_/g," "),V=(G.duration_ms/1000).toFixed(1),E=G.attempts>1?` (attempt ${G.attempts})`:"";if(G.status==="completed")console.log(` ${W.green("[x]")} ${W.dim(q)} ${K} ${W.dim(`(${V}s${E})`)}`);else if(G.status==="failed")console.log(` ${W.red("[!]")} ${W.dim(q)} ${K}${G.error?`: ${W.red(G.error)}`:""}`);else console.log(` ${W.dim("[-]")} ${W.dim(q)} ${W.dim(K)} ${W.dim("(skipped)")}`)}),console.log()}}});r0.addCommand(qQ);r0.command("revert").description("Revert a dataset to a previous version (creates PR for review)").argument("<dataset-id>","Dataset ID (e.g., nm000104)").argument("[version]","Target version to revert to (e.g., 1.0.0)").option("--list","List available versions without reverting").option("--force","Direct push to main without PR (emergency only)").option("--message <msg>","Custom revert commit message").option("--dir <path>","Use existing local clone instead of cloning fresh").option(T0,j0).option(b0,y0).action(async(D,F,$)=>{if(!f0())return;let J=await jF();if(!J.allPassed){console.log(W.red("Error: Missing prerequisites"));for(let R of J.errors)console.log(W.dim(` - ${R}`));return}let Q,Y=!0;if($.dir){if(!mg($.dir)){console.log(W.red(`Error: Directory not found: ${$.dir}`));return}Q=$.dir,Y=!1}else Q=fE0(process.cwd(),`${D}-revert-${Date.now()}`);let B=C("Fetching dataset info...").start(),X;try{X=await uD(D),B.succeed(`Found dataset: ${X.name}`)}catch(R){if(R instanceof p)if(B.fail(R.message),R.statusCode===404||R.statusCode===400)console.log(W.red(`Error: Dataset ${D} not found`)),console.log(W.dim(` ${R.message}`));else console.log(W.red(`Error: ${R.message}`));else{B.fail("Failed to fetch dataset");let j=R instanceof Error?R.message:String(R);console.log(W.red(`Error: Could not load dataset ${D}: ${j}`))}return}if(!X.github_repo){console.log(W.red("Error: Dataset has no GitHub repository"));return}if(Y){let R=C(`Cloning ${D}...`).start(),j=`https://github.com/${X.github_repo}.git`,y=await s1(j,Q);if(!y.success){R.fail(`Clone failed: ${y.error}`);return}R.succeed(`Cloned to ${Q}`)}let G=await mW(Q);if(G.length===0){console.log(W.yellow("No versions found for this dataset")),console.log(W.dim(" Dataset may not have any tagged releases yet"));return}if($.list){console.log(`
290
+ `)),console.log("This will run the following 15-step orchestrator:"),console.log(" 1. Check CI 9. Create version tag"),console.log(" 2. Enrichment check 10. Create GitHub release"),console.log(" 3. Make repo public 11. Upload to Zenodo"),console.log(" 4. S3 public read 12. Publish DOI (irreversible)"),console.log(" 5. Tag protection 13. S3 Object Lock"),console.log(F.sandbox?" 6. Create DOI (SANDBOX) 14. Generate archive":" 6. Create DOI 14. Generate archive"),console.log(" 7. Update metadata 15. Notify user"),console.log(" 8. Update README"),console.log(),F.sandbox)console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow.bold(" SANDBOX MODE ENABLED")),console.log(W.yellow("\u2501".repeat(60))),console.log(W.yellow(" \u2022 DOI will be created in sandbox mode (EZID test shoulder)")),console.log(W.yellow(" \u2022 DOI will NOT be indexed by DataCite")),console.log(W.yellow(" \u2022 DOI will NOT resolve in production")),console.log(W.yellow(" \u2022 Use this for testing workflows only")),console.log(W.yellow("\u2501".repeat(60))),console.log();let J=await k0(`${$}?`,F);if(J!=="confirmed"){console.log(W.dim(J==="declined"?"Skipped":"Cancelled"));return}let Q=C("Running publication workflow (this may take a few minutes)...").start();try{let Y=await YQ(D,!!F.resume,!!F.sandbox,!!F.skipCiCheck,(B)=>{Q.stop();let X=B.step?B.step.replace(/_/g," "):"step";console.log(W.yellow(` [!] ${X} failed: ${B.error}`)),console.log(W.dim(` Retrying in ${Math.round(B.delayMs/1000)}s (attempt ${B.attempt+1}/${B.maxAttempts})...`)),Q.start("Running publication workflow (this may take a few minutes)...")});if(Q.succeed(Y.message),Y.step_results&&Y.step_results.length>0){console.log();let B=Y.step_results,X=B.length;B.forEach((G,H)=>{let q=`[${String(H+1).padStart(2," ")}/${X}]`,K=G.step.replace(/_/g," ");if(G.status==="completed"){let V=(G.duration_ms/1000).toFixed(1),E=G.attempts>1?` (attempt ${G.attempts})`:"";console.log(` ${W.green("[x]")} ${W.dim(q)} ${K} ${W.dim(`(${V}s${E})`)}`)}else if(G.status==="failed")console.log(` ${W.red("[!]")} ${W.dim(q)} ${K}${G.error?`: ${W.red(G.error)}`:""}`);else console.log(` ${W.dim("[-]")} ${W.dim(q)} ${W.dim(K)} ${W.dim("(skipped)")}`)}),console.log()}else if(Y.steps_completed){console.log();for(let B of Y.steps_completed)console.log(` ${W.green("[x]")} ${B.replace(/_/g," ")}`);console.log()}}catch(Y){QD(Y,Q,"Failed to approve publication",{422:"Fix the CI issues and retry with --resume"});let B=Y.stepResults;if(B&&B.length>0){console.log(),console.log(W.dim("Step timeline (last attempt):"));let X=B.length;B.forEach((G,H)=>{let q=`[${String(H+1).padStart(2," ")}/${X}]`,K=G.step.replace(/_/g," "),V=(G.duration_ms/1000).toFixed(1),E=G.attempts>1?` (attempt ${G.attempts})`:"";if(G.status==="completed")console.log(` ${W.green("[x]")} ${W.dim(q)} ${K} ${W.dim(`(${V}s${E})`)}`);else if(G.status==="failed")console.log(` ${W.red("[!]")} ${W.dim(q)} ${K}${G.error?`: ${W.red(G.error)}`:""}`);else console.log(` ${W.dim("[-]")} ${W.dim(q)} ${W.dim(K)} ${W.dim("(skipped)")}`)}),console.log()}}});r0.addCommand(qQ);r0.command("revert").description("Revert a dataset to a previous version (creates PR for review)").argument("<dataset-id>","Dataset ID (e.g., nm000104)").argument("[version]","Target version to revert to (e.g., 1.0.0)").option("--list","List available versions without reverting").option("--force","Direct push to main without PR (emergency only)").option("--message <msg>","Custom revert commit message").option("--dir <path>","Use existing local clone instead of cloning fresh").option(T0,j0).option(b0,y0).action(async(D,F,$)=>{if(!f0())return;let J=await jF();if(!J.allPassed){console.log(W.red("Error: Missing prerequisites"));for(let O of J.errors)console.log(W.dim(` - ${O}`));return}let Q,Y=!0;if($.dir){if(!mg($.dir)){console.log(W.red(`Error: Directory not found: ${$.dir}`));return}Q=$.dir,Y=!1}else Q=fE0(process.cwd(),`${D}-revert-${Date.now()}`);let B=C("Fetching dataset info...").start(),X;try{X=await uD(D),B.succeed(`Found dataset: ${X.name}`)}catch(O){if(O instanceof p){if(B.fail(O.message),O.statusCode===404)console.log(W.dim(" Dataset not found"))}else B.fail("Failed to fetch dataset");return}if(!X.github_repo){console.log(W.red("Error: Dataset has no GitHub repository"));return}if(Y){let O=C(`Cloning ${D}...`).start(),j=`https://github.com/${X.github_repo}.git`,y=await s1(j,Q);if(!y.success){O.fail(`Clone failed: ${y.error}`);return}O.succeed(`Cloned to ${Q}`)}let G=await mW(Q);if(G.length===0){console.log(W.yellow("No versions found for this dataset")),console.log(W.dim(" Dataset may not have any tagged releases yet"));return}if($.list){console.log(`
291
291
  ${W.cyan("Available Versions:")}
292
- `);for(let R of G)console.log(` ${W.green(R.version)} ${W.dim(R.date)} ${W.dim(R.commit)}`);return}let H=F;if(!H){console.log(`
292
+ `);for(let O of G)console.log(` ${W.green(O.version)} ${W.dim(O.date)} ${W.dim(O.commit)}`);return}let H=F;if(!H){console.log(`
293
293
  ${W.cyan("Available Versions:")}
294
- `);for(let j of G)console.log(` ${W.green(j.version)} ${W.dim(j.date)}`);console.log();let{version:R}=await D0.prompt([{type:"list",name:"version",message:"Select version to revert to:",choices:G.map((j)=>({name:`${j.version} (${j.date})`,value:j.version}))}]);H=R}let q=await lW(Q,H);if(!q){console.log(W.red(`Error: Version ${H} not found`)),console.log(W.dim(" Use --list to see available versions"));return}if(console.log(),console.log(W.yellow("Revert Summary:")),console.log(` Dataset: ${W.cyan(D)}`),console.log(` Target version: ${W.green(H)}`),console.log(` Commit: ${W.dim(q)}`),$.force)console.log(` Mode: ${W.red("DIRECT PUSH (--force)")}`);else console.log(` Mode: ${W.green("Pull Request")}`);if(console.log(),$.force)console.log(W.red("WARNING: --force will push directly to main without PR review!")),console.log(W.red("This should only be used in emergencies.")),console.log();let K=$.force?`Directly push revert to ${H}?`:`Create PR to revert to ${H}?`,V=await k0(K,$);if(V!=="confirmed"){console.log(W.dim(V==="declined"?"Skipped":"Cancelled"));return}let E=`revert-to-${H.replace(/\./g,"-")}-${Date.now()}`,Z=C("Creating revert branch...").start(),L=await pW(Q,H,E);if(!L.success){Z.fail(`Failed to create branch: ${L.error}`);return}Z.succeed(`Created branch: ${E}`);let A=C("Committing revert...").start(),M=$.message||`Revert to version ${H}`,O=await dW(Q,H,M);if(!O.success){A.fail(`Failed to commit: ${O.error}`);return}A.succeed("Committed revert changes");let w=C("Pushing branch...").start(),k=await PF(Q,E);if(!k.success){w.fail(`Failed to push: ${k.error}`);return}if(w.succeed("Pushed branch to GitHub"),!$.force){let R=C("Creating pull request...").start();try{let{spawn:j}=await import("child_process"),y=`Revert to version ${H}`,d=`## Revert Request
294
+ `);for(let j of G)console.log(` ${W.green(j.version)} ${W.dim(j.date)}`);console.log();let{version:O}=await D0.prompt([{type:"list",name:"version",message:"Select version to revert to:",choices:G.map((j)=>({name:`${j.version} (${j.date})`,value:j.version}))}]);H=O}let q=await lW(Q,H);if(!q){console.log(W.red(`Error: Version ${H} not found`)),console.log(W.dim(" Use --list to see available versions"));return}if(console.log(),console.log(W.yellow("Revert Summary:")),console.log(` Dataset: ${W.cyan(D)}`),console.log(` Target version: ${W.green(H)}`),console.log(` Commit: ${W.dim(q)}`),$.force)console.log(` Mode: ${W.red("DIRECT PUSH (--force)")}`);else console.log(` Mode: ${W.green("Pull Request")}`);if(console.log(),$.force)console.log(W.red("WARNING: --force will push directly to main without PR review!")),console.log(W.red("This should only be used in emergencies.")),console.log();let K=$.force?`Directly push revert to ${H}?`:`Create PR to revert to ${H}?`,V=await k0(K,$);if(V!=="confirmed"){console.log(W.dim(V==="declined"?"Skipped":"Cancelled"));return}let E=`revert-to-${H.replace(/\./g,"-")}-${Date.now()}`,Z=C("Creating revert branch...").start(),L=await pW(Q,H,E);if(!L.success){Z.fail(`Failed to create branch: ${L.error}`);return}Z.succeed(`Created branch: ${E}`);let A=C("Committing revert...").start(),M=$.message||`Revert to version ${H}`,R=await dW(Q,H,M);if(!R.success){A.fail(`Failed to commit: ${R.error}`);return}A.succeed("Committed revert changes");let w=C("Pushing branch...").start(),k=await PF(Q,E);if(!k.success){w.fail(`Failed to push: ${k.error}`);return}if(w.succeed("Pushed branch to GitHub"),!$.force){let O=C("Creating pull request...").start();try{let{spawn:j}=await import("child_process"),y=`Revert to version ${H}`,d=`## Revert Request
295
295
 
296
296
  This PR reverts the dataset to version ${H}.
297
297
 
298
298
  **Reason:** Admin-initiated revert
299
299
  **Target version:** ${H}
300
- **Original commit:** ${q}`,W0=j("gh",["pr","create","--repo",X.github_repo,"--head",E,"--base","main","--title",y,"--body",d],{cwd:Q}),F0="";W0.stdout.on("data",(O0)=>{F0+=O0.toString()}),await new Promise((O0,e)=>{W0.on("close",(N0)=>{if(N0===0)O0();else e(Error(`gh pr create failed with code ${N0}`))})}),R.succeed("Created pull request"),console.log(),console.log(` ${W.cyan("PR URL:")} ${F0.trim()}`),console.log(),console.log(W.green("Revert PR created successfully.")),console.log(W.dim("The PR will go through validation checks before it can be merged."))}catch(j){R.fail("Failed to create PR via gh CLI");let y=j instanceof Error?j.message:String(j);if(console.error(W.red(` Error: ${y}`)),y.includes("not found")||y.includes("command not found"))console.log(W.yellow(" Possible causes:")),console.log(" \u2022 GitHub CLI (gh) not installed or not in PATH"),console.log(" \u2022 Run: brew install gh (or see https://cli.github.com)");else if(y.includes("auth")||y.includes("401"))console.log(W.yellow(" GitHub authentication failed.")),console.log(" \u2022 Run: gh auth login");console.log(W.dim(" You may need to create the PR manually on GitHub")),console.log(W.dim(` Branch: ${E}`))}}else console.log(W.yellow("Force mode: Merging directly to main...")),console.log(W.red("Direct merge not implemented for safety.")),console.log(W.dim("To force-merge, manually merge the branch on GitHub:")),console.log(W.dim(` git checkout main && git merge ${E} && git push`));if(Y)console.log(),console.log(W.dim(`Working directory: ${Q}`)),console.log(W.dim("You can delete this directory after the PR is merged."))});r0.command("make-public").description("Publish a dataset (make repository and data public) - PERMANENT").argument("<dataset-id>","Dataset ID (e.g., nm000104)").addHelpText("after",`
300
+ **Original commit:** ${q}`,W0=j("gh",["pr","create","--repo",X.github_repo,"--head",E,"--base","main","--title",y,"--body",d],{cwd:Q}),F0="";W0.stdout.on("data",(O0)=>{F0+=O0.toString()}),await new Promise((O0,e)=>{W0.on("close",(N0)=>{if(N0===0)O0();else e(Error(`gh pr create failed with code ${N0}`))})}),O.succeed("Created pull request"),console.log(),console.log(` ${W.cyan("PR URL:")} ${F0.trim()}`),console.log(),console.log(W.green("Revert PR created successfully.")),console.log(W.dim("The PR will go through validation checks before it can be merged."))}catch(j){O.fail("Failed to create PR via gh CLI");let y=j instanceof Error?j.message:String(j);if(console.error(W.red(` Error: ${y}`)),y.includes("not found")||y.includes("command not found"))console.log(W.yellow(" Possible causes:")),console.log(" \u2022 GitHub CLI (gh) not installed or not in PATH"),console.log(" \u2022 Run: brew install gh (or see https://cli.github.com)");else if(y.includes("auth")||y.includes("401"))console.log(W.yellow(" GitHub authentication failed.")),console.log(" \u2022 Run: gh auth login");console.log(W.dim(" You may need to create the PR manually on GitHub")),console.log(W.dim(` Branch: ${E}`))}}else console.log(W.yellow("Force mode: Merging directly to main...")),console.log(W.red("Direct merge not implemented for safety.")),console.log(W.dim("To force-merge, manually merge the branch on GitHub:")),console.log(W.dim(` git checkout main && git merge ${E} && git push`));if(Y)console.log(),console.log(W.dim(`Working directory: ${Q}`)),console.log(W.dim("You can delete this directory after the PR is merged."))});r0.command("make-public").description("Publish a dataset (make repository and data public) - PERMANENT").argument("<dataset-id>","Dataset ID (e.g., nm000104)").addHelpText("after",`
301
301
  Description:
302
302
  Publish a dataset by making both the GitHub repository and S3 data publicly accessible.
303
303
 
@@ -469,8 +469,8 @@ See the URL above for the full license text.
469
469
 
470
470
  Please see https://spdx.org/licenses/${D}.html for the full license text.
471
471
  `}function Hh(D,F){let $=MQ(D,"LICENSE");if(AQ($))return!1;return Xh($,HV0(F)),!0}function qh(D,F){let $=MQ(D,"dataset_description.json");if(!AQ($))return;let J=JSON.parse(NH($,"utf-8"));J.License=F,Xh($,`${JSON.stringify(J,null,2)}
472
- `)}function Kh(D,F){let $=D.files??{},J=F.files??{},Q=[],Y=[],B=[];for(let[X,G]of Object.entries(J)){let H=$[X];if(!H)Q.push(X);else if(H.key!==G.key)Y.push(X)}for(let X of Object.keys($))if(!(X in J))B.push(X);return Q.sort(),Y.sort(),B.sort(),{added:Q,changed:Y,removed:B}}import{existsSync as OH,mkdirSync as Vh,statSync as qV0}from"fs";import{dirname as KV0,join as zV0,resolve as zh}from"path";var{spawn:Zh}=globalThis.Bun;var wH="openneuro.org",Uh="us-east-1",TH=`https://s3.amazonaws.com/${wH}`,EV0=/^ds\d{6}$/;function Lh(D){return EV0.test(D)}function Eh(D){return D.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&apos;/g,"'").replace(/&quot;/g,'"')}async function Ah(D,F){if(F??await UQ())try{let B=Zh({cmd:["aws","s3","ls","--no-sign-request","--region",Uh,`s3://${wH}/${D}/`],stdout:"pipe",stderr:"pipe"}),X=await new Response(B.stdout).text();if(await B.exited!==0)return!1;return X.trim().length>0}catch{}let J=`${TH}?list-type=2&prefix=${D}/&max-keys=1`,Q=await fetch(J);if(!Q.ok)return!1;return(await Q.text()).includes("<Key>")}async function Mh(D){let F=[],$;do{let J=`${TH}?list-type=2&prefix=${D}/`;if($)J+=`&continuation-token=${encodeURIComponent($)}`;let Q=await fetch(J);if(!Q.ok)throw Error(`Failed to list OpenNeuro dataset: HTTP ${Q.status}`);let Y=await Q.text(),B=Y.match(/<Contents>[\s\S]*?<\/Contents>/g)||[];for(let G of B){let H=G.match(/<Key>([^<]+)<\/Key>/),q=G.match(/<Size>(\d+)<\/Size>/);if(H&&q){let K=Eh(H[1]),V=Number.parseInt(q[1],10);if(K.endsWith("/")&&V===0)continue;F.push({key:K,size:V})}}if(Y.includes("<IsTruncated>true</IsTruncated>")){let G=Y.match(/<NextContinuationToken>([^<]+)<\/NextContinuationToken>/);if(!G)throw Error(`S3 listing indicated more results but no continuation token was provided. Got ${F.length} objects so far.`);$=Eh(G[1])}else $=void 0}while($);return F}async function Nh(D,F,$){let J=`s3://${wH}/${D}/`,Q=["aws","s3","sync","--no-sign-request","--region",Uh,J,F],Y;try{Y=Zh({cmd:Q,stdout:"pipe",stderr:"pipe"})}catch(V){return{success:!1,filesDownloaded:0,totalBytes:0,method:"aws-cli",error:`Failed to start AWS CLI: ${V.message}`}}let B=0,X=[],G=/^download:\s+s3:\/\/[^\s]+\/(.*?)\s+to\s+/;function H(V,E){if(V.startsWith("download:")){B++;let Z=V.match(G);$?.(B,Z?.[1]||"")}else if(E)X.push(V)}async function q(V,E){let Z=V.getReader(),L=new TextDecoder,A="";try{while(!0){let{done:O,value:w}=await Z.read();if(O)break;A+=L.decode(w,{stream:!0});let k=A.split(`
473
- `);A=k.pop()||"";for(let R of k){let j=R.trim();if(j)H(j,E)}}let M=A.trim();if(M)H(M,E)}finally{Z.releaseLock()}}await Promise.all([q(Y.stdout,!1),q(Y.stderr,!0)]);let K=await Y.exited;if(K!==0)return{success:!1,filesDownloaded:B,totalBytes:0,method:"aws-cli",error:X.join(`
472
+ `)}function Kh(D,F){let $=D.files??{},J=F.files??{},Q=[],Y=[],B=[];for(let[X,G]of Object.entries(J)){let H=$[X];if(!H)Q.push(X);else if(H.key!==G.key)Y.push(X)}for(let X of Object.keys($))if(!(X in J))B.push(X);return Q.sort(),Y.sort(),B.sort(),{added:Q,changed:Y,removed:B}}import{existsSync as OH,mkdirSync as Vh,statSync as qV0}from"fs";import{dirname as KV0,join as zV0,resolve as zh}from"path";var{spawn:Zh}=globalThis.Bun;var wH="openneuro.org",Uh="us-east-1",TH=`https://s3.amazonaws.com/${wH}`,EV0=/^ds\d{6}$/;function Lh(D){return EV0.test(D)}function Eh(D){return D.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&apos;/g,"'").replace(/&quot;/g,'"')}async function Ah(D,F){if(F??await UQ())try{let B=Zh({cmd:["aws","s3","ls","--no-sign-request","--region",Uh,`s3://${wH}/${D}/`],stdout:"pipe",stderr:"pipe"}),X=await new Response(B.stdout).text();if(await B.exited!==0)return!1;return X.trim().length>0}catch{}let J=`${TH}?list-type=2&prefix=${D}/&max-keys=1`,Q=await fetch(J);if(!Q.ok)return!1;return(await Q.text()).includes("<Key>")}async function Mh(D){let F=[],$;do{let J=`${TH}?list-type=2&prefix=${D}/`;if($)J+=`&continuation-token=${encodeURIComponent($)}`;let Q=await fetch(J);if(!Q.ok)throw Error(`Failed to list OpenNeuro dataset: HTTP ${Q.status}`);let Y=await Q.text(),B=Y.match(/<Contents>[\s\S]*?<\/Contents>/g)||[];for(let G of B){let H=G.match(/<Key>([^<]+)<\/Key>/),q=G.match(/<Size>(\d+)<\/Size>/);if(H&&q){let K=Eh(H[1]),V=Number.parseInt(q[1],10);if(K.endsWith("/")&&V===0)continue;F.push({key:K,size:V})}}if(Y.includes("<IsTruncated>true</IsTruncated>")){let G=Y.match(/<NextContinuationToken>([^<]+)<\/NextContinuationToken>/);if(!G)throw Error(`S3 listing indicated more results but no continuation token was provided. Got ${F.length} objects so far.`);$=Eh(G[1])}else $=void 0}while($);return F}async function Nh(D,F,$){let J=`s3://${wH}/${D}/`,Q=["aws","s3","sync","--no-sign-request","--region",Uh,J,F],Y;try{Y=Zh({cmd:Q,stdout:"pipe",stderr:"pipe"})}catch(V){return{success:!1,filesDownloaded:0,totalBytes:0,method:"aws-cli",error:`Failed to start AWS CLI: ${V.message}`}}let B=0,X=[],G=/^download:\s+s3:\/\/[^\s]+\/(.*?)\s+to\s+/;function H(V,E){if(V.startsWith("download:")){B++;let Z=V.match(G);$?.(B,Z?.[1]||"")}else if(E)X.push(V)}async function q(V,E){let Z=V.getReader(),L=new TextDecoder,A="";try{while(!0){let{done:R,value:w}=await Z.read();if(R)break;A+=L.decode(w,{stream:!0});let k=A.split(`
473
+ `);A=k.pop()||"";for(let O of k){let j=O.trim();if(j)H(j,E)}}let M=A.trim();if(M)H(M,E)}finally{Z.releaseLock()}}await Promise.all([q(Y.stdout,!1),q(Y.stderr,!0)]);let K=await Y.exited;if(K!==0)return{success:!1,filesDownloaded:B,totalBytes:0,method:"aws-cli",error:X.join(`
474
474
  `)||`aws s3 sync exited with code ${K}`};return{success:!0,filesDownloaded:B,totalBytes:0,method:"aws-cli"}}async function VV0(D,F,$,J){let Q=D.substring(J.length+1),Y=zV0($,Q);if(!zh(Y).startsWith(`${zh($)}/`))throw Error(`Path traversal detected in key: ${D}`);if(OH(Y))try{if(qV0(Y).size===F)return F}catch{}let X=KV0(Y);if(!OH(X))Vh(X,{recursive:!0});let G=D.split("/").map((K)=>encodeURIComponent(K)).join("/"),H=`${TH}/${G}`,q=await fetch(H);if(!q.ok)throw Error(`Failed to download ${Q}: HTTP ${q.status}`);return await Bun.write(Y,q),F}async function Ch(D,F,$,J={}){let{concurrency:Q=8,onProgress:Y}=J,B=$.length,X=$.reduce((L,A)=>L+A.size,0),G=0,H=0,q=0,K=[];if(!OH(F))Vh(F,{recursive:!0});let V=[...$],E=Math.min(Q,B),Z=Array.from({length:E},async()=>{while(V.length>0){let L=V.shift();if(!L)break;try{let A=await VV0(L.key,L.size,F,D);H++,q+=A}catch(A){K.push(A.message)}G++,Y?.(G,B,q,X)}});return await Promise.all(Z),{success:K.length===0,filesDownloaded:H,totalBytes:q,method:"https",error:K.length>0?`${K.length} file(s) failed:
475
475
  ${K.slice(0,10).join(`
476
476
  `)}${K.length>10?`
@@ -558,10 +558,10 @@ Examples:
558
558
  $ nemar dataset upload ./ds -n "My EEG Study" -d "64-channel EEG data"
559
559
  $ nemar dataset upload ./ds --dry-run # Preview without uploading
560
560
  $ nemar dataset upload ./ds -j 16 # More parallel streams`).action(async(D,F)=>{let $=JD();if(!L0())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);if(!Gf())console.log(W.yellow("Sandbox training required")),console.log(),console.log("You must complete sandbox training before uploading real datasets."),console.log("This verifies your setup and familiarizes you with the workflow."),console.log(),console.log("Run sandbox training with:"),console.log(W.cyan(" nemar sandbox")),process.exit(1);let J=YD(D);if(!DD(J))console.log(W.red(`Error: Path does not exist: ${J}`)),process.exit(1);await l4("upload");let Q=C("Checking prerequisites...").start(),Y=await v9();if(!Y.allPassed){Q.fail("Prerequisites check failed"),console.log();for(let N of Y.errors)console.log(W.red(` - ${N}`));process.exit(1)}if(Q.succeed("Prerequisites check passed"),console.log(W.dim(` git-annex ${Y.gitAnnex.version}`)),Y.githubSSH.username)console.log(W.dim(` GitHub: ${Y.githubSSH.username}`));console.log(),Q=C("Verifying GitHub CLI authentication...").start();let B=await y9($.githubUsername);if(!B.authenticated)Q.fail("GitHub CLI not authenticated"),console.log(W.red(` ${B.error}`)),console.log(),console.log("GitHub CLI is required for dataset uploads. Install and authenticate:"),console.log(W.cyan(" brew install gh # or visit https://cli.github.com/")),console.log(W.cyan(" gh auth login")),process.exit(1);if($.githubUsername&&!B.matches)Q.warn("GitHub CLI user mismatch"),console.log(W.yellow(` ${B.error}`)),console.log(),console.log("Your gh CLI is authenticated as a different GitHub account than your NEMAR account."),console.log("This may cause issues with repository access. To fix:"),console.log(W.cyan(` gh auth login # Login as ${$.githubUsername}`)),console.log(),console.log(W.yellow("WARNING: If upload fails with permission errors, this mismatch is the likely cause.")),console.log();else Q.succeed(`GitHub CLI authenticated as ${B.username}`);if(!F.skipValidation){Q=C("Validating BIDS dataset...").start();let N=YD(J,"dataset_description.json");if(!DD(N))Q.fail("Not a valid BIDS dataset"),console.log(W.red("Missing required file: dataset_description.json")),process.exit(1);if(!(await l9()).installed)Q.fail("Deno is required for BIDS validation"),console.log(),console.log(W.red("Error: Deno is not installed")),console.log(),console.log("The BIDS validator requires Deno runtime to run."),console.log("Install Deno with one of these commands:"),console.log(),console.log(W.cyan(" # macOS/Linux (curl)")),console.log(" curl -fsSL https://deno.land/install.sh | sh"),console.log(),console.log(W.cyan(" # macOS (Homebrew)")),console.log(" brew install deno"),console.log(),console.log(W.cyan(" # Windows (PowerShell)")),console.log(" irm https://deno.land/install.ps1 | iex"),console.log(),console.log("Learn more: https://docs.deno.com/runtime/getting_started/installation/"),console.log(),console.log(W.dim("To skip validation (not recommended): nemar dataset upload --skip-validation")),process.exit(1);try{let h=await eg(J,{prune:!0});if(!h.valid)Q.fail("Dataset has validation errors"),console.log(),console.log(Fh(h)),console.log(),console.log(W.yellow("Fix the errors above before uploading.")),console.log(W.dim("Or use --skip-validation to upload anyway (not recommended).")),process.exit(1);Q.succeed(`Dataset is valid BIDS (${h.warningCount} warnings)`)}catch(h){Q.fail("Validation failed"),console.log(W.red(h.message)),process.exit(1)}console.log()}Q=C("Analyzing dataset files...").start();let X={};try{let N=YD(J,"dataset_description.json");X=JSON.parse(T8(N,"utf-8"))}catch(N){if(N.code!=="ENOENT")console.log(W.yellow(`Warning: Could not read dataset_description.json: ${N.message}`))}let G=F.name||(typeof X.Name==="string"?X.Name:null)||hV0(J),H=await tW(J);Q.succeed(`Found ${H.files.length} files (${H.dataFiles} data, ${H.metadataFiles} metadata)`);let q,K=YD(J,".nemar","metadata.json"),V=YD(J,"nemar_metadata.json");if(DD(K))try{q=JSON.parse(T8(K,"utf-8")),console.log(W.dim(" Using existing .nemar/metadata.json (author ORCIDs from prior run)"))}catch(N){console.log(W.yellow(` Warning: Could not read .nemar/metadata.json: ${N instanceof Error?N.message:N}. Will re-collect author information.`))}else if(DD(V))try{q=JSON.parse(T8(V,"utf-8")),console.log(W.dim(" Using existing nemar_metadata.json (author ORCIDs from prior run)"))}catch(N){console.log(W.yellow(` Warning: Could not read nemar_metadata.json: ${N instanceof Error?N.message:N}. Will re-collect author information.`))}if(!q&&!F.skipOrcid&&process.stdin.isTTY){let N=X.Authors,n=Array.isArray(N)?N.filter((h)=>typeof h==="string"):[];if(n.length>0)try{let h,P0;try{let V0=await tJ();h=V0.orcid||void 0,P0=V0.username}catch(V0){console.log(W.dim(` Could not fetch profile: ${w0(V0)}`))}console.log(),console.log(W.cyan("Authors found:"),n.join(" | "));let g={},J0;if(h&&P0){let V0=P0.toLowerCase(),BD=n.find((yD)=>yD.toLowerCase().includes(V0));if(BD)g[BD]={orcid:h},J0=BD,console.log(` Your ORCID (from profile): ${W.green(h)} (matched to "${BD}")`)}try{let{discoverOrcidsFromReferencedDois:V0}=await Promise.resolve().then(() => (ch(),dh)),BD=C("Looking up author ORCIDs from referenced publications...").start(),yD=await V0(X,g),W1=Object.keys(yD.discoveries).length;if(W1>0){BD.succeed(`Found ${W1} ORCID(s) from referenced DOIs`);for(let[e8,OD]of Object.entries(yD.discoveries))console.log(` ${W.green(OD.orcid)} -> "${e8}" (from ${OD.sourceDoi}, ${OD.confidence} match)`);let{confirmOrcids:yF}=await D0.prompt([{type:"confirm",name:"confirmOrcids",message:"Accept these auto-discovered ORCIDs?",default:!0}]);if(yF)for(let[e8,OD]of Object.entries(yD.discoveries))g[e8]={...g[e8],orcid:OD.orcid,...OD.affiliations&&{affiliations:OD.affiliations}}}else BD.info("No ORCIDs found from referenced DOIs")}catch(V0){console.log(W.yellow(` Could not auto-discover ORCIDs: ${w0(V0)}`))}for(let V0 of n){if(V0===J0)continue;if(g[V0]?.orcid)continue;let{orcid:BD}=await D0.prompt([{type:"input",name:"orcid",message:`ORCID for "${V0}" (Enter to skip):`,validate:(yD)=>{if(!yD)return!0;return sJ.test(yD)||"Invalid ORCID format (XXXX-XXXX-XXXX-XXXX)"}}]);if(BD){let yD={orcid:BD},{affiliation:W1}=await D0.prompt([{type:"input",name:"affiliation",message:` Affiliation for "${V0}" (optional):`}]);if(W1)yD.affiliations=[{name:W1}];g[V0]=yD}}if(Object.keys(g).length>0){q={version:"2.0",authors:g};try{let V0=YD(J,".nemar");if(!DD(V0))nh(V0,{recursive:!0});let BD=YD(V0,"metadata.json");d4(BD,JSON.stringify(q,null,2)),console.log(W.dim(" Saved .nemar/metadata.json with author ORCIDs"))}catch(V0){console.log(W.yellow(` Warning: Could not save .nemar/metadata.json: ${w0(V0)}`))}}console.log()}catch(h){if(h instanceof p)console.log(W.yellow(` Could not fetch profile: ${h.message}`));else console.log(W.yellow(` Could not collect ORCIDs: ${w0(h)}`));console.log(W.dim(" Continuing without author enrichment."))}}let E;if(process.stdin.isTTY&&!F.skipValidation){let N=Gh(J);if(N.spdxId){if(console.log(),console.log(W.cyan("License detected:"),W.bold(N.spdxId),W.dim(`(from ${N.source==="dataset_description"?"dataset_description.json":"LICENSE file"})`)),!Wh(N.spdxId))console.log(W.yellow(` Warning: "${N.spdxId}" is not in the list of known research-compatible licenses.`));let{keepLicense:h}=await D0.prompt([{type:"confirm",name:"keepLicense",message:`Use "${N.spdxId}" as the dataset license?`,default:!0}]);if(h)E=N.spdxId;else E=await RH(N.spdxId)}else{if(console.log(),N.source==="license_file")console.log(W.yellow("A LICENSE file was found but the license could not be identified automatically."));else console.log(W.yellow("No license found in this dataset."));console.log(W.dim("A license is required to publish on NEMAR.")),E=await RH()}try{let h=YD(J,"dataset_description.json");if(DD(h)){if(JSON.parse(T8(h,"utf-8")).License!==E)qh(J,E),console.log(W.dim(` Updated dataset_description.json License -> ${E}`))}}catch(h){console.log(W.yellow(` Warning: Could not update license in dataset_description.json: ${w0(h)}`))}if(Hh(J,E))console.log(W.dim(` Created LICENSE file (${E})`));console.log()}if(process.stdin.isTTY&&!F.skipValidation&&E){let N=await Rh(E);if(N.isDerived&&N.sourceDatasets&&N.sourceDatasets.length>0){try{let n=YD(J,"dataset_description.json");if(DD(n)){let h=JSON.parse(T8(n,"utf-8")),P0=Array.isArray(h.SourceDatasets)?h.SourceDatasets:[],g=N.sourceDatasets.map((V0)=>V0.identifier),J0=Array.from(new Set([...P0,...g]));h.SourceDatasets=J0,d4(n,`${JSON.stringify(h,null,2)}
561
- `),console.log(W.dim(` Updated dataset_description.json SourceDatasets (${J0.length} source(s))`))}}catch(n){console.log(W.yellow(` Warning: Could not update SourceDatasets: ${w0(n)}`))}console.log()}}let Z=AH(J);if(console.log(),Z)console.log(W.bold.yellow("Resume Upload:")),console.log(` Dataset ID: ${W.cyan(Z.dataset_id)}`),console.log(` Last attempt: ${Z.last_upload_at||Z.created_at}`);else console.log(W.bold("Upload Plan:"));if(console.log(` Name: ${G}`),console.log(` Path: ${J}`),console.log(` Files: ${H.files.length}`),console.log(` Size: ${XD(H.totalSize)}`),console.log(` Data files: ${H.dataFiles} (will be uploaded to S3)`),console.log(` Metadata files: ${H.metadataFiles} (will be stored in git)`),console.log(` Parallel jobs: ${F.jobs}`),console.log(),F.dryRun){console.log(W.yellow("Dry run mode - no changes made"));return}let L=await k0("Proceed with upload?",{yes:F.yes,no:F.no},!0);if(L!=="confirmed"){console.log(L==="declined"?"Upload skipped.":"Upload cancelled.");return}console.log();let A=H.files.filter((N)=>N.type==="data");if(F.restart)NQ(J),console.log(W.dim(" Upload progress cleared (--restart)")),console.log();let M=F.restart?null:Ph(J);if(M){let N=kh(M);if(console.log(W.bold.cyan("Upload Progress:")),console.log(` Files: ${N.uploaded}/${N.total} uploaded, ${N.failed} failed, ${N.pending} pending`),N.completedSteps.length>0)console.log(` Completed steps: ${N.completedSteps.join(", ")}`);console.log()}let O=M?Sh(M,A):A,w;if(Z!==null){Q=C(`Resuming upload for ${Z.dataset_id}...`).start();try{await uD(Z.dataset_id),w={dataset_id:Z.dataset_id,ssh_url:Z.ssh_url,s3_prefix:Z.s3_prefix,github_url:Z.github_url,upload_urls:{},s3_config:Z.s3_config},Q.succeed(`Resuming upload: ${w.dataset_id}`)}catch(N){if(Q.fail("Failed to resume upload"),N instanceof p){if(console.log(W.red(` ${N.message}`)),N.statusCode===404)console.log(W.yellow(" The dataset may have been deleted. Try uploading as a new dataset.")),console.log(W.dim(` Remove ${J}/.nemar to start fresh.`))}else console.log(W.red(` ${N.message}`));process.exit(1)}}else{Q=C("Creating dataset in NEMAR...").start();try{let N=await FQ({name:G,description:F.description,files:A.map((h)=>({path:h.path,size:h.size,type:h.type}))});w={dataset_id:N.dataset.dataset_id,ssh_url:N.dataset.ssh_url,s3_prefix:N.dataset.s3_prefix,github_url:N.dataset.github_url,upload_urls:N.upload_urls||{},s3_config:N.s3_config};let n={dataset_id:w.dataset_id,github_url:w.github_url,ssh_url:w.ssh_url,s3_prefix:w.s3_prefix,s3_config:w.s3_config,created_at:new Date().toISOString()};if(MH(J,n),N.resumed)Q.succeed(`Resumed existing dataset: ${w.dataset_id}`);else Q.succeed(`Dataset created: ${w.dataset_id}`),await new Promise((h)=>setTimeout(h,1e4))}catch(N){if(Q.fail("Failed to create dataset"),N instanceof p)console.log(W.red(` ${N.message}`));else console.log(W.red(` ${N.message}`));process.exit(1)}}if(M&&M.dataset_id!==w.dataset_id)console.log(W.yellow(" Progress file is for a different dataset; starting fresh.")),NQ(J),M=null;Q=C("Accepting GitHub repository invitation...").start();let R=w.github_url?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/),j=R?R[1].replace(/\.git$/,""):null;if(!j)Q.fail("Invalid GitHub repository URL from backend"),console.log(W.red(` Received: ${w.github_url||"(empty)"}`)),console.log(W.red(" Expected format: https://github.com/owner/repo")),console.log(),console.log("This may indicate a backend issue. Please contact support."),process.exit(1);let y=await x9(j);if(y.accepted)if(y.alreadyCollaborator)Q.succeed("Already a collaborator on this repository");else Q.succeed("GitHub invitation accepted");else Q.warn("Could not auto-accept invitation"),console.log(W.yellow(` ${y.error}`)),console.log(),console.log("You may need to accept the invitation manually:"),console.log(W.cyan(` https://github.com/${j}/invitations`)),console.log();Q=C("Initializing git-annex dataset...").start();let d=$.username&&$.email?{name:$.username,email:$.email}:void 0;if(!await w1(J)){let N=await n6(J,{author:d});if(!N.success)Q.fail("Failed to initialize git-annex dataset"),console.log(W.red(` ${N.error}`)),process.exit(1)}let F0=await fW(J);if(!F0.success)Q.fail("Failed to initialize git-annex"),console.log(W.red(` ${F0.error}`)),process.exit(1);let O0=await g4(J);if(!O0.success)Q.warn("Could not configure largefiles pattern"),console.log(W.dim(` ${O0.error}`));Q.succeed("git-annex dataset initialized");let e=await s8(J);if(e?.startsWith("adjusted/"))console.log(W.dim(` Note: Your local branch is "${e}".`)),console.log(W.dim(" This is normal; it keeps files unlocked so you can work with them directly.")),console.log(W.dim(' Pushes will go to the "main" branch on GitHub automatically.'));try{let N=YD(J,".gitignore"),n="";if(DD(N))n=T8(N,"utf-8");if(!n.includes(".nemar/")){let h=n?`${n.trimEnd()}
561
+ `),console.log(W.dim(` Updated dataset_description.json SourceDatasets (${J0.length} source(s))`))}}catch(n){console.log(W.yellow(` Warning: Could not update SourceDatasets: ${w0(n)}`))}console.log()}}let Z=AH(J);if(console.log(),Z)console.log(W.bold.yellow("Resume Upload:")),console.log(` Dataset ID: ${W.cyan(Z.dataset_id)}`),console.log(` Last attempt: ${Z.last_upload_at||Z.created_at}`);else console.log(W.bold("Upload Plan:"));if(console.log(` Name: ${G}`),console.log(` Path: ${J}`),console.log(` Files: ${H.files.length}`),console.log(` Size: ${XD(H.totalSize)}`),console.log(` Data files: ${H.dataFiles} (will be uploaded to S3)`),console.log(` Metadata files: ${H.metadataFiles} (will be stored in git)`),console.log(` Parallel jobs: ${F.jobs}`),console.log(),F.dryRun){console.log(W.yellow("Dry run mode - no changes made"));return}let L=await k0("Proceed with upload?",{yes:F.yes,no:F.no},!0);if(L!=="confirmed"){console.log(L==="declined"?"Upload skipped.":"Upload cancelled.");return}console.log();let A=H.files.filter((N)=>N.type==="data");if(F.restart)NQ(J),console.log(W.dim(" Upload progress cleared (--restart)")),console.log();let M=F.restart?null:Ph(J);if(M){let N=kh(M);if(console.log(W.bold.cyan("Upload Progress:")),console.log(` Files: ${N.uploaded}/${N.total} uploaded, ${N.failed} failed, ${N.pending} pending`),N.completedSteps.length>0)console.log(` Completed steps: ${N.completedSteps.join(", ")}`);console.log()}let R=M?Sh(M,A):A,w;if(Z!==null){Q=C(`Resuming upload for ${Z.dataset_id}...`).start();try{await uD(Z.dataset_id),w={dataset_id:Z.dataset_id,ssh_url:Z.ssh_url,s3_prefix:Z.s3_prefix,github_url:Z.github_url,upload_urls:{},s3_config:Z.s3_config},Q.succeed(`Resuming upload: ${w.dataset_id}`)}catch(N){if(Q.fail("Failed to resume upload"),N instanceof p){if(console.log(W.red(` ${N.message}`)),N.statusCode===404)console.log(W.yellow(" The dataset may have been deleted. Try uploading as a new dataset.")),console.log(W.dim(` Remove ${J}/.nemar to start fresh.`))}else console.log(W.red(` ${N.message}`));process.exit(1)}}else{Q=C("Creating dataset in NEMAR...").start();try{let N=await FQ({name:G,description:F.description,files:A.map((h)=>({path:h.path,size:h.size,type:h.type}))});w={dataset_id:N.dataset.dataset_id,ssh_url:N.dataset.ssh_url,s3_prefix:N.dataset.s3_prefix,github_url:N.dataset.github_url,upload_urls:N.upload_urls||{},s3_config:N.s3_config};let n={dataset_id:w.dataset_id,github_url:w.github_url,ssh_url:w.ssh_url,s3_prefix:w.s3_prefix,s3_config:w.s3_config,created_at:new Date().toISOString()};if(MH(J,n),N.resumed)Q.succeed(`Resumed existing dataset: ${w.dataset_id}`);else Q.succeed(`Dataset created: ${w.dataset_id}`),await new Promise((h)=>setTimeout(h,1e4))}catch(N){if(Q.fail("Failed to create dataset"),N instanceof p)console.log(W.red(` ${N.message}`));else console.log(W.red(` ${N.message}`));process.exit(1)}}if(M&&M.dataset_id!==w.dataset_id)console.log(W.yellow(" Progress file is for a different dataset; starting fresh.")),NQ(J),M=null;Q=C("Accepting GitHub repository invitation...").start();let O=w.github_url?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/),j=O?O[1].replace(/\.git$/,""):null;if(!j)Q.fail("Invalid GitHub repository URL from backend"),console.log(W.red(` Received: ${w.github_url||"(empty)"}`)),console.log(W.red(" Expected format: https://github.com/owner/repo")),console.log(),console.log("This may indicate a backend issue. Please contact support."),process.exit(1);let y=await x9(j);if(y.accepted)if(y.alreadyCollaborator)Q.succeed("Already a collaborator on this repository");else Q.succeed("GitHub invitation accepted");else Q.warn("Could not auto-accept invitation"),console.log(W.yellow(` ${y.error}`)),console.log(),console.log("You may need to accept the invitation manually:"),console.log(W.cyan(` https://github.com/${j}/invitations`)),console.log();Q=C("Initializing git-annex dataset...").start();let d=$.username&&$.email?{name:$.username,email:$.email}:void 0;if(!await w1(J)){let N=await n6(J,{author:d});if(!N.success)Q.fail("Failed to initialize git-annex dataset"),console.log(W.red(` ${N.error}`)),process.exit(1)}let F0=await fW(J);if(!F0.success)Q.fail("Failed to initialize git-annex"),console.log(W.red(` ${F0.error}`)),process.exit(1);let O0=await g4(J);if(!O0.success)Q.warn("Could not configure largefiles pattern"),console.log(W.dim(` ${O0.error}`));Q.succeed("git-annex dataset initialized");let e=await s8(J);if(e?.startsWith("adjusted/"))console.log(W.dim(` Note: Your local branch is "${e}".`)),console.log(W.dim(" This is normal; it keeps files unlocked so you can work with them directly.")),console.log(W.dim(' Pushes will go to the "main" branch on GitHub automatically.'));try{let N=YD(J,".gitignore"),n="";if(DD(N))n=T8(N,"utf-8");if(!n.includes(".nemar/")){let h=n?`${n.trimEnd()}
562
562
  .nemar/
563
563
  `:`.nemar/
564
- `;d4(N,h)}}catch(N){console.log(W.yellow(` Warning: Could not update .gitignore: ${w0(N)}`))}Q=C("Configuring GitHub remote...").start();let N0=await a8(J,w.ssh_url);if(!N0.success)Q.fail("Failed to configure GitHub remote"),console.log(W.red(` ${N0.error}`)),process.exit(1);if(Q.succeed("GitHub remote configured"),!await f9(J,{yes:F.yes}))process.exit(1);if(!M)M=jh(J,w.dataset_id,A);else{for(let N of A)if(!M.files[N.path])M.files[N.path]={status:"pending",size:N.size,updated_at:new Date().toISOString()};r1(J,M)}if(!vF(M,"s3_upload")){if(O.length>0){Q=C("Requesting upload credentials...").start();let N;try{N=await R8(w.dataset_id),Q.succeed("Upload credentials received (2h expiry)")}catch(g){Q.fail(`Could not get upload credentials: ${w0(g)}`),console.log(W.red(" Upload credentials are required for S3 access.")),console.log(W.dim(" Re-run the command to retry.")),process.exit(1)}Q=C("Configuring S3 remote...").start();let n=await O8(J,{name:"nemar-s3",bucket:N.s3.bucket,prefix:`${w.dataset_id}/objects`,region:N.s3.region,publicUrl:w.s3_config.public_url},CD(N.credentials));if(!n.success)Q.fail(`Failed to configure S3 remote: ${n.error}`),console.log(W.dim(" Re-run the command to retry.")),process.exit(1);Q.succeed("S3 remote configured"),Q=C("Tracking data files with git-annex...").start();let h=await i6(J);if(!h.success)Q.fail(`Failed to track data files: ${h.error}`),process.exit(1);Q.succeed("Data files tracked by git-annex"),Q=C(`Uploading ${O.length} data files to S3...`).start();let P0=await w8(J,"nemar-s3",Number.parseInt(F.jobs,10),CD(N.credentials));if(await kD(J),!P0.success)Q.fail(`S3 upload failed: ${P0.error}`),console.log(W.yellow("Re-run the same command to resume uploading.")),process.exit(1);for(let g of O)Ih(M,g.path);r1(J,M),Q.succeed(`Uploaded ${P0.filesCopied} data files to S3`)}else console.log(W.dim("No data files to upload to S3"));kF(M,"s3_upload"),r1(J,M)}else console.log(W.dim(" S3 upload already completed (skipping)"));if(!vF(M,"metadata_write")){if(q)try{let N=YD(J,".nemar"),n=YD(N,"metadata.json");if(!DD(n)){if(!DD(N))nh(N,{recursive:!0});d4(n,JSON.stringify(q,null,2))}let h=YD(J,".bidsignore"),P0="";if(DD(h))P0=T8(h,"utf-8");if(!P0.includes(".nemar/")){let g=P0?`${P0.trimEnd()}
564
+ `;d4(N,h)}}catch(N){console.log(W.yellow(` Warning: Could not update .gitignore: ${w0(N)}`))}Q=C("Configuring GitHub remote...").start();let N0=await a8(J,w.ssh_url);if(!N0.success)Q.fail("Failed to configure GitHub remote"),console.log(W.red(` ${N0.error}`)),process.exit(1);if(Q.succeed("GitHub remote configured"),!await f9(J,{yes:F.yes}))process.exit(1);if(!M)M=jh(J,w.dataset_id,A);else{for(let N of A)if(!M.files[N.path])M.files[N.path]={status:"pending",size:N.size,updated_at:new Date().toISOString()};r1(J,M)}if(!vF(M,"s3_upload")){if(R.length>0){Q=C("Requesting upload credentials...").start();let N;try{N=await R8(w.dataset_id),Q.succeed("Upload credentials received (2h expiry)")}catch(g){Q.fail(`Could not get upload credentials: ${w0(g)}`),console.log(W.red(" Upload credentials are required for S3 access.")),console.log(W.dim(" Re-run the command to retry.")),process.exit(1)}Q=C("Configuring S3 remote...").start();let n=await O8(J,{name:"nemar-s3",bucket:N.s3.bucket,prefix:`${w.dataset_id}/objects`,region:N.s3.region,publicUrl:w.s3_config.public_url},CD(N.credentials));if(!n.success)Q.fail(`Failed to configure S3 remote: ${n.error}`),console.log(W.dim(" Re-run the command to retry.")),process.exit(1);Q.succeed("S3 remote configured"),Q=C("Tracking data files with git-annex...").start();let h=await i6(J);if(!h.success)Q.fail(`Failed to track data files: ${h.error}`),process.exit(1);Q.succeed("Data files tracked by git-annex"),Q=C(`Uploading ${R.length} data files to S3...`).start();let P0=await w8(J,"nemar-s3",Number.parseInt(F.jobs,10),CD(N.credentials));if(await kD(J),!P0.success)Q.fail(`S3 upload failed: ${P0.error}`),console.log(W.yellow("Re-run the same command to resume uploading.")),process.exit(1);for(let g of R)Ih(M,g.path);r1(J,M),Q.succeed(`Uploaded ${P0.filesCopied} data files to S3`)}else console.log(W.dim("No data files to upload to S3"));kF(M,"s3_upload"),r1(J,M)}else console.log(W.dim(" S3 upload already completed (skipping)"));if(!vF(M,"metadata_write")){if(q)try{let N=YD(J,".nemar"),n=YD(N,"metadata.json");if(!DD(n)){if(!DD(N))nh(N,{recursive:!0});d4(n,JSON.stringify(q,null,2))}let h=YD(J,".bidsignore"),P0="";if(DD(h))P0=T8(h,"utf-8");if(!P0.includes(".nemar/")){let g=P0?`${P0.trimEnd()}
565
565
  .nemar/
566
566
  `:`.nemar/
567
567
  `;d4(h,g)}console.log(W.dim(" Updated .bidsignore for NEMAR metadata"))}catch(N){console.log(W.yellow(` Warning: Could not update .bidsignore: ${w0(N)}`)),console.log(W.dim(" Upload will continue without author enrichment."))}kF(M,"metadata_write"),r1(J,M)}else console.log(W.dim(" Metadata write already completed (skipping)"));if(!vF(M,"dataset_save")){Q=C("Saving dataset changes...").start();let N=await o8(J,"Initial NEMAR dataset upload",d);if(!N.success)r1(J,M),Q.fail("Failed to save dataset"),console.log(W.red(` ${N.error}`)),console.log(),console.log(W.yellow("Re-run the same command to resume from this step.")),process.exit(1);Q.succeed("Dataset changes saved"),kF(M,"dataset_save"),r1(J,M)}else console.log(W.dim(" Dataset save already completed (skipping)"));if(!vF(M,"github_push")){Q=C("Pushing metadata to GitHub...").start();let N=await o1(J);if(!N.success)r1(J,M),Q.fail("Failed to push to GitHub"),console.log(W.red(` ${N.error}`)),console.log(),console.log(W.yellow("Re-run the same command to resume from this step.")),process.exit(1);if(N.warning)Q.warn("Metadata pushed to GitHub (with warning)"),console.log(W.yellow(` ${N.warning}`));else Q.succeed("Metadata pushed to GitHub");kF(M,"github_push"),r1(J,M)}else console.log(W.dim(" GitHub push already completed (skipping)"));if(!vF(M,"ci_deploy")){Q=C("Setting up BIDS validation CI...").start();try{await f4(w.dataset_id),Q.succeed("BIDS validation CI configured")}catch(N){if(N instanceof p&&N.statusCode===403)Q.info("CI workflow will be configured by an admin");else{let n=N instanceof Error?N.message:String(N);Q.warn(`Could not configure CI: ${n}`),console.log(W.dim(` An admin can add it later with: nemar admin ci add ${w.dataset_id}`))}}kF(M,"ci_deploy"),r1(J,M)}else console.log(W.dim(" CI deploy already completed (skipping)"));NQ(J),Yh(J),console.log(),console.log(W.green.bold("Upload complete!")),console.log(),console.log(` Dataset ID: ${W.cyan(w.dataset_id)}`),console.log(` GitHub: ${W.cyan(w.github_url)}`),console.log(),console.log(W.dim("To download this dataset:")),console.log(W.dim(` nemar dataset download ${w.dataset_id}`)),console.log(),console.log(W.yellow("Note: This dataset is private. Only the owner and designated collaborators can")),console.log(W.yellow("download it, and only through the NEMAR CLI (not direct git-annex commands).")),console.log(W.yellow("After publishing, the data will be publicly available for everyone."))});function uV0(D,F,$,J){let Q=Math.round(D/F*100),Y=20,B=Math.round(Q/100*20);return`${`[${"=".repeat(B)}${" ".repeat(20-B)}]`} ${Q}% | ${D}/${F} files | ${XD($)} / ${XD(J)}`}async function mV0(D,F){if(console.log(),console.log(W.yellow("OpenNeuro Dataset")),console.log(W.yellow("This dataset will be downloaded as plain files from OpenNeuro's public S3 bucket.")),console.log(W.yellow("Unlike NEMAR datasets, there is no git-annex version tracking or selective file download.")),console.log(W.dim("For full version control, use DataLad directly:")),console.log(W.dim(` datalad install https://github.com/OpenNeuroDatasets/${D}`)),console.log(),F.data===!1)console.log(W.yellow("Note: --no-data is not supported for OpenNeuro downloads. Downloading all files.")),console.log();let $=F.output||D,J=YD($);if(DD(J))console.log(W.red(`Error: Output path already exists: ${J}`)),console.log("Remove or rename the existing directory and try again."),process.exit(1);let Q=await UQ(),Y=C(`Checking OpenNeuro for ${D}...`).start(),B;try{B=await Ah(D,Q)}catch(X){Y.fail(`Could not reach OpenNeuro: ${X.message}`),process.exit(1)}if(!B)Y.fail(`Dataset ${D} not found on OpenNeuro`),process.exit(1);if(Y.succeed(`Found ${D} on OpenNeuro`),Q){console.log(),console.log(W.bold("Download Plan:")),console.log(` Dataset: ${D} (OpenNeuro)`),console.log(` Output: ${J}`),console.log(" Method: AWS CLI (aws s3 sync)"),console.log(),console.log(W.bold("Downloading data files..."));let X=await Nh(D,J,(G)=>{process.stderr.write(`\r${W.cyan(` ${G} files downloaded`)}`)});if(process.stderr.write(`\r${" ".repeat(40)}\r`),!X.success)console.log(W.red(`Download failed: ${X.error}`)),process.exit(1);console.log(W.green(`Downloaded ${X.filesDownloaded} files`))}else{console.log(),console.log(W.yellow("AWS CLI not found. Using direct HTTPS download.")),console.log(W.yellow("This will be slower than AWS CLI. To install it:")),console.log(W.dim(" https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html")),console.log();let X=C("Listing dataset files...").start(),G;try{G=await Mh(D)}catch(V){X.fail(`Failed to list files: ${V.message}`),process.exit(1)}if(G.length===0)X.fail("No files found in dataset"),process.exit(1);let H=G.reduce((V,E)=>V+E.size,0);X.succeed(`${G.length} files (${XD(H)})`),console.log(W.bold("Download Plan:")),console.log(` Dataset: ${D} (OpenNeuro)`),console.log(` Output: ${J}`),console.log(" Method: HTTPS (direct download)"),console.log(` Files: ${G.length} (${XD(H)})`),console.log(),console.log(W.bold("Downloading data files..."));let q=Number.parseInt(F.jobs||"8",10),K=await Ch(D,J,G,{concurrency:q,onProgress:(V,E,Z,L)=>{process.stderr.write(`\r${W.cyan(uV0(V,E,Z,L))}`)}});if(process.stderr.write(`\r${" ".repeat(80)}\r`),!K.success){if(console.log(W.red(`
@@ -600,14 +600,14 @@ Examples:
600
600
  $ nemar dataset download nm000104 --tasks rest --datatypes eeg # Subset
601
601
  $ nemar dataset download nm000104 --stimuli # Also download stimuli/
602
602
  $ nemar dataset download nm000104 --stimuli --derivatives # Download everything
603
- $ nemar dataset download ds000248 # Download from OpenNeuro`).action(async(D,F)=>{let $=await lV0(D);if(!$){await mV0(D,F);return}if(F.resume&&F.update)console.log(W.red("Error: --resume and --update are mutually exclusive.")),process.exit(1);if(F.prune&&!F.update)console.log(W.red("Error: --prune requires --update.")),process.exit(1);let J=LQ({subjects:F.subjects,sessions:F.sessions,tasks:F.tasks,runs:F.runs,datatypes:F.datatypes,include:F.include,exclude:F.exclude,excludeStimuli:F.stimuli!==!0,excludeDerivatives:F.derivatives!==!0});if(J.active&&F.data===!1)console.log(W.red("Error: --no-data cannot be combined with BIDS filters (--subjects, --tasks, etc.). Filters imply data download.")),process.exit(1);await l4("download");let Q=C("Checking git-annex...").start(),Y=await jF();if(!Y.allPassed){Q.fail("Prerequisites check failed"),console.log();for(let O of Y.errors)console.log(W.red(` - ${O}`));process.exit(1)}Q.succeed(`git-annex ${Y.gitAnnex.version}`),Q=C(`Fetching dataset info for ${$}...`).start();let B;try{B=await uD($),Q.succeed(`Found dataset: ${B.name}`)}catch(O){if(Q.fail("Dataset not found"),O instanceof p)console.log(W.red(` ${O.message}`));else console.log(W.red(` ${O.message}`));process.exit(1)}if(!B.github_repo)console.log(W.red("Error: Dataset repository not available")),process.exit(1);let X=F.output||$,G=YD(X),H,q=F.resume?"resume":F.update?"update":null;if(q){if(!DD(G))console.log(W.red(`Error: --${q} target does not exist: ${G}`)),console.log(W.dim(`Drop --${q} to perform a fresh clone.`)),process.exit(1);if(Q=C(`Validating ${q} target...`).start(),!await w1(G))Q.fail("Not a git-annex dataset"),console.log(W.red(` ${G} is not a git-annex repository.`)),console.log(W.dim(`--${q} requires a previous clone of the same dataset.`)),process.exit(1);let O=await r8(G);if(O!==$)Q.fail("Dataset ID mismatch"),console.log(W.red(` Expected ${$}, but ${G} is a clone of ${O??"an unknown repo"}.`)),process.exit(1);let w=await aW(G);if(w.error)Q.fail("Could not check working tree status"),console.log(W.red(` ${w.error}`)),process.exit(1);if(w.dirty)Q.fail("Working tree is dirty"),console.log(W.red(` Refusing to ${q} with uncommitted local changes.`)),console.log(W.dim(" Commit, stash, or discard them first.")),process.exit(1);let k=await oW(G);if(!k.success)Q.fail("Failed to fetch remote refs"),console.log(W.red(` ${k.error}`)),process.exit(1);let R=cW(G);if(R.error)console.log(W.yellow(` Warning: ${R.error}`));let j=await nW(G);for(let W0 of j.warnings)console.log(W.yellow(` Warning: ${W0}`));let y=R.version,d=j.version;if(F.resume){if(y&&d&&y!==d)Q.fail("Local clone is behind upstream"),console.log(W.red(` Local version: ${y} | Remote HEAD: ${d}`)),console.log(W.dim(" Run `nemar dataset download <id> --update` to pull the version diff.")),process.exit(1);Q.succeed(`Resume target verified: ${$}`)}else{if(y&&d&&y===d)Q.succeed(`Already up to date (${y})`),process.exit(0);if(Q.succeed(`Update plan: ${y??"unknown"} \u2192 ${d??"HEAD"}`),y&&d){Q=C("Computing version diff from manifests...").start();try{let[e,N0]=await Promise.all([DQ($,y),DQ($,d)]),GD=Kh(e,N0);if(Q.succeed(`Diff: +${GD.added.length} added, ~${GD.changed.length} changed, -${GD.removed.length} removed`),H=[...GD.added,...GD.changed],H.length===0)console.log(W.dim(" No annex content changes between versions; metadata-only update."))}catch(e){let N0=e.message;if(Q.warn(`Manifest diff unavailable: ${N0}`),/401|403|unauthor/i.test(N0))console.log(W.yellow(" Looks like an auth issue. Run `nemar auth status` to verify."));else if(!/404|not found/i.test(N0))console.log(W.yellow(" Unexpected manifest error. Please report if this recurs."));console.log(W.dim(" Falling back to full git annex get (skips already-present files).")),H=void 0}}let W0=await s8(G);if(W0?.startsWith("adjusted/"))console.log(W.red(` --update is not supported on git-annex adjusted branches (${W0}).`)),console.log(W.dim(" Run `git -C <clone> annex sync` to bring the clone onto a normal branch first.")),process.exit(1);Q=C("Resolving remote tracking branch...").start();let F0=await iW(G);if(!F0.ref)Q.fail("Cannot resolve remote tracking branch"),console.log(W.red(` ${F0.error??"no upstream ref found"}`)),process.exit(1);Q.text=`Fast-forwarding to ${F0.ref}...`;let O0=await sW(G,F0.ref);if(!O0.success)Q.fail("Cannot fast-forward (local has diverging commits)"),console.log(W.red(` ${O0.error}`)),console.log(W.dim(" Use `nemar dataset update` (PR workflow) to push local changes first.")),process.exit(1);Q.succeed(`Merged ${F0.ref}`)}}else if(DD(G))console.log(W.red(`Error: Output path already exists: ${G}`)),console.log("Remove or rename the existing directory, or pass --resume / --update to reuse it."),process.exit(1);console.log();let K=F.update?"Update Plan:":F.resume?"Resume Plan:":"Download Plan:";if(console.log(W.bold(K)),console.log(` Dataset: ${B.name} (${$})`),console.log(` Output: ${G}`),console.log(` Data files: ${F.data===!1?"metadata only":"included"}`),F.data!==!1)console.log(` Parallel jobs: ${F.jobs}`);if(F.update&&H&&H.length>0)console.log(` Files to fetch: ${H.length}`);if(J.active)for(let O of J.summary)console.log(` Filter ${O}`);if(console.log(),!q){let O=`https://github.com/${B.github_repo}.git`;Q=C("Cloning metadata from GitHub...").start();let w=await s1(O,G);if(!w.success)Q.fail("Failed to clone dataset"),console.log(W.red(` ${w.error}`)),process.exit(1);Q.succeed("Metadata cloned")}let V=null;if(B.visibility!=="public"){Q=C("Requesting download credentials...").start();try{V=await JQ($),Q.succeed("Download credentials received (2h expiry)")}catch(O){Q.fail("Failed to get download credentials"),console.log(W.red(` ${O.message}`)),console.log(W.dim("Private datasets require authentication. Run 'nemar auth login' first.")),process.exit(1)}}let E=V?CD(V.credentials):void 0,Z=await h4(G,"nemar-s3",E);if(Z.enabled)console.log(W.dim(" S3 remote enabled for data downloads"));else if(!Z.success)console.log(W.yellow(` Warning: Could not enable S3 remote: ${Z.error}`));if(F.data===!1||F.update&&H&&H.length===0){if(F.data===!1)console.log(W.dim("Skipping data files (--no-data flag)"))}else{for(let j of J.summary)console.log(W.dim(` ${j}`));console.log(W.bold(`Downloading data files (${F.jobs} parallel streams)...`));let O=J.args.length>0?J.args:void 0,w=await GQ(G,void 0,O),k=new BQ(w?.fileCount??0,w?.totalBytes??0),R=await WQ(G,{jobs:Number.parseInt(F.jobs,10),credentials:E,paths:H,extraArgs:O,onProgress:(j)=>k.processLine(j)});if(!R.success){if(k.finish(0),console.log(W.red(`Failed to download data files: ${R.error}`)),console.log(W.dim("The dataset was cloned but data files are not available locally.")),console.log(W.dim(`You can try again with: cd ${G} && nemar dataset get`)),V)await kD(G);process.exit(1)}k.finish(R.filesDownloaded||0),console.log(W.green(`Data downloaded (${R.filesDownloaded||0} files)`))}if(F.update&&F.prune){Q=C("Pruning orphan annex objects...").start();let O=await rW(G);if(O.success)Q.succeed(`Pruned ${O.dropped??0} unused annex objects`);else Q.warn(`Prune skipped: ${O.error}`)}if(V)await kD(G);let A=await uW(G);console.log();let M=F.update?"Update complete!":F.resume?"Resume complete!":"Download complete!";if(console.log(W.green.bold(M)),console.log(),console.log(` Location: ${W.cyan(G)}`),A){if(console.log(` Files: ${A.files}`),A.size!=="unknown")console.log(` Size: ${A.size}`);if(A.missingFiles>0)console.log(W.dim(` Missing files: ${A.missingFiles} (use 'git annex get' to download)`))}if(console.log(),F.update)console.log(W.dim("Note: --update fetches only the version diff. If a prior version was")),console.log(W.dim("partially downloaded, run with --resume to fill any pre-existing gaps.")),console.log();console.log(W.dim("To get additional data:")),console.log(W.dim(` cd ${G} && git annex get <path>`))});FD.command("status").description("Check status of a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("--json","Output as JSON for scripting").addHelpText("after",`
603
+ $ nemar dataset download ds000248 # Download from OpenNeuro`).action(async(D,F)=>{let $=await lV0(D);if(!$){await mV0(D,F);return}if(F.resume&&F.update)console.log(W.red("Error: --resume and --update are mutually exclusive.")),process.exit(1);if(F.prune&&!F.update)console.log(W.red("Error: --prune requires --update.")),process.exit(1);let J=LQ({subjects:F.subjects,sessions:F.sessions,tasks:F.tasks,runs:F.runs,datatypes:F.datatypes,include:F.include,exclude:F.exclude,excludeStimuli:F.stimuli!==!0,excludeDerivatives:F.derivatives!==!0});if(J.active&&F.data===!1)console.log(W.red("Error: --no-data cannot be combined with BIDS filters (--subjects, --tasks, etc.). Filters imply data download.")),process.exit(1);await l4("download");let Q=C("Checking git-annex...").start(),Y=await jF();if(!Y.allPassed){Q.fail("Prerequisites check failed"),console.log();for(let R of Y.errors)console.log(W.red(` - ${R}`));process.exit(1)}Q.succeed(`git-annex ${Y.gitAnnex.version}`),Q=C(`Fetching dataset info for ${$}...`).start();let B;try{B=await uD($),Q.succeed(`Found dataset: ${B.name}`)}catch(R){if(Q.fail("Dataset not found"),R instanceof p)console.log(W.red(` ${R.message}`));else console.log(W.red(` ${R.message}`));process.exit(1)}if(!B.github_repo)console.log(W.red("Error: Dataset repository not available")),process.exit(1);let X=F.output||$,G=YD(X),H,q=F.resume?"resume":F.update?"update":null;if(q){if(!DD(G))console.log(W.red(`Error: --${q} target does not exist: ${G}`)),console.log(W.dim(`Drop --${q} to perform a fresh clone.`)),process.exit(1);if(Q=C(`Validating ${q} target...`).start(),!await w1(G))Q.fail("Not a git-annex dataset"),console.log(W.red(` ${G} is not a git-annex repository.`)),console.log(W.dim(`--${q} requires a previous clone of the same dataset.`)),process.exit(1);let R=await r8(G);if(R!==$)Q.fail("Dataset ID mismatch"),console.log(W.red(` Expected ${$}, but ${G} is a clone of ${R??"an unknown repo"}.`)),process.exit(1);let w=await aW(G);if(w.error)Q.fail("Could not check working tree status"),console.log(W.red(` ${w.error}`)),process.exit(1);if(w.dirty)Q.fail("Working tree is dirty"),console.log(W.red(` Refusing to ${q} with uncommitted local changes.`)),console.log(W.dim(" Commit, stash, or discard them first.")),process.exit(1);let k=await oW(G);if(!k.success)Q.fail("Failed to fetch remote refs"),console.log(W.red(` ${k.error}`)),process.exit(1);let O=cW(G);if(O.error)console.log(W.yellow(` Warning: ${O.error}`));let j=await nW(G);for(let W0 of j.warnings)console.log(W.yellow(` Warning: ${W0}`));let y=O.version,d=j.version;if(F.resume){if(y&&d&&y!==d)Q.fail("Local clone is behind upstream"),console.log(W.red(` Local version: ${y} | Remote HEAD: ${d}`)),console.log(W.dim(" Run `nemar dataset download <id> --update` to pull the version diff.")),process.exit(1);Q.succeed(`Resume target verified: ${$}`)}else{if(y&&d&&y===d)Q.succeed(`Already up to date (${y})`),process.exit(0);if(Q.succeed(`Update plan: ${y??"unknown"} \u2192 ${d??"HEAD"}`),y&&d){Q=C("Computing version diff from manifests...").start();try{let[e,N0]=await Promise.all([DQ($,y),DQ($,d)]),GD=Kh(e,N0);if(Q.succeed(`Diff: +${GD.added.length} added, ~${GD.changed.length} changed, -${GD.removed.length} removed`),H=[...GD.added,...GD.changed],H.length===0)console.log(W.dim(" No annex content changes between versions; metadata-only update."))}catch(e){let N0=e.message;if(Q.warn(`Manifest diff unavailable: ${N0}`),/401|403|unauthor/i.test(N0))console.log(W.yellow(" Looks like an auth issue. Run `nemar auth status` to verify."));else if(!/404|not found/i.test(N0))console.log(W.yellow(" Unexpected manifest error. Please report if this recurs."));console.log(W.dim(" Falling back to full git annex get (skips already-present files).")),H=void 0}}let W0=await s8(G);if(W0?.startsWith("adjusted/"))console.log(W.red(` --update is not supported on git-annex adjusted branches (${W0}).`)),console.log(W.dim(" Run `git -C <clone> annex sync` to bring the clone onto a normal branch first.")),process.exit(1);Q=C("Resolving remote tracking branch...").start();let F0=await iW(G);if(!F0.ref)Q.fail("Cannot resolve remote tracking branch"),console.log(W.red(` ${F0.error??"no upstream ref found"}`)),process.exit(1);Q.text=`Fast-forwarding to ${F0.ref}...`;let O0=await sW(G,F0.ref);if(!O0.success)Q.fail("Cannot fast-forward (local has diverging commits)"),console.log(W.red(` ${O0.error}`)),console.log(W.dim(" Use `nemar dataset update` (PR workflow) to push local changes first.")),process.exit(1);Q.succeed(`Merged ${F0.ref}`)}}else if(DD(G))console.log(W.red(`Error: Output path already exists: ${G}`)),console.log("Remove or rename the existing directory, or pass --resume / --update to reuse it."),process.exit(1);console.log();let K=F.update?"Update Plan:":F.resume?"Resume Plan:":"Download Plan:";if(console.log(W.bold(K)),console.log(` Dataset: ${B.name} (${$})`),console.log(` Output: ${G}`),console.log(` Data files: ${F.data===!1?"metadata only":"included"}`),F.data!==!1)console.log(` Parallel jobs: ${F.jobs}`);if(F.update&&H&&H.length>0)console.log(` Files to fetch: ${H.length}`);if(J.active)for(let R of J.summary)console.log(` Filter ${R}`);if(console.log(),!q){let R=`https://github.com/${B.github_repo}.git`;Q=C("Cloning metadata from GitHub...").start();let w=await s1(R,G);if(!w.success)Q.fail("Failed to clone dataset"),console.log(W.red(` ${w.error}`)),process.exit(1);Q.succeed("Metadata cloned")}let V=null;if(B.visibility!=="public"){Q=C("Requesting download credentials...").start();try{V=await JQ($),Q.succeed("Download credentials received (2h expiry)")}catch(R){Q.fail("Failed to get download credentials"),console.log(W.red(` ${R.message}`)),console.log(W.dim("Private datasets require authentication. Run 'nemar auth login' first.")),process.exit(1)}}let E=V?CD(V.credentials):void 0,Z=await h4(G,"nemar-s3",E);if(Z.enabled)console.log(W.dim(" S3 remote enabled for data downloads"));else if(!Z.success)console.log(W.yellow(` Warning: Could not enable S3 remote: ${Z.error}`));if(F.data===!1||F.update&&H&&H.length===0){if(F.data===!1)console.log(W.dim("Skipping data files (--no-data flag)"))}else{for(let j of J.summary)console.log(W.dim(` ${j}`));console.log(W.bold(`Downloading data files (${F.jobs} parallel streams)...`));let R=J.args.length>0?J.args:void 0,w=await GQ(G,void 0,R),k=new BQ(w?.fileCount??0,w?.totalBytes??0),O=await WQ(G,{jobs:Number.parseInt(F.jobs,10),credentials:E,paths:H,extraArgs:R,onProgress:(j)=>k.processLine(j)});if(!O.success){if(k.finish(0),console.log(W.red(`Failed to download data files: ${O.error}`)),console.log(W.dim("The dataset was cloned but data files are not available locally.")),console.log(W.dim(`You can try again with: cd ${G} && nemar dataset get`)),V)await kD(G);process.exit(1)}k.finish(O.filesDownloaded||0),console.log(W.green(`Data downloaded (${O.filesDownloaded||0} files)`))}if(F.update&&F.prune){Q=C("Pruning orphan annex objects...").start();let R=await rW(G);if(R.success)Q.succeed(`Pruned ${R.dropped??0} unused annex objects`);else Q.warn(`Prune skipped: ${R.error}`)}if(V)await kD(G);let A=await uW(G);console.log();let M=F.update?"Update complete!":F.resume?"Resume complete!":"Download complete!";if(console.log(W.green.bold(M)),console.log(),console.log(` Location: ${W.cyan(G)}`),A){if(console.log(` Files: ${A.files}`),A.size!=="unknown")console.log(` Size: ${A.size}`);if(A.missingFiles>0)console.log(W.dim(` Missing files: ${A.missingFiles} (use 'git annex get' to download)`))}if(console.log(),F.update)console.log(W.dim("Note: --update fetches only the version diff. If a prior version was")),console.log(W.dim("partially downloaded, run with --resume to fill any pre-existing gaps.")),console.log();console.log(W.dim("To get additional data:")),console.log(W.dim(` cd ${G} && git annex get <path>`))});FD.command("status").description("Check status of a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").option("--json","Output as JSON for scripting").addHelpText("after",`
604
604
  Description:
605
605
  Show detailed information about a NEMAR dataset including owner,
606
606
  creation date, GitHub repository, and DOI information.
607
607
 
608
608
  Examples:
609
609
  $ nemar dataset status nm000104
610
- $ nemar dataset status nm000104 --json | jq '.concept_doi'`).action(async(D,F)=>{let $=C(`Fetching dataset info for ${D}...`).start(),J;try{J=await uD(D),$.stop()}catch(Q){if($.fail("Dataset not found"),Q instanceof p)console.log(W.red(` ${Q.message}`));else console.log(W.red(` ${Q.message}`));process.exit(1)}if(F.json){console.log(JSON.stringify(J,null,2));return}if(console.log(),console.log(W.bold(`Dataset: ${J.dataset_id}`)),console.log(),console.log(` Name: ${J.name}`),console.log(` Owner: ${J.owner_username}`),console.log(` Status: ${pV0(J.status)}`),console.log(` Created: ${new Date(J.created_at).toLocaleDateString()}`),J.description)console.log(` Description: ${J.description}`);if(J.github_repo)console.log(` GitHub: https://github.com/${J.github_repo}`);if(J.concept_doi)console.log(` DOI: https://doi.org/${J.concept_doi}`);console.log(),console.log(W.dim("To download this dataset:")),console.log(W.dim(` nemar dataset download ${D}`))});async function lV0(D){if(!Lh(D))return D;let F=null;try{F=await xf(D)}catch(J){return console.log(W.dim(`Could not check NEMAR availability: ${J.message}`)),null}if(!F?.found||!F.dataset_id)return null;console.log(),console.log(W.green(`This dataset is available on NEMAR as ${W.bold(F.dataset_id)}`)),console.log(W.dim("NEMAR provides git-annex version tracking and selective file download."));let{useNemarBackend:$}=await D0.prompt([{type:"confirm",name:"useNemarBackend",message:`Download from NEMAR (${F.dataset_id}) instead of OpenNeuro?`,default:!0}]);return $?F.dataset_id:null}function pV0(D){switch(D.toLowerCase()){case"published":return W.green(D);case"active":return W.blue(D);case"archived":return W.dim(D);case"pending":return W.yellow(D);default:return D}}function dV0(D,F){let{offset:$,totalCount:J}=F,Q=$+1,Y=$+D.length,B=J>D.length?`${Q}-${Y} of ${J}`:`${J}`;console.log(),console.log(W.bold(`Datasets (${B}):`)),console.log();let X=(Z)=>Z.dataset_id||Z.id||"",G=Math.max(10,...D.map((Z)=>X(Z).length)),H=Math.min(30,Math.max(10,...D.map((Z)=>Z.name.length))),q=10,K=8,V=Math.max(8,...D.map((Z)=>(Z.owner_username||"-").length)),E=["ID".padEnd(G),"Name".padEnd(H),"Modality".padEnd(q),"Subj".padEnd(K),"Owner".padEnd(V),"Status"].join(" ");console.log(W.dim(E)),console.log(W.dim("-".repeat(E.length)));for(let Z of D){let L=X(Z),A=Z.name.length>H?`${Z.name.substring(0,H-3)}...`:Z.name,M=(Z.modalities||"").substring(0,q),O=Z.participants?String(Z.participants):"-",w=Z.owner_username||"-",k="";if(Z.source_type==="managed"&&!Z.nemar_sync_status)k=W.yellow("*");else if(Z.source_type==="managed"&&Z.nemar_sync_status==="failed")k=W.red("!");let R=Z.visibility==="public"?W.green("pub"):W.yellow("prv"),j;if(Z.source_type==="catalog")j=W.dim(L.padEnd(G));else j=W.cyan(L.padEnd(G));let y=Z.source_type==="catalog"?W.dim(A):A,d=[j,y.padEnd(H+(Z.source_type==="catalog"?W.dim("").length:0)),M.padEnd(q),O.padEnd(K),w.padEnd(V),`${R} ${k}`.trim()].join(" ");console.log(d)}if(console.log(),J>Y){let Z=Math.floor($/F.limit)+1,L=Math.ceil(J/F.limit);console.log(W.dim(`Page ${Z}/${L}. Next: nemar dataset list --page ${Z+1}`))}console.log(W.dim(` * = not synced to nemar.org ${W.dim("dim")} = catalog-only (not on GitHub)`)),console.log(W.dim("For details: nemar dataset status <dataset-id>")),console.log(W.dim("Search: nemar dataset search <query>"))}FD.command("list").description("List datasets on NEMAR (full catalog)").option("--mine","List only your datasets (both private and public)").option("--owner <username>","List datasets owned by a specific user").option("--search <query>","Search by name, description, authors, or tasks").option("--modality <type>","Filter by modality (eeg, emg, meg, etc.)").option("--author <name>","Filter by author name").option("--task <name>","Filter by task name").option("--doi","Show only datasets with DOIs").option("--recent [days]","Show recently published datasets").option("--sort <order>","Sort: newest, oldest, name, participants, size","newest").option("--json","Output as JSON for scripting").option("-n, --limit <n>","Results per page (default: 20, max: 200)","20").option("--page <n>","Page number (starts at 1)").option("--offset <n>","Skip this many results (alternative to --page)").option("--all","Show all results (up to 200)").addHelpText("after",`
610
+ $ nemar dataset status nm000104 --json | jq '.concept_doi'`).action(async(D,F)=>{let $=C(`Fetching dataset info for ${D}...`).start(),J;try{J=await uD(D),$.stop()}catch(Q){if($.fail("Dataset not found"),Q instanceof p)console.log(W.red(` ${Q.message}`));else console.log(W.red(` ${Q.message}`));process.exit(1)}if(F.json){console.log(JSON.stringify(J,null,2));return}if(console.log(),console.log(W.bold(`Dataset: ${J.dataset_id}`)),console.log(),console.log(` Name: ${J.name}`),console.log(` Owner: ${J.owner_username}`),console.log(` Status: ${pV0(J.status)}`),console.log(` Created: ${new Date(J.created_at).toLocaleDateString()}`),J.description)console.log(` Description: ${J.description}`);if(J.github_repo)console.log(` GitHub: https://github.com/${J.github_repo}`);if(J.concept_doi)console.log(` DOI: https://doi.org/${J.concept_doi}`);console.log(),console.log(W.dim("To download this dataset:")),console.log(W.dim(` nemar dataset download ${D}`))});async function lV0(D){if(!Lh(D))return D;let F=null;try{F=await xf(D)}catch(J){return console.log(W.dim(`Could not check NEMAR availability: ${J.message}`)),null}if(!F?.found||!F.dataset_id)return null;console.log(),console.log(W.green(`This dataset is available on NEMAR as ${W.bold(F.dataset_id)}`)),console.log(W.dim("NEMAR provides git-annex version tracking and selective file download."));let{useNemarBackend:$}=await D0.prompt([{type:"confirm",name:"useNemarBackend",message:`Download from NEMAR (${F.dataset_id}) instead of OpenNeuro?`,default:!0}]);return $?F.dataset_id:null}function pV0(D){switch(D.toLowerCase()){case"published":return W.green(D);case"active":return W.blue(D);case"archived":return W.dim(D);case"pending":return W.yellow(D);default:return D}}function dV0(D,F){let{offset:$,totalCount:J}=F,Q=$+1,Y=$+D.length,B=J>D.length?`${Q}-${Y} of ${J}`:`${J}`;console.log(),console.log(W.bold(`Datasets (${B}):`)),console.log();let X=(Z)=>Z.dataset_id||Z.id||"",G=Math.max(10,...D.map((Z)=>X(Z).length)),H=Math.min(30,Math.max(10,...D.map((Z)=>Z.name.length))),q=10,K=8,V=Math.max(8,...D.map((Z)=>(Z.owner_username||"-").length)),E=["ID".padEnd(G),"Name".padEnd(H),"Modality".padEnd(q),"Subj".padEnd(K),"Owner".padEnd(V),"Status"].join(" ");console.log(W.dim(E)),console.log(W.dim("-".repeat(E.length)));for(let Z of D){let L=X(Z),A=Z.name.length>H?`${Z.name.substring(0,H-3)}...`:Z.name,M=(Z.modalities||"").substring(0,q),R=Z.participants?String(Z.participants):"-",w=Z.owner_username||"-",k="";if(Z.source_type==="managed"&&!Z.nemar_sync_status)k=W.yellow("*");else if(Z.source_type==="managed"&&Z.nemar_sync_status==="failed")k=W.red("!");let O=Z.visibility==="public"?W.green("pub"):W.yellow("prv"),j;if(Z.source_type==="catalog")j=W.dim(L.padEnd(G));else j=W.cyan(L.padEnd(G));let y=Z.source_type==="catalog"?W.dim(A):A,d=[j,y.padEnd(H+(Z.source_type==="catalog"?W.dim("").length:0)),M.padEnd(q),R.padEnd(K),w.padEnd(V),`${O} ${k}`.trim()].join(" ");console.log(d)}if(console.log(),J>Y){let Z=Math.floor($/F.limit)+1,L=Math.ceil(J/F.limit);console.log(W.dim(`Page ${Z}/${L}. Next: nemar dataset list --page ${Z+1}`))}console.log(W.dim(` * = not synced to nemar.org ${W.dim("dim")} = catalog-only (not on GitHub)`)),console.log(W.dim("For details: nemar dataset status <dataset-id>")),console.log(W.dim("Search: nemar dataset search <query>"))}FD.command("list").description("List datasets on NEMAR (full catalog)").option("--mine","List only your datasets (both private and public)").option("--owner <username>","List datasets owned by a specific user").option("--search <query>","Search by name, description, authors, or tasks").option("--modality <type>","Filter by modality (eeg, emg, meg, etc.)").option("--author <name>","Filter by author name").option("--task <name>","Filter by task name").option("--doi","Show only datasets with DOIs").option("--recent [days]","Show recently published datasets").option("--sort <order>","Sort: newest, oldest, name, participants, size","newest").option("--json","Output as JSON for scripting").option("-n, --limit <n>","Results per page (default: 20, max: 200)","20").option("--page <n>","Page number (starts at 1)").option("--offset <n>","Skip this many results (alternative to --page)").option("--all","Show all results (up to 200)").addHelpText("after",`
611
611
  Description:
612
612
  Lists the full NEMAR catalog, including legacy datasets from nemar.org
613
613
  and datasets managed via nemar-cli. Shows 20 results per page by default.
@@ -659,14 +659,14 @@ Description:
659
659
  Examples:
660
660
  $ nemar dataset release nm000104 --type patch
661
661
  $ nemar dataset release nm000104 --version 2.0.0
662
- $ nemar dataset release nm000104 # interactive prompt`).action(async(D,F)=>{if(!L0())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);await l4("release");let $=C("Fetching dataset info...").start(),J;try{J=await uD(D),$.succeed(`Dataset: ${J.name||D}`)}catch(R){if(R instanceof p)$.fail(R.message);else $.fail("Failed to fetch dataset");process.exit(1)}if(!J.github_repo)console.log(W.red("Error: Dataset has no GitHub repository")),process.exit(1);let Q;try{let R=await ff(D);if(Q=R.current_version,console.log(` Current version: ${W.cyan(Q)}`),R.versions.length>0){console.log(` Version DOIs: ${R.versions.length}`);for(let j of R.versions.slice(0,3))console.log(` ${j.version} - ${W.dim(j.doi)}`);if(R.versions.length>3)console.log(W.dim(` ... and ${R.versions.length-3} more`))}}catch(R){let j=R instanceof p?`${R.statusCode}: ${R.message}`:String(R);console.log(W.red(`Error: Could not fetch version history (${j})`)),console.log(" Cannot determine current version. Ensure the backend is reachable."),process.exit(1)}let Y;if(F.version){if(!jH(F.version))console.log(W.red(`Error: Invalid version: ${F.version}`)),console.log(" Expected format: X.Y.Z (e.g., 2.0.0)"),process.exit(1);Y=F.version.replace(/^v/,"")}else if(F.type){let R=F.type;if(!["patch","minor","major"].includes(R))console.log(W.red(`Error: Invalid bump type: ${F.type}`)),console.log(" Expected: patch, minor, or major"),process.exit(1);Y=p4(Q,R)}else{if(!SF(Q))console.log(W.red(`Error: Cannot parse current version: ${Q}`)),process.exit(1);let j=[{name:`patch ${Q} -> ${p4(Q,"patch")}`,value:"patch"},{name:`minor ${Q} -> ${p4(Q,"minor")}`,value:"minor"},{name:`major ${Q} -> ${p4(Q,"major")}`,value:"major"},{name:"custom version",value:"custom"}],{bumpType:y}=await D0.prompt([{type:"list",name:"bumpType",message:"Select version bump type:",choices:j}]);if(y==="custom"){let{customVersion:d}=await D0.prompt([{type:"input",name:"customVersion",message:"Enter version (X.Y.Z):",validate:(W0)=>jH(W0)||"Invalid format. Use X.Y.Z (e.g., 2.0.0)"}]);Y=d.replace(/^v/,"")}else Y=p4(Q,y)}if(console.log(),console.log(` ${W.bold("Version bump:")} ${Q} -> ${W.green(Y)}`),await k0(`Create release PR for ${D} v${Y}?`,{yes:F.yes})!=="confirmed"){console.log("Cancelled.");return}let X,G=!0;if(F.dir){if(!DD(F.dir))console.log(W.red(`Error: Directory not found: ${F.dir}`)),process.exit(1);X=YD(F.dir),G=!1}else X=fV0(p9(gV0(),`nemar-release-${D}-`));if(G){let R=`https://github.com/${J.github_repo}.git`,j=C("Cloning dataset...").start(),y=await s1(R,X);if(!y.success)j.fail(`Clone failed: ${y.error}`),process.exit(1);j.succeed("Cloned dataset")}let H=`release/v${Y}`,q=C("Creating release branch...").start(),K=RD({cmd:["git","checkout","-b",H],cwd:X,stdout:"pipe",stderr:"pipe"});if(await K.exited!==0){let R=await new Response(K.stderr).text();q.fail(`Failed to create branch: ${R.trim()}`),process.exit(1)}q.succeed(`Created branch: ${H}`);let V=p9(X,"dataset_description.json");if(!DD(V))console.log(W.red("Error: dataset_description.json not found in repo")),process.exit(1);let E;try{E=JSON.parse(T8(V,"utf-8"))}catch(R){if(R instanceof SyntaxError)console.log(W.red("Error: dataset_description.json contains invalid JSON"));else console.log(W.red(`Error: Could not read dataset_description.json: ${R}`));process.exit(1)}E.Version=Y,d4(V,`${JSON.stringify(E,null,2)}
663
- `);let Z=C("Committing version bump...").start(),L=RD({cmd:["git","add","dataset_description.json"],cwd:X,stdout:"pipe",stderr:"pipe"});if(await L.exited!==0){let R=await new Response(L.stderr).text();Z.fail(`Failed to stage changes: ${R.trim()}`),process.exit(1)}let A=RD({cmd:["git","commit","-m",`Bump version to ${Y}`],cwd:X,stdout:"pipe",stderr:"pipe"});if(await A.exited!==0){let R=await new Response(A.stderr).text();Z.fail(`Commit failed: ${R.trim()}`),process.exit(1)}Z.succeed("Committed version bump");let M=C("Pushing branch...").start(),O=await PF(X,H);if(!O.success)M.fail(`Push failed: ${O.error}`),process.exit(1);M.succeed("Pushed branch");let w=!1,k=C("Creating pull request...").start();try{let R=`Release v${Y}`,j=`## Version Bump
662
+ $ nemar dataset release nm000104 # interactive prompt`).action(async(D,F)=>{if(!L0())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);await l4("release");let $=C("Fetching dataset info...").start(),J;try{J=await uD(D),$.succeed(`Dataset: ${J.name||D}`)}catch(O){if(O instanceof p)$.fail(O.message);else $.fail("Failed to fetch dataset");process.exit(1)}if(!J.github_repo)console.log(W.red("Error: Dataset has no GitHub repository")),process.exit(1);let Q;try{let O=await ff(D);if(Q=O.current_version,console.log(` Current version: ${W.cyan(Q)}`),O.versions.length>0){console.log(` Version DOIs: ${O.versions.length}`);for(let j of O.versions.slice(0,3))console.log(` ${j.version} - ${W.dim(j.doi)}`);if(O.versions.length>3)console.log(W.dim(` ... and ${O.versions.length-3} more`))}}catch(O){let j=O instanceof p?`${O.statusCode}: ${O.message}`:String(O);console.log(W.red(`Error: Could not fetch version history (${j})`)),console.log(" Cannot determine current version. Ensure the backend is reachable."),process.exit(1)}let Y;if(F.version){if(!jH(F.version))console.log(W.red(`Error: Invalid version: ${F.version}`)),console.log(" Expected format: X.Y.Z (e.g., 2.0.0)"),process.exit(1);Y=F.version.replace(/^v/,"")}else if(F.type){let O=F.type;if(!["patch","minor","major"].includes(O))console.log(W.red(`Error: Invalid bump type: ${F.type}`)),console.log(" Expected: patch, minor, or major"),process.exit(1);Y=p4(Q,O)}else{if(!SF(Q))console.log(W.red(`Error: Cannot parse current version: ${Q}`)),process.exit(1);let j=[{name:`patch ${Q} -> ${p4(Q,"patch")}`,value:"patch"},{name:`minor ${Q} -> ${p4(Q,"minor")}`,value:"minor"},{name:`major ${Q} -> ${p4(Q,"major")}`,value:"major"},{name:"custom version",value:"custom"}],{bumpType:y}=await D0.prompt([{type:"list",name:"bumpType",message:"Select version bump type:",choices:j}]);if(y==="custom"){let{customVersion:d}=await D0.prompt([{type:"input",name:"customVersion",message:"Enter version (X.Y.Z):",validate:(W0)=>jH(W0)||"Invalid format. Use X.Y.Z (e.g., 2.0.0)"}]);Y=d.replace(/^v/,"")}else Y=p4(Q,y)}if(console.log(),console.log(` ${W.bold("Version bump:")} ${Q} -> ${W.green(Y)}`),await k0(`Create release PR for ${D} v${Y}?`,{yes:F.yes})!=="confirmed"){console.log("Cancelled.");return}let X,G=!0;if(F.dir){if(!DD(F.dir))console.log(W.red(`Error: Directory not found: ${F.dir}`)),process.exit(1);X=YD(F.dir),G=!1}else X=fV0(p9(gV0(),`nemar-release-${D}-`));if(G){let O=`https://github.com/${J.github_repo}.git`,j=C("Cloning dataset...").start(),y=await s1(O,X);if(!y.success)j.fail(`Clone failed: ${y.error}`),process.exit(1);j.succeed("Cloned dataset")}let H=`release/v${Y}`,q=C("Creating release branch...").start(),K=RD({cmd:["git","checkout","-b",H],cwd:X,stdout:"pipe",stderr:"pipe"});if(await K.exited!==0){let O=await new Response(K.stderr).text();q.fail(`Failed to create branch: ${O.trim()}`),process.exit(1)}q.succeed(`Created branch: ${H}`);let V=p9(X,"dataset_description.json");if(!DD(V))console.log(W.red("Error: dataset_description.json not found in repo")),process.exit(1);let E;try{E=JSON.parse(T8(V,"utf-8"))}catch(O){if(O instanceof SyntaxError)console.log(W.red("Error: dataset_description.json contains invalid JSON"));else console.log(W.red(`Error: Could not read dataset_description.json: ${O}`));process.exit(1)}E.Version=Y,d4(V,`${JSON.stringify(E,null,2)}
663
+ `);let Z=C("Committing version bump...").start(),L=RD({cmd:["git","add","dataset_description.json"],cwd:X,stdout:"pipe",stderr:"pipe"});if(await L.exited!==0){let O=await new Response(L.stderr).text();Z.fail(`Failed to stage changes: ${O.trim()}`),process.exit(1)}let A=RD({cmd:["git","commit","-m",`Bump version to ${Y}`],cwd:X,stdout:"pipe",stderr:"pipe"});if(await A.exited!==0){let O=await new Response(A.stderr).text();Z.fail(`Commit failed: ${O.trim()}`),process.exit(1)}Z.succeed("Committed version bump");let M=C("Pushing branch...").start(),R=await PF(X,H);if(!R.success)M.fail(`Push failed: ${R.error}`),process.exit(1);M.succeed("Pushed branch");let w=!1,k=C("Creating pull request...").start();try{let O=`Release v${Y}`,j=`## Version Bump
664
664
 
665
665
  Bumps ${D} from ${Q} to ${Y}.
666
666
 
667
667
  On merge, CI will:
668
668
  - Tag the release (v${Y})
669
- - Publish a version DOI (if concept DOI exists)`,y=RD({cmd:["gh","pr","create","--repo",J.github_repo,"--head",H,"--base","main","--title",R,"--body",j],cwd:X,stdout:"pipe",stderr:"pipe"}),d=(await new Response(y.stdout).text()).trim();if(await y.exited!==0){let W0=await new Response(y.stderr).text();throw Error(W0.trim()||"gh pr create failed")}w=!0,k.succeed("Created pull request"),console.log(),console.log(` ${W.cyan("PR:")} ${d}`)}catch(R){k.fail("Failed to create PR");let j=R instanceof Error?R.message:String(R);if(console.log(W.red(` ${j}`)),j.includes("not found")||j.includes("command not found"))console.log(W.yellow(" Install: brew install gh"));else if(j.includes("auth")||j.includes("401"))console.log(W.yellow(" Run: gh auth login"));console.log(W.dim(` Branch ${H} has been pushed. Create the PR manually.`))}if(F.monitor&&w){console.log(),console.log(W.dim("Monitoring CI checks...")),console.log(W.dim(" Press Ctrl+C to stop monitoring"));let R=0,j=60;while(R<j){await new Promise((F0)=>setTimeout(F0,1e4)),R++;let y=RD({cmd:["gh","pr","checks","--repo",J.github_repo,H],cwd:X,stdout:"pipe",stderr:"pipe"}),d=await new Response(y.stdout).text();if(await y.exited===0){if(console.log(W.green(" All checks passed!")),await k0("Merge the PR?",{yes:F.yes})==="confirmed"){let O0=RD({cmd:["gh","pr","merge","--repo",J.github_repo,H,"--squash","--delete-branch"],cwd:X,stdout:"pipe",stderr:"pipe"});if(await O0.exited===0)console.log(W.green(" PR merged successfully!"));else{let N0=await new Response(O0.stderr).text();console.log(W.red(` Merge failed: ${N0.trim()}`))}}break}if(d.includes("fail")||d.includes("X")){console.log(W.red(" Some checks failed:")),console.log(d);break}process.stdout.write(W.dim("."))}if(R>=j)console.log(W.yellow(`
669
+ - Publish a version DOI (if concept DOI exists)`,y=RD({cmd:["gh","pr","create","--repo",J.github_repo,"--head",H,"--base","main","--title",O,"--body",j],cwd:X,stdout:"pipe",stderr:"pipe"}),d=(await new Response(y.stdout).text()).trim();if(await y.exited!==0){let W0=await new Response(y.stderr).text();throw Error(W0.trim()||"gh pr create failed")}w=!0,k.succeed("Created pull request"),console.log(),console.log(` ${W.cyan("PR:")} ${d}`)}catch(O){k.fail("Failed to create PR");let j=O instanceof Error?O.message:String(O);if(console.log(W.red(` ${j}`)),j.includes("not found")||j.includes("command not found"))console.log(W.yellow(" Install: brew install gh"));else if(j.includes("auth")||j.includes("401"))console.log(W.yellow(" Run: gh auth login"));console.log(W.dim(` Branch ${H} has been pushed. Create the PR manually.`))}if(F.monitor&&w){console.log(),console.log(W.dim("Monitoring CI checks...")),console.log(W.dim(" Press Ctrl+C to stop monitoring"));let O=0,j=60;while(O<j){await new Promise((F0)=>setTimeout(F0,1e4)),O++;let y=RD({cmd:["gh","pr","checks","--repo",J.github_repo,H],cwd:X,stdout:"pipe",stderr:"pipe"}),d=await new Response(y.stdout).text();if(await y.exited===0){if(console.log(W.green(" All checks passed!")),await k0("Merge the PR?",{yes:F.yes})==="confirmed"){let O0=RD({cmd:["gh","pr","merge","--repo",J.github_repo,H,"--squash","--delete-branch"],cwd:X,stdout:"pipe",stderr:"pipe"});if(await O0.exited===0)console.log(W.green(" PR merged successfully!"));else{let N0=await new Response(O0.stderr).text();console.log(W.red(` Merge failed: ${N0.trim()}`))}}break}if(d.includes("fail")||d.includes("X")){console.log(W.red(" Some checks failed:")),console.log(d);break}process.stdout.write(W.dim("."))}if(O>=j)console.log(W.yellow(`
670
670
  Timed out waiting for checks.`))}if(G)console.log(),console.log(W.dim(`Working directory: ${X}`)),console.log(W.dim("You can delete this directory after the PR is merged."))});FD.command("update").description("Push local changes to a dataset via PR").argument("[path]","Path to local dataset clone (default: current directory)").option("--bump <type>","Version bump type: patch, minor, or major","patch").option("--branch <name>","Custom branch name").option("-m, --message <msg>","Commit message").option("--monitor","Watch CI checks and offer to merge").option(T0,j0).addHelpText("after",`
671
671
  Description:
672
672
  Push local changes (metadata or data files) to a dataset via a pull
@@ -684,15 +684,15 @@ Examples:
684
684
  $ cd nm000104 && nemar dataset update
685
685
  $ nemar dataset update ./nm000104 --bump minor -m "Add new subjects"
686
686
  $ nemar dataset update --branch fix/metadata -m "Fix participant ages"`).action(async(D,F)=>{if(!L0())console.log(W.red("Error: Not authenticated")),console.log("Run 'nemar auth login' first"),process.exit(1);await l4("update");let $=YD(D||".");if(!DD(p9($,".git")))console.log(W.red("Error: Not a git repository")),console.log(" Run this from inside a dataset clone, or pass the path."),process.exit(1);let J=await r8($);if(!J)console.log(W.red("Error: Could not detect dataset ID from git remote")),process.exit(1);console.log(` Dataset: ${W.cyan(J)}`);let Q=await s8($);if(Q!=="main"){if(console.log(W.yellow(`Warning: Currently on branch '${Q}', expected 'main'`)),await k0("Continue anyway?",{yes:F.yes})!=="confirmed"){console.log("Cancelled.");return}}let Y=RD({cmd:["git","status","--porcelain"],cwd:$,stdout:"pipe",stderr:"pipe"}),B=(await new Response(Y.stdout).text()).trim();if(await Y.exited!==0)console.log(W.red("Error: Failed to check git status")),process.exit(1);if(!B){console.log(W.yellow("No changes detected.")),console.log(" Make changes to the dataset files, then run this command again.");return}let X=B.split(`
687
- `),G=[],H=[];for(let N of X){let n=N.substring(3).trim();if(/\.(edf|bdf|set|fdt|nwb|eeg|vhdr|vmrk|cnt|mff|gz)$/i.test(n))G.push(n);else H.push(n)}if(console.log(),H.length>0){console.log(` ${W.bold("Metadata files:")} ${H.length}`);for(let N of H.slice(0,5))console.log(` ${N}`);if(H.length>5)console.log(W.dim(` ... and ${H.length-5} more`))}if(G.length>0){console.log(` ${W.bold("Data files:")} ${G.length}`);for(let N of G.slice(0,5))console.log(` ${N}`);if(G.length>5)console.log(W.dim(` ... and ${G.length-5} more`))}let q=C("Fetching dataset info...").start(),K;try{K=await uD(J),q.succeed()}catch(N){if(N instanceof p)q.fail(N.message);else q.fail("Failed to fetch dataset");process.exit(1)}if(!K.github_repo)console.log(W.red("Error: Dataset has no GitHub repository")),process.exit(1);let V,E=p9($,"dataset_description.json");if(!DD(E))console.log(W.red("Error: dataset_description.json not found")),console.log(" This file is required for BIDS datasets."),process.exit(1);try{let N=JSON.parse(T8(E,"utf-8"));if(typeof N.Version!=="string"||!N.Version)console.log(W.red("Error: No Version field in dataset_description.json")),console.log(' Set the Version field before updating (e.g., "Version": "1.0.0").'),process.exit(1);V=N.Version}catch(N){if(N instanceof SyntaxError)console.log(W.red("Error: dataset_description.json contains invalid JSON"));else console.log(W.red(`Error: Could not read dataset_description.json: ${N}`));process.exit(1)}let Z=F.bump;if(!["patch","minor","major"].includes(Z))console.log(W.red(`Error: Invalid bump type: ${F.bump}`)),process.exit(1);let L=p4(V,Z);if(console.log(` ${W.bold("Version bump:")} ${V} -> ${W.green(L)}`),await k0(`Create update PR for ${J}?`,{yes:F.yes})!=="confirmed"){console.log("Cancelled.");return}let M=Date.now().toString(36),O=F.branch||`update/${J}-${M}`,w=C("Creating update branch...").start(),k=RD({cmd:["git","checkout","-b",O],cwd:$,stdout:"pipe",stderr:"pipe"});if(await k.exited!==0){let N=await new Response(k.stderr).text();w.fail(`Failed to create branch: ${N.trim()}`),process.exit(1)}w.succeed(`Created branch: ${O}`);let R=p9($,"dataset_description.json"),j;try{j=JSON.parse(T8(R,"utf-8"))}catch(N){if(N instanceof SyntaxError)console.log(W.red("Error: dataset_description.json contains invalid JSON"));else console.log(W.red(`Error: Could not read dataset_description.json: ${N}`));process.exit(1)}j.Version=L,d4(R,`${JSON.stringify(j,null,2)}
688
- `);let y=C("Committing changes...").start(),d=RD({cmd:["git","add","-A"],cwd:$,stdout:"pipe",stderr:"pipe"});if(await d.exited!==0){let N=await new Response(d.stderr).text();y.fail(`Failed to stage changes: ${N.trim()}`),process.exit(1)}let W0=F.message||`Update ${J} to ${L}`,F0=RD({cmd:["git","commit","-m",W0],cwd:$,stdout:"pipe",stderr:"pipe"});if(await F0.exited!==0){let N=await new Response(F0.stderr).text();y.fail(`Commit failed: ${N.trim()}`),process.exit(1)}if(y.succeed("Committed changes"),G.length>0)if(await RD({cmd:["git","annex","version"],cwd:$,stdout:"pipe",stderr:"pipe"}).exited===0){let n=C("Requesting upload credentials...").start(),h=null;try{h=await R8(J),n.succeed("Upload credentials received")}catch(P0){n.fail(`Could not get upload credentials: ${w0(P0)}`),console.log(W.yellow(" Data files will not be uploaded. Push manually after PR."))}if(h){if((await _9($)).length===0){n=C("Configuring S3 remote...").start();let J0=await O8($,{name:"nemar-s3",bucket:h.s3.bucket,prefix:`${J}/objects`,region:h.s3.region,publicUrl:`https://${h.s3.bucket}.s3.${h.s3.region}.amazonaws.com`},CD(h.credentials));if(!J0.success)n.warn(`Failed to configure S3 remote: ${J0.error}`),console.log(W.yellow(" Data files will not be uploaded. Push manually after PR."));else n.succeed("S3 remote configured")}if((await _9($)).includes("nemar-s3")){n=C("Uploading data files to S3...").start();let J0=await w8($,"nemar-s3",4,CD(h.credentials));if(await kD($),!J0.success)n.warn(`S3 upload issue: ${J0.error}`),console.log(W.yellow(" Data files may need manual upload after PR creation."));else n.succeed(`Uploaded ${J0.filesCopied} data files to S3`)}}}else console.log(W.yellow(" git-annex not available; data files will be committed to git."));let O0=C("Pushing branch...").start(),e=await PF($,O);if(!e.success)O0.fail(`Push failed: ${e.error}`),process.exit(1);if(G.length>0){if(await RD({cmd:["git","push","origin","git-annex"],cwd:$,stdout:"pipe",stderr:"pipe"}).exited!==0)console.log(W.yellow(" Warning: Failed to push git-annex branch"))}O0.succeed("Pushed branch");let N0=!1,GD=C("Creating pull request...").start();try{let N=F.message?`${F.message} (v${L})`:`Update ${J} to v${L}`,n=[...H,...G].slice(0,10).join(`
687
+ `),G=[],H=[];for(let N of X){let n=N.substring(3).trim();if(/\.(edf|bdf|set|fdt|nwb|eeg|vhdr|vmrk|cnt|mff|gz)$/i.test(n))G.push(n);else H.push(n)}if(console.log(),H.length>0){console.log(` ${W.bold("Metadata files:")} ${H.length}`);for(let N of H.slice(0,5))console.log(` ${N}`);if(H.length>5)console.log(W.dim(` ... and ${H.length-5} more`))}if(G.length>0){console.log(` ${W.bold("Data files:")} ${G.length}`);for(let N of G.slice(0,5))console.log(` ${N}`);if(G.length>5)console.log(W.dim(` ... and ${G.length-5} more`))}let q=C("Fetching dataset info...").start(),K;try{K=await uD(J),q.succeed()}catch(N){if(N instanceof p)q.fail(N.message);else q.fail("Failed to fetch dataset");process.exit(1)}if(!K.github_repo)console.log(W.red("Error: Dataset has no GitHub repository")),process.exit(1);let V,E=p9($,"dataset_description.json");if(!DD(E))console.log(W.red("Error: dataset_description.json not found")),console.log(" This file is required for BIDS datasets."),process.exit(1);try{let N=JSON.parse(T8(E,"utf-8"));if(typeof N.Version!=="string"||!N.Version)console.log(W.red("Error: No Version field in dataset_description.json")),console.log(' Set the Version field before updating (e.g., "Version": "1.0.0").'),process.exit(1);V=N.Version}catch(N){if(N instanceof SyntaxError)console.log(W.red("Error: dataset_description.json contains invalid JSON"));else console.log(W.red(`Error: Could not read dataset_description.json: ${N}`));process.exit(1)}let Z=F.bump;if(!["patch","minor","major"].includes(Z))console.log(W.red(`Error: Invalid bump type: ${F.bump}`)),process.exit(1);let L=p4(V,Z);if(console.log(` ${W.bold("Version bump:")} ${V} -> ${W.green(L)}`),await k0(`Create update PR for ${J}?`,{yes:F.yes})!=="confirmed"){console.log("Cancelled.");return}let M=Date.now().toString(36),R=F.branch||`update/${J}-${M}`,w=C("Creating update branch...").start(),k=RD({cmd:["git","checkout","-b",R],cwd:$,stdout:"pipe",stderr:"pipe"});if(await k.exited!==0){let N=await new Response(k.stderr).text();w.fail(`Failed to create branch: ${N.trim()}`),process.exit(1)}w.succeed(`Created branch: ${R}`);let O=p9($,"dataset_description.json"),j;try{j=JSON.parse(T8(O,"utf-8"))}catch(N){if(N instanceof SyntaxError)console.log(W.red("Error: dataset_description.json contains invalid JSON"));else console.log(W.red(`Error: Could not read dataset_description.json: ${N}`));process.exit(1)}j.Version=L,d4(O,`${JSON.stringify(j,null,2)}
688
+ `);let y=C("Committing changes...").start(),d=RD({cmd:["git","add","-A"],cwd:$,stdout:"pipe",stderr:"pipe"});if(await d.exited!==0){let N=await new Response(d.stderr).text();y.fail(`Failed to stage changes: ${N.trim()}`),process.exit(1)}let W0=F.message||`Update ${J} to ${L}`,F0=RD({cmd:["git","commit","-m",W0],cwd:$,stdout:"pipe",stderr:"pipe"});if(await F0.exited!==0){let N=await new Response(F0.stderr).text();y.fail(`Commit failed: ${N.trim()}`),process.exit(1)}if(y.succeed("Committed changes"),G.length>0)if(await RD({cmd:["git","annex","version"],cwd:$,stdout:"pipe",stderr:"pipe"}).exited===0){let n=C("Requesting upload credentials...").start(),h=null;try{h=await R8(J),n.succeed("Upload credentials received")}catch(P0){n.fail(`Could not get upload credentials: ${w0(P0)}`),console.log(W.yellow(" Data files will not be uploaded. Push manually after PR."))}if(h){if((await _9($)).length===0){n=C("Configuring S3 remote...").start();let J0=await O8($,{name:"nemar-s3",bucket:h.s3.bucket,prefix:`${J}/objects`,region:h.s3.region,publicUrl:`https://${h.s3.bucket}.s3.${h.s3.region}.amazonaws.com`},CD(h.credentials));if(!J0.success)n.warn(`Failed to configure S3 remote: ${J0.error}`),console.log(W.yellow(" Data files will not be uploaded. Push manually after PR."));else n.succeed("S3 remote configured")}if((await _9($)).includes("nemar-s3")){n=C("Uploading data files to S3...").start();let J0=await w8($,"nemar-s3",4,CD(h.credentials));if(await kD($),!J0.success)n.warn(`S3 upload issue: ${J0.error}`),console.log(W.yellow(" Data files may need manual upload after PR creation."));else n.succeed(`Uploaded ${J0.filesCopied} data files to S3`)}}}else console.log(W.yellow(" git-annex not available; data files will be committed to git."));let O0=C("Pushing branch...").start(),e=await PF($,R);if(!e.success)O0.fail(`Push failed: ${e.error}`),process.exit(1);if(G.length>0){if(await RD({cmd:["git","push","origin","git-annex"],cwd:$,stdout:"pipe",stderr:"pipe"}).exited!==0)console.log(W.yellow(" Warning: Failed to push git-annex branch"))}O0.succeed("Pushed branch");let N0=!1,GD=C("Creating pull request...").start();try{let N=F.message?`${F.message} (v${L})`:`Update ${J} to v${L}`,n=[...H,...G].slice(0,10).join(`
689
689
  - `),h=`## Dataset Update
690
690
 
691
691
  Bumps ${J} from ${V} to ${L}.
692
692
 
693
693
  ### Changed files
694
694
  - ${n}${X.length>10?`
695
- - ... and ${X.length-10} more`:""}`,P0=RD({cmd:["gh","pr","create","--repo",K.github_repo,"--head",O,"--base","main","--title",N,"--body",h],cwd:$,stdout:"pipe",stderr:"pipe"}),g=(await new Response(P0.stdout).text()).trim();if(await P0.exited!==0){let J0=await new Response(P0.stderr).text();throw Error(J0.trim()||"gh pr create failed")}N0=!0,GD.succeed("Created pull request"),console.log(),console.log(` ${W.cyan("PR:")} ${g}`)}catch(N){GD.fail("Failed to create PR");let n=N instanceof Error?N.message:String(N);console.log(W.red(` ${n}`)),console.log(W.dim(` Branch ${O} has been pushed. Create the PR manually.`))}if(F.monitor&&N0){console.log(),console.log(W.dim("Monitoring CI checks..."));let N=0,n=60;while(N<n){await new Promise((J0)=>setTimeout(J0,1e4)),N++;let h=RD({cmd:["gh","pr","checks","--repo",K.github_repo,O],cwd:$,stdout:"pipe",stderr:"pipe"}),P0=await new Response(h.stdout).text();if(await h.exited===0){if(console.log(W.green(" All checks passed!")),await k0("Merge the PR?",{yes:F.yes})==="confirmed"){let V0=RD({cmd:["gh","pr","merge","--repo",K.github_repo,O,"--squash","--delete-branch"],cwd:$,stdout:"pipe",stderr:"pipe"});if(await V0.exited===0)console.log(W.green(" PR merged successfully!"));else{let BD=await new Response(V0.stderr).text();console.log(W.red(` Merge failed: ${BD.trim()}`))}}break}if(P0.includes("fail")||P0.includes("X")){console.log(W.red(" Some checks failed:")),console.log(P0);break}process.stdout.write(W.dim("."))}if(N>=n)console.log(W.yellow(`
695
+ - ... and ${X.length-10} more`:""}`,P0=RD({cmd:["gh","pr","create","--repo",K.github_repo,"--head",R,"--base","main","--title",N,"--body",h],cwd:$,stdout:"pipe",stderr:"pipe"}),g=(await new Response(P0.stdout).text()).trim();if(await P0.exited!==0){let J0=await new Response(P0.stderr).text();throw Error(J0.trim()||"gh pr create failed")}N0=!0,GD.succeed("Created pull request"),console.log(),console.log(` ${W.cyan("PR:")} ${g}`)}catch(N){GD.fail("Failed to create PR");let n=N instanceof Error?N.message:String(N);console.log(W.red(` ${n}`)),console.log(W.dim(` Branch ${R} has been pushed. Create the PR manually.`))}if(F.monitor&&N0){console.log(),console.log(W.dim("Monitoring CI checks..."));let N=0,n=60;while(N<n){await new Promise((J0)=>setTimeout(J0,1e4)),N++;let h=RD({cmd:["gh","pr","checks","--repo",K.github_repo,R],cwd:$,stdout:"pipe",stderr:"pipe"}),P0=await new Response(h.stdout).text();if(await h.exited===0){if(console.log(W.green(" All checks passed!")),await k0("Merge the PR?",{yes:F.yes})==="confirmed"){let V0=RD({cmd:["gh","pr","merge","--repo",K.github_repo,R,"--squash","--delete-branch"],cwd:$,stdout:"pipe",stderr:"pipe"});if(await V0.exited===0)console.log(W.green(" PR merged successfully!"));else{let BD=await new Response(V0.stderr).text();console.log(W.red(` Merge failed: ${BD.trim()}`))}}break}if(P0.includes("fail")||P0.includes("X")){console.log(W.red(" Some checks failed:")),console.log(P0);break}process.stdout.write(W.dim("."))}if(N>=n)console.log(W.yellow(`
696
696
  Timed out waiting for checks.`))}});FD.command("request-access").description("Request collaborator access to a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").addHelpText("after",`
697
697
  Description:
698
698
  Request access to a NEMAR dataset to push data via git-annex.
@@ -804,7 +804,7 @@ Requirements:
804
804
 
805
805
  Examples:
806
806
  $ nemar dataset clone nm000104
807
- $ nemar dataset clone nm000104 -o ./my-dataset`).action(async(D,F)=>{await l4("clone");let $=C("Checking prerequisites...").start(),J=await jF();if(!J.allPassed){$.fail("Prerequisites check failed");for(let K of J.errors)console.log(W.red(` - ${K}`));process.exit(1)}$.succeed("Prerequisites OK"),$=C(`Resolving dataset ${D}...`).start();let Q,Y;try{let K=await uD(D);if(!K.github_repo||!/^[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+$/.test(K.github_repo))$.fail("Dataset has no valid GitHub repository"),console.log(W.red(` Received: ${K.github_repo||"(empty)"}`)),process.exit(1);Q=`https://github.com/${K.github_repo}.git`,Y=K.visibility,$.succeed(`Found: ${K.name}`)}catch(K){$.fail("Dataset not found");let V=K instanceof Error?K.message:String(K);console.log(W.red(`Error: Dataset ${D} not found`)),console.log(W.red(` ${V}`)),process.exit(1)}let B=YD(F.output||D);if(DD(B))console.log(W.red(`Error: Path already exists: ${B}`)),process.exit(1);let X=null;if(Y!=="public"){$=C("Requesting download credentials...").start();try{X=await JQ(D),$.succeed("Download credentials received (2h expiry)")}catch(K){$.fail("Failed to get download credentials"),console.log(W.red(` ${K.message}`)),console.log(W.dim("Private datasets require authentication. Run 'nemar auth login' first.")),process.exit(1)}}let G=X?CD(X.credentials):void 0;$=C("Cloning dataset...").start();let H=await s1(Q,B);if(!H.success)$.fail("Clone failed"),console.log(W.red(` ${H.error}`)),process.exit(1);$.succeed("Dataset cloned");let q=await h4(B,"nemar-s3",G);if(q.enabled)console.log(W.dim(" S3 remote enabled for data downloads"));else if(!q.success)console.log(W.yellow(` Warning: Could not enable S3 remote: ${q.error}`));if(X)await kD(B);console.log(),console.log(` Location: ${W.cyan(B)}`),console.log(),console.log(W.dim("Data files are not downloaded yet. To get them:")),console.log(W.dim(` cd ${B}`)),console.log(W.dim(" nemar dataset get"))});FD.command("get").description("Download annexed data files for the current dataset").argument("[files...]","Specific files/paths to get (default: all)").option("-j, --jobs <number>","Parallel download streams","4").option("--stimuli","Include stimuli/ content (skipped by default; can be large)").option("--derivatives","Include derivatives/ content (skipped by default; can be large)").addHelpText("after",`
807
+ $ nemar dataset clone nm000104 -o ./my-dataset`).action(async(D,F)=>{await l4("clone");let $=C("Checking prerequisites...").start(),J=await jF();if(!J.allPassed){$.fail("Prerequisites check failed");for(let K of J.errors)console.log(W.red(` - ${K}`));process.exit(1)}$.succeed("Prerequisites OK"),$=C(`Resolving dataset ${D}...`).start();let Q,Y;try{let K=await uD(D);if(!K.github_repo||!/^[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+$/.test(K.github_repo))$.fail("Dataset has no valid GitHub repository"),console.log(W.red(` Received: ${K.github_repo||"(empty)"}`)),process.exit(1);Q=`https://github.com/${K.github_repo}.git`,Y=K.visibility,$.succeed(`Found: ${K.name}`)}catch(K){$.fail("Dataset not found");let V=K instanceof Error?K.message:String(K);console.log(W.red(` ${V}`)),process.exit(1)}let B=YD(F.output||D);if(DD(B))console.log(W.red(`Error: Path already exists: ${B}`)),process.exit(1);let X=null;if(Y!=="public"){$=C("Requesting download credentials...").start();try{X=await JQ(D),$.succeed("Download credentials received (2h expiry)")}catch(K){$.fail("Failed to get download credentials"),console.log(W.red(` ${K.message}`)),console.log(W.dim("Private datasets require authentication. Run 'nemar auth login' first.")),process.exit(1)}}let G=X?CD(X.credentials):void 0;$=C("Cloning dataset...").start();let H=await s1(Q,B);if(!H.success)$.fail("Clone failed"),console.log(W.red(` ${H.error}`)),process.exit(1);$.succeed("Dataset cloned");let q=await h4(B,"nemar-s3",G);if(q.enabled)console.log(W.dim(" S3 remote enabled for data downloads"));else if(!q.success)console.log(W.yellow(` Warning: Could not enable S3 remote: ${q.error}`));if(X)await kD(B);console.log(),console.log(` Location: ${W.cyan(B)}`),console.log(),console.log(W.dim("Data files are not downloaded yet. To get them:")),console.log(W.dim(` cd ${B}`)),console.log(W.dim(" nemar dataset get"))});FD.command("get").description("Download annexed data files for the current dataset").argument("[files...]","Specific files/paths to get (default: all)").option("-j, --jobs <number>","Parallel download streams","4").option("--stimuli","Include stimuli/ content (skipped by default; can be large)").option("--derivatives","Include derivatives/ content (skipped by default; can be large)").addHelpText("after",`
808
808
  Description:
809
809
  Download data files from the remote for a cloned dataset.
810
810
  Must be run inside a git-annex dataset directory.
@@ -930,7 +930,7 @@ Examples:
930
930
  $ nemar sandbox --verbose # Run with full subprocess output (debug stuck runs)
931
931
  $ nemar sandbox status # Check if training is completed
932
932
  $ nemar sandbox reset # Reset for re-training
933
- `).action(sV0);async function sV0(D={}){if(D.verbose)Kg(!0);if(console.log(),console.log(W.bold("NEMAR Sandbox Training")),console.log(W.dim("Verify your setup and learn the upload workflow")),D.verbose)console.log(W.dim("Verbose mode: subprocess invocations will be printed"));if(console.log(),!L0()){console.log(W.red("Not authenticated")),console.log(W.dim("Run 'nemar auth login' first"));return}let F=JD();if(F.sandboxCompleted){console.log(W.green("Sandbox training already completed!")),console.log(W.dim(`Dataset ID: ${F.sandboxDatasetId}`)),console.log(),console.log("You can upload real datasets with:"),console.log(W.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(W.dim("To re-run training, use: nemar sandbox reset"));return}console.log(W.bold("Step 1/6: Checking prerequisites..."));let $=C("Checking prerequisites...").start(),J=await v9();if(!J.allPassed){$.fail("Prerequisites check failed"),console.log(),console.log(W.red("Missing requirements:"));for(let N of J.errors)console.log(W.yellow(` - ${N}`));if(J.errors.some((N)=>N.includes("GitHub")))console.log(W.dim(" Run 'gh auth login' to authenticate with GitHub"));return}$.succeed("All prerequisites met");let Q=C("Verifying GitHub CLI authentication...").start(),Y=await y9(F.githubUsername);if(!Y.authenticated){Q.fail("GitHub CLI not authenticated"),console.log(W.red(` ${Y.error}`)),console.log(),console.log("GitHub CLI is required for sandbox training. Install and authenticate:"),console.log(W.cyan(" brew install gh # or visit https://cli.github.com/")),console.log(W.cyan(" gh auth login"));return}if(F.githubUsername&&!Y.matches)Q.warn("GitHub CLI user mismatch"),console.log(W.yellow(` ${Y.error}`)),console.log(),console.log("Your gh CLI is authenticated as a different GitHub account than your NEMAR account."),console.log("This may cause issues with repository access. To fix:"),console.log(W.cyan(` gh auth login # Login as ${F.githubUsername}`)),console.log(),console.log(W.yellow("WARNING: If upload fails with permission errors, this mismatch is the likely cause.")),console.log();else Q.succeed(`GitHub CLI authenticated as ${Y.username}`);console.log(),console.log(W.bold("Step 2/6: Generating test dataset..."));let B=C("Creating minimal BIDS structure...").start(),X;try{let N=sh();X=N.root;let n=rh(N);B.succeed(`Test dataset created (${XD(n)})`),console.log(W.dim(` Location: ${X}`))}catch(N){B.fail("Failed to generate test dataset"),console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`));return}console.log(),console.log(W.bold("Step 3/6: Registering sandbox dataset..."));let G=C("Creating dataset on NEMAR...").start(),H,q,K,V,E;try{let N=await FQ({name:"Sandbox Training Dataset",description:"Placeholder dataset for sandbox training",files:[{path:"sub-01/eeg/sub-01_task-rest_eeg.edf",size:512000,type:"data"},{path:"dataset_description.json",size:200,type:"metadata"},{path:"participants.tsv",size:50,type:"metadata"},{path:"README",size:500,type:"metadata"},{path:"sub-01/eeg/sub-01_task-rest_eeg.json",size:300,type:"metadata"}],sandbox:!0});H=N.dataset.dataset_id,q=N.dataset.ssh_url,K=N.dataset.github_url,V=N.s3_config,E=N.dataset.s3_prefix,G.succeed(`Sandbox dataset created: ${W.cyan(H)}`),console.log(W.dim(` GitHub: ${K}`)),await new Promise((n)=>setTimeout(n,1e4))}catch(N){if(G.fail("Failed to create sandbox dataset"),N instanceof p)console.log(W.red(` ${N.message}`));else console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`));t1(X);return}let Z=C("Accepting GitHub repository invitation...").start(),L=K?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/),A=L?L[1].replace(/\.git$/,""):null;if(!A){Z.fail("Invalid GitHub repository URL from backend"),console.log(W.red(` Received: ${K||"(empty)"}`)),console.log(W.red(" Expected format: https://github.com/owner/repo")),console.log(),console.log("This may indicate a backend issue. Please contact support."),t1(X);return}let M=await x9(A);if(M.accepted)if(M.alreadyCollaborator)Z.succeed("Already a collaborator on this repository");else Z.succeed("GitHub invitation accepted");else Z.warn("Could not auto-accept invitation"),console.log(W.yellow(` ${M.error}`)),console.log(),console.log("You may need to accept the invitation manually:"),console.log(W.cyan(` https://github.com/${A}/invitations`)),console.log();console.log(),console.log(W.bold("Step 4/6: Initializing repository..."));let O=C("Setting up git-annex...").start(),w=F.username&&F.email?{name:F.username,email:F.email}:void 0;try{let N=await n6(X,{author:w});if(!N.success)throw Error(N.error||"Failed to initialize dataset");await g4(X),await a8(X,q),O.succeed("Repository initialized")}catch(N){O.fail("Failed to initialize repository"),console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`)),t1(X);return}console.log(),console.log(W.bold("Step 5/6: Uploading to S3..."));let k=C("Requesting upload credentials...").start(),R;try{R=await R8(H),k.succeed("Upload credentials received")}catch(N){k.fail("Could not get upload credentials"),console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`)),t1(X);return}let j=CD(R.credentials),y=C("Configuring S3 remote...").start(),d=await O8(X,{name:"nemar-s3",bucket:R.s3.bucket,prefix:`${E}/objects`,region:R.s3.region,publicUrl:V.public_url},j);if(!d.success){y.fail("Failed to configure S3 remote"),console.log(W.red(` ${d.error}`)),console.log(W.dim(" Re-run with --verbose to see git-annex output.")),t1(X);return}y.succeed("S3 remote configured");let W0=C("Tracking data files with git-annex...").start(),F0=await i6(X);if(!F0.success){W0.fail("Failed to track data files"),console.log(W.red(` ${F0.error}`)),console.log(W.dim(" Re-run with --verbose to see git-annex output.")),t1(X);return}W0.succeed("Data files tracked by git-annex");let O0=C("Uploading data files to S3...").start(),e=await w8(X,"nemar-s3",4,j);if(await kD(X),!e.success){O0.fail("S3 upload failed"),console.log(W.red(` ${e.error}`)),console.log(W.dim(" Re-run with --verbose to see git-annex output.")),t1(X);return}O0.succeed(`Uploaded ${e.filesCopied} data file(s) to S3`),console.log(),console.log(W.bold("Step 6/6: Pushing to GitHub..."));let N0=C("Saving and pushing...").start();try{await o8(X,"Initial sandbox training upload",w),await o1(X),N0.succeed("Pushed to GitHub")}catch(N){N0.fail("Failed to push to GitHub"),console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`)),t1(X);return}let GD=C("Finalizing...").start();try{await $Q(H),await uf(H),a1("sandboxCompleted",!0),a1("sandboxDatasetId",H),GD.succeed("Sandbox training complete!")}catch(N){GD.fail("Failed to finalize"),console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`)),t1(X);return}t1(X),console.log(),console.log(W.green.bold("Congratulations! Sandbox training completed successfully.")),console.log(),console.log("Your setup is verified and you're ready to upload real datasets:"),console.log(W.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(W.dim(`Sandbox dataset: ${H}`))}RQ.command("status").description("Check sandbox training completion status").option("--refresh","Fetch latest status from server").action(async(D)=>{if(!L0()){console.log(W.red("Not authenticated")),console.log(W.dim("Run 'nemar auth login' first"));return}if(D.refresh){let F=C("Checking status...").start();try{let $=await lf();if(a1("sandboxCompleted",$.sandbox_completed),$.sandbox_dataset_id)a1("sandboxDatasetId",$.sandbox_dataset_id);if(F.stop(),$.sandbox_completed){if(console.log(W.green("Sandbox training: Completed")),console.log(W.dim(` Dataset ID: ${$.sandbox_dataset_id}`)),$.sandbox_completed_at)console.log(W.dim(` Completed: ${$.sandbox_completed_at}`))}else console.log(W.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(W.cyan(" nemar sandbox"))}catch($){if(F.fail("Failed to check status"),$ instanceof p)console.log(W.red(` ${$.message}`))}}else{let F=JD();if(F.sandboxCompleted)console.log(W.green("Sandbox training: Completed")),console.log(W.dim(` Dataset ID: ${F.sandboxDatasetId}`));else console.log(W.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(W.cyan(" nemar sandbox"))}});RQ.command("reset").description("Reset sandbox training status for re-training").option(T0,j0).option(b0,y0).action(async(D)=>{if(!L0()){console.log(W.red("Not authenticated")),console.log(W.dim("Run 'nemar auth login' first"));return}if(!JD().sandboxCompleted){console.log(W.yellow("Sandbox training not yet completed")),console.log(W.dim("Nothing to reset"));return}let $=await k0("Reset sandbox training status? You will need to complete training again.",D);if($!=="confirmed"){console.log(W.dim($==="declined"?"Skipped":"Cancelled"));return}let J=C("Resetting sandbox status...").start();try{await mf(),MW("sandboxCompleted"),MW("sandboxDatasetId"),J.succeed("Sandbox status reset"),console.log(),console.log("Run sandbox training again with:"),console.log(W.cyan(" nemar sandbox"))}catch(Q){if(J.fail("Failed to reset"),Q instanceof p)console.log(W.red(` ${Q.message}`));else console.log(W.red(` ${Q instanceof Error?Q.message:"Unknown error"}`))}});i8();NW();xD();i8();x4();var th=100;async function eh(){try{let{notices:D}=await Xg();if(!D||D.length===0)return;let F=JD(),$=new Set(F.dismissedNoticeIds||[]),J=D.filter((Q)=>!$.has(Q.id));if(J.length===0)return;for(let Q of J)rV0(Q);if(L0()){let Q=J.filter((Y)=>Y.level==="info").map((Y)=>Y.id);if(Q.length>0)tV0(Q)}}catch(D){if(process.env.VERBOSE)process.stderr.write(`[notices] ${D instanceof Error?D.message:D}
933
+ `).action(sV0);async function sV0(D={}){if(D.verbose)Kg(!0);if(console.log(),console.log(W.bold("NEMAR Sandbox Training")),console.log(W.dim("Verify your setup and learn the upload workflow")),D.verbose)console.log(W.dim("Verbose mode: subprocess invocations will be printed"));if(console.log(),!L0()){console.log(W.red("Not authenticated")),console.log(W.dim("Run 'nemar auth login' first"));return}let F=JD();if(F.sandboxCompleted){console.log(W.green("Sandbox training already completed!")),console.log(W.dim(`Dataset ID: ${F.sandboxDatasetId}`)),console.log(),console.log("You can upload real datasets with:"),console.log(W.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(W.dim("To re-run training, use: nemar sandbox reset"));return}console.log(W.bold("Step 1/6: Checking prerequisites..."));let $=C("Checking prerequisites...").start(),J=await v9();if(!J.allPassed){$.fail("Prerequisites check failed"),console.log(),console.log(W.red("Missing requirements:"));for(let N of J.errors)console.log(W.yellow(` - ${N}`));if(J.errors.some((N)=>N.includes("GitHub")))console.log(W.dim(" Run 'gh auth login' to authenticate with GitHub"));return}$.succeed("All prerequisites met");let Q=C("Verifying GitHub CLI authentication...").start(),Y=await y9(F.githubUsername);if(!Y.authenticated){Q.fail("GitHub CLI not authenticated"),console.log(W.red(` ${Y.error}`)),console.log(),console.log("GitHub CLI is required for sandbox training. Install and authenticate:"),console.log(W.cyan(" brew install gh # or visit https://cli.github.com/")),console.log(W.cyan(" gh auth login"));return}if(F.githubUsername&&!Y.matches)Q.warn("GitHub CLI user mismatch"),console.log(W.yellow(` ${Y.error}`)),console.log(),console.log("Your gh CLI is authenticated as a different GitHub account than your NEMAR account."),console.log("This may cause issues with repository access. To fix:"),console.log(W.cyan(` gh auth login # Login as ${F.githubUsername}`)),console.log(),console.log(W.yellow("WARNING: If upload fails with permission errors, this mismatch is the likely cause.")),console.log();else Q.succeed(`GitHub CLI authenticated as ${Y.username}`);console.log(),console.log(W.bold("Step 2/6: Generating test dataset..."));let B=C("Creating minimal BIDS structure...").start(),X;try{let N=sh();X=N.root;let n=rh(N);B.succeed(`Test dataset created (${XD(n)})`),console.log(W.dim(` Location: ${X}`))}catch(N){B.fail("Failed to generate test dataset"),console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`));return}console.log(),console.log(W.bold("Step 3/6: Registering sandbox dataset..."));let G=C("Creating dataset on NEMAR...").start(),H,q,K,V,E;try{let N=await FQ({name:"Sandbox Training Dataset",description:"Placeholder dataset for sandbox training",files:[{path:"sub-01/eeg/sub-01_task-rest_eeg.edf",size:512000,type:"data"},{path:"dataset_description.json",size:200,type:"metadata"},{path:"participants.tsv",size:50,type:"metadata"},{path:"README",size:500,type:"metadata"},{path:"sub-01/eeg/sub-01_task-rest_eeg.json",size:300,type:"metadata"}],sandbox:!0});H=N.dataset.dataset_id,q=N.dataset.ssh_url,K=N.dataset.github_url,V=N.s3_config,E=N.dataset.s3_prefix,G.succeed(`Sandbox dataset created: ${W.cyan(H)}`),console.log(W.dim(` GitHub: ${K}`)),await new Promise((n)=>setTimeout(n,1e4))}catch(N){if(G.fail("Failed to create sandbox dataset"),N instanceof p)console.log(W.red(` ${N.message}`));else console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`));t1(X);return}let Z=C("Accepting GitHub repository invitation...").start(),L=K?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/),A=L?L[1].replace(/\.git$/,""):null;if(!A){Z.fail("Invalid GitHub repository URL from backend"),console.log(W.red(` Received: ${K||"(empty)"}`)),console.log(W.red(" Expected format: https://github.com/owner/repo")),console.log(),console.log("This may indicate a backend issue. Please contact support."),t1(X);return}let M=await x9(A);if(M.accepted)if(M.alreadyCollaborator)Z.succeed("Already a collaborator on this repository");else Z.succeed("GitHub invitation accepted");else Z.warn("Could not auto-accept invitation"),console.log(W.yellow(` ${M.error}`)),console.log(),console.log("You may need to accept the invitation manually:"),console.log(W.cyan(` https://github.com/${A}/invitations`)),console.log();console.log(),console.log(W.bold("Step 4/6: Initializing repository..."));let R=C("Setting up git-annex...").start(),w=F.username&&F.email?{name:F.username,email:F.email}:void 0;try{let N=await n6(X,{author:w});if(!N.success)throw Error(N.error||"Failed to initialize dataset");await g4(X),await a8(X,q),R.succeed("Repository initialized")}catch(N){R.fail("Failed to initialize repository"),console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`)),t1(X);return}console.log(),console.log(W.bold("Step 5/6: Uploading to S3..."));let k=C("Requesting upload credentials...").start(),O;try{O=await R8(H),k.succeed("Upload credentials received")}catch(N){k.fail("Could not get upload credentials"),console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`)),t1(X);return}let j=CD(O.credentials),y=C("Configuring S3 remote...").start(),d=await O8(X,{name:"nemar-s3",bucket:O.s3.bucket,prefix:`${E}/objects`,region:O.s3.region,publicUrl:V.public_url},j);if(!d.success){y.fail("Failed to configure S3 remote"),console.log(W.red(` ${d.error}`)),console.log(W.dim(" Re-run with --verbose to see git-annex output.")),t1(X);return}y.succeed("S3 remote configured");let W0=C("Tracking data files with git-annex...").start(),F0=await i6(X);if(!F0.success){W0.fail("Failed to track data files"),console.log(W.red(` ${F0.error}`)),console.log(W.dim(" Re-run with --verbose to see git-annex output.")),t1(X);return}W0.succeed("Data files tracked by git-annex");let O0=C("Uploading data files to S3...").start(),e=await w8(X,"nemar-s3",4,j);if(await kD(X),!e.success){O0.fail("S3 upload failed"),console.log(W.red(` ${e.error}`)),console.log(W.dim(" Re-run with --verbose to see git-annex output.")),t1(X);return}O0.succeed(`Uploaded ${e.filesCopied} data file(s) to S3`),console.log(),console.log(W.bold("Step 6/6: Pushing to GitHub..."));let N0=C("Saving and pushing...").start();try{await o8(X,"Initial sandbox training upload",w),await o1(X),N0.succeed("Pushed to GitHub")}catch(N){N0.fail("Failed to push to GitHub"),console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`)),t1(X);return}let GD=C("Finalizing...").start();try{await $Q(H),await uf(H),a1("sandboxCompleted",!0),a1("sandboxDatasetId",H),GD.succeed("Sandbox training complete!")}catch(N){GD.fail("Failed to finalize"),console.log(W.red(` ${N instanceof Error?N.message:"Unknown error"}`)),t1(X);return}t1(X),console.log(),console.log(W.green.bold("Congratulations! Sandbox training completed successfully.")),console.log(),console.log("Your setup is verified and you're ready to upload real datasets:"),console.log(W.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(W.dim(`Sandbox dataset: ${H}`))}RQ.command("status").description("Check sandbox training completion status").option("--refresh","Fetch latest status from server").action(async(D)=>{if(!L0()){console.log(W.red("Not authenticated")),console.log(W.dim("Run 'nemar auth login' first"));return}if(D.refresh){let F=C("Checking status...").start();try{let $=await lf();if(a1("sandboxCompleted",$.sandbox_completed),$.sandbox_dataset_id)a1("sandboxDatasetId",$.sandbox_dataset_id);if(F.stop(),$.sandbox_completed){if(console.log(W.green("Sandbox training: Completed")),console.log(W.dim(` Dataset ID: ${$.sandbox_dataset_id}`)),$.sandbox_completed_at)console.log(W.dim(` Completed: ${$.sandbox_completed_at}`))}else console.log(W.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(W.cyan(" nemar sandbox"))}catch($){if(F.fail("Failed to check status"),$ instanceof p)console.log(W.red(` ${$.message}`))}}else{let F=JD();if(F.sandboxCompleted)console.log(W.green("Sandbox training: Completed")),console.log(W.dim(` Dataset ID: ${F.sandboxDatasetId}`));else console.log(W.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(W.cyan(" nemar sandbox"))}});RQ.command("reset").description("Reset sandbox training status for re-training").option(T0,j0).option(b0,y0).action(async(D)=>{if(!L0()){console.log(W.red("Not authenticated")),console.log(W.dim("Run 'nemar auth login' first"));return}if(!JD().sandboxCompleted){console.log(W.yellow("Sandbox training not yet completed")),console.log(W.dim("Nothing to reset"));return}let $=await k0("Reset sandbox training status? You will need to complete training again.",D);if($!=="confirmed"){console.log(W.dim($==="declined"?"Skipped":"Cancelled"));return}let J=C("Resetting sandbox status...").start();try{await mf(),MW("sandboxCompleted"),MW("sandboxDatasetId"),J.succeed("Sandbox status reset"),console.log(),console.log("Run sandbox training again with:"),console.log(W.cyan(" nemar sandbox"))}catch(Q){if(J.fail("Failed to reset"),Q instanceof p)console.log(W.red(` ${Q.message}`));else console.log(W.red(` ${Q instanceof Error?Q.message:"Unknown error"}`))}});i8();NW();xD();i8();x4();var th=100;async function eh(){try{let{notices:D}=await Xg();if(!D||D.length===0)return;let F=JD(),$=new Set(F.dismissedNoticeIds||[]),J=D.filter((Q)=>!$.has(Q.id));if(J.length===0)return;for(let Q of J)rV0(Q);if(L0()){let Q=J.filter((Y)=>Y.level==="info").map((Y)=>Y.id);if(Q.length>0)tV0(Q)}}catch(D){if(process.env.VERBOSE)process.stderr.write(`[notices] ${D instanceof Error?D.message:D}
934
934
  `)}}function rV0(D){let F,$;switch(D.level){case"critical":F="CRITICAL",$=W.red.bold;break;case"warning":F="WARNING",$=W.yellow;break;default:F="NOTICE",$=W.blue}let J=$(`[${F}]`);if(D.level==="critical"){let Q=W.red("\u2500".repeat(50));process.stderr.write(`${Q}
935
935
  ${J} ${D.message}
936
936
  ${Q}