nemar-cli 0.9.12-PR1205.70eb24a → 0.9.12-PR1208.6e03e2e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +26 -26
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,9 +26,9 @@ Expecting one of '${r.join("', '")}'`);if(this._lifeCycleHooks[e])this._lifeCycl
|
|
|
26
26
|
`),this._exit(0,"commander.version",e)}),this}description(e,t){if(e===void 0&&t===void 0)return this._description;if(this._description=e,t)this._argsDescription=t;return this}summary(e){if(e===void 0)return this._summary;return this._summary=e,this}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)t=this.commands[this.commands.length-1];if(e===t._name)throw Error("Command alias can't be the same as its name");let r=this.parent?._findCommand(e);if(r){let n=[r.name()].concat(r.aliases()).join("|");throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return t._aliases.push(e),this}aliases(e){if(e===void 0)return this._aliases;return e.forEach((t)=>this.alias(t)),this}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map((r)=>mX(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){if(e===void 0)return this._name;return this._name=e,this}nameFromFilename(e){return this._name=ai.basename(e,ai.extname(e)),this}executableDir(e){if(e===void 0)return this._executableDir;return this._executableDir=e,this}helpInformation(e){let t=this.createHelp();if(t.helpWidth===void 0)t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth();return t.formatHelp(this,t)}_getHelpContext(e){e=e||{};let t={error:!!e.error},r;if(t.error)r=(n)=>this._outputConfiguration.writeErr(n);else r=(n)=>this._outputConfiguration.writeOut(n);return t.write=e.write||r,t.command=this,t}outputHelp(e){let t;if(typeof e==="function")t=e,e=void 0;let r=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach((i)=>i.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let n=this.helpInformation(r);if(t){if(n=t(n),typeof n!=="string"&&!Buffer.isBuffer(n))throw Error("outputHelp callback must return a string or a Buffer")}if(r.write(n),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",r),this._getCommandAndAncestors().forEach((i)=>i.emit("afterAllHelp",r))}helpOption(e,t){if(typeof e==="boolean"){if(e)this._helpOption=this._helpOption??void 0;else this._helpOption=null;return this}return e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=dt.exitCode||0;if(t===0&&e&&typeof e!=="function"&&e.error)t=1;this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw Error(`Unexpected value for position to addHelpText.
|
|
27
27
|
Expecting one of '${r.join("', '")}'`);let n=`${e}Help`;return this.on(n,(i)=>{let s;if(typeof t==="function")s=t({error:i.error,command:i.command});else s=t;if(s)i.write(`${s}
|
|
28
28
|
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();if(t&&e.find((n)=>t.is(n)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function d1(e){return e.map((t)=>{if(!t.startsWith("--inspect"))return t;let r,n="127.0.0.1",i="9229",s;if((s=t.match(/^(--inspect(-brk)?)$/))!==null)r=s[1];else if((s=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(r=s[1],/^\d+$/.test(s[3]))i=s[3];else n=s[3];else if((s=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)r=s[1],n=s[3],i=s[4];if(r&&i!=="0")return`${r}=${n}:${parseInt(i)+1}`;return t})}yX.Command=Mh});var g1=h(function(_X){var{Argument:p1}=Kd(),{Command:Bh}=f1(),{CommanderError:bX,InvalidArgumentError:m1}=ou(),{Help:vX}=Ih(),{Option:h1}=Th();_X.program=new Bh;_X.createCommand=(e)=>new Bh(e);_X.createOption=(e,t)=>new h1(e,t);_X.createArgument=(e,t)=>new p1(e,t);_X.Command=Bh;_X.Option=h1;_X.Argument=p1;_X.Help=vX;_X.CommanderError=bX;_X.InvalidArgumentError=m1;_X.InvalidOptionArgumentError=m1});var lu=h(function(IX,Lh){var De=IX;IX.default=De;var Be="\x1B[",uu="\x1B]",Jo="\x07",Jd=";",w1=process.env.TERM_PROGRAM==="Apple_Terminal";De.cursorTo=(e,t)=>{if(typeof e!=="number")throw TypeError("The `x` argument is required");if(typeof t!=="number")return Be+(e+1)+"G";return Be+(t+1)+";"+(e+1)+"H"};De.cursorMove=(e,t)=>{if(typeof e!=="number")throw TypeError("The `x` argument is required");let r="";if(e<0)r+=Be+-e+"D";else if(e>0)r+=Be+e+"C";if(t<0)r+=Be+-t+"A";else if(t>0)r+=Be+t+"B";return r};De.cursorUp=(e=1)=>Be+e+"A";De.cursorDown=(e=1)=>Be+e+"B";De.cursorForward=(e=1)=>Be+e+"C";De.cursorBackward=(e=1)=>Be+e+"D";De.cursorLeft=Be+"G";De.cursorSavePosition=w1?"\x1B7":Be+"s";De.cursorRestorePosition=w1?"\x1B8":Be+"u";De.cursorGetPosition=Be+"6n";De.cursorNextLine=Be+"E";De.cursorPrevLine=Be+"F";De.cursorHide=Be+"?25l";De.cursorShow=Be+"?25h";De.eraseLines=(e)=>{let t="";for(let r=0;r<e;r++)t+=De.eraseLine+(r<e-1?De.cursorUp():"");if(e)t+=De.cursorLeft;return t};De.eraseEndLine=Be+"K";De.eraseStartLine=Be+"1K";De.eraseLine=Be+"2K";De.eraseDown=Be+"J";De.eraseUp=Be+"1J";De.eraseScreen=Be+"2J";De.scrollUp=Be+"S";De.scrollDown=Be+"T";De.clearScreen="\x1Bc";De.clearTerminal=process.platform==="win32"?`${De.eraseScreen}${Be}0f`:`${De.eraseScreen}${Be}3J${Be}H`;De.beep=Jo;De.link=(e,t)=>[uu,"8",Jd,Jd,t,Jo,e,uu,"8",Jd,Jd,Jo].join("");De.image=(e,t={})=>{let r=`${uu}1337;File=inline=1`;if(t.width)r+=`;width=${t.width}`;if(t.height)r+=`;height=${t.height}`;if(t.preserveAspectRatio===!1)r+=";preserveAspectRatio=0";return r+":"+e.toString("base64")+Jo};De.iTerm={setCwd:(e=process.cwd())=>`${uu}50;CurrentDir=${e}${Jo}`,annotation:(e,t={})=>{let r=`${uu}1337;`,n=typeof t.x<"u",i=typeof t.y<"u";if((n||i)&&!(n&&i&&typeof t.length<"u"))throw Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");if(e=e.replace(/\|/g,""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0)r+=(n?[e,t.length,t.x,t.y]:[t.length,e]).join("|");else r+=e;return r+Jo}}});var kr=h(function(uqe,E1){var NX=xe("tty"),qX=NX?.WriteStream?.prototype?.hasColors?.()??!1,de=(e,t)=>{if(!qX)return(i)=>i;let r=`\x1B[${e}m`,n=`\x1B[${t}m`;return(i)=>{let s=i+"",o=s.indexOf(n);if(o===-1)return r+s+n;let a=r,c=0,d=(t===22?n:"")+r;while(o!==-1)a+=s.slice(c,o)+d,c=o+n.length,o=s.indexOf(n,c);return a+=s.slice(c)+n,a}},ae={};ae.reset=de(0,0);ae.bold=de(1,22);ae.dim=de(2,22);ae.italic=de(3,23);ae.underline=de(4,24);ae.overline=de(53,55);ae.inverse=de(7,27);ae.hidden=de(8,28);ae.strikethrough=de(9,29);ae.black=de(30,39);ae.red=de(31,39);ae.green=de(32,39);ae.yellow=de(33,39);ae.blue=de(34,39);ae.magenta=de(35,39);ae.cyan=de(36,39);ae.white=de(37,39);ae.gray=de(90,39);ae.bgBlack=de(40,49);ae.bgRed=de(41,49);ae.bgGreen=de(42,49);ae.bgYellow=de(43,49);ae.bgBlue=de(44,49);ae.bgMagenta=de(45,49);ae.bgCyan=de(46,49);ae.bgWhite=de(47,49);ae.bgGray=de(100,49);ae.redBright=de(91,39);ae.greenBright=de(92,39);ae.yellowBright=de(93,39);ae.blueBright=de(94,39);ae.magentaBright=de(95,39);ae.cyanBright=de(96,39);ae.whiteBright=de(97,39);ae.bgRedBright=de(101,49);ae.bgGreenBright=de(102,49);ae.bgYellowBright=de(103,49);ae.bgBlueBright=de(104,49);ae.bgMagentaBright=de(105,49);ae.bgCyanBright=de(106,49);ae.bgWhiteBright=de(107,49);E1.exports=ae});import Rn from"process";function jX(){if(Rn.platform!=="win32")return Rn.env.TERM!=="linux";return Boolean(Rn.env.WT_SESSION)||Boolean(Rn.env.TERMINUS_SUBLIME)||Rn.env.ConEmuTask==="{cmd::Cmder}"||Rn.env.TERM_PROGRAM==="Terminus-Sublime"||Rn.env.TERM_PROGRAM==="vscode"||Rn.env.TERM==="xterm-256color"||Rn.env.TERM==="alacritty"||Rn.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var S1,$1,MX,BX,LX,UX,VX,Mi,dqe;var Xd=A(()=>{S1={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"},$1={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"},MX={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"},BX={...S1,...$1},LX={...S1,...MX},UX=jX(),VX=UX?BX:LX,Mi=VX,dqe=Object.entries($1)});var du=h(function(pqe,R1){function C1(e){return!!e&&(typeof e==="object"||typeof e==="function")&&typeof e.then==="function"}var F1=R1.exports=function(e,t,r="async"){if(typeof t==="string")r=t,t=void 0;return t=t||function(){},function(){var n=arguments,i=this,s=new Promise(function(o,a){var c=!1;let l=function(_){if(c)console.warn("Run-async promise already resolved.");c=!0,o(_)};var d=!1;let f=function(_){if(d)console.warn("Run-async promise already rejected.");d=!0,a(_)};var m=!1,p=!1,g=!1,y=function(){if(g)return console.warn("Run-async async() called outside a valid run-async context, callback will be ignored."),function(){};if(p)console.warn(`Run-async wrapped function (async) returned a promise.
|
|
29
|
-
Calls to async() callback can have unexpected results.`);return m=!0,function(_,
|
|
29
|
+
Calls to async() callback can have unexpected results.`);return m=!0,function(_,S){if(_)f(_);else l(S)}},x;if(i&&r&&Proxy)x=new Proxy(i,{get(_,S){if(S===r){if(S in _)console.warn(`${r} property is been shadowed by run-sync`);return y}return Reflect.get(...arguments)}});else x={[r]:y};var v=e.apply(x,Array.prototype.slice.call(n));if(m){if(C1(v))console.warn("Run-async wrapped function (sync) returned a promise but async() callback must be executed to resolve.")}else if(C1(v))p=!0,v.then(l,f);else l(v);g=!0});return s.then(t.bind(null,null),t),s}};F1.cb=function(e,t){return F1(function(){var r=Array.prototype.slice.call(arguments);if(r.length===e.length-1)r.push(this.async());return e.apply(this,r)},t)}});var Le=h(function(O1){Object.defineProperty(O1,"__esModule",{value:!0});O1.isFunction=void 0;function zX(e){return typeof e==="function"}O1.isFunction=zX});var Bi=h(function(k1){Object.defineProperty(k1,"__esModule",{value:!0});k1.createErrorClass=void 0;function HX(e){var t=function(n){Error.call(n),n.stack=Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}k1.createErrorClass=HX});var Uh=h(function(I1){Object.defineProperty(I1,"__esModule",{value:!0});I1.UnsubscriptionError=void 0;var WX=Bi();I1.UnsubscriptionError=WX.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
30
30
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
31
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}})});var ci=h(function(N1){Object.defineProperty(N1,"__esModule",{value:!0});N1.arrRemove=void 0;function GX(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}N1.arrRemove=GX});var Dr=h(function(sr){var j1=sr&&sr.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},M1=sr&&sr.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},B1=sr&&sr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(sr,"__esModule",{value:!0});sr.isSubscription=sr.EMPTY_SUBSCRIPTION=sr.Subscription=void 0;var fu=Le(),Vh=Uh(),L1=ci(),zh=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=j1(o),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(y){t={error:y}}finally{try{if(c&&!c.done&&(r=a.return))r.call(a)}finally{if(t)throw t.error}}else o.remove(this);var d=this.initialTeardown;if(fu.isFunction(d))try{d()}catch(y){s=y instanceof Vh.UnsubscriptionError?y.errors:[y]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var m=j1(f),p=m.next();!p.done;p=m.next()){var g=p.value;try{U1(g)}catch(y){if(s=s!==null&&s!==void 0?s:[],y instanceof Vh.UnsubscriptionError)s=B1(B1([],M1(s)),M1(y.errors));else s.push(y)}}}catch(y){n={error:y}}finally{try{if(p&&!p.done&&(i=m.return))i.call(m)}finally{if(n)throw n.error}}}if(s)throw new Vh.UnsubscriptionError(s)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)U1(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;if(r===t)this._parentage=null;else if(Array.isArray(r))L1.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;if(r&&L1.arrRemove(r,t),t instanceof e)t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();sr.Subscription=zh;sr.EMPTY_SUBSCRIPTION=zh.EMPTY;function KX(e){return e instanceof zh||e&&"closed"in e&&fu.isFunction(e.remove)&&fu.isFunction(e.add)&&fu.isFunction(e.unsubscribe)}sr.isSubscription=KX;function U1(e){if(fu.isFunction(e))e();else e.unsubscribe()}});var Xo=h(function(V1){Object.defineProperty(V1,"__esModule",{value:!0});V1.config=void 0;V1.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var Hh=h(function(On){var H1=On&&On.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},W1=On&&On.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(On,"__esModule",{value:!0});On.timeoutProvider=void 0;On.timeoutProvider={setTimeout:function(e,t){var r=[];for(var n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=On.timeoutProvider.delegate;if(i===null||i===void 0?void 0:i.setTimeout)return i.setTimeout.apply(i,W1([e,t],H1(r)));return setTimeout.apply(void 0,W1([e,t],H1(r)))},clearTimeout:function(e){var t=On.timeoutProvider.delegate;return((t===null||t===void 0?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0}});var Wh=h(function(G1){Object.defineProperty(G1,"__esModule",{value:!0});G1.reportUnhandledError=void 0;var YX=Xo(),JX=Hh();function XX(e){JX.timeoutProvider.setTimeout(function(){var t=YX.config.onUnhandledError;if(t)t(e);else throw e})}G1.reportUnhandledError=XX});var wt=h(function(Y1){Object.defineProperty(Y1,"__esModule",{value:!0});Y1.noop=void 0;function QX(){}Y1.noop=QX});var Z1=h(function(X1){Object.defineProperty(X1,"__esModule",{value:!0});X1.createNotification=X1.nextNotification=X1.errorNotification=X1.COMPLETE_NOTIFICATION=void 0;X1.COMPLETE_NOTIFICATION=function(){return Qd("C",void 0,void 0)}();function ZX(e){return Qd("E",void 0,e)}X1.errorNotification=ZX;function eQ(e){return Qd("N",e,void 0)}X1.nextNotification=eQ;function Qd(e,t,r){return{kind:e,value:t,error:r}}X1.createNotification=Qd});var Zd=h(function(t2){Object.defineProperty(t2,"__esModule",{value:!0});t2.captureError=t2.errorContext=void 0;var e2=Xo(),Gs=null;function iQ(e){if(e2.config.useDeprecatedSynchronousErrorHandling){var t=!Gs;if(t)Gs={errorThrown:!1,error:null};if(e(),t){var r=Gs,n=r.errorThrown,i=r.error;if(Gs=null,n)throw i}}else e()}t2.errorContext=iQ;function sQ(e){if(e2.config.useDeprecatedSynchronousErrorHandling&&Gs)Gs.errorThrown=!0,Gs.error=e}t2.captureError=sQ});var Qo=h(function(Jr){var s2=Jr&&Jr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Jr,"__esModule",{value:!0});Jr.EMPTY_OBSERVER=Jr.SafeSubscriber=Jr.Subscriber=void 0;var aQ=Le(),n2=Dr(),Jh=Xo(),cQ=Wh(),i2=wt(),Gh=Z1(),uQ=Hh(),lQ=Zd(),o2=function(e){s2(t,e);function t(r){var n=e.call(this)||this;if(n.isStopped=!1,r){if(n.destination=r,n2.isSubscription(r))r.add(n)}else n.destination=Jr.EMPTY_OBSERVER;return n}return t.create=function(r,n,i){return new a2(r,n,i)},t.prototype.next=function(r){if(this.isStopped)Yh(Gh.nextNotification(r),this);else this._next(r)},t.prototype.error=function(r){if(this.isStopped)Yh(Gh.errorNotification(r),this);else this.isStopped=!0,this._error(r)},t.prototype.complete=function(){if(this.isStopped)Yh(Gh.COMPLETE_NOTIFICATION,this);else this.isStopped=!0,this._complete()},t.prototype.unsubscribe=function(){if(!this.closed)this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(n2.Subscription);Jr.Subscriber=o2;var dQ=Function.prototype.bind;function Kh(e,t){return dQ.call(e,t)}var fQ=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){ef(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){ef(n)}else ef(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){ef(r)}},e}(),a2=function(e){s2(t,e);function t(r,n,i){var s=e.call(this)||this,o;if(aQ.isFunction(r)||!r)o={next:r!==null&&r!==void 0?r:void 0,error:n!==null&&n!==void 0?n:void 0,complete:i!==null&&i!==void 0?i:void 0};else{var a;if(s&&Jh.config.useDeprecatedNextContext)a=Object.create(r),a.unsubscribe=function(){return s.unsubscribe()},o={next:r.next&&Kh(r.next,a),error:r.error&&Kh(r.error,a),complete:r.complete&&Kh(r.complete,a)};else o=r}return s.destination=new fQ(o),s}return t}(o2);Jr.SafeSubscriber=a2;function ef(e){if(Jh.config.useDeprecatedSynchronousErrorHandling)lQ.captureError(e);else cQ.reportUnhandledError(e)}function pQ(e){throw e}function Yh(e,t){var r=Jh.config.onStoppedNotification;r&&uQ.timeoutProvider.setTimeout(function(){return r(e,t)})}Jr.EMPTY_OBSERVER={closed:!0,next:i2.noop,error:pQ,complete:i2.noop}});var pu=h(function(c2){Object.defineProperty(c2,"__esModule",{value:!0});c2.observable=void 0;c2.observable=function(){return typeof Symbol==="function"&&Symbol.observable||"@@observable"}()});var Et=h(function(l2){Object.defineProperty(l2,"__esModule",{value:!0});l2.identity=void 0;function mQ(e){return e}l2.identity=mQ});var mu=h(function(p2){Object.defineProperty(p2,"__esModule",{value:!0});p2.pipeFromArray=p2.pipe=void 0;var hQ=Et();function gQ(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return f2(e)}p2.pipe=gQ;function f2(e){if(e.length===0)return hQ.identity;if(e.length===1)return e[0];return function(r){return e.reduce(function(n,i){return i(n)},r)}}p2.pipeFromArray=f2});var ze=h(function(g2){Object.defineProperty(g2,"__esModule",{value:!0});g2.Observable=void 0;var Qh=Qo(),xQ=Dr(),bQ=pu(),vQ=mu(),_Q=Xo(),Xh=Le(),DQ=Zd(),wQ=function(){function e(t){if(t)this._subscribe=t}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,s=SQ(t)?t:new Qh.SafeSubscriber(t,r,n);return DQ.errorContext(function(){var o=i,a=o.operator,c=o.source;s.add(a?a.call(s,c):c?i._subscribe(s):i._trySubscribe(s))}),s},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=h2(r),new r(function(i,s){var o=new Qh.SafeSubscriber({next:function(a){try{t(a)}catch(c){s(c),o.unsubscribe()}},error:s,complete:i});n.subscribe(o)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[bQ.observable]=function(){return this},e.prototype.pipe=function(){var t=[];for(var r=0;r<arguments.length;r++)t[r]=arguments[r];return vQ.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=h2(t),new t(function(n,i){var s;r.subscribe(function(o){return s=o},function(o){return i(o)},function(){return n(s)})})},e.create=function(t){return new e(t)},e}();g2.Observable=wQ;function h2(e){var t;return(t=e!==null&&e!==void 0?e:_Q.config.Promise)!==null&&t!==void 0?t:Promise}function EQ(e){return e&&Xh.isFunction(e.next)&&Xh.isFunction(e.error)&&Xh.isFunction(e.complete)}function SQ(e){return e&&e instanceof Qh.Subscriber||EQ(e)&&xQ.isSubscription(e)}});var U=h(function(b2){Object.defineProperty(b2,"__esModule",{value:!0});b2.operate=b2.hasLift=void 0;var $Q=Le();function x2(e){return $Q.isFunction(e===null||e===void 0?void 0:e.lift)}b2.hasLift=x2;function CQ(e){return function(t){if(x2(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw TypeError("Unable to lift unknown Observable type")}}b2.operate=CQ});var K=h(function(Li){var RQ=Li&&Li.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Li,"__esModule",{value:!0});Li.OperatorSubscriber=Li.createOperatorSubscriber=void 0;var OQ=Qo();function AQ(e,t,r,n,i){return new _2(e,t,r,n,i)}Li.createOperatorSubscriber=AQ;var _2=function(e){RQ(t,e);function t(r,n,i,s,o,a){var c=e.call(this,r)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(l){try{n(l)}catch(d){r.error(d)}}:e.prototype._next,c._error=s?function(l){try{s(l)}catch(d){r.error(d)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(OQ.Subscriber);Li.OperatorSubscriber=_2});var Zh=h(function(D2){Object.defineProperty(D2,"__esModule",{value:!0});D2.refCount=void 0;var kQ=U(),PQ=K();function IQ(){return kQ.operate(function(e,t){var r=null;e._refCount++;var n=PQ.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){r=null;return}var i=e._connection,s=r;if(r=null,i&&(!s||i===s))i.unsubscribe();t.unsubscribe()});if(e.subscribe(n),!n.closed)r=e.connect()})}D2.refCount=IQ});var hu=h(function(Zo){var TQ=Zo&&Zo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Zo,"__esModule",{value:!0});Zo.ConnectableObservable=void 0;var NQ=ze(),E2=Dr(),qQ=Zh(),jQ=K(),MQ=U(),BQ=function(e){TQ(t,e);function t(r,n){var i=e.call(this)||this;if(i.source=r,i.subjectFactory=n,i._subject=null,i._refCount=0,i._connection=null,MQ.hasLift(r))i.lift=r.lift;return i}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;if(!r||r.isStopped)this._subject=this.subjectFactory();return this._subject},t.prototype._teardown=function(){this._refCount=0;var r=this._connection;this._subject=this._connection=null,r===null||r===void 0||r.unsubscribe()},t.prototype.connect=function(){var r=this,n=this._connection;if(!n){n=this._connection=new E2.Subscription;var i=this.getSubject();if(n.add(this.source.subscribe(jQ.createOperatorSubscriber(i,void 0,function(){r._teardown(),i.complete()},function(s){r._teardown(),i.error(s)},function(){return r._teardown()}))),n.closed)this._connection=null,n=E2.Subscription.EMPTY}return n},t.prototype.refCount=function(){return qQ.refCount()(this)},t}(NQ.Observable);Zo.ConnectableObservable=BQ});var $2=h(function(S2){Object.defineProperty(S2,"__esModule",{value:!0});S2.performanceTimestampProvider=void 0;S2.performanceTimestampProvider={now:function(){return(S2.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var tg=h(function(Xr){var C2=Xr&&Xr.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},F2=Xr&&Xr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.animationFrameProvider=void 0;var LQ=Dr();Xr.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=Xr.animationFrameProvider.delegate;if(n)t=n.requestAnimationFrame,r=n.cancelAnimationFrame;var i=t(function(s){r=void 0,e(s)});return new LQ.Subscription(function(){return r===null||r===void 0?void 0:r(i)})},requestAnimationFrame:function(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Xr.animationFrameProvider.delegate;return((r===null||r===void 0?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,F2([],C2(e)))},cancelAnimationFrame:function(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Xr.animationFrameProvider.delegate;return((r===null||r===void 0?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,F2([],C2(e)))},delegate:void 0}});var P2=h(function(A2){Object.defineProperty(A2,"__esModule",{value:!0});A2.animationFrames=void 0;var UQ=ze(),VQ=$2(),R2=tg();function zQ(e){return e?O2(e):HQ}A2.animationFrames=zQ;function O2(e){return new UQ.Observable(function(t){var r=e||VQ.performanceTimestampProvider,n=r.now(),i=0,s=function(){if(!t.closed)i=R2.animationFrameProvider.requestAnimationFrame(function(o){i=0;var a=r.now();t.next({timestamp:e?a:o,elapsed:a-n}),s()})};return s(),function(){if(i)R2.animationFrameProvider.cancelAnimationFrame(i)}})}var HQ=O2()});var rg=h(function(I2){Object.defineProperty(I2,"__esModule",{value:!0});I2.ObjectUnsubscribedError=void 0;var WQ=Bi();I2.ObjectUnsubscribedError=WQ.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var St=h(function(An){var q2=An&&An.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),GQ=An&&An.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(An,"__esModule",{value:!0});An.AnonymousSubject=An.Subject=void 0;var N2=ze(),ig=Dr(),KQ=rg(),YQ=ci(),ng=Zd(),j2=function(e){q2(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new sg(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new KQ.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;ng.errorContext(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){if(!n.currentObservers)n.currentObservers=Array.from(n.observers);try{for(var o=GQ(n.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(r)}}catch(l){i={error:l}}finally{try{if(a&&!a.done&&(s=o.return))s.call(o)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;ng.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;var i=n.observers;while(i.length)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;ng.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;var n=r.observers;while(n.length)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,s=i.hasError,o=i.isStopped,a=i.observers;if(s||o)return ig.EMPTY_SUBSCRIPTION;return this.currentObservers=null,a.push(r),new ig.Subscription(function(){n.currentObservers=null,YQ.arrRemove(a,r)})},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,s=n.thrownError,o=n.isStopped;if(i)r.error(s);else if(o)r.complete()},t.prototype.asObservable=function(){var r=new N2.Observable;return r.source=this,r},t.create=function(r,n){return new sg(r,n)},t}(N2.Observable);An.Subject=j2;var sg=function(e){q2(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:ig.EMPTY_SUBSCRIPTION},t}(j2);An.AnonymousSubject=sg});var og=h(function(ea){var JQ=ea&&ea.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ea,"__esModule",{value:!0});ea.BehaviorSubject=void 0;var XQ=St(),QQ=function(e){JQ(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,s=r._value;if(n)throw i;return this._throwIfClosed(),s},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(XQ.Subject);ea.BehaviorSubject=QQ});var tf=h(function(M2){Object.defineProperty(M2,"__esModule",{value:!0});M2.dateTimestampProvider=void 0;M2.dateTimestampProvider={now:function(){return(M2.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var rf=h(function(ta){var ZQ=ta&&ta.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ta,"__esModule",{value:!0});ta.ReplaySubject=void 0;var eZ=St(),tZ=tf(),rZ=function(e){ZQ(t,e);function t(r,n,i){if(r===void 0)r=1/0;if(n===void 0)n=1/0;if(i===void 0)i=tZ.dateTimestampProvider;var s=e.call(this)||this;return s._bufferSize=r,s._windowTime=n,s._timestampProvider=i,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=n===1/0,s._bufferSize=Math.max(1,r),s._windowTime=Math.max(1,n),s}return t.prototype.next=function(r){var n=this,i=n.isStopped,s=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,c=n._windowTime;if(!i)s.push(r),!o&&s.push(a.now()+c);this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();var n=this._innerSubscribe(r),i=this,s=i._infiniteTimeWindow,o=i._buffer,a=o.slice();for(var c=0;c<a.length&&!r.closed;c+=s?1:2)r.next(a[c]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,s=r._buffer,o=r._infiniteTimeWindow,a=(o?1:2)*n;if(n<1/0&&a<s.length&&s.splice(0,s.length-a),!o){var c=i.now(),l=0;for(var d=1;d<s.length&&s[d]<=c;d+=2)l=d;l&&s.splice(0,l+1)}},t}(eZ.Subject);ta.ReplaySubject=rZ});var nf=h(function(ra){var nZ=ra&&ra.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ra,"__esModule",{value:!0});ra.AsyncSubject=void 0;var iZ=St(),sZ=function(e){nZ(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._value=null,r._hasValue=!1,r._isComplete=!1,r}return t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,s=n._hasValue,o=n._value,a=n.thrownError,c=n.isStopped,l=n._isComplete;if(i)r.error(a);else if(c||l)s&&r.next(o),r.complete()},t.prototype.next=function(r){if(!this.isStopped)this._value=r,this._hasValue=!0},t.prototype.complete=function(){var r=this,n=r._hasValue,i=r._value,s=r._isComplete;if(!s)this._isComplete=!0,n&&e.prototype.next.call(this,i),e.prototype.complete.call(this)},t}(iZ.Subject);ra.AsyncSubject=sZ});var B2=h(function(na){var oZ=na&&na.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(na,"__esModule",{value:!0});na.Action=void 0;var aZ=Dr(),cZ=function(e){oZ(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){if(n===void 0)n=0;return this},t}(aZ.Subscription);na.Action=cZ});var V2=h(function(kn){var L2=kn&&kn.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},U2=kn&&kn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(kn,"__esModule",{value:!0});kn.intervalProvider=void 0;kn.intervalProvider={setInterval:function(e,t){var r=[];for(var n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=kn.intervalProvider.delegate;if(i===null||i===void 0?void 0:i.setInterval)return i.setInterval.apply(i,U2([e,t],L2(r)));return setInterval.apply(void 0,U2([e,t],L2(r)))},clearInterval:function(e){var t=kn.intervalProvider.delegate;return((t===null||t===void 0?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0}});var sa=h(function(ia){var uZ=ia&&ia.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ia,"__esModule",{value:!0});ia.AsyncAction=void 0;var lZ=B2(),z2=V2(),dZ=ci(),fZ=function(e){uZ(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(r,n){var i;if(n===void 0)n=0;if(this.closed)return this;this.state=r;var s=this.id,o=this.scheduler;if(s!=null)this.id=this.recycleAsyncId(o,s,n);return this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,n),this},t.prototype.requestAsyncId=function(r,n,i){if(i===void 0)i=0;return z2.intervalProvider.setInterval(r.flush.bind(r,this),i)},t.prototype.recycleAsyncId=function(r,n,i){if(i===void 0)i=0;if(i!=null&&this.delay===i&&this.pending===!1)return n;if(n!=null)z2.intervalProvider.clearInterval(n);return},t.prototype.execute=function(r,n){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;else if(this.pending===!1&&this.id!=null)this.id=this.recycleAsyncId(this.scheduler,this.id,null)},t.prototype._execute=function(r,n){var i=!1,s;try{this.work(r)}catch(o){i=!0,s=o?o:Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,s=i.actions;if(this.work=this.state=this.scheduler=null,this.pending=!1,dZ.arrRemove(s,this),n!=null)this.id=this.recycleAsyncId(i,n,null);this.delay=null,e.prototype.unsubscribe.call(this)}},t}(lZ.Action);ia.AsyncAction=fZ});var K2=h(function(W2){Object.defineProperty(W2,"__esModule",{value:!0});W2.TestTools=W2.Immediate=void 0;var pZ=1,cg,sf={};function H2(e){if(e in sf)return delete sf[e],!0;return!1}W2.Immediate={setImmediate:function(e){var t=pZ++;if(sf[t]=!0,!cg)cg=Promise.resolve();return cg.then(function(){return H2(t)&&e()}),t},clearImmediate:function(e){H2(e)}};W2.TestTools={pending:function(){return Object.keys(sf).length}}});var J2=h(function(Pn){var hZ=Pn&&Pn.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},gZ=Pn&&Pn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Pn,"__esModule",{value:!0});Pn.immediateProvider=void 0;var Y2=K2(),yZ=Y2.Immediate.setImmediate,xZ=Y2.Immediate.clearImmediate;Pn.immediateProvider={setImmediate:function(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Pn.immediateProvider.delegate;return((r===null||r===void 0?void 0:r.setImmediate)||yZ).apply(void 0,gZ([],hZ(e)))},clearImmediate:function(e){var t=Pn.immediateProvider.delegate;return((t===null||t===void 0?void 0:t.clearImmediate)||xZ)(e)},delegate:void 0}});var Q2=h(function(oa){var bZ=oa&&oa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(oa,"__esModule",{value:!0});oa.AsapAction=void 0;var vZ=sa(),X2=J2(),_Z=function(e){bZ(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){if(i===void 0)i=0;if(i!==null&&i>0)return e.prototype.requestAsyncId.call(this,r,n,i);return r.actions.push(this),r._scheduled||(r._scheduled=X2.immediateProvider.setImmediate(r.flush.bind(r,void 0)))},t.prototype.recycleAsyncId=function(r,n,i){var s;if(i===void 0)i=0;if(i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var o=r.actions;if(n!=null&&((s=o[o.length-1])===null||s===void 0?void 0:s.id)!==n){if(X2.immediateProvider.clearImmediate(n),r._scheduled===n)r._scheduled=void 0}return},t}(vZ.AsyncAction);oa.AsapAction=_Z});var ug=h(function(Z2){Object.defineProperty(Z2,"__esModule",{value:!0});Z2.Scheduler=void 0;var DZ=tf(),wZ=function(){function e(t,r){if(r===void 0)r=e.now;this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,n){if(r===void 0)r=0;return new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=DZ.dateTimestampProvider.now,e}();Z2.Scheduler=wZ});var ca=h(function(aa){var EZ=aa&&aa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(aa,"__esModule",{value:!0});aa.AsyncScheduler=void 0;var tE=ug(),SZ=function(e){EZ(t,e);function t(r,n){if(n===void 0)n=tE.Scheduler.now;var i=e.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){while(r=n.shift())r.unsubscribe();throw i}},t}(tE.Scheduler);aa.AsyncScheduler=SZ});var rE=h(function(ua){var $Z=ua&&ua.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ua,"__esModule",{value:!0});ua.AsapScheduler=void 0;var CZ=ca(),FZ=function(e){$Z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,s;r=r||i.shift();do if(s=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,s){while((r=i[0])&&r.id===n&&i.shift())r.unsubscribe();throw s}},t}(CZ.AsyncScheduler);ua.AsapScheduler=FZ});var oE=h(function(nE){Object.defineProperty(nE,"__esModule",{value:!0});nE.asap=nE.asapScheduler=void 0;var RZ=Q2(),OZ=rE();nE.asapScheduler=new OZ.AsapScheduler(RZ.AsapAction);nE.asap=nE.asapScheduler});var or=h(function(aE){Object.defineProperty(aE,"__esModule",{value:!0});aE.async=aE.asyncScheduler=void 0;var AZ=sa(),kZ=ca();aE.asyncScheduler=new kZ.AsyncScheduler(AZ.AsyncAction);aE.async=aE.asyncScheduler});var lE=h(function(la){var PZ=la&&la.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(la,"__esModule",{value:!0});la.QueueAction=void 0;var IZ=sa(),TZ=function(e){PZ(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.schedule=function(r,n){if(n===void 0)n=0;if(n>0)return e.prototype.schedule.call(this,r,n);return this.delay=n,this.state=r,this.scheduler.flush(this),this},t.prototype.execute=function(r,n){return n>0||this.closed?e.prototype.execute.call(this,r,n):this._execute(r,n)},t.prototype.requestAsyncId=function(r,n,i){if(i===void 0)i=0;if(i!=null&&i>0||i==null&&this.delay>0)return e.prototype.requestAsyncId.call(this,r,n,i);return r.flush(this),0},t}(IZ.AsyncAction);la.QueueAction=TZ});var dE=h(function(da){var NZ=da&&da.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(da,"__esModule",{value:!0});da.QueueScheduler=void 0;var qZ=ca(),jZ=function(e){NZ(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(qZ.AsyncScheduler);da.QueueScheduler=jZ});var hE=h(function(fE){Object.defineProperty(fE,"__esModule",{value:!0});fE.queue=fE.queueScheduler=void 0;var MZ=lE(),BZ=dE();fE.queueScheduler=new BZ.QueueScheduler(MZ.QueueAction);fE.queue=fE.queueScheduler});var yE=h(function(fa){var LZ=fa&&fa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(fa,"__esModule",{value:!0});fa.AnimationFrameAction=void 0;var UZ=sa(),gE=tg(),VZ=function(e){LZ(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){if(i===void 0)i=0;if(i!==null&&i>0)return e.prototype.requestAsyncId.call(this,r,n,i);return r.actions.push(this),r._scheduled||(r._scheduled=gE.animationFrameProvider.requestAnimationFrame(function(){return r.flush(void 0)}))},t.prototype.recycleAsyncId=function(r,n,i){var s;if(i===void 0)i=0;if(i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var o=r.actions;if(n!=null&&n===r._scheduled&&((s=o[o.length-1])===null||s===void 0?void 0:s.id)!==n)gE.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0;return},t}(UZ.AsyncAction);fa.AnimationFrameAction=VZ});var xE=h(function(pa){var zZ=pa&&pa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(pa,"__esModule",{value:!0});pa.AnimationFrameScheduler=void 0;var HZ=ca(),WZ=function(e){zZ(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n;if(r)n=r.id;else n=this._scheduled,this._scheduled=void 0;var i=this.actions,s;r=r||i.shift();do if(s=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,s){while((r=i[0])&&r.id===n&&i.shift())r.unsubscribe();throw s}},t}(HZ.AsyncScheduler);pa.AnimationFrameScheduler=WZ});var DE=h(function(bE){Object.defineProperty(bE,"__esModule",{value:!0});bE.animationFrame=bE.animationFrameScheduler=void 0;var GZ=yE(),KZ=xE();bE.animationFrameScheduler=new KZ.AnimationFrameScheduler(GZ.AnimationFrameAction);bE.animationFrame=bE.animationFrameScheduler});var SE=h(function(Ui){var wE=Ui&&Ui.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.VirtualAction=Ui.VirtualTimeScheduler=void 0;var YZ=sa(),JZ=Dr(),XZ=ca(),QZ=function(e){wE(t,e);function t(r,n){if(r===void 0)r=EE;if(n===void 0)n=1/0;var i=e.call(this,r,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return t.prototype.flush=function(){var r=this,n=r.actions,i=r.maxFrames,s,o;while((o=n[0])&&o.delay<=i)if(n.shift(),this.frame=o.delay,s=o.execute(o.state,o.delay))break;if(s){while(o=n.shift())o.unsubscribe();throw s}},t.frameTimeFactor=10,t}(XZ.AsyncScheduler);Ui.VirtualTimeScheduler=QZ;var EE=function(e){wE(t,e);function t(r,n,i){if(i===void 0)i=r.index+=1;var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s.index=i,s.active=!0,s.index=r.index=i,s}return t.prototype.schedule=function(r,n){if(n===void 0)n=0;if(Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}else return JZ.Subscription.EMPTY},t.prototype.requestAsyncId=function(r,n,i){if(i===void 0)i=0;this.delay=r.frame+i;var s=r.actions;return s.push(this),s.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(r,n,i){if(i===void 0)i=0;return},t.prototype._execute=function(r,n){if(this.active===!0)return e.prototype._execute.call(this,r,n)},t.sortActions=function(r,n){if(r.delay===n.delay)if(r.index===n.index)return 0;else if(r.index>n.index)return 1;else return-1;else if(r.delay>n.delay)return 1;else return-1},t}(YZ.AsyncAction);Ui.VirtualAction=EE});var Qr=h(function(CE){Object.defineProperty(CE,"__esModule",{value:!0});CE.empty=CE.EMPTY=void 0;var $E=ze();CE.EMPTY=new $E.Observable(function(e){return e.complete()});function ZZ(e){return e?eee(e):CE.EMPTY}CE.empty=ZZ;function eee(e){return new $E.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var gu=h(function(OE){Object.defineProperty(OE,"__esModule",{value:!0});OE.isScheduler=void 0;var tee=Le();function ree(e){return e&&tee.isFunction(e.schedule)}OE.isScheduler=ree});var ar=h(function(kE){Object.defineProperty(kE,"__esModule",{value:!0});kE.popNumber=kE.popScheduler=kE.popResultSelector=void 0;var nee=Le(),iee=gu();function lg(e){return e[e.length-1]}function see(e){return nee.isFunction(lg(e))?e.pop():void 0}kE.popResultSelector=see;function oee(e){return iee.isScheduler(lg(e))?e.pop():void 0}kE.popScheduler=oee;function aee(e,t){return typeof lg(e)==="number"?e.pop():t}kE.popNumber=aee});var of=h(function(IE){Object.defineProperty(IE,"__esModule",{value:!0});IE.isArrayLike=void 0;IE.isArrayLike=function(e){return e&&typeof e.length==="number"&&typeof e!=="function"}});var dg=h(function(NE){Object.defineProperty(NE,"__esModule",{value:!0});NE.isPromise=void 0;var lee=Le();function dee(e){return lee.isFunction(e===null||e===void 0?void 0:e.then)}NE.isPromise=dee});var fg=h(function(jE){Object.defineProperty(jE,"__esModule",{value:!0});jE.isInteropObservable=void 0;var fee=pu(),pee=Le();function mee(e){return pee.isFunction(e[fee.observable])}jE.isInteropObservable=mee});var pg=h(function(BE){Object.defineProperty(BE,"__esModule",{value:!0});BE.isAsyncIterable=void 0;var hee=Le();function gee(e){return Symbol.asyncIterator&&hee.isFunction(e===null||e===void 0?void 0:e[Symbol.asyncIterator])}BE.isAsyncIterable=gee});var mg=h(function(UE){Object.defineProperty(UE,"__esModule",{value:!0});UE.createInvalidObservableTypeError=void 0;function yee(e){return TypeError("You provided "+(e!==null&&typeof e==="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}UE.createInvalidObservableTypeError=yee});var hg=h(function(HE){Object.defineProperty(HE,"__esModule",{value:!0});HE.iterator=HE.getSymbolIterator=void 0;function zE(){if(typeof Symbol!=="function"||!Symbol.iterator)return"@@iterator";return Symbol.iterator}HE.getSymbolIterator=zE;HE.iterator=zE()});var gg=h(function(GE){Object.defineProperty(GE,"__esModule",{value:!0});GE.isIterable=void 0;var bee=hg(),vee=Le();function _ee(e){return vee.isFunction(e===null||e===void 0?void 0:e[bee.iterator])}GE.isIterable=_ee});var af=h(function(Pr){var Dee=Pr&&Pr.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(d){return c([l,d])}}function c(l){if(n)throw TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;if(i=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if((s=r.trys,!(s=s.length>0&&s[s.length-1]))&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}if(s[2])r.ops.pop();r.trys.pop();continue}l=t.call(e,r)}catch(d){l=[6,d],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},ma=Pr&&Pr.__await||function(e){return this instanceof ma?(this.v=e,this):new ma(e)},wee=Pr&&Pr.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(m){if(n[m])i[m]=function(p){return new Promise(function(g,y){s.push([m,p,g,y])>1||a(m,p)})}}function a(m,p){try{c(n[m](p))}catch(g){f(s[0][3],g)}}function c(m){m.value instanceof ma?Promise.resolve(m.value.v).then(l,d):f(s[0][2],m)}function l(m){a("next",m)}function d(m){a("throw",m)}function f(m,p){if(m(p),s.shift(),s.length)a(s[0][0],s[0][1])}};Object.defineProperty(Pr,"__esModule",{value:!0});Pr.isReadableStreamLike=Pr.readableStreamLikeToAsyncGenerator=void 0;var Eee=Le();function See(e){return wee(this,arguments,function(){var r,n,i,s;return Dee(this,function(o){switch(o.label){case 0:r=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,ma(r.read())];case 3:if(n=o.sent(),i=n.value,s=n.done,!s)return[3,5];return[4,ma(void 0)];case 4:return[2,o.sent()];case 5:return[4,ma(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}Pr.readableStreamLikeToAsyncGenerator=See;function $ee(e){return Eee.isFunction(e===null||e===void 0?void 0:e.getReader)}Pr.isReadableStreamLike=$ee});var ce=h(function(it){var Cee=it&&it.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):i(d.value).then(a,c)}l((n=n.apply(e,t||[])).next())})},Fee=it&&it.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(d){return c([l,d])}}function c(l){if(n)throw TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;if(i=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if((s=r.trys,!(s=s.length>0&&s[s.length-1]))&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}if(s[2])r.ops.pop();r.trys.pop();continue}l=t.call(e,r)}catch(d){l=[6,d],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ree=it&&it.__asyncValues||function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof yg==="function"?yg(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(a,c){o=e[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}},yg=it&&it.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(it,"__esModule",{value:!0});it.fromReadableStreamLike=it.fromAsyncIterable=it.fromIterable=it.fromPromise=it.fromArrayLike=it.fromInteropObservable=it.innerFrom=void 0;var Oee=of(),Aee=dg(),ha=ze(),kee=fg(),Pee=pg(),Iee=mg(),Tee=gg(),YE=af(),Nee=Le(),qee=Wh(),jee=pu();function Mee(e){if(e instanceof ha.Observable)return e;if(e!=null){if(kee.isInteropObservable(e))return JE(e);if(Oee.isArrayLike(e))return XE(e);if(Aee.isPromise(e))return QE(e);if(Pee.isAsyncIterable(e))return xg(e);if(Tee.isIterable(e))return ZE(e);if(YE.isReadableStreamLike(e))return eS(e)}throw Iee.createInvalidObservableTypeError(e)}it.innerFrom=Mee;function JE(e){return new ha.Observable(function(t){var r=e[jee.observable]();if(Nee.isFunction(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")})}it.fromInteropObservable=JE;function XE(e){return new ha.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}it.fromArrayLike=XE;function QE(e){return new ha.Observable(function(t){e.then(function(r){if(!t.closed)t.next(r),t.complete()},function(r){return t.error(r)}).then(null,qee.reportUnhandledError)})}it.fromPromise=QE;function ZE(e){return new ha.Observable(function(t){var r,n;try{for(var i=yg(e),s=i.next();!s.done;s=i.next()){var o=s.value;if(t.next(o),t.closed)return}}catch(a){r={error:a}}finally{try{if(s&&!s.done&&(n=i.return))n.call(i)}finally{if(r)throw r.error}}t.complete()})}it.fromIterable=ZE;function xg(e){return new ha.Observable(function(t){Bee(e,t).catch(function(r){return t.error(r)})})}it.fromAsyncIterable=xg;function eS(e){return xg(YE.readableStreamLikeToAsyncGenerator(e))}it.fromReadableStreamLike=eS;function Bee(e,t){var r,n,i,s;return Cee(this,void 0,void 0,function(){var o,a;return Fee(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=Ree(e),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),i={error:a},[3,11];case 6:if(c.trys.push([6,,9,10]),!(n&&!n.done&&(s=r.return)))return[3,8];return[4,s.call(r)];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}});var ui=h(function(tS){Object.defineProperty(tS,"__esModule",{value:!0});tS.executeSchedule=void 0;function Lee(e,t,r,n,i){if(n===void 0)n=0;if(i===void 0)i=!1;var s=t.schedule(function(){if(r(),i)e.add(this.schedule(null,n));else this.unsubscribe()},n);if(e.add(s),!i)return s}tS.executeSchedule=Lee});var yu=h(function(nS){Object.defineProperty(nS,"__esModule",{value:!0});nS.observeOn=void 0;var bg=ui(),Uee=U(),Vee=K();function zee(e,t){if(t===void 0)t=0;return Uee.operate(function(r,n){r.subscribe(Vee.createOperatorSubscriber(n,function(i){return bg.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return bg.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return bg.executeSchedule(n,e,function(){return n.error(i)},t)}))})}nS.observeOn=zee});var xu=h(function(sS){Object.defineProperty(sS,"__esModule",{value:!0});sS.subscribeOn=void 0;var Hee=U();function Wee(e,t){if(t===void 0)t=0;return Hee.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}sS.subscribeOn=Wee});var uS=h(function(aS){Object.defineProperty(aS,"__esModule",{value:!0});aS.scheduleObservable=void 0;var Gee=ce(),Kee=yu(),Yee=xu();function Jee(e,t){return Gee.innerFrom(e).pipe(Yee.subscribeOn(t),Kee.observeOn(t))}aS.scheduleObservable=Jee});var fS=h(function(lS){Object.defineProperty(lS,"__esModule",{value:!0});lS.schedulePromise=void 0;var Xee=ce(),Qee=yu(),Zee=xu();function ete(e,t){return Xee.innerFrom(e).pipe(Zee.subscribeOn(t),Qee.observeOn(t))}lS.schedulePromise=ete});var hS=h(function(pS){Object.defineProperty(pS,"__esModule",{value:!0});pS.scheduleArray=void 0;var tte=ze();function rte(e,t){return new tte.Observable(function(r){var n=0;return t.schedule(function(){if(n===e.length)r.complete();else if(r.next(e[n++]),!r.closed)this.schedule()})})}pS.scheduleArray=rte});var vg=h(function(yS){Object.defineProperty(yS,"__esModule",{value:!0});yS.scheduleIterable=void 0;var nte=ze(),ite=hg(),ste=Le(),gS=ui();function ote(e,t){return new nte.Observable(function(r){var n;return gS.executeSchedule(r,t,function(){n=e[ite.iterator](),gS.executeSchedule(r,t,function(){var i,s,o;try{i=n.next(),s=i.value,o=i.done}catch(a){r.error(a);return}if(o)r.complete();else r.next(s)},0,!0)}),function(){return ste.isFunction(n===null||n===void 0?void 0:n.return)&&n.return()}})}yS.scheduleIterable=ote});var _g=h(function(vS){Object.defineProperty(vS,"__esModule",{value:!0});vS.scheduleAsyncIterable=void 0;var ate=ze(),bS=ui();function cte(e,t){if(!e)throw Error("Iterable cannot be null");return new ate.Observable(function(r){bS.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();bS.executeSchedule(r,t,function(){n.next().then(function(i){if(i.done)r.complete();else r.next(i.value)})},0,!0)})})}vS.scheduleAsyncIterable=cte});var ES=h(function(DS){Object.defineProperty(DS,"__esModule",{value:!0});DS.scheduleReadableStreamLike=void 0;var ute=_g(),lte=af();function dte(e,t){return ute.scheduleAsyncIterable(lte.readableStreamLikeToAsyncGenerator(e),t)}DS.scheduleReadableStreamLike=dte});var Dg=h(function(SS){Object.defineProperty(SS,"__esModule",{value:!0});SS.scheduled=void 0;var fte=uS(),pte=fS(),mte=hS(),hte=vg(),gte=_g(),yte=fg(),xte=dg(),bte=of(),vte=gg(),_te=pg(),Dte=mg(),wte=af(),Ete=ES();function Ste(e,t){if(e!=null){if(yte.isInteropObservable(e))return fte.scheduleObservable(e,t);if(bte.isArrayLike(e))return mte.scheduleArray(e,t);if(xte.isPromise(e))return pte.schedulePromise(e,t);if(_te.isAsyncIterable(e))return gte.scheduleAsyncIterable(e,t);if(vte.isIterable(e))return hte.scheduleIterable(e,t);if(wte.isReadableStreamLike(e))return Ete.scheduleReadableStreamLike(e,t)}throw Dte.createInvalidObservableTypeError(e)}SS.scheduled=Ste});var li=h(function(CS){Object.defineProperty(CS,"__esModule",{value:!0});CS.from=void 0;var $te=Dg(),Cte=ce();function Fte(e,t){return t?$te.scheduled(e,t):Cte.innerFrom(e)}CS.from=Fte});var cf=h(function(RS){Object.defineProperty(RS,"__esModule",{value:!0});RS.of=void 0;var Rte=ar(),Ote=li();function Ate(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Rte.popScheduler(e);return Ote.from(e,r)}RS.of=Ate});var wg=h(function(AS){Object.defineProperty(AS,"__esModule",{value:!0});AS.throwError=void 0;var kte=ze(),Pte=Le();function Ite(e,t){var r=Pte.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new kte.Observable(t?function(i){return t.schedule(n,0,i)}:n)}AS.throwError=Ite});var uf=h(function(TS){Object.defineProperty(TS,"__esModule",{value:!0});TS.observeNotification=TS.Notification=TS.NotificationKind=void 0;var Tte=Qr(),Nte=cf(),qte=wg(),jte=Le(),Mte;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(Mte=TS.NotificationKind||(TS.NotificationKind={}));var Bte=function(){function e(t,r,n){this.kind=t,this.value=r,this.error=n,this.hasValue=t==="N"}return e.prototype.observe=function(t){return IS(this,t)},e.prototype.do=function(t,r,n){var i=this,s=i.kind,o=i.value,a=i.error;return s==="N"?t===null||t===void 0?void 0:t(o):s==="E"?r===null||r===void 0?void 0:r(a):n===null||n===void 0?void 0:n()},e.prototype.accept=function(t,r,n){var i;return jte.isFunction((i=t)===null||i===void 0?void 0:i.next)?this.observe(t):this.do(t,r,n)},e.prototype.toObservable=function(){var t=this,r=t.kind,n=t.value,i=t.error,s=r==="N"?Nte.of(n):r==="E"?qte.throwError(function(){return i}):r==="C"?Tte.EMPTY:0;if(!s)throw TypeError("Unexpected notification kind "+r);return s},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();TS.Notification=Bte;function IS(e,t){var r,n,i,s=e,o=s.kind,a=s.value,c=s.error;if(typeof o!=="string")throw TypeError('Invalid notification, missing "kind"');o==="N"?(r=t.next)===null||r===void 0||r.call(t,a):o==="E"?(n=t.error)===null||n===void 0||n.call(t,c):(i=t.complete)===null||i===void 0||i.call(t)}TS.observeNotification=IS});var BS=h(function(jS){Object.defineProperty(jS,"__esModule",{value:!0});jS.isObservable=void 0;var Ute=ze(),qS=Le();function Vte(e){return!!e&&(e instanceof Ute.Observable||qS.isFunction(e.lift)&&qS.isFunction(e.subscribe))}jS.isObservable=Vte});var Vi=h(function(LS){Object.defineProperty(LS,"__esModule",{value:!0});LS.EmptyError=void 0;var zte=Bi();LS.EmptyError=zte.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var HS=h(function(VS){Object.defineProperty(VS,"__esModule",{value:!0});VS.lastValueFrom=void 0;var Hte=Vi();function Wte(e,t){var r=typeof t==="object";return new Promise(function(n,i){var s=!1,o;e.subscribe({next:function(a){o=a,s=!0},error:i,complete:function(){if(s)n(o);else if(r)n(t.defaultValue);else i(new Hte.EmptyError)}})})}VS.lastValueFrom=Wte});var KS=h(function(WS){Object.defineProperty(WS,"__esModule",{value:!0});WS.firstValueFrom=void 0;var Gte=Vi(),Kte=Qo();function Yte(e,t){var r=typeof t==="object";return new Promise(function(n,i){var s=new Kte.SafeSubscriber({next:function(o){n(o),s.unsubscribe()},error:i,complete:function(){if(r)n(t.defaultValue);else i(new Gte.EmptyError)}});e.subscribe(s)})}WS.firstValueFrom=Yte});var Eg=h(function(YS){Object.defineProperty(YS,"__esModule",{value:!0});YS.ArgumentOutOfRangeError=void 0;var Jte=Bi();YS.ArgumentOutOfRangeError=Jte.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var Sg=h(function(XS){Object.defineProperty(XS,"__esModule",{value:!0});XS.NotFoundError=void 0;var Xte=Bi();XS.NotFoundError=Xte.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var $g=h(function(ZS){Object.defineProperty(ZS,"__esModule",{value:!0});ZS.SequenceError=void 0;var Qte=Bi();ZS.SequenceError=Qte.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var lf=h(function(t$){Object.defineProperty(t$,"__esModule",{value:!0});t$.isValidDate=void 0;function Zte(e){return e instanceof Date&&!isNaN(e)}t$.isValidDate=Zte});var df=h(function(n$){Object.defineProperty(n$,"__esModule",{value:!0});n$.timeout=n$.TimeoutError=void 0;var ere=or(),tre=lf(),rre=U(),nre=ce(),ire=Bi(),sre=K(),ore=ui();n$.TimeoutError=ire.createErrorClass(function(e){return function(r){if(r===void 0)r=null;e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function are(e,t){var r=tre.isValidDate(e)?{first:e}:typeof e==="number"?{each:e}:e,n=r.first,i=r.each,s=r.with,o=s===void 0?cre:s,a=r.scheduler,c=a===void 0?t!==null&&t!==void 0?t:ere.asyncScheduler:a,l=r.meta,d=l===void 0?null:l;if(n==null&&i==null)throw TypeError("No timeout provided.");return rre.operate(function(f,m){var p,g,y=null,x=0,v=function(_){g=ore.executeSchedule(m,c,function(){try{p.unsubscribe(),nre.innerFrom(o({meta:d,lastValue:y,seen:x})).subscribe(m)}catch(E){m.error(E)}},_)};p=f.subscribe(sre.createOperatorSubscriber(m,function(_){g===null||g===void 0||g.unsubscribe(),x++,m.next(y=_),i>0&&v(i)},void 0,void 0,function(){if(!(g===null||g===void 0?void 0:g.closed))g===null||g===void 0||g.unsubscribe();y=null})),!x&&v(n!=null?typeof n==="number"?n:+n-c.now():i)})}n$.timeout=are;function cre(e){throw new n$.TimeoutError(e)}});var zi=h(function(o$){Object.defineProperty(o$,"__esModule",{value:!0});o$.map=void 0;var ure=U(),lre=K();function dre(e,t){return ure.operate(function(r,n){var i=0;r.subscribe(lre.createOperatorSubscriber(n,function(s){n.next(e.call(t,s,i++))}))})}o$.map=dre});var Wi=h(function(Hi){var fre=Hi&&Hi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},pre=Hi&&Hi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.mapOneOrManyArgs=void 0;var mre=zi(),hre=Array.isArray;function gre(e,t){return hre(t)?e.apply(void 0,pre([],fre(t))):e(t)}function yre(e){return mre.map(function(t){return gre(e,t)})}Hi.mapOneOrManyArgs=yre});var Fg=h(function(Gi){var xre=Gi&&Gi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},c$=Gi&&Gi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Gi,"__esModule",{value:!0});Gi.bindCallbackInternals=void 0;var bre=gu(),vre=ze(),_re=xu(),Dre=Wi(),wre=yu(),Ere=nf();function Cg(e,t,r,n){if(r)if(bre.isScheduler(r))n=r;else return function(){var i=[];for(var s=0;s<arguments.length;s++)i[s]=arguments[s];return Cg(e,t,n).apply(this,i).pipe(Dre.mapOneOrManyArgs(r))};if(n)return function(){var i=[];for(var s=0;s<arguments.length;s++)i[s]=arguments[s];return Cg(e,t).apply(this,i).pipe(_re.subscribeOn(n),wre.observeOn(n))};return function(){var i=this,s=[];for(var o=0;o<arguments.length;o++)s[o]=arguments[o];var a=new Ere.AsyncSubject,c=!0;return new vre.Observable(function(l){var d=a.subscribe(l);if(c){c=!1;var f=!1,m=!1;if(t.apply(i,c$(c$([],xre(s)),[function(){var p=[];for(var g=0;g<arguments.length;g++)p[g]=arguments[g];if(e){var y=p.shift();if(y!=null){a.error(y);return}}if(a.next(1<p.length?p:p[0]),m=!0,f)a.complete()}])),m)a.complete();f=!0}return d})}}Gi.bindCallbackInternals=Cg});var d$=h(function(u$){Object.defineProperty(u$,"__esModule",{value:!0});u$.bindCallback=void 0;var Sre=Fg();function $re(e,t,r){return Sre.bindCallbackInternals(!1,e,t,r)}u$.bindCallback=$re});var m$=h(function(f$){Object.defineProperty(f$,"__esModule",{value:!0});f$.bindNodeCallback=void 0;var Cre=Fg();function Fre(e,t,r){return Cre.bindCallbackInternals(!0,e,t,r)}f$.bindNodeCallback=Fre});var Rg=h(function(h$){Object.defineProperty(h$,"__esModule",{value:!0});h$.argsArgArrayOrObject=void 0;var Rre=Array.isArray,Ore=Object.getPrototypeOf,Are=Object.prototype,kre=Object.keys;function Pre(e){if(e.length===1){var t=e[0];if(Rre(t))return{args:t,keys:null};if(Ire(t)){var r=kre(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}h$.argsArgArrayOrObject=Pre;function Ire(e){return e&&typeof e==="object"&&Ore(e)===Are}});var Og=h(function(y$){Object.defineProperty(y$,"__esModule",{value:!0});y$.createObject=void 0;function Tre(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}y$.createObject=Tre});var ff=h(function(E$){Object.defineProperty(E$,"__esModule",{value:!0});E$.combineLatestInit=E$.combineLatest=void 0;var Nre=ze(),qre=Rg(),_$=li(),D$=Et(),jre=Wi(),b$=ar(),Mre=Og(),Bre=K(),Lre=ui();function Ure(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=b$.popScheduler(e),n=b$.popResultSelector(e),i=qre.argsArgArrayOrObject(e),s=i.args,o=i.keys;if(s.length===0)return _$.from([],r);var a=new Nre.Observable(w$(s,r,o?function(c){return Mre.createObject(o,c)}:D$.identity));return n?a.pipe(jre.mapOneOrManyArgs(n)):a}E$.combineLatest=Ure;function w$(e,t,r){if(r===void 0)r=D$.identity;return function(n){v$(t,function(){var i=e.length,s=Array(i),o=i,a=i,c=function(d){v$(t,function(){var f=_$.from(e[d],t),m=!1;f.subscribe(Bre.createOperatorSubscriber(n,function(p){if(s[d]=p,!m)m=!0,a--;if(!a)n.next(r(s.slice()))},function(){if(!--o)n.complete()}))},n)};for(var l=0;l<i;l++)c(l)},n)}}E$.combineLatestInit=w$;function v$(e,t,r){if(e)Lre.executeSchedule(r,e,t);else t()}});var pf=h(function(C$){Object.defineProperty(C$,"__esModule",{value:!0});C$.mergeInternals=void 0;var zre=ce(),Hre=ui(),$$=K();function Wre(e,t,r,n,i,s,o,a){var c=[],l=0,d=0,f=!1,m=function(){if(f&&!c.length&&!l)t.complete()},p=function(y){return l<n?g(y):c.push(y)},g=function(y){s&&t.next(y),l++;var x=!1;zre.innerFrom(r(y,d++)).subscribe($$.createOperatorSubscriber(t,function(v){if(i===null||i===void 0||i(v),s)p(v);else t.next(v)},function(){x=!0},void 0,function(){if(x)try{l--;var v=function(){var _=c.shift();if(o)Hre.executeSchedule(t,o,function(){return g(_)});else g(_)};while(c.length&&l<n)v();m()}catch(_){t.error(_)}}))};return e.subscribe($$.createOperatorSubscriber(t,p,function(){f=!0,m()})),function(){a===null||a===void 0||a()}}C$.mergeInternals=Wre});var di=h(function(O$){Object.defineProperty(O$,"__esModule",{value:!0});O$.mergeMap=void 0;var Gre=zi(),Kre=ce(),Yre=U(),Jre=pf(),Xre=Le();function R$(e,t,r){if(r===void 0)r=1/0;if(Xre.isFunction(t))return R$(function(n,i){return Gre.map(function(s,o){return t(n,s,i,o)})(Kre.innerFrom(e(n,i)))},r);else if(typeof t==="number")r=t;return Yre.operate(function(n,i){return Jre.mergeInternals(n,i,e,r)})}O$.mergeMap=R$});var bu=h(function(k$){Object.defineProperty(k$,"__esModule",{value:!0});k$.mergeAll=void 0;var Qre=di(),Zre=Et();function ene(e){if(e===void 0)e=1/0;return Qre.mergeMap(Zre.identity,e)}k$.mergeAll=ene});var mf=h(function(I$){Object.defineProperty(I$,"__esModule",{value:!0});I$.concatAll=void 0;var tne=bu();function rne(){return tne.mergeAll(1)}I$.concatAll=rne});var vu=h(function(N$){Object.defineProperty(N$,"__esModule",{value:!0});N$.concat=void 0;var nne=mf(),ine=ar(),sne=li();function one(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return nne.concatAll()(sne.from(e,ine.popScheduler(e)))}N$.concat=one});var _u=h(function(j$){Object.defineProperty(j$,"__esModule",{value:!0});j$.defer=void 0;var ane=ze(),cne=ce();function une(e){return new ane.Observable(function(t){cne.innerFrom(e()).subscribe(t)})}j$.defer=une});var U$=h(function(B$){Object.defineProperty(B$,"__esModule",{value:!0});B$.connectable=void 0;var lne=St(),dne=ze(),fne=_u(),pne={connector:function(){return new lne.Subject},resetOnDisconnect:!0};function mne(e,t){if(t===void 0)t=pne;var r=null,n=t.connector,i=t.resetOnDisconnect,s=i===void 0?!0:i,o=n(),a=new dne.Observable(function(c){return o.subscribe(c)});return a.connect=function(){if(!r||r.closed){if(r=fne.defer(function(){return e}).subscribe(o),s)r.add(function(){return o=n()})}return r},a}B$.connectable=mne});var H$=h(function(V$){Object.defineProperty(V$,"__esModule",{value:!0});V$.forkJoin=void 0;var hne=ze(),gne=Rg(),yne=ce(),xne=ar(),bne=K(),vne=Wi(),_ne=Og();function Dne(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xne.popResultSelector(e),n=gne.argsArgArrayOrObject(e),i=n.args,s=n.keys,o=new hne.Observable(function(a){var c=i.length;if(!c){a.complete();return}var l=Array(c),d=c,f=c,m=function(g){var y=!1;yne.innerFrom(i[g]).subscribe(bne.createOperatorSubscriber(a,function(x){if(!y)y=!0,f--;l[g]=x},function(){return d--},void 0,function(){if(!d||!y){if(!f)a.next(s?_ne.createObject(s,l):l);a.complete()}}))};for(var p=0;p<c;p++)m(p)});return r?o.pipe(vne.mapOneOrManyArgs(r)):o}V$.forkJoin=Dne});var G$=h(function(ga){var wne=ga&&ga.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s};Object.defineProperty(ga,"__esModule",{value:!0});ga.fromEvent=void 0;var Ene=ce(),Sne=ze(),$ne=di(),Cne=of(),Ks=Le(),Fne=Wi(),Rne=["addListener","removeListener"],One=["addEventListener","removeEventListener"],Ane=["on","off"];function Ag(e,t,r,n){if(Ks.isFunction(r))n=r,r=void 0;if(n)return Ag(e,t,r).pipe(Fne.mapOneOrManyArgs(n));var i=wne(Ine(e)?One.map(function(a){return function(c){return e[a](t,c,r)}}):kne(e)?Rne.map(W$(e,t)):Pne(e)?Ane.map(W$(e,t)):[],2),s=i[0],o=i[1];if(!s){if(Cne.isArrayLike(e))return $ne.mergeMap(function(a){return Ag(a,t,r)})(Ene.innerFrom(e))}if(!s)throw TypeError("Invalid event target");return new Sne.Observable(function(a){var c=function(){var l=[];for(var d=0;d<arguments.length;d++)l[d]=arguments[d];return a.next(1<l.length?l:l[0])};return s(c),function(){return o(c)}})}ga.fromEvent=Ag;function W$(e,t){return function(r){return function(n){return e[r](t,n)}}}function kne(e){return Ks.isFunction(e.addListener)&&Ks.isFunction(e.removeListener)}function Pne(e){return Ks.isFunction(e.on)&&Ks.isFunction(e.off)}function Ine(e){return Ks.isFunction(e.addEventListener)&&Ks.isFunction(e.removeEventListener)}});var X$=h(function(Y$){Object.defineProperty(Y$,"__esModule",{value:!0});Y$.fromEventPattern=void 0;var Tne=ze(),Nne=Le(),qne=Wi();function K$(e,t,r){if(r)return K$(e,t).pipe(qne.mapOneOrManyArgs(r));return new Tne.Observable(function(n){var i=function(){var o=[];for(var a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},s=e(i);return Nne.isFunction(t)?function(){return t(i,s)}:void 0})}Y$.fromEventPattern=K$});var Z$=h(function(ya){var jne=ya&&ya.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(d){return c([l,d])}}function c(l){if(n)throw TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;if(i=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if((s=r.trys,!(s=s.length>0&&s[s.length-1]))&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}if(s[2])r.ops.pop();r.trys.pop();continue}l=t.call(e,r)}catch(d){l=[6,d],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(ya,"__esModule",{value:!0});ya.generate=void 0;var Q$=Et(),Mne=gu(),Bne=_u(),Lne=vg();function Une(e,t,r,n,i){var s,o,a,c;if(arguments.length===1)s=e,c=s.initialState,t=s.condition,r=s.iterate,o=s.resultSelector,a=o===void 0?Q$.identity:o,i=s.scheduler;else if(c=e,!n||Mne.isScheduler(n))a=Q$.identity,i=n;else a=n;function l(){var d;return jne(this,function(f){switch(f.label){case 0:d=c,f.label=1;case 1:if(!(!t||t(d)))return[3,4];return[4,a(d)];case 2:f.sent(),f.label=3;case 3:return d=r(d),[3,1];case 4:return[2]}})}return Bne.defer(i?function(){return Lne.scheduleIterable(l(),i)}:l)}ya.generate=Une});var rC=h(function(eC){Object.defineProperty(eC,"__esModule",{value:!0});eC.iif=void 0;var Vne=_u();function zne(e,t,r){return Vne.defer(function(){return e()?t:r})}eC.iif=zne});var Ki=h(function(nC){Object.defineProperty(nC,"__esModule",{value:!0});nC.timer=void 0;var Hne=ze(),Wne=or(),Gne=gu(),Kne=lf();function Yne(e,t,r){if(e===void 0)e=0;if(r===void 0)r=Wne.async;var n=-1;if(t!=null)if(Gne.isScheduler(t))r=t;else n=t;return new Hne.Observable(function(i){var s=Kne.isValidDate(e)?+e-r.now():e;if(s<0)s=0;var o=0;return r.schedule(function(){if(!i.closed)if(i.next(o++),0<=n)this.schedule(void 0,n);else i.complete()},s)})}nC.timer=Yne});var kg=h(function(sC){Object.defineProperty(sC,"__esModule",{value:!0});sC.interval=void 0;var Jne=or(),Xne=Ki();function Qne(e,t){if(e===void 0)e=0;if(t===void 0)t=Jne.asyncScheduler;if(e<0)e=0;return Xne.timer(e,e,t)}sC.interval=Qne});var lC=h(function(cC){Object.defineProperty(cC,"__esModule",{value:!0});cC.merge=void 0;var Zne=bu(),eie=ce(),tie=Qr(),aC=ar(),rie=li();function nie(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=aC.popScheduler(e),n=aC.popNumber(e,1/0),i=e;return!i.length?tie.EMPTY:i.length===1?eie.innerFrom(i[0]):Zne.mergeAll(n)(rie.from(i,r))}cC.merge=nie});var Pg=h(function(dC){Object.defineProperty(dC,"__esModule",{value:!0});dC.never=dC.NEVER=void 0;var iie=ze(),sie=wt();dC.NEVER=new iie.Observable(sie.noop);function oie(){return dC.NEVER}dC.never=oie});var xa=h(function(mC){Object.defineProperty(mC,"__esModule",{value:!0});mC.argsOrArgArray=void 0;var aie=Array.isArray;function cie(e){return e.length===1&&aie(e[0])?e[0]:e}mC.argsOrArgArray=cie});var Ig=h(function(yC){Object.defineProperty(yC,"__esModule",{value:!0});yC.onErrorResumeNext=void 0;var uie=ze(),lie=xa(),die=K(),gC=wt(),fie=ce();function pie(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=lie.argsOrArgArray(e);return new uie.Observable(function(n){var i=0,s=function(){if(i<r.length){var o=void 0;try{o=fie.innerFrom(r[i++])}catch(c){s();return}var a=new die.OperatorSubscriber(n,void 0,gC.noop,gC.noop);o.subscribe(a),a.add(s)}else n.complete()};s()})}yC.onErrorResumeNext=pie});var _C=h(function(bC){Object.defineProperty(bC,"__esModule",{value:!0});bC.pairs=void 0;var mie=li();function hie(e,t){return mie.from(Object.entries(e),t)}bC.pairs=hie});var EC=h(function(DC){Object.defineProperty(DC,"__esModule",{value:!0});DC.not=void 0;function gie(e,t){return function(r,n){return!e.call(t,r,n)}}DC.not=gie});var Ys=h(function(SC){Object.defineProperty(SC,"__esModule",{value:!0});SC.filter=void 0;var yie=U(),xie=K();function bie(e,t){return yie.operate(function(r,n){var i=0;r.subscribe(xie.createOperatorSubscriber(n,function(s){return e.call(t,s,i++)&&n.next(s)}))})}SC.filter=bie});var AC=h(function(RC){Object.defineProperty(RC,"__esModule",{value:!0});RC.partition=void 0;var vie=EC(),CC=Ys(),FC=ce();function _ie(e,t,r){return[CC.filter(t,r)(FC.innerFrom(e)),CC.filter(vie.not(t,r))(FC.innerFrom(e))]}RC.partition=_ie});var Tg=h(function(IC){Object.defineProperty(IC,"__esModule",{value:!0});IC.raceInit=IC.race=void 0;var Die=ze(),kC=ce(),wie=xa(),Eie=K();function Sie(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return e=wie.argsOrArgArray(e),e.length===1?kC.innerFrom(e[0]):new Die.Observable(PC(e))}IC.race=Sie;function PC(e){return function(t){var r=[],n=function(s){r.push(kC.innerFrom(e[s]).subscribe(Eie.createOperatorSubscriber(t,function(o){if(r){for(var a=0;a<r.length;a++)a!==s&&r[a].unsubscribe();r=null}t.next(o)})))};for(var i=0;r&&!t.closed&&i<e.length;i++)n(i)}}IC.raceInit=PC});var jC=h(function(NC){Object.defineProperty(NC,"__esModule",{value:!0});NC.range=void 0;var Cie=ze(),Fie=Qr();function Rie(e,t,r){if(t==null)t=e,e=0;if(t<=0)return Fie.EMPTY;var n=t+e;return new Cie.Observable(r?function(i){var s=e;return r.schedule(function(){if(s<n)i.next(s++),this.schedule();else i.complete()})}:function(i){var s=e;while(s<n&&!i.closed)i.next(s++);i.complete()})}NC.range=Rie});var LC=h(function(MC){Object.defineProperty(MC,"__esModule",{value:!0});MC.using=void 0;var Oie=ze(),Aie=ce(),kie=Qr();function Pie(e,t){return new Oie.Observable(function(r){var n=e(),i=t(n),s=i?Aie.innerFrom(i):kie.EMPTY;return s.subscribe(r),function(){if(n)n.unsubscribe()}})}MC.using=Pie});var hf=h(function(Yi){var Iie=Yi&&Yi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},Tie=Yi&&Yi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.zip=void 0;var Nie=ze(),qie=ce(),jie=xa(),Mie=Qr(),Bie=K(),Lie=ar();function Uie(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Lie.popResultSelector(e),n=jie.argsOrArgArray(e);return n.length?new Nie.Observable(function(i){var s=n.map(function(){return[]}),o=n.map(function(){return!1});i.add(function(){s=o=null});var a=function(l){qie.innerFrom(n[l]).subscribe(Bie.createOperatorSubscriber(i,function(d){if(s[l].push(d),s.every(function(m){return m.length})){var f=s.map(function(m){return m.shift()});if(i.next(r?r.apply(void 0,Tie([],Iie(f))):f),s.some(function(m,p){return!m.length&&o[p]}))i.complete()}},function(){o[l]=!0,!s[l].length&&i.complete()}))};for(var c=0;!i.closed&&c<n.length;c++)a(c);return function(){s=o=null}}):Mie.EMPTY}Yi.zip=Uie});var VC=h(function(UC){Object.defineProperty(UC,"__esModule",{value:!0})});var Ng=h(function(HC){Object.defineProperty(HC,"__esModule",{value:!0});HC.audit=void 0;var Vie=U(),zie=ce(),zC=K();function Hie(e){return Vie.operate(function(t,r){var n=!1,i=null,s=null,o=!1,a=function(){if(s===null||s===void 0||s.unsubscribe(),s=null,n){n=!1;var l=i;i=null,r.next(l)}o&&r.complete()},c=function(){s=null,o&&r.complete()};t.subscribe(zC.createOperatorSubscriber(r,function(l){if(n=!0,i=l,!s)zie.innerFrom(e(l)).subscribe(s=zC.createOperatorSubscriber(r,a,c))},function(){o=!0,(!n||!s||s.closed)&&r.complete()}))})}HC.audit=Hie});var YC=h(function(GC){Object.defineProperty(GC,"__esModule",{value:!0});GC.auditTime=void 0;var Wie=or(),Gie=Ng(),Kie=Ki();function Yie(e,t){if(t===void 0)t=Wie.asyncScheduler;return Gie.audit(function(){return Kie.timer(e,t)})}GC.auditTime=Yie});var ZC=h(function(XC){Object.defineProperty(XC,"__esModule",{value:!0});XC.buffer=void 0;var Jie=U(),Xie=wt(),JC=K(),Qie=ce();function Zie(e){return Jie.operate(function(t,r){var n=[];return t.subscribe(JC.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),Qie.innerFrom(e).subscribe(JC.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},Xie.noop)),function(){n=null}})}XC.buffer=Zie});var e6=h(function(ba){var qg=ba&&ba.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ba,"__esModule",{value:!0});ba.bufferCount=void 0;var ese=U(),tse=K(),rse=ci();function nse(e,t){if(t===void 0)t=null;return t=t!==null&&t!==void 0?t:e,ese.operate(function(r,n){var i=[],s=0;r.subscribe(tse.createOperatorSubscriber(n,function(o){var a,c,l,d,f=null;if(s++%t===0)i.push([]);try{for(var m=qg(i),p=m.next();!p.done;p=m.next()){var g=p.value;if(g.push(o),e<=g.length)f=f!==null&&f!==void 0?f:[],f.push(g)}}catch(v){a={error:v}}finally{try{if(p&&!p.done&&(c=m.return))c.call(m)}finally{if(a)throw a.error}}if(f)try{for(var y=qg(f),x=y.next();!x.done;x=y.next()){var g=x.value;rse.arrRemove(i,g),n.next(g)}}catch(v){l={error:v}}finally{try{if(x&&!x.done&&(d=y.return))d.call(y)}finally{if(l)throw l.error}}},function(){var o,a;try{for(var c=qg(i),l=c.next();!l.done;l=c.next()){var d=l.value;n.next(d)}}catch(f){o={error:f}}finally{try{if(l&&!l.done&&(a=c.return))a.call(c)}finally{if(o)throw o.error}}n.complete()},void 0,function(){i=null}))})}ba.bufferCount=nse});var r6=h(function(va){var ise=va&&va.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(va,"__esModule",{value:!0});va.bufferTime=void 0;var sse=Dr(),ose=U(),ase=K(),cse=ci(),use=or(),lse=ar(),t6=ui();function dse(e){var t,r,n=[];for(var i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(t=lse.popScheduler(n))!==null&&t!==void 0?t:use.asyncScheduler,o=(r=n[0])!==null&&r!==void 0?r:null,a=n[1]||1/0;return ose.operate(function(c,l){var d=[],f=!1,m=function(y){var{buffer:x,subs:v}=y;v.unsubscribe(),cse.arrRemove(d,y),l.next(x),f&&p()},p=function(){if(d){var y=new sse.Subscription;l.add(y);var x=[],v={buffer:x,subs:y};d.push(v),t6.executeSchedule(y,s,function(){return m(v)},e)}};if(o!==null&&o>=0)t6.executeSchedule(l,s,p,o,!0);else f=!0;p();var g=ase.createOperatorSubscriber(l,function(y){var x,v,_=d.slice();try{for(var E=ise(_),C=E.next();!C.done;C=E.next()){var D=C.value,O=D.buffer;O.push(y),a<=O.length&&m(D)}}catch(F){x={error:F}}finally{try{if(C&&!C.done&&(v=E.return))v.call(E)}finally{if(x)throw x.error}}},function(){while(d===null||d===void 0?void 0:d.length)l.next(d.shift().buffer);g===null||g===void 0||g.unsubscribe(),l.complete(),l.unsubscribe()},void 0,function(){return d=null});c.subscribe(g)})}va.bufferTime=dse});var s6=h(function(_a){var fse=_a&&_a.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(_a,"__esModule",{value:!0});_a.bufferToggle=void 0;var pse=Dr(),mse=U(),n6=ce(),jg=K(),i6=wt(),hse=ci();function gse(e,t){return mse.operate(function(r,n){var i=[];n6.innerFrom(e).subscribe(jg.createOperatorSubscriber(n,function(s){var o=[];i.push(o);var a=new pse.Subscription,c=function(){hse.arrRemove(i,o),n.next(o),a.unsubscribe()};a.add(n6.innerFrom(t(s)).subscribe(jg.createOperatorSubscriber(n,c,i6.noop)))},i6.noop)),r.subscribe(jg.createOperatorSubscriber(n,function(s){var o,a;try{for(var c=fse(i),l=c.next();!l.done;l=c.next()){var d=l.value;d.push(s)}}catch(f){o={error:f}}finally{try{if(l&&!l.done&&(a=c.return))a.call(c)}finally{if(o)throw o.error}}},function(){while(i.length>0)n.next(i.shift());n.complete()}))})}_a.bufferToggle=gse});var u6=h(function(a6){Object.defineProperty(a6,"__esModule",{value:!0});a6.bufferWhen=void 0;var yse=U(),xse=wt(),o6=K(),bse=ce();function vse(e){return yse.operate(function(t,r){var n=null,i=null,s=function(){i===null||i===void 0||i.unsubscribe();var o=n;n=[],o&&r.next(o),bse.innerFrom(e()).subscribe(i=o6.createOperatorSubscriber(r,s,xse.noop))};s(),t.subscribe(o6.createOperatorSubscriber(r,function(o){return n===null||n===void 0?void 0:n.push(o)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}a6.bufferWhen=vse});var p6=h(function(d6){Object.defineProperty(d6,"__esModule",{value:!0});d6.catchError=void 0;var _se=ce(),Dse=K(),wse=U();function l6(e){return wse.operate(function(t,r){var n=null,i=!1,s;if(n=t.subscribe(Dse.createOperatorSubscriber(r,void 0,void 0,function(o){if(s=_se.innerFrom(e(o,l6(e)(t))),n)n.unsubscribe(),n=null,s.subscribe(r);else i=!0})),i)n.unsubscribe(),n=null,s.subscribe(r)})}d6.catchError=l6});var Mg=h(function(m6){Object.defineProperty(m6,"__esModule",{value:!0});m6.scanInternals=void 0;var Ese=K();function Sse(e,t,r,n,i){return function(s,o){var a=r,c=t,l=0;s.subscribe(Ese.createOperatorSubscriber(o,function(d){var f=l++;c=a?e(c,d,f):(a=!0,d),n&&o.next(c)},i&&function(){a&&o.next(c),o.complete()}))}}m6.scanInternals=Sse});var Da=h(function(g6){Object.defineProperty(g6,"__esModule",{value:!0});g6.reduce=void 0;var $se=Mg(),Cse=U();function Fse(e,t){return Cse.operate($se.scanInternals(e,t,arguments.length>=2,!1,!0))}g6.reduce=Fse});var Bg=h(function(x6){Object.defineProperty(x6,"__esModule",{value:!0});x6.toArray=void 0;var Rse=Da(),Ose=U(),Ase=function(e,t){return e.push(t),e};function kse(){return Ose.operate(function(e,t){Rse.reduce(Ase,[])(e).subscribe(t)})}x6.toArray=kse});var Lg=h(function(v6){Object.defineProperty(v6,"__esModule",{value:!0});v6.joinAllInternals=void 0;var Pse=Et(),Ise=Wi(),Tse=mu(),Nse=di(),qse=Bg();function jse(e,t){return Tse.pipe(qse.toArray(),Nse.mergeMap(function(r){return e(r)}),t?Ise.mapOneOrManyArgs(t):Pse.identity)}v6.joinAllInternals=jse});var Ug=h(function(D6){Object.defineProperty(D6,"__esModule",{value:!0});D6.combineLatestAll=void 0;var Mse=ff(),Bse=Lg();function Lse(e){return Bse.joinAllInternals(Mse.combineLatest,e)}D6.combineLatestAll=Lse});var $6=h(function(E6){Object.defineProperty(E6,"__esModule",{value:!0});E6.combineAll=void 0;var Use=Ug();E6.combineAll=Use.combineLatestAll});var O6=h(function(Ji){var C6=Ji&&Ji.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},F6=Ji&&Ji.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.combineLatest=void 0;var Vse=ff(),zse=U(),Hse=xa(),Wse=Wi(),Gse=mu(),Kse=ar();function R6(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Kse.popResultSelector(e);return r?Gse.pipe(R6.apply(void 0,F6([],C6(e))),Wse.mapOneOrManyArgs(r)):zse.operate(function(n,i){Vse.combineLatestInit(F6([n],C6(Hse.argsOrArgArray(e))))(i)})}Ji.combineLatest=R6});var A6=h(function(Xi){var Yse=Xi&&Xi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},Jse=Xi&&Xi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.combineLatestWith=void 0;var Xse=O6();function Qse(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return Xse.combineLatest.apply(void 0,Jse([],Yse(e)))}Xi.combineLatestWith=Qse});var Vg=h(function(P6){Object.defineProperty(P6,"__esModule",{value:!0});P6.concatMap=void 0;var k6=di(),Zse=Le();function eoe(e,t){return Zse.isFunction(t)?k6.mergeMap(e,t,1):k6.mergeMap(e,1)}P6.concatMap=eoe});var j6=h(function(N6){Object.defineProperty(N6,"__esModule",{value:!0});N6.concatMapTo=void 0;var T6=Vg(),toe=Le();function roe(e,t){return toe.isFunction(t)?T6.concatMap(function(){return e},t):T6.concatMap(function(){return e})}N6.concatMapTo=roe});var M6=h(function(Qi){var noe=Qi&&Qi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},ioe=Qi&&Qi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Qi,"__esModule",{value:!0});Qi.concat=void 0;var soe=U(),ooe=mf(),aoe=ar(),coe=li();function uoe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=aoe.popScheduler(e);return soe.operate(function(n,i){ooe.concatAll()(coe.from(ioe([n],noe(e)),r)).subscribe(i)})}Qi.concat=uoe});var B6=h(function(Zi){var loe=Zi&&Zi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},doe=Zi&&Zi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.concatWith=void 0;var foe=M6();function poe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return foe.concat.apply(void 0,doe([],loe(e)))}Zi.concatWith=poe});var V6=h(function(L6){Object.defineProperty(L6,"__esModule",{value:!0});L6.fromSubscribable=void 0;var moe=ze();function hoe(e){return new moe.Observable(function(t){return e.subscribe(t)})}L6.fromSubscribable=hoe});var gf=h(function(z6){Object.defineProperty(z6,"__esModule",{value:!0});z6.connect=void 0;var goe=St(),yoe=ce(),xoe=U(),boe=V6(),voe={connector:function(){return new goe.Subject}};function _oe(e,t){if(t===void 0)t=voe;var r=t.connector;return xoe.operate(function(n,i){var s=r();yoe.innerFrom(e(boe.fromSubscribable(s))).subscribe(i),i.add(n.subscribe(s))})}z6.connect=_oe});var K6=h(function(W6){Object.defineProperty(W6,"__esModule",{value:!0});W6.count=void 0;var Doe=Da();function woe(e){return Doe.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}W6.count=woe});var Q6=h(function(J6){Object.defineProperty(J6,"__esModule",{value:!0});J6.debounce=void 0;var Eoe=U(),Soe=wt(),Y6=K(),$oe=ce();function Coe(e){return Eoe.operate(function(t,r){var n=!1,i=null,s=null,o=function(){if(s===null||s===void 0||s.unsubscribe(),s=null,n){n=!1;var a=i;i=null,r.next(a)}};t.subscribe(Y6.createOperatorSubscriber(r,function(a){s===null||s===void 0||s.unsubscribe(),n=!0,i=a,s=Y6.createOperatorSubscriber(r,o,Soe.noop),$oe.innerFrom(e(a)).subscribe(s)},function(){o(),r.complete()},void 0,function(){i=s=null}))})}J6.debounce=Coe});var tF=h(function(Z6){Object.defineProperty(Z6,"__esModule",{value:!0});Z6.debounceTime=void 0;var Foe=or(),Roe=U(),Ooe=K();function Aoe(e,t){if(t===void 0)t=Foe.asyncScheduler;return Roe.operate(function(r,n){var i=null,s=null,o=null,a=function(){if(i){i.unsubscribe(),i=null;var l=s;s=null,n.next(l)}};function c(){var l=o+e,d=t.now();if(d<l){i=this.schedule(void 0,l-d),n.add(i);return}a()}r.subscribe(Ooe.createOperatorSubscriber(n,function(l){if(s=l,o=t.now(),!i)i=t.schedule(c,e),n.add(i)},function(){a(),n.complete()},void 0,function(){s=i=null}))})}Z6.debounceTime=Aoe});var Du=h(function(rF){Object.defineProperty(rF,"__esModule",{value:!0});rF.defaultIfEmpty=void 0;var koe=U(),Poe=K();function Ioe(e){return koe.operate(function(t,r){var n=!1;t.subscribe(Poe.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){if(!n)r.next(e);r.complete()}))})}rF.defaultIfEmpty=Ioe});var wu=h(function(iF){Object.defineProperty(iF,"__esModule",{value:!0});iF.take=void 0;var Toe=Qr(),Noe=U(),qoe=K();function joe(e){return e<=0?function(){return Toe.EMPTY}:Noe.operate(function(t,r){var n=0;t.subscribe(qoe.createOperatorSubscriber(r,function(i){if(++n<=e){if(r.next(i),e<=n)r.complete()}}))})}iF.take=joe});var zg=h(function(oF){Object.defineProperty(oF,"__esModule",{value:!0});oF.ignoreElements=void 0;var Moe=U(),Boe=K(),Loe=wt();function Uoe(){return Moe.operate(function(e,t){e.subscribe(Boe.createOperatorSubscriber(t,Loe.noop))})}oF.ignoreElements=Uoe});var Hg=h(function(cF){Object.defineProperty(cF,"__esModule",{value:!0});cF.mapTo=void 0;var Voe=zi();function zoe(e){return Voe.map(function(){return e})}cF.mapTo=zoe});var Wg=h(function(fF){Object.defineProperty(fF,"__esModule",{value:!0});fF.delayWhen=void 0;var Hoe=vu(),lF=wu(),Woe=zg(),Goe=Hg(),Koe=di(),Yoe=ce();function dF(e,t){if(t)return function(r){return Hoe.concat(t.pipe(lF.take(1),Woe.ignoreElements()),r.pipe(dF(e)))};return Koe.mergeMap(function(r,n){return Yoe.innerFrom(e(r,n)).pipe(lF.take(1),Goe.mapTo(r))})}fF.delayWhen=dF});var gF=h(function(mF){Object.defineProperty(mF,"__esModule",{value:!0});mF.delay=void 0;var Joe=or(),Xoe=Wg(),Qoe=Ki();function Zoe(e,t){if(t===void 0)t=Joe.asyncScheduler;var r=Qoe.timer(e,t);return Xoe.delayWhen(function(){return r})}mF.delay=Zoe});var bF=h(function(yF){Object.defineProperty(yF,"__esModule",{value:!0});yF.dematerialize=void 0;var eae=uf(),tae=U(),rae=K();function nae(){return tae.operate(function(e,t){e.subscribe(rae.createOperatorSubscriber(t,function(r){return eae.observeNotification(r,t)}))})}yF.dematerialize=nae});var wF=h(function(_F){Object.defineProperty(_F,"__esModule",{value:!0});_F.distinct=void 0;var iae=U(),vF=K(),sae=wt(),oae=ce();function aae(e,t){return iae.operate(function(r,n){var i=new Set;r.subscribe(vF.createOperatorSubscriber(n,function(s){var o=e?e(s):s;if(!i.has(o))i.add(o),n.next(s)})),t&&oae.innerFrom(t).subscribe(vF.createOperatorSubscriber(n,function(){return i.clear()},sae.noop))})}_F.distinct=aae});var Gg=h(function(EF){Object.defineProperty(EF,"__esModule",{value:!0});EF.distinctUntilChanged=void 0;var cae=Et(),uae=U(),lae=K();function dae(e,t){if(t===void 0)t=cae.identity;return e=e!==null&&e!==void 0?e:fae,uae.operate(function(r,n){var i,s=!0;r.subscribe(lae.createOperatorSubscriber(n,function(o){var a=t(o);if(s||!e(i,a))s=!1,i=a,n.next(o)}))})}EF.distinctUntilChanged=dae;function fae(e,t){return e===t}});var FF=h(function($F){Object.defineProperty($F,"__esModule",{value:!0});$F.distinctUntilKeyChanged=void 0;var pae=Gg();function mae(e,t){return pae.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}$F.distinctUntilKeyChanged=mae});var Eu=h(function(RF){Object.defineProperty(RF,"__esModule",{value:!0});RF.throwIfEmpty=void 0;var hae=Vi(),gae=U(),yae=K();function xae(e){if(e===void 0)e=bae;return gae.operate(function(t,r){var n=!1;t.subscribe(yae.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}RF.throwIfEmpty=xae;function bae(){return new hae.EmptyError}});var IF=h(function(kF){Object.defineProperty(kF,"__esModule",{value:!0});kF.elementAt=void 0;var AF=Eg(),vae=Ys(),_ae=Eu(),Dae=Du(),wae=wu();function Eae(e,t){if(e<0)throw new AF.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(vae.filter(function(i,s){return s===e}),wae.take(1),r?Dae.defaultIfEmpty(t):_ae.throwIfEmpty(function(){return new AF.ArgumentOutOfRangeError}))}}kF.elementAt=Eae});var TF=h(function(es){var Sae=es&&es.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},$ae=es&&es.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(es,"__esModule",{value:!0});es.endWith=void 0;var Cae=vu(),Fae=cf();function Rae(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return Cae.concat(r,Fae.of.apply(void 0,$ae([],Sae(e))))}}es.endWith=Rae});var jF=h(function(NF){Object.defineProperty(NF,"__esModule",{value:!0});NF.every=void 0;var Oae=U(),Aae=K();function kae(e,t){return Oae.operate(function(r,n){var i=0;r.subscribe(Aae.createOperatorSubscriber(n,function(s){if(!e.call(t,s,i++,r))n.next(!1),n.complete()},function(){n.next(!0),n.complete()}))})}NF.every=kae});var Kg=h(function(UF){Object.defineProperty(UF,"__esModule",{value:!0});UF.exhaustMap=void 0;var Pae=zi(),MF=ce(),Iae=U(),BF=K();function LF(e,t){if(t)return function(r){return r.pipe(LF(function(n,i){return MF.innerFrom(e(n,i)).pipe(Pae.map(function(s,o){return t(n,s,i,o)}))}))};return Iae.operate(function(r,n){var i=0,s=null,o=!1;r.subscribe(BF.createOperatorSubscriber(n,function(a){if(!s)s=BF.createOperatorSubscriber(n,void 0,function(){s=null,o&&n.complete()}),MF.innerFrom(e(a,i++)).subscribe(s)},function(){o=!0,!s&&n.complete()}))})}UF.exhaustMap=LF});var Yg=h(function(zF){Object.defineProperty(zF,"__esModule",{value:!0});zF.exhaustAll=void 0;var Tae=Kg(),Nae=Et();function qae(){return Tae.exhaustMap(Nae.identity)}zF.exhaustAll=qae});var KF=h(function(WF){Object.defineProperty(WF,"__esModule",{value:!0});WF.exhaust=void 0;var jae=Yg();WF.exhaust=jae.exhaustAll});var XF=h(function(YF){Object.defineProperty(YF,"__esModule",{value:!0});YF.expand=void 0;var Mae=U(),Bae=pf();function Lae(e,t,r){if(t===void 0)t=1/0;return t=(t||0)<1?1/0:t,Mae.operate(function(n,i){return Bae.mergeInternals(n,i,e,t,void 0,!0,r)})}YF.expand=Lae});var eR=h(function(QF){Object.defineProperty(QF,"__esModule",{value:!0});QF.finalize=void 0;var Uae=U();function Vae(e){return Uae.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}QF.finalize=Vae});var Jg=h(function(rR){Object.defineProperty(rR,"__esModule",{value:!0});rR.createFind=rR.find=void 0;var zae=U(),Hae=K();function Wae(e,t){return zae.operate(tR(e,t,"value"))}rR.find=Wae;function tR(e,t,r){var n=r==="index";return function(i,s){var o=0;i.subscribe(Hae.createOperatorSubscriber(s,function(a){var c=o++;if(e.call(t,a,c,i))s.next(n?c:a),s.complete()},function(){s.next(n?-1:void 0),s.complete()}))}}rR.createFind=tR});var oR=h(function(iR){Object.defineProperty(iR,"__esModule",{value:!0});iR.findIndex=void 0;var Kae=U(),Yae=Jg();function Jae(e,t){return Kae.operate(Yae.createFind(e,t,"index"))}iR.findIndex=Jae});var uR=h(function(aR){Object.defineProperty(aR,"__esModule",{value:!0});aR.first=void 0;var Xae=Vi(),Qae=Ys(),Zae=wu(),ece=Du(),tce=Eu(),rce=Et();function nce(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?Qae.filter(function(i,s){return e(i,s,n)}):rce.identity,Zae.take(1),r?ece.defaultIfEmpty(t):tce.throwIfEmpty(function(){return new Xae.EmptyError}))}}aR.first=nce});var pR=h(function(dR){Object.defineProperty(dR,"__esModule",{value:!0});dR.groupBy=void 0;var ice=ze(),sce=ce(),oce=St(),ace=U(),lR=K();function cce(e,t,r,n){return ace.operate(function(i,s){var o;if(!t||typeof t==="function")o=t;else r=t.duration,o=t.element,n=t.connector;var a=new Map,c=function(g){a.forEach(g),g(s)},l=function(g){return c(function(y){return y.error(g)})},d=0,f=!1,m=new lR.OperatorSubscriber(s,function(g){try{var y=e(g),x=a.get(y);if(!x){a.set(y,x=n?n():new oce.Subject);var v=p(y,x);if(s.next(v),r){var _=lR.createOperatorSubscriber(x,function(){x.complete(),_===null||_===void 0||_.unsubscribe()},void 0,void 0,function(){return a.delete(y)});m.add(sce.innerFrom(r(v)).subscribe(_))}}x.next(o?o(g):g)}catch(E){l(E)}},function(){return c(function(g){return g.complete()})},l,function(){return a.clear()},function(){return f=!0,d===0});i.subscribe(m);function p(g,y){var x=new ice.Observable(function(v){d++;var _=y.subscribe(v);return function(){_.unsubscribe(),--d===0&&f&&m.unsubscribe()}});return x.key=g,x}})}dR.groupBy=cce});var gR=h(function(mR){Object.defineProperty(mR,"__esModule",{value:!0});mR.isEmpty=void 0;var uce=U(),lce=K();function dce(){return uce.operate(function(e,t){e.subscribe(lce.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}mR.isEmpty=dce});var Xg=h(function(wa){var fce=wa&&wa.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(wa,"__esModule",{value:!0});wa.takeLast=void 0;var pce=Qr(),mce=U(),hce=K();function gce(e){return e<=0?function(){return pce.EMPTY}:mce.operate(function(t,r){var n=[];t.subscribe(hce.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,s;try{for(var o=fce(n),a=o.next();!a.done;a=o.next()){var c=a.value;r.next(c)}}catch(l){i={error:l}}finally{try{if(a&&!a.done&&(s=o.return))s.call(o)}finally{if(i)throw i.error}}r.complete()},void 0,function(){n=null}))})}wa.takeLast=gce});var bR=h(function(yR){Object.defineProperty(yR,"__esModule",{value:!0});yR.last=void 0;var yce=Vi(),xce=Ys(),bce=Xg(),vce=Eu(),_ce=Du(),Dce=Et();function wce(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?xce.filter(function(i,s){return e(i,s,n)}):Dce.identity,bce.takeLast(1),r?_ce.defaultIfEmpty(t):vce.throwIfEmpty(function(){return new yce.EmptyError}))}}yR.last=wce});var DR=h(function(vR){Object.defineProperty(vR,"__esModule",{value:!0});vR.materialize=void 0;var Qg=uf(),Ece=U(),Sce=K();function $ce(){return Ece.operate(function(e,t){e.subscribe(Sce.createOperatorSubscriber(t,function(r){t.next(Qg.Notification.createNext(r))},function(){t.next(Qg.Notification.createComplete()),t.complete()},function(r){t.next(Qg.Notification.createError(r)),t.complete()}))})}vR.materialize=$ce});var SR=h(function(wR){Object.defineProperty(wR,"__esModule",{value:!0});wR.max=void 0;var Cce=Da(),Fce=Le();function Rce(e){return Cce.reduce(Fce.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}wR.max=Rce});var FR=h(function($R){Object.defineProperty($R,"__esModule",{value:!0});$R.flatMap=void 0;var Oce=di();$R.flatMap=Oce.mergeMap});var kR=h(function(OR){Object.defineProperty(OR,"__esModule",{value:!0});OR.mergeMapTo=void 0;var RR=di(),Ace=Le();function kce(e,t,r){if(r===void 0)r=1/0;if(Ace.isFunction(t))return RR.mergeMap(function(){return e},t,r);if(typeof t==="number")r=t;return RR.mergeMap(function(){return e},r)}OR.mergeMapTo=kce});var TR=h(function(PR){Object.defineProperty(PR,"__esModule",{value:!0});PR.mergeScan=void 0;var Pce=U(),Ice=pf();function Tce(e,t,r){if(r===void 0)r=1/0;return Pce.operate(function(n,i){var s=t;return Ice.mergeInternals(n,i,function(o,a){return e(s,o,a)},r,function(o){s=o},!1,void 0,function(){return s=null})})}PR.mergeScan=Tce});var qR=h(function(ts){var Nce=ts&&ts.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},qce=ts&&ts.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ts,"__esModule",{value:!0});ts.merge=void 0;var jce=U(),Mce=bu(),NR=ar(),Bce=li();function Lce(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=NR.popScheduler(e),n=NR.popNumber(e,1/0);return jce.operate(function(i,s){Mce.mergeAll(n)(Bce.from(qce([i],Nce(e)),r)).subscribe(s)})}ts.merge=Lce});var jR=h(function(rs){var Uce=rs&&rs.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},Vce=rs&&rs.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(rs,"__esModule",{value:!0});rs.mergeWith=void 0;var zce=qR();function Hce(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return zce.merge.apply(void 0,Vce([],Uce(e)))}rs.mergeWith=Hce});var LR=h(function(MR){Object.defineProperty(MR,"__esModule",{value:!0});MR.min=void 0;var Wce=Da(),Gce=Le();function Kce(e){return Wce.reduce(Gce.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}MR.min=Kce});var yf=h(function(VR){Object.defineProperty(VR,"__esModule",{value:!0});VR.multicast=void 0;var Yce=hu(),UR=Le(),Jce=gf();function Xce(e,t){var r=UR.isFunction(e)?e:function(){return e};if(UR.isFunction(t))return Jce.connect(t,{connector:r});return function(n){return new Yce.ConnectableObservable(n,r)}}VR.multicast=Xce});var WR=h(function(In){var Qce=In&&In.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},Zce=In&&In.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(In,"__esModule",{value:!0});In.onErrorResumeNext=In.onErrorResumeNextWith=void 0;var eue=xa(),tue=Ig();function HR(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=eue.argsOrArgArray(e);return function(n){return tue.onErrorResumeNext.apply(void 0,Zce([n],Qce(r)))}}In.onErrorResumeNextWith=HR;In.onErrorResumeNext=HR});var YR=h(function(GR){Object.defineProperty(GR,"__esModule",{value:!0});GR.pairwise=void 0;var rue=U(),nue=K();function iue(){return rue.operate(function(e,t){var r,n=!1;e.subscribe(nue.createOperatorSubscriber(t,function(i){var s=r;r=i,n&&t.next([s,i]),n=!0}))})}GR.pairwise=iue});var QR=h(function(JR){Object.defineProperty(JR,"__esModule",{value:!0});JR.pluck=void 0;var sue=zi();function oue(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(r===0)throw Error("list of properties cannot be empty.");return sue.map(function(n){var i=n;for(var s=0;s<r;s++){var o=i===null||i===void 0?void 0:i[e[s]];if(typeof o<"u")i=o;else return}return i})}JR.pluck=oue});var tO=h(function(ZR){Object.defineProperty(ZR,"__esModule",{value:!0});ZR.publish=void 0;var aue=St(),cue=yf(),uue=gf();function lue(e){return e?function(t){return uue.connect(e)(t)}:function(t){return cue.multicast(new aue.Subject)(t)}}ZR.publish=lue});var iO=h(function(rO){Object.defineProperty(rO,"__esModule",{value:!0});rO.publishBehavior=void 0;var due=og(),fue=hu();function pue(e){return function(t){var r=new due.BehaviorSubject(e);return new fue.ConnectableObservable(t,function(){return r})}}rO.publishBehavior=pue});var aO=h(function(sO){Object.defineProperty(sO,"__esModule",{value:!0});sO.publishLast=void 0;var mue=nf(),hue=hu();function gue(){return function(e){var t=new mue.AsyncSubject;return new hue.ConnectableObservable(e,function(){return t})}}sO.publishLast=gue});var dO=h(function(uO){Object.defineProperty(uO,"__esModule",{value:!0});uO.publishReplay=void 0;var yue=rf(),xue=yf(),cO=Le();function bue(e,t,r,n){if(r&&!cO.isFunction(r))n=r;var i=cO.isFunction(r)?r:void 0;return function(s){return xue.multicast(new yue.ReplaySubject(e,t,n),i)(s)}}uO.publishReplay=bue});var fO=h(function(ns){var vue=ns&&ns.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},_ue=ns&&ns.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ns,"__esModule",{value:!0});ns.raceWith=void 0;var Due=Tg(),wue=U(),Eue=Et();function Sue(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return!e.length?Eue.identity:wue.operate(function(r,n){Due.raceInit(_ue([r],vue(e)))(n)})}ns.raceWith=Sue});var gO=h(function(mO){Object.defineProperty(mO,"__esModule",{value:!0});mO.repeat=void 0;var $ue=Qr(),Cue=U(),pO=K(),Fue=ce(),Rue=Ki();function Oue(e){var t,r=1/0,n;if(e!=null)if(typeof e==="object")t=e.count,r=t===void 0?1/0:t,n=e.delay;else r=e;return r<=0?function(){return $ue.EMPTY}:Cue.operate(function(i,s){var o=0,a,c=function(){if(a===null||a===void 0||a.unsubscribe(),a=null,n!=null){var d=typeof n==="number"?Rue.timer(n):Fue.innerFrom(n(o)),f=pO.createOperatorSubscriber(s,function(){f.unsubscribe(),l()});d.subscribe(f)}else l()},l=function(){var d=!1;if(a=i.subscribe(pO.createOperatorSubscriber(s,void 0,function(){if(++o<r)if(a)c();else d=!0;else s.complete()})),d)c()};l()})}mO.repeat=Oue});var vO=h(function(xO){Object.defineProperty(xO,"__esModule",{value:!0});xO.repeatWhen=void 0;var Aue=ce(),kue=St(),Pue=U(),yO=K();function Iue(e){return Pue.operate(function(t,r){var n,i=!1,s,o=!1,a=!1,c=function(){return a&&o&&(r.complete(),!0)},l=function(){if(!s)s=new kue.Subject,Aue.innerFrom(e(s)).subscribe(yO.createOperatorSubscriber(r,function(){if(n)d();else i=!0},function(){o=!0,c()}));return s},d=function(){if(a=!1,n=t.subscribe(yO.createOperatorSubscriber(r,void 0,function(){a=!0,!c()&&l().next()})),i)n.unsubscribe(),n=null,i=!1,d()};d()})}xO.repeatWhen=Iue});var EO=h(function(DO){Object.defineProperty(DO,"__esModule",{value:!0});DO.retry=void 0;var Tue=U(),_O=K(),Nue=Et(),que=Ki(),jue=ce();function Mue(e){if(e===void 0)e=1/0;var t;if(e&&typeof e==="object")t=e;else t={count:e};var r=t.count,n=r===void 0?1/0:r,i=t.delay,s=t.resetOnSuccess,o=s===void 0?!1:s;return n<=0?Nue.identity:Tue.operate(function(a,c){var l=0,d,f=function(){var m=!1;if(d=a.subscribe(_O.createOperatorSubscriber(c,function(p){if(o)l=0;c.next(p)},void 0,function(p){if(l++<n){var g=function(){if(d)d.unsubscribe(),d=null,f();else m=!0};if(i!=null){var y=typeof i==="number"?que.timer(i):jue.innerFrom(i(p,l)),x=_O.createOperatorSubscriber(c,function(){x.unsubscribe(),g()},function(){c.complete()});y.subscribe(x)}else g()}else c.error(p)})),m)d.unsubscribe(),d=null,f()};f()})}DO.retry=Mue});var FO=h(function($O){Object.defineProperty($O,"__esModule",{value:!0});$O.retryWhen=void 0;var Bue=ce(),Lue=St(),Uue=U(),SO=K();function Vue(e){return Uue.operate(function(t,r){var n,i=!1,s,o=function(){if(n=t.subscribe(SO.createOperatorSubscriber(r,void 0,void 0,function(a){if(!s)s=new Lue.Subject,Bue.innerFrom(e(s)).subscribe(SO.createOperatorSubscriber(r,function(){return n?o():i=!0}));if(s)s.next(a)})),i)n.unsubscribe(),n=null,i=!1,o()};o()})}$O.retryWhen=Vue});var Zg=h(function(OO){Object.defineProperty(OO,"__esModule",{value:!0});OO.sample=void 0;var zue=ce(),Hue=U(),Wue=wt(),RO=K();function Gue(e){return Hue.operate(function(t,r){var n=!1,i=null;t.subscribe(RO.createOperatorSubscriber(r,function(s){n=!0,i=s})),zue.innerFrom(e).subscribe(RO.createOperatorSubscriber(r,function(){if(n){n=!1;var s=i;i=null,r.next(s)}},Wue.noop))})}OO.sample=Gue});var IO=h(function(kO){Object.defineProperty(kO,"__esModule",{value:!0});kO.sampleTime=void 0;var Kue=or(),Yue=Zg(),Jue=kg();function Xue(e,t){if(t===void 0)t=Kue.asyncScheduler;return Yue.sample(Jue.interval(e,t))}kO.sampleTime=Xue});var qO=h(function(TO){Object.defineProperty(TO,"__esModule",{value:!0});TO.scan=void 0;var Que=U(),Zue=Mg();function ele(e,t){return Que.operate(Zue.scanInternals(e,t,arguments.length>=2,!0))}TO.scan=ele});var LO=h(function(MO){Object.defineProperty(MO,"__esModule",{value:!0});MO.sequenceEqual=void 0;var tle=U(),rle=K(),nle=ce();function ile(e,t){if(t===void 0)t=function(r,n){return r===n};return tle.operate(function(r,n){var i=jO(),s=jO(),o=function(c){n.next(c),n.complete()},a=function(c,l){var d=rle.createOperatorSubscriber(n,function(f){var{buffer:m,complete:p}=l;if(m.length===0)p?o(!1):c.buffer.push(f);else!t(f,m.shift())&&o(!1)},function(){c.complete=!0;var{complete:f,buffer:m}=l;f&&o(m.length===0),d===null||d===void 0||d.unsubscribe()});return d};r.subscribe(a(i,s)),nle.innerFrom(e).subscribe(a(s,i))})}MO.sequenceEqual=ile;function jO(){return{buffer:[],complete:!1}}});var ty=h(function(is){var sle=is&&is.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},ole=is&&is.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(is,"__esModule",{value:!0});is.share=void 0;var UO=ce(),ale=St(),VO=Qo(),cle=U();function ule(e){if(e===void 0)e={};var t=e.connector,r=t===void 0?function(){return new ale.Subject}:t,n=e.resetOnError,i=n===void 0?!0:n,s=e.resetOnComplete,o=s===void 0?!0:s,a=e.resetOnRefCountZero,c=a===void 0?!0:a;return function(l){var d,f,m,p=0,g=!1,y=!1,x=function(){f===null||f===void 0||f.unsubscribe(),f=void 0},v=function(){x(),d=m=void 0,g=y=!1},_=function(){var E=d;v(),E===null||E===void 0||E.unsubscribe()};return cle.operate(function(E,C){if(p++,!y&&!g)x();var D=m=m!==null&&m!==void 0?m:r();if(C.add(function(){if(p--,p===0&&!y&&!g)f=ey(_,c)}),D.subscribe(C),!d&&p>0)d=new VO.SafeSubscriber({next:function(O){return D.next(O)},error:function(O){y=!0,x(),f=ey(v,i,O),D.error(O)},complete:function(){g=!0,x(),f=ey(v,o),D.complete()}}),UO.innerFrom(E).subscribe(d)})(l)}}is.share=ule;function ey(e,t){var r=[];for(var n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(t===!0){e();return}if(t===!1)return;var i=new VO.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return UO.innerFrom(t.apply(void 0,ole([],sle(r)))).subscribe(i)}});var WO=h(function(zO){Object.defineProperty(zO,"__esModule",{value:!0});zO.shareReplay=void 0;var lle=rf(),dle=ty();function fle(e,t,r){var n,i,s,o,a=!1;if(e&&typeof e==="object")n=e.bufferSize,o=n===void 0?1/0:n,i=e.windowTime,t=i===void 0?1/0:i,s=e.refCount,a=s===void 0?!1:s,r=e.scheduler;else o=e!==null&&e!==void 0?e:1/0;return dle.share({connector:function(){return new lle.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}zO.shareReplay=fle});var YO=h(function(GO){Object.defineProperty(GO,"__esModule",{value:!0});GO.single=void 0;var ple=Vi(),mle=$g(),hle=Sg(),gle=U(),yle=K();function xle(e){return gle.operate(function(t,r){var n=!1,i,s=!1,o=0;t.subscribe(yle.createOperatorSubscriber(r,function(a){if(s=!0,!e||e(a,o++,t))n&&r.error(new mle.SequenceError("Too many matching values")),n=!0,i=a},function(){if(n)r.next(i),r.complete();else r.error(s?new hle.NotFoundError("No matching values"):new ple.EmptyError)}))})}GO.single=xle});var QO=h(function(JO){Object.defineProperty(JO,"__esModule",{value:!0});JO.skip=void 0;var ble=Ys();function vle(e){return ble.filter(function(t,r){return e<=r})}JO.skip=vle});var tA=h(function(ZO){Object.defineProperty(ZO,"__esModule",{value:!0});ZO.skipLast=void 0;var _le=Et(),Dle=U(),wle=K();function Ele(e){return e<=0?_le.identity:Dle.operate(function(t,r){var n=Array(e),i=0;return t.subscribe(wle.createOperatorSubscriber(r,function(s){var o=i++;if(o<e)n[o]=s;else{var a=o%e,c=n[a];n[a]=s,r.next(c)}})),function(){n=null}})}ZO.skipLast=Ele});var sA=h(function(nA){Object.defineProperty(nA,"__esModule",{value:!0});nA.skipUntil=void 0;var Sle=U(),rA=K(),$le=ce(),Cle=wt();function Fle(e){return Sle.operate(function(t,r){var n=!1,i=rA.createOperatorSubscriber(r,function(){i===null||i===void 0||i.unsubscribe(),n=!0},Cle.noop);$le.innerFrom(e).subscribe(i),t.subscribe(rA.createOperatorSubscriber(r,function(s){return n&&r.next(s)}))})}nA.skipUntil=Fle});var cA=h(function(oA){Object.defineProperty(oA,"__esModule",{value:!0});oA.skipWhile=void 0;var Rle=U(),Ole=K();function Ale(e){return Rle.operate(function(t,r){var n=!1,i=0;t.subscribe(Ole.createOperatorSubscriber(r,function(s){return(n||(n=!e(s,i++)))&&r.next(s)}))})}oA.skipWhile=Ale});var fA=h(function(lA){Object.defineProperty(lA,"__esModule",{value:!0});lA.startWith=void 0;var uA=vu(),kle=ar(),Ple=U();function Ile(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=kle.popScheduler(e);return Ple.operate(function(n,i){(r?uA.concat(e,n,r):uA.concat(e,n)).subscribe(i)})}lA.startWith=Ile});var Su=h(function(mA){Object.defineProperty(mA,"__esModule",{value:!0});mA.switchMap=void 0;var Tle=ce(),Nle=U(),pA=K();function qle(e,t){return Nle.operate(function(r,n){var i=null,s=0,o=!1,a=function(){return o&&!i&&n.complete()};r.subscribe(pA.createOperatorSubscriber(n,function(c){i===null||i===void 0||i.unsubscribe();var l=0,d=s++;Tle.innerFrom(e(c,d)).subscribe(i=pA.createOperatorSubscriber(n,function(f){return n.next(t?t(c,f,d,l++):f)},function(){i=null,a()}))},function(){o=!0,a()}))})}mA.switchMap=qle});var xA=h(function(gA){Object.defineProperty(gA,"__esModule",{value:!0});gA.switchAll=void 0;var jle=Su(),Mle=Et();function Ble(){return jle.switchMap(Mle.identity)}gA.switchAll=Ble});var DA=h(function(vA){Object.defineProperty(vA,"__esModule",{value:!0});vA.switchMapTo=void 0;var bA=Su(),Lle=Le();function Ule(e,t){return Lle.isFunction(t)?bA.switchMap(function(){return e},t):bA.switchMap(function(){return e})}vA.switchMapTo=Ule});var SA=h(function(wA){Object.defineProperty(wA,"__esModule",{value:!0});wA.switchScan=void 0;var Vle=Su(),zle=U();function Hle(e,t){return zle.operate(function(r,n){var i=t;return Vle.switchMap(function(s,o){return e(i,s,o)},function(s,o){return i=o,o})(r).subscribe(n),function(){i=null}})}wA.switchScan=Hle});var FA=h(function($A){Object.defineProperty($A,"__esModule",{value:!0});$A.takeUntil=void 0;var Wle=U(),Gle=K(),Kle=ce(),Yle=wt();function Jle(e){return Wle.operate(function(t,r){Kle.innerFrom(e).subscribe(Gle.createOperatorSubscriber(r,function(){return r.complete()},Yle.noop)),!r.closed&&t.subscribe(r)})}$A.takeUntil=Jle});var AA=h(function(RA){Object.defineProperty(RA,"__esModule",{value:!0});RA.takeWhile=void 0;var Xle=U(),Qle=K();function Zle(e,t){if(t===void 0)t=!1;return Xle.operate(function(r,n){var i=0;r.subscribe(Qle.createOperatorSubscriber(n,function(s){var o=e(s,i++);(o||t)&&n.next(s),!o&&n.complete()}))})}RA.takeWhile=Zle});var IA=h(function(kA){Object.defineProperty(kA,"__esModule",{value:!0});kA.tap=void 0;var ede=Le(),tde=U(),rde=K(),nde=Et();function ide(e,t,r){var n=ede.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?tde.operate(function(i,s){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;i.subscribe(rde.createOperatorSubscriber(s,function(c){var l;(l=n.next)===null||l===void 0||l.call(n,c),s.next(c)},function(){var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),s.complete()},function(c){var l;a=!1,(l=n.error)===null||l===void 0||l.call(n,c),s.error(c)},function(){var c,l;if(a)(c=n.unsubscribe)===null||c===void 0||c.call(n);(l=n.finalize)===null||l===void 0||l.call(n)}))}):nde.identity}kA.tap=ide});var ry=h(function(NA){Object.defineProperty(NA,"__esModule",{value:!0});NA.throttle=void 0;var sde=U(),TA=K(),ode=ce();function ade(e,t){return sde.operate(function(r,n){var i=t!==null&&t!==void 0?t:{},s=i.leading,o=s===void 0?!0:s,a=i.trailing,c=a===void 0?!1:a,l=!1,d=null,f=null,m=!1,p=function(){if(f===null||f===void 0||f.unsubscribe(),f=null,c)x(),m&&n.complete()},g=function(){f=null,m&&n.complete()},y=function(v){return f=ode.innerFrom(e(v)).subscribe(TA.createOperatorSubscriber(n,p,g))},x=function(){if(l){l=!1;var v=d;d=null,n.next(v),!m&&y(v)}};r.subscribe(TA.createOperatorSubscriber(n,function(v){l=!0,d=v,!(f&&!f.closed)&&(o?x():y(v))},function(){m=!0,!(c&&l&&f&&!f.closed)&&n.complete()}))})}NA.throttle=ade});var BA=h(function(jA){Object.defineProperty(jA,"__esModule",{value:!0});jA.throttleTime=void 0;var cde=or(),ude=ry(),lde=Ki();function dde(e,t,r){if(t===void 0)t=cde.asyncScheduler;var n=lde.timer(e,t);return ude.throttle(function(){return n},r)}jA.throttleTime=dde});var zA=h(function(UA){Object.defineProperty(UA,"__esModule",{value:!0});UA.TimeInterval=UA.timeInterval=void 0;var fde=or(),pde=U(),mde=K();function hde(e){if(e===void 0)e=fde.asyncScheduler;return pde.operate(function(t,r){var n=e.now();t.subscribe(mde.createOperatorSubscriber(r,function(i){var s=e.now(),o=s-n;n=s,r.next(new LA(i,o))}))})}UA.timeInterval=hde;var LA=function(){function e(t,r){this.value=t,this.interval=r}return e}();UA.TimeInterval=LA});var GA=h(function(HA){Object.defineProperty(HA,"__esModule",{value:!0});HA.timeoutWith=void 0;var yde=or(),xde=lf(),bde=df();function vde(e,t,r){var n,i,s;if(r=r!==null&&r!==void 0?r:yde.async,xde.isValidDate(e))n=e;else if(typeof e==="number")i=e;if(t)s=function(){return t};else throw TypeError("No observable provided to switch to");if(n==null&&i==null)throw TypeError("No timeout provided.");return bde.timeout({first:n,each:i,scheduler:r,with:s})}HA.timeoutWith=vde});var JA=h(function(KA){Object.defineProperty(KA,"__esModule",{value:!0});KA.timestamp=void 0;var _de=tf(),Dde=zi();function wde(e){if(e===void 0)e=_de.dateTimestampProvider;return Dde.map(function(t){return{value:t,timestamp:e.now()}})}KA.timestamp=wde});var tk=h(function(ZA){Object.defineProperty(ZA,"__esModule",{value:!0});ZA.window=void 0;var XA=St(),Ede=U(),QA=K(),Sde=wt(),$de=ce();function Cde(e){return Ede.operate(function(t,r){var n=new XA.Subject;r.next(n.asObservable());var i=function(s){n.error(s),r.error(s)};return t.subscribe(QA.createOperatorSubscriber(r,function(s){return n===null||n===void 0?void 0:n.next(s)},function(){n.complete(),r.complete()},i)),$de.innerFrom(e).subscribe(QA.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new XA.Subject)},Sde.noop,i)),function(){n===null||n===void 0||n.unsubscribe(),n=null}})}ZA.window=Cde});var nk=h(function(Ea){var Fde=Ea&&Ea.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.windowCount=void 0;var rk=St(),Rde=U(),Ode=K();function Ade(e,t){if(t===void 0)t=0;var r=t>0?t:e;return Rde.operate(function(n,i){var s=[new rk.Subject],o=[],a=0;i.next(s[0].asObservable()),n.subscribe(Ode.createOperatorSubscriber(i,function(c){var l,d;try{for(var f=Fde(s),m=f.next();!m.done;m=f.next()){var p=m.value;p.next(c)}}catch(x){l={error:x}}finally{try{if(m&&!m.done&&(d=f.return))d.call(f)}finally{if(l)throw l.error}}var g=a-e+1;if(g>=0&&g%r===0)s.shift().complete();if(++a%r===0){var y=new rk.Subject;s.push(y),i.next(y.asObservable())}},function(){while(s.length>0)s.shift().complete();i.complete()},function(c){while(s.length>0)s.shift().error(c);i.error(c)},function(){o=null,s=null}))})}Ea.windowCount=Ade});var ak=h(function(sk){Object.defineProperty(sk,"__esModule",{value:!0});sk.windowTime=void 0;var kde=St(),Pde=or(),Ide=Dr(),Tde=U(),Nde=K(),qde=ci(),jde=ar(),ik=ui();function Mde(e){var t,r,n=[];for(var i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(t=jde.popScheduler(n))!==null&&t!==void 0?t:Pde.asyncScheduler,o=(r=n[0])!==null&&r!==void 0?r:null,a=n[1]||1/0;return Tde.operate(function(c,l){var d=[],f=!1,m=function(x){var{window:v,subs:_}=x;v.complete(),_.unsubscribe(),qde.arrRemove(d,x),f&&p()},p=function(){if(d){var x=new Ide.Subscription;l.add(x);var v=new kde.Subject,_={window:v,subs:x,seen:0};d.push(_),l.next(v.asObservable()),ik.executeSchedule(x,s,function(){return m(_)},e)}};if(o!==null&&o>=0)ik.executeSchedule(l,s,p,o,!0);else f=!0;p();var g=function(x){return d.slice().forEach(x)},y=function(x){g(function(v){var _=v.window;return x(_)}),x(l),l.unsubscribe()};return c.subscribe(Nde.createOperatorSubscriber(l,function(x){g(function(v){v.window.next(x),a<=++v.seen&&m(v)})},function(){return y(function(x){return x.complete()})},function(x){return y(function(v){return v.error(x)})})),function(){d=null}})}sk.windowTime=Mde});var lk=h(function(Sa){var Bde=Sa&&Sa.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.windowToggle=void 0;var Lde=St(),Ude=Dr(),Vde=U(),ck=ce(),ny=K(),uk=wt(),zde=ci();function Hde(e,t){return Vde.operate(function(r,n){var i=[],s=function(o){while(0<i.length)i.shift().error(o);n.error(o)};ck.innerFrom(e).subscribe(ny.createOperatorSubscriber(n,function(o){var a=new Lde.Subject;i.push(a);var c=new Ude.Subscription,l=function(){zde.arrRemove(i,a),a.complete(),c.unsubscribe()},d;try{d=ck.innerFrom(t(o))}catch(f){s(f);return}n.next(a.asObservable()),c.add(d.subscribe(ny.createOperatorSubscriber(n,l,uk.noop,s)))},uk.noop)),r.subscribe(ny.createOperatorSubscriber(n,function(o){var a,c,l=i.slice();try{for(var d=Bde(l),f=d.next();!f.done;f=d.next()){var m=f.value;m.next(o)}}catch(p){a={error:p}}finally{try{if(f&&!f.done&&(c=d.return))c.call(d)}finally{if(a)throw a.error}}},function(){while(0<i.length)i.shift().complete();n.complete()},s,function(){while(0<i.length)i.shift().unsubscribe()}))})}Sa.windowToggle=Hde});var mk=h(function(fk){Object.defineProperty(fk,"__esModule",{value:!0});fk.windowWhen=void 0;var Wde=St(),Gde=U(),dk=K(),Kde=ce();function Yde(e){return Gde.operate(function(t,r){var n,i,s=function(a){n.error(a),r.error(a)},o=function(){i===null||i===void 0||i.unsubscribe(),n===null||n===void 0||n.complete(),n=new Wde.Subject,r.next(n.asObservable());var a;try{a=Kde.innerFrom(e())}catch(c){s(c);return}a.subscribe(i=dk.createOperatorSubscriber(r,o,o,s))};o(),t.subscribe(dk.createOperatorSubscriber(r,function(a){return n.next(a)},function(){n.complete(),r.complete()},s,function(){i===null||i===void 0||i.unsubscribe(),n=null}))})}fk.windowWhen=Yde});var xk=h(function(ss){var hk=ss&&ss.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},gk=ss&&ss.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ss,"__esModule",{value:!0});ss.withLatestFrom=void 0;var Jde=U(),yk=K(),Xde=ce(),Qde=Et(),Zde=wt(),efe=ar();function tfe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=efe.popResultSelector(e);return Jde.operate(function(n,i){var s=e.length,o=Array(s),a=e.map(function(){return!1}),c=!1,l=function(f){Xde.innerFrom(e[f]).subscribe(yk.createOperatorSubscriber(i,function(m){if(o[f]=m,!c&&!a[f])a[f]=!0,(c=a.every(Qde.identity))&&(a=null)},Zde.noop))};for(var d=0;d<s;d++)l(d);n.subscribe(yk.createOperatorSubscriber(i,function(f){if(c){var m=gk([f],hk(o));i.next(r?r.apply(void 0,gk([],hk(m))):m)}}))})}ss.withLatestFrom=tfe});var _k=h(function(bk){Object.defineProperty(bk,"__esModule",{value:!0});bk.zipAll=void 0;var rfe=hf(),nfe=Lg();function ife(e){return nfe.joinAllInternals(rfe.zip,e)}bk.zipAll=ife});var Dk=h(function(os){var sfe=os&&os.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},ofe=os&&os.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(os,"__esModule",{value:!0});os.zip=void 0;var afe=hf(),cfe=U();function ufe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return cfe.operate(function(r,n){afe.zip.apply(void 0,ofe([r],sfe(e))).subscribe(n)})}os.zip=ufe});var wk=h(function(as){var lfe=as&&as.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},dfe=as&&as.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(as,"__esModule",{value:!0});as.zipWith=void 0;var ffe=Dk();function pfe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return ffe.zip.apply(void 0,dfe([],lfe(e)))}as.zipWith=pfe});var wr=h(function(b){var mfe=b&&b.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]}),hfe=b&&b.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))mfe(t,e,r)};Object.defineProperty(b,"__esModule",{value:!0});b.interval=b.iif=b.generate=b.fromEventPattern=b.fromEvent=b.from=b.forkJoin=b.empty=b.defer=b.connectable=b.concat=b.combineLatest=b.bindNodeCallback=b.bindCallback=b.UnsubscriptionError=b.TimeoutError=b.SequenceError=b.ObjectUnsubscribedError=b.NotFoundError=b.EmptyError=b.ArgumentOutOfRangeError=b.firstValueFrom=b.lastValueFrom=b.isObservable=b.identity=b.noop=b.pipe=b.NotificationKind=b.Notification=b.Subscriber=b.Subscription=b.Scheduler=b.VirtualAction=b.VirtualTimeScheduler=b.animationFrameScheduler=b.animationFrame=b.queueScheduler=b.queue=b.asyncScheduler=b.async=b.asapScheduler=b.asap=b.AsyncSubject=b.ReplaySubject=b.BehaviorSubject=b.Subject=b.animationFrames=b.observable=b.ConnectableObservable=b.Observable=void 0;b.filter=b.expand=b.exhaustMap=b.exhaustAll=b.exhaust=b.every=b.endWith=b.elementAt=b.distinctUntilKeyChanged=b.distinctUntilChanged=b.distinct=b.dematerialize=b.delayWhen=b.delay=b.defaultIfEmpty=b.debounceTime=b.debounce=b.count=b.connect=b.concatWith=b.concatMapTo=b.concatMap=b.concatAll=b.combineLatestWith=b.combineLatestAll=b.combineAll=b.catchError=b.bufferWhen=b.bufferToggle=b.bufferTime=b.bufferCount=b.buffer=b.auditTime=b.audit=b.config=b.NEVER=b.EMPTY=b.scheduled=b.zip=b.using=b.timer=b.throwError=b.range=b.race=b.partition=b.pairs=b.onErrorResumeNext=b.of=b.never=b.merge=void 0;b.switchMap=b.switchAll=b.subscribeOn=b.startWith=b.skipWhile=b.skipUntil=b.skipLast=b.skip=b.single=b.shareReplay=b.share=b.sequenceEqual=b.scan=b.sampleTime=b.sample=b.refCount=b.retryWhen=b.retry=b.repeatWhen=b.repeat=b.reduce=b.raceWith=b.publishReplay=b.publishLast=b.publishBehavior=b.publish=b.pluck=b.pairwise=b.onErrorResumeNextWith=b.observeOn=b.multicast=b.min=b.mergeWith=b.mergeScan=b.mergeMapTo=b.mergeMap=b.flatMap=b.mergeAll=b.max=b.materialize=b.mapTo=b.map=b.last=b.isEmpty=b.ignoreElements=b.groupBy=b.first=b.findIndex=b.find=b.finalize=void 0;b.zipWith=b.zipAll=b.withLatestFrom=b.windowWhen=b.windowToggle=b.windowTime=b.windowCount=b.window=b.toArray=b.timestamp=b.timeoutWith=b.timeout=b.timeInterval=b.throwIfEmpty=b.throttleTime=b.throttle=b.tap=b.takeWhile=b.takeUntil=b.takeLast=b.take=b.switchScan=b.switchMapTo=void 0;var gfe=ze();Object.defineProperty(b,"Observable",{enumerable:!0,get:function(){return gfe.Observable}});var yfe=hu();Object.defineProperty(b,"ConnectableObservable",{enumerable:!0,get:function(){return yfe.ConnectableObservable}});var xfe=pu();Object.defineProperty(b,"observable",{enumerable:!0,get:function(){return xfe.observable}});var bfe=P2();Object.defineProperty(b,"animationFrames",{enumerable:!0,get:function(){return bfe.animationFrames}});var vfe=St();Object.defineProperty(b,"Subject",{enumerable:!0,get:function(){return vfe.Subject}});var _fe=og();Object.defineProperty(b,"BehaviorSubject",{enumerable:!0,get:function(){return _fe.BehaviorSubject}});var Dfe=rf();Object.defineProperty(b,"ReplaySubject",{enumerable:!0,get:function(){return Dfe.ReplaySubject}});var wfe=nf();Object.defineProperty(b,"AsyncSubject",{enumerable:!0,get:function(){return wfe.AsyncSubject}});var Ek=oE();Object.defineProperty(b,"asap",{enumerable:!0,get:function(){return Ek.asap}});Object.defineProperty(b,"asapScheduler",{enumerable:!0,get:function(){return Ek.asapScheduler}});var Sk=or();Object.defineProperty(b,"async",{enumerable:!0,get:function(){return Sk.async}});Object.defineProperty(b,"asyncScheduler",{enumerable:!0,get:function(){return Sk.asyncScheduler}});var $k=hE();Object.defineProperty(b,"queue",{enumerable:!0,get:function(){return $k.queue}});Object.defineProperty(b,"queueScheduler",{enumerable:!0,get:function(){return $k.queueScheduler}});var Ck=DE();Object.defineProperty(b,"animationFrame",{enumerable:!0,get:function(){return Ck.animationFrame}});Object.defineProperty(b,"animationFrameScheduler",{enumerable:!0,get:function(){return Ck.animationFrameScheduler}});var Fk=SE();Object.defineProperty(b,"VirtualTimeScheduler",{enumerable:!0,get:function(){return Fk.VirtualTimeScheduler}});Object.defineProperty(b,"VirtualAction",{enumerable:!0,get:function(){return Fk.VirtualAction}});var Efe=ug();Object.defineProperty(b,"Scheduler",{enumerable:!0,get:function(){return Efe.Scheduler}});var Sfe=Dr();Object.defineProperty(b,"Subscription",{enumerable:!0,get:function(){return Sfe.Subscription}});var $fe=Qo();Object.defineProperty(b,"Subscriber",{enumerable:!0,get:function(){return $fe.Subscriber}});var Rk=uf();Object.defineProperty(b,"Notification",{enumerable:!0,get:function(){return Rk.Notification}});Object.defineProperty(b,"NotificationKind",{enumerable:!0,get:function(){return Rk.NotificationKind}});var Cfe=mu();Object.defineProperty(b,"pipe",{enumerable:!0,get:function(){return Cfe.pipe}});var Ffe=wt();Object.defineProperty(b,"noop",{enumerable:!0,get:function(){return Ffe.noop}});var Rfe=Et();Object.defineProperty(b,"identity",{enumerable:!0,get:function(){return Rfe.identity}});var Ofe=BS();Object.defineProperty(b,"isObservable",{enumerable:!0,get:function(){return Ofe.isObservable}});var Afe=HS();Object.defineProperty(b,"lastValueFrom",{enumerable:!0,get:function(){return Afe.lastValueFrom}});var kfe=KS();Object.defineProperty(b,"firstValueFrom",{enumerable:!0,get:function(){return kfe.firstValueFrom}});var Pfe=Eg();Object.defineProperty(b,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return Pfe.ArgumentOutOfRangeError}});var Ife=Vi();Object.defineProperty(b,"EmptyError",{enumerable:!0,get:function(){return Ife.EmptyError}});var Tfe=Sg();Object.defineProperty(b,"NotFoundError",{enumerable:!0,get:function(){return Tfe.NotFoundError}});var Nfe=rg();Object.defineProperty(b,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return Nfe.ObjectUnsubscribedError}});var qfe=$g();Object.defineProperty(b,"SequenceError",{enumerable:!0,get:function(){return qfe.SequenceError}});var jfe=df();Object.defineProperty(b,"TimeoutError",{enumerable:!0,get:function(){return jfe.TimeoutError}});var Mfe=Uh();Object.defineProperty(b,"UnsubscriptionError",{enumerable:!0,get:function(){return Mfe.UnsubscriptionError}});var Bfe=d$();Object.defineProperty(b,"bindCallback",{enumerable:!0,get:function(){return Bfe.bindCallback}});var Lfe=m$();Object.defineProperty(b,"bindNodeCallback",{enumerable:!0,get:function(){return Lfe.bindNodeCallback}});var Ufe=ff();Object.defineProperty(b,"combineLatest",{enumerable:!0,get:function(){return Ufe.combineLatest}});var Vfe=vu();Object.defineProperty(b,"concat",{enumerable:!0,get:function(){return Vfe.concat}});var zfe=U$();Object.defineProperty(b,"connectable",{enumerable:!0,get:function(){return zfe.connectable}});var Hfe=_u();Object.defineProperty(b,"defer",{enumerable:!0,get:function(){return Hfe.defer}});var Wfe=Qr();Object.defineProperty(b,"empty",{enumerable:!0,get:function(){return Wfe.empty}});var Gfe=H$();Object.defineProperty(b,"forkJoin",{enumerable:!0,get:function(){return Gfe.forkJoin}});var Kfe=li();Object.defineProperty(b,"from",{enumerable:!0,get:function(){return Kfe.from}});var Yfe=G$();Object.defineProperty(b,"fromEvent",{enumerable:!0,get:function(){return Yfe.fromEvent}});var Jfe=X$();Object.defineProperty(b,"fromEventPattern",{enumerable:!0,get:function(){return Jfe.fromEventPattern}});var Xfe=Z$();Object.defineProperty(b,"generate",{enumerable:!0,get:function(){return Xfe.generate}});var Qfe=rC();Object.defineProperty(b,"iif",{enumerable:!0,get:function(){return Qfe.iif}});var Zfe=kg();Object.defineProperty(b,"interval",{enumerable:!0,get:function(){return Zfe.interval}});var epe=lC();Object.defineProperty(b,"merge",{enumerable:!0,get:function(){return epe.merge}});var tpe=Pg();Object.defineProperty(b,"never",{enumerable:!0,get:function(){return tpe.never}});var rpe=cf();Object.defineProperty(b,"of",{enumerable:!0,get:function(){return rpe.of}});var npe=Ig();Object.defineProperty(b,"onErrorResumeNext",{enumerable:!0,get:function(){return npe.onErrorResumeNext}});var ipe=_C();Object.defineProperty(b,"pairs",{enumerable:!0,get:function(){return ipe.pairs}});var spe=AC();Object.defineProperty(b,"partition",{enumerable:!0,get:function(){return spe.partition}});var ope=Tg();Object.defineProperty(b,"race",{enumerable:!0,get:function(){return ope.race}});var ape=jC();Object.defineProperty(b,"range",{enumerable:!0,get:function(){return ape.range}});var cpe=wg();Object.defineProperty(b,"throwError",{enumerable:!0,get:function(){return cpe.throwError}});var upe=Ki();Object.defineProperty(b,"timer",{enumerable:!0,get:function(){return upe.timer}});var lpe=LC();Object.defineProperty(b,"using",{enumerable:!0,get:function(){return lpe.using}});var dpe=hf();Object.defineProperty(b,"zip",{enumerable:!0,get:function(){return dpe.zip}});var fpe=Dg();Object.defineProperty(b,"scheduled",{enumerable:!0,get:function(){return fpe.scheduled}});var ppe=Qr();Object.defineProperty(b,"EMPTY",{enumerable:!0,get:function(){return ppe.EMPTY}});var mpe=Pg();Object.defineProperty(b,"NEVER",{enumerable:!0,get:function(){return mpe.NEVER}});hfe(VC(),b);var hpe=Xo();Object.defineProperty(b,"config",{enumerable:!0,get:function(){return hpe.config}});var gpe=Ng();Object.defineProperty(b,"audit",{enumerable:!0,get:function(){return gpe.audit}});var ype=YC();Object.defineProperty(b,"auditTime",{enumerable:!0,get:function(){return ype.auditTime}});var xpe=ZC();Object.defineProperty(b,"buffer",{enumerable:!0,get:function(){return xpe.buffer}});var bpe=e6();Object.defineProperty(b,"bufferCount",{enumerable:!0,get:function(){return bpe.bufferCount}});var vpe=r6();Object.defineProperty(b,"bufferTime",{enumerable:!0,get:function(){return vpe.bufferTime}});var _pe=s6();Object.defineProperty(b,"bufferToggle",{enumerable:!0,get:function(){return _pe.bufferToggle}});var Dpe=u6();Object.defineProperty(b,"bufferWhen",{enumerable:!0,get:function(){return Dpe.bufferWhen}});var wpe=p6();Object.defineProperty(b,"catchError",{enumerable:!0,get:function(){return wpe.catchError}});var Epe=$6();Object.defineProperty(b,"combineAll",{enumerable:!0,get:function(){return Epe.combineAll}});var Spe=Ug();Object.defineProperty(b,"combineLatestAll",{enumerable:!0,get:function(){return Spe.combineLatestAll}});var $pe=A6();Object.defineProperty(b,"combineLatestWith",{enumerable:!0,get:function(){return $pe.combineLatestWith}});var Cpe=mf();Object.defineProperty(b,"concatAll",{enumerable:!0,get:function(){return Cpe.concatAll}});var Fpe=Vg();Object.defineProperty(b,"concatMap",{enumerable:!0,get:function(){return Fpe.concatMap}});var Rpe=j6();Object.defineProperty(b,"concatMapTo",{enumerable:!0,get:function(){return Rpe.concatMapTo}});var Ope=B6();Object.defineProperty(b,"concatWith",{enumerable:!0,get:function(){return Ope.concatWith}});var Ape=gf();Object.defineProperty(b,"connect",{enumerable:!0,get:function(){return Ape.connect}});var kpe=K6();Object.defineProperty(b,"count",{enumerable:!0,get:function(){return kpe.count}});var Ppe=Q6();Object.defineProperty(b,"debounce",{enumerable:!0,get:function(){return Ppe.debounce}});var Ipe=tF();Object.defineProperty(b,"debounceTime",{enumerable:!0,get:function(){return Ipe.debounceTime}});var Tpe=Du();Object.defineProperty(b,"defaultIfEmpty",{enumerable:!0,get:function(){return Tpe.defaultIfEmpty}});var Npe=gF();Object.defineProperty(b,"delay",{enumerable:!0,get:function(){return Npe.delay}});var qpe=Wg();Object.defineProperty(b,"delayWhen",{enumerable:!0,get:function(){return qpe.delayWhen}});var jpe=bF();Object.defineProperty(b,"dematerialize",{enumerable:!0,get:function(){return jpe.dematerialize}});var Mpe=wF();Object.defineProperty(b,"distinct",{enumerable:!0,get:function(){return Mpe.distinct}});var Bpe=Gg();Object.defineProperty(b,"distinctUntilChanged",{enumerable:!0,get:function(){return Bpe.distinctUntilChanged}});var Lpe=FF();Object.defineProperty(b,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Lpe.distinctUntilKeyChanged}});var Upe=IF();Object.defineProperty(b,"elementAt",{enumerable:!0,get:function(){return Upe.elementAt}});var Vpe=TF();Object.defineProperty(b,"endWith",{enumerable:!0,get:function(){return Vpe.endWith}});var zpe=jF();Object.defineProperty(b,"every",{enumerable:!0,get:function(){return zpe.every}});var Hpe=KF();Object.defineProperty(b,"exhaust",{enumerable:!0,get:function(){return Hpe.exhaust}});var Wpe=Yg();Object.defineProperty(b,"exhaustAll",{enumerable:!0,get:function(){return Wpe.exhaustAll}});var Gpe=Kg();Object.defineProperty(b,"exhaustMap",{enumerable:!0,get:function(){return Gpe.exhaustMap}});var Kpe=XF();Object.defineProperty(b,"expand",{enumerable:!0,get:function(){return Kpe.expand}});var Ype=Ys();Object.defineProperty(b,"filter",{enumerable:!0,get:function(){return Ype.filter}});var Jpe=eR();Object.defineProperty(b,"finalize",{enumerable:!0,get:function(){return Jpe.finalize}});var Xpe=Jg();Object.defineProperty(b,"find",{enumerable:!0,get:function(){return Xpe.find}});var Qpe=oR();Object.defineProperty(b,"findIndex",{enumerable:!0,get:function(){return Qpe.findIndex}});var Zpe=uR();Object.defineProperty(b,"first",{enumerable:!0,get:function(){return Zpe.first}});var e0e=pR();Object.defineProperty(b,"groupBy",{enumerable:!0,get:function(){return e0e.groupBy}});var t0e=zg();Object.defineProperty(b,"ignoreElements",{enumerable:!0,get:function(){return t0e.ignoreElements}});var r0e=gR();Object.defineProperty(b,"isEmpty",{enumerable:!0,get:function(){return r0e.isEmpty}});var n0e=bR();Object.defineProperty(b,"last",{enumerable:!0,get:function(){return n0e.last}});var i0e=zi();Object.defineProperty(b,"map",{enumerable:!0,get:function(){return i0e.map}});var s0e=Hg();Object.defineProperty(b,"mapTo",{enumerable:!0,get:function(){return s0e.mapTo}});var o0e=DR();Object.defineProperty(b,"materialize",{enumerable:!0,get:function(){return o0e.materialize}});var a0e=SR();Object.defineProperty(b,"max",{enumerable:!0,get:function(){return a0e.max}});var c0e=bu();Object.defineProperty(b,"mergeAll",{enumerable:!0,get:function(){return c0e.mergeAll}});var u0e=FR();Object.defineProperty(b,"flatMap",{enumerable:!0,get:function(){return u0e.flatMap}});var l0e=di();Object.defineProperty(b,"mergeMap",{enumerable:!0,get:function(){return l0e.mergeMap}});var d0e=kR();Object.defineProperty(b,"mergeMapTo",{enumerable:!0,get:function(){return d0e.mergeMapTo}});var f0e=TR();Object.defineProperty(b,"mergeScan",{enumerable:!0,get:function(){return f0e.mergeScan}});var p0e=jR();Object.defineProperty(b,"mergeWith",{enumerable:!0,get:function(){return p0e.mergeWith}});var m0e=LR();Object.defineProperty(b,"min",{enumerable:!0,get:function(){return m0e.min}});var h0e=yf();Object.defineProperty(b,"multicast",{enumerable:!0,get:function(){return h0e.multicast}});var g0e=yu();Object.defineProperty(b,"observeOn",{enumerable:!0,get:function(){return g0e.observeOn}});var y0e=WR();Object.defineProperty(b,"onErrorResumeNextWith",{enumerable:!0,get:function(){return y0e.onErrorResumeNextWith}});var x0e=YR();Object.defineProperty(b,"pairwise",{enumerable:!0,get:function(){return x0e.pairwise}});var b0e=QR();Object.defineProperty(b,"pluck",{enumerable:!0,get:function(){return b0e.pluck}});var v0e=tO();Object.defineProperty(b,"publish",{enumerable:!0,get:function(){return v0e.publish}});var _0e=iO();Object.defineProperty(b,"publishBehavior",{enumerable:!0,get:function(){return _0e.publishBehavior}});var D0e=aO();Object.defineProperty(b,"publishLast",{enumerable:!0,get:function(){return D0e.publishLast}});var w0e=dO();Object.defineProperty(b,"publishReplay",{enumerable:!0,get:function(){return w0e.publishReplay}});var E0e=fO();Object.defineProperty(b,"raceWith",{enumerable:!0,get:function(){return E0e.raceWith}});var S0e=Da();Object.defineProperty(b,"reduce",{enumerable:!0,get:function(){return S0e.reduce}});var $0e=gO();Object.defineProperty(b,"repeat",{enumerable:!0,get:function(){return $0e.repeat}});var C0e=vO();Object.defineProperty(b,"repeatWhen",{enumerable:!0,get:function(){return C0e.repeatWhen}});var F0e=EO();Object.defineProperty(b,"retry",{enumerable:!0,get:function(){return F0e.retry}});var R0e=FO();Object.defineProperty(b,"retryWhen",{enumerable:!0,get:function(){return R0e.retryWhen}});var O0e=Zh();Object.defineProperty(b,"refCount",{enumerable:!0,get:function(){return O0e.refCount}});var A0e=Zg();Object.defineProperty(b,"sample",{enumerable:!0,get:function(){return A0e.sample}});var k0e=IO();Object.defineProperty(b,"sampleTime",{enumerable:!0,get:function(){return k0e.sampleTime}});var P0e=qO();Object.defineProperty(b,"scan",{enumerable:!0,get:function(){return P0e.scan}});var I0e=LO();Object.defineProperty(b,"sequenceEqual",{enumerable:!0,get:function(){return I0e.sequenceEqual}});var T0e=ty();Object.defineProperty(b,"share",{enumerable:!0,get:function(){return T0e.share}});var N0e=WO();Object.defineProperty(b,"shareReplay",{enumerable:!0,get:function(){return N0e.shareReplay}});var q0e=YO();Object.defineProperty(b,"single",{enumerable:!0,get:function(){return q0e.single}});var j0e=QO();Object.defineProperty(b,"skip",{enumerable:!0,get:function(){return j0e.skip}});var M0e=tA();Object.defineProperty(b,"skipLast",{enumerable:!0,get:function(){return M0e.skipLast}});var B0e=sA();Object.defineProperty(b,"skipUntil",{enumerable:!0,get:function(){return B0e.skipUntil}});var L0e=cA();Object.defineProperty(b,"skipWhile",{enumerable:!0,get:function(){return L0e.skipWhile}});var U0e=fA();Object.defineProperty(b,"startWith",{enumerable:!0,get:function(){return U0e.startWith}});var V0e=xu();Object.defineProperty(b,"subscribeOn",{enumerable:!0,get:function(){return V0e.subscribeOn}});var z0e=xA();Object.defineProperty(b,"switchAll",{enumerable:!0,get:function(){return z0e.switchAll}});var H0e=Su();Object.defineProperty(b,"switchMap",{enumerable:!0,get:function(){return H0e.switchMap}});var W0e=DA();Object.defineProperty(b,"switchMapTo",{enumerable:!0,get:function(){return W0e.switchMapTo}});var G0e=SA();Object.defineProperty(b,"switchScan",{enumerable:!0,get:function(){return G0e.switchScan}});var K0e=wu();Object.defineProperty(b,"take",{enumerable:!0,get:function(){return K0e.take}});var Y0e=Xg();Object.defineProperty(b,"takeLast",{enumerable:!0,get:function(){return Y0e.takeLast}});var J0e=FA();Object.defineProperty(b,"takeUntil",{enumerable:!0,get:function(){return J0e.takeUntil}});var X0e=AA();Object.defineProperty(b,"takeWhile",{enumerable:!0,get:function(){return X0e.takeWhile}});var Q0e=IA();Object.defineProperty(b,"tap",{enumerable:!0,get:function(){return Q0e.tap}});var Z0e=ry();Object.defineProperty(b,"throttle",{enumerable:!0,get:function(){return Z0e.throttle}});var eme=BA();Object.defineProperty(b,"throttleTime",{enumerable:!0,get:function(){return eme.throttleTime}});var tme=Eu();Object.defineProperty(b,"throwIfEmpty",{enumerable:!0,get:function(){return tme.throwIfEmpty}});var rme=zA();Object.defineProperty(b,"timeInterval",{enumerable:!0,get:function(){return rme.timeInterval}});var nme=df();Object.defineProperty(b,"timeout",{enumerable:!0,get:function(){return nme.timeout}});var ime=GA();Object.defineProperty(b,"timeoutWith",{enumerable:!0,get:function(){return ime.timeoutWith}});var sme=JA();Object.defineProperty(b,"timestamp",{enumerable:!0,get:function(){return sme.timestamp}});var ome=Bg();Object.defineProperty(b,"toArray",{enumerable:!0,get:function(){return ome.toArray}});var ame=tk();Object.defineProperty(b,"window",{enumerable:!0,get:function(){return ame.window}});var cme=nk();Object.defineProperty(b,"windowCount",{enumerable:!0,get:function(){return cme.windowCount}});var ume=ak();Object.defineProperty(b,"windowTime",{enumerable:!0,get:function(){return ume.windowTime}});var lme=lk();Object.defineProperty(b,"windowToggle",{enumerable:!0,get:function(){return lme.windowToggle}});var dme=mk();Object.defineProperty(b,"windowWhen",{enumerable:!0,get:function(){return dme.windowWhen}});var fme=xk();Object.defineProperty(b,"withLatestFrom",{enumerable:!0,get:function(){return fme.withLatestFrom}});var pme=_k();Object.defineProperty(b,"zipAll",{enumerable:!0,get:function(){return pme.zipAll}});var mme=wk();Object.defineProperty(b,"zipWith",{enumerable:!0,get:function(){return mme.zipWith}})});function hme(e,t){return{value:e,key:t||{}}}function $t(e){let t=at.fromEvent(e.input,"keypress",hme).pipe(at.takeUntil(at.fromEvent(e,"close"))).pipe(at.filter(({key:r})=>r.name!=="enter"&&r.name!=="return"));return{line:at.fromEvent(e,"line"),keypress:t,normalizedUpKey:t.pipe(at.filter(({key:r})=>r.name==="up"||r.name==="k"||r.name==="p"&&r.ctrl),at.share()),normalizedDownKey:t.pipe(at.filter(({key:r})=>r.name==="down"||r.name==="j"||r.name==="n"&&r.ctrl),at.share()),numberKey:t.pipe(at.filter((r)=>r.value&&"123456789".includes(r.value)),at.map((r)=>Number(r.value)),at.share()),spaceKey:t.pipe(at.filter(({key:r})=>r&&r.name==="space"),at.share()),aKey:t.pipe(at.filter(({key:r})=>r&&r.name==="a"),at.share()),iKey:t.pipe(at.filter(({key:r})=>r&&r.name==="i"),at.share())}}var at;var fi=A(()=>{at=ne(wr(),1)});class Tn{constructor(e,t={}){let{isInfinite:r=!0}=t;this.lastIndex=0,this.screen=e,this.isInfinite=r}paginate(e,t,r){r||=7;let n=e.split(`
|
|
31
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}})});var ci=h(function(N1){Object.defineProperty(N1,"__esModule",{value:!0});N1.arrRemove=void 0;function GX(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}N1.arrRemove=GX});var Dr=h(function(sr){var j1=sr&&sr.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},M1=sr&&sr.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},B1=sr&&sr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(sr,"__esModule",{value:!0});sr.isSubscription=sr.EMPTY_SUBSCRIPTION=sr.Subscription=void 0;var fu=Le(),Vh=Uh(),L1=ci(),zh=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=j1(o),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(y){t={error:y}}finally{try{if(c&&!c.done&&(r=a.return))r.call(a)}finally{if(t)throw t.error}}else o.remove(this);var d=this.initialTeardown;if(fu.isFunction(d))try{d()}catch(y){s=y instanceof Vh.UnsubscriptionError?y.errors:[y]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var m=j1(f),p=m.next();!p.done;p=m.next()){var g=p.value;try{U1(g)}catch(y){if(s=s!==null&&s!==void 0?s:[],y instanceof Vh.UnsubscriptionError)s=B1(B1([],M1(s)),M1(y.errors));else s.push(y)}}}catch(y){n={error:y}}finally{try{if(p&&!p.done&&(i=m.return))i.call(m)}finally{if(n)throw n.error}}}if(s)throw new Vh.UnsubscriptionError(s)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)U1(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;if(r===t)this._parentage=null;else if(Array.isArray(r))L1.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;if(r&&L1.arrRemove(r,t),t instanceof e)t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();sr.Subscription=zh;sr.EMPTY_SUBSCRIPTION=zh.EMPTY;function KX(e){return e instanceof zh||e&&"closed"in e&&fu.isFunction(e.remove)&&fu.isFunction(e.add)&&fu.isFunction(e.unsubscribe)}sr.isSubscription=KX;function U1(e){if(fu.isFunction(e))e();else e.unsubscribe()}});var Xo=h(function(V1){Object.defineProperty(V1,"__esModule",{value:!0});V1.config=void 0;V1.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var Hh=h(function(On){var H1=On&&On.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},W1=On&&On.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(On,"__esModule",{value:!0});On.timeoutProvider=void 0;On.timeoutProvider={setTimeout:function(e,t){var r=[];for(var n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=On.timeoutProvider.delegate;if(i===null||i===void 0?void 0:i.setTimeout)return i.setTimeout.apply(i,W1([e,t],H1(r)));return setTimeout.apply(void 0,W1([e,t],H1(r)))},clearTimeout:function(e){var t=On.timeoutProvider.delegate;return((t===null||t===void 0?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0}});var Wh=h(function(G1){Object.defineProperty(G1,"__esModule",{value:!0});G1.reportUnhandledError=void 0;var YX=Xo(),JX=Hh();function XX(e){JX.timeoutProvider.setTimeout(function(){var t=YX.config.onUnhandledError;if(t)t(e);else throw e})}G1.reportUnhandledError=XX});var wt=h(function(Y1){Object.defineProperty(Y1,"__esModule",{value:!0});Y1.noop=void 0;function QX(){}Y1.noop=QX});var Z1=h(function(X1){Object.defineProperty(X1,"__esModule",{value:!0});X1.createNotification=X1.nextNotification=X1.errorNotification=X1.COMPLETE_NOTIFICATION=void 0;X1.COMPLETE_NOTIFICATION=function(){return Qd("C",void 0,void 0)}();function ZX(e){return Qd("E",void 0,e)}X1.errorNotification=ZX;function eQ(e){return Qd("N",e,void 0)}X1.nextNotification=eQ;function Qd(e,t,r){return{kind:e,value:t,error:r}}X1.createNotification=Qd});var Zd=h(function(t2){Object.defineProperty(t2,"__esModule",{value:!0});t2.captureError=t2.errorContext=void 0;var e2=Xo(),Gs=null;function iQ(e){if(e2.config.useDeprecatedSynchronousErrorHandling){var t=!Gs;if(t)Gs={errorThrown:!1,error:null};if(e(),t){var r=Gs,n=r.errorThrown,i=r.error;if(Gs=null,n)throw i}}else e()}t2.errorContext=iQ;function sQ(e){if(e2.config.useDeprecatedSynchronousErrorHandling&&Gs)Gs.errorThrown=!0,Gs.error=e}t2.captureError=sQ});var Qo=h(function(Jr){var s2=Jr&&Jr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Jr,"__esModule",{value:!0});Jr.EMPTY_OBSERVER=Jr.SafeSubscriber=Jr.Subscriber=void 0;var aQ=Le(),n2=Dr(),Jh=Xo(),cQ=Wh(),i2=wt(),Gh=Z1(),uQ=Hh(),lQ=Zd(),o2=function(e){s2(t,e);function t(r){var n=e.call(this)||this;if(n.isStopped=!1,r){if(n.destination=r,n2.isSubscription(r))r.add(n)}else n.destination=Jr.EMPTY_OBSERVER;return n}return t.create=function(r,n,i){return new a2(r,n,i)},t.prototype.next=function(r){if(this.isStopped)Yh(Gh.nextNotification(r),this);else this._next(r)},t.prototype.error=function(r){if(this.isStopped)Yh(Gh.errorNotification(r),this);else this.isStopped=!0,this._error(r)},t.prototype.complete=function(){if(this.isStopped)Yh(Gh.COMPLETE_NOTIFICATION,this);else this.isStopped=!0,this._complete()},t.prototype.unsubscribe=function(){if(!this.closed)this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(n2.Subscription);Jr.Subscriber=o2;var dQ=Function.prototype.bind;function Kh(e,t){return dQ.call(e,t)}var fQ=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){ef(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){ef(n)}else ef(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){ef(r)}},e}(),a2=function(e){s2(t,e);function t(r,n,i){var s=e.call(this)||this,o;if(aQ.isFunction(r)||!r)o={next:r!==null&&r!==void 0?r:void 0,error:n!==null&&n!==void 0?n:void 0,complete:i!==null&&i!==void 0?i:void 0};else{var a;if(s&&Jh.config.useDeprecatedNextContext)a=Object.create(r),a.unsubscribe=function(){return s.unsubscribe()},o={next:r.next&&Kh(r.next,a),error:r.error&&Kh(r.error,a),complete:r.complete&&Kh(r.complete,a)};else o=r}return s.destination=new fQ(o),s}return t}(o2);Jr.SafeSubscriber=a2;function ef(e){if(Jh.config.useDeprecatedSynchronousErrorHandling)lQ.captureError(e);else cQ.reportUnhandledError(e)}function pQ(e){throw e}function Yh(e,t){var r=Jh.config.onStoppedNotification;r&&uQ.timeoutProvider.setTimeout(function(){return r(e,t)})}Jr.EMPTY_OBSERVER={closed:!0,next:i2.noop,error:pQ,complete:i2.noop}});var pu=h(function(c2){Object.defineProperty(c2,"__esModule",{value:!0});c2.observable=void 0;c2.observable=function(){return typeof Symbol==="function"&&Symbol.observable||"@@observable"}()});var Et=h(function(l2){Object.defineProperty(l2,"__esModule",{value:!0});l2.identity=void 0;function mQ(e){return e}l2.identity=mQ});var mu=h(function(p2){Object.defineProperty(p2,"__esModule",{value:!0});p2.pipeFromArray=p2.pipe=void 0;var hQ=Et();function gQ(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return f2(e)}p2.pipe=gQ;function f2(e){if(e.length===0)return hQ.identity;if(e.length===1)return e[0];return function(r){return e.reduce(function(n,i){return i(n)},r)}}p2.pipeFromArray=f2});var ze=h(function(g2){Object.defineProperty(g2,"__esModule",{value:!0});g2.Observable=void 0;var Qh=Qo(),xQ=Dr(),bQ=pu(),vQ=mu(),_Q=Xo(),Xh=Le(),DQ=Zd(),wQ=function(){function e(t){if(t)this._subscribe=t}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,s=SQ(t)?t:new Qh.SafeSubscriber(t,r,n);return DQ.errorContext(function(){var o=i,a=o.operator,c=o.source;s.add(a?a.call(s,c):c?i._subscribe(s):i._trySubscribe(s))}),s},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=h2(r),new r(function(i,s){var o=new Qh.SafeSubscriber({next:function(a){try{t(a)}catch(c){s(c),o.unsubscribe()}},error:s,complete:i});n.subscribe(o)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[bQ.observable]=function(){return this},e.prototype.pipe=function(){var t=[];for(var r=0;r<arguments.length;r++)t[r]=arguments[r];return vQ.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=h2(t),new t(function(n,i){var s;r.subscribe(function(o){return s=o},function(o){return i(o)},function(){return n(s)})})},e.create=function(t){return new e(t)},e}();g2.Observable=wQ;function h2(e){var t;return(t=e!==null&&e!==void 0?e:_Q.config.Promise)!==null&&t!==void 0?t:Promise}function EQ(e){return e&&Xh.isFunction(e.next)&&Xh.isFunction(e.error)&&Xh.isFunction(e.complete)}function SQ(e){return e&&e instanceof Qh.Subscriber||EQ(e)&&xQ.isSubscription(e)}});var U=h(function(b2){Object.defineProperty(b2,"__esModule",{value:!0});b2.operate=b2.hasLift=void 0;var $Q=Le();function x2(e){return $Q.isFunction(e===null||e===void 0?void 0:e.lift)}b2.hasLift=x2;function CQ(e){return function(t){if(x2(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw TypeError("Unable to lift unknown Observable type")}}b2.operate=CQ});var K=h(function(Li){var RQ=Li&&Li.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Li,"__esModule",{value:!0});Li.OperatorSubscriber=Li.createOperatorSubscriber=void 0;var OQ=Qo();function AQ(e,t,r,n,i){return new _2(e,t,r,n,i)}Li.createOperatorSubscriber=AQ;var _2=function(e){RQ(t,e);function t(r,n,i,s,o,a){var c=e.call(this,r)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(l){try{n(l)}catch(d){r.error(d)}}:e.prototype._next,c._error=s?function(l){try{s(l)}catch(d){r.error(d)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(OQ.Subscriber);Li.OperatorSubscriber=_2});var Zh=h(function(D2){Object.defineProperty(D2,"__esModule",{value:!0});D2.refCount=void 0;var kQ=U(),PQ=K();function IQ(){return kQ.operate(function(e,t){var r=null;e._refCount++;var n=PQ.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){r=null;return}var i=e._connection,s=r;if(r=null,i&&(!s||i===s))i.unsubscribe();t.unsubscribe()});if(e.subscribe(n),!n.closed)r=e.connect()})}D2.refCount=IQ});var hu=h(function(Zo){var TQ=Zo&&Zo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Zo,"__esModule",{value:!0});Zo.ConnectableObservable=void 0;var NQ=ze(),E2=Dr(),qQ=Zh(),jQ=K(),MQ=U(),BQ=function(e){TQ(t,e);function t(r,n){var i=e.call(this)||this;if(i.source=r,i.subjectFactory=n,i._subject=null,i._refCount=0,i._connection=null,MQ.hasLift(r))i.lift=r.lift;return i}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;if(!r||r.isStopped)this._subject=this.subjectFactory();return this._subject},t.prototype._teardown=function(){this._refCount=0;var r=this._connection;this._subject=this._connection=null,r===null||r===void 0||r.unsubscribe()},t.prototype.connect=function(){var r=this,n=this._connection;if(!n){n=this._connection=new E2.Subscription;var i=this.getSubject();if(n.add(this.source.subscribe(jQ.createOperatorSubscriber(i,void 0,function(){r._teardown(),i.complete()},function(s){r._teardown(),i.error(s)},function(){return r._teardown()}))),n.closed)this._connection=null,n=E2.Subscription.EMPTY}return n},t.prototype.refCount=function(){return qQ.refCount()(this)},t}(NQ.Observable);Zo.ConnectableObservable=BQ});var $2=h(function(S2){Object.defineProperty(S2,"__esModule",{value:!0});S2.performanceTimestampProvider=void 0;S2.performanceTimestampProvider={now:function(){return(S2.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var tg=h(function(Xr){var C2=Xr&&Xr.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},F2=Xr&&Xr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.animationFrameProvider=void 0;var LQ=Dr();Xr.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=Xr.animationFrameProvider.delegate;if(n)t=n.requestAnimationFrame,r=n.cancelAnimationFrame;var i=t(function(s){r=void 0,e(s)});return new LQ.Subscription(function(){return r===null||r===void 0?void 0:r(i)})},requestAnimationFrame:function(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Xr.animationFrameProvider.delegate;return((r===null||r===void 0?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,F2([],C2(e)))},cancelAnimationFrame:function(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Xr.animationFrameProvider.delegate;return((r===null||r===void 0?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,F2([],C2(e)))},delegate:void 0}});var P2=h(function(A2){Object.defineProperty(A2,"__esModule",{value:!0});A2.animationFrames=void 0;var UQ=ze(),VQ=$2(),R2=tg();function zQ(e){return e?O2(e):HQ}A2.animationFrames=zQ;function O2(e){return new UQ.Observable(function(t){var r=e||VQ.performanceTimestampProvider,n=r.now(),i=0,s=function(){if(!t.closed)i=R2.animationFrameProvider.requestAnimationFrame(function(o){i=0;var a=r.now();t.next({timestamp:e?a:o,elapsed:a-n}),s()})};return s(),function(){if(i)R2.animationFrameProvider.cancelAnimationFrame(i)}})}var HQ=O2()});var rg=h(function(I2){Object.defineProperty(I2,"__esModule",{value:!0});I2.ObjectUnsubscribedError=void 0;var WQ=Bi();I2.ObjectUnsubscribedError=WQ.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var St=h(function(An){var q2=An&&An.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),GQ=An&&An.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(An,"__esModule",{value:!0});An.AnonymousSubject=An.Subject=void 0;var N2=ze(),ig=Dr(),KQ=rg(),YQ=ci(),ng=Zd(),j2=function(e){q2(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new sg(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new KQ.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;ng.errorContext(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){if(!n.currentObservers)n.currentObservers=Array.from(n.observers);try{for(var o=GQ(n.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(r)}}catch(l){i={error:l}}finally{try{if(a&&!a.done&&(s=o.return))s.call(o)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;ng.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;var i=n.observers;while(i.length)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;ng.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;var n=r.observers;while(n.length)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,s=i.hasError,o=i.isStopped,a=i.observers;if(s||o)return ig.EMPTY_SUBSCRIPTION;return this.currentObservers=null,a.push(r),new ig.Subscription(function(){n.currentObservers=null,YQ.arrRemove(a,r)})},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,s=n.thrownError,o=n.isStopped;if(i)r.error(s);else if(o)r.complete()},t.prototype.asObservable=function(){var r=new N2.Observable;return r.source=this,r},t.create=function(r,n){return new sg(r,n)},t}(N2.Observable);An.Subject=j2;var sg=function(e){q2(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:ig.EMPTY_SUBSCRIPTION},t}(j2);An.AnonymousSubject=sg});var og=h(function(ea){var JQ=ea&&ea.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ea,"__esModule",{value:!0});ea.BehaviorSubject=void 0;var XQ=St(),QQ=function(e){JQ(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,s=r._value;if(n)throw i;return this._throwIfClosed(),s},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(XQ.Subject);ea.BehaviorSubject=QQ});var tf=h(function(M2){Object.defineProperty(M2,"__esModule",{value:!0});M2.dateTimestampProvider=void 0;M2.dateTimestampProvider={now:function(){return(M2.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var rf=h(function(ta){var ZQ=ta&&ta.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ta,"__esModule",{value:!0});ta.ReplaySubject=void 0;var eZ=St(),tZ=tf(),rZ=function(e){ZQ(t,e);function t(r,n,i){if(r===void 0)r=1/0;if(n===void 0)n=1/0;if(i===void 0)i=tZ.dateTimestampProvider;var s=e.call(this)||this;return s._bufferSize=r,s._windowTime=n,s._timestampProvider=i,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=n===1/0,s._bufferSize=Math.max(1,r),s._windowTime=Math.max(1,n),s}return t.prototype.next=function(r){var n=this,i=n.isStopped,s=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,c=n._windowTime;if(!i)s.push(r),!o&&s.push(a.now()+c);this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();var n=this._innerSubscribe(r),i=this,s=i._infiniteTimeWindow,o=i._buffer,a=o.slice();for(var c=0;c<a.length&&!r.closed;c+=s?1:2)r.next(a[c]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,s=r._buffer,o=r._infiniteTimeWindow,a=(o?1:2)*n;if(n<1/0&&a<s.length&&s.splice(0,s.length-a),!o){var c=i.now(),l=0;for(var d=1;d<s.length&&s[d]<=c;d+=2)l=d;l&&s.splice(0,l+1)}},t}(eZ.Subject);ta.ReplaySubject=rZ});var nf=h(function(ra){var nZ=ra&&ra.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ra,"__esModule",{value:!0});ra.AsyncSubject=void 0;var iZ=St(),sZ=function(e){nZ(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._value=null,r._hasValue=!1,r._isComplete=!1,r}return t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,s=n._hasValue,o=n._value,a=n.thrownError,c=n.isStopped,l=n._isComplete;if(i)r.error(a);else if(c||l)s&&r.next(o),r.complete()},t.prototype.next=function(r){if(!this.isStopped)this._value=r,this._hasValue=!0},t.prototype.complete=function(){var r=this,n=r._hasValue,i=r._value,s=r._isComplete;if(!s)this._isComplete=!0,n&&e.prototype.next.call(this,i),e.prototype.complete.call(this)},t}(iZ.Subject);ra.AsyncSubject=sZ});var B2=h(function(na){var oZ=na&&na.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(na,"__esModule",{value:!0});na.Action=void 0;var aZ=Dr(),cZ=function(e){oZ(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){if(n===void 0)n=0;return this},t}(aZ.Subscription);na.Action=cZ});var V2=h(function(kn){var L2=kn&&kn.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},U2=kn&&kn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(kn,"__esModule",{value:!0});kn.intervalProvider=void 0;kn.intervalProvider={setInterval:function(e,t){var r=[];for(var n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=kn.intervalProvider.delegate;if(i===null||i===void 0?void 0:i.setInterval)return i.setInterval.apply(i,U2([e,t],L2(r)));return setInterval.apply(void 0,U2([e,t],L2(r)))},clearInterval:function(e){var t=kn.intervalProvider.delegate;return((t===null||t===void 0?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0}});var sa=h(function(ia){var uZ=ia&&ia.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ia,"__esModule",{value:!0});ia.AsyncAction=void 0;var lZ=B2(),z2=V2(),dZ=ci(),fZ=function(e){uZ(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(r,n){var i;if(n===void 0)n=0;if(this.closed)return this;this.state=r;var s=this.id,o=this.scheduler;if(s!=null)this.id=this.recycleAsyncId(o,s,n);return this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,n),this},t.prototype.requestAsyncId=function(r,n,i){if(i===void 0)i=0;return z2.intervalProvider.setInterval(r.flush.bind(r,this),i)},t.prototype.recycleAsyncId=function(r,n,i){if(i===void 0)i=0;if(i!=null&&this.delay===i&&this.pending===!1)return n;if(n!=null)z2.intervalProvider.clearInterval(n);return},t.prototype.execute=function(r,n){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;else if(this.pending===!1&&this.id!=null)this.id=this.recycleAsyncId(this.scheduler,this.id,null)},t.prototype._execute=function(r,n){var i=!1,s;try{this.work(r)}catch(o){i=!0,s=o?o:Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,s=i.actions;if(this.work=this.state=this.scheduler=null,this.pending=!1,dZ.arrRemove(s,this),n!=null)this.id=this.recycleAsyncId(i,n,null);this.delay=null,e.prototype.unsubscribe.call(this)}},t}(lZ.Action);ia.AsyncAction=fZ});var K2=h(function(W2){Object.defineProperty(W2,"__esModule",{value:!0});W2.TestTools=W2.Immediate=void 0;var pZ=1,cg,sf={};function H2(e){if(e in sf)return delete sf[e],!0;return!1}W2.Immediate={setImmediate:function(e){var t=pZ++;if(sf[t]=!0,!cg)cg=Promise.resolve();return cg.then(function(){return H2(t)&&e()}),t},clearImmediate:function(e){H2(e)}};W2.TestTools={pending:function(){return Object.keys(sf).length}}});var J2=h(function(Pn){var hZ=Pn&&Pn.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},gZ=Pn&&Pn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Pn,"__esModule",{value:!0});Pn.immediateProvider=void 0;var Y2=K2(),yZ=Y2.Immediate.setImmediate,xZ=Y2.Immediate.clearImmediate;Pn.immediateProvider={setImmediate:function(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Pn.immediateProvider.delegate;return((r===null||r===void 0?void 0:r.setImmediate)||yZ).apply(void 0,gZ([],hZ(e)))},clearImmediate:function(e){var t=Pn.immediateProvider.delegate;return((t===null||t===void 0?void 0:t.clearImmediate)||xZ)(e)},delegate:void 0}});var Q2=h(function(oa){var bZ=oa&&oa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(oa,"__esModule",{value:!0});oa.AsapAction=void 0;var vZ=sa(),X2=J2(),_Z=function(e){bZ(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){if(i===void 0)i=0;if(i!==null&&i>0)return e.prototype.requestAsyncId.call(this,r,n,i);return r.actions.push(this),r._scheduled||(r._scheduled=X2.immediateProvider.setImmediate(r.flush.bind(r,void 0)))},t.prototype.recycleAsyncId=function(r,n,i){var s;if(i===void 0)i=0;if(i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var o=r.actions;if(n!=null&&((s=o[o.length-1])===null||s===void 0?void 0:s.id)!==n){if(X2.immediateProvider.clearImmediate(n),r._scheduled===n)r._scheduled=void 0}return},t}(vZ.AsyncAction);oa.AsapAction=_Z});var ug=h(function(Z2){Object.defineProperty(Z2,"__esModule",{value:!0});Z2.Scheduler=void 0;var DZ=tf(),wZ=function(){function e(t,r){if(r===void 0)r=e.now;this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,n){if(r===void 0)r=0;return new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=DZ.dateTimestampProvider.now,e}();Z2.Scheduler=wZ});var ca=h(function(aa){var EZ=aa&&aa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(aa,"__esModule",{value:!0});aa.AsyncScheduler=void 0;var tE=ug(),SZ=function(e){EZ(t,e);function t(r,n){if(n===void 0)n=tE.Scheduler.now;var i=e.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){while(r=n.shift())r.unsubscribe();throw i}},t}(tE.Scheduler);aa.AsyncScheduler=SZ});var rE=h(function(ua){var $Z=ua&&ua.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ua,"__esModule",{value:!0});ua.AsapScheduler=void 0;var CZ=ca(),FZ=function(e){$Z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,s;r=r||i.shift();do if(s=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,s){while((r=i[0])&&r.id===n&&i.shift())r.unsubscribe();throw s}},t}(CZ.AsyncScheduler);ua.AsapScheduler=FZ});var oE=h(function(nE){Object.defineProperty(nE,"__esModule",{value:!0});nE.asap=nE.asapScheduler=void 0;var RZ=Q2(),OZ=rE();nE.asapScheduler=new OZ.AsapScheduler(RZ.AsapAction);nE.asap=nE.asapScheduler});var or=h(function(aE){Object.defineProperty(aE,"__esModule",{value:!0});aE.async=aE.asyncScheduler=void 0;var AZ=sa(),kZ=ca();aE.asyncScheduler=new kZ.AsyncScheduler(AZ.AsyncAction);aE.async=aE.asyncScheduler});var lE=h(function(la){var PZ=la&&la.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(la,"__esModule",{value:!0});la.QueueAction=void 0;var IZ=sa(),TZ=function(e){PZ(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.schedule=function(r,n){if(n===void 0)n=0;if(n>0)return e.prototype.schedule.call(this,r,n);return this.delay=n,this.state=r,this.scheduler.flush(this),this},t.prototype.execute=function(r,n){return n>0||this.closed?e.prototype.execute.call(this,r,n):this._execute(r,n)},t.prototype.requestAsyncId=function(r,n,i){if(i===void 0)i=0;if(i!=null&&i>0||i==null&&this.delay>0)return e.prototype.requestAsyncId.call(this,r,n,i);return r.flush(this),0},t}(IZ.AsyncAction);la.QueueAction=TZ});var dE=h(function(da){var NZ=da&&da.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(da,"__esModule",{value:!0});da.QueueScheduler=void 0;var qZ=ca(),jZ=function(e){NZ(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(qZ.AsyncScheduler);da.QueueScheduler=jZ});var hE=h(function(fE){Object.defineProperty(fE,"__esModule",{value:!0});fE.queue=fE.queueScheduler=void 0;var MZ=lE(),BZ=dE();fE.queueScheduler=new BZ.QueueScheduler(MZ.QueueAction);fE.queue=fE.queueScheduler});var yE=h(function(fa){var LZ=fa&&fa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(fa,"__esModule",{value:!0});fa.AnimationFrameAction=void 0;var UZ=sa(),gE=tg(),VZ=function(e){LZ(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){if(i===void 0)i=0;if(i!==null&&i>0)return e.prototype.requestAsyncId.call(this,r,n,i);return r.actions.push(this),r._scheduled||(r._scheduled=gE.animationFrameProvider.requestAnimationFrame(function(){return r.flush(void 0)}))},t.prototype.recycleAsyncId=function(r,n,i){var s;if(i===void 0)i=0;if(i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var o=r.actions;if(n!=null&&n===r._scheduled&&((s=o[o.length-1])===null||s===void 0?void 0:s.id)!==n)gE.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0;return},t}(UZ.AsyncAction);fa.AnimationFrameAction=VZ});var xE=h(function(pa){var zZ=pa&&pa.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(pa,"__esModule",{value:!0});pa.AnimationFrameScheduler=void 0;var HZ=ca(),WZ=function(e){zZ(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n;if(r)n=r.id;else n=this._scheduled,this._scheduled=void 0;var i=this.actions,s;r=r||i.shift();do if(s=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,s){while((r=i[0])&&r.id===n&&i.shift())r.unsubscribe();throw s}},t}(HZ.AsyncScheduler);pa.AnimationFrameScheduler=WZ});var DE=h(function(bE){Object.defineProperty(bE,"__esModule",{value:!0});bE.animationFrame=bE.animationFrameScheduler=void 0;var GZ=yE(),KZ=xE();bE.animationFrameScheduler=new KZ.AnimationFrameScheduler(GZ.AnimationFrameAction);bE.animationFrame=bE.animationFrameScheduler});var SE=h(function(Ui){var wE=Ui&&Ui.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))n[s]=i[s]},e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.VirtualAction=Ui.VirtualTimeScheduler=void 0;var YZ=sa(),JZ=Dr(),XZ=ca(),QZ=function(e){wE(t,e);function t(r,n){if(r===void 0)r=EE;if(n===void 0)n=1/0;var i=e.call(this,r,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return t.prototype.flush=function(){var r=this,n=r.actions,i=r.maxFrames,s,o;while((o=n[0])&&o.delay<=i)if(n.shift(),this.frame=o.delay,s=o.execute(o.state,o.delay))break;if(s){while(o=n.shift())o.unsubscribe();throw s}},t.frameTimeFactor=10,t}(XZ.AsyncScheduler);Ui.VirtualTimeScheduler=QZ;var EE=function(e){wE(t,e);function t(r,n,i){if(i===void 0)i=r.index+=1;var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s.index=i,s.active=!0,s.index=r.index=i,s}return t.prototype.schedule=function(r,n){if(n===void 0)n=0;if(Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}else return JZ.Subscription.EMPTY},t.prototype.requestAsyncId=function(r,n,i){if(i===void 0)i=0;this.delay=r.frame+i;var s=r.actions;return s.push(this),s.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(r,n,i){if(i===void 0)i=0;return},t.prototype._execute=function(r,n){if(this.active===!0)return e.prototype._execute.call(this,r,n)},t.sortActions=function(r,n){if(r.delay===n.delay)if(r.index===n.index)return 0;else if(r.index>n.index)return 1;else return-1;else if(r.delay>n.delay)return 1;else return-1},t}(YZ.AsyncAction);Ui.VirtualAction=EE});var Qr=h(function(CE){Object.defineProperty(CE,"__esModule",{value:!0});CE.empty=CE.EMPTY=void 0;var $E=ze();CE.EMPTY=new $E.Observable(function(e){return e.complete()});function ZZ(e){return e?eee(e):CE.EMPTY}CE.empty=ZZ;function eee(e){return new $E.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var gu=h(function(OE){Object.defineProperty(OE,"__esModule",{value:!0});OE.isScheduler=void 0;var tee=Le();function ree(e){return e&&tee.isFunction(e.schedule)}OE.isScheduler=ree});var ar=h(function(kE){Object.defineProperty(kE,"__esModule",{value:!0});kE.popNumber=kE.popScheduler=kE.popResultSelector=void 0;var nee=Le(),iee=gu();function lg(e){return e[e.length-1]}function see(e){return nee.isFunction(lg(e))?e.pop():void 0}kE.popResultSelector=see;function oee(e){return iee.isScheduler(lg(e))?e.pop():void 0}kE.popScheduler=oee;function aee(e,t){return typeof lg(e)==="number"?e.pop():t}kE.popNumber=aee});var of=h(function(IE){Object.defineProperty(IE,"__esModule",{value:!0});IE.isArrayLike=void 0;IE.isArrayLike=function(e){return e&&typeof e.length==="number"&&typeof e!=="function"}});var dg=h(function(NE){Object.defineProperty(NE,"__esModule",{value:!0});NE.isPromise=void 0;var lee=Le();function dee(e){return lee.isFunction(e===null||e===void 0?void 0:e.then)}NE.isPromise=dee});var fg=h(function(jE){Object.defineProperty(jE,"__esModule",{value:!0});jE.isInteropObservable=void 0;var fee=pu(),pee=Le();function mee(e){return pee.isFunction(e[fee.observable])}jE.isInteropObservable=mee});var pg=h(function(BE){Object.defineProperty(BE,"__esModule",{value:!0});BE.isAsyncIterable=void 0;var hee=Le();function gee(e){return Symbol.asyncIterator&&hee.isFunction(e===null||e===void 0?void 0:e[Symbol.asyncIterator])}BE.isAsyncIterable=gee});var mg=h(function(UE){Object.defineProperty(UE,"__esModule",{value:!0});UE.createInvalidObservableTypeError=void 0;function yee(e){return TypeError("You provided "+(e!==null&&typeof e==="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}UE.createInvalidObservableTypeError=yee});var hg=h(function(HE){Object.defineProperty(HE,"__esModule",{value:!0});HE.iterator=HE.getSymbolIterator=void 0;function zE(){if(typeof Symbol!=="function"||!Symbol.iterator)return"@@iterator";return Symbol.iterator}HE.getSymbolIterator=zE;HE.iterator=zE()});var gg=h(function(GE){Object.defineProperty(GE,"__esModule",{value:!0});GE.isIterable=void 0;var bee=hg(),vee=Le();function _ee(e){return vee.isFunction(e===null||e===void 0?void 0:e[bee.iterator])}GE.isIterable=_ee});var af=h(function(Pr){var Dee=Pr&&Pr.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(d){return c([l,d])}}function c(l){if(n)throw TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;if(i=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if((s=r.trys,!(s=s.length>0&&s[s.length-1]))&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}if(s[2])r.ops.pop();r.trys.pop();continue}l=t.call(e,r)}catch(d){l=[6,d],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},ma=Pr&&Pr.__await||function(e){return this instanceof ma?(this.v=e,this):new ma(e)},wee=Pr&&Pr.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(m){if(n[m])i[m]=function(p){return new Promise(function(g,y){s.push([m,p,g,y])>1||a(m,p)})}}function a(m,p){try{c(n[m](p))}catch(g){f(s[0][3],g)}}function c(m){m.value instanceof ma?Promise.resolve(m.value.v).then(l,d):f(s[0][2],m)}function l(m){a("next",m)}function d(m){a("throw",m)}function f(m,p){if(m(p),s.shift(),s.length)a(s[0][0],s[0][1])}};Object.defineProperty(Pr,"__esModule",{value:!0});Pr.isReadableStreamLike=Pr.readableStreamLikeToAsyncGenerator=void 0;var Eee=Le();function See(e){return wee(this,arguments,function(){var r,n,i,s;return Dee(this,function(o){switch(o.label){case 0:r=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,ma(r.read())];case 3:if(n=o.sent(),i=n.value,s=n.done,!s)return[3,5];return[4,ma(void 0)];case 4:return[2,o.sent()];case 5:return[4,ma(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}Pr.readableStreamLikeToAsyncGenerator=See;function $ee(e){return Eee.isFunction(e===null||e===void 0?void 0:e.getReader)}Pr.isReadableStreamLike=$ee});var ce=h(function(it){var Cee=it&&it.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):i(d.value).then(a,c)}l((n=n.apply(e,t||[])).next())})},Fee=it&&it.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(d){return c([l,d])}}function c(l){if(n)throw TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;if(i=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if((s=r.trys,!(s=s.length>0&&s[s.length-1]))&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}if(s[2])r.ops.pop();r.trys.pop();continue}l=t.call(e,r)}catch(d){l=[6,d],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ree=it&&it.__asyncValues||function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof yg==="function"?yg(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(a,c){o=e[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}},yg=it&&it.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(it,"__esModule",{value:!0});it.fromReadableStreamLike=it.fromAsyncIterable=it.fromIterable=it.fromPromise=it.fromArrayLike=it.fromInteropObservable=it.innerFrom=void 0;var Oee=of(),Aee=dg(),ha=ze(),kee=fg(),Pee=pg(),Iee=mg(),Tee=gg(),YE=af(),Nee=Le(),qee=Wh(),jee=pu();function Mee(e){if(e instanceof ha.Observable)return e;if(e!=null){if(kee.isInteropObservable(e))return JE(e);if(Oee.isArrayLike(e))return XE(e);if(Aee.isPromise(e))return QE(e);if(Pee.isAsyncIterable(e))return xg(e);if(Tee.isIterable(e))return ZE(e);if(YE.isReadableStreamLike(e))return eS(e)}throw Iee.createInvalidObservableTypeError(e)}it.innerFrom=Mee;function JE(e){return new ha.Observable(function(t){var r=e[jee.observable]();if(Nee.isFunction(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")})}it.fromInteropObservable=JE;function XE(e){return new ha.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}it.fromArrayLike=XE;function QE(e){return new ha.Observable(function(t){e.then(function(r){if(!t.closed)t.next(r),t.complete()},function(r){return t.error(r)}).then(null,qee.reportUnhandledError)})}it.fromPromise=QE;function ZE(e){return new ha.Observable(function(t){var r,n;try{for(var i=yg(e),s=i.next();!s.done;s=i.next()){var o=s.value;if(t.next(o),t.closed)return}}catch(a){r={error:a}}finally{try{if(s&&!s.done&&(n=i.return))n.call(i)}finally{if(r)throw r.error}}t.complete()})}it.fromIterable=ZE;function xg(e){return new ha.Observable(function(t){Bee(e,t).catch(function(r){return t.error(r)})})}it.fromAsyncIterable=xg;function eS(e){return xg(YE.readableStreamLikeToAsyncGenerator(e))}it.fromReadableStreamLike=eS;function Bee(e,t){var r,n,i,s;return Cee(this,void 0,void 0,function(){var o,a;return Fee(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=Ree(e),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),i={error:a},[3,11];case 6:if(c.trys.push([6,,9,10]),!(n&&!n.done&&(s=r.return)))return[3,8];return[4,s.call(r)];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}});var ui=h(function(tS){Object.defineProperty(tS,"__esModule",{value:!0});tS.executeSchedule=void 0;function Lee(e,t,r,n,i){if(n===void 0)n=0;if(i===void 0)i=!1;var s=t.schedule(function(){if(r(),i)e.add(this.schedule(null,n));else this.unsubscribe()},n);if(e.add(s),!i)return s}tS.executeSchedule=Lee});var yu=h(function(nS){Object.defineProperty(nS,"__esModule",{value:!0});nS.observeOn=void 0;var bg=ui(),Uee=U(),Vee=K();function zee(e,t){if(t===void 0)t=0;return Uee.operate(function(r,n){r.subscribe(Vee.createOperatorSubscriber(n,function(i){return bg.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return bg.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return bg.executeSchedule(n,e,function(){return n.error(i)},t)}))})}nS.observeOn=zee});var xu=h(function(sS){Object.defineProperty(sS,"__esModule",{value:!0});sS.subscribeOn=void 0;var Hee=U();function Wee(e,t){if(t===void 0)t=0;return Hee.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}sS.subscribeOn=Wee});var uS=h(function(aS){Object.defineProperty(aS,"__esModule",{value:!0});aS.scheduleObservable=void 0;var Gee=ce(),Kee=yu(),Yee=xu();function Jee(e,t){return Gee.innerFrom(e).pipe(Yee.subscribeOn(t),Kee.observeOn(t))}aS.scheduleObservable=Jee});var fS=h(function(lS){Object.defineProperty(lS,"__esModule",{value:!0});lS.schedulePromise=void 0;var Xee=ce(),Qee=yu(),Zee=xu();function ete(e,t){return Xee.innerFrom(e).pipe(Zee.subscribeOn(t),Qee.observeOn(t))}lS.schedulePromise=ete});var hS=h(function(pS){Object.defineProperty(pS,"__esModule",{value:!0});pS.scheduleArray=void 0;var tte=ze();function rte(e,t){return new tte.Observable(function(r){var n=0;return t.schedule(function(){if(n===e.length)r.complete();else if(r.next(e[n++]),!r.closed)this.schedule()})})}pS.scheduleArray=rte});var vg=h(function(yS){Object.defineProperty(yS,"__esModule",{value:!0});yS.scheduleIterable=void 0;var nte=ze(),ite=hg(),ste=Le(),gS=ui();function ote(e,t){return new nte.Observable(function(r){var n;return gS.executeSchedule(r,t,function(){n=e[ite.iterator](),gS.executeSchedule(r,t,function(){var i,s,o;try{i=n.next(),s=i.value,o=i.done}catch(a){r.error(a);return}if(o)r.complete();else r.next(s)},0,!0)}),function(){return ste.isFunction(n===null||n===void 0?void 0:n.return)&&n.return()}})}yS.scheduleIterable=ote});var _g=h(function(vS){Object.defineProperty(vS,"__esModule",{value:!0});vS.scheduleAsyncIterable=void 0;var ate=ze(),bS=ui();function cte(e,t){if(!e)throw Error("Iterable cannot be null");return new ate.Observable(function(r){bS.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();bS.executeSchedule(r,t,function(){n.next().then(function(i){if(i.done)r.complete();else r.next(i.value)})},0,!0)})})}vS.scheduleAsyncIterable=cte});var ES=h(function(DS){Object.defineProperty(DS,"__esModule",{value:!0});DS.scheduleReadableStreamLike=void 0;var ute=_g(),lte=af();function dte(e,t){return ute.scheduleAsyncIterable(lte.readableStreamLikeToAsyncGenerator(e),t)}DS.scheduleReadableStreamLike=dte});var Dg=h(function(SS){Object.defineProperty(SS,"__esModule",{value:!0});SS.scheduled=void 0;var fte=uS(),pte=fS(),mte=hS(),hte=vg(),gte=_g(),yte=fg(),xte=dg(),bte=of(),vte=gg(),_te=pg(),Dte=mg(),wte=af(),Ete=ES();function Ste(e,t){if(e!=null){if(yte.isInteropObservable(e))return fte.scheduleObservable(e,t);if(bte.isArrayLike(e))return mte.scheduleArray(e,t);if(xte.isPromise(e))return pte.schedulePromise(e,t);if(_te.isAsyncIterable(e))return gte.scheduleAsyncIterable(e,t);if(vte.isIterable(e))return hte.scheduleIterable(e,t);if(wte.isReadableStreamLike(e))return Ete.scheduleReadableStreamLike(e,t)}throw Dte.createInvalidObservableTypeError(e)}SS.scheduled=Ste});var li=h(function(CS){Object.defineProperty(CS,"__esModule",{value:!0});CS.from=void 0;var $te=Dg(),Cte=ce();function Fte(e,t){return t?$te.scheduled(e,t):Cte.innerFrom(e)}CS.from=Fte});var cf=h(function(RS){Object.defineProperty(RS,"__esModule",{value:!0});RS.of=void 0;var Rte=ar(),Ote=li();function Ate(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Rte.popScheduler(e);return Ote.from(e,r)}RS.of=Ate});var wg=h(function(AS){Object.defineProperty(AS,"__esModule",{value:!0});AS.throwError=void 0;var kte=ze(),Pte=Le();function Ite(e,t){var r=Pte.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new kte.Observable(t?function(i){return t.schedule(n,0,i)}:n)}AS.throwError=Ite});var uf=h(function(TS){Object.defineProperty(TS,"__esModule",{value:!0});TS.observeNotification=TS.Notification=TS.NotificationKind=void 0;var Tte=Qr(),Nte=cf(),qte=wg(),jte=Le(),Mte;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(Mte=TS.NotificationKind||(TS.NotificationKind={}));var Bte=function(){function e(t,r,n){this.kind=t,this.value=r,this.error=n,this.hasValue=t==="N"}return e.prototype.observe=function(t){return IS(this,t)},e.prototype.do=function(t,r,n){var i=this,s=i.kind,o=i.value,a=i.error;return s==="N"?t===null||t===void 0?void 0:t(o):s==="E"?r===null||r===void 0?void 0:r(a):n===null||n===void 0?void 0:n()},e.prototype.accept=function(t,r,n){var i;return jte.isFunction((i=t)===null||i===void 0?void 0:i.next)?this.observe(t):this.do(t,r,n)},e.prototype.toObservable=function(){var t=this,r=t.kind,n=t.value,i=t.error,s=r==="N"?Nte.of(n):r==="E"?qte.throwError(function(){return i}):r==="C"?Tte.EMPTY:0;if(!s)throw TypeError("Unexpected notification kind "+r);return s},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();TS.Notification=Bte;function IS(e,t){var r,n,i,s=e,o=s.kind,a=s.value,c=s.error;if(typeof o!=="string")throw TypeError('Invalid notification, missing "kind"');o==="N"?(r=t.next)===null||r===void 0||r.call(t,a):o==="E"?(n=t.error)===null||n===void 0||n.call(t,c):(i=t.complete)===null||i===void 0||i.call(t)}TS.observeNotification=IS});var BS=h(function(jS){Object.defineProperty(jS,"__esModule",{value:!0});jS.isObservable=void 0;var Ute=ze(),qS=Le();function Vte(e){return!!e&&(e instanceof Ute.Observable||qS.isFunction(e.lift)&&qS.isFunction(e.subscribe))}jS.isObservable=Vte});var Vi=h(function(LS){Object.defineProperty(LS,"__esModule",{value:!0});LS.EmptyError=void 0;var zte=Bi();LS.EmptyError=zte.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var HS=h(function(VS){Object.defineProperty(VS,"__esModule",{value:!0});VS.lastValueFrom=void 0;var Hte=Vi();function Wte(e,t){var r=typeof t==="object";return new Promise(function(n,i){var s=!1,o;e.subscribe({next:function(a){o=a,s=!0},error:i,complete:function(){if(s)n(o);else if(r)n(t.defaultValue);else i(new Hte.EmptyError)}})})}VS.lastValueFrom=Wte});var KS=h(function(WS){Object.defineProperty(WS,"__esModule",{value:!0});WS.firstValueFrom=void 0;var Gte=Vi(),Kte=Qo();function Yte(e,t){var r=typeof t==="object";return new Promise(function(n,i){var s=new Kte.SafeSubscriber({next:function(o){n(o),s.unsubscribe()},error:i,complete:function(){if(r)n(t.defaultValue);else i(new Gte.EmptyError)}});e.subscribe(s)})}WS.firstValueFrom=Yte});var Eg=h(function(YS){Object.defineProperty(YS,"__esModule",{value:!0});YS.ArgumentOutOfRangeError=void 0;var Jte=Bi();YS.ArgumentOutOfRangeError=Jte.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var Sg=h(function(XS){Object.defineProperty(XS,"__esModule",{value:!0});XS.NotFoundError=void 0;var Xte=Bi();XS.NotFoundError=Xte.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var $g=h(function(ZS){Object.defineProperty(ZS,"__esModule",{value:!0});ZS.SequenceError=void 0;var Qte=Bi();ZS.SequenceError=Qte.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var lf=h(function(t$){Object.defineProperty(t$,"__esModule",{value:!0});t$.isValidDate=void 0;function Zte(e){return e instanceof Date&&!isNaN(e)}t$.isValidDate=Zte});var df=h(function(n$){Object.defineProperty(n$,"__esModule",{value:!0});n$.timeout=n$.TimeoutError=void 0;var ere=or(),tre=lf(),rre=U(),nre=ce(),ire=Bi(),sre=K(),ore=ui();n$.TimeoutError=ire.createErrorClass(function(e){return function(r){if(r===void 0)r=null;e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function are(e,t){var r=tre.isValidDate(e)?{first:e}:typeof e==="number"?{each:e}:e,n=r.first,i=r.each,s=r.with,o=s===void 0?cre:s,a=r.scheduler,c=a===void 0?t!==null&&t!==void 0?t:ere.asyncScheduler:a,l=r.meta,d=l===void 0?null:l;if(n==null&&i==null)throw TypeError("No timeout provided.");return rre.operate(function(f,m){var p,g,y=null,x=0,v=function(_){g=ore.executeSchedule(m,c,function(){try{p.unsubscribe(),nre.innerFrom(o({meta:d,lastValue:y,seen:x})).subscribe(m)}catch(S){m.error(S)}},_)};p=f.subscribe(sre.createOperatorSubscriber(m,function(_){g===null||g===void 0||g.unsubscribe(),x++,m.next(y=_),i>0&&v(i)},void 0,void 0,function(){if(!(g===null||g===void 0?void 0:g.closed))g===null||g===void 0||g.unsubscribe();y=null})),!x&&v(n!=null?typeof n==="number"?n:+n-c.now():i)})}n$.timeout=are;function cre(e){throw new n$.TimeoutError(e)}});var zi=h(function(o$){Object.defineProperty(o$,"__esModule",{value:!0});o$.map=void 0;var ure=U(),lre=K();function dre(e,t){return ure.operate(function(r,n){var i=0;r.subscribe(lre.createOperatorSubscriber(n,function(s){n.next(e.call(t,s,i++))}))})}o$.map=dre});var Wi=h(function(Hi){var fre=Hi&&Hi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},pre=Hi&&Hi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.mapOneOrManyArgs=void 0;var mre=zi(),hre=Array.isArray;function gre(e,t){return hre(t)?e.apply(void 0,pre([],fre(t))):e(t)}function yre(e){return mre.map(function(t){return gre(e,t)})}Hi.mapOneOrManyArgs=yre});var Fg=h(function(Gi){var xre=Gi&&Gi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},c$=Gi&&Gi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Gi,"__esModule",{value:!0});Gi.bindCallbackInternals=void 0;var bre=gu(),vre=ze(),_re=xu(),Dre=Wi(),wre=yu(),Ere=nf();function Cg(e,t,r,n){if(r)if(bre.isScheduler(r))n=r;else return function(){var i=[];for(var s=0;s<arguments.length;s++)i[s]=arguments[s];return Cg(e,t,n).apply(this,i).pipe(Dre.mapOneOrManyArgs(r))};if(n)return function(){var i=[];for(var s=0;s<arguments.length;s++)i[s]=arguments[s];return Cg(e,t).apply(this,i).pipe(_re.subscribeOn(n),wre.observeOn(n))};return function(){var i=this,s=[];for(var o=0;o<arguments.length;o++)s[o]=arguments[o];var a=new Ere.AsyncSubject,c=!0;return new vre.Observable(function(l){var d=a.subscribe(l);if(c){c=!1;var f=!1,m=!1;if(t.apply(i,c$(c$([],xre(s)),[function(){var p=[];for(var g=0;g<arguments.length;g++)p[g]=arguments[g];if(e){var y=p.shift();if(y!=null){a.error(y);return}}if(a.next(1<p.length?p:p[0]),m=!0,f)a.complete()}])),m)a.complete();f=!0}return d})}}Gi.bindCallbackInternals=Cg});var d$=h(function(u$){Object.defineProperty(u$,"__esModule",{value:!0});u$.bindCallback=void 0;var Sre=Fg();function $re(e,t,r){return Sre.bindCallbackInternals(!1,e,t,r)}u$.bindCallback=$re});var m$=h(function(f$){Object.defineProperty(f$,"__esModule",{value:!0});f$.bindNodeCallback=void 0;var Cre=Fg();function Fre(e,t,r){return Cre.bindCallbackInternals(!0,e,t,r)}f$.bindNodeCallback=Fre});var Rg=h(function(h$){Object.defineProperty(h$,"__esModule",{value:!0});h$.argsArgArrayOrObject=void 0;var Rre=Array.isArray,Ore=Object.getPrototypeOf,Are=Object.prototype,kre=Object.keys;function Pre(e){if(e.length===1){var t=e[0];if(Rre(t))return{args:t,keys:null};if(Ire(t)){var r=kre(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}h$.argsArgArrayOrObject=Pre;function Ire(e){return e&&typeof e==="object"&&Ore(e)===Are}});var Og=h(function(y$){Object.defineProperty(y$,"__esModule",{value:!0});y$.createObject=void 0;function Tre(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}y$.createObject=Tre});var ff=h(function(E$){Object.defineProperty(E$,"__esModule",{value:!0});E$.combineLatestInit=E$.combineLatest=void 0;var Nre=ze(),qre=Rg(),_$=li(),D$=Et(),jre=Wi(),b$=ar(),Mre=Og(),Bre=K(),Lre=ui();function Ure(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=b$.popScheduler(e),n=b$.popResultSelector(e),i=qre.argsArgArrayOrObject(e),s=i.args,o=i.keys;if(s.length===0)return _$.from([],r);var a=new Nre.Observable(w$(s,r,o?function(c){return Mre.createObject(o,c)}:D$.identity));return n?a.pipe(jre.mapOneOrManyArgs(n)):a}E$.combineLatest=Ure;function w$(e,t,r){if(r===void 0)r=D$.identity;return function(n){v$(t,function(){var i=e.length,s=Array(i),o=i,a=i,c=function(d){v$(t,function(){var f=_$.from(e[d],t),m=!1;f.subscribe(Bre.createOperatorSubscriber(n,function(p){if(s[d]=p,!m)m=!0,a--;if(!a)n.next(r(s.slice()))},function(){if(!--o)n.complete()}))},n)};for(var l=0;l<i;l++)c(l)},n)}}E$.combineLatestInit=w$;function v$(e,t,r){if(e)Lre.executeSchedule(r,e,t);else t()}});var pf=h(function(C$){Object.defineProperty(C$,"__esModule",{value:!0});C$.mergeInternals=void 0;var zre=ce(),Hre=ui(),$$=K();function Wre(e,t,r,n,i,s,o,a){var c=[],l=0,d=0,f=!1,m=function(){if(f&&!c.length&&!l)t.complete()},p=function(y){return l<n?g(y):c.push(y)},g=function(y){s&&t.next(y),l++;var x=!1;zre.innerFrom(r(y,d++)).subscribe($$.createOperatorSubscriber(t,function(v){if(i===null||i===void 0||i(v),s)p(v);else t.next(v)},function(){x=!0},void 0,function(){if(x)try{l--;var v=function(){var _=c.shift();if(o)Hre.executeSchedule(t,o,function(){return g(_)});else g(_)};while(c.length&&l<n)v();m()}catch(_){t.error(_)}}))};return e.subscribe($$.createOperatorSubscriber(t,p,function(){f=!0,m()})),function(){a===null||a===void 0||a()}}C$.mergeInternals=Wre});var di=h(function(O$){Object.defineProperty(O$,"__esModule",{value:!0});O$.mergeMap=void 0;var Gre=zi(),Kre=ce(),Yre=U(),Jre=pf(),Xre=Le();function R$(e,t,r){if(r===void 0)r=1/0;if(Xre.isFunction(t))return R$(function(n,i){return Gre.map(function(s,o){return t(n,s,i,o)})(Kre.innerFrom(e(n,i)))},r);else if(typeof t==="number")r=t;return Yre.operate(function(n,i){return Jre.mergeInternals(n,i,e,r)})}O$.mergeMap=R$});var bu=h(function(k$){Object.defineProperty(k$,"__esModule",{value:!0});k$.mergeAll=void 0;var Qre=di(),Zre=Et();function ene(e){if(e===void 0)e=1/0;return Qre.mergeMap(Zre.identity,e)}k$.mergeAll=ene});var mf=h(function(I$){Object.defineProperty(I$,"__esModule",{value:!0});I$.concatAll=void 0;var tne=bu();function rne(){return tne.mergeAll(1)}I$.concatAll=rne});var vu=h(function(N$){Object.defineProperty(N$,"__esModule",{value:!0});N$.concat=void 0;var nne=mf(),ine=ar(),sne=li();function one(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return nne.concatAll()(sne.from(e,ine.popScheduler(e)))}N$.concat=one});var _u=h(function(j$){Object.defineProperty(j$,"__esModule",{value:!0});j$.defer=void 0;var ane=ze(),cne=ce();function une(e){return new ane.Observable(function(t){cne.innerFrom(e()).subscribe(t)})}j$.defer=une});var U$=h(function(B$){Object.defineProperty(B$,"__esModule",{value:!0});B$.connectable=void 0;var lne=St(),dne=ze(),fne=_u(),pne={connector:function(){return new lne.Subject},resetOnDisconnect:!0};function mne(e,t){if(t===void 0)t=pne;var r=null,n=t.connector,i=t.resetOnDisconnect,s=i===void 0?!0:i,o=n(),a=new dne.Observable(function(c){return o.subscribe(c)});return a.connect=function(){if(!r||r.closed){if(r=fne.defer(function(){return e}).subscribe(o),s)r.add(function(){return o=n()})}return r},a}B$.connectable=mne});var H$=h(function(V$){Object.defineProperty(V$,"__esModule",{value:!0});V$.forkJoin=void 0;var hne=ze(),gne=Rg(),yne=ce(),xne=ar(),bne=K(),vne=Wi(),_ne=Og();function Dne(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xne.popResultSelector(e),n=gne.argsArgArrayOrObject(e),i=n.args,s=n.keys,o=new hne.Observable(function(a){var c=i.length;if(!c){a.complete();return}var l=Array(c),d=c,f=c,m=function(g){var y=!1;yne.innerFrom(i[g]).subscribe(bne.createOperatorSubscriber(a,function(x){if(!y)y=!0,f--;l[g]=x},function(){return d--},void 0,function(){if(!d||!y){if(!f)a.next(s?_ne.createObject(s,l):l);a.complete()}}))};for(var p=0;p<c;p++)m(p)});return r?o.pipe(vne.mapOneOrManyArgs(r)):o}V$.forkJoin=Dne});var G$=h(function(ga){var wne=ga&&ga.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s};Object.defineProperty(ga,"__esModule",{value:!0});ga.fromEvent=void 0;var Ene=ce(),Sne=ze(),$ne=di(),Cne=of(),Ks=Le(),Fne=Wi(),Rne=["addListener","removeListener"],One=["addEventListener","removeEventListener"],Ane=["on","off"];function Ag(e,t,r,n){if(Ks.isFunction(r))n=r,r=void 0;if(n)return Ag(e,t,r).pipe(Fne.mapOneOrManyArgs(n));var i=wne(Ine(e)?One.map(function(a){return function(c){return e[a](t,c,r)}}):kne(e)?Rne.map(W$(e,t)):Pne(e)?Ane.map(W$(e,t)):[],2),s=i[0],o=i[1];if(!s){if(Cne.isArrayLike(e))return $ne.mergeMap(function(a){return Ag(a,t,r)})(Ene.innerFrom(e))}if(!s)throw TypeError("Invalid event target");return new Sne.Observable(function(a){var c=function(){var l=[];for(var d=0;d<arguments.length;d++)l[d]=arguments[d];return a.next(1<l.length?l:l[0])};return s(c),function(){return o(c)}})}ga.fromEvent=Ag;function W$(e,t){return function(r){return function(n){return e[r](t,n)}}}function kne(e){return Ks.isFunction(e.addListener)&&Ks.isFunction(e.removeListener)}function Pne(e){return Ks.isFunction(e.on)&&Ks.isFunction(e.off)}function Ine(e){return Ks.isFunction(e.addEventListener)&&Ks.isFunction(e.removeEventListener)}});var X$=h(function(Y$){Object.defineProperty(Y$,"__esModule",{value:!0});Y$.fromEventPattern=void 0;var Tne=ze(),Nne=Le(),qne=Wi();function K$(e,t,r){if(r)return K$(e,t).pipe(qne.mapOneOrManyArgs(r));return new Tne.Observable(function(n){var i=function(){var o=[];for(var a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},s=e(i);return Nne.isFunction(t)?function(){return t(i,s)}:void 0})}Y$.fromEventPattern=K$});var Z$=h(function(ya){var jne=ya&&ya.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(d){return c([l,d])}}function c(l){if(n)throw TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;if(i=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if((s=r.trys,!(s=s.length>0&&s[s.length-1]))&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}if(s[2])r.ops.pop();r.trys.pop();continue}l=t.call(e,r)}catch(d){l=[6,d],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(ya,"__esModule",{value:!0});ya.generate=void 0;var Q$=Et(),Mne=gu(),Bne=_u(),Lne=vg();function Une(e,t,r,n,i){var s,o,a,c;if(arguments.length===1)s=e,c=s.initialState,t=s.condition,r=s.iterate,o=s.resultSelector,a=o===void 0?Q$.identity:o,i=s.scheduler;else if(c=e,!n||Mne.isScheduler(n))a=Q$.identity,i=n;else a=n;function l(){var d;return jne(this,function(f){switch(f.label){case 0:d=c,f.label=1;case 1:if(!(!t||t(d)))return[3,4];return[4,a(d)];case 2:f.sent(),f.label=3;case 3:return d=r(d),[3,1];case 4:return[2]}})}return Bne.defer(i?function(){return Lne.scheduleIterable(l(),i)}:l)}ya.generate=Une});var rC=h(function(eC){Object.defineProperty(eC,"__esModule",{value:!0});eC.iif=void 0;var Vne=_u();function zne(e,t,r){return Vne.defer(function(){return e()?t:r})}eC.iif=zne});var Ki=h(function(nC){Object.defineProperty(nC,"__esModule",{value:!0});nC.timer=void 0;var Hne=ze(),Wne=or(),Gne=gu(),Kne=lf();function Yne(e,t,r){if(e===void 0)e=0;if(r===void 0)r=Wne.async;var n=-1;if(t!=null)if(Gne.isScheduler(t))r=t;else n=t;return new Hne.Observable(function(i){var s=Kne.isValidDate(e)?+e-r.now():e;if(s<0)s=0;var o=0;return r.schedule(function(){if(!i.closed)if(i.next(o++),0<=n)this.schedule(void 0,n);else i.complete()},s)})}nC.timer=Yne});var kg=h(function(sC){Object.defineProperty(sC,"__esModule",{value:!0});sC.interval=void 0;var Jne=or(),Xne=Ki();function Qne(e,t){if(e===void 0)e=0;if(t===void 0)t=Jne.asyncScheduler;if(e<0)e=0;return Xne.timer(e,e,t)}sC.interval=Qne});var lC=h(function(cC){Object.defineProperty(cC,"__esModule",{value:!0});cC.merge=void 0;var Zne=bu(),eie=ce(),tie=Qr(),aC=ar(),rie=li();function nie(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=aC.popScheduler(e),n=aC.popNumber(e,1/0),i=e;return!i.length?tie.EMPTY:i.length===1?eie.innerFrom(i[0]):Zne.mergeAll(n)(rie.from(i,r))}cC.merge=nie});var Pg=h(function(dC){Object.defineProperty(dC,"__esModule",{value:!0});dC.never=dC.NEVER=void 0;var iie=ze(),sie=wt();dC.NEVER=new iie.Observable(sie.noop);function oie(){return dC.NEVER}dC.never=oie});var xa=h(function(mC){Object.defineProperty(mC,"__esModule",{value:!0});mC.argsOrArgArray=void 0;var aie=Array.isArray;function cie(e){return e.length===1&&aie(e[0])?e[0]:e}mC.argsOrArgArray=cie});var Ig=h(function(yC){Object.defineProperty(yC,"__esModule",{value:!0});yC.onErrorResumeNext=void 0;var uie=ze(),lie=xa(),die=K(),gC=wt(),fie=ce();function pie(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=lie.argsOrArgArray(e);return new uie.Observable(function(n){var i=0,s=function(){if(i<r.length){var o=void 0;try{o=fie.innerFrom(r[i++])}catch(c){s();return}var a=new die.OperatorSubscriber(n,void 0,gC.noop,gC.noop);o.subscribe(a),a.add(s)}else n.complete()};s()})}yC.onErrorResumeNext=pie});var _C=h(function(bC){Object.defineProperty(bC,"__esModule",{value:!0});bC.pairs=void 0;var mie=li();function hie(e,t){return mie.from(Object.entries(e),t)}bC.pairs=hie});var EC=h(function(DC){Object.defineProperty(DC,"__esModule",{value:!0});DC.not=void 0;function gie(e,t){return function(r,n){return!e.call(t,r,n)}}DC.not=gie});var Ys=h(function(SC){Object.defineProperty(SC,"__esModule",{value:!0});SC.filter=void 0;var yie=U(),xie=K();function bie(e,t){return yie.operate(function(r,n){var i=0;r.subscribe(xie.createOperatorSubscriber(n,function(s){return e.call(t,s,i++)&&n.next(s)}))})}SC.filter=bie});var AC=h(function(RC){Object.defineProperty(RC,"__esModule",{value:!0});RC.partition=void 0;var vie=EC(),CC=Ys(),FC=ce();function _ie(e,t,r){return[CC.filter(t,r)(FC.innerFrom(e)),CC.filter(vie.not(t,r))(FC.innerFrom(e))]}RC.partition=_ie});var Tg=h(function(IC){Object.defineProperty(IC,"__esModule",{value:!0});IC.raceInit=IC.race=void 0;var Die=ze(),kC=ce(),wie=xa(),Eie=K();function Sie(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return e=wie.argsOrArgArray(e),e.length===1?kC.innerFrom(e[0]):new Die.Observable(PC(e))}IC.race=Sie;function PC(e){return function(t){var r=[],n=function(s){r.push(kC.innerFrom(e[s]).subscribe(Eie.createOperatorSubscriber(t,function(o){if(r){for(var a=0;a<r.length;a++)a!==s&&r[a].unsubscribe();r=null}t.next(o)})))};for(var i=0;r&&!t.closed&&i<e.length;i++)n(i)}}IC.raceInit=PC});var jC=h(function(NC){Object.defineProperty(NC,"__esModule",{value:!0});NC.range=void 0;var Cie=ze(),Fie=Qr();function Rie(e,t,r){if(t==null)t=e,e=0;if(t<=0)return Fie.EMPTY;var n=t+e;return new Cie.Observable(r?function(i){var s=e;return r.schedule(function(){if(s<n)i.next(s++),this.schedule();else i.complete()})}:function(i){var s=e;while(s<n&&!i.closed)i.next(s++);i.complete()})}NC.range=Rie});var LC=h(function(MC){Object.defineProperty(MC,"__esModule",{value:!0});MC.using=void 0;var Oie=ze(),Aie=ce(),kie=Qr();function Pie(e,t){return new Oie.Observable(function(r){var n=e(),i=t(n),s=i?Aie.innerFrom(i):kie.EMPTY;return s.subscribe(r),function(){if(n)n.unsubscribe()}})}MC.using=Pie});var hf=h(function(Yi){var Iie=Yi&&Yi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},Tie=Yi&&Yi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.zip=void 0;var Nie=ze(),qie=ce(),jie=xa(),Mie=Qr(),Bie=K(),Lie=ar();function Uie(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Lie.popResultSelector(e),n=jie.argsOrArgArray(e);return n.length?new Nie.Observable(function(i){var s=n.map(function(){return[]}),o=n.map(function(){return!1});i.add(function(){s=o=null});var a=function(l){qie.innerFrom(n[l]).subscribe(Bie.createOperatorSubscriber(i,function(d){if(s[l].push(d),s.every(function(m){return m.length})){var f=s.map(function(m){return m.shift()});if(i.next(r?r.apply(void 0,Tie([],Iie(f))):f),s.some(function(m,p){return!m.length&&o[p]}))i.complete()}},function(){o[l]=!0,!s[l].length&&i.complete()}))};for(var c=0;!i.closed&&c<n.length;c++)a(c);return function(){s=o=null}}):Mie.EMPTY}Yi.zip=Uie});var VC=h(function(UC){Object.defineProperty(UC,"__esModule",{value:!0})});var Ng=h(function(HC){Object.defineProperty(HC,"__esModule",{value:!0});HC.audit=void 0;var Vie=U(),zie=ce(),zC=K();function Hie(e){return Vie.operate(function(t,r){var n=!1,i=null,s=null,o=!1,a=function(){if(s===null||s===void 0||s.unsubscribe(),s=null,n){n=!1;var l=i;i=null,r.next(l)}o&&r.complete()},c=function(){s=null,o&&r.complete()};t.subscribe(zC.createOperatorSubscriber(r,function(l){if(n=!0,i=l,!s)zie.innerFrom(e(l)).subscribe(s=zC.createOperatorSubscriber(r,a,c))},function(){o=!0,(!n||!s||s.closed)&&r.complete()}))})}HC.audit=Hie});var YC=h(function(GC){Object.defineProperty(GC,"__esModule",{value:!0});GC.auditTime=void 0;var Wie=or(),Gie=Ng(),Kie=Ki();function Yie(e,t){if(t===void 0)t=Wie.asyncScheduler;return Gie.audit(function(){return Kie.timer(e,t)})}GC.auditTime=Yie});var ZC=h(function(XC){Object.defineProperty(XC,"__esModule",{value:!0});XC.buffer=void 0;var Jie=U(),Xie=wt(),JC=K(),Qie=ce();function Zie(e){return Jie.operate(function(t,r){var n=[];return t.subscribe(JC.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),Qie.innerFrom(e).subscribe(JC.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},Xie.noop)),function(){n=null}})}XC.buffer=Zie});var e6=h(function(ba){var qg=ba&&ba.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ba,"__esModule",{value:!0});ba.bufferCount=void 0;var ese=U(),tse=K(),rse=ci();function nse(e,t){if(t===void 0)t=null;return t=t!==null&&t!==void 0?t:e,ese.operate(function(r,n){var i=[],s=0;r.subscribe(tse.createOperatorSubscriber(n,function(o){var a,c,l,d,f=null;if(s++%t===0)i.push([]);try{for(var m=qg(i),p=m.next();!p.done;p=m.next()){var g=p.value;if(g.push(o),e<=g.length)f=f!==null&&f!==void 0?f:[],f.push(g)}}catch(v){a={error:v}}finally{try{if(p&&!p.done&&(c=m.return))c.call(m)}finally{if(a)throw a.error}}if(f)try{for(var y=qg(f),x=y.next();!x.done;x=y.next()){var g=x.value;rse.arrRemove(i,g),n.next(g)}}catch(v){l={error:v}}finally{try{if(x&&!x.done&&(d=y.return))d.call(y)}finally{if(l)throw l.error}}},function(){var o,a;try{for(var c=qg(i),l=c.next();!l.done;l=c.next()){var d=l.value;n.next(d)}}catch(f){o={error:f}}finally{try{if(l&&!l.done&&(a=c.return))a.call(c)}finally{if(o)throw o.error}}n.complete()},void 0,function(){i=null}))})}ba.bufferCount=nse});var r6=h(function(va){var ise=va&&va.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(va,"__esModule",{value:!0});va.bufferTime=void 0;var sse=Dr(),ose=U(),ase=K(),cse=ci(),use=or(),lse=ar(),t6=ui();function dse(e){var t,r,n=[];for(var i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(t=lse.popScheduler(n))!==null&&t!==void 0?t:use.asyncScheduler,o=(r=n[0])!==null&&r!==void 0?r:null,a=n[1]||1/0;return ose.operate(function(c,l){var d=[],f=!1,m=function(y){var{buffer:x,subs:v}=y;v.unsubscribe(),cse.arrRemove(d,y),l.next(x),f&&p()},p=function(){if(d){var y=new sse.Subscription;l.add(y);var x=[],v={buffer:x,subs:y};d.push(v),t6.executeSchedule(y,s,function(){return m(v)},e)}};if(o!==null&&o>=0)t6.executeSchedule(l,s,p,o,!0);else f=!0;p();var g=ase.createOperatorSubscriber(l,function(y){var x,v,_=d.slice();try{for(var S=ise(_),C=S.next();!C.done;C=S.next()){var D=C.value,O=D.buffer;O.push(y),a<=O.length&&m(D)}}catch(F){x={error:F}}finally{try{if(C&&!C.done&&(v=S.return))v.call(S)}finally{if(x)throw x.error}}},function(){while(d===null||d===void 0?void 0:d.length)l.next(d.shift().buffer);g===null||g===void 0||g.unsubscribe(),l.complete(),l.unsubscribe()},void 0,function(){return d=null});c.subscribe(g)})}va.bufferTime=dse});var s6=h(function(_a){var fse=_a&&_a.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(_a,"__esModule",{value:!0});_a.bufferToggle=void 0;var pse=Dr(),mse=U(),n6=ce(),jg=K(),i6=wt(),hse=ci();function gse(e,t){return mse.operate(function(r,n){var i=[];n6.innerFrom(e).subscribe(jg.createOperatorSubscriber(n,function(s){var o=[];i.push(o);var a=new pse.Subscription,c=function(){hse.arrRemove(i,o),n.next(o),a.unsubscribe()};a.add(n6.innerFrom(t(s)).subscribe(jg.createOperatorSubscriber(n,c,i6.noop)))},i6.noop)),r.subscribe(jg.createOperatorSubscriber(n,function(s){var o,a;try{for(var c=fse(i),l=c.next();!l.done;l=c.next()){var d=l.value;d.push(s)}}catch(f){o={error:f}}finally{try{if(l&&!l.done&&(a=c.return))a.call(c)}finally{if(o)throw o.error}}},function(){while(i.length>0)n.next(i.shift());n.complete()}))})}_a.bufferToggle=gse});var u6=h(function(a6){Object.defineProperty(a6,"__esModule",{value:!0});a6.bufferWhen=void 0;var yse=U(),xse=wt(),o6=K(),bse=ce();function vse(e){return yse.operate(function(t,r){var n=null,i=null,s=function(){i===null||i===void 0||i.unsubscribe();var o=n;n=[],o&&r.next(o),bse.innerFrom(e()).subscribe(i=o6.createOperatorSubscriber(r,s,xse.noop))};s(),t.subscribe(o6.createOperatorSubscriber(r,function(o){return n===null||n===void 0?void 0:n.push(o)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}a6.bufferWhen=vse});var p6=h(function(d6){Object.defineProperty(d6,"__esModule",{value:!0});d6.catchError=void 0;var _se=ce(),Dse=K(),wse=U();function l6(e){return wse.operate(function(t,r){var n=null,i=!1,s;if(n=t.subscribe(Dse.createOperatorSubscriber(r,void 0,void 0,function(o){if(s=_se.innerFrom(e(o,l6(e)(t))),n)n.unsubscribe(),n=null,s.subscribe(r);else i=!0})),i)n.unsubscribe(),n=null,s.subscribe(r)})}d6.catchError=l6});var Mg=h(function(m6){Object.defineProperty(m6,"__esModule",{value:!0});m6.scanInternals=void 0;var Ese=K();function Sse(e,t,r,n,i){return function(s,o){var a=r,c=t,l=0;s.subscribe(Ese.createOperatorSubscriber(o,function(d){var f=l++;c=a?e(c,d,f):(a=!0,d),n&&o.next(c)},i&&function(){a&&o.next(c),o.complete()}))}}m6.scanInternals=Sse});var Da=h(function(g6){Object.defineProperty(g6,"__esModule",{value:!0});g6.reduce=void 0;var $se=Mg(),Cse=U();function Fse(e,t){return Cse.operate($se.scanInternals(e,t,arguments.length>=2,!1,!0))}g6.reduce=Fse});var Bg=h(function(x6){Object.defineProperty(x6,"__esModule",{value:!0});x6.toArray=void 0;var Rse=Da(),Ose=U(),Ase=function(e,t){return e.push(t),e};function kse(){return Ose.operate(function(e,t){Rse.reduce(Ase,[])(e).subscribe(t)})}x6.toArray=kse});var Lg=h(function(v6){Object.defineProperty(v6,"__esModule",{value:!0});v6.joinAllInternals=void 0;var Pse=Et(),Ise=Wi(),Tse=mu(),Nse=di(),qse=Bg();function jse(e,t){return Tse.pipe(qse.toArray(),Nse.mergeMap(function(r){return e(r)}),t?Ise.mapOneOrManyArgs(t):Pse.identity)}v6.joinAllInternals=jse});var Ug=h(function(D6){Object.defineProperty(D6,"__esModule",{value:!0});D6.combineLatestAll=void 0;var Mse=ff(),Bse=Lg();function Lse(e){return Bse.joinAllInternals(Mse.combineLatest,e)}D6.combineLatestAll=Lse});var $6=h(function(E6){Object.defineProperty(E6,"__esModule",{value:!0});E6.combineAll=void 0;var Use=Ug();E6.combineAll=Use.combineLatestAll});var O6=h(function(Ji){var C6=Ji&&Ji.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},F6=Ji&&Ji.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.combineLatest=void 0;var Vse=ff(),zse=U(),Hse=xa(),Wse=Wi(),Gse=mu(),Kse=ar();function R6(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Kse.popResultSelector(e);return r?Gse.pipe(R6.apply(void 0,F6([],C6(e))),Wse.mapOneOrManyArgs(r)):zse.operate(function(n,i){Vse.combineLatestInit(F6([n],C6(Hse.argsOrArgArray(e))))(i)})}Ji.combineLatest=R6});var A6=h(function(Xi){var Yse=Xi&&Xi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},Jse=Xi&&Xi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.combineLatestWith=void 0;var Xse=O6();function Qse(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return Xse.combineLatest.apply(void 0,Jse([],Yse(e)))}Xi.combineLatestWith=Qse});var Vg=h(function(P6){Object.defineProperty(P6,"__esModule",{value:!0});P6.concatMap=void 0;var k6=di(),Zse=Le();function eoe(e,t){return Zse.isFunction(t)?k6.mergeMap(e,t,1):k6.mergeMap(e,1)}P6.concatMap=eoe});var j6=h(function(N6){Object.defineProperty(N6,"__esModule",{value:!0});N6.concatMapTo=void 0;var T6=Vg(),toe=Le();function roe(e,t){return toe.isFunction(t)?T6.concatMap(function(){return e},t):T6.concatMap(function(){return e})}N6.concatMapTo=roe});var M6=h(function(Qi){var noe=Qi&&Qi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},ioe=Qi&&Qi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Qi,"__esModule",{value:!0});Qi.concat=void 0;var soe=U(),ooe=mf(),aoe=ar(),coe=li();function uoe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=aoe.popScheduler(e);return soe.operate(function(n,i){ooe.concatAll()(coe.from(ioe([n],noe(e)),r)).subscribe(i)})}Qi.concat=uoe});var B6=h(function(Zi){var loe=Zi&&Zi.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},doe=Zi&&Zi.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.concatWith=void 0;var foe=M6();function poe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return foe.concat.apply(void 0,doe([],loe(e)))}Zi.concatWith=poe});var V6=h(function(L6){Object.defineProperty(L6,"__esModule",{value:!0});L6.fromSubscribable=void 0;var moe=ze();function hoe(e){return new moe.Observable(function(t){return e.subscribe(t)})}L6.fromSubscribable=hoe});var gf=h(function(z6){Object.defineProperty(z6,"__esModule",{value:!0});z6.connect=void 0;var goe=St(),yoe=ce(),xoe=U(),boe=V6(),voe={connector:function(){return new goe.Subject}};function _oe(e,t){if(t===void 0)t=voe;var r=t.connector;return xoe.operate(function(n,i){var s=r();yoe.innerFrom(e(boe.fromSubscribable(s))).subscribe(i),i.add(n.subscribe(s))})}z6.connect=_oe});var K6=h(function(W6){Object.defineProperty(W6,"__esModule",{value:!0});W6.count=void 0;var Doe=Da();function woe(e){return Doe.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}W6.count=woe});var Q6=h(function(J6){Object.defineProperty(J6,"__esModule",{value:!0});J6.debounce=void 0;var Eoe=U(),Soe=wt(),Y6=K(),$oe=ce();function Coe(e){return Eoe.operate(function(t,r){var n=!1,i=null,s=null,o=function(){if(s===null||s===void 0||s.unsubscribe(),s=null,n){n=!1;var a=i;i=null,r.next(a)}};t.subscribe(Y6.createOperatorSubscriber(r,function(a){s===null||s===void 0||s.unsubscribe(),n=!0,i=a,s=Y6.createOperatorSubscriber(r,o,Soe.noop),$oe.innerFrom(e(a)).subscribe(s)},function(){o(),r.complete()},void 0,function(){i=s=null}))})}J6.debounce=Coe});var tF=h(function(Z6){Object.defineProperty(Z6,"__esModule",{value:!0});Z6.debounceTime=void 0;var Foe=or(),Roe=U(),Ooe=K();function Aoe(e,t){if(t===void 0)t=Foe.asyncScheduler;return Roe.operate(function(r,n){var i=null,s=null,o=null,a=function(){if(i){i.unsubscribe(),i=null;var l=s;s=null,n.next(l)}};function c(){var l=o+e,d=t.now();if(d<l){i=this.schedule(void 0,l-d),n.add(i);return}a()}r.subscribe(Ooe.createOperatorSubscriber(n,function(l){if(s=l,o=t.now(),!i)i=t.schedule(c,e),n.add(i)},function(){a(),n.complete()},void 0,function(){s=i=null}))})}Z6.debounceTime=Aoe});var Du=h(function(rF){Object.defineProperty(rF,"__esModule",{value:!0});rF.defaultIfEmpty=void 0;var koe=U(),Poe=K();function Ioe(e){return koe.operate(function(t,r){var n=!1;t.subscribe(Poe.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){if(!n)r.next(e);r.complete()}))})}rF.defaultIfEmpty=Ioe});var wu=h(function(iF){Object.defineProperty(iF,"__esModule",{value:!0});iF.take=void 0;var Toe=Qr(),Noe=U(),qoe=K();function joe(e){return e<=0?function(){return Toe.EMPTY}:Noe.operate(function(t,r){var n=0;t.subscribe(qoe.createOperatorSubscriber(r,function(i){if(++n<=e){if(r.next(i),e<=n)r.complete()}}))})}iF.take=joe});var zg=h(function(oF){Object.defineProperty(oF,"__esModule",{value:!0});oF.ignoreElements=void 0;var Moe=U(),Boe=K(),Loe=wt();function Uoe(){return Moe.operate(function(e,t){e.subscribe(Boe.createOperatorSubscriber(t,Loe.noop))})}oF.ignoreElements=Uoe});var Hg=h(function(cF){Object.defineProperty(cF,"__esModule",{value:!0});cF.mapTo=void 0;var Voe=zi();function zoe(e){return Voe.map(function(){return e})}cF.mapTo=zoe});var Wg=h(function(fF){Object.defineProperty(fF,"__esModule",{value:!0});fF.delayWhen=void 0;var Hoe=vu(),lF=wu(),Woe=zg(),Goe=Hg(),Koe=di(),Yoe=ce();function dF(e,t){if(t)return function(r){return Hoe.concat(t.pipe(lF.take(1),Woe.ignoreElements()),r.pipe(dF(e)))};return Koe.mergeMap(function(r,n){return Yoe.innerFrom(e(r,n)).pipe(lF.take(1),Goe.mapTo(r))})}fF.delayWhen=dF});var gF=h(function(mF){Object.defineProperty(mF,"__esModule",{value:!0});mF.delay=void 0;var Joe=or(),Xoe=Wg(),Qoe=Ki();function Zoe(e,t){if(t===void 0)t=Joe.asyncScheduler;var r=Qoe.timer(e,t);return Xoe.delayWhen(function(){return r})}mF.delay=Zoe});var bF=h(function(yF){Object.defineProperty(yF,"__esModule",{value:!0});yF.dematerialize=void 0;var eae=uf(),tae=U(),rae=K();function nae(){return tae.operate(function(e,t){e.subscribe(rae.createOperatorSubscriber(t,function(r){return eae.observeNotification(r,t)}))})}yF.dematerialize=nae});var wF=h(function(_F){Object.defineProperty(_F,"__esModule",{value:!0});_F.distinct=void 0;var iae=U(),vF=K(),sae=wt(),oae=ce();function aae(e,t){return iae.operate(function(r,n){var i=new Set;r.subscribe(vF.createOperatorSubscriber(n,function(s){var o=e?e(s):s;if(!i.has(o))i.add(o),n.next(s)})),t&&oae.innerFrom(t).subscribe(vF.createOperatorSubscriber(n,function(){return i.clear()},sae.noop))})}_F.distinct=aae});var Gg=h(function(EF){Object.defineProperty(EF,"__esModule",{value:!0});EF.distinctUntilChanged=void 0;var cae=Et(),uae=U(),lae=K();function dae(e,t){if(t===void 0)t=cae.identity;return e=e!==null&&e!==void 0?e:fae,uae.operate(function(r,n){var i,s=!0;r.subscribe(lae.createOperatorSubscriber(n,function(o){var a=t(o);if(s||!e(i,a))s=!1,i=a,n.next(o)}))})}EF.distinctUntilChanged=dae;function fae(e,t){return e===t}});var FF=h(function($F){Object.defineProperty($F,"__esModule",{value:!0});$F.distinctUntilKeyChanged=void 0;var pae=Gg();function mae(e,t){return pae.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}$F.distinctUntilKeyChanged=mae});var Eu=h(function(RF){Object.defineProperty(RF,"__esModule",{value:!0});RF.throwIfEmpty=void 0;var hae=Vi(),gae=U(),yae=K();function xae(e){if(e===void 0)e=bae;return gae.operate(function(t,r){var n=!1;t.subscribe(yae.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}RF.throwIfEmpty=xae;function bae(){return new hae.EmptyError}});var IF=h(function(kF){Object.defineProperty(kF,"__esModule",{value:!0});kF.elementAt=void 0;var AF=Eg(),vae=Ys(),_ae=Eu(),Dae=Du(),wae=wu();function Eae(e,t){if(e<0)throw new AF.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(vae.filter(function(i,s){return s===e}),wae.take(1),r?Dae.defaultIfEmpty(t):_ae.throwIfEmpty(function(){return new AF.ArgumentOutOfRangeError}))}}kF.elementAt=Eae});var TF=h(function(es){var Sae=es&&es.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},$ae=es&&es.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(es,"__esModule",{value:!0});es.endWith=void 0;var Cae=vu(),Fae=cf();function Rae(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return Cae.concat(r,Fae.of.apply(void 0,$ae([],Sae(e))))}}es.endWith=Rae});var jF=h(function(NF){Object.defineProperty(NF,"__esModule",{value:!0});NF.every=void 0;var Oae=U(),Aae=K();function kae(e,t){return Oae.operate(function(r,n){var i=0;r.subscribe(Aae.createOperatorSubscriber(n,function(s){if(!e.call(t,s,i++,r))n.next(!1),n.complete()},function(){n.next(!0),n.complete()}))})}NF.every=kae});var Kg=h(function(UF){Object.defineProperty(UF,"__esModule",{value:!0});UF.exhaustMap=void 0;var Pae=zi(),MF=ce(),Iae=U(),BF=K();function LF(e,t){if(t)return function(r){return r.pipe(LF(function(n,i){return MF.innerFrom(e(n,i)).pipe(Pae.map(function(s,o){return t(n,s,i,o)}))}))};return Iae.operate(function(r,n){var i=0,s=null,o=!1;r.subscribe(BF.createOperatorSubscriber(n,function(a){if(!s)s=BF.createOperatorSubscriber(n,void 0,function(){s=null,o&&n.complete()}),MF.innerFrom(e(a,i++)).subscribe(s)},function(){o=!0,!s&&n.complete()}))})}UF.exhaustMap=LF});var Yg=h(function(zF){Object.defineProperty(zF,"__esModule",{value:!0});zF.exhaustAll=void 0;var Tae=Kg(),Nae=Et();function qae(){return Tae.exhaustMap(Nae.identity)}zF.exhaustAll=qae});var KF=h(function(WF){Object.defineProperty(WF,"__esModule",{value:!0});WF.exhaust=void 0;var jae=Yg();WF.exhaust=jae.exhaustAll});var XF=h(function(YF){Object.defineProperty(YF,"__esModule",{value:!0});YF.expand=void 0;var Mae=U(),Bae=pf();function Lae(e,t,r){if(t===void 0)t=1/0;return t=(t||0)<1?1/0:t,Mae.operate(function(n,i){return Bae.mergeInternals(n,i,e,t,void 0,!0,r)})}YF.expand=Lae});var eR=h(function(QF){Object.defineProperty(QF,"__esModule",{value:!0});QF.finalize=void 0;var Uae=U();function Vae(e){return Uae.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}QF.finalize=Vae});var Jg=h(function(rR){Object.defineProperty(rR,"__esModule",{value:!0});rR.createFind=rR.find=void 0;var zae=U(),Hae=K();function Wae(e,t){return zae.operate(tR(e,t,"value"))}rR.find=Wae;function tR(e,t,r){var n=r==="index";return function(i,s){var o=0;i.subscribe(Hae.createOperatorSubscriber(s,function(a){var c=o++;if(e.call(t,a,c,i))s.next(n?c:a),s.complete()},function(){s.next(n?-1:void 0),s.complete()}))}}rR.createFind=tR});var oR=h(function(iR){Object.defineProperty(iR,"__esModule",{value:!0});iR.findIndex=void 0;var Kae=U(),Yae=Jg();function Jae(e,t){return Kae.operate(Yae.createFind(e,t,"index"))}iR.findIndex=Jae});var uR=h(function(aR){Object.defineProperty(aR,"__esModule",{value:!0});aR.first=void 0;var Xae=Vi(),Qae=Ys(),Zae=wu(),ece=Du(),tce=Eu(),rce=Et();function nce(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?Qae.filter(function(i,s){return e(i,s,n)}):rce.identity,Zae.take(1),r?ece.defaultIfEmpty(t):tce.throwIfEmpty(function(){return new Xae.EmptyError}))}}aR.first=nce});var pR=h(function(dR){Object.defineProperty(dR,"__esModule",{value:!0});dR.groupBy=void 0;var ice=ze(),sce=ce(),oce=St(),ace=U(),lR=K();function cce(e,t,r,n){return ace.operate(function(i,s){var o;if(!t||typeof t==="function")o=t;else r=t.duration,o=t.element,n=t.connector;var a=new Map,c=function(g){a.forEach(g),g(s)},l=function(g){return c(function(y){return y.error(g)})},d=0,f=!1,m=new lR.OperatorSubscriber(s,function(g){try{var y=e(g),x=a.get(y);if(!x){a.set(y,x=n?n():new oce.Subject);var v=p(y,x);if(s.next(v),r){var _=lR.createOperatorSubscriber(x,function(){x.complete(),_===null||_===void 0||_.unsubscribe()},void 0,void 0,function(){return a.delete(y)});m.add(sce.innerFrom(r(v)).subscribe(_))}}x.next(o?o(g):g)}catch(S){l(S)}},function(){return c(function(g){return g.complete()})},l,function(){return a.clear()},function(){return f=!0,d===0});i.subscribe(m);function p(g,y){var x=new ice.Observable(function(v){d++;var _=y.subscribe(v);return function(){_.unsubscribe(),--d===0&&f&&m.unsubscribe()}});return x.key=g,x}})}dR.groupBy=cce});var gR=h(function(mR){Object.defineProperty(mR,"__esModule",{value:!0});mR.isEmpty=void 0;var uce=U(),lce=K();function dce(){return uce.operate(function(e,t){e.subscribe(lce.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}mR.isEmpty=dce});var Xg=h(function(wa){var fce=wa&&wa.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(wa,"__esModule",{value:!0});wa.takeLast=void 0;var pce=Qr(),mce=U(),hce=K();function gce(e){return e<=0?function(){return pce.EMPTY}:mce.operate(function(t,r){var n=[];t.subscribe(hce.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,s;try{for(var o=fce(n),a=o.next();!a.done;a=o.next()){var c=a.value;r.next(c)}}catch(l){i={error:l}}finally{try{if(a&&!a.done&&(s=o.return))s.call(o)}finally{if(i)throw i.error}}r.complete()},void 0,function(){n=null}))})}wa.takeLast=gce});var bR=h(function(yR){Object.defineProperty(yR,"__esModule",{value:!0});yR.last=void 0;var yce=Vi(),xce=Ys(),bce=Xg(),vce=Eu(),_ce=Du(),Dce=Et();function wce(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?xce.filter(function(i,s){return e(i,s,n)}):Dce.identity,bce.takeLast(1),r?_ce.defaultIfEmpty(t):vce.throwIfEmpty(function(){return new yce.EmptyError}))}}yR.last=wce});var DR=h(function(vR){Object.defineProperty(vR,"__esModule",{value:!0});vR.materialize=void 0;var Qg=uf(),Ece=U(),Sce=K();function $ce(){return Ece.operate(function(e,t){e.subscribe(Sce.createOperatorSubscriber(t,function(r){t.next(Qg.Notification.createNext(r))},function(){t.next(Qg.Notification.createComplete()),t.complete()},function(r){t.next(Qg.Notification.createError(r)),t.complete()}))})}vR.materialize=$ce});var SR=h(function(wR){Object.defineProperty(wR,"__esModule",{value:!0});wR.max=void 0;var Cce=Da(),Fce=Le();function Rce(e){return Cce.reduce(Fce.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}wR.max=Rce});var FR=h(function($R){Object.defineProperty($R,"__esModule",{value:!0});$R.flatMap=void 0;var Oce=di();$R.flatMap=Oce.mergeMap});var kR=h(function(OR){Object.defineProperty(OR,"__esModule",{value:!0});OR.mergeMapTo=void 0;var RR=di(),Ace=Le();function kce(e,t,r){if(r===void 0)r=1/0;if(Ace.isFunction(t))return RR.mergeMap(function(){return e},t,r);if(typeof t==="number")r=t;return RR.mergeMap(function(){return e},r)}OR.mergeMapTo=kce});var TR=h(function(PR){Object.defineProperty(PR,"__esModule",{value:!0});PR.mergeScan=void 0;var Pce=U(),Ice=pf();function Tce(e,t,r){if(r===void 0)r=1/0;return Pce.operate(function(n,i){var s=t;return Ice.mergeInternals(n,i,function(o,a){return e(s,o,a)},r,function(o){s=o},!1,void 0,function(){return s=null})})}PR.mergeScan=Tce});var qR=h(function(ts){var Nce=ts&&ts.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},qce=ts&&ts.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ts,"__esModule",{value:!0});ts.merge=void 0;var jce=U(),Mce=bu(),NR=ar(),Bce=li();function Lce(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=NR.popScheduler(e),n=NR.popNumber(e,1/0);return jce.operate(function(i,s){Mce.mergeAll(n)(Bce.from(qce([i],Nce(e)),r)).subscribe(s)})}ts.merge=Lce});var jR=h(function(rs){var Uce=rs&&rs.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},Vce=rs&&rs.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(rs,"__esModule",{value:!0});rs.mergeWith=void 0;var zce=qR();function Hce(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return zce.merge.apply(void 0,Vce([],Uce(e)))}rs.mergeWith=Hce});var LR=h(function(MR){Object.defineProperty(MR,"__esModule",{value:!0});MR.min=void 0;var Wce=Da(),Gce=Le();function Kce(e){return Wce.reduce(Gce.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}MR.min=Kce});var yf=h(function(VR){Object.defineProperty(VR,"__esModule",{value:!0});VR.multicast=void 0;var Yce=hu(),UR=Le(),Jce=gf();function Xce(e,t){var r=UR.isFunction(e)?e:function(){return e};if(UR.isFunction(t))return Jce.connect(t,{connector:r});return function(n){return new Yce.ConnectableObservable(n,r)}}VR.multicast=Xce});var WR=h(function(In){var Qce=In&&In.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},Zce=In&&In.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(In,"__esModule",{value:!0});In.onErrorResumeNext=In.onErrorResumeNextWith=void 0;var eue=xa(),tue=Ig();function HR(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=eue.argsOrArgArray(e);return function(n){return tue.onErrorResumeNext.apply(void 0,Zce([n],Qce(r)))}}In.onErrorResumeNextWith=HR;In.onErrorResumeNext=HR});var YR=h(function(GR){Object.defineProperty(GR,"__esModule",{value:!0});GR.pairwise=void 0;var rue=U(),nue=K();function iue(){return rue.operate(function(e,t){var r,n=!1;e.subscribe(nue.createOperatorSubscriber(t,function(i){var s=r;r=i,n&&t.next([s,i]),n=!0}))})}GR.pairwise=iue});var QR=h(function(JR){Object.defineProperty(JR,"__esModule",{value:!0});JR.pluck=void 0;var sue=zi();function oue(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(r===0)throw Error("list of properties cannot be empty.");return sue.map(function(n){var i=n;for(var s=0;s<r;s++){var o=i===null||i===void 0?void 0:i[e[s]];if(typeof o<"u")i=o;else return}return i})}JR.pluck=oue});var tO=h(function(ZR){Object.defineProperty(ZR,"__esModule",{value:!0});ZR.publish=void 0;var aue=St(),cue=yf(),uue=gf();function lue(e){return e?function(t){return uue.connect(e)(t)}:function(t){return cue.multicast(new aue.Subject)(t)}}ZR.publish=lue});var iO=h(function(rO){Object.defineProperty(rO,"__esModule",{value:!0});rO.publishBehavior=void 0;var due=og(),fue=hu();function pue(e){return function(t){var r=new due.BehaviorSubject(e);return new fue.ConnectableObservable(t,function(){return r})}}rO.publishBehavior=pue});var aO=h(function(sO){Object.defineProperty(sO,"__esModule",{value:!0});sO.publishLast=void 0;var mue=nf(),hue=hu();function gue(){return function(e){var t=new mue.AsyncSubject;return new hue.ConnectableObservable(e,function(){return t})}}sO.publishLast=gue});var dO=h(function(uO){Object.defineProperty(uO,"__esModule",{value:!0});uO.publishReplay=void 0;var yue=rf(),xue=yf(),cO=Le();function bue(e,t,r,n){if(r&&!cO.isFunction(r))n=r;var i=cO.isFunction(r)?r:void 0;return function(s){return xue.multicast(new yue.ReplaySubject(e,t,n),i)(s)}}uO.publishReplay=bue});var fO=h(function(ns){var vue=ns&&ns.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},_ue=ns&&ns.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ns,"__esModule",{value:!0});ns.raceWith=void 0;var Due=Tg(),wue=U(),Eue=Et();function Sue(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return!e.length?Eue.identity:wue.operate(function(r,n){Due.raceInit(_ue([r],vue(e)))(n)})}ns.raceWith=Sue});var gO=h(function(mO){Object.defineProperty(mO,"__esModule",{value:!0});mO.repeat=void 0;var $ue=Qr(),Cue=U(),pO=K(),Fue=ce(),Rue=Ki();function Oue(e){var t,r=1/0,n;if(e!=null)if(typeof e==="object")t=e.count,r=t===void 0?1/0:t,n=e.delay;else r=e;return r<=0?function(){return $ue.EMPTY}:Cue.operate(function(i,s){var o=0,a,c=function(){if(a===null||a===void 0||a.unsubscribe(),a=null,n!=null){var d=typeof n==="number"?Rue.timer(n):Fue.innerFrom(n(o)),f=pO.createOperatorSubscriber(s,function(){f.unsubscribe(),l()});d.subscribe(f)}else l()},l=function(){var d=!1;if(a=i.subscribe(pO.createOperatorSubscriber(s,void 0,function(){if(++o<r)if(a)c();else d=!0;else s.complete()})),d)c()};l()})}mO.repeat=Oue});var vO=h(function(xO){Object.defineProperty(xO,"__esModule",{value:!0});xO.repeatWhen=void 0;var Aue=ce(),kue=St(),Pue=U(),yO=K();function Iue(e){return Pue.operate(function(t,r){var n,i=!1,s,o=!1,a=!1,c=function(){return a&&o&&(r.complete(),!0)},l=function(){if(!s)s=new kue.Subject,Aue.innerFrom(e(s)).subscribe(yO.createOperatorSubscriber(r,function(){if(n)d();else i=!0},function(){o=!0,c()}));return s},d=function(){if(a=!1,n=t.subscribe(yO.createOperatorSubscriber(r,void 0,function(){a=!0,!c()&&l().next()})),i)n.unsubscribe(),n=null,i=!1,d()};d()})}xO.repeatWhen=Iue});var EO=h(function(DO){Object.defineProperty(DO,"__esModule",{value:!0});DO.retry=void 0;var Tue=U(),_O=K(),Nue=Et(),que=Ki(),jue=ce();function Mue(e){if(e===void 0)e=1/0;var t;if(e&&typeof e==="object")t=e;else t={count:e};var r=t.count,n=r===void 0?1/0:r,i=t.delay,s=t.resetOnSuccess,o=s===void 0?!1:s;return n<=0?Nue.identity:Tue.operate(function(a,c){var l=0,d,f=function(){var m=!1;if(d=a.subscribe(_O.createOperatorSubscriber(c,function(p){if(o)l=0;c.next(p)},void 0,function(p){if(l++<n){var g=function(){if(d)d.unsubscribe(),d=null,f();else m=!0};if(i!=null){var y=typeof i==="number"?que.timer(i):jue.innerFrom(i(p,l)),x=_O.createOperatorSubscriber(c,function(){x.unsubscribe(),g()},function(){c.complete()});y.subscribe(x)}else g()}else c.error(p)})),m)d.unsubscribe(),d=null,f()};f()})}DO.retry=Mue});var FO=h(function($O){Object.defineProperty($O,"__esModule",{value:!0});$O.retryWhen=void 0;var Bue=ce(),Lue=St(),Uue=U(),SO=K();function Vue(e){return Uue.operate(function(t,r){var n,i=!1,s,o=function(){if(n=t.subscribe(SO.createOperatorSubscriber(r,void 0,void 0,function(a){if(!s)s=new Lue.Subject,Bue.innerFrom(e(s)).subscribe(SO.createOperatorSubscriber(r,function(){return n?o():i=!0}));if(s)s.next(a)})),i)n.unsubscribe(),n=null,i=!1,o()};o()})}$O.retryWhen=Vue});var Zg=h(function(OO){Object.defineProperty(OO,"__esModule",{value:!0});OO.sample=void 0;var zue=ce(),Hue=U(),Wue=wt(),RO=K();function Gue(e){return Hue.operate(function(t,r){var n=!1,i=null;t.subscribe(RO.createOperatorSubscriber(r,function(s){n=!0,i=s})),zue.innerFrom(e).subscribe(RO.createOperatorSubscriber(r,function(){if(n){n=!1;var s=i;i=null,r.next(s)}},Wue.noop))})}OO.sample=Gue});var IO=h(function(kO){Object.defineProperty(kO,"__esModule",{value:!0});kO.sampleTime=void 0;var Kue=or(),Yue=Zg(),Jue=kg();function Xue(e,t){if(t===void 0)t=Kue.asyncScheduler;return Yue.sample(Jue.interval(e,t))}kO.sampleTime=Xue});var qO=h(function(TO){Object.defineProperty(TO,"__esModule",{value:!0});TO.scan=void 0;var Que=U(),Zue=Mg();function ele(e,t){return Que.operate(Zue.scanInternals(e,t,arguments.length>=2,!0))}TO.scan=ele});var LO=h(function(MO){Object.defineProperty(MO,"__esModule",{value:!0});MO.sequenceEqual=void 0;var tle=U(),rle=K(),nle=ce();function ile(e,t){if(t===void 0)t=function(r,n){return r===n};return tle.operate(function(r,n){var i=jO(),s=jO(),o=function(c){n.next(c),n.complete()},a=function(c,l){var d=rle.createOperatorSubscriber(n,function(f){var{buffer:m,complete:p}=l;if(m.length===0)p?o(!1):c.buffer.push(f);else!t(f,m.shift())&&o(!1)},function(){c.complete=!0;var{complete:f,buffer:m}=l;f&&o(m.length===0),d===null||d===void 0||d.unsubscribe()});return d};r.subscribe(a(i,s)),nle.innerFrom(e).subscribe(a(s,i))})}MO.sequenceEqual=ile;function jO(){return{buffer:[],complete:!1}}});var ty=h(function(is){var sle=is&&is.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},ole=is&&is.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(is,"__esModule",{value:!0});is.share=void 0;var UO=ce(),ale=St(),VO=Qo(),cle=U();function ule(e){if(e===void 0)e={};var t=e.connector,r=t===void 0?function(){return new ale.Subject}:t,n=e.resetOnError,i=n===void 0?!0:n,s=e.resetOnComplete,o=s===void 0?!0:s,a=e.resetOnRefCountZero,c=a===void 0?!0:a;return function(l){var d,f,m,p=0,g=!1,y=!1,x=function(){f===null||f===void 0||f.unsubscribe(),f=void 0},v=function(){x(),d=m=void 0,g=y=!1},_=function(){var S=d;v(),S===null||S===void 0||S.unsubscribe()};return cle.operate(function(S,C){if(p++,!y&&!g)x();var D=m=m!==null&&m!==void 0?m:r();if(C.add(function(){if(p--,p===0&&!y&&!g)f=ey(_,c)}),D.subscribe(C),!d&&p>0)d=new VO.SafeSubscriber({next:function(O){return D.next(O)},error:function(O){y=!0,x(),f=ey(v,i,O),D.error(O)},complete:function(){g=!0,x(),f=ey(v,o),D.complete()}}),UO.innerFrom(S).subscribe(d)})(l)}}is.share=ule;function ey(e,t){var r=[];for(var n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(t===!0){e();return}if(t===!1)return;var i=new VO.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return UO.innerFrom(t.apply(void 0,ole([],sle(r)))).subscribe(i)}});var WO=h(function(zO){Object.defineProperty(zO,"__esModule",{value:!0});zO.shareReplay=void 0;var lle=rf(),dle=ty();function fle(e,t,r){var n,i,s,o,a=!1;if(e&&typeof e==="object")n=e.bufferSize,o=n===void 0?1/0:n,i=e.windowTime,t=i===void 0?1/0:i,s=e.refCount,a=s===void 0?!1:s,r=e.scheduler;else o=e!==null&&e!==void 0?e:1/0;return dle.share({connector:function(){return new lle.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}zO.shareReplay=fle});var YO=h(function(GO){Object.defineProperty(GO,"__esModule",{value:!0});GO.single=void 0;var ple=Vi(),mle=$g(),hle=Sg(),gle=U(),yle=K();function xle(e){return gle.operate(function(t,r){var n=!1,i,s=!1,o=0;t.subscribe(yle.createOperatorSubscriber(r,function(a){if(s=!0,!e||e(a,o++,t))n&&r.error(new mle.SequenceError("Too many matching values")),n=!0,i=a},function(){if(n)r.next(i),r.complete();else r.error(s?new hle.NotFoundError("No matching values"):new ple.EmptyError)}))})}GO.single=xle});var QO=h(function(JO){Object.defineProperty(JO,"__esModule",{value:!0});JO.skip=void 0;var ble=Ys();function vle(e){return ble.filter(function(t,r){return e<=r})}JO.skip=vle});var tA=h(function(ZO){Object.defineProperty(ZO,"__esModule",{value:!0});ZO.skipLast=void 0;var _le=Et(),Dle=U(),wle=K();function Ele(e){return e<=0?_le.identity:Dle.operate(function(t,r){var n=Array(e),i=0;return t.subscribe(wle.createOperatorSubscriber(r,function(s){var o=i++;if(o<e)n[o]=s;else{var a=o%e,c=n[a];n[a]=s,r.next(c)}})),function(){n=null}})}ZO.skipLast=Ele});var sA=h(function(nA){Object.defineProperty(nA,"__esModule",{value:!0});nA.skipUntil=void 0;var Sle=U(),rA=K(),$le=ce(),Cle=wt();function Fle(e){return Sle.operate(function(t,r){var n=!1,i=rA.createOperatorSubscriber(r,function(){i===null||i===void 0||i.unsubscribe(),n=!0},Cle.noop);$le.innerFrom(e).subscribe(i),t.subscribe(rA.createOperatorSubscriber(r,function(s){return n&&r.next(s)}))})}nA.skipUntil=Fle});var cA=h(function(oA){Object.defineProperty(oA,"__esModule",{value:!0});oA.skipWhile=void 0;var Rle=U(),Ole=K();function Ale(e){return Rle.operate(function(t,r){var n=!1,i=0;t.subscribe(Ole.createOperatorSubscriber(r,function(s){return(n||(n=!e(s,i++)))&&r.next(s)}))})}oA.skipWhile=Ale});var fA=h(function(lA){Object.defineProperty(lA,"__esModule",{value:!0});lA.startWith=void 0;var uA=vu(),kle=ar(),Ple=U();function Ile(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=kle.popScheduler(e);return Ple.operate(function(n,i){(r?uA.concat(e,n,r):uA.concat(e,n)).subscribe(i)})}lA.startWith=Ile});var Su=h(function(mA){Object.defineProperty(mA,"__esModule",{value:!0});mA.switchMap=void 0;var Tle=ce(),Nle=U(),pA=K();function qle(e,t){return Nle.operate(function(r,n){var i=null,s=0,o=!1,a=function(){return o&&!i&&n.complete()};r.subscribe(pA.createOperatorSubscriber(n,function(c){i===null||i===void 0||i.unsubscribe();var l=0,d=s++;Tle.innerFrom(e(c,d)).subscribe(i=pA.createOperatorSubscriber(n,function(f){return n.next(t?t(c,f,d,l++):f)},function(){i=null,a()}))},function(){o=!0,a()}))})}mA.switchMap=qle});var xA=h(function(gA){Object.defineProperty(gA,"__esModule",{value:!0});gA.switchAll=void 0;var jle=Su(),Mle=Et();function Ble(){return jle.switchMap(Mle.identity)}gA.switchAll=Ble});var DA=h(function(vA){Object.defineProperty(vA,"__esModule",{value:!0});vA.switchMapTo=void 0;var bA=Su(),Lle=Le();function Ule(e,t){return Lle.isFunction(t)?bA.switchMap(function(){return e},t):bA.switchMap(function(){return e})}vA.switchMapTo=Ule});var SA=h(function(wA){Object.defineProperty(wA,"__esModule",{value:!0});wA.switchScan=void 0;var Vle=Su(),zle=U();function Hle(e,t){return zle.operate(function(r,n){var i=t;return Vle.switchMap(function(s,o){return e(i,s,o)},function(s,o){return i=o,o})(r).subscribe(n),function(){i=null}})}wA.switchScan=Hle});var FA=h(function($A){Object.defineProperty($A,"__esModule",{value:!0});$A.takeUntil=void 0;var Wle=U(),Gle=K(),Kle=ce(),Yle=wt();function Jle(e){return Wle.operate(function(t,r){Kle.innerFrom(e).subscribe(Gle.createOperatorSubscriber(r,function(){return r.complete()},Yle.noop)),!r.closed&&t.subscribe(r)})}$A.takeUntil=Jle});var AA=h(function(RA){Object.defineProperty(RA,"__esModule",{value:!0});RA.takeWhile=void 0;var Xle=U(),Qle=K();function Zle(e,t){if(t===void 0)t=!1;return Xle.operate(function(r,n){var i=0;r.subscribe(Qle.createOperatorSubscriber(n,function(s){var o=e(s,i++);(o||t)&&n.next(s),!o&&n.complete()}))})}RA.takeWhile=Zle});var IA=h(function(kA){Object.defineProperty(kA,"__esModule",{value:!0});kA.tap=void 0;var ede=Le(),tde=U(),rde=K(),nde=Et();function ide(e,t,r){var n=ede.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?tde.operate(function(i,s){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;i.subscribe(rde.createOperatorSubscriber(s,function(c){var l;(l=n.next)===null||l===void 0||l.call(n,c),s.next(c)},function(){var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),s.complete()},function(c){var l;a=!1,(l=n.error)===null||l===void 0||l.call(n,c),s.error(c)},function(){var c,l;if(a)(c=n.unsubscribe)===null||c===void 0||c.call(n);(l=n.finalize)===null||l===void 0||l.call(n)}))}):nde.identity}kA.tap=ide});var ry=h(function(NA){Object.defineProperty(NA,"__esModule",{value:!0});NA.throttle=void 0;var sde=U(),TA=K(),ode=ce();function ade(e,t){return sde.operate(function(r,n){var i=t!==null&&t!==void 0?t:{},s=i.leading,o=s===void 0?!0:s,a=i.trailing,c=a===void 0?!1:a,l=!1,d=null,f=null,m=!1,p=function(){if(f===null||f===void 0||f.unsubscribe(),f=null,c)x(),m&&n.complete()},g=function(){f=null,m&&n.complete()},y=function(v){return f=ode.innerFrom(e(v)).subscribe(TA.createOperatorSubscriber(n,p,g))},x=function(){if(l){l=!1;var v=d;d=null,n.next(v),!m&&y(v)}};r.subscribe(TA.createOperatorSubscriber(n,function(v){l=!0,d=v,!(f&&!f.closed)&&(o?x():y(v))},function(){m=!0,!(c&&l&&f&&!f.closed)&&n.complete()}))})}NA.throttle=ade});var BA=h(function(jA){Object.defineProperty(jA,"__esModule",{value:!0});jA.throttleTime=void 0;var cde=or(),ude=ry(),lde=Ki();function dde(e,t,r){if(t===void 0)t=cde.asyncScheduler;var n=lde.timer(e,t);return ude.throttle(function(){return n},r)}jA.throttleTime=dde});var zA=h(function(UA){Object.defineProperty(UA,"__esModule",{value:!0});UA.TimeInterval=UA.timeInterval=void 0;var fde=or(),pde=U(),mde=K();function hde(e){if(e===void 0)e=fde.asyncScheduler;return pde.operate(function(t,r){var n=e.now();t.subscribe(mde.createOperatorSubscriber(r,function(i){var s=e.now(),o=s-n;n=s,r.next(new LA(i,o))}))})}UA.timeInterval=hde;var LA=function(){function e(t,r){this.value=t,this.interval=r}return e}();UA.TimeInterval=LA});var GA=h(function(HA){Object.defineProperty(HA,"__esModule",{value:!0});HA.timeoutWith=void 0;var yde=or(),xde=lf(),bde=df();function vde(e,t,r){var n,i,s;if(r=r!==null&&r!==void 0?r:yde.async,xde.isValidDate(e))n=e;else if(typeof e==="number")i=e;if(t)s=function(){return t};else throw TypeError("No observable provided to switch to");if(n==null&&i==null)throw TypeError("No timeout provided.");return bde.timeout({first:n,each:i,scheduler:r,with:s})}HA.timeoutWith=vde});var JA=h(function(KA){Object.defineProperty(KA,"__esModule",{value:!0});KA.timestamp=void 0;var _de=tf(),Dde=zi();function wde(e){if(e===void 0)e=_de.dateTimestampProvider;return Dde.map(function(t){return{value:t,timestamp:e.now()}})}KA.timestamp=wde});var tk=h(function(ZA){Object.defineProperty(ZA,"__esModule",{value:!0});ZA.window=void 0;var XA=St(),Ede=U(),QA=K(),Sde=wt(),$de=ce();function Cde(e){return Ede.operate(function(t,r){var n=new XA.Subject;r.next(n.asObservable());var i=function(s){n.error(s),r.error(s)};return t.subscribe(QA.createOperatorSubscriber(r,function(s){return n===null||n===void 0?void 0:n.next(s)},function(){n.complete(),r.complete()},i)),$de.innerFrom(e).subscribe(QA.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new XA.Subject)},Sde.noop,i)),function(){n===null||n===void 0||n.unsubscribe(),n=null}})}ZA.window=Cde});var nk=h(function(Ea){var Fde=Ea&&Ea.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.windowCount=void 0;var rk=St(),Rde=U(),Ode=K();function Ade(e,t){if(t===void 0)t=0;var r=t>0?t:e;return Rde.operate(function(n,i){var s=[new rk.Subject],o=[],a=0;i.next(s[0].asObservable()),n.subscribe(Ode.createOperatorSubscriber(i,function(c){var l,d;try{for(var f=Fde(s),m=f.next();!m.done;m=f.next()){var p=m.value;p.next(c)}}catch(x){l={error:x}}finally{try{if(m&&!m.done&&(d=f.return))d.call(f)}finally{if(l)throw l.error}}var g=a-e+1;if(g>=0&&g%r===0)s.shift().complete();if(++a%r===0){var y=new rk.Subject;s.push(y),i.next(y.asObservable())}},function(){while(s.length>0)s.shift().complete();i.complete()},function(c){while(s.length>0)s.shift().error(c);i.error(c)},function(){o=null,s=null}))})}Ea.windowCount=Ade});var ak=h(function(sk){Object.defineProperty(sk,"__esModule",{value:!0});sk.windowTime=void 0;var kde=St(),Pde=or(),Ide=Dr(),Tde=U(),Nde=K(),qde=ci(),jde=ar(),ik=ui();function Mde(e){var t,r,n=[];for(var i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(t=jde.popScheduler(n))!==null&&t!==void 0?t:Pde.asyncScheduler,o=(r=n[0])!==null&&r!==void 0?r:null,a=n[1]||1/0;return Tde.operate(function(c,l){var d=[],f=!1,m=function(x){var{window:v,subs:_}=x;v.complete(),_.unsubscribe(),qde.arrRemove(d,x),f&&p()},p=function(){if(d){var x=new Ide.Subscription;l.add(x);var v=new kde.Subject,_={window:v,subs:x,seen:0};d.push(_),l.next(v.asObservable()),ik.executeSchedule(x,s,function(){return m(_)},e)}};if(o!==null&&o>=0)ik.executeSchedule(l,s,p,o,!0);else f=!0;p();var g=function(x){return d.slice().forEach(x)},y=function(x){g(function(v){var _=v.window;return x(_)}),x(l),l.unsubscribe()};return c.subscribe(Nde.createOperatorSubscriber(l,function(x){g(function(v){v.window.next(x),a<=++v.seen&&m(v)})},function(){return y(function(x){return x.complete()})},function(x){return y(function(v){return v.error(x)})})),function(){d=null}})}sk.windowTime=Mde});var lk=h(function(Sa){var Bde=Sa&&Sa.__values||function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.windowToggle=void 0;var Lde=St(),Ude=Dr(),Vde=U(),ck=ce(),ny=K(),uk=wt(),zde=ci();function Hde(e,t){return Vde.operate(function(r,n){var i=[],s=function(o){while(0<i.length)i.shift().error(o);n.error(o)};ck.innerFrom(e).subscribe(ny.createOperatorSubscriber(n,function(o){var a=new Lde.Subject;i.push(a);var c=new Ude.Subscription,l=function(){zde.arrRemove(i,a),a.complete(),c.unsubscribe()},d;try{d=ck.innerFrom(t(o))}catch(f){s(f);return}n.next(a.asObservable()),c.add(d.subscribe(ny.createOperatorSubscriber(n,l,uk.noop,s)))},uk.noop)),r.subscribe(ny.createOperatorSubscriber(n,function(o){var a,c,l=i.slice();try{for(var d=Bde(l),f=d.next();!f.done;f=d.next()){var m=f.value;m.next(o)}}catch(p){a={error:p}}finally{try{if(f&&!f.done&&(c=d.return))c.call(d)}finally{if(a)throw a.error}}},function(){while(0<i.length)i.shift().complete();n.complete()},s,function(){while(0<i.length)i.shift().unsubscribe()}))})}Sa.windowToggle=Hde});var mk=h(function(fk){Object.defineProperty(fk,"__esModule",{value:!0});fk.windowWhen=void 0;var Wde=St(),Gde=U(),dk=K(),Kde=ce();function Yde(e){return Gde.operate(function(t,r){var n,i,s=function(a){n.error(a),r.error(a)},o=function(){i===null||i===void 0||i.unsubscribe(),n===null||n===void 0||n.complete(),n=new Wde.Subject,r.next(n.asObservable());var a;try{a=Kde.innerFrom(e())}catch(c){s(c);return}a.subscribe(i=dk.createOperatorSubscriber(r,o,o,s))};o(),t.subscribe(dk.createOperatorSubscriber(r,function(a){return n.next(a)},function(){n.complete(),r.complete()},s,function(){i===null||i===void 0||i.unsubscribe(),n=null}))})}fk.windowWhen=Yde});var xk=h(function(ss){var hk=ss&&ss.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},gk=ss&&ss.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(ss,"__esModule",{value:!0});ss.withLatestFrom=void 0;var Jde=U(),yk=K(),Xde=ce(),Qde=Et(),Zde=wt(),efe=ar();function tfe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];var r=efe.popResultSelector(e);return Jde.operate(function(n,i){var s=e.length,o=Array(s),a=e.map(function(){return!1}),c=!1,l=function(f){Xde.innerFrom(e[f]).subscribe(yk.createOperatorSubscriber(i,function(m){if(o[f]=m,!c&&!a[f])a[f]=!0,(c=a.every(Qde.identity))&&(a=null)},Zde.noop))};for(var d=0;d<s;d++)l(d);n.subscribe(yk.createOperatorSubscriber(i,function(f){if(c){var m=gk([f],hk(o));i.next(r?r.apply(void 0,gk([],hk(m))):m)}}))})}ss.withLatestFrom=tfe});var _k=h(function(bk){Object.defineProperty(bk,"__esModule",{value:!0});bk.zipAll=void 0;var rfe=hf(),nfe=Lg();function ife(e){return nfe.joinAllInternals(rfe.zip,e)}bk.zipAll=ife});var Dk=h(function(os){var sfe=os&&os.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},ofe=os&&os.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(os,"__esModule",{value:!0});os.zip=void 0;var afe=hf(),cfe=U();function ufe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return cfe.operate(function(r,n){afe.zip.apply(void 0,ofe([r],sfe(e))).subscribe(n)})}os.zip=ufe});var wk=h(function(as){var lfe=as&&as.__read||function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{while((t===void 0||t-- >0)&&!(i=n.next()).done)s.push(i.value)}catch(a){o={error:a}}finally{try{if(i&&!i.done&&(r=n.return))r.call(n)}finally{if(o)throw o.error}}return s},dfe=as&&as.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(as,"__esModule",{value:!0});as.zipWith=void 0;var ffe=Dk();function pfe(){var e=[];for(var t=0;t<arguments.length;t++)e[t]=arguments[t];return ffe.zip.apply(void 0,dfe([],lfe(e)))}as.zipWith=pfe});var wr=h(function(b){var mfe=b&&b.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]}),hfe=b&&b.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))mfe(t,e,r)};Object.defineProperty(b,"__esModule",{value:!0});b.interval=b.iif=b.generate=b.fromEventPattern=b.fromEvent=b.from=b.forkJoin=b.empty=b.defer=b.connectable=b.concat=b.combineLatest=b.bindNodeCallback=b.bindCallback=b.UnsubscriptionError=b.TimeoutError=b.SequenceError=b.ObjectUnsubscribedError=b.NotFoundError=b.EmptyError=b.ArgumentOutOfRangeError=b.firstValueFrom=b.lastValueFrom=b.isObservable=b.identity=b.noop=b.pipe=b.NotificationKind=b.Notification=b.Subscriber=b.Subscription=b.Scheduler=b.VirtualAction=b.VirtualTimeScheduler=b.animationFrameScheduler=b.animationFrame=b.queueScheduler=b.queue=b.asyncScheduler=b.async=b.asapScheduler=b.asap=b.AsyncSubject=b.ReplaySubject=b.BehaviorSubject=b.Subject=b.animationFrames=b.observable=b.ConnectableObservable=b.Observable=void 0;b.filter=b.expand=b.exhaustMap=b.exhaustAll=b.exhaust=b.every=b.endWith=b.elementAt=b.distinctUntilKeyChanged=b.distinctUntilChanged=b.distinct=b.dematerialize=b.delayWhen=b.delay=b.defaultIfEmpty=b.debounceTime=b.debounce=b.count=b.connect=b.concatWith=b.concatMapTo=b.concatMap=b.concatAll=b.combineLatestWith=b.combineLatestAll=b.combineAll=b.catchError=b.bufferWhen=b.bufferToggle=b.bufferTime=b.bufferCount=b.buffer=b.auditTime=b.audit=b.config=b.NEVER=b.EMPTY=b.scheduled=b.zip=b.using=b.timer=b.throwError=b.range=b.race=b.partition=b.pairs=b.onErrorResumeNext=b.of=b.never=b.merge=void 0;b.switchMap=b.switchAll=b.subscribeOn=b.startWith=b.skipWhile=b.skipUntil=b.skipLast=b.skip=b.single=b.shareReplay=b.share=b.sequenceEqual=b.scan=b.sampleTime=b.sample=b.refCount=b.retryWhen=b.retry=b.repeatWhen=b.repeat=b.reduce=b.raceWith=b.publishReplay=b.publishLast=b.publishBehavior=b.publish=b.pluck=b.pairwise=b.onErrorResumeNextWith=b.observeOn=b.multicast=b.min=b.mergeWith=b.mergeScan=b.mergeMapTo=b.mergeMap=b.flatMap=b.mergeAll=b.max=b.materialize=b.mapTo=b.map=b.last=b.isEmpty=b.ignoreElements=b.groupBy=b.first=b.findIndex=b.find=b.finalize=void 0;b.zipWith=b.zipAll=b.withLatestFrom=b.windowWhen=b.windowToggle=b.windowTime=b.windowCount=b.window=b.toArray=b.timestamp=b.timeoutWith=b.timeout=b.timeInterval=b.throwIfEmpty=b.throttleTime=b.throttle=b.tap=b.takeWhile=b.takeUntil=b.takeLast=b.take=b.switchScan=b.switchMapTo=void 0;var gfe=ze();Object.defineProperty(b,"Observable",{enumerable:!0,get:function(){return gfe.Observable}});var yfe=hu();Object.defineProperty(b,"ConnectableObservable",{enumerable:!0,get:function(){return yfe.ConnectableObservable}});var xfe=pu();Object.defineProperty(b,"observable",{enumerable:!0,get:function(){return xfe.observable}});var bfe=P2();Object.defineProperty(b,"animationFrames",{enumerable:!0,get:function(){return bfe.animationFrames}});var vfe=St();Object.defineProperty(b,"Subject",{enumerable:!0,get:function(){return vfe.Subject}});var _fe=og();Object.defineProperty(b,"BehaviorSubject",{enumerable:!0,get:function(){return _fe.BehaviorSubject}});var Dfe=rf();Object.defineProperty(b,"ReplaySubject",{enumerable:!0,get:function(){return Dfe.ReplaySubject}});var wfe=nf();Object.defineProperty(b,"AsyncSubject",{enumerable:!0,get:function(){return wfe.AsyncSubject}});var Ek=oE();Object.defineProperty(b,"asap",{enumerable:!0,get:function(){return Ek.asap}});Object.defineProperty(b,"asapScheduler",{enumerable:!0,get:function(){return Ek.asapScheduler}});var Sk=or();Object.defineProperty(b,"async",{enumerable:!0,get:function(){return Sk.async}});Object.defineProperty(b,"asyncScheduler",{enumerable:!0,get:function(){return Sk.asyncScheduler}});var $k=hE();Object.defineProperty(b,"queue",{enumerable:!0,get:function(){return $k.queue}});Object.defineProperty(b,"queueScheduler",{enumerable:!0,get:function(){return $k.queueScheduler}});var Ck=DE();Object.defineProperty(b,"animationFrame",{enumerable:!0,get:function(){return Ck.animationFrame}});Object.defineProperty(b,"animationFrameScheduler",{enumerable:!0,get:function(){return Ck.animationFrameScheduler}});var Fk=SE();Object.defineProperty(b,"VirtualTimeScheduler",{enumerable:!0,get:function(){return Fk.VirtualTimeScheduler}});Object.defineProperty(b,"VirtualAction",{enumerable:!0,get:function(){return Fk.VirtualAction}});var Efe=ug();Object.defineProperty(b,"Scheduler",{enumerable:!0,get:function(){return Efe.Scheduler}});var Sfe=Dr();Object.defineProperty(b,"Subscription",{enumerable:!0,get:function(){return Sfe.Subscription}});var $fe=Qo();Object.defineProperty(b,"Subscriber",{enumerable:!0,get:function(){return $fe.Subscriber}});var Rk=uf();Object.defineProperty(b,"Notification",{enumerable:!0,get:function(){return Rk.Notification}});Object.defineProperty(b,"NotificationKind",{enumerable:!0,get:function(){return Rk.NotificationKind}});var Cfe=mu();Object.defineProperty(b,"pipe",{enumerable:!0,get:function(){return Cfe.pipe}});var Ffe=wt();Object.defineProperty(b,"noop",{enumerable:!0,get:function(){return Ffe.noop}});var Rfe=Et();Object.defineProperty(b,"identity",{enumerable:!0,get:function(){return Rfe.identity}});var Ofe=BS();Object.defineProperty(b,"isObservable",{enumerable:!0,get:function(){return Ofe.isObservable}});var Afe=HS();Object.defineProperty(b,"lastValueFrom",{enumerable:!0,get:function(){return Afe.lastValueFrom}});var kfe=KS();Object.defineProperty(b,"firstValueFrom",{enumerable:!0,get:function(){return kfe.firstValueFrom}});var Pfe=Eg();Object.defineProperty(b,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return Pfe.ArgumentOutOfRangeError}});var Ife=Vi();Object.defineProperty(b,"EmptyError",{enumerable:!0,get:function(){return Ife.EmptyError}});var Tfe=Sg();Object.defineProperty(b,"NotFoundError",{enumerable:!0,get:function(){return Tfe.NotFoundError}});var Nfe=rg();Object.defineProperty(b,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return Nfe.ObjectUnsubscribedError}});var qfe=$g();Object.defineProperty(b,"SequenceError",{enumerable:!0,get:function(){return qfe.SequenceError}});var jfe=df();Object.defineProperty(b,"TimeoutError",{enumerable:!0,get:function(){return jfe.TimeoutError}});var Mfe=Uh();Object.defineProperty(b,"UnsubscriptionError",{enumerable:!0,get:function(){return Mfe.UnsubscriptionError}});var Bfe=d$();Object.defineProperty(b,"bindCallback",{enumerable:!0,get:function(){return Bfe.bindCallback}});var Lfe=m$();Object.defineProperty(b,"bindNodeCallback",{enumerable:!0,get:function(){return Lfe.bindNodeCallback}});var Ufe=ff();Object.defineProperty(b,"combineLatest",{enumerable:!0,get:function(){return Ufe.combineLatest}});var Vfe=vu();Object.defineProperty(b,"concat",{enumerable:!0,get:function(){return Vfe.concat}});var zfe=U$();Object.defineProperty(b,"connectable",{enumerable:!0,get:function(){return zfe.connectable}});var Hfe=_u();Object.defineProperty(b,"defer",{enumerable:!0,get:function(){return Hfe.defer}});var Wfe=Qr();Object.defineProperty(b,"empty",{enumerable:!0,get:function(){return Wfe.empty}});var Gfe=H$();Object.defineProperty(b,"forkJoin",{enumerable:!0,get:function(){return Gfe.forkJoin}});var Kfe=li();Object.defineProperty(b,"from",{enumerable:!0,get:function(){return Kfe.from}});var Yfe=G$();Object.defineProperty(b,"fromEvent",{enumerable:!0,get:function(){return Yfe.fromEvent}});var Jfe=X$();Object.defineProperty(b,"fromEventPattern",{enumerable:!0,get:function(){return Jfe.fromEventPattern}});var Xfe=Z$();Object.defineProperty(b,"generate",{enumerable:!0,get:function(){return Xfe.generate}});var Qfe=rC();Object.defineProperty(b,"iif",{enumerable:!0,get:function(){return Qfe.iif}});var Zfe=kg();Object.defineProperty(b,"interval",{enumerable:!0,get:function(){return Zfe.interval}});var epe=lC();Object.defineProperty(b,"merge",{enumerable:!0,get:function(){return epe.merge}});var tpe=Pg();Object.defineProperty(b,"never",{enumerable:!0,get:function(){return tpe.never}});var rpe=cf();Object.defineProperty(b,"of",{enumerable:!0,get:function(){return rpe.of}});var npe=Ig();Object.defineProperty(b,"onErrorResumeNext",{enumerable:!0,get:function(){return npe.onErrorResumeNext}});var ipe=_C();Object.defineProperty(b,"pairs",{enumerable:!0,get:function(){return ipe.pairs}});var spe=AC();Object.defineProperty(b,"partition",{enumerable:!0,get:function(){return spe.partition}});var ope=Tg();Object.defineProperty(b,"race",{enumerable:!0,get:function(){return ope.race}});var ape=jC();Object.defineProperty(b,"range",{enumerable:!0,get:function(){return ape.range}});var cpe=wg();Object.defineProperty(b,"throwError",{enumerable:!0,get:function(){return cpe.throwError}});var upe=Ki();Object.defineProperty(b,"timer",{enumerable:!0,get:function(){return upe.timer}});var lpe=LC();Object.defineProperty(b,"using",{enumerable:!0,get:function(){return lpe.using}});var dpe=hf();Object.defineProperty(b,"zip",{enumerable:!0,get:function(){return dpe.zip}});var fpe=Dg();Object.defineProperty(b,"scheduled",{enumerable:!0,get:function(){return fpe.scheduled}});var ppe=Qr();Object.defineProperty(b,"EMPTY",{enumerable:!0,get:function(){return ppe.EMPTY}});var mpe=Pg();Object.defineProperty(b,"NEVER",{enumerable:!0,get:function(){return mpe.NEVER}});hfe(VC(),b);var hpe=Xo();Object.defineProperty(b,"config",{enumerable:!0,get:function(){return hpe.config}});var gpe=Ng();Object.defineProperty(b,"audit",{enumerable:!0,get:function(){return gpe.audit}});var ype=YC();Object.defineProperty(b,"auditTime",{enumerable:!0,get:function(){return ype.auditTime}});var xpe=ZC();Object.defineProperty(b,"buffer",{enumerable:!0,get:function(){return xpe.buffer}});var bpe=e6();Object.defineProperty(b,"bufferCount",{enumerable:!0,get:function(){return bpe.bufferCount}});var vpe=r6();Object.defineProperty(b,"bufferTime",{enumerable:!0,get:function(){return vpe.bufferTime}});var _pe=s6();Object.defineProperty(b,"bufferToggle",{enumerable:!0,get:function(){return _pe.bufferToggle}});var Dpe=u6();Object.defineProperty(b,"bufferWhen",{enumerable:!0,get:function(){return Dpe.bufferWhen}});var wpe=p6();Object.defineProperty(b,"catchError",{enumerable:!0,get:function(){return wpe.catchError}});var Epe=$6();Object.defineProperty(b,"combineAll",{enumerable:!0,get:function(){return Epe.combineAll}});var Spe=Ug();Object.defineProperty(b,"combineLatestAll",{enumerable:!0,get:function(){return Spe.combineLatestAll}});var $pe=A6();Object.defineProperty(b,"combineLatestWith",{enumerable:!0,get:function(){return $pe.combineLatestWith}});var Cpe=mf();Object.defineProperty(b,"concatAll",{enumerable:!0,get:function(){return Cpe.concatAll}});var Fpe=Vg();Object.defineProperty(b,"concatMap",{enumerable:!0,get:function(){return Fpe.concatMap}});var Rpe=j6();Object.defineProperty(b,"concatMapTo",{enumerable:!0,get:function(){return Rpe.concatMapTo}});var Ope=B6();Object.defineProperty(b,"concatWith",{enumerable:!0,get:function(){return Ope.concatWith}});var Ape=gf();Object.defineProperty(b,"connect",{enumerable:!0,get:function(){return Ape.connect}});var kpe=K6();Object.defineProperty(b,"count",{enumerable:!0,get:function(){return kpe.count}});var Ppe=Q6();Object.defineProperty(b,"debounce",{enumerable:!0,get:function(){return Ppe.debounce}});var Ipe=tF();Object.defineProperty(b,"debounceTime",{enumerable:!0,get:function(){return Ipe.debounceTime}});var Tpe=Du();Object.defineProperty(b,"defaultIfEmpty",{enumerable:!0,get:function(){return Tpe.defaultIfEmpty}});var Npe=gF();Object.defineProperty(b,"delay",{enumerable:!0,get:function(){return Npe.delay}});var qpe=Wg();Object.defineProperty(b,"delayWhen",{enumerable:!0,get:function(){return qpe.delayWhen}});var jpe=bF();Object.defineProperty(b,"dematerialize",{enumerable:!0,get:function(){return jpe.dematerialize}});var Mpe=wF();Object.defineProperty(b,"distinct",{enumerable:!0,get:function(){return Mpe.distinct}});var Bpe=Gg();Object.defineProperty(b,"distinctUntilChanged",{enumerable:!0,get:function(){return Bpe.distinctUntilChanged}});var Lpe=FF();Object.defineProperty(b,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Lpe.distinctUntilKeyChanged}});var Upe=IF();Object.defineProperty(b,"elementAt",{enumerable:!0,get:function(){return Upe.elementAt}});var Vpe=TF();Object.defineProperty(b,"endWith",{enumerable:!0,get:function(){return Vpe.endWith}});var zpe=jF();Object.defineProperty(b,"every",{enumerable:!0,get:function(){return zpe.every}});var Hpe=KF();Object.defineProperty(b,"exhaust",{enumerable:!0,get:function(){return Hpe.exhaust}});var Wpe=Yg();Object.defineProperty(b,"exhaustAll",{enumerable:!0,get:function(){return Wpe.exhaustAll}});var Gpe=Kg();Object.defineProperty(b,"exhaustMap",{enumerable:!0,get:function(){return Gpe.exhaustMap}});var Kpe=XF();Object.defineProperty(b,"expand",{enumerable:!0,get:function(){return Kpe.expand}});var Ype=Ys();Object.defineProperty(b,"filter",{enumerable:!0,get:function(){return Ype.filter}});var Jpe=eR();Object.defineProperty(b,"finalize",{enumerable:!0,get:function(){return Jpe.finalize}});var Xpe=Jg();Object.defineProperty(b,"find",{enumerable:!0,get:function(){return Xpe.find}});var Qpe=oR();Object.defineProperty(b,"findIndex",{enumerable:!0,get:function(){return Qpe.findIndex}});var Zpe=uR();Object.defineProperty(b,"first",{enumerable:!0,get:function(){return Zpe.first}});var e0e=pR();Object.defineProperty(b,"groupBy",{enumerable:!0,get:function(){return e0e.groupBy}});var t0e=zg();Object.defineProperty(b,"ignoreElements",{enumerable:!0,get:function(){return t0e.ignoreElements}});var r0e=gR();Object.defineProperty(b,"isEmpty",{enumerable:!0,get:function(){return r0e.isEmpty}});var n0e=bR();Object.defineProperty(b,"last",{enumerable:!0,get:function(){return n0e.last}});var i0e=zi();Object.defineProperty(b,"map",{enumerable:!0,get:function(){return i0e.map}});var s0e=Hg();Object.defineProperty(b,"mapTo",{enumerable:!0,get:function(){return s0e.mapTo}});var o0e=DR();Object.defineProperty(b,"materialize",{enumerable:!0,get:function(){return o0e.materialize}});var a0e=SR();Object.defineProperty(b,"max",{enumerable:!0,get:function(){return a0e.max}});var c0e=bu();Object.defineProperty(b,"mergeAll",{enumerable:!0,get:function(){return c0e.mergeAll}});var u0e=FR();Object.defineProperty(b,"flatMap",{enumerable:!0,get:function(){return u0e.flatMap}});var l0e=di();Object.defineProperty(b,"mergeMap",{enumerable:!0,get:function(){return l0e.mergeMap}});var d0e=kR();Object.defineProperty(b,"mergeMapTo",{enumerable:!0,get:function(){return d0e.mergeMapTo}});var f0e=TR();Object.defineProperty(b,"mergeScan",{enumerable:!0,get:function(){return f0e.mergeScan}});var p0e=jR();Object.defineProperty(b,"mergeWith",{enumerable:!0,get:function(){return p0e.mergeWith}});var m0e=LR();Object.defineProperty(b,"min",{enumerable:!0,get:function(){return m0e.min}});var h0e=yf();Object.defineProperty(b,"multicast",{enumerable:!0,get:function(){return h0e.multicast}});var g0e=yu();Object.defineProperty(b,"observeOn",{enumerable:!0,get:function(){return g0e.observeOn}});var y0e=WR();Object.defineProperty(b,"onErrorResumeNextWith",{enumerable:!0,get:function(){return y0e.onErrorResumeNextWith}});var x0e=YR();Object.defineProperty(b,"pairwise",{enumerable:!0,get:function(){return x0e.pairwise}});var b0e=QR();Object.defineProperty(b,"pluck",{enumerable:!0,get:function(){return b0e.pluck}});var v0e=tO();Object.defineProperty(b,"publish",{enumerable:!0,get:function(){return v0e.publish}});var _0e=iO();Object.defineProperty(b,"publishBehavior",{enumerable:!0,get:function(){return _0e.publishBehavior}});var D0e=aO();Object.defineProperty(b,"publishLast",{enumerable:!0,get:function(){return D0e.publishLast}});var w0e=dO();Object.defineProperty(b,"publishReplay",{enumerable:!0,get:function(){return w0e.publishReplay}});var E0e=fO();Object.defineProperty(b,"raceWith",{enumerable:!0,get:function(){return E0e.raceWith}});var S0e=Da();Object.defineProperty(b,"reduce",{enumerable:!0,get:function(){return S0e.reduce}});var $0e=gO();Object.defineProperty(b,"repeat",{enumerable:!0,get:function(){return $0e.repeat}});var C0e=vO();Object.defineProperty(b,"repeatWhen",{enumerable:!0,get:function(){return C0e.repeatWhen}});var F0e=EO();Object.defineProperty(b,"retry",{enumerable:!0,get:function(){return F0e.retry}});var R0e=FO();Object.defineProperty(b,"retryWhen",{enumerable:!0,get:function(){return R0e.retryWhen}});var O0e=Zh();Object.defineProperty(b,"refCount",{enumerable:!0,get:function(){return O0e.refCount}});var A0e=Zg();Object.defineProperty(b,"sample",{enumerable:!0,get:function(){return A0e.sample}});var k0e=IO();Object.defineProperty(b,"sampleTime",{enumerable:!0,get:function(){return k0e.sampleTime}});var P0e=qO();Object.defineProperty(b,"scan",{enumerable:!0,get:function(){return P0e.scan}});var I0e=LO();Object.defineProperty(b,"sequenceEqual",{enumerable:!0,get:function(){return I0e.sequenceEqual}});var T0e=ty();Object.defineProperty(b,"share",{enumerable:!0,get:function(){return T0e.share}});var N0e=WO();Object.defineProperty(b,"shareReplay",{enumerable:!0,get:function(){return N0e.shareReplay}});var q0e=YO();Object.defineProperty(b,"single",{enumerable:!0,get:function(){return q0e.single}});var j0e=QO();Object.defineProperty(b,"skip",{enumerable:!0,get:function(){return j0e.skip}});var M0e=tA();Object.defineProperty(b,"skipLast",{enumerable:!0,get:function(){return M0e.skipLast}});var B0e=sA();Object.defineProperty(b,"skipUntil",{enumerable:!0,get:function(){return B0e.skipUntil}});var L0e=cA();Object.defineProperty(b,"skipWhile",{enumerable:!0,get:function(){return L0e.skipWhile}});var U0e=fA();Object.defineProperty(b,"startWith",{enumerable:!0,get:function(){return U0e.startWith}});var V0e=xu();Object.defineProperty(b,"subscribeOn",{enumerable:!0,get:function(){return V0e.subscribeOn}});var z0e=xA();Object.defineProperty(b,"switchAll",{enumerable:!0,get:function(){return z0e.switchAll}});var H0e=Su();Object.defineProperty(b,"switchMap",{enumerable:!0,get:function(){return H0e.switchMap}});var W0e=DA();Object.defineProperty(b,"switchMapTo",{enumerable:!0,get:function(){return W0e.switchMapTo}});var G0e=SA();Object.defineProperty(b,"switchScan",{enumerable:!0,get:function(){return G0e.switchScan}});var K0e=wu();Object.defineProperty(b,"take",{enumerable:!0,get:function(){return K0e.take}});var Y0e=Xg();Object.defineProperty(b,"takeLast",{enumerable:!0,get:function(){return Y0e.takeLast}});var J0e=FA();Object.defineProperty(b,"takeUntil",{enumerable:!0,get:function(){return J0e.takeUntil}});var X0e=AA();Object.defineProperty(b,"takeWhile",{enumerable:!0,get:function(){return X0e.takeWhile}});var Q0e=IA();Object.defineProperty(b,"tap",{enumerable:!0,get:function(){return Q0e.tap}});var Z0e=ry();Object.defineProperty(b,"throttle",{enumerable:!0,get:function(){return Z0e.throttle}});var eme=BA();Object.defineProperty(b,"throttleTime",{enumerable:!0,get:function(){return eme.throttleTime}});var tme=Eu();Object.defineProperty(b,"throwIfEmpty",{enumerable:!0,get:function(){return tme.throwIfEmpty}});var rme=zA();Object.defineProperty(b,"timeInterval",{enumerable:!0,get:function(){return rme.timeInterval}});var nme=df();Object.defineProperty(b,"timeout",{enumerable:!0,get:function(){return nme.timeout}});var ime=GA();Object.defineProperty(b,"timeoutWith",{enumerable:!0,get:function(){return ime.timeoutWith}});var sme=JA();Object.defineProperty(b,"timestamp",{enumerable:!0,get:function(){return sme.timestamp}});var ome=Bg();Object.defineProperty(b,"toArray",{enumerable:!0,get:function(){return ome.toArray}});var ame=tk();Object.defineProperty(b,"window",{enumerable:!0,get:function(){return ame.window}});var cme=nk();Object.defineProperty(b,"windowCount",{enumerable:!0,get:function(){return cme.windowCount}});var ume=ak();Object.defineProperty(b,"windowTime",{enumerable:!0,get:function(){return ume.windowTime}});var lme=lk();Object.defineProperty(b,"windowToggle",{enumerable:!0,get:function(){return lme.windowToggle}});var dme=mk();Object.defineProperty(b,"windowWhen",{enumerable:!0,get:function(){return dme.windowWhen}});var fme=xk();Object.defineProperty(b,"withLatestFrom",{enumerable:!0,get:function(){return fme.withLatestFrom}});var pme=_k();Object.defineProperty(b,"zipAll",{enumerable:!0,get:function(){return pme.zipAll}});var mme=wk();Object.defineProperty(b,"zipWith",{enumerable:!0,get:function(){return mme.zipWith}})});function hme(e,t){return{value:e,key:t||{}}}function $t(e){let t=at.fromEvent(e.input,"keypress",hme).pipe(at.takeUntil(at.fromEvent(e,"close"))).pipe(at.filter(({key:r})=>r.name!=="enter"&&r.name!=="return"));return{line:at.fromEvent(e,"line"),keypress:t,normalizedUpKey:t.pipe(at.filter(({key:r})=>r.name==="up"||r.name==="k"||r.name==="p"&&r.ctrl),at.share()),normalizedDownKey:t.pipe(at.filter(({key:r})=>r.name==="down"||r.name==="j"||r.name==="n"&&r.ctrl),at.share()),numberKey:t.pipe(at.filter((r)=>r.value&&"123456789".includes(r.value)),at.map((r)=>Number(r.value)),at.share()),spaceKey:t.pipe(at.filter(({key:r})=>r&&r.name==="space"),at.share()),aKey:t.pipe(at.filter(({key:r})=>r&&r.name==="a"),at.share()),iKey:t.pipe(at.filter(({key:r})=>r&&r.name==="i"),at.share())}}var at;var fi=A(()=>{at=ne(wr(),1)});class Tn{constructor(e,t={}){let{isInfinite:r=!0}=t;this.lastIndex=0,this.screen=e,this.isInfinite=r}paginate(e,t,r){r||=7;let n=e.split(`
|
|
32
32
|
`);if(this.screen)n=this.screen.breakLines(n),t=n.map((s)=>s.length).splice(0,t).reduce((s,o)=>s+o,0),n=n.flat();if(n.length<=r)return e;let i=this.isInfinite?this.getInfiniteLines(n,t,r):this.getFiniteLines(n,t,r);return this.lastIndex=t,i.join(`
|
|
33
33
|
`)+`
|
|
34
34
|
`+Ok.default.dim("(Move up and down to reveal more choices)")}getInfiniteLines(e,t,r){if(this.pointer===void 0)this.pointer=0;let n=Math.floor(r/2);if(this.pointer<n&&this.lastIndex<t&&t-this.lastIndex<r)this.pointer=Math.min(n,this.pointer+t-this.lastIndex);let i=[e,e,e].flat(),s=Math.max(0,t+e.length-this.pointer);return i.splice(s,r)}getFiniteLines(e,t,r){let n=t-r/2;if(n<0)n=0;else if(n+r>e.length)n=e.length-r;return e.splice(n,r)}}var Ok;var $u=A(()=>{Ok=ne(kr(),1)});function pi(e,t,r){let n=r.choices.realLength,i="loop"in r?Boolean(r.loop):!0;if(t==="up"){if(e>0)return e-1;return i?n-1:e}if(t==="down"){if(e<n-1)return e+1;return i?0:e}throw Error("dir must be up or down")}class Er{constructor(e){this.type="separator",this.line=Ak.default.dim(e||Array.from({length:15}).join(Mi.line))}static exclude(e){return e.type!=="separator"}toString(){return this.line}}var Ak;var Cu=A(()=>{Xd();Ak=ne(kr(),1)});class $a{constructor(e,t){if(e instanceof $a||e.type==="separator")return e;if(typeof e==="string"||typeof e==="number")this.name=String(e),this.value=e,this.short=String(e);else Object.assign(this,e,{name:e.name||e.value,value:"value"in e?e.value:e.name,short:e.short||e.name||e.value});this.disabled=typeof e.disabled==="function"?e.disabled(t):e.disabled}}import kk from"assert";var xf;var Pk=A(()=>{Cu();xf=class xf{constructor(e,t){this.choices=e.map((r)=>{if(r.type==="separator"){if(!(r instanceof Er))r=new Er(r.line);return r}return new $a(r,t)}),this.realChoices=this.choices.filter(Er.exclude).filter((r)=>!r.disabled),Object.defineProperty(this,"length",{get(){return this.choices.length},set(r){this.choices.length=r}}),Object.defineProperty(this,"realLength",{get(){return this.realChoices.length},set(){throw Error("Cannot set `realLength` of a Choices collection")}})}[Symbol.iterator](){let e=this.choices,t=-1;return{next:()=>({value:e[++t],done:!(t in e)})}}getChoice(e){return kk(typeof e==="number"),this.realChoices[e]}get(e){return kk(typeof e==="number"),this.choices[e]}where(e){let t;if(typeof e==="function")t=e;else{let[r,n]=Object.entries(e)[0];t=(i)=>i[r]===n}return this.realChoices.filter(t)}pluck(e){return this.realChoices.map((t)=>t[e])}indexOf(...e){return this.choices.indexOf(...e)}forEach(...e){return this.choices.forEach(...e)}filter(...e){return this.choices.filter(...e)}reduce(...e){return this.choices.reduce(...e)}find(e){return this.choices.find(e)}some(e){return this.choices.some(e)}push(...e){let t=e.map((r)=>new $a(r));return this.choices.push(...t),this.realChoices=this.choices.filter(Er.exclude).filter((r)=>!r.disabled),this.choices}}});var Tk=h(function(ALe,Ik){Ik.exports=yme;function gme(e){let t={defaultWidth:0,output:process.stdout,tty:xe("tty")};if(!e)return t;return Object.keys(t).forEach(function(r){if(!e[r])e[r]=t[r]}),e}function yme(e){let t=gme(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let r=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(r)&&r!==0)return r}return t.defaultWidth}});var qk=h(function(kLe,Nk){Nk.exports=({onlyFirst:e=!1}={})=>{let t=["[\\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(t,e?void 0:"g")}});var Fu=h(function(PLe,jk){var xme=qk();jk.exports=(e)=>typeof e==="string"?e.replace(xme(),""):e});var Bk=h(function(ILe,iy){var Mk=(e)=>{if(Number.isNaN(e))return!1;if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))return!0;return!1};iy.exports=Mk;iy.exports.default=Mk});var Uk=h(function(TLe,Lk){Lk.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 oy=h(function(NLe,sy){var bme=Fu(),vme=Bk(),_me=Uk(),Vk=(e)=>{if(typeof e!=="string"||e.length===0)return 0;if(e=bme(e),e.length===0)return 0;e=e.replace(_me()," ");let t=0;for(let r=0;r<e.length;r++){let n=e.codePointAt(r);if(n<=31||n>=127&&n<=159)continue;if(n>=768&&n<=879)continue;if(n>65535)r++;t+=vme(n)?2:1}return t};sy.exports=Vk;sy.exports.default=Vk});var Hk=h(function(qLe,zk){zk.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 ay=h(function(jLe,Gk){var Ru=Hk(),Wk={};for(let e of Object.keys(Ru))Wk[Ru[e]]=e;var W={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"]}};Gk.exports=W;for(let e of Object.keys(W)){if(!("channels"in W[e]))throw Error("missing channels property: "+e);if(!("labels"in W[e]))throw Error("missing channel labels property: "+e);if(W[e].labels.length!==W[e].channels)throw Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=W[e];delete W[e].channels,delete W[e].labels,Object.defineProperty(W[e],"channels",{value:t}),Object.defineProperty(W[e],"labels",{value:r})}W.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),s=Math.max(t,r,n),o=s-i,a,c;if(s===i)a=0;else if(t===s)a=(r-n)/o;else if(r===s)a=2+(n-t)/o;else if(n===s)a=4+(t-r)/o;if(a=Math.min(a*60,360),a<0)a+=360;let l=(i+s)/2;if(s===i)c=0;else if(l<=0.5)c=o/(s+i);else c=o/(2-s-i);return[a,c*100,l*100]};W.rgb.hsv=function(e){let t,r,n,i,s,o=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(o,a,c),d=l-Math.min(o,a,c),f=function(m){return(l-m)/6/d+0.5};if(d===0)i=0,s=0;else{if(s=d/l,t=f(o),r=f(a),n=f(c),o===l)i=n-r;else if(a===l)i=0.3333333333333333+t-n;else if(c===l)i=0.6666666666666666+r-t;if(i<0)i+=1;else if(i>1)i-=1}return[i*360,s*100,l*100]};W.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],i=W.rgb.hsl(e)[0],s=0.00392156862745098*Math.min(t,Math.min(r,n));return n=1-0.00392156862745098*Math.max(t,Math.max(r,n)),[i,s*100,n*100]};W.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n),s=(1-t-i)/(1-i)||0,o=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function Dme(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}W.rgb.keyword=function(e){let t=Wk[e];if(t)return t;let r=1/0,n;for(let i of Object.keys(Ru)){let s=Ru[i],o=Dme(e,s);if(o<r)r=o,n=i}return n};W.keyword.rgb=function(e){return Ru[e]};W.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>0.04045?((t+0.055)/1.055)**2.4:t/12.92,r=r>0.04045?((r+0.055)/1.055)**2.4:r/12.92,n=n>0.04045?((n+0.055)/1.055)**2.4:n/12.92;let i=t*0.4124+r*0.3576+n*0.1805,s=t*0.2126+r*0.7152+n*0.0722,o=t*0.0193+r*0.1192+n*0.9505;return[i*100,s*100,o*100]};W.rgb.lab=function(e){let t=W.rgb.xyz(e),r=t[0],n=t[1],i=t[2];r/=95.047,n/=100,i/=108.883,r=r>0.008856?r**0.3333333333333333:7.787*r+0.13793103448275862,n=n>0.008856?n**0.3333333333333333:7.787*n+0.13793103448275862,i=i>0.008856?i**0.3333333333333333:7.787*i+0.13793103448275862;let s=116*n-16,o=500*(r-n),a=200*(n-i);return[s,o,a]};W.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,i,s,o;if(r===0)return o=n*255,[o,o,o];if(n<0.5)i=n*(1+r);else i=n+r-n*r;let a=2*n-i,c=[0,0,0];for(let l=0;l<3;l++){if(s=t+0.3333333333333333*-(l-1),s<0)s++;if(s>1)s--;if(6*s<1)o=a+(i-a)*6*s;else if(2*s<1)o=i;else if(3*s<2)o=a+(i-a)*(0.6666666666666666-s)*6;else o=a;c[l]=o*255}return c};W.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,i=r,s=Math.max(n,0.01);n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s;let o=(n+r)/2,a=n===0?2*i/(s+i):2*r/(n+r);return[t,a*100,o*100]};W.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,i=Math.floor(t)%6,s=t-Math.floor(t),o=255*n*(1-r),a=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,c,o];case 1:return[a,n,o];case 2:return[o,n,c];case 3:return[o,a,n];case 4:return[c,o,n];case 5:return[n,o,a]}};W.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,0.01),s,o;o=(2-r)*n;let a=(2-r)*i;return s=r*i,s/=a<=1?a:2-a,s=s||0,o/=2,[t,s*100,o*100]};W.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,i=r+n,s;if(i>1)r/=i,n/=i;let o=Math.floor(6*t),a=1-n;if(s=6*t-o,(o&1)!==0)s=1-s;let c=r+s*(a-r),l,d,f;switch(o){default:case 6:case 0:l=a,d=c,f=r;break;case 1:l=c,d=a,f=r;break;case 2:l=r,d=a,f=c;break;case 3:l=r,d=c,f=a;break;case 4:l=c,d=r,f=a;break;case 5:l=a,d=r,f=c;break}return[l*255,d*255,f*255]};W.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100,s=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[s*255,o*255,a*255]};W.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i,s,o;return i=t*3.2406+r*-1.5372+n*-0.4986,s=t*-0.9689+r*1.8758+n*0.0415,o=t*0.0557+r*-0.204+n*1.057,i=i>0.0031308?1.055*i**0.4166666666666667-0.055:i*12.92,s=s>0.0031308?1.055*s**0.4166666666666667-0.055:s*12.92,o=o>0.0031308?1.055*o**0.4166666666666667-0.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};W.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>0.008856?t**0.3333333333333333:7.787*t+0.13793103448275862,r=r>0.008856?r**0.3333333333333333:7.787*r+0.13793103448275862,n=n>0.008856?n**0.3333333333333333:7.787*n+0.13793103448275862;let i=116*r-16,s=500*(t-r),o=200*(r-n);return[i,s,o]};W.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],i,s,o;s=(t+16)/116,i=r/500+s,o=s-n/200;let a=s**3,c=i**3,l=o**3;return s=a>0.008856?a:(s-0.13793103448275862)/7.787,i=c>0.008856?c:(i-0.13793103448275862)/7.787,o=l>0.008856?l:(o-0.13793103448275862)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};W.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],i;if(i=Math.atan2(n,r)*360/2/Math.PI,i<0)i+=360;let o=Math.sqrt(r*r+n*n);return[t,o,i]};W.lch.lab=function(e){let t=e[0],r=e[1],i=e[2]/360*2*Math.PI,s=r*Math.cos(i),o=r*Math.sin(i);return[t,s,o]};W.rgb.ansi16=function(e,t=null){let[r,n,i]=e,s=t===null?W.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));if(s===2)o+=60;return o};W.hsv.ansi16=function(e){return W.rgb.ansi16(W.hsv.rgb(e),e[2])};W.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];if(t===r&&r===n){if(t<8)return 16;if(t>248)return 231;return Math.round((t-8)/247*24)+232}return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};W.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7){if(e>50)t+=3.5;return t=t/10.5*255,[t,t,t]}let r=(~~(e>50)+1)*0.5,n=(t&1)*r*255,i=(t>>1&1)*r*255,s=(t>>2&1)*r*255;return[n,i,s]};W.ansi256.rgb=function(e){if(e>=232){let s=(e-232)*10+8;return[s,s,s]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[r,n,i]};W.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};W.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];if(t[0].length===3)r=r.split("").map((a)=>a+a).join("");let n=parseInt(r,16),i=n>>16&255,s=n>>8&255,o=n&255;return[i,s,o]};W.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),s=Math.min(Math.min(t,r),n),o=i-s,a,c;if(o<1)a=s/(1-o);else a=0;if(o<=0)c=0;else if(i===t)c=(r-n)/o%6;else if(i===r)c=2+(n-t)/o;else c=4+(t-r)/o;return c/=6,c%=1,[c*360,o*100,a*100]};W.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<0.5?2*t*r:2*t*(1-r),i=0;if(n<1)i=(r-0.5*n)/(1-n);return[e[0],n*100,i*100]};W.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,i=0;if(n<1)i=(r-n)/(1-n);return[e[0],n*100,i*100]};W.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],s=t%1*6,o=s%1,a=1-o,c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-r)*n,[(r*i[0]+c)*255,(r*i[1]+c)*255,(r*i[2]+c)*255]};W.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),i=0;if(n>0)i=t/n;return[e[0],i*100,n*100]};W.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+0.5*t,i=0;if(n>0&&n<0.5)i=t/(2*n);else if(n>=0.5&&n<1)i=t/(2*(1-n));return[e[0],i*100,n*100]};W.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};W.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,i=n-t,s=0;if(i<1)s=(n-i)/(1-i);return[e[0],i*100,s*100]};W.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};W.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};W.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};W.gray.hsl=function(e){return[0,0,e[0]]};W.gray.hsv=W.gray.hsl;W.gray.hwb=function(e){return[0,100,e[0]]};W.gray.cmyk=function(e){return[0,0,0,e[0]]};W.gray.lab=function(e){return[e[0],0,0]};W.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};W.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var Yk=h(function(MLe,Kk){var bf=ay();function wme(){let e={},t=Object.keys(bf);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function Eme(e){let t=wme(),r=[e];t[e].distance=0;while(r.length){let n=r.pop(),i=Object.keys(bf[n]);for(let s=i.length,o=0;o<s;o++){let a=i[o],c=t[a];if(c.distance===-1)c.distance=t[n].distance+1,c.parent=n,r.unshift(a)}}return t}function Sme(e,t){return function(r){return t(e(r))}}function $me(e,t){let r=[t[e].parent,e],n=bf[t[e].parent][e],i=t[e].parent;while(t[i].parent)r.unshift(t[i].parent),n=Sme(bf[t[i].parent][i],n),i=t[i].parent;return n.conversion=r,n}Kk.exports=function(e){let t=Eme(e),r={},n=Object.keys(t);for(let i=n.length,s=0;s<i;s++){let o=n[s];if(t[o].parent===null)continue;r[o]=$me(o,t)}return r}});var Xk=h(function(BLe,Jk){var cy=ay(),Cme=Yk(),Ca={},Fme=Object.keys(cy);function Rme(e){let t=function(...r){let n=r[0];if(n===void 0||n===null)return n;if(n.length>1)r=n;return e(r)};if("conversion"in e)t.conversion=e.conversion;return t}function Ome(e){let t=function(...r){let n=r[0];if(n===void 0||n===null)return n;if(n.length>1)r=n;let i=e(r);if(typeof i==="object")for(let s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};if("conversion"in e)t.conversion=e.conversion;return t}Fme.forEach((e)=>{Ca[e]={},Object.defineProperty(Ca[e],"channels",{value:cy[e].channels}),Object.defineProperty(Ca[e],"labels",{value:cy[e].labels});let t=Cme(e);Object.keys(t).forEach((n)=>{let i=t[n];Ca[e][n]=Ome(i),Ca[e][n].raw=Rme(i)})});Jk.exports=Ca});var ly=h(function(LLe,rP){var Qk=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,Zk=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};5;${n}m`},eP=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},vf=(e)=>e,tP=(e,t,r)=>[e,t,r],Fa=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},uy,Ra=(e,t,r,n)=>{if(uy===void 0)uy=Xk();let i=n?10:0,s={};for(let[o,a]of Object.entries(uy)){let c=o==="ansi16"?"ansi":o;if(o===t)s[c]=e(r,i);else if(typeof a==="object")s[c]=e(a[t],i)}return s};function Ame(){let e=new Map,t={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]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[i,s]of Object.entries(n))t[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[i]=t[i],e.set(s[0],s[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",Fa(t.color,"ansi",()=>Ra(Qk,"ansi16",vf,!1)),Fa(t.color,"ansi256",()=>Ra(Zk,"ansi256",vf,!1)),Fa(t.color,"ansi16m",()=>Ra(eP,"rgb",tP,!1)),Fa(t.bgColor,"ansi",()=>Ra(Qk,"ansi16",vf,!0)),Fa(t.bgColor,"ansi256",()=>Ra(Zk,"ansi256",vf,!0)),Fa(t.bgColor,"ansi16m",()=>Ra(eP,"rgb",tP,!0)),t}Object.defineProperty(rP,"exports",{enumerable:!0,get:Ame})});var sP=h(function(ULe,iP){var Ou=oy(),kme=Fu(),Pme=ly(),fy=new Set(["\x1B","\x9B"]),nP=(e)=>`${fy.values().next().value}[${e}m`,Ime=(e)=>e.split(" ").map((t)=>Ou(t)),dy=(e,t,r)=>{let n=[...t],i=!1,s=Ou(kme(e[e.length-1]));for(let[o,a]of n.entries()){let c=Ou(a);if(s+c<=r)e[e.length-1]+=a;else e.push(a),s=0;if(fy.has(a))i=!0;else if(i&&a==="m"){i=!1;continue}if(i)continue;if(s+=c,s===r&&o<n.length-1)e.push(""),s=0}if(!s&&e[e.length-1].length>0&&e.length>1)e[e.length-2]+=e.pop()},Tme=(e)=>{let t=e.split(" "),r=t.length;while(r>0){if(Ou(t[r-1])>0)break;r--}if(r===t.length)return e;return t.slice(0,r).join(" ")+t.slice(r).join("")},Nme=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i="",s,o=Ime(e),a=[""];for(let[c,l]of e.split(" ").entries()){if(r.trim!==!1)a[a.length-1]=a[a.length-1].trimLeft();let d=Ou(a[a.length-1]);if(c!==0){if(d>=t&&(r.wordWrap===!1||r.trim===!1))a.push(""),d=0;if(d>0||r.trim===!1)a[a.length-1]+=" ",d++}if(r.hard&&o[c]>t){let f=t-d,m=1+Math.floor((o[c]-f-1)/t);if(Math.floor((o[c]-1)/t)<m)a.push("");dy(a,l,t);continue}if(d+o[c]>t&&d>0&&o[c]>0){if(r.wordWrap===!1&&d<t){dy(a,l,t);continue}a.push("")}if(d+o[c]>t&&r.wordWrap===!1){dy(a,l,t);continue}a[a.length-1]+=l}if(r.trim!==!1)a=a.map(Tme);n=a.join(`
|
|
@@ -42,7 +42,7 @@ Calls to async() callback can have unexpected results.`);return m=!0,function(_,
|
|
|
42
42
|
`)+r,i=n+1,n=e.indexOf(`
|
|
43
43
|
`,i)}while(n!==-1);return s+=e.substr(i),s};dP.exports={stringReplaceAll:Mme,stringEncaseCRLFWithFirstIndex:Bme}});var yP=h(function(WLe,gP){var Lme=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,pP=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Ume=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Vme=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,zme=new Map([["n",`
|
|
44
44
|
`],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\x00"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function hP(e){let t=e[0]==="u",r=e[1]==="{";if(t&&!r&&e.length===5||e[0]==="x"&&e.length===3)return String.fromCharCode(parseInt(e.slice(1),16));if(t&&r)return String.fromCodePoint(parseInt(e.slice(2,-1),16));return zme.get(e)||e}function Hme(e,t){let r=[],n=t.trim().split(/\s*,\s*/g),i;for(let s of n){let o=Number(s);if(!Number.isNaN(o))r.push(o);else if(i=s.match(Ume))r.push(i[2].replace(Vme,(a,c,l)=>c?hP(c):l));else throw Error(`Invalid Chalk template style argument: ${s} (in style '${e}')`)}return r}function Wme(e){pP.lastIndex=0;let t=[],r;while((r=pP.exec(e))!==null){let n=r[1];if(r[2]){let i=Hme(n,r[2]);t.push([n].concat(i))}else t.push([n])}return t}function mP(e,t){let r={};for(let i of t)for(let s of i.styles)r[s[0]]=i.inverse?null:s.slice(1);let n=e;for(let[i,s]of Object.entries(r)){if(!Array.isArray(s))continue;if(!(i in n))throw Error(`Unknown Chalk style: ${i}`);n=s.length>0?n[i](...s):n[i]}return n}gP.exports=(e,t)=>{let r=[],n=[],i=[];if(t.replace(Lme,(s,o,a,c,l,d)=>{if(o)i.push(hP(o));else if(c){let f=i.join("");i=[],n.push(r.length===0?f:mP(e,r)(f)),r.push({inverse:a,styles:Wme(c)})}else if(l){if(r.length===0)throw Error("Found extraneous } in Chalk template literal");n.push(mP(e,r)(i.join(""))),i=[],r.pop()}else i.push(d)}),n.push(i.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw Error(s)}return n.join("")}});var by=h(function(GLe,EP){var Au=ly(),{stdout:gy,stderr:yy}=lP(),{stringReplaceAll:Gme,stringEncaseCRLFWithFirstIndex:Kme}=fP(),{isArray:_f}=Array,bP=["ansi","ansi","ansi256","ansi16m"],Oa=Object.create(null),Yme=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let r=gy?gy.level:0;e.level=t.level===void 0?r:t.level};class vP{constructor(e){return _P(e)}}var _P=(e)=>{let t={};return Yme(t,e),t.template=(...r)=>wP(t.template,...r),Object.setPrototypeOf(t,Df.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=vP,t.template};function Df(e){return _P(e)}for(let[e,t]of Object.entries(Au))Oa[e]={get(){let r=wf(this,xy(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};Oa.visible={get(){let e=wf(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var DP=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of DP)Oa[e]={get(){let{level:t}=this;return function(...r){let n=xy(Au.color[bP[t]][e](...r),Au.color.close,this._styler);return wf(this,n,this._isEmpty)}}};for(let e of DP){let t="bg"+e[0].toUpperCase()+e.slice(1);Oa[t]={get(){let{level:r}=this;return function(...n){let i=xy(Au.bgColor[bP[r]][e](...n),Au.bgColor.close,this._styler);return wf(this,i,this._isEmpty)}}}}var Jme=Object.defineProperties(()=>{},{...Oa,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),xy=(e,t,r)=>{let n,i;if(r===void 0)n=e,i=t;else n=r.openAll+e,i=t+r.closeAll;return{open:e,close:t,openAll:n,closeAll:i,parent:r}},wf=(e,t,r)=>{let n=(...i)=>{if(_f(i[0])&&_f(i[0].raw))return xP(n,wP(n,...i));return xP(n,i.length===1?""+i[0]:i.join(" "))};return Object.setPrototypeOf(n,Jme),n._generator=e,n._styler=t,n._isEmpty=r,n},xP=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(r===void 0)return t;let{openAll:n,closeAll:i}=r;if(t.indexOf("\x1B")!==-1)while(r!==void 0)t=Gme(t,r.close,r.open),r=r.parent;let s=t.indexOf(`
|
|
45
|
-
`);if(s!==-1)t=Kme(t,i,n,s);return n+t+i},hy,wP=(e,...t)=>{let[r]=t;if(!_f(r)||!_f(r.raw))return t.join(" ");let n=t.slice(1),i=[r.raw[0]];for(let s=1;s<r.length;s++)i.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[s]));if(hy===void 0)hy=yP();return hy(e,i.join(""))};Object.defineProperties(Df.prototype,Oa);var Ef=Df();Ef.supportsColor=gy;Ef.stderr=Df({level:yy?yy.level:0});Ef.stderr.supportsColor=yy;EP.exports=Ef});var $P=h(function(KLe,vy){var SP=(e,t)=>{for(let r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};vy.exports=SP;vy.exports.default=SP});var FP=h(function(YLe,$f){var Xme=$P(),Sf=new WeakMap,CP=(e,t={})=>{if(typeof e!=="function")throw TypeError("Expected a function");let r,n=0,i=e.displayName||e.name||"<anonymous>",s=function(...o){if(Sf.set(s,++n),n===1)r=e.apply(this,o),e=null;else if(t.throw===!0)throw Error(`Function \`${i}\` can only be called once`);return r};return Xme(s,e),Sf.set(s,n),s};$f.exports=CP;$f.exports.default=CP;$f.exports.callCount=(e)=>{if(!Sf.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Sf.get(e)}});var RP=h(function(JLe,Cf){Cf.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")Cf.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")Cf.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var OP=h(function(XLe,ka){var st=global.process,Js=function(e){return e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function"};if(!Js(st))ka.exports=function(){return function(){}};else{if(_y=xe("assert"),Xs=RP(),Dy=/^win/i.test(st.platform),Aa=xe("events"),typeof Aa!=="function")Aa=Aa.EventEmitter;if(st.__signal_exit_emitter__)xt=st.__signal_exit_emitter__;else xt=st.__signal_exit_emitter__=new Aa,xt.count=0,xt.emitted={};if(!xt.infinite)xt.setMaxListeners(1/0),xt.infinite=!0;ka.exports=function(e,t){if(!Js(global.process))return function(){};if(_y.equal(typeof e,"function","a callback must be provided for exit handler"),Qs===!1)Ff();var r="exit";if(t&&t.alwaysLast)r="afterexit";var n=function(){if(xt.removeListener(r,e),xt.listeners("exit").length===0&&xt.listeners("afterexit").length===0)ku()};return xt.on(r,e),n},ku=function(){if(!Qs||!Js(global.process))return;Qs=!1,Xs.forEach(function(t){try{st.removeListener(t,Pu[t])}catch(r){}}),st.emit=Iu,st.reallyExit=Rf,xt.count-=1},ka.exports.unload=ku,us=function(t,r,n){if(xt.emitted[t])return;xt.emitted[t]=!0,xt.emit(t,r,n)},Pu={},Xs.forEach(function(e){Pu[e]=function(){if(!Js(global.process))return;var r=st.listeners(e);if(r.length===xt.count){if(ku(),us("exit",null,e),us("afterexit",null,e),Dy&&e==="SIGHUP")e="SIGINT";st.kill(st.pid,e)}}}),ka.exports.signals=function(){return Xs},Qs=!1,Ff=function(){if(Qs||!Js(global.process))return;Qs=!0,xt.count+=1,Xs=Xs.filter(function(t){try{return st.on(t,Pu[t]),!0}catch(r){return!1}}),st.emit=Ey,st.reallyExit=wy},ka.exports.load=Ff,Rf=st.reallyExit,wy=function(t){if(!Js(global.process))return;st.exitCode=t||0,us("exit",st.exitCode,null),us("afterexit",st.exitCode,null),Rf.call(st,st.exitCode)},Iu=st.emit,Ey=function(t,r){if(t==="exit"&&Js(global.process)){if(r!==void 0)st.exitCode=r;var n=Iu.apply(this,arguments);return us("exit",st.exitCode,null),us("afterexit",st.exitCode,null),n}else return Iu.apply(this,arguments)}}var _y,Xs,Dy,Aa,xt,ku,us,Pu,Qs,Ff,Rf,wy,Iu,Ey});var kP=h(function(QLe,AP){var Qme=FP(),Zme=OP();AP.exports=Qme(()=>{Zme(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})})});var TP=h(function(the){var ehe=kP(),Of=!1;the.show=(e=process.stderr)=>{if(!e.isTTY)return;Of=!1,e.write("\x1B[?25h")};the.hide=(e=process.stderr)=>{if(!e.isTTY)return;ehe(),Of=!0,e.write("\x1B[?25l")};the.toggle=(e,t)=>{if(e!==void 0)Of=e;if(Of)the.show(t);else the.hide(t)}});var NP=h(function(eUe,nhe){nhe.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 kf=h(function(tUe,jP){var Af=Object.assign({},NP()),qP=Object.keys(Af);Object.defineProperty(Af,"random",{get(){let e=Math.floor(Math.random()*qP.length),t=qP[e];return Af[t]}});jP.exports=Af});var Sy=h(function(rUe,MP){MP.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 LP=h(function(nUe,BP){var ls=by(),ihe=Sy(),she={info:ls.blue("\u2139"),success:ls.green("\u2714"),warning:ls.yellow("\u26A0"),error:ls.red("\u2716")},ohe={info:ls.blue("i"),success:ls.green("\u221A"),warning:ls.yellow("\u203C"),error:ls.red("\xD7")};BP.exports=ihe()?she:ohe});var UP=h(function(iUe,Pf){var ahe=function(){function e(o,a,c,l){var d;if(typeof a==="object")c=a.depth,l=a.prototype,d=a.filter,a=a.circular;var f=[],m=[],p=typeof Buffer<"u";if(typeof a>"u")a=!0;if(typeof c>"u")c=1/0;function g(y,x){if(y===null)return null;if(x==0)return y;var v,_;if(typeof y!="object")return y;if(e.__isArray(y))v=[];else if(e.__isRegExp(y)){if(v=new RegExp(y.source,s(y)),y.lastIndex)v.lastIndex=y.lastIndex}else if(e.__isDate(y))v=new Date(y.getTime());else if(p&&Buffer.isBuffer(y)){if(Buffer.allocUnsafe)v=Buffer.allocUnsafe(y.length);else v=new Buffer(y.length);return y.copy(v),v}else if(typeof l>"u")_=Object.getPrototypeOf(y),v=Object.create(_);else v=Object.create(l),_=l;if(a){var E=f.indexOf(y);if(E!=-1)return m[E];f.push(y),m.push(v)}for(var C in y){var D;if(_)D=Object.getOwnPropertyDescriptor(_,C);if(D&&D.set==null)continue;v[C]=g(y[C],x-1)}return v}return g(o,c)}e.clonePrototype=function(a){if(a===null)return null;var c=function(){};return c.prototype=a,new c};function t(o){return Object.prototype.toString.call(o)}e.__objToStr=t;function r(o){return typeof o==="object"&&t(o)==="[object Date]"}e.__isDate=r;function n(o){return typeof o==="object"&&t(o)==="[object Array]"}e.__isArray=n;function i(o){return typeof o==="object"&&t(o)==="[object RegExp]"}e.__isRegExp=i;function s(o){var a="";if(o.global)a+="g";if(o.ignoreCase)a+="i";if(o.multiline)a+="m";return a}return e.__getRegExpFlags=s,e}();if(typeof Pf==="object"&&Pf.exports)Pf.exports=ahe});var zP=h(function(sUe,VP){var che=UP();VP.exports=function(e,t){return e=e||{},Object.keys(t).forEach(function(r){if(typeof e[r]>"u")e[r]=che(t[r])}),e}});var WP=h(function(oUe,HP){HP.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 JP=h(function(aUe,$y){var uhe=zP(),Tu=WP(),KP={nul:0,control:0};$y.exports=function(t){return YP(t,KP)};$y.exports.config=function(e){return e=uhe(e||{},KP),function(r){return YP(r,e)}};function YP(e,t){if(typeof e!=="string")return GP(e,t);var r=0;for(var n=0;n<e.length;n++){var i=GP(e.charCodeAt(n),t);if(i<0)return-1;r+=i}return r}function GP(e,t){if(e===0)return t.nul;if(e<32||e>=127&&e<160)return t.control;if(lhe(e))return 0;return 1+(e>=4352&&(e<=4447||e==9001||e==9002||e>=11904&&e<=42191&&e!=12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))}function lhe(e){var t=0,r=Tu.length-1,n;if(e<Tu[0][0]||e>Tu[r][1])return!1;while(r>=t)if(n=Math.floor((t+r)/2),e>Tu[n][1])t=n+1;else if(e<Tu[n][0])r=n-1;else return!0;return!1}});var QP=h(function(cUe,XP){XP.exports=({stream:e=process.stdout}={})=>Boolean(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))});var i8=h(function(uUe,n8){function ZP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function e8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZP(Object(r),!0).forEach(function(n){dhe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dhe(e,t,r){if(t=r8(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function fhe(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function t8(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n)n.writable=!0;Object.defineProperty(e,r8(n.key),n)}}function phe(e,t,r){if(t)t8(e.prototype,t);if(r)t8(e,r);return Object.defineProperty(e,"prototype",{writable:!1}),e}function r8(e){var t=mhe(e,"string");return typeof t==="symbol"?t:String(t)}function mhe(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hhe=xe("buffer"),If=hhe.Buffer,ghe=xe("util"),Cy=ghe.inspect,yhe=Cy&&Cy.custom||"inspect";function xhe(e,t,r){If.prototype.copy.call(e,t,r)}n8.exports=function(){function e(){fhe(this,e),this.head=null,this.tail=null,this.length=0}return phe(e,[{key:"push",value:function(r){var n={data:r,next:null};if(this.length>0)this.tail.next=n;else this.head=n;this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};if(this.length===0)this.tail=n;this.head=n,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var r=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,r}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";var n=this.head,i=""+n.data;while(n=n.next)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return If.alloc(0);var n=If.allocUnsafe(r>>>0),i=this.head,s=0;while(i)xhe(i.data,n,s),s+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;if(r<this.head.data.length)i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r);else if(r===this.head.data.length)i=this.shift();else i=n?this._getString(r):this._getBuffer(r);return i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,s=n.data;r-=s.length;while(n=n.next){var o=n.data,a=r>o.length?o.length:r;if(a===o.length)s+=o;else s+=o.slice(0,r);if(r-=a,r===0){if(a===o.length)if(++i,n.next)this.head=n.next;else this.head=this.tail=null;else this.head=n,n.data=o.slice(a);break}++i}return this.length-=i,s}},{key:"_getBuffer",value:function(r){var n=If.allocUnsafe(r),i=this.head,s=1;i.data.copy(n),r-=i.data.length;while(i=i.next){var o=i.data,a=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,a),r-=a,r===0){if(a===o.length)if(++s,i.next)this.head=i.next;else this.head=this.tail=null;else this.head=i,i.data=o.slice(a);break}++s}return this.length-=s,n}},{key:yhe,value:function(r,n){return Cy(this,e8(e8({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var Ry=h(function(lUe,o8){function bhe(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;if(n||i){if(t)t(e);else if(e){if(!this._writableState)process.nextTick(Fy,this,e);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(Fy,this,e)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(e||null,function(s){if(!t&&s)if(!r._writableState)process.nextTick(s8,r,s);else if(!r._writableState.errorEmitted)r._writableState.errorEmitted=!0,process.nextTick(s8,r,s);else process.nextTick(Tf,r);else if(t)process.nextTick(Tf,r),t(s);else process.nextTick(Tf,r)}),this}function s8(e,t){Fy(e,t),Tf(e)}function Tf(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function vhe(){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 Fy(e,t){e.emit("error",t)}function _he(e,t){var{_readableState:r,_writableState:n}=e;if(r&&r.autoDestroy||n&&n.autoDestroy)e.destroy(t);else e.emit("error",t)}o8.exports={destroy:bhe,undestroy:vhe,errorOrDestroy:_he}});var ds=h(function(She,u8){var c8={};function Tr(e,t,r){if(!r)r=Error;function n(s,o,a){if(typeof t==="string")return t;else return t(s,o,a)}class i extends r{constructor(s,o,a){super(n(s,o,a))}}i.prototype.name=r.name,i.prototype.code=e,c8[e]=i}function a8(e,t){if(Array.isArray(e)){let r=e.length;if(e=e.map((n)=>String(n)),r>2)return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1];else if(r===2)return`one of ${t} ${e[0]} or ${e[1]}`;else return`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function Dhe(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function whe(e,t,r){if(r===void 0||r>e.length)r=e.length;return e.substring(r-t.length,r)===t}function Ehe(e,t,r){if(typeof r!=="number")r=0;if(r+t.length>e.length)return!1;else return e.indexOf(t,r)!==-1}Tr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Tr("ERR_INVALID_ARG_TYPE",function(e,t,r){let n;if(typeof t==="string"&&Dhe(t,"not "))n="must not be",t=t.replace(/^not /,"");else n="must be";let i;if(whe(e," argument"))i=`The ${e} ${n} ${a8(t,"type")}`;else{let s=Ehe(e,".")?"property":"argument";i=`The "${e}" ${s} ${n} ${a8(t,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);Tr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Tr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Tr("ERR_STREAM_PREMATURE_CLOSE","Premature close");Tr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Tr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Tr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Tr("ERR_STREAM_WRITE_AFTER_END","write after end");Tr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Tr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Tr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");She.codes=c8});var Oy=h(function(dUe,l8){var Che=ds().codes.ERR_INVALID_OPT_VALUE;function Fhe(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Rhe(e,t,r,n){var i=Fhe(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new Che(s,i)}return Math.floor(i)}return e.objectMode?16:16384}l8.exports={getHighWaterMark:Rhe}});var d8=h(function(fUe,Ay){if(typeof Object.create==="function")Ay.exports=function(t,r){if(r)t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})};else Ay.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var Zs=h(function(pUe,ky){try{if(Nf=xe("util"),typeof Nf.inherits!=="function")throw"";ky.exports=Nf.inherits}catch(e){ky.exports=d8()}var Nf});var p8=h(function(mUe,f8){f8.exports=xe("util").deprecate});var Ty=h(function(hUe,b8){b8.exports=ft;function h8(e){var t=this;this.next=null,this.entry=null,this.finish=function(){rge(t,e)}}var Pa;ft.WritableState=qu;var Ohe={deprecate:p8()},g8=xe("stream"),jf=xe("buffer").Buffer,Ahe=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function khe(e){return jf.from(e)}function Phe(e){return jf.isBuffer(e)||e instanceof Ahe}var Iy=Ry(),Ihe=Oy(),The=Ihe.getHighWaterMark,fs=ds().codes,Nhe=fs.ERR_INVALID_ARG_TYPE,qhe=fs.ERR_METHOD_NOT_IMPLEMENTED,jhe=fs.ERR_MULTIPLE_CALLBACK,Mhe=fs.ERR_STREAM_CANNOT_PIPE,Bhe=fs.ERR_STREAM_DESTROYED,Lhe=fs.ERR_STREAM_NULL_VALUES,Uhe=fs.ERR_STREAM_WRITE_AFTER_END,Vhe=fs.ERR_UNKNOWN_ENCODING,Ia=Iy.errorOrDestroy;Zs()(ft,g8);function zhe(){}function qu(e,t,r){if(Pa=Pa||eo(),e=e||{},typeof r!=="boolean")r=t instanceof Pa;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=The(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){Xhe(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new h8(this)}qu.prototype.getBuffer=function(){var t=this.bufferedRequest,r=[];while(t)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(qu.prototype,"buffer",{get:Ohe.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var qf;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")qf=Function.prototype[Symbol.hasInstance],Object.defineProperty(ft,Symbol.hasInstance,{value:function(t){if(qf.call(this,t))return!0;if(this!==ft)return!1;return t&&t._writableState instanceof qu}});else qf=function(t){return t instanceof this};function ft(e){Pa=Pa||eo();var t=this instanceof Pa;if(!t&&!qf.call(ft,this))return new ft(e);if(this._writableState=new qu(e,this,t),this.writable=!0,e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}g8.call(this)}ft.prototype.pipe=function(){Ia(this,new Mhe)};function Hhe(e,t){var r=new Uhe;Ia(e,r),process.nextTick(t,r)}function Whe(e,t,r,n){var i;if(r===null)i=new Lhe;else if(typeof r!=="string"&&!t.objectMode)i=new Nhe("chunk",["string","Buffer"],r);if(i)return Ia(e,i),process.nextTick(n,i),!1;return!0}ft.prototype.write=function(e,t,r){var n=this._writableState,i=!1,s=!n.objectMode&&Phe(e);if(s&&!jf.isBuffer(e))e=khe(e);if(typeof t==="function")r=t,t=null;if(s)t="buffer";else if(!t)t=n.defaultEncoding;if(typeof r!=="function")r=zhe;if(n.ending)Hhe(this,r);else if(s||Whe(this,n,e,r))n.pendingcb++,i=Khe(this,n,s,e,t,r);return i};ft.prototype.cork=function(){this._writableState.corked++};ft.prototype.uncork=function(){var e=this._writableState;if(e.corked){if(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)y8(this,e)}};ft.prototype.setDefaultEncoding=function(t){if(typeof t==="string")t=t.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Vhe(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(ft.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Ghe(e,t,r){if(!e.objectMode&&e.decodeStrings!==!1&&typeof t==="string")t=jf.from(t,r);return t}Object.defineProperty(ft.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Khe(e,t,r,n,i,s){if(!r){var o=Ghe(t,n,i);if(n!==o)r=!0,i="buffer",n=o}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length<t.highWaterMark;if(!c)t.needDrain=!0;if(t.writing||t.corked){var l=t.lastBufferedRequest;if(t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l)l.next=t.lastBufferedRequest;else t.bufferedRequest=t.lastBufferedRequest;t.bufferedRequestCount+=1}else Py(e,t,!1,a,n,i,s);return c}function Py(e,t,r,n,i,s,o){if(t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed)t.onwrite(new Bhe("write"));else if(r)e._writev(i,t.onwrite);else e._write(i,s,t.onwrite);t.sync=!1}function Yhe(e,t,r,n,i){if(--t.pendingcb,r)process.nextTick(i,n),process.nextTick(Nu,e,t),e._writableState.errorEmitted=!0,Ia(e,n);else i(n),e._writableState.errorEmitted=!0,Ia(e,n),Nu(e,t)}function Jhe(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Xhe(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(typeof i!=="function")throw new jhe;if(Jhe(r),t)Yhe(e,r,n,t,i);else{var s=x8(r)||e.destroyed;if(!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest)y8(e,r);if(n)process.nextTick(m8,e,r,s,i);else m8(e,r,s,i)}}function m8(e,t,r,n){if(!r)Qhe(e,t);t.pendingcb--,n(),Nu(e,t)}function Qhe(e,t){if(t.length===0&&t.needDrain)t.needDrain=!1,e.emit("drain")}function y8(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=Array(n),s=t.corkedRequestsFree;s.entry=r;var o=0,a=!0;while(r){if(i[o]=r,!r.isBuf)a=!1;r=r.next,o+=1}if(i.allBuffers=a,Py(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next)t.corkedRequestsFree=s.next,s.next=null;else t.corkedRequestsFree=new h8(t);t.bufferedRequestCount=0}else{while(r){var{chunk:c,encoding:l,callback:d}=r,f=t.objectMode?1:c.length;if(Py(e,t,!1,f,c,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}if(r===null)t.lastBufferedRequest=null}t.bufferedRequest=r,t.bufferProcessing=!1}ft.prototype._write=function(e,t,r){r(new qhe("_write()"))};ft.prototype._writev=null;ft.prototype.end=function(e,t,r){var n=this._writableState;if(typeof e==="function")r=e,e=null,t=null;else if(typeof t==="function")r=t,t=null;if(e!==null&&e!==void 0)this.write(e,t);if(n.corked)n.corked=1,this.uncork();if(!n.ending)tge(this,n,r);return this};Object.defineProperty(ft.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function x8(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Zhe(e,t){e._final(function(r){if(t.pendingcb--,r)Ia(e,r);t.prefinished=!0,e.emit("prefinish"),Nu(e,t)})}function ege(e,t){if(!t.prefinished&&!t.finalCalled)if(typeof e._final==="function"&&!t.destroyed)t.pendingcb++,t.finalCalled=!0,process.nextTick(Zhe,e,t);else t.prefinished=!0,e.emit("prefinish")}function Nu(e,t){var r=x8(t);if(r){if(ege(e,t),t.pendingcb===0){if(t.finished=!0,e.emit("finish"),t.autoDestroy){var n=e._readableState;if(!n||n.autoDestroy&&n.endEmitted)e.destroy()}}}return r}function tge(e,t,r){if(t.ending=!0,Nu(e,t),r)if(t.finished)process.nextTick(r);else e.once("finish",r);t.ended=!0,e.writable=!1}function rge(e,t,r){var n=e.entry;e.entry=null;while(n){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(ft.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(t){if(!this._writableState)return;this._writableState.destroyed=t}});ft.prototype.destroy=Iy.destroy;ft.prototype._undestroy=Iy.undestroy;ft.prototype._destroy=function(e,t){t(e)}});var eo=h(function(gUe,_8){var nge=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};_8.exports=Nn;var v8=qy(),Ny=Ty();Zs()(Nn,v8);{Mf=nge(Ny.prototype);for(ju=0;ju<Mf.length;ju++)if(Mu=Mf[ju],!Nn.prototype[Mu])Nn.prototype[Mu]=Ny.prototype[Mu]}var Mf,Mu,ju;function Nn(e){if(!(this instanceof Nn))return new Nn(e);if(v8.call(this,e),Ny.call(this,e),this.allowHalfOpen=!0,e){if(e.readable===!1)this.readable=!1;if(e.writable===!1)this.writable=!1;if(e.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",ige)}}Object.defineProperty(Nn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Nn.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Nn.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ige(){if(this._writableState.ended)return;process.nextTick(sge,this)}function sge(e){e.end()}Object.defineProperty(Nn.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(t){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=t,this._writableState.destroyed=t}})});var E8=h(function(jy,w8){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Bf=xe("buffer"),qn=Bf.Buffer;function D8(e,t){for(var r in e)t[r]=e[r]}if(qn.from&&qn.alloc&&qn.allocUnsafe&&qn.allocUnsafeSlow)w8.exports=Bf;else D8(Bf,jy),jy.Buffer=to;function to(e,t,r){return qn(e,t,r)}to.prototype=Object.create(qn.prototype);D8(qn,to);to.from=function(e,t,r){if(typeof e==="number")throw TypeError("Argument must not be a number");return qn(e,t,r)};to.alloc=function(e,t,r){if(typeof e!=="number")throw TypeError("Argument must be a number");var n=qn(e);if(t!==void 0)if(typeof r==="string")n.fill(t,r);else n.fill(t);else n.fill(0);return n};to.allocUnsafe=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return qn(e)};to.allocUnsafeSlow=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return Bf.SlowBuffer(e)}});var Ly=h(function(bge){var By=E8().Buffer,S8=By.isEncoding||function(e){switch(e=""+e,e&&e.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 oge(e){if(!e)return"utf8";var t;while(!0)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function age(e){var t=oge(e);if(typeof t!=="string"&&(By.isEncoding===S8||!S8(e)))throw Error("Unknown encoding: "+e);return t||e}bge.StringDecoder=Bu;function Bu(e){this.encoding=age(e);var t;switch(this.encoding){case"utf16le":this.text=pge,this.end=mge,t=4;break;case"utf8":this.fillLast=lge,t=4;break;case"base64":this.text=hge,this.end=gge,t=3;break;default:this.write=yge,this.end=xge;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=By.allocUnsafe(t)}Bu.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;if(r<e.length)return t?t+this.text(e,r):this.text(e,r);return t||""};Bu.prototype.end=fge;Bu.prototype.text=dge;Bu.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function My(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function cge(e,t,r){var n=t.length-1;if(n<r)return 0;var i=My(t[n]);if(i>=0){if(i>0)e.lastNeed=i-1;return i}if(--n<r||i===-2)return 0;if(i=My(t[n]),i>=0){if(i>0)e.lastNeed=i-2;return i}if(--n<r||i===-2)return 0;if(i=My(t[n]),i>=0){if(i>0)if(i===2)i=0;else e.lastNeed=i-3;return i}return 0}function uge(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}}function lge(e){var t=this.lastTotal-this.lastNeed,r=uge(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function dge(e,t){var r=cge(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function fge(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"\uFFFD";return t}function pge(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function mge(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function hge(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);if(this.lastNeed=3-r,this.lastTotal=3,r===1)this.lastChar[0]=e[e.length-1];else this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1];return e.toString("base64",t,e.length-r)}function gge(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function yge(e){return e.toString(this.encoding)}function xge(e){return e&&e.length?this.write(e):""}});var Lf=h(function(xUe,F8){var $8=ds().codes.ERR_STREAM_PREMATURE_CLOSE;function _ge(e){var t=!1;return function(){if(t)return;t=!0;for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}function Dge(){}function wge(e){return e.setHeader&&typeof e.abort==="function"}function C8(e,t,r){if(typeof t==="function")return C8(e,null,t);if(!t)t={};r=_ge(r||Dge);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,s=function(){if(!e.writable)a()},o=e._writableState&&e._writableState.finished,a=function(){if(i=!1,o=!0,!n)r.call(e)},c=e._readableState&&e._readableState.endEmitted,l=function(){if(n=!1,c=!0,!i)r.call(e)},d=function(g){r.call(e,g)},f=function(){var g;if(n&&!c){if(!e._readableState||!e._readableState.ended)g=new $8;return r.call(e,g)}if(i&&!o){if(!e._writableState||!e._writableState.ended)g=new $8;return r.call(e,g)}},m=function(){e.req.on("finish",a)};if(wge(e))if(e.on("complete",a),e.on("abort",f),e.req)m();else e.on("request",m);else if(i&&!e._writableState)e.on("end",s),e.on("close",s);if(e.on("end",l),e.on("finish",a),t.error!==!1)e.on("error",d);return e.on("close",f),function(){if(e.removeListener("complete",a),e.removeListener("abort",f),e.removeListener("request",m),e.req)e.req.removeListener("finish",a);e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",a),e.removeListener("end",l),e.removeListener("error",d),e.removeListener("close",f)}}F8.exports=C8});var O8=h(function(bUe,R8){var Uf;function ps(e,t,r){if(t=Ege(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function Ege(e){var t=Sge(e,"string");return typeof t==="symbol"?t:String(t)}function Sge(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $ge=Lf(),ms=Symbol("lastResolve"),ro=Symbol("lastReject"),Lu=Symbol("error"),Vf=Symbol("ended"),no=Symbol("lastPromise"),Uy=Symbol("handlePromise"),io=Symbol("stream");function hs(e,t){return{value:e,done:t}}function Cge(e){var t=e[ms];if(t!==null){var r=e[io].read();if(r!==null)e[no]=null,e[ms]=null,e[ro]=null,t(hs(r,!1))}}function Fge(e){process.nextTick(Cge,e)}function Rge(e,t){return function(r,n){e.then(function(){if(t[Vf]){r(hs(void 0,!0));return}t[Uy](r,n)},n)}}var Oge=Object.getPrototypeOf(function(){}),Age=Object.setPrototypeOf((Uf={get stream(){return this[io]},next:function(){var t=this,r=this[Lu];if(r!==null)return Promise.reject(r);if(this[Vf])return Promise.resolve(hs(void 0,!0));if(this[io].destroyed)return new Promise(function(o,a){process.nextTick(function(){if(t[Lu])a(t[Lu]);else o(hs(void 0,!0))})});var n=this[no],i;if(n)i=new Promise(Rge(n,this));else{var s=this[io].read();if(s!==null)return Promise.resolve(hs(s,!1));i=new Promise(this[Uy])}return this[no]=i,i}},ps(Uf,Symbol.asyncIterator,function(){return this}),ps(Uf,"return",function(){var t=this;return new Promise(function(r,n){t[io].destroy(null,function(i){if(i){n(i);return}r(hs(void 0,!0))})})}),Uf),Oge),kge=function(t){var r,n=Object.create(Age,(r={},ps(r,io,{value:t,writable:!0}),ps(r,ms,{value:null,writable:!0}),ps(r,ro,{value:null,writable:!0}),ps(r,Lu,{value:null,writable:!0}),ps(r,Vf,{value:t._readableState.endEmitted,writable:!0}),ps(r,Uy,{value:function(s,o){var a=n[io].read();if(a)n[no]=null,n[ms]=null,n[ro]=null,s(hs(a,!1));else n[ms]=s,n[ro]=o},writable:!0}),r));return n[no]=null,$ge(t,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=n[ro];if(s!==null)n[no]=null,n[ms]=null,n[ro]=null,s(i);n[Lu]=i;return}var o=n[ms];if(o!==null)n[no]=null,n[ms]=null,n[ro]=null,o(hs(void 0,!0));n[Vf]=!0}),t.on("readable",Fge.bind(null,n)),n};R8.exports=kge});var I8=h(function(vUe,P8){function A8(e,t,r,n,i,s,o){try{var a=e[s](o),c=a.value}catch(l){r(l);return}if(a.done)t(c);else Promise.resolve(c).then(n,i)}function Pge(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var s=e.apply(t,r);function o(c){A8(s,n,i,o,a,"next",c)}function a(c){A8(s,n,i,o,a,"throw",c)}o(void 0)})}}function k8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ige(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k8(Object(r),!0).forEach(function(n){Tge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k8(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tge(e,t,r){if(t=Nge(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function Nge(e){var t=qge(e,"string");return typeof t==="symbol"?t:String(t)}function qge(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jge=ds().codes.ERR_INVALID_ARG_TYPE;function Mge(e,t,r){var n;if(t&&typeof t.next==="function")n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new jge("iterable",["Iterable"],t);var i=new e(Ige({objectMode:!0},r)),s=!1;i._read=function(){if(!s)s=!0,o()};function o(){return a.apply(this,arguments)}function a(){return a=Pge(function*(){try{var c=yield n.next(),l=c.value,d=c.done;if(d)i.push(null);else if(i.push(yield l))o();else s=!1}catch(f){i.destroy(f)}}),a.apply(this,arguments)}return i}P8.exports=Mge});var qy=h(function(DUe,z8){z8.exports=ke;var Ta;ke.ReadableState=j8;var _Ue=xe("events").EventEmitter,q8=function(t,r){return t.listeners(r).length},Vu=xe("stream"),zf=xe("buffer").Buffer,Bge=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Lge(e){return zf.from(e)}function Uge(e){return zf.isBuffer(e)||e instanceof Bge}var Vy=xe("util"),ye;if(Vy&&Vy.debuglog)ye=Vy.debuglog("stream");else ye=function(){};var Vge=i8(),Jy=Ry(),zge=Oy(),Hge=zge.getHighWaterMark,Hf=ds().codes,Wge=Hf.ERR_INVALID_ARG_TYPE,Gge=Hf.ERR_STREAM_PUSH_AFTER_EOF,Kge=Hf.ERR_METHOD_NOT_IMPLEMENTED,Yge=Hf.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Na,zy,Hy;Zs()(ke,Vu);var Uu=Jy.errorOrDestroy,Wy=["error","close","destroy","pause","resume"];function Jge(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(Array.isArray(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function j8(e,t,r){if(Ta=Ta||eo(),e=e||{},typeof r!=="boolean")r=t instanceof Ta;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.readableObjectMode;if(this.highWaterMark=Hge(this,e,"readableHighWaterMark",r),this.buffer=new Vge,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=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding){if(!Na)Na=Ly().StringDecoder;this.decoder=new Na(e.encoding),this.encoding=e.encoding}}function ke(e){if(Ta=Ta||eo(),!(this instanceof ke))return new ke(e);var t=this instanceof Ta;if(this._readableState=new j8(e,this,t),this.readable=!0,e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}Vu.call(this)}Object.defineProperty(ke.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(t){if(!this._readableState)return;this._readableState.destroyed=t}});ke.prototype.destroy=Jy.destroy;ke.prototype._undestroy=Jy.undestroy;ke.prototype._destroy=function(e,t){t(e)};ke.prototype.push=function(e,t){var r=this._readableState,n;if(!r.objectMode){if(typeof e==="string"){if(t=t||r.defaultEncoding,t!==r.encoding)e=zf.from(e,t),t="";n=!0}}else n=!0;return M8(this,e,t,!1,n)};ke.prototype.unshift=function(e){return M8(this,e,null,!0,!1)};function M8(e,t,r,n,i){ye("readableAddChunk",t);var s=e._readableState;if(t===null)s.reading=!1,Zge(e,s);else{var o;if(!i)o=Xge(s,t);if(o)Uu(e,o);else if(s.objectMode||t&&t.length>0){if(typeof t!=="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==zf.prototype)t=Lge(t);if(n)if(s.endEmitted)Uu(e,new Yge);else Gy(e,s,t,!0);else if(s.ended)Uu(e,new Gge);else if(s.destroyed)return!1;else if(s.reading=!1,s.decoder&&!r)if(t=s.decoder.write(t),s.objectMode||t.length!==0)Gy(e,s,t,!1);else Yy(e,s);else Gy(e,s,t,!1)}else if(!n)s.reading=!1,Yy(e,s)}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Gy(e,t,r,n){if(t.flowing&&t.length===0&&!t.sync)t.awaitDrain=0,e.emit("data",r);else{if(t.length+=t.objectMode?1:r.length,n)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)Wf(e)}Yy(e,t)}function Xge(e,t){var r;if(!Uge(t)&&typeof t!=="string"&&t!==void 0&&!e.objectMode)r=new Wge("chunk",["string","Buffer","Uint8Array"],t);return r}ke.prototype.isPaused=function(){return this._readableState.flowing===!1};ke.prototype.setEncoding=function(e){if(!Na)Na=Ly().StringDecoder;var t=new Na(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var r=this._readableState.buffer.head,n="";while(r!==null)n+=t.write(r.data),r=r.next;if(this._readableState.buffer.clear(),n!=="")this._readableState.buffer.push(n);return this._readableState.length=n.length,this};var T8=1073741824;function Qge(e){if(e>=T8)e=T8;else e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++;return e}function N8(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;if(e>t.highWaterMark)t.highWaterMark=Qge(e);if(e<=t.length)return e;if(!t.ended)return t.needReadable=!0,0;return t.length}ke.prototype.read=function(e){ye("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0)t.emittedReadable=!1;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){if(ye("read: emitReadable",t.length,t.ended),t.length===0&&t.ended)Ky(this);else Wf(this);return null}if(e=N8(e,t),e===0&&t.ended){if(t.length===0)Ky(this);return null}var n=t.needReadable;if(ye("need readable",n),t.length===0||t.length-e<t.highWaterMark)n=!0,ye("length less than watermark",n);if(t.ended||t.reading)n=!1,ye("reading or ended",n);else if(n){if(ye("do read"),t.reading=!0,t.sync=!0,t.length===0)t.needReadable=!0;if(this._read(t.highWaterMark),t.sync=!1,!t.reading)e=N8(r,t)}var i;if(e>0)i=U8(e,t);else i=null;if(i===null)t.needReadable=t.length<=t.highWaterMark,e=0;else t.length-=e,t.awaitDrain=0;if(t.length===0){if(!t.ended)t.needReadable=!0;if(r!==e&&t.ended)Ky(this)}if(i!==null)this.emit("data",i);return i};function Zge(e,t){if(ye("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length)t.buffer.push(r),t.length+=t.objectMode?1:r.length}if(t.ended=!0,t.sync)Wf(e);else if(t.needReadable=!1,!t.emittedReadable)t.emittedReadable=!0,B8(e)}function Wf(e){var t=e._readableState;if(ye("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,!t.emittedReadable)ye("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(B8,e)}function B8(e){var t=e._readableState;if(ye("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended))e.emit("readable"),t.emittedReadable=!1;t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Xy(e)}function Yy(e,t){if(!t.readingMore)t.readingMore=!0,process.nextTick(eye,e,t)}function eye(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0)){var r=t.length;if(ye("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}ke.prototype._read=function(e){Uu(this,new Kge("_read()"))};ke.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,ye("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,s=i?a:y;if(n.endEmitted)process.nextTick(s);else r.once("end",s);e.on("unpipe",o);function o(x,v){if(ye("onunpipe"),x===r){if(v&&v.hasUnpiped===!1)v.hasUnpiped=!0,d()}}function a(){ye("onend"),e.end()}var c=tye(r);e.on("drain",c);var l=!1;function d(){if(ye("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",c),e.removeListener("error",m),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",y),r.removeListener("data",f),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain))c()}r.on("data",f);function f(x){ye("ondata");var v=e.write(x);if(ye("dest.write",v),v===!1){if((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&V8(n.pipes,e)!==-1)&&!l)ye("false write response, pause",n.awaitDrain),n.awaitDrain++;r.pause()}}function m(x){if(ye("onerror",x),y(),e.removeListener("error",m),q8(e,"error")===0)Uu(e,x)}Jge(e,"error",m);function p(){e.removeListener("finish",g),y()}e.once("close",p);function g(){ye("onfinish"),e.removeListener("close",p),y()}e.once("finish",g);function y(){ye("unpipe"),r.unpipe(e)}if(e.emit("pipe",r),!n.flowing)ye("pipe resume"),r.resume();return e};function tye(e){return function(){var r=e._readableState;if(ye("pipeOnDrain",r.awaitDrain),r.awaitDrain)r.awaitDrain--;if(r.awaitDrain===0&&q8(e,"data"))r.flowing=!0,Xy(e)}}ke.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;if(t.pipes=null,t.pipesCount=0,t.flowing=!1,e)e.emit("unpipe",this,r);return this}if(!e){var{pipes:n,pipesCount:i}=t;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=V8(t.pipes,e);if(o===-1)return this;if(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1)t.pipes=t.pipes[0];return e.emit("unpipe",this,r),this};ke.prototype.on=function(e,t){var r=Vu.prototype.on.call(this,e,t),n=this._readableState;if(e==="data"){if(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1)this.resume()}else if(e==="readable"){if(!n.endEmitted&&!n.readableListening){if(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,ye("on readable",n.length,n.reading),n.length)Wf(this);else if(!n.reading)process.nextTick(rye,this)}}return r};ke.prototype.addListener=ke.prototype.on;ke.prototype.removeListener=function(e,t){var r=Vu.prototype.removeListener.call(this,e,t);if(e==="readable")process.nextTick(L8,this);return r};ke.prototype.removeAllListeners=function(e){var t=Vu.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===void 0)process.nextTick(L8,this);return t};function L8(e){var t=e._readableState;if(t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused)t.flowing=!0;else if(e.listenerCount("data")>0)e.resume()}function rye(e){ye("readable nexttick read 0"),e.read(0)}ke.prototype.resume=function(){var e=this._readableState;if(!e.flowing)ye("resume"),e.flowing=!e.readableListening,nye(this,e);return e.paused=!1,this};function nye(e,t){if(!t.resumeScheduled)t.resumeScheduled=!0,process.nextTick(iye,e,t)}function iye(e,t){if(ye("resume",t.reading),!t.reading)e.read(0);if(t.resumeScheduled=!1,e.emit("resume"),Xy(e),t.flowing&&!t.reading)e.read(0)}ke.prototype.pause=function(){if(ye("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)ye("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function Xy(e){var t=e._readableState;ye("flow",t.flowing);while(t.flowing&&e.read()!==null);}ke.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(ye("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();if(o&&o.length)t.push(o)}t.push(null)}),e.on("data",function(o){if(ye("wrapped data"),r.decoder)o=r.decoder.write(o);if(r.objectMode&&(o===null||o===void 0))return;else if(!r.objectMode&&(!o||!o.length))return;var a=t.push(o);if(!a)n=!0,e.pause()});for(var i in e)if(this[i]===void 0&&typeof e[i]==="function")this[i]=function(a){return function(){return e[a].apply(e,arguments)}}(i);for(var s=0;s<Wy.length;s++)e.on(Wy[s],this.emit.bind(this,Wy[s]));return this._read=function(o){if(ye("wrapped _read",o),n)n=!1,e.resume()},this};if(typeof Symbol==="function")ke.prototype[Symbol.asyncIterator]=function(){if(zy===void 0)zy=O8();return zy(this)};Object.defineProperty(ke.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(ke.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(ke.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){if(this._readableState)this._readableState.flowing=t}});ke._fromList=U8;Object.defineProperty(ke.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function U8(e,t){if(t.length===0)return null;var r;if(t.objectMode)r=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else r=t.buffer.consume(e,t.decoder);return r}function Ky(e){var t=e._readableState;if(ye("endReadable",t.endEmitted),!t.endEmitted)t.ended=!0,process.nextTick(sye,t,e)}function sye(e,t){if(ye("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished)t.destroy()}}}if(typeof Symbol==="function")ke.from=function(e,t){if(Hy===void 0)Hy=I8();return Hy(ke,e,t)};function V8(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var Qy=h(function(wUe,W8){W8.exports=mi;var Gf=ds().codes,oye=Gf.ERR_METHOD_NOT_IMPLEMENTED,aye=Gf.ERR_MULTIPLE_CALLBACK,cye=Gf.ERR_TRANSFORM_ALREADY_TRANSFORMING,uye=Gf.ERR_TRANSFORM_WITH_LENGTH_0,Kf=eo();Zs()(mi,Kf);function lye(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new aye);if(r.writechunk=null,r.writecb=null,t!=null)this.push(t);n(e);var i=this._readableState;if(i.reading=!1,i.needReadable||i.length<i.highWaterMark)this._read(i.highWaterMark)}function mi(e){if(!(this instanceof mi))return new mi(e);if(Kf.call(this,e),this._transformState={afterTransform:lye.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",dye)}function dye(){var e=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(t,r){H8(e,t,r)});else H8(this,null,null)}mi.prototype.push=function(e,t){return this._transformState.needTransform=!1,Kf.prototype.push.call(this,e,t)};mi.prototype._transform=function(e,t,r){r(new oye("_transform()"))};mi.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;if(n.needTransform||i.needReadable||i.length<i.highWaterMark)this._read(i.highWaterMark)}};mi.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&!t.transforming)t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform);else t.needTransform=!0};mi.prototype._destroy=function(e,t){Kf.prototype._destroy.call(this,e,function(r){t(r)})};function H8(e,t,r){if(t)return e.emit("error",t);if(r!=null)e.push(r);if(e._writableState.length)throw new uye;if(e._transformState.transforming)throw new cye;return e.push(null)}});var Y8=h(function(EUe,K8){K8.exports=zu;var G8=Qy();Zs()(zu,G8);function zu(e){if(!(this instanceof zu))return new zu(e);G8.call(this,e)}zu.prototype._transform=function(e,t,r){r(null,e)}});var e4=h(function(SUe,Z8){var Zy;function fye(e){var t=!1;return function(){if(t)return;t=!0,e.apply(void 0,arguments)}}var Q8=ds().codes,pye=Q8.ERR_MISSING_ARGS,mye=Q8.ERR_STREAM_DESTROYED;function J8(e){if(e)throw e}function hye(e){return e.setHeader&&typeof e.abort==="function"}function gye(e,t,r,n){n=fye(n);var i=!1;if(e.on("close",function(){i=!0}),Zy===void 0)Zy=Lf();Zy(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(i)return;if(s)return;if(s=!0,hye(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();n(o||new mye("pipe"))}}function X8(e){e()}function yye(e,t){return e.pipe(t)}function xye(e){if(!e.length)return J8;if(typeof e[e.length-1]!=="function")return J8;return e.pop()}function bye(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=xye(t);if(Array.isArray(t[0]))t=t[0];if(t.length<2)throw new pye("streams");var i,s=t.map(function(o,a){var c=a<t.length-1,l=a>0;return gye(o,c,l,function(d){if(!i)i=d;if(d)s.forEach(X8);if(c)return;s.forEach(X8),n(i)})});return t.reduce(yye)}Z8.exports=bye});var t4=h(function(Nr,Wu){var Hu=xe("stream");if(process.env.READABLE_STREAM==="disable"&&Hu)Wu.exports=Hu.Readable,Object.assign(Wu.exports,Hu),Wu.exports.Stream=Hu;else Nr=Wu.exports=qy(),Nr.Stream=Hu||Nr,Nr.Readable=Nr,Nr.Writable=Ty(),Nr.Duplex=eo(),Nr.Transform=Qy(),Nr.PassThrough=Y8(),Nr.finished=Lf(),Nr.pipeline=e4()});var i4=h(function($Ue,n4){var{Buffer:Zr}=xe("buffer"),r4=Symbol.for("BufferList");function Ye(e){if(!(this instanceof Ye))return new Ye(e);Ye._init.call(this,e)}Ye._init=function(t){if(Object.defineProperty(this,r4,{value:!0}),this._bufs=[],this.length=0,t)this.append(t)};Ye.prototype._new=function(t){return new Ye(t)};Ye.prototype._offset=function(t){if(t===0)return[0,0];let r=0;for(let n=0;n<this._bufs.length;n++){let i=r+this._bufs[n].length;if(t<i||n===this._bufs.length-1)return[n,t-r];r=i}};Ye.prototype._reverseOffset=function(e){let t=e[0],r=e[1];for(let n=0;n<t;n++)r+=this._bufs[n].length;return r};Ye.prototype.get=function(t){if(t>this.length||t<0)return;let r=this._offset(t);return this._bufs[r[0]][r[1]]};Ye.prototype.slice=function(t,r){if(typeof t==="number"&&t<0)t+=this.length;if(typeof r==="number"&&r<0)r+=this.length;return this.copy(null,0,t,r)};Ye.prototype.copy=function(t,r,n,i){if(typeof n!=="number"||n<0)n=0;if(typeof i!=="number"||i>this.length)i=this.length;if(n>=this.length)return t||Zr.alloc(0);if(i<=0)return t||Zr.alloc(0);let s=!!t,o=this._offset(n),a=i-n,c=a,l=s&&r||0,d=o[1];if(n===0&&i===this.length){if(!s)return this._bufs.length===1?this._bufs[0]:Zr.concat(this._bufs,this.length);for(let f=0;f<this._bufs.length;f++)this._bufs[f].copy(t,l),l+=this._bufs[f].length;return t}if(c<=this._bufs[o[0]].length-d)return s?this._bufs[o[0]].copy(t,r,d,d+c):this._bufs[o[0]].slice(d,d+c);if(!s)t=Zr.allocUnsafe(a);for(let f=o[0];f<this._bufs.length;f++){let m=this._bufs[f].length-d;if(c>m)this._bufs[f].copy(t,l,d),l+=m;else{this._bufs[f].copy(t,l,d,d+c),l+=m;break}if(c-=m,d)d=0}if(t.length>l)return t.slice(0,l);return t};Ye.prototype.shallowSlice=function(t,r){if(t=t||0,r=typeof r!=="number"?this.length:r,t<0)t+=this.length;if(r<0)r+=this.length;if(t===r)return this._new();let n=this._offset(t),i=this._offset(r),s=this._bufs.slice(n[0],i[0]+1);if(i[1]===0)s.pop();else s[s.length-1]=s[s.length-1].slice(0,i[1]);if(n[1]!==0)s[0]=s[0].slice(n[1]);return this._new(s)};Ye.prototype.toString=function(t,r,n){return this.slice(r,n).toString(t)};Ye.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;while(this._bufs.length)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};Ye.prototype.duplicate=function(){let t=this._new();for(let r=0;r<this._bufs.length;r++)t.append(this._bufs[r]);return t};Ye.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(Zr.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let r=0;r<t.length;r++)this.append(t[r]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else{if(typeof t==="number")t=t.toString();this._appendBuffer(Zr.from(t))}return this};Ye.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};Ye.prototype.indexOf=function(e,t,r){if(r===void 0&&typeof t==="string")r=t,t=void 0;if(typeof e==="function"||Array.isArray(e))throw TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');else if(typeof e==="number")e=Zr.from([e]);else if(typeof e==="string")e=Zr.from(e,r);else if(this._isBufferList(e))e=e.slice();else if(Array.isArray(e.buffer))e=Zr.from(e.buffer,e.byteOffset,e.byteLength);else if(!Zr.isBuffer(e))e=Zr.from(e);if(t=Number(t||0),isNaN(t))t=0;if(t<0)t=this.length+t;if(t<0)t=0;if(e.length===0)return t>this.length?this.length:t;let n=this._offset(t),i=n[0],s=n[1];for(;i<this._bufs.length;i++){let o=this._bufs[i];while(s<o.length)if(o.length-s>=e.length){let c=o.indexOf(e,s);if(c!==-1)return this._reverseOffset([i,c]);s=o.length-e.length+1}else{let c=this._reverseOffset([i,s]);if(this._match(c,e))return c;s++}s=0}return-1};Ye.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0};(function(){let e={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 t in e)(function(r){if(e[r]===null)Ye.prototype[r]=function(n,i){return this.slice(n,n+i)[r](0,i)};else Ye.prototype[r]=function(n=0){return this.slice(n,n+e[r])[r](0)}})(t)})();Ye.prototype._isBufferList=function(t){return t instanceof Ye||Ye.isBufferList(t)};Ye.isBufferList=function(t){return t!=null&&t[r4]};n4.exports=Ye});var s4=h(function(CUe,Yf){var ex=t4().Duplex,vye=Zs(),Gu=i4();function Tt(e){if(!(this instanceof Tt))return new Tt(e);if(typeof e==="function"){this._callback=e;let t=function(n){if(this._callback)this._callback(n),this._callback=null}.bind(this);this.on("pipe",function(n){n.on("error",t)}),this.on("unpipe",function(n){n.removeListener("error",t)}),e=null}Gu._init.call(this,e),ex.call(this)}vye(Tt,ex);Object.assign(Tt.prototype,Gu.prototype);Tt.prototype._new=function(t){return new Tt(t)};Tt.prototype._write=function(t,r,n){if(this._appendBuffer(t),typeof n==="function")n()};Tt.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};Tt.prototype.end=function(t){if(ex.prototype.end.call(this,t),this._callback)this._callback(null,this.slice()),this._callback=null};Tt.prototype._destroy=function(t,r){this._bufs.length=0,this.length=0,r(t)};Tt.prototype._isBufferList=function(t){return t instanceof Tt||t instanceof Gu||Tt.isBufferList(t)};Tt.isBufferList=Gu.isBufferList;Yf.exports=Tt;Yf.exports.BufferListStream=Tt;Yf.exports.BufferList=Gu});var c4=h(function(FUe,ix){var _ye=xe("readline"),Dye=by(),o4=TP(),Jf=kf(),Xf=LP(),wye=Fu(),Eye=JP(),Sye=QP(),$ye=Sy(),{BufferListStream:Cye}=s4(),tx=Symbol("text"),rx=Symbol("prefixText");class a4{constructor(){this.requests=0,this.mutedStream=new Cye,this.mutedStream.pipe(process.stdout);let e=this;this.ourEmit=function(t,r,...n){let{stdin:i}=process;if(e.requests>0||i.emit===e.ourEmit){if(t==="keypress")return;if(t==="data"&&r.includes(3))process.emit("SIGINT");Reflect.apply(e.oldEmit,this,[t,r,...n])}else Reflect.apply(process.stdin.emit,this,[t,r,...n])}}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=_ye.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 Qf;class nx{constructor(e){if(!Qf)Qf=new a4;if(typeof e==="string")e={text:e};this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:!0,...e},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:Sye({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(e=0){if(!(e>=0&&Number.isInteger(e)))throw Error("The `indent` option must be an integer from 0 and up");this._indent=e}_updateInterval(e){if(e!==void 0)this.interval=e}get spinner(){return this._spinner}set spinner(e){if(this.frameIndex=0,typeof e==="object"){if(e.frames===void 0)throw Error("The given spinner must have a `frames` property");this._spinner=e}else if(!$ye())this._spinner=Jf.line;else if(e===void 0)this._spinner=Jf.dots;else if(e!=="default"&&Jf[e])this._spinner=Jf[e];else throw Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);this._updateInterval(this._spinner.interval)}get text(){return this[tx]}set text(e){this[tx]=e,this.updateLineCount()}get prefixText(){return this[rx]}set prefixText(e){this[rx]=e,this.updateLineCount()}get isSpinning(){return this.id!==void 0}getFullPrefixText(e=this[rx],t=" "){if(typeof e==="string")return e+t;if(typeof e==="function")return e()+t;return""}updateLineCount(){let e=this.stream.columns||80,t=this.getFullPrefixText(this.prefixText,"-");this.lineCount=0;for(let r of wye(t+"--"+this[tx]).split(`
|
|
45
|
+
`);if(s!==-1)t=Kme(t,i,n,s);return n+t+i},hy,wP=(e,...t)=>{let[r]=t;if(!_f(r)||!_f(r.raw))return t.join(" ");let n=t.slice(1),i=[r.raw[0]];for(let s=1;s<r.length;s++)i.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[s]));if(hy===void 0)hy=yP();return hy(e,i.join(""))};Object.defineProperties(Df.prototype,Oa);var Ef=Df();Ef.supportsColor=gy;Ef.stderr=Df({level:yy?yy.level:0});Ef.stderr.supportsColor=yy;EP.exports=Ef});var $P=h(function(KLe,vy){var SP=(e,t)=>{for(let r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};vy.exports=SP;vy.exports.default=SP});var FP=h(function(YLe,$f){var Xme=$P(),Sf=new WeakMap,CP=(e,t={})=>{if(typeof e!=="function")throw TypeError("Expected a function");let r,n=0,i=e.displayName||e.name||"<anonymous>",s=function(...o){if(Sf.set(s,++n),n===1)r=e.apply(this,o),e=null;else if(t.throw===!0)throw Error(`Function \`${i}\` can only be called once`);return r};return Xme(s,e),Sf.set(s,n),s};$f.exports=CP;$f.exports.default=CP;$f.exports.callCount=(e)=>{if(!Sf.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Sf.get(e)}});var RP=h(function(JLe,Cf){Cf.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")Cf.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")Cf.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var OP=h(function(XLe,ka){var st=global.process,Js=function(e){return e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function"};if(!Js(st))ka.exports=function(){return function(){}};else{if(_y=xe("assert"),Xs=RP(),Dy=/^win/i.test(st.platform),Aa=xe("events"),typeof Aa!=="function")Aa=Aa.EventEmitter;if(st.__signal_exit_emitter__)xt=st.__signal_exit_emitter__;else xt=st.__signal_exit_emitter__=new Aa,xt.count=0,xt.emitted={};if(!xt.infinite)xt.setMaxListeners(1/0),xt.infinite=!0;ka.exports=function(e,t){if(!Js(global.process))return function(){};if(_y.equal(typeof e,"function","a callback must be provided for exit handler"),Qs===!1)Ff();var r="exit";if(t&&t.alwaysLast)r="afterexit";var n=function(){if(xt.removeListener(r,e),xt.listeners("exit").length===0&&xt.listeners("afterexit").length===0)ku()};return xt.on(r,e),n},ku=function(){if(!Qs||!Js(global.process))return;Qs=!1,Xs.forEach(function(t){try{st.removeListener(t,Pu[t])}catch(r){}}),st.emit=Iu,st.reallyExit=Rf,xt.count-=1},ka.exports.unload=ku,us=function(t,r,n){if(xt.emitted[t])return;xt.emitted[t]=!0,xt.emit(t,r,n)},Pu={},Xs.forEach(function(e){Pu[e]=function(){if(!Js(global.process))return;var r=st.listeners(e);if(r.length===xt.count){if(ku(),us("exit",null,e),us("afterexit",null,e),Dy&&e==="SIGHUP")e="SIGINT";st.kill(st.pid,e)}}}),ka.exports.signals=function(){return Xs},Qs=!1,Ff=function(){if(Qs||!Js(global.process))return;Qs=!0,xt.count+=1,Xs=Xs.filter(function(t){try{return st.on(t,Pu[t]),!0}catch(r){return!1}}),st.emit=Ey,st.reallyExit=wy},ka.exports.load=Ff,Rf=st.reallyExit,wy=function(t){if(!Js(global.process))return;st.exitCode=t||0,us("exit",st.exitCode,null),us("afterexit",st.exitCode,null),Rf.call(st,st.exitCode)},Iu=st.emit,Ey=function(t,r){if(t==="exit"&&Js(global.process)){if(r!==void 0)st.exitCode=r;var n=Iu.apply(this,arguments);return us("exit",st.exitCode,null),us("afterexit",st.exitCode,null),n}else return Iu.apply(this,arguments)}}var _y,Xs,Dy,Aa,xt,ku,us,Pu,Qs,Ff,Rf,wy,Iu,Ey});var kP=h(function(QLe,AP){var Qme=FP(),Zme=OP();AP.exports=Qme(()=>{Zme(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})})});var TP=h(function(the){var ehe=kP(),Of=!1;the.show=(e=process.stderr)=>{if(!e.isTTY)return;Of=!1,e.write("\x1B[?25h")};the.hide=(e=process.stderr)=>{if(!e.isTTY)return;ehe(),Of=!0,e.write("\x1B[?25l")};the.toggle=(e,t)=>{if(e!==void 0)Of=e;if(Of)the.show(t);else the.hide(t)}});var NP=h(function(eUe,nhe){nhe.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 kf=h(function(tUe,jP){var Af=Object.assign({},NP()),qP=Object.keys(Af);Object.defineProperty(Af,"random",{get(){let e=Math.floor(Math.random()*qP.length),t=qP[e];return Af[t]}});jP.exports=Af});var Sy=h(function(rUe,MP){MP.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 LP=h(function(nUe,BP){var ls=by(),ihe=Sy(),she={info:ls.blue("\u2139"),success:ls.green("\u2714"),warning:ls.yellow("\u26A0"),error:ls.red("\u2716")},ohe={info:ls.blue("i"),success:ls.green("\u221A"),warning:ls.yellow("\u203C"),error:ls.red("\xD7")};BP.exports=ihe()?she:ohe});var UP=h(function(iUe,Pf){var ahe=function(){function e(o,a,c,l){var d;if(typeof a==="object")c=a.depth,l=a.prototype,d=a.filter,a=a.circular;var f=[],m=[],p=typeof Buffer<"u";if(typeof a>"u")a=!0;if(typeof c>"u")c=1/0;function g(y,x){if(y===null)return null;if(x==0)return y;var v,_;if(typeof y!="object")return y;if(e.__isArray(y))v=[];else if(e.__isRegExp(y)){if(v=new RegExp(y.source,s(y)),y.lastIndex)v.lastIndex=y.lastIndex}else if(e.__isDate(y))v=new Date(y.getTime());else if(p&&Buffer.isBuffer(y)){if(Buffer.allocUnsafe)v=Buffer.allocUnsafe(y.length);else v=new Buffer(y.length);return y.copy(v),v}else if(typeof l>"u")_=Object.getPrototypeOf(y),v=Object.create(_);else v=Object.create(l),_=l;if(a){var S=f.indexOf(y);if(S!=-1)return m[S];f.push(y),m.push(v)}for(var C in y){var D;if(_)D=Object.getOwnPropertyDescriptor(_,C);if(D&&D.set==null)continue;v[C]=g(y[C],x-1)}return v}return g(o,c)}e.clonePrototype=function(a){if(a===null)return null;var c=function(){};return c.prototype=a,new c};function t(o){return Object.prototype.toString.call(o)}e.__objToStr=t;function r(o){return typeof o==="object"&&t(o)==="[object Date]"}e.__isDate=r;function n(o){return typeof o==="object"&&t(o)==="[object Array]"}e.__isArray=n;function i(o){return typeof o==="object"&&t(o)==="[object RegExp]"}e.__isRegExp=i;function s(o){var a="";if(o.global)a+="g";if(o.ignoreCase)a+="i";if(o.multiline)a+="m";return a}return e.__getRegExpFlags=s,e}();if(typeof Pf==="object"&&Pf.exports)Pf.exports=ahe});var zP=h(function(sUe,VP){var che=UP();VP.exports=function(e,t){return e=e||{},Object.keys(t).forEach(function(r){if(typeof e[r]>"u")e[r]=che(t[r])}),e}});var WP=h(function(oUe,HP){HP.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 JP=h(function(aUe,$y){var uhe=zP(),Tu=WP(),KP={nul:0,control:0};$y.exports=function(t){return YP(t,KP)};$y.exports.config=function(e){return e=uhe(e||{},KP),function(r){return YP(r,e)}};function YP(e,t){if(typeof e!=="string")return GP(e,t);var r=0;for(var n=0;n<e.length;n++){var i=GP(e.charCodeAt(n),t);if(i<0)return-1;r+=i}return r}function GP(e,t){if(e===0)return t.nul;if(e<32||e>=127&&e<160)return t.control;if(lhe(e))return 0;return 1+(e>=4352&&(e<=4447||e==9001||e==9002||e>=11904&&e<=42191&&e!=12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))}function lhe(e){var t=0,r=Tu.length-1,n;if(e<Tu[0][0]||e>Tu[r][1])return!1;while(r>=t)if(n=Math.floor((t+r)/2),e>Tu[n][1])t=n+1;else if(e<Tu[n][0])r=n-1;else return!0;return!1}});var QP=h(function(cUe,XP){XP.exports=({stream:e=process.stdout}={})=>Boolean(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))});var i8=h(function(uUe,n8){function ZP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function e8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZP(Object(r),!0).forEach(function(n){dhe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dhe(e,t,r){if(t=r8(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function fhe(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function t8(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n)n.writable=!0;Object.defineProperty(e,r8(n.key),n)}}function phe(e,t,r){if(t)t8(e.prototype,t);if(r)t8(e,r);return Object.defineProperty(e,"prototype",{writable:!1}),e}function r8(e){var t=mhe(e,"string");return typeof t==="symbol"?t:String(t)}function mhe(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hhe=xe("buffer"),If=hhe.Buffer,ghe=xe("util"),Cy=ghe.inspect,yhe=Cy&&Cy.custom||"inspect";function xhe(e,t,r){If.prototype.copy.call(e,t,r)}n8.exports=function(){function e(){fhe(this,e),this.head=null,this.tail=null,this.length=0}return phe(e,[{key:"push",value:function(r){var n={data:r,next:null};if(this.length>0)this.tail.next=n;else this.head=n;this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};if(this.length===0)this.tail=n;this.head=n,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var r=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,r}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";var n=this.head,i=""+n.data;while(n=n.next)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return If.alloc(0);var n=If.allocUnsafe(r>>>0),i=this.head,s=0;while(i)xhe(i.data,n,s),s+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;if(r<this.head.data.length)i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r);else if(r===this.head.data.length)i=this.shift();else i=n?this._getString(r):this._getBuffer(r);return i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,s=n.data;r-=s.length;while(n=n.next){var o=n.data,a=r>o.length?o.length:r;if(a===o.length)s+=o;else s+=o.slice(0,r);if(r-=a,r===0){if(a===o.length)if(++i,n.next)this.head=n.next;else this.head=this.tail=null;else this.head=n,n.data=o.slice(a);break}++i}return this.length-=i,s}},{key:"_getBuffer",value:function(r){var n=If.allocUnsafe(r),i=this.head,s=1;i.data.copy(n),r-=i.data.length;while(i=i.next){var o=i.data,a=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,a),r-=a,r===0){if(a===o.length)if(++s,i.next)this.head=i.next;else this.head=this.tail=null;else this.head=i,i.data=o.slice(a);break}++s}return this.length-=s,n}},{key:yhe,value:function(r,n){return Cy(this,e8(e8({},n),{},{depth:0,customInspect:!1}))}}]),e}()});var Ry=h(function(lUe,o8){function bhe(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;if(n||i){if(t)t(e);else if(e){if(!this._writableState)process.nextTick(Fy,this,e);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,process.nextTick(Fy,this,e)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(e||null,function(s){if(!t&&s)if(!r._writableState)process.nextTick(s8,r,s);else if(!r._writableState.errorEmitted)r._writableState.errorEmitted=!0,process.nextTick(s8,r,s);else process.nextTick(Tf,r);else if(t)process.nextTick(Tf,r),t(s);else process.nextTick(Tf,r)}),this}function s8(e,t){Fy(e,t),Tf(e)}function Tf(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function vhe(){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 Fy(e,t){e.emit("error",t)}function _he(e,t){var{_readableState:r,_writableState:n}=e;if(r&&r.autoDestroy||n&&n.autoDestroy)e.destroy(t);else e.emit("error",t)}o8.exports={destroy:bhe,undestroy:vhe,errorOrDestroy:_he}});var ds=h(function(She,u8){var c8={};function Tr(e,t,r){if(!r)r=Error;function n(s,o,a){if(typeof t==="string")return t;else return t(s,o,a)}class i extends r{constructor(s,o,a){super(n(s,o,a))}}i.prototype.name=r.name,i.prototype.code=e,c8[e]=i}function a8(e,t){if(Array.isArray(e)){let r=e.length;if(e=e.map((n)=>String(n)),r>2)return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1];else if(r===2)return`one of ${t} ${e[0]} or ${e[1]}`;else return`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function Dhe(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function whe(e,t,r){if(r===void 0||r>e.length)r=e.length;return e.substring(r-t.length,r)===t}function Ehe(e,t,r){if(typeof r!=="number")r=0;if(r+t.length>e.length)return!1;else return e.indexOf(t,r)!==-1}Tr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Tr("ERR_INVALID_ARG_TYPE",function(e,t,r){let n;if(typeof t==="string"&&Dhe(t,"not "))n="must not be",t=t.replace(/^not /,"");else n="must be";let i;if(whe(e," argument"))i=`The ${e} ${n} ${a8(t,"type")}`;else{let s=Ehe(e,".")?"property":"argument";i=`The "${e}" ${s} ${n} ${a8(t,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);Tr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Tr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Tr("ERR_STREAM_PREMATURE_CLOSE","Premature close");Tr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Tr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Tr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Tr("ERR_STREAM_WRITE_AFTER_END","write after end");Tr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Tr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Tr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");She.codes=c8});var Oy=h(function(dUe,l8){var Che=ds().codes.ERR_INVALID_OPT_VALUE;function Fhe(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Rhe(e,t,r,n){var i=Fhe(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new Che(s,i)}return Math.floor(i)}return e.objectMode?16:16384}l8.exports={getHighWaterMark:Rhe}});var d8=h(function(fUe,Ay){if(typeof Object.create==="function")Ay.exports=function(t,r){if(r)t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})};else Ay.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var Zs=h(function(pUe,ky){try{if(Nf=xe("util"),typeof Nf.inherits!=="function")throw"";ky.exports=Nf.inherits}catch(e){ky.exports=d8()}var Nf});var p8=h(function(mUe,f8){f8.exports=xe("util").deprecate});var Ty=h(function(hUe,b8){b8.exports=ft;function h8(e){var t=this;this.next=null,this.entry=null,this.finish=function(){rge(t,e)}}var Pa;ft.WritableState=qu;var Ohe={deprecate:p8()},g8=xe("stream"),jf=xe("buffer").Buffer,Ahe=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function khe(e){return jf.from(e)}function Phe(e){return jf.isBuffer(e)||e instanceof Ahe}var Iy=Ry(),Ihe=Oy(),The=Ihe.getHighWaterMark,fs=ds().codes,Nhe=fs.ERR_INVALID_ARG_TYPE,qhe=fs.ERR_METHOD_NOT_IMPLEMENTED,jhe=fs.ERR_MULTIPLE_CALLBACK,Mhe=fs.ERR_STREAM_CANNOT_PIPE,Bhe=fs.ERR_STREAM_DESTROYED,Lhe=fs.ERR_STREAM_NULL_VALUES,Uhe=fs.ERR_STREAM_WRITE_AFTER_END,Vhe=fs.ERR_UNKNOWN_ENCODING,Ia=Iy.errorOrDestroy;Zs()(ft,g8);function zhe(){}function qu(e,t,r){if(Pa=Pa||eo(),e=e||{},typeof r!=="boolean")r=t instanceof Pa;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=The(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){Xhe(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new h8(this)}qu.prototype.getBuffer=function(){var t=this.bufferedRequest,r=[];while(t)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(qu.prototype,"buffer",{get:Ohe.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var qf;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")qf=Function.prototype[Symbol.hasInstance],Object.defineProperty(ft,Symbol.hasInstance,{value:function(t){if(qf.call(this,t))return!0;if(this!==ft)return!1;return t&&t._writableState instanceof qu}});else qf=function(t){return t instanceof this};function ft(e){Pa=Pa||eo();var t=this instanceof Pa;if(!t&&!qf.call(ft,this))return new ft(e);if(this._writableState=new qu(e,this,t),this.writable=!0,e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}g8.call(this)}ft.prototype.pipe=function(){Ia(this,new Mhe)};function Hhe(e,t){var r=new Uhe;Ia(e,r),process.nextTick(t,r)}function Whe(e,t,r,n){var i;if(r===null)i=new Lhe;else if(typeof r!=="string"&&!t.objectMode)i=new Nhe("chunk",["string","Buffer"],r);if(i)return Ia(e,i),process.nextTick(n,i),!1;return!0}ft.prototype.write=function(e,t,r){var n=this._writableState,i=!1,s=!n.objectMode&&Phe(e);if(s&&!jf.isBuffer(e))e=khe(e);if(typeof t==="function")r=t,t=null;if(s)t="buffer";else if(!t)t=n.defaultEncoding;if(typeof r!=="function")r=zhe;if(n.ending)Hhe(this,r);else if(s||Whe(this,n,e,r))n.pendingcb++,i=Khe(this,n,s,e,t,r);return i};ft.prototype.cork=function(){this._writableState.corked++};ft.prototype.uncork=function(){var e=this._writableState;if(e.corked){if(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)y8(this,e)}};ft.prototype.setDefaultEncoding=function(t){if(typeof t==="string")t=t.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new Vhe(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(ft.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Ghe(e,t,r){if(!e.objectMode&&e.decodeStrings!==!1&&typeof t==="string")t=jf.from(t,r);return t}Object.defineProperty(ft.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Khe(e,t,r,n,i,s){if(!r){var o=Ghe(t,n,i);if(n!==o)r=!0,i="buffer",n=o}var a=t.objectMode?1:n.length;t.length+=a;var c=t.length<t.highWaterMark;if(!c)t.needDrain=!0;if(t.writing||t.corked){var l=t.lastBufferedRequest;if(t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l)l.next=t.lastBufferedRequest;else t.bufferedRequest=t.lastBufferedRequest;t.bufferedRequestCount+=1}else Py(e,t,!1,a,n,i,s);return c}function Py(e,t,r,n,i,s,o){if(t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed)t.onwrite(new Bhe("write"));else if(r)e._writev(i,t.onwrite);else e._write(i,s,t.onwrite);t.sync=!1}function Yhe(e,t,r,n,i){if(--t.pendingcb,r)process.nextTick(i,n),process.nextTick(Nu,e,t),e._writableState.errorEmitted=!0,Ia(e,n);else i(n),e._writableState.errorEmitted=!0,Ia(e,n),Nu(e,t)}function Jhe(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Xhe(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(typeof i!=="function")throw new jhe;if(Jhe(r),t)Yhe(e,r,n,t,i);else{var s=x8(r)||e.destroyed;if(!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest)y8(e,r);if(n)process.nextTick(m8,e,r,s,i);else m8(e,r,s,i)}}function m8(e,t,r,n){if(!r)Qhe(e,t);t.pendingcb--,n(),Nu(e,t)}function Qhe(e,t){if(t.length===0&&t.needDrain)t.needDrain=!1,e.emit("drain")}function y8(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=Array(n),s=t.corkedRequestsFree;s.entry=r;var o=0,a=!0;while(r){if(i[o]=r,!r.isBuf)a=!1;r=r.next,o+=1}if(i.allBuffers=a,Py(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next)t.corkedRequestsFree=s.next,s.next=null;else t.corkedRequestsFree=new h8(t);t.bufferedRequestCount=0}else{while(r){var{chunk:c,encoding:l,callback:d}=r,f=t.objectMode?1:c.length;if(Py(e,t,!1,f,c,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}if(r===null)t.lastBufferedRequest=null}t.bufferedRequest=r,t.bufferProcessing=!1}ft.prototype._write=function(e,t,r){r(new qhe("_write()"))};ft.prototype._writev=null;ft.prototype.end=function(e,t,r){var n=this._writableState;if(typeof e==="function")r=e,e=null,t=null;else if(typeof t==="function")r=t,t=null;if(e!==null&&e!==void 0)this.write(e,t);if(n.corked)n.corked=1,this.uncork();if(!n.ending)tge(this,n,r);return this};Object.defineProperty(ft.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function x8(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function Zhe(e,t){e._final(function(r){if(t.pendingcb--,r)Ia(e,r);t.prefinished=!0,e.emit("prefinish"),Nu(e,t)})}function ege(e,t){if(!t.prefinished&&!t.finalCalled)if(typeof e._final==="function"&&!t.destroyed)t.pendingcb++,t.finalCalled=!0,process.nextTick(Zhe,e,t);else t.prefinished=!0,e.emit("prefinish")}function Nu(e,t){var r=x8(t);if(r){if(ege(e,t),t.pendingcb===0){if(t.finished=!0,e.emit("finish"),t.autoDestroy){var n=e._readableState;if(!n||n.autoDestroy&&n.endEmitted)e.destroy()}}}return r}function tge(e,t,r){if(t.ending=!0,Nu(e,t),r)if(t.finished)process.nextTick(r);else e.once("finish",r);t.ended=!0,e.writable=!1}function rge(e,t,r){var n=e.entry;e.entry=null;while(n){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(ft.prototype,"destroyed",{enumerable:!1,get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(t){if(!this._writableState)return;this._writableState.destroyed=t}});ft.prototype.destroy=Iy.destroy;ft.prototype._undestroy=Iy.undestroy;ft.prototype._destroy=function(e,t){t(e)}});var eo=h(function(gUe,_8){var nge=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};_8.exports=Nn;var v8=qy(),Ny=Ty();Zs()(Nn,v8);{Mf=nge(Ny.prototype);for(ju=0;ju<Mf.length;ju++)if(Mu=Mf[ju],!Nn.prototype[Mu])Nn.prototype[Mu]=Ny.prototype[Mu]}var Mf,Mu,ju;function Nn(e){if(!(this instanceof Nn))return new Nn(e);if(v8.call(this,e),Ny.call(this,e),this.allowHalfOpen=!0,e){if(e.readable===!1)this.readable=!1;if(e.writable===!1)this.writable=!1;if(e.allowHalfOpen===!1)this.allowHalfOpen=!1,this.once("end",ige)}}Object.defineProperty(Nn.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Nn.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Nn.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ige(){if(this._writableState.ended)return;process.nextTick(sge,this)}function sge(e){e.end()}Object.defineProperty(Nn.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(t){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=t,this._writableState.destroyed=t}})});var E8=h(function(jy,w8){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Bf=xe("buffer"),qn=Bf.Buffer;function D8(e,t){for(var r in e)t[r]=e[r]}if(qn.from&&qn.alloc&&qn.allocUnsafe&&qn.allocUnsafeSlow)w8.exports=Bf;else D8(Bf,jy),jy.Buffer=to;function to(e,t,r){return qn(e,t,r)}to.prototype=Object.create(qn.prototype);D8(qn,to);to.from=function(e,t,r){if(typeof e==="number")throw TypeError("Argument must not be a number");return qn(e,t,r)};to.alloc=function(e,t,r){if(typeof e!=="number")throw TypeError("Argument must be a number");var n=qn(e);if(t!==void 0)if(typeof r==="string")n.fill(t,r);else n.fill(t);else n.fill(0);return n};to.allocUnsafe=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return qn(e)};to.allocUnsafeSlow=function(e){if(typeof e!=="number")throw TypeError("Argument must be a number");return Bf.SlowBuffer(e)}});var Ly=h(function(bge){var By=E8().Buffer,S8=By.isEncoding||function(e){switch(e=""+e,e&&e.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 oge(e){if(!e)return"utf8";var t;while(!0)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function age(e){var t=oge(e);if(typeof t!=="string"&&(By.isEncoding===S8||!S8(e)))throw Error("Unknown encoding: "+e);return t||e}bge.StringDecoder=Bu;function Bu(e){this.encoding=age(e);var t;switch(this.encoding){case"utf16le":this.text=pge,this.end=mge,t=4;break;case"utf8":this.fillLast=lge,t=4;break;case"base64":this.text=hge,this.end=gge,t=3;break;default:this.write=yge,this.end=xge;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=By.allocUnsafe(t)}Bu.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;if(r<e.length)return t?t+this.text(e,r):this.text(e,r);return t||""};Bu.prototype.end=fge;Bu.prototype.text=dge;Bu.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function My(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function cge(e,t,r){var n=t.length-1;if(n<r)return 0;var i=My(t[n]);if(i>=0){if(i>0)e.lastNeed=i-1;return i}if(--n<r||i===-2)return 0;if(i=My(t[n]),i>=0){if(i>0)e.lastNeed=i-2;return i}if(--n<r||i===-2)return 0;if(i=My(t[n]),i>=0){if(i>0)if(i===2)i=0;else e.lastNeed=i-3;return i}return 0}function uge(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}}function lge(e){var t=this.lastTotal-this.lastNeed,r=uge(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function dge(e,t){var r=cge(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function fge(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"\uFFFD";return t}function pge(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function mge(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function hge(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);if(this.lastNeed=3-r,this.lastTotal=3,r===1)this.lastChar[0]=e[e.length-1];else this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1];return e.toString("base64",t,e.length-r)}function gge(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function yge(e){return e.toString(this.encoding)}function xge(e){return e&&e.length?this.write(e):""}});var Lf=h(function(xUe,F8){var $8=ds().codes.ERR_STREAM_PREMATURE_CLOSE;function _ge(e){var t=!1;return function(){if(t)return;t=!0;for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}function Dge(){}function wge(e){return e.setHeader&&typeof e.abort==="function"}function C8(e,t,r){if(typeof t==="function")return C8(e,null,t);if(!t)t={};r=_ge(r||Dge);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,s=function(){if(!e.writable)a()},o=e._writableState&&e._writableState.finished,a=function(){if(i=!1,o=!0,!n)r.call(e)},c=e._readableState&&e._readableState.endEmitted,l=function(){if(n=!1,c=!0,!i)r.call(e)},d=function(g){r.call(e,g)},f=function(){var g;if(n&&!c){if(!e._readableState||!e._readableState.ended)g=new $8;return r.call(e,g)}if(i&&!o){if(!e._writableState||!e._writableState.ended)g=new $8;return r.call(e,g)}},m=function(){e.req.on("finish",a)};if(wge(e))if(e.on("complete",a),e.on("abort",f),e.req)m();else e.on("request",m);else if(i&&!e._writableState)e.on("end",s),e.on("close",s);if(e.on("end",l),e.on("finish",a),t.error!==!1)e.on("error",d);return e.on("close",f),function(){if(e.removeListener("complete",a),e.removeListener("abort",f),e.removeListener("request",m),e.req)e.req.removeListener("finish",a);e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",a),e.removeListener("end",l),e.removeListener("error",d),e.removeListener("close",f)}}F8.exports=C8});var O8=h(function(bUe,R8){var Uf;function ps(e,t,r){if(t=Ege(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function Ege(e){var t=Sge(e,"string");return typeof t==="symbol"?t:String(t)}function Sge(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $ge=Lf(),ms=Symbol("lastResolve"),ro=Symbol("lastReject"),Lu=Symbol("error"),Vf=Symbol("ended"),no=Symbol("lastPromise"),Uy=Symbol("handlePromise"),io=Symbol("stream");function hs(e,t){return{value:e,done:t}}function Cge(e){var t=e[ms];if(t!==null){var r=e[io].read();if(r!==null)e[no]=null,e[ms]=null,e[ro]=null,t(hs(r,!1))}}function Fge(e){process.nextTick(Cge,e)}function Rge(e,t){return function(r,n){e.then(function(){if(t[Vf]){r(hs(void 0,!0));return}t[Uy](r,n)},n)}}var Oge=Object.getPrototypeOf(function(){}),Age=Object.setPrototypeOf((Uf={get stream(){return this[io]},next:function(){var t=this,r=this[Lu];if(r!==null)return Promise.reject(r);if(this[Vf])return Promise.resolve(hs(void 0,!0));if(this[io].destroyed)return new Promise(function(o,a){process.nextTick(function(){if(t[Lu])a(t[Lu]);else o(hs(void 0,!0))})});var n=this[no],i;if(n)i=new Promise(Rge(n,this));else{var s=this[io].read();if(s!==null)return Promise.resolve(hs(s,!1));i=new Promise(this[Uy])}return this[no]=i,i}},ps(Uf,Symbol.asyncIterator,function(){return this}),ps(Uf,"return",function(){var t=this;return new Promise(function(r,n){t[io].destroy(null,function(i){if(i){n(i);return}r(hs(void 0,!0))})})}),Uf),Oge),kge=function(t){var r,n=Object.create(Age,(r={},ps(r,io,{value:t,writable:!0}),ps(r,ms,{value:null,writable:!0}),ps(r,ro,{value:null,writable:!0}),ps(r,Lu,{value:null,writable:!0}),ps(r,Vf,{value:t._readableState.endEmitted,writable:!0}),ps(r,Uy,{value:function(s,o){var a=n[io].read();if(a)n[no]=null,n[ms]=null,n[ro]=null,s(hs(a,!1));else n[ms]=s,n[ro]=o},writable:!0}),r));return n[no]=null,$ge(t,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=n[ro];if(s!==null)n[no]=null,n[ms]=null,n[ro]=null,s(i);n[Lu]=i;return}var o=n[ms];if(o!==null)n[no]=null,n[ms]=null,n[ro]=null,o(hs(void 0,!0));n[Vf]=!0}),t.on("readable",Fge.bind(null,n)),n};R8.exports=kge});var I8=h(function(vUe,P8){function A8(e,t,r,n,i,s,o){try{var a=e[s](o),c=a.value}catch(l){r(l);return}if(a.done)t(c);else Promise.resolve(c).then(n,i)}function Pge(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var s=e.apply(t,r);function o(c){A8(s,n,i,o,a,"next",c)}function a(c){A8(s,n,i,o,a,"throw",c)}o(void 0)})}}function k8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ige(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k8(Object(r),!0).forEach(function(n){Tge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k8(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tge(e,t,r){if(t=Nge(t),t in e)Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0});else e[t]=r;return e}function Nge(e){var t=qge(e,"string");return typeof t==="symbol"?t:String(t)}function qge(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!=="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jge=ds().codes.ERR_INVALID_ARG_TYPE;function Mge(e,t,r){var n;if(t&&typeof t.next==="function")n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new jge("iterable",["Iterable"],t);var i=new e(Ige({objectMode:!0},r)),s=!1;i._read=function(){if(!s)s=!0,o()};function o(){return a.apply(this,arguments)}function a(){return a=Pge(function*(){try{var c=yield n.next(),l=c.value,d=c.done;if(d)i.push(null);else if(i.push(yield l))o();else s=!1}catch(f){i.destroy(f)}}),a.apply(this,arguments)}return i}P8.exports=Mge});var qy=h(function(DUe,z8){z8.exports=ke;var Ta;ke.ReadableState=j8;var _Ue=xe("events").EventEmitter,q8=function(t,r){return t.listeners(r).length},Vu=xe("stream"),zf=xe("buffer").Buffer,Bge=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Lge(e){return zf.from(e)}function Uge(e){return zf.isBuffer(e)||e instanceof Bge}var Vy=xe("util"),ye;if(Vy&&Vy.debuglog)ye=Vy.debuglog("stream");else ye=function(){};var Vge=i8(),Jy=Ry(),zge=Oy(),Hge=zge.getHighWaterMark,Hf=ds().codes,Wge=Hf.ERR_INVALID_ARG_TYPE,Gge=Hf.ERR_STREAM_PUSH_AFTER_EOF,Kge=Hf.ERR_METHOD_NOT_IMPLEMENTED,Yge=Hf.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Na,zy,Hy;Zs()(ke,Vu);var Uu=Jy.errorOrDestroy,Wy=["error","close","destroy","pause","resume"];function Jge(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(Array.isArray(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function j8(e,t,r){if(Ta=Ta||eo(),e=e||{},typeof r!=="boolean")r=t instanceof Ta;if(this.objectMode=!!e.objectMode,r)this.objectMode=this.objectMode||!!e.readableObjectMode;if(this.highWaterMark=Hge(this,e,"readableHighWaterMark",r),this.buffer=new Vge,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=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding){if(!Na)Na=Ly().StringDecoder;this.decoder=new Na(e.encoding),this.encoding=e.encoding}}function ke(e){if(Ta=Ta||eo(),!(this instanceof ke))return new ke(e);var t=this instanceof Ta;if(this._readableState=new j8(e,this,t),this.readable=!0,e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}Vu.call(this)}Object.defineProperty(ke.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(t){if(!this._readableState)return;this._readableState.destroyed=t}});ke.prototype.destroy=Jy.destroy;ke.prototype._undestroy=Jy.undestroy;ke.prototype._destroy=function(e,t){t(e)};ke.prototype.push=function(e,t){var r=this._readableState,n;if(!r.objectMode){if(typeof e==="string"){if(t=t||r.defaultEncoding,t!==r.encoding)e=zf.from(e,t),t="";n=!0}}else n=!0;return M8(this,e,t,!1,n)};ke.prototype.unshift=function(e){return M8(this,e,null,!0,!1)};function M8(e,t,r,n,i){ye("readableAddChunk",t);var s=e._readableState;if(t===null)s.reading=!1,Zge(e,s);else{var o;if(!i)o=Xge(s,t);if(o)Uu(e,o);else if(s.objectMode||t&&t.length>0){if(typeof t!=="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==zf.prototype)t=Lge(t);if(n)if(s.endEmitted)Uu(e,new Yge);else Gy(e,s,t,!0);else if(s.ended)Uu(e,new Gge);else if(s.destroyed)return!1;else if(s.reading=!1,s.decoder&&!r)if(t=s.decoder.write(t),s.objectMode||t.length!==0)Gy(e,s,t,!1);else Yy(e,s);else Gy(e,s,t,!1)}else if(!n)s.reading=!1,Yy(e,s)}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Gy(e,t,r,n){if(t.flowing&&t.length===0&&!t.sync)t.awaitDrain=0,e.emit("data",r);else{if(t.length+=t.objectMode?1:r.length,n)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)Wf(e)}Yy(e,t)}function Xge(e,t){var r;if(!Uge(t)&&typeof t!=="string"&&t!==void 0&&!e.objectMode)r=new Wge("chunk",["string","Buffer","Uint8Array"],t);return r}ke.prototype.isPaused=function(){return this._readableState.flowing===!1};ke.prototype.setEncoding=function(e){if(!Na)Na=Ly().StringDecoder;var t=new Na(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var r=this._readableState.buffer.head,n="";while(r!==null)n+=t.write(r.data),r=r.next;if(this._readableState.buffer.clear(),n!=="")this._readableState.buffer.push(n);return this._readableState.length=n.length,this};var T8=1073741824;function Qge(e){if(e>=T8)e=T8;else e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++;return e}function N8(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e)if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length;if(e>t.highWaterMark)t.highWaterMark=Qge(e);if(e<=t.length)return e;if(!t.ended)return t.needReadable=!0,0;return t.length}ke.prototype.read=function(e){ye("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0)t.emittedReadable=!1;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){if(ye("read: emitReadable",t.length,t.ended),t.length===0&&t.ended)Ky(this);else Wf(this);return null}if(e=N8(e,t),e===0&&t.ended){if(t.length===0)Ky(this);return null}var n=t.needReadable;if(ye("need readable",n),t.length===0||t.length-e<t.highWaterMark)n=!0,ye("length less than watermark",n);if(t.ended||t.reading)n=!1,ye("reading or ended",n);else if(n){if(ye("do read"),t.reading=!0,t.sync=!0,t.length===0)t.needReadable=!0;if(this._read(t.highWaterMark),t.sync=!1,!t.reading)e=N8(r,t)}var i;if(e>0)i=U8(e,t);else i=null;if(i===null)t.needReadable=t.length<=t.highWaterMark,e=0;else t.length-=e,t.awaitDrain=0;if(t.length===0){if(!t.ended)t.needReadable=!0;if(r!==e&&t.ended)Ky(this)}if(i!==null)this.emit("data",i);return i};function Zge(e,t){if(ye("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length)t.buffer.push(r),t.length+=t.objectMode?1:r.length}if(t.ended=!0,t.sync)Wf(e);else if(t.needReadable=!1,!t.emittedReadable)t.emittedReadable=!0,B8(e)}function Wf(e){var t=e._readableState;if(ye("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,!t.emittedReadable)ye("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(B8,e)}function B8(e){var t=e._readableState;if(ye("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended))e.emit("readable"),t.emittedReadable=!1;t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Xy(e)}function Yy(e,t){if(!t.readingMore)t.readingMore=!0,process.nextTick(eye,e,t)}function eye(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0)){var r=t.length;if(ye("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}ke.prototype._read=function(e){Uu(this,new Kge("_read()"))};ke.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,ye("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,s=i?a:y;if(n.endEmitted)process.nextTick(s);else r.once("end",s);e.on("unpipe",o);function o(x,v){if(ye("onunpipe"),x===r){if(v&&v.hasUnpiped===!1)v.hasUnpiped=!0,d()}}function a(){ye("onend"),e.end()}var c=tye(r);e.on("drain",c);var l=!1;function d(){if(ye("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",c),e.removeListener("error",m),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",y),r.removeListener("data",f),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain))c()}r.on("data",f);function f(x){ye("ondata");var v=e.write(x);if(ye("dest.write",v),v===!1){if((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&V8(n.pipes,e)!==-1)&&!l)ye("false write response, pause",n.awaitDrain),n.awaitDrain++;r.pause()}}function m(x){if(ye("onerror",x),y(),e.removeListener("error",m),q8(e,"error")===0)Uu(e,x)}Jge(e,"error",m);function p(){e.removeListener("finish",g),y()}e.once("close",p);function g(){ye("onfinish"),e.removeListener("close",p),y()}e.once("finish",g);function y(){ye("unpipe"),r.unpipe(e)}if(e.emit("pipe",r),!n.flowing)ye("pipe resume"),r.resume();return e};function tye(e){return function(){var r=e._readableState;if(ye("pipeOnDrain",r.awaitDrain),r.awaitDrain)r.awaitDrain--;if(r.awaitDrain===0&&q8(e,"data"))r.flowing=!0,Xy(e)}}ke.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;if(t.pipes=null,t.pipesCount=0,t.flowing=!1,e)e.emit("unpipe",this,r);return this}if(!e){var{pipes:n,pipesCount:i}=t;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=V8(t.pipes,e);if(o===-1)return this;if(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1)t.pipes=t.pipes[0];return e.emit("unpipe",this,r),this};ke.prototype.on=function(e,t){var r=Vu.prototype.on.call(this,e,t),n=this._readableState;if(e==="data"){if(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1)this.resume()}else if(e==="readable"){if(!n.endEmitted&&!n.readableListening){if(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,ye("on readable",n.length,n.reading),n.length)Wf(this);else if(!n.reading)process.nextTick(rye,this)}}return r};ke.prototype.addListener=ke.prototype.on;ke.prototype.removeListener=function(e,t){var r=Vu.prototype.removeListener.call(this,e,t);if(e==="readable")process.nextTick(L8,this);return r};ke.prototype.removeAllListeners=function(e){var t=Vu.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===void 0)process.nextTick(L8,this);return t};function L8(e){var t=e._readableState;if(t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused)t.flowing=!0;else if(e.listenerCount("data")>0)e.resume()}function rye(e){ye("readable nexttick read 0"),e.read(0)}ke.prototype.resume=function(){var e=this._readableState;if(!e.flowing)ye("resume"),e.flowing=!e.readableListening,nye(this,e);return e.paused=!1,this};function nye(e,t){if(!t.resumeScheduled)t.resumeScheduled=!0,process.nextTick(iye,e,t)}function iye(e,t){if(ye("resume",t.reading),!t.reading)e.read(0);if(t.resumeScheduled=!1,e.emit("resume"),Xy(e),t.flowing&&!t.reading)e.read(0)}ke.prototype.pause=function(){if(ye("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)ye("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function Xy(e){var t=e._readableState;ye("flow",t.flowing);while(t.flowing&&e.read()!==null);}ke.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(ye("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();if(o&&o.length)t.push(o)}t.push(null)}),e.on("data",function(o){if(ye("wrapped data"),r.decoder)o=r.decoder.write(o);if(r.objectMode&&(o===null||o===void 0))return;else if(!r.objectMode&&(!o||!o.length))return;var a=t.push(o);if(!a)n=!0,e.pause()});for(var i in e)if(this[i]===void 0&&typeof e[i]==="function")this[i]=function(a){return function(){return e[a].apply(e,arguments)}}(i);for(var s=0;s<Wy.length;s++)e.on(Wy[s],this.emit.bind(this,Wy[s]));return this._read=function(o){if(ye("wrapped _read",o),n)n=!1,e.resume()},this};if(typeof Symbol==="function")ke.prototype[Symbol.asyncIterator]=function(){if(zy===void 0)zy=O8();return zy(this)};Object.defineProperty(ke.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(ke.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(ke.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){if(this._readableState)this._readableState.flowing=t}});ke._fromList=U8;Object.defineProperty(ke.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function U8(e,t){if(t.length===0)return null;var r;if(t.objectMode)r=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else r=t.buffer.consume(e,t.decoder);return r}function Ky(e){var t=e._readableState;if(ye("endReadable",t.endEmitted),!t.endEmitted)t.ended=!0,process.nextTick(sye,t,e)}function sye(e,t){if(ye("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0){if(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished)t.destroy()}}}if(typeof Symbol==="function")ke.from=function(e,t){if(Hy===void 0)Hy=I8();return Hy(ke,e,t)};function V8(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var Qy=h(function(wUe,W8){W8.exports=mi;var Gf=ds().codes,oye=Gf.ERR_METHOD_NOT_IMPLEMENTED,aye=Gf.ERR_MULTIPLE_CALLBACK,cye=Gf.ERR_TRANSFORM_ALREADY_TRANSFORMING,uye=Gf.ERR_TRANSFORM_WITH_LENGTH_0,Kf=eo();Zs()(mi,Kf);function lye(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new aye);if(r.writechunk=null,r.writecb=null,t!=null)this.push(t);n(e);var i=this._readableState;if(i.reading=!1,i.needReadable||i.length<i.highWaterMark)this._read(i.highWaterMark)}function mi(e){if(!(this instanceof mi))return new mi(e);if(Kf.call(this,e),this._transformState={afterTransform:lye.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",dye)}function dye(){var e=this;if(typeof this._flush==="function"&&!this._readableState.destroyed)this._flush(function(t,r){H8(e,t,r)});else H8(this,null,null)}mi.prototype.push=function(e,t){return this._transformState.needTransform=!1,Kf.prototype.push.call(this,e,t)};mi.prototype._transform=function(e,t,r){r(new oye("_transform()"))};mi.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;if(n.needTransform||i.needReadable||i.length<i.highWaterMark)this._read(i.highWaterMark)}};mi.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&!t.transforming)t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform);else t.needTransform=!0};mi.prototype._destroy=function(e,t){Kf.prototype._destroy.call(this,e,function(r){t(r)})};function H8(e,t,r){if(t)return e.emit("error",t);if(r!=null)e.push(r);if(e._writableState.length)throw new uye;if(e._transformState.transforming)throw new cye;return e.push(null)}});var Y8=h(function(EUe,K8){K8.exports=zu;var G8=Qy();Zs()(zu,G8);function zu(e){if(!(this instanceof zu))return new zu(e);G8.call(this,e)}zu.prototype._transform=function(e,t,r){r(null,e)}});var e4=h(function(SUe,Z8){var Zy;function fye(e){var t=!1;return function(){if(t)return;t=!0,e.apply(void 0,arguments)}}var Q8=ds().codes,pye=Q8.ERR_MISSING_ARGS,mye=Q8.ERR_STREAM_DESTROYED;function J8(e){if(e)throw e}function hye(e){return e.setHeader&&typeof e.abort==="function"}function gye(e,t,r,n){n=fye(n);var i=!1;if(e.on("close",function(){i=!0}),Zy===void 0)Zy=Lf();Zy(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(i)return;if(s)return;if(s=!0,hye(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();n(o||new mye("pipe"))}}function X8(e){e()}function yye(e,t){return e.pipe(t)}function xye(e){if(!e.length)return J8;if(typeof e[e.length-1]!=="function")return J8;return e.pop()}function bye(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=xye(t);if(Array.isArray(t[0]))t=t[0];if(t.length<2)throw new pye("streams");var i,s=t.map(function(o,a){var c=a<t.length-1,l=a>0;return gye(o,c,l,function(d){if(!i)i=d;if(d)s.forEach(X8);if(c)return;s.forEach(X8),n(i)})});return t.reduce(yye)}Z8.exports=bye});var t4=h(function(Nr,Wu){var Hu=xe("stream");if(process.env.READABLE_STREAM==="disable"&&Hu)Wu.exports=Hu.Readable,Object.assign(Wu.exports,Hu),Wu.exports.Stream=Hu;else Nr=Wu.exports=qy(),Nr.Stream=Hu||Nr,Nr.Readable=Nr,Nr.Writable=Ty(),Nr.Duplex=eo(),Nr.Transform=Qy(),Nr.PassThrough=Y8(),Nr.finished=Lf(),Nr.pipeline=e4()});var i4=h(function($Ue,n4){var{Buffer:Zr}=xe("buffer"),r4=Symbol.for("BufferList");function Ye(e){if(!(this instanceof Ye))return new Ye(e);Ye._init.call(this,e)}Ye._init=function(t){if(Object.defineProperty(this,r4,{value:!0}),this._bufs=[],this.length=0,t)this.append(t)};Ye.prototype._new=function(t){return new Ye(t)};Ye.prototype._offset=function(t){if(t===0)return[0,0];let r=0;for(let n=0;n<this._bufs.length;n++){let i=r+this._bufs[n].length;if(t<i||n===this._bufs.length-1)return[n,t-r];r=i}};Ye.prototype._reverseOffset=function(e){let t=e[0],r=e[1];for(let n=0;n<t;n++)r+=this._bufs[n].length;return r};Ye.prototype.get=function(t){if(t>this.length||t<0)return;let r=this._offset(t);return this._bufs[r[0]][r[1]]};Ye.prototype.slice=function(t,r){if(typeof t==="number"&&t<0)t+=this.length;if(typeof r==="number"&&r<0)r+=this.length;return this.copy(null,0,t,r)};Ye.prototype.copy=function(t,r,n,i){if(typeof n!=="number"||n<0)n=0;if(typeof i!=="number"||i>this.length)i=this.length;if(n>=this.length)return t||Zr.alloc(0);if(i<=0)return t||Zr.alloc(0);let s=!!t,o=this._offset(n),a=i-n,c=a,l=s&&r||0,d=o[1];if(n===0&&i===this.length){if(!s)return this._bufs.length===1?this._bufs[0]:Zr.concat(this._bufs,this.length);for(let f=0;f<this._bufs.length;f++)this._bufs[f].copy(t,l),l+=this._bufs[f].length;return t}if(c<=this._bufs[o[0]].length-d)return s?this._bufs[o[0]].copy(t,r,d,d+c):this._bufs[o[0]].slice(d,d+c);if(!s)t=Zr.allocUnsafe(a);for(let f=o[0];f<this._bufs.length;f++){let m=this._bufs[f].length-d;if(c>m)this._bufs[f].copy(t,l,d),l+=m;else{this._bufs[f].copy(t,l,d,d+c),l+=m;break}if(c-=m,d)d=0}if(t.length>l)return t.slice(0,l);return t};Ye.prototype.shallowSlice=function(t,r){if(t=t||0,r=typeof r!=="number"?this.length:r,t<0)t+=this.length;if(r<0)r+=this.length;if(t===r)return this._new();let n=this._offset(t),i=this._offset(r),s=this._bufs.slice(n[0],i[0]+1);if(i[1]===0)s.pop();else s[s.length-1]=s[s.length-1].slice(0,i[1]);if(n[1]!==0)s[0]=s[0].slice(n[1]);return this._new(s)};Ye.prototype.toString=function(t,r,n){return this.slice(r,n).toString(t)};Ye.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;while(this._bufs.length)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};Ye.prototype.duplicate=function(){let t=this._new();for(let r=0;r<this._bufs.length;r++)t.append(this._bufs[r]);return t};Ye.prototype.append=function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(Zr.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let r=0;r<t.length;r++)this.append(t[r]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else{if(typeof t==="number")t=t.toString();this._appendBuffer(Zr.from(t))}return this};Ye.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};Ye.prototype.indexOf=function(e,t,r){if(r===void 0&&typeof t==="string")r=t,t=void 0;if(typeof e==="function"||Array.isArray(e))throw TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');else if(typeof e==="number")e=Zr.from([e]);else if(typeof e==="string")e=Zr.from(e,r);else if(this._isBufferList(e))e=e.slice();else if(Array.isArray(e.buffer))e=Zr.from(e.buffer,e.byteOffset,e.byteLength);else if(!Zr.isBuffer(e))e=Zr.from(e);if(t=Number(t||0),isNaN(t))t=0;if(t<0)t=this.length+t;if(t<0)t=0;if(e.length===0)return t>this.length?this.length:t;let n=this._offset(t),i=n[0],s=n[1];for(;i<this._bufs.length;i++){let o=this._bufs[i];while(s<o.length)if(o.length-s>=e.length){let c=o.indexOf(e,s);if(c!==-1)return this._reverseOffset([i,c]);s=o.length-e.length+1}else{let c=this._reverseOffset([i,s]);if(this._match(c,e))return c;s++}s=0}return-1};Ye.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0};(function(){let e={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 t in e)(function(r){if(e[r]===null)Ye.prototype[r]=function(n,i){return this.slice(n,n+i)[r](0,i)};else Ye.prototype[r]=function(n=0){return this.slice(n,n+e[r])[r](0)}})(t)})();Ye.prototype._isBufferList=function(t){return t instanceof Ye||Ye.isBufferList(t)};Ye.isBufferList=function(t){return t!=null&&t[r4]};n4.exports=Ye});var s4=h(function(CUe,Yf){var ex=t4().Duplex,vye=Zs(),Gu=i4();function Tt(e){if(!(this instanceof Tt))return new Tt(e);if(typeof e==="function"){this._callback=e;let t=function(n){if(this._callback)this._callback(n),this._callback=null}.bind(this);this.on("pipe",function(n){n.on("error",t)}),this.on("unpipe",function(n){n.removeListener("error",t)}),e=null}Gu._init.call(this,e),ex.call(this)}vye(Tt,ex);Object.assign(Tt.prototype,Gu.prototype);Tt.prototype._new=function(t){return new Tt(t)};Tt.prototype._write=function(t,r,n){if(this._appendBuffer(t),typeof n==="function")n()};Tt.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};Tt.prototype.end=function(t){if(ex.prototype.end.call(this,t),this._callback)this._callback(null,this.slice()),this._callback=null};Tt.prototype._destroy=function(t,r){this._bufs.length=0,this.length=0,r(t)};Tt.prototype._isBufferList=function(t){return t instanceof Tt||t instanceof Gu||Tt.isBufferList(t)};Tt.isBufferList=Gu.isBufferList;Yf.exports=Tt;Yf.exports.BufferListStream=Tt;Yf.exports.BufferList=Gu});var c4=h(function(FUe,ix){var _ye=xe("readline"),Dye=by(),o4=TP(),Jf=kf(),Xf=LP(),wye=Fu(),Eye=JP(),Sye=QP(),$ye=Sy(),{BufferListStream:Cye}=s4(),tx=Symbol("text"),rx=Symbol("prefixText");class a4{constructor(){this.requests=0,this.mutedStream=new Cye,this.mutedStream.pipe(process.stdout);let e=this;this.ourEmit=function(t,r,...n){let{stdin:i}=process;if(e.requests>0||i.emit===e.ourEmit){if(t==="keypress")return;if(t==="data"&&r.includes(3))process.emit("SIGINT");Reflect.apply(e.oldEmit,this,[t,r,...n])}else Reflect.apply(process.stdin.emit,this,[t,r,...n])}}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=_ye.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 Qf;class nx{constructor(e){if(!Qf)Qf=new a4;if(typeof e==="string")e={text:e};this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:!0,...e},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:Sye({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(e=0){if(!(e>=0&&Number.isInteger(e)))throw Error("The `indent` option must be an integer from 0 and up");this._indent=e}_updateInterval(e){if(e!==void 0)this.interval=e}get spinner(){return this._spinner}set spinner(e){if(this.frameIndex=0,typeof e==="object"){if(e.frames===void 0)throw Error("The given spinner must have a `frames` property");this._spinner=e}else if(!$ye())this._spinner=Jf.line;else if(e===void 0)this._spinner=Jf.dots;else if(e!=="default"&&Jf[e])this._spinner=Jf[e];else throw Error(`There is no built-in spinner named '${e}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);this._updateInterval(this._spinner.interval)}get text(){return this[tx]}set text(e){this[tx]=e,this.updateLineCount()}get prefixText(){return this[rx]}set prefixText(e){this[rx]=e,this.updateLineCount()}get isSpinning(){return this.id!==void 0}getFullPrefixText(e=this[rx],t=" "){if(typeof e==="string")return e+t;if(typeof e==="function")return e()+t;return""}updateLineCount(){let e=this.stream.columns||80,t=this.getFullPrefixText(this.prefixText,"-");this.lineCount=0;for(let r of wye(t+"--"+this[tx]).split(`
|
|
46
46
|
`))this.lineCount+=Math.max(1,Math.ceil(Eye(r)/e))}get isEnabled(){return this._isEnabled&&!this.isSilent}set isEnabled(e){if(typeof e!=="boolean")throw TypeError("The `isEnabled` option must be a boolean");this._isEnabled=e}get isSilent(){return this._isSilent}set isSilent(e){if(typeof e!=="boolean")throw TypeError("The `isSilent` option must be a boolean");this._isSilent=e}frame(){let{frames:e}=this.spinner,t=e[this.frameIndex];if(this.color)t=Dye[this.color](t);this.frameIndex=++this.frameIndex%e.length;let r=typeof this.prefixText==="string"&&this.prefixText!==""?this.prefixText+" ":"",n=typeof this.text==="string"?" "+this.text:"";return r+t+n}clear(){if(!this.isEnabled||!this.stream.isTTY)return this;for(let e=0;e<this.linesToClear;e++){if(e>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(e){if(e)this.text=e;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)o4.hide(this.stream);if(this.discardStdin&&process.stdin.isTTY)this.isDiscardingStdin=!0,Qf.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)o4.show(this.stream);if(this.discardStdin&&process.stdin.isTTY&&this.isDiscardingStdin)Qf.stop(),this.isDiscardingStdin=!1;return this}succeed(e){return this.stopAndPersist({symbol:Xf.success,text:e})}fail(e){return this.stopAndPersist({symbol:Xf.error,text:e})}warn(e){return this.stopAndPersist({symbol:Xf.warning,text:e})}info(e){return this.stopAndPersist({symbol:Xf.info,text:e})}stopAndPersist(e={}){if(this.isSilent)return this;let t=e.prefixText||this.prefixText,r=e.text||this.text,n=typeof r==="string"?" "+r:"";return this.stop(),this.stream.write(`${this.getFullPrefixText(t," ")}${e.symbol||" "}${n}
|
|
48
48
|
`),this}}var Fye=function(e){return new nx(e)};ix.exports=Fye;ix.exports.promise=(e,t)=>{if(typeof e.then!=="function")throw TypeError("Parameter `action` must be a Promise");let r=new nx(t);return r.start(),(async()=>{try{await e,r.succeed()}catch{r.fail()}})(),r}});var qa,Zf=function(e,t){e.output.write(qa.default.cursorBackward(t))},u4=function(e,t){e.output.write(qa.default.cursorForward(t))},l4=function(e,t){e.output.write(qa.default.cursorUp(t))},sx=function(e,t){e.output.write(qa.default.cursorDown(t))},Ku=function(e,t){e.output.write(qa.default.eraseLines(t))};var ox=A(()=>{qa=ne(lu(),1)});function f4(e){return e.split(`
|
|
@@ -85,24 +85,24 @@ ${t}`,Dbe,wbe,Ebe=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,i=_be.bind(nul
|
|
|
85
85
|
`:""},this._extScope=e,this._scope=new an.Scope({parent:e}),this._nodes=[new r5]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){let i=this._scope.toName(t);if(r!==void 0&&n)this._constants[i.str]=r;return this._leafNode(new JT(e,i,r)),i}const(e,t,r){return this._def(an.varKinds.const,e,t,r)}let(e,t,r){return this._def(an.varKinds.let,e,t,r)}var(e,t,r){return this._def(an.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Hb(e,t,r))}add(e,t){return this._leafNode(new XT(e,dr.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==we.nil)this._leafNode(new t5(e));return this}object(...e){let t=["{"];for(let[r,n]of e){if(t.length>1)t.push(",");if(t.push(r),r!==n||this.opts.es5)t.push(":"),(0,we.addCodeArg)(t,n)}return t.push("}"),new we._Code(t)}if(e,t,r){if(this._blockNode(new vi(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new vi(e))}else(){return this._elseNode(new pl)}endIf(){return this._endBlockNode(vi,pl)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new n5(e),t)}forRange(e,t,r,n,i=this.opts.es5?an.varKinds.var:an.varKinds.let){let s=this._scope.toName(e);return this._for(new i5(i,s,t,r),()=>n(s))}forOf(e,t,r,n=an.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=t instanceof we.Name?t:this.var("_arr",t);return this.forRange("_i",0,we._`${s}.length`,(o)=>{this.var(i,we._`${s}[${o}]`),r(i)})}return this._for(new Vb("of",n,i,t),()=>r(i))}forIn(e,t,r,n=this.opts.es5?an.varKinds.var:an.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,we._`Object.keys(${t})`,r);let i=this._scope.toName(e);return this._for(new Vb("in",n,i,t),()=>r(i))}endFor(){return this._endBlockNode(Xa)}label(e){return this._leafNode(new QT(e))}break(e){return this._leafNode(new ZT(e))}return(e){let t=new Wp;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(Wp)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let n=new s5;if(this._blockNode(n),this.code(e),t){let i=this.name("e");this._currNode=n.catch=new Gp(i),t(i)}if(r)this._currNode=n.finally=new Kp,this.code(r);return this._endBlockNode(Gp,Kp)}throw(e){return this._leafNode(new e5(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=we.nil,r,n){if(this._blockNode(new Hp(e,t,r)),n)this.code(n).endFunc();return this}endFunc(){return this._endBlockNode(Hp)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof vi))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}dr.CodeGen=o5;function po(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Yp(e,t){return t instanceof we._CodeOrName?po(e,t.names):e}function Qa(e,t,r){if(e instanceof we.Name)return n(e);if(!i(e))return e;return new we._Code(e._items.reduce((s,o)=>{if(o instanceof we.Name)o=n(o);if(o instanceof we._Code)s.push(...o._items);else s.push(o);return s},[]));function n(s){let o=r[s.str];if(o===void 0||t[s.str]!==1)return s;return delete t[s.str],o}function i(s){return s instanceof we._Code&&s._items.some((o)=>o instanceof we.Name&&t[o.str]===1&&r[o.str]!==void 0)}}function vve(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function a5(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:we._`!${zb(e)}`}dr.not=a5;var _ve=c5(dr.operators.AND);function Dve(...e){return e.reduce(_ve)}dr.and=Dve;var wve=c5(dr.operators.OR);function Eve(...e){return e.reduce(wve)}dr.or=Eve;function c5(e){return(t,r)=>t===we.nil?r:r===we.nil?t:we._`${zb(t)} ${e} ${zb(r)}`}function zb(e){return e instanceof we.Name?e:we._`(${e})`}});var be=h(function(y5){Object.defineProperty(y5,"__esModule",{value:!0});y5.checkStrictMode=y5.getErrorPath=y5.Type=y5.useFunc=y5.setEvaluated=y5.evaluatedPropsToName=y5.mergeEvaluated=y5.eachItem=y5.unescapeJsonPointer=y5.escapeJsonPointer=y5.escapeFragment=y5.unescapeFragment=y5.schemaRefOrVal=y5.schemaHasRulesButRef=y5.schemaHasRules=y5.checkUnknownRules=y5.alwaysValidSchema=y5.toHash=void 0;var Ge=ue(),Fve=fl();function Rve(e){let t={};for(let r of e)t[r]=!0;return t}y5.toHash=Rve;function Ove(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return f5(e,t),!p5(t,e.self.RULES.all)}y5.alwaysValidSchema=Ove;function f5(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let i=n.RULES.keywords;for(let s in t)if(!i[s])g5(e,`unknown keyword: "${s}"`)}y5.checkUnknownRules=f5;function p5(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}y5.schemaHasRules=p5;function Ave(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}y5.schemaHasRulesButRef=Ave;function kve({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return Ge._`${r}`}return Ge._`${e}${t}${(0,Ge.getProperty)(n)}`}y5.schemaRefOrVal=kve;function Pve(e){return m5(decodeURIComponent(e))}y5.unescapeFragment=Pve;function Ive(e){return encodeURIComponent(Gb(e))}y5.escapeFragment=Ive;function Gb(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}y5.escapeJsonPointer=Gb;function m5(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}y5.unescapeJsonPointer=m5;function Tve(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}y5.eachItem=Tve;function l5({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,s,o,a)=>{let c=o===void 0?s:o instanceof Ge.Name?(s instanceof Ge.Name?e(i,s,o):t(i,s,o),o):s instanceof Ge.Name?(t(i,o,s),s):r(s,o);return a===Ge.Name&&!(c instanceof Ge.Name)?n(i,c):c}}y5.mergeEvaluated={props:l5({mergeNames:(e,t,r)=>e.if(Ge._`${r} !== true && ${t} !== undefined`,()=>{e.if(Ge._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,Ge._`${r} || {}`).code(Ge._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(Ge._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,Ge._`${r} || {}`),Kb(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:h5}),items:l5({mergeNames:(e,t,r)=>e.if(Ge._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,Ge._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(Ge._`${r} !== true`,()=>e.assign(r,t===!0?!0:Ge._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function h5(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",Ge._`{}`);if(t!==void 0)Kb(e,r,t);return r}y5.evaluatedPropsToName=h5;function Kb(e,t,r){Object.keys(r).forEach((n)=>e.assign(Ge._`${t}${(0,Ge.getProperty)(n)}`,!0))}y5.setEvaluated=Kb;var d5={};function Nve(e,t){return e.scopeValue("func",{ref:t,code:d5[t.code]||(d5[t.code]=new Fve._Code(t.code))})}y5.useFunc=Nve;var Wb;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Wb||(y5.Type=Wb={}));function qve(e,t,r){if(e instanceof Ge.Name){let n=t===Wb.Num;return r?n?Ge._`"[" + ${e} + "]"`:Ge._`"['" + ${e} + "']"`:n?Ge._`"/" + ${e}`:Ge._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Ge.getProperty)(e).toString():"/"+Gb(e)}y5.getErrorPath=qve;function g5(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}y5.checkStrictMode=g5});var Lr=h(function(b5){Object.defineProperty(b5,"__esModule",{value:!0});var qt=ue(),t_e={data:new qt.Name("data"),valCxt:new qt.Name("valCxt"),instancePath:new qt.Name("instancePath"),parentData:new qt.Name("parentData"),parentDataProperty:new qt.Name("parentDataProperty"),rootData:new qt.Name("rootData"),dynamicAnchors:new qt.Name("dynamicAnchors"),vErrors:new qt.Name("vErrors"),errors:new qt.Name("errors"),this:new qt.Name("this"),self:new qt.Name("self"),scope:new qt.Name("scope"),json:new qt.Name("json"),jsonPos:new qt.Name("jsonPos"),jsonLen:new qt.Name("jsonLen"),jsonPart:new qt.Name("jsonPart")};b5.default=t_e});var ml=h(function(w5){Object.defineProperty(w5,"__esModule",{value:!0});w5.extendErrors=w5.resetErrorsCount=w5.reportExtraError=w5.reportError=w5.keyword$DataError=w5.keywordError=void 0;var Ce=ue(),Zp=be(),Kt=Lr();w5.keywordError={message:({keyword:e})=>Ce.str`must pass "${e}" keyword validation`};w5.keyword$DataError={message:({keyword:e,schemaType:t})=>t?Ce.str`"${e}" keyword must be ${t} ($data)`:Ce.str`"${e}" keyword is invalid ($data)`};function n_e(e,t=w5.keywordError,r,n){let{it:i}=e,{gen:s,compositeRule:o,allErrors:a}=i,c=D5(e,t,r);if(n!==null&&n!==void 0?n:o||a)v5(s,c);else _5(i,Ce._`[${c}]`)}w5.reportError=n_e;function i_e(e,t=w5.keywordError,r){let{it:n}=e,{gen:i,compositeRule:s,allErrors:o}=n,a=D5(e,t,r);if(v5(i,a),!(s||o))_5(n,Kt.default.vErrors)}w5.reportExtraError=i_e;function s_e(e,t){e.assign(Kt.default.errors,t),e.if(Ce._`${Kt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(Ce._`${Kt.default.vErrors}.length`,t),()=>e.assign(Kt.default.vErrors,null)))}w5.resetErrorsCount=s_e;function o_e({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:s}){if(i===void 0)throw Error("ajv implementation error");let o=e.name("err");e.forRange("i",i,Kt.default.errors,(a)=>{if(e.const(o,Ce._`${Kt.default.vErrors}[${a}]`),e.if(Ce._`${o}.instancePath === undefined`,()=>e.assign(Ce._`${o}.instancePath`,(0,Ce.strConcat)(Kt.default.instancePath,s.errorPath))),e.assign(Ce._`${o}.schemaPath`,Ce.str`${s.errSchemaPath}/${t}`),s.opts.verbose)e.assign(Ce._`${o}.schema`,r),e.assign(Ce._`${o}.data`,n)})}w5.extendErrors=o_e;function v5(e,t){let r=e.const("err",t);e.if(Ce._`${Kt.default.vErrors} === null`,()=>e.assign(Kt.default.vErrors,Ce._`[${r}]`),Ce._`${Kt.default.vErrors}.push(${r})`),e.code(Ce._`${Kt.default.errors}++`)}function _5(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;if(i.$async)r.throw(Ce._`new ${e.ValidationError}(${t})`);else r.assign(Ce._`${n}.errors`,t),r.return(!1)}var mo={keyword:new Ce.Name("keyword"),schemaPath:new Ce.Name("schemaPath"),params:new Ce.Name("params"),propertyName:new Ce.Name("propertyName"),message:new Ce.Name("message"),schema:new Ce.Name("schema"),parentSchema:new Ce.Name("parentSchema")};function D5(e,t,r){let{createErrors:n}=e.it;if(n===!1)return Ce._`{}`;return a_e(e,t,r)}function a_e(e,t,r={}){let{gen:n,it:i}=e,s=[c_e(i,r),u_e(e,r)];return l_e(e,t,s),n.object(...s)}function c_e({errorPath:e},{instancePath:t}){let r=t?Ce.str`${e}${(0,Zp.getErrorPath)(t,Zp.Type.Str)}`:e;return[Kt.default.instancePath,(0,Ce.strConcat)(Kt.default.instancePath,r)]}function u_e({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:Ce.str`${t}/${e}`;if(r)i=Ce.str`${i}${(0,Zp.getErrorPath)(r,Zp.Type.Str)}`;return[mo.schemaPath,i]}function l_e(e,{params:t,message:r},n){let{keyword:i,data:s,schemaValue:o,it:a}=e,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:f}=a;if(n.push([mo.keyword,i],[mo.params,typeof t=="function"?t(e):t||Ce._`{}`]),c.messages)n.push([mo.message,typeof r=="function"?r(e):r]);if(c.verbose)n.push([mo.schema,o],[mo.parentSchema,Ce._`${d}${f}`],[Kt.default.data,s]);if(l)n.push([mo.propertyName,l])}});var F5=h(function($5){Object.defineProperty($5,"__esModule",{value:!0});$5.boolOrEmptySchema=$5.topBoolOrEmptySchema=void 0;var h_e=ml(),g_e=ue(),y_e=Lr(),x_e={message:"boolean schema is false"};function b_e(e){let{gen:t,schema:r,validateName:n}=e;if(r===!1)S5(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(y_e.default.data);else t.assign(g_e._`${n}.errors`,null),t.return(!0)}$5.topBoolOrEmptySchema=b_e;function v_e(e,t){let{gen:r,schema:n}=e;if(n===!1)r.var(t,!1),S5(e);else r.var(t,!0)}$5.boolOrEmptySchema=v_e;function S5(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,h_e.reportError)(i,x_e,void 0,t)}});var Jb=h(function(R5){Object.defineProperty(R5,"__esModule",{value:!0});R5.getRules=R5.isJSONType=void 0;var D_e=["string","number","integer","boolean","null","object","array"],w_e=new Set(D_e);function E_e(e){return typeof e=="string"&&w_e.has(e)}R5.isJSONType=E_e;function S_e(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}R5.getRules=S_e});var Xb=h(function(P5){Object.defineProperty(P5,"__esModule",{value:!0});P5.shouldUseRule=P5.shouldUseGroup=P5.schemaHasRulesForType=void 0;function C_e({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&A5(e,n)}P5.schemaHasRulesForType=C_e;function A5(e,t){return t.rules.some((r)=>k5(e,r))}P5.shouldUseGroup=A5;function k5(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((n)=>e[n]!==void 0))}P5.shouldUseRule=k5});var hl=h(function(j5){Object.defineProperty(j5,"__esModule",{value:!0});j5.reportTypeError=j5.checkDataTypes=j5.checkDataType=j5.coerceAndCheckDataType=j5.getJSONTypes=j5.getSchemaTypes=j5.DataType=void 0;var O_e=Jb(),A_e=Xb(),k_e=ml(),fe=ue(),T5=be(),Za;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Za||(j5.DataType=Za={}));function P_e(e){let t=N5(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}j5.getSchemaTypes=P_e;function N5(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(O_e.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}j5.getJSONTypes=N5;function I_e(e,t){let{gen:r,data:n,opts:i}=e,s=T_e(t,i.coerceTypes),o=t.length>0&&!(s.length===0&&t.length===1&&(0,A_e.schemaHasRulesForType)(e,t[0]));if(o){let a=Zb(t,n,i.strictNumbers,Za.Wrong);r.if(a,()=>{if(s.length)N_e(e,t,s);else ev(e)})}return o}j5.coerceAndCheckDataType=I_e;var q5=new Set(["string","number","integer","boolean","null"]);function T_e(e,t){return t?e.filter((r)=>q5.has(r)||t==="array"&&r==="array"):[]}function N_e(e,t,r){let{gen:n,data:i,opts:s}=e,o=n.let("dataType",fe._`typeof ${i}`),a=n.let("coerced",fe._`undefined`);if(s.coerceTypes==="array")n.if(fe._`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,fe._`${i}[0]`).assign(o,fe._`typeof ${i}`).if(Zb(t,i,s.strictNumbers),()=>n.assign(a,i)));n.if(fe._`${a} !== undefined`);for(let l of r)if(q5.has(l)||l==="array"&&s.coerceTypes==="array")c(l);n.else(),ev(e),n.endIf(),n.if(fe._`${a} !== undefined`,()=>{n.assign(i,a),q_e(e,a)});function c(l){switch(l){case"string":n.elseIf(fe._`${o} == "number" || ${o} == "boolean"`).assign(a,fe._`"" + ${i}`).elseIf(fe._`${i} === null`).assign(a,fe._`""`);return;case"number":n.elseIf(fe._`${o} == "boolean" || ${i} === null
|
|
86
86
|
|| (${o} == "string" && ${i} && ${i} == +${i})`).assign(a,fe._`+${i}`);return;case"integer":n.elseIf(fe._`${o} === "boolean" || ${i} === null
|
|
87
87
|
|| (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,fe._`+${i}`);return;case"boolean":n.elseIf(fe._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf(fe._`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf(fe._`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf(fe._`${o} === "string" || ${o} === "number"
|
|
88
|
-
|| ${o} === "boolean" || ${i} === null`).assign(a,fe._`[${i}]`)}}}function q_e({gen:e,parentData:t,parentDataProperty:r},n){e.if(fe._`${t} !== undefined`,()=>e.assign(fe._`${t}[${r}]`,n))}function Qb(e,t,r,n=Za.Correct){let i=n===Za.Correct?fe.operators.EQ:fe.operators.NEQ,s;switch(e){case"null":return fe._`${t} ${i} null`;case"array":s=fe._`Array.isArray(${t})`;break;case"object":s=fe._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=o(fe._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=o();break;default:return fe._`typeof ${t} ${i} ${e}`}return n===Za.Correct?s:(0,fe.not)(s);function o(a=fe.nil){return(0,fe.and)(fe._`typeof ${t} == "number"`,a,r?fe._`isFinite(${t})`:fe.nil)}}j5.checkDataType=Qb;function Zb(e,t,r,n){if(e.length===1)return Qb(e[0],t,r,n);let i,s=(0,T5.toHash)(e);if(s.array&&s.object){let o=fe._`typeof ${t} != "object"`;i=s.null?o:fe._`!${t} || ${o}`,delete s.null,delete s.array,delete s.object}else i=fe.nil;if(s.number)delete s.integer;for(let o in s)i=(0,fe.and)(i,Qb(o,t,r,n));return i}j5.checkDataTypes=Zb;var j_e={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?fe._`{type: ${e}}`:fe._`{type: ${t}}`};function ev(e){let t=M_e(e);(0,k_e.reportError)(t,j_e)}j5.reportTypeError=ev;function M_e(e){let{gen:t,data:r,schema:n}=e,i=(0,T5.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var V5=h(function(L5){Object.defineProperty(L5,"__esModule",{value:!0});L5.assignDefaults=void 0;var ec=ue(),W_e=be();function G_e(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)B5(e,i,r[i].default);else if(t==="array"&&Array.isArray(n))n.forEach((i,s)=>B5(e,s,i.default))}L5.assignDefaults=G_e;function B5(e,t,r){let{gen:n,compositeRule:i,data:s,opts:o}=e;if(r===void 0)return;let a=ec._`${s}${(0,ec.getProperty)(t)}`;if(i){(0,W_e.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=ec._`${a} === undefined`;if(o.useDefaults==="empty")c=ec._`${c} || ${a} === null || ${a} === ""`;n.if(c,ec._`${a} = ${(0,ec.stringify)(r)}`)}});var Ur=h(function(W5){Object.defineProperty(W5,"__esModule",{value:!0});W5.validateUnion=W5.validateArray=W5.usePattern=W5.callValidateCode=W5.schemaProperties=W5.allSchemaProperties=W5.noPropertyInData=W5.propertyInData=W5.isOwnProperty=W5.hasPropFunc=W5.reportMissingProp=W5.checkMissingProp=W5.checkReportMissingProp=void 0;var Xe=ue(),tv=be(),vs=Lr(),K_e=be();function Y_e(e,t){let{gen:r,data:n,it:i}=e;r.if(nv(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:Xe._`${t}`},!0),e.error()})}W5.checkReportMissingProp=Y_e;function J_e({gen:e,data:t,it:{opts:r}},n,i){return(0,Xe.or)(...n.map((s)=>(0,Xe.and)(nv(e,t,s,r.ownProperties),Xe._`${i} = ${s}`)))}W5.checkMissingProp=J_e;function X_e(e,t){e.setParams({missingProperty:t},!0),e.error()}W5.reportMissingProp=X_e;function z5(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:Xe._`Object.prototype.hasOwnProperty`})}W5.hasPropFunc=z5;function rv(e,t,r){return Xe._`${z5(e)}.call(${t}, ${r})`}W5.isOwnProperty=rv;function Q_e(e,t,r,n){let i=Xe._`${t}${(0,Xe.getProperty)(r)} !== undefined`;return n?Xe._`${i} && ${rv(e,t,r)}`:i}W5.propertyInData=Q_e;function nv(e,t,r,n){let i=Xe._`${t}${(0,Xe.getProperty)(r)} === undefined`;return n?(0,Xe.or)(i,(0,Xe.not)(rv(e,t,r))):i}W5.noPropertyInData=nv;function H5(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}W5.allSchemaProperties=H5;function Z_e(e,t){return H5(t).filter((r)=>!(0,tv.alwaysValidSchema)(e,t[r]))}W5.schemaProperties=Z_e;function eDe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:o},a,c,l){let d=l?Xe._`${e}, ${t}, ${n}${i}`:t,f=[[vs.default.instancePath,(0,Xe.strConcat)(vs.default.instancePath,s)],[vs.default.parentData,o.parentData],[vs.default.parentDataProperty,o.parentDataProperty],[vs.default.rootData,vs.default.rootData]];if(o.opts.dynamicRef)f.push([vs.default.dynamicAnchors,vs.default.dynamicAnchors]);let m=Xe._`${d}, ${r.object(...f)}`;return c!==Xe.nil?Xe._`${a}.call(${c}, ${m})`:Xe._`${a}(${m})`}W5.callValidateCode=eDe;var tDe=Xe._`new RegExp`;function rDe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:Xe._`${i.code==="new RegExp"?tDe:(0,K_e.useFunc)(e,i)}(${r}, ${n})`})}W5.usePattern=rDe;function nDe(e){let{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){let a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){let c=t.const("len",Xe._`${r}.length`);t.forRange("i",0,c,(l)=>{e.subschema({keyword:n,dataProp:l,dataPropType:tv.Type.Num},s),t.if((0,Xe.not)(s),a)})}}W5.validateArray=nDe;function iDe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>(0,tv.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let d=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);if(t.assign(o,Xe._`${o} || ${a}`),!e.mergeValidEvaluated(d,a))t.if((0,Xe.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}W5.validateUnion=iDe});var Q5=h(function(J5){Object.defineProperty(J5,"__esModule",{value:!0});J5.validateKeywordUsage=J5.validSchemaType=J5.funcKeywordCode=J5.macroKeywordCode=void 0;var Yt=ue(),ho=Lr(),yDe=Ur(),xDe=ml();function bDe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:s,it:o}=e,a=t.macro.call(o.self,i,s,o),c=Y5(r,n,a);if(o.opts.validateSchema!==!1)o.self.validateSchema(a,!0);let l=r.name("valid");e.subschema({schema:a,schemaPath:Yt.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}J5.macroKeywordCode=bDe;function vDe(e,t){var r;let{gen:n,keyword:i,schema:s,parentSchema:o,$data:a,it:c}=e;DDe(c,t);let l=!a&&t.compile?t.compile.call(c.self,s,o,c):t.validate,d=Y5(n,i,l),f=n.let("valid");e.block$data(f,m),e.ok((r=t.valid)!==null&&r!==void 0?r:f);function m(){if(t.errors===!1){if(y(),t.modifying)K5(e);x(()=>e.error())}else{let v=t.async?p():g();if(t.modifying)K5(e);x(()=>_De(e,v))}}function p(){let v=n.let("ruleErrs",null);return n.try(()=>y(Yt._`await `),(_)=>n.assign(f,!1).if(Yt._`${_} instanceof ${c.ValidationError}`,()=>n.assign(v,Yt._`${_}.errors`),()=>n.throw(_))),v}function g(){let v=Yt._`${d}.errors`;return n.assign(v,null),y(Yt.nil),v}function y(v=t.async?Yt._`await `:Yt.nil){let _=c.opts.passContext?ho.default.this:ho.default.self,E=!(("compile"in t)&&!a||t.schema===!1);n.assign(f,Yt._`${v}${(0,yDe.callValidateCode)(e,d,_,E)}`,t.modifying)}function x(v){var _;n.if((0,Yt.not)((_=t.valid)!==null&&_!==void 0?_:f),v)}}J5.funcKeywordCode=vDe;function K5(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,Yt._`${n.parentData}[${n.parentDataProperty}]`))}function _De(e,t){let{gen:r}=e;r.if(Yt._`Array.isArray(${t})`,()=>{r.assign(ho.default.vErrors,Yt._`${ho.default.vErrors} === null ? ${t} : ${ho.default.vErrors}.concat(${t})`).assign(ho.default.errors,Yt._`${ho.default.vErrors}.length`),(0,xDe.extendErrors)(e)},()=>e.error())}function DDe({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function Y5(e,t,r){if(r===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Yt.stringify)(r)})}function wDe(e,t,r=!1){return!t.length||t.some((n)=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}J5.validSchemaType=wDe;function EDe({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw Error("ajv implementation error");let o=i.dependencies;if(o===null||o===void 0?void 0:o.some((a)=>!Object.prototype.hasOwnProperty.call(e,a)))throw Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(i.validateSchema){if(!i.validateSchema(e[s])){let c=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw Error(c)}}}J5.validateKeywordUsage=EDe});var rN=h(function(eN){Object.defineProperty(eN,"__esModule",{value:!0});eN.extendSubschemaMode=eN.extendSubschemaData=eN.getSubschema=void 0;var Gn=ue(),Z5=be();function FDe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:Gn._`${e.schemaPath}${(0,Gn.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:Gn._`${e.schemaPath}${(0,Gn.getProperty)(t)}${(0,Gn.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Z5.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||o===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')}eN.getSubschema=FDe;function RDe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:o}){if(i!==void 0&&r!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:l,dataPathArr:d,opts:f}=t,m=a.let("data",Gn._`${t.data}${(0,Gn.getProperty)(r)}`,!0);c(m),e.errorPath=Gn.str`${l}${(0,Z5.getErrorPath)(r,n,f.jsPropertySyntax)}`,e.parentDataProperty=Gn._`${r}`,e.dataPathArr=[...d,e.parentDataProperty]}if(i!==void 0){let l=i instanceof Gn.Name?i:a.let("data",i,!0);if(c(l),o!==void 0)e.propertyName=o}if(s)e.dataTypes=s;function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}eN.extendSubschemaData=RDe;function ODe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){if(n!==void 0)e.compositeRule=n;if(i!==void 0)e.createErrors=i;if(s!==void 0)e.allErrors=s;e.jtdDiscriminator=t,e.jtdMetadata=r}eN.extendSubschemaMode=ODe});var gl=h(function(XWe,nN){nN.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r}});var iv=h(function(QWe,iN){var _s=iN.exports=function(e,t,r){if(typeof t=="function")r=t,t={};r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};e0(t,n,i,e,"",e)};_s.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};_s.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};_s.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};_s.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 e0(e,t,r,n,i,s,o,a,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,s,o,a,c,l);for(var d in n){var f=n[d];if(Array.isArray(f)){if(d in _s.arrayKeywords)for(var m=0;m<f.length;m++)e0(e,t,r,f[m],i+"/"+d+"/"+m,s,i,d,n,m)}else if(d in _s.propsKeywords){if(f&&typeof f=="object")for(var p in f)e0(e,t,r,f[p],i+"/"+d+"/"+PDe(p),s,i,d,n,p)}else if(d in _s.keywords||e.allKeys&&!(d in _s.skipKeywords))e0(e,t,r,f,i+"/"+d,s,i,d,n)}r(n,i,s,o,a,c,l)}}function PDe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var yl=h(function(cN){Object.defineProperty(cN,"__esModule",{value:!0});cN.getSchemaRefs=cN.resolveUrl=cN.normalizeId=cN._getFullPath=cN.getFullPath=cN.inlineRef=void 0;var IDe=be(),TDe=gl(),NDe=iv(),qDe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function jDe(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!sv(e);if(!t)return!1;return sN(e)<=t}cN.inlineRef=jDe;var MDe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function sv(e){for(let t in e){if(MDe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(sv))return!0;if(typeof r=="object"&&sv(r))return!0}return!1}function sN(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,qDe.has(r))continue;if(typeof e[r]=="object")(0,IDe.eachItem)(e[r],(n)=>t+=sN(n));if(t===1/0)return 1/0}return t}function oN(e,t="",r){if(r!==!1)t=tc(t);let n=e.parse(t);return aN(e,n)}cN.getFullPath=oN;function aN(e,t){return e.serialize(t).split("#")[0]+"#"}cN._getFullPath=aN;var BDe=/#\/?$/;function tc(e){return e?e.replace(BDe,""):""}cN.normalizeId=tc;function LDe(e,t,r){return r=tc(r),e.resolve(t,r)}cN.resolveUrl=LDe;var UDe=/^[a-z_][-a-z0-9._]*$/i;function VDe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=tc(e[r]||t),s={"":i},o=oN(n,i,!1),a={},c=new Set;return NDe(e,{allKeys:!0},(f,m,p,g)=>{if(g===void 0)return;let y=o+m,x=s[g];if(typeof f[r]=="string")x=v.call(this,f[r]);_.call(this,f.$anchor),_.call(this,f.$dynamicAnchor),s[m]=x;function v(E){let C=this.opts.uriResolver.resolve;if(E=tc(x?C(x,E):E),c.has(E))throw d(E);c.add(E);let D=this.refs[E];if(typeof D=="string")D=this.refs[D];if(typeof D=="object")l(f,D.schema,E);else if(E!==tc(y))if(E[0]==="#")l(f,a[E],E),a[E]=f;else this.refs[E]=y;return E}function _(E){if(typeof E=="string"){if(!UDe.test(E))throw Error(`invalid anchor "${E}"`);v.call(this,`#${E}`)}}}),a;function l(f,m,p){if(m!==void 0&&!TDe(f,m))throw d(p)}function d(f){return Error(`reference "${f}" resolves to more than one schema`)}}cN.getSchemaRefs=VDe});var vl=h(function(EN){Object.defineProperty(EN,"__esModule",{value:!0});EN.getData=EN.KeywordCxt=EN.validateFunctionCode=void 0;var mN=F5(),lN=hl(),av=Xb(),t0=hl(),YDe=V5(),bl=Q5(),ov=rN(),Y=ue(),te=Lr(),JDe=yl(),_i=be(),xl=ml();function XDe(e){if(yN(e)){if(xN(e),gN(e)){ewe(e);return}}hN(e,()=>(0,mN.topBoolOrEmptySchema)(e))}EN.validateFunctionCode=XDe;function hN({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){if(i.code.es5)e.func(t,Y._`${te.default.data}, ${te.default.valCxt}`,n.$async,()=>{e.code(Y._`"use strict"; ${dN(r,i)}`),ZDe(e,i),e.code(s)});else e.func(t,Y._`${te.default.data}, ${QDe(i)}`,n.$async,()=>e.code(dN(r,i)).code(s))}function QDe(e){return Y._`{${te.default.instancePath}="", ${te.default.parentData}, ${te.default.parentDataProperty}, ${te.default.rootData}=${te.default.data}${e.dynamicRef?Y._`, ${te.default.dynamicAnchors}={}`:Y.nil}}={}`}function ZDe(e,t){e.if(te.default.valCxt,()=>{if(e.var(te.default.instancePath,Y._`${te.default.valCxt}.${te.default.instancePath}`),e.var(te.default.parentData,Y._`${te.default.valCxt}.${te.default.parentData}`),e.var(te.default.parentDataProperty,Y._`${te.default.valCxt}.${te.default.parentDataProperty}`),e.var(te.default.rootData,Y._`${te.default.valCxt}.${te.default.rootData}`),t.dynamicRef)e.var(te.default.dynamicAnchors,Y._`${te.default.valCxt}.${te.default.dynamicAnchors}`)},()=>{if(e.var(te.default.instancePath,Y._`""`),e.var(te.default.parentData,Y._`undefined`),e.var(te.default.parentDataProperty,Y._`undefined`),e.var(te.default.rootData,te.default.data),t.dynamicRef)e.var(te.default.dynamicAnchors,Y._`{}`)})}function ewe(e){let{schema:t,opts:r,gen:n}=e;hN(e,()=>{if(r.$comment&&t.$comment)vN(e);if(swe(e),n.let(te.default.vErrors,null),n.let(te.default.errors,0),r.unevaluated)twe(e);bN(e),cwe(e)});return}function twe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",Y._`${r}.evaluated`),t.if(Y._`${e.evaluated}.dynamicProps`,()=>t.assign(Y._`${e.evaluated}.props`,Y._`undefined`)),t.if(Y._`${e.evaluated}.dynamicItems`,()=>t.assign(Y._`${e.evaluated}.items`,Y._`undefined`))}function dN(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?Y._`/*# sourceURL=${r} */`:Y.nil}function rwe(e,t){if(yN(e)){if(xN(e),gN(e)){nwe(e,t);return}}(0,mN.boolOrEmptySchema)(e,t)}function gN({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function yN(e){return typeof e.schema!="boolean"}function nwe(e,t){let{schema:r,gen:n,opts:i}=e;if(i.$comment&&r.$comment)vN(e);owe(e),awe(e);let s=n.const("_errs",te.default.errors);bN(e,s),n.var(t,Y._`${s} === ${te.default.errors}`)}function xN(e){(0,_i.checkUnknownRules)(e),iwe(e)}function bN(e,t){if(e.opts.jtd)return fN(e,[],!1,t);let r=(0,lN.getSchemaTypes)(e.schema),n=(0,lN.coerceAndCheckDataType)(e,r);fN(e,r,!n,t)}function iwe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;if(t.$ref&&n.ignoreKeywordsWithRef&&(0,_i.schemaHasRulesButRef)(t,i.RULES))i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function swe(e){let{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema)(0,_i.checkStrictMode)(e,"default is ignored in the schema root")}function owe(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=(0,JDe.resolveUrl)(e.opts.uriResolver,e.baseId,t)}function awe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function vN({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)e.code(Y._`${te.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){let o=Y.str`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(Y._`${te.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function cwe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;if(r.$async)t.if(Y._`${te.default.errors} === 0`,()=>t.return(te.default.data),()=>t.throw(Y._`new ${i}(${te.default.vErrors})`));else{if(t.assign(Y._`${n}.errors`,te.default.vErrors),s.unevaluated)uwe(e);t.return(Y._`${te.default.errors} === 0`)}}function uwe({gen:e,evaluated:t,props:r,items:n}){if(r instanceof Y.Name)e.assign(Y._`${t}.props`,r);if(n instanceof Y.Name)e.assign(Y._`${t}.items`,n)}function fN(e,t,r,n){let{gen:i,schema:s,data:o,allErrors:a,opts:c,self:l}=e,{RULES:d}=l;if(s.$ref&&(c.ignoreKeywordsWithRef||!(0,_i.schemaHasRulesButRef)(s,d))){i.block(()=>DN(e,"$ref",d.all.$ref.definition));return}if(!c.jtd)lwe(e,t);i.block(()=>{for(let m of d.rules)f(m);f(d.post)});function f(m){if(!(0,av.shouldUseGroup)(s,m))return;if(m.type){if(i.if((0,t0.checkDataType)(m.type,o,c.strictNumbers)),pN(e,m),t.length===1&&t[0]===m.type&&r)i.else(),(0,t0.reportTypeError)(e);i.endIf()}else pN(e,m);if(!a)i.if(Y._`${te.default.errors} === ${n||0}`)}}function pN(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;if(i)(0,YDe.assignDefaults)(e,t.type);r.block(()=>{for(let s of t.rules)if((0,av.shouldUseRule)(n,s))DN(e,s.keyword,s.definition,t.type)})}function lwe(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(dwe(e,t),!e.opts.allowUnionTypes)fwe(e,t);pwe(e,e.dataTypes)}function dwe(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!_N(e.dataTypes,r))cv(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),hwe(e,t)}function fwe(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))cv(e,"use allowUnionTypes to allow union type keyword")}function pwe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,av.shouldUseRule)(e.schema,i)){let{type:s}=i.definition;if(s.length&&!s.some((o)=>mwe(t,o)))cv(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function mwe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function _N(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function hwe(e,t){let r=[];for(let n of e.dataTypes)if(_N(t,n))r.push(n);else if(t.includes("integer")&&n==="number")r.push("integer");e.dataTypes=r}function cv(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,_i.checkStrictMode)(e,t,e.opts.strictTypes)}class uv{constructor(e,t,r){if((0,bl.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,_i.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",wN(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,bl.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",te.default.errors)}result(e,t,r){this.failResult((0,Y.not)(e),t,r)}failResult(e,t,r){if(this.gen.if(e),r)r();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult((0,Y.not)(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(Y._`${t} !== undefined && (${(0,Y.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?xl.reportExtraError:xl.reportError)(this,this.def.error,t)}$dataError(){(0,xl.reportError)(this,this.def.$dataError||xl.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,xl.resetErrorsCount)(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=Y.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=Y.nil,t=Y.nil){if(!this.$data)return;let{gen:r,schemaCode:n,schemaType:i,def:s}=this;if(r.if((0,Y.or)(Y._`${n} === undefined`,t)),e!==Y.nil)r.assign(e,!0);if(i.length||s.validateSchema){if(r.elseIf(this.invalid$data()),this.$dataError(),e!==Y.nil)r.assign(e,!1)}r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,Y.or)(s(),o());function s(){if(r.length){if(!(t instanceof Y.Name))throw Error("ajv implementation error");let a=Array.isArray(r)?r:[r];return Y._`${(0,t0.checkDataTypes)(a,t,i.opts.strictNumbers,t0.DataType.Wrong)}`}return Y.nil}function o(){if(n.validateSchema){let a=e.scopeValue("validate$data",{ref:n.validateSchema});return Y._`!${a}(${t})`}return Y.nil}}subschema(e,t){let r=(0,ov.getSubschema)(this.it,e);(0,ov.extendSubschemaData)(r,this.it,e),(0,ov.extendSubschemaMode)(r,e);let n={...this.it,...r,items:void 0,props:void 0};return rwe(n,t),n}mergeEvaluated(e,t){let{it:r,gen:n}=this;if(!r.opts.unevaluated)return;if(r.props!==!0&&e.props!==void 0)r.props=_i.mergeEvaluated.props(n,e.props,r.props,t);if(r.items!==!0&&e.items!==void 0)r.items=_i.mergeEvaluated.items(n,e.items,r.items,t)}mergeValidEvaluated(e,t){let{it:r,gen:n}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return n.if(t,()=>this.mergeEvaluated(e,Y.Name)),!0}}EN.KeywordCxt=uv;function DN(e,t,r,n){let i=new uv(e,r,t);if("code"in r)r.code(i,n);else if(i.$data&&r.validate)(0,bl.funcKeywordCode)(i,r);else if("macro"in r)(0,bl.macroKeywordCode)(i,r);else if(r.compile||r.validate)(0,bl.funcKeywordCode)(i,r)}var gwe=/^\/(?:[^~]|~0|~1)*$/,ywe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function wN(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return te.default.rootData;if(e[0]==="/"){if(!gwe.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,s=te.default.rootData}else{let l=ywe.exec(e);if(!l)throw Error(`Invalid JSON-pointer: ${e}`);let d=+l[1];if(i=l[2],i==="#"){if(d>=t)throw Error(c("property/index",d));return n[t-d]}if(d>t)throw Error(c("data",d));if(s=r[t-d],!i)return s}let o=s,a=i.split("/");for(let l of a)if(l)s=Y._`${s}${(0,Y.getProperty)((0,_i.unescapeJsonPointer)(l))}`,o=Y._`${o} && ${s}`;return o;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}EN.getData=wN});var r0=h(function(CN){Object.defineProperty(CN,"__esModule",{value:!0});class $N extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}CN.default=$N});var _l=h(function(RN){Object.defineProperty(RN,"__esModule",{value:!0});var lv=yl();class FN extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`);this.missingRef=(0,lv.resolveUrl)(e,t,r),this.missingSchema=(0,lv.normalizeId)((0,lv.getFullPath)(e,this.missingRef))}}RN.default=FN});var wl=h(function(kN){Object.defineProperty(kN,"__esModule",{value:!0});kN.resolveSchema=kN.getCompilingSchema=kN.resolveRef=kN.compileSchema=kN.SchemaEnv=void 0;var cn=ue(),Dwe=r0(),go=Lr(),un=yl(),ON=be(),wwe=vl();class Dl{constructor(e){var t;this.refs={},this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,un.normalizeId)(r===null||r===void 0?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r===null||r===void 0?void 0:r.$async,this.refs={}}}kN.SchemaEnv=Dl;function fv(e){let t=AN.call(this,e);if(t)return t;let r=(0,un.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new cn.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),a;if(e.$async)a=o.scopeValue("Error",{ref:Dwe.default,code:cn._`require("ajv/dist/runtime/validation_error").default`});let c=o.scopeName("validate");e.validateName=c;let l={gen:o,allErrors:this.opts.allErrors,data:go.default.data,parentData:go.default.parentData,parentDataProperty:go.default.parentDataProperty,dataNames:[go.default.data],dataPathArr:[cn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,cn.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:cn.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:cn._`""`,opts:this.opts,self:this},d;try{this._compilations.add(e),(0,wwe.validateFunctionCode)(l),o.optimize(this.opts.code.optimize);let f=o.toString();if(d=`${o.scopeRefs(go.default.scope)}return ${f}`,this.opts.code.process)d=this.opts.code.process(d,e);let p=Function(`${go.default.self}`,`${go.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async)p.$async=!0;if(this.opts.code.source===!0)p.source={validateName:c,validateCode:f,scopeValues:o._values};if(this.opts.unevaluated){let{props:g,items:y}=l;if(p.evaluated={props:g instanceof cn.Name?void 0:g,items:y instanceof cn.Name?void 0:y,dynamicProps:g instanceof cn.Name,dynamicItems:y instanceof cn.Name},p.source)p.source.evaluated=(0,cn.stringify)(p.evaluated)}return e.validate=p,e}catch(f){if(delete e.validate,delete e.validateName,d)this.logger.error("Error compiling schema, function code:",d);throw f}finally{this._compilations.delete(e)}}kN.compileSchema=fv;function Ewe(e,t,r){var n;r=(0,un.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let s=Cwe.call(this,e,r);if(s===void 0){let o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;if(o)s=new Dl({schema:o,schemaId:a,root:e,baseId:t})}if(s===void 0)return;return e.refs[r]=Swe.call(this,s)}kN.resolveRef=Ewe;function Swe(e){if((0,un.inlineRef)(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:fv.call(this,e)}function AN(e){for(let t of this._compilations)if($we(t,e))return t}kN.getCompilingSchema=AN;function $we(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Cwe(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||n0.call(this,e,t)}function n0(e,t){let r=this.opts.uriResolver.parse(t),n=(0,un._getFullPath)(this.opts.uriResolver,r),i=(0,un.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return dv.call(this,r,e);let s=(0,un.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){let a=n0.call(this,e,o);if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;return dv.call(this,r,a)}if(typeof(o===null||o===void 0?void 0:o.schema)!=="object")return;if(!o.validate)fv.call(this,o);if(s===(0,un.normalizeId)(t)){let{schema:a}=o,{schemaId:c}=this.opts,l=a[c];if(l)i=(0,un.resolveUrl)(this.opts.uriResolver,i,l);return new Dl({schema:a,schemaId:c,root:e,baseId:i})}return dv.call(this,r,o)}kN.resolveSchema=n0;var Fwe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function dv(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;let c=r[(0,ON.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r==="object"&&r[this.opts.schemaId];if(!Fwe.has(a)&&l)t=(0,un.resolveUrl)(this.opts.uriResolver,t,l)}let s;if(typeof r!="boolean"&&r.$ref&&!(0,ON.schemaHasRulesButRef)(r,this.RULES)){let a=(0,un.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=n0.call(this,n,a)}let{schemaId:o}=this.opts;if(s=s||new Dl({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s;return}});var IN=h(function(iGe,Pwe){Pwe.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 mv=h(function(sGe,jN){var Iwe=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),NN=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 pv(e){let t="",r=0,n=0;for(n=0;n<e.length;n++){if(r=e[n].charCodeAt(0),r===48)continue;if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var Twe=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function TN(e){return e.length=0,!0}function Nwe(e,t,r){if(e.length){let n=pv(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function qwe(e){let t=0,r={error:!1,address:"",zone:""},n=[],i=[],s=!1,o=!1,a=Nwe;for(let c=0;c<e.length;c++){let l=e[c];if(l==="["||l==="]")continue;if(l===":"){if(s===!0)o=!0;if(!a(i,n,r))break;if(++t>7){r.error=!0;break}if(c>0&&e[c-1]===":")s=!0;n.push(":");continue}else if(l==="%"){if(!a(i,n,r))break;a=TN}else{i.push(l);continue}}if(i.length)if(a===TN)r.zone=i.join("");else if(o)n.push(i.join(""));else n.push(pv(i));return r.address=n.join(""),r}function qN(e){if(jwe(e,":")<2)return{host:e,isIPV6:!1};let t=qwe(e);if(!t.error){let{address:r,address:n}=t;if(t.zone)r+="%"+t.zone,n+="%25"+t.zone;return{host:r,isIPV6:!0,escapedHost:n}}else return{host:e,isIPV6:!1}}function jwe(e,t){let r=0;for(let n=0;n<e.length;n++)if(e[n]===t)r++;return r}function Mwe(e){let t=e,r=[],n=-1,i=0;while(i=t.length){if(i===1)if(t===".")break;else if(t==="/"){r.push("/");break}else{r.push(t);break}else if(i===2){if(t[0]==="."){if(t[1]===".")break;else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."||t[1]==="/"){r.push("/");break}}}else if(i===3){if(t==="/.."){if(r.length!==0)r.pop();r.push("/");break}}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."){if(t[3]==="/"){if(t=t.slice(3),r.length!==0)r.pop();continue}}}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}function Bwe(e,t){let r=t!==!0?escape:unescape;if(e.scheme!==void 0)e.scheme=r(e.scheme);if(e.userinfo!==void 0)e.userinfo=r(e.userinfo);if(e.host!==void 0)e.host=r(e.host);if(e.path!==void 0)e.path=r(e.path);if(e.query!==void 0)e.query=r(e.query);if(e.fragment!==void 0)e.fragment=r(e.fragment);return e}function Lwe(e){let t=[];if(e.userinfo!==void 0)t.push(e.userinfo),t.push("@");if(e.host!==void 0){let r=unescape(e.host);if(!NN(r)){let n=qN(r);if(n.isIPV6===!0)r=`[${n.escapedHost}]`;else r=e.host}t.push(r)}if(typeof e.port==="number"||typeof e.port==="string")t.push(":"),t.push(String(e.port));return t.length?t.join(""):void 0}jN.exports={nonSimpleDomain:Twe,recomposeAuthority:Lwe,normalizeComponentEncoding:Bwe,removeDotSegments:Mwe,isIPv4:NN,isUUID:Iwe,normalizeIPv6:qN,stringArrayToHexStripped:pv}});var VN=h(function(oGe,UN){var{isUUID:Uwe}=mv(),Vwe=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,zwe=["http","https","ws","wss","urn","urn:uuid"];function Hwe(e){return zwe.indexOf(e)!==-1}function hv(e){if(e.secure===!0)return!0;else if(e.secure===!1)return!1;else if(e.scheme)return e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S");else return!1}function MN(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function BN(e){let t=String(e.scheme).toLowerCase()==="https";if(e.port===(t?443:80)||e.port==="")e.port=void 0;if(!e.path)e.path="/";return e}function Wwe(e){return e.secure=hv(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function Gwe(e){if(e.port===(hv(e)?443:80)||e.port==="")e.port=void 0;if(typeof e.secure==="boolean")e.scheme=e.secure?"wss":"ws",e.secure=void 0;if(e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function Kwe(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(Vwe);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=`${n}:${t.nid||e.nid}`,s=gv(i);if(e.path=void 0,s)e=s.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e}function Ywe(e,t){if(e.nid===void 0)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,s=gv(i);if(s)e=s.serialize(e,t);let o=e,a=e.nss;return o.path=`${n||t.nid}:${a}`,t.skipEscape=!0,o}function Jwe(e,t){let r=e;if(r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!Uwe(r.uuid)))r.error=r.error||"UUID is not valid.";return r}function Xwe(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var LN={scheme:"http",domainHost:!0,parse:MN,serialize:BN},Qwe={scheme:"https",domainHost:LN.domainHost,parse:MN,serialize:BN},i0={scheme:"ws",domainHost:!0,parse:Wwe,serialize:Gwe},Zwe={scheme:"wss",domainHost:i0.domainHost,parse:i0.parse,serialize:i0.serialize},e1e={scheme:"urn",parse:Kwe,serialize:Ywe,skipNormalize:!0},t1e={scheme:"urn:uuid",parse:Jwe,serialize:Xwe,skipNormalize:!0},s0={http:LN,https:Qwe,ws:i0,wss:Zwe,urn:e1e,"urn:uuid":t1e};Object.setPrototypeOf(s0,null);function gv(e){return e&&(s0[e]||s0[e.toLowerCase()])||void 0}UN.exports={wsIsSecure:hv,SCHEMES:s0,isValidSchemeName:Hwe,getSchemeHandler:gv}});var xv=h(function(aGe,a0){var{normalizeIPv6:r1e,removeDotSegments:El,recomposeAuthority:n1e,normalizeComponentEncoding:o0,isIPv4:i1e,nonSimpleDomain:s1e}=mv(),{SCHEMES:o1e,getSchemeHandler:zN}=VN();function a1e(e,t){if(typeof e==="string")e=Kn(Di(e,t),t);else if(typeof e==="object")e=Di(Kn(e,t),t);return e}function c1e(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=HN(Di(e,n),Di(t,n),n,!0);return n.skipEscape=!0,Kn(i,n)}function HN(e,t,r,n){let i={};if(!n)e=Di(Kn(e,r),r),t=Di(Kn(t,r),r);if(r=r||{},!r.tolerant&&t.scheme)i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=El(t.path||""),i.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=El(t.path||""),i.query=t.query;else{if(!t.path)if(i.path=e.path,t.query!==void 0)i.query=t.query;else i.query=e.query;else{if(t.path[0]==="/")i.path=El(t.path);else{if((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path)i.path="/"+t.path;else if(!e.path)i.path=t.path;else i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;i.path=El(i.path)}i.query=t.query}i.userinfo=e.userinfo,i.host=e.host,i.port=e.port}i.scheme=e.scheme}return i.fragment=t.fragment,i}function u1e(e,t,r){if(typeof e==="string")e=unescape(e),e=Kn(o0(Di(e,r),!0),{...r,skipEscape:!0});else if(typeof e==="object")e=Kn(o0(e,!0),{...r,skipEscape:!0});if(typeof t==="string")t=unescape(t),t=Kn(o0(Di(t,r),!0),{...r,skipEscape:!0});else if(typeof t==="object")t=Kn(o0(t,!0),{...r,skipEscape:!0});return e.toLowerCase()===t.toLowerCase()}function Kn(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],s=zN(n.scheme||r.scheme);if(s&&s.serialize)s.serialize(r,n);if(r.path!==void 0)if(!n.skipEscape){if(r.path=escape(r.path),r.scheme!==void 0)r.path=r.path.split("%3A").join(":")}else r.path=unescape(r.path);if(n.reference!=="suffix"&&r.scheme)i.push(r.scheme,":");let o=n1e(r);if(o!==void 0){if(n.reference!=="suffix")i.push("//");if(i.push(o),r.path&&r.path[0]!=="/")i.push("/")}if(r.path!==void 0){let a=r.path;if(!n.absolutePath&&(!s||!s.absolutePath))a=El(a);if(o===void 0&&a[0]==="/"&&a[1]==="/")a="/%2F"+a.slice(2);i.push(a)}if(r.query!==void 0)i.push("?",r.query);if(r.fragment!==void 0)i.push("#",r.fragment);return i.join("")}var l1e=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Di(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1;if(r.reference==="suffix")if(r.scheme)e=r.scheme+":"+e;else e="//"+e;let s=e.match(l1e);if(s){if(n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port))n.port=s[5];if(n.host)if(i1e(n.host)===!1){let c=r1e(n.host);n.host=c.host.toLowerCase(),i=c.isIPV6}else i=!0;if(n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path)n.reference="same-document";else if(n.scheme===void 0)n.reference="relative";else if(n.fragment===void 0)n.reference="absolute";else n.reference="uri";if(r.reference&&r.reference!=="suffix"&&r.reference!==n.reference)n.error=n.error||"URI is not a "+r.reference+" reference.";let o=zN(r.scheme||n.scheme);if(!r.unicodeSupport&&(!o||!o.unicodeSupport)){if(n.host&&(r.domainHost||o&&o.domainHost)&&i===!1&&s1e(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(a){n.error=n.error||"Host's domain name can not be converted to ASCII: "+a}}if(!o||o&&!o.skipNormalize){if(e.indexOf("%")!==-1){if(n.scheme!==void 0)n.scheme=unescape(n.scheme);if(n.host!==void 0)n.host=unescape(n.host)}if(n.path)n.path=escape(unescape(n.path));if(n.fragment)n.fragment=encodeURI(decodeURIComponent(n.fragment))}if(o&&o.parse)o.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var yv={SCHEMES:o1e,normalize:a1e,resolve:c1e,resolveComponent:HN,equal:u1e,serialize:Kn,parse:Di};a0.exports=yv;a0.exports.default=yv;a0.exports.fastUri=yv});var KN=h(function(GN){Object.defineProperty(GN,"__esModule",{value:!0});var WN=xv();WN.code='require("ajv/dist/runtime/uri").default';GN.default=WN});var r9=h(function(wi){Object.defineProperty(wi,"__esModule",{value:!0});wi.CodeGen=wi.Name=wi.nil=wi.stringify=wi.str=wi._=wi.KeywordCxt=void 0;var f1e=vl();Object.defineProperty(wi,"KeywordCxt",{enumerable:!0,get:function(){return f1e.KeywordCxt}});var rc=ue();Object.defineProperty(wi,"_",{enumerable:!0,get:function(){return rc._}});Object.defineProperty(wi,"str",{enumerable:!0,get:function(){return rc.str}});Object.defineProperty(wi,"stringify",{enumerable:!0,get:function(){return rc.stringify}});Object.defineProperty(wi,"nil",{enumerable:!0,get:function(){return rc.nil}});Object.defineProperty(wi,"Name",{enumerable:!0,get:function(){return rc.Name}});Object.defineProperty(wi,"CodeGen",{enumerable:!0,get:function(){return rc.CodeGen}});var p1e=r0(),ZN=_l(),m1e=Jb(),Sl=wl(),h1e=ue(),$l=yl(),c0=hl(),vv=be(),YN=IN(),g1e=KN(),e9=(e,t)=>new RegExp(e,t);e9.code="new RegExp";var y1e=["removeAdditional","useDefaults","coerceTypes"],x1e=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b1e={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."},v1e={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},JN=200;function _1e(e){var t,r,n,i,s,o,a,c,l,d,f,m,p,g,y,x,v,_,E,C,D,O,F,M,k;let j=e.strict,Z=(t=e.code)===null||t===void 0?void 0:t.optimize,_e=Z===!0||Z===void 0?1:Z||0,qe=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:e9,Me=(i=e.uriResolver)!==null&&i!==void 0?i:g1e.default;return{strictSchema:(o=(s=e.strictSchema)!==null&&s!==void 0?s:j)!==null&&o!==void 0?o:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:j)!==null&&c!==void 0?c:!0,strictTypes:(d=(l=e.strictTypes)!==null&&l!==void 0?l:j)!==null&&d!==void 0?d:"log",strictTuples:(m=(f=e.strictTuples)!==null&&f!==void 0?f:j)!==null&&m!==void 0?m:"log",strictRequired:(g=(p=e.strictRequired)!==null&&p!==void 0?p:j)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:_e,regExp:qe}:{optimize:_e,regExp:qe},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:JN,loopEnum:(x=e.loopEnum)!==null&&x!==void 0?x:JN,meta:(v=e.meta)!==null&&v!==void 0?v:!0,messages:(_=e.messages)!==null&&_!==void 0?_:!0,inlineRefs:(E=e.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(C=e.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(D=e.addUsedSchema)!==null&&D!==void 0?D:!0,validateSchema:(O=e.validateSchema)!==null&&O!==void 0?O:!0,validateFormats:(F=e.validateFormats)!==null&&F!==void 0?F:!0,unicodeRegExp:(M=e.unicodeRegExp)!==null&&M!==void 0?M:!0,int32range:(k=e.int32range)!==null&&k!==void 0?k:!0,uriResolver:Me}}class u0{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._1e(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new h1e.ValueScope({scope:{},prefixes:x1e,es5:t,lines:r}),this.logger=C1e(e.logger);let n=e.validateFormats;if(e.validateFormats=!1,this.RULES=(0,m1e.getRules)(),XN.call(this,b1e,e,"NOT SUPPORTED"),XN.call(this,v1e,e,"DEPRECATED","warn"),this._metaOpts=S1e.call(this),e.formats)w1e.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)E1e.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);D1e.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,n=YN;if(r==="id")n={...YN},n.id=n.$id,delete n.$id;if(t&&e)this.addMetaSchema(n,n[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let n=r(t);if(!("$async"in r))this.errors=r.errors;return n}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(l,d){await i.call(this,l.$schema);let f=this._addSchema(l,d);return f.validate||s.call(this,f)}async function i(l){if(l&&!this.getSchema(l))await n.call(this,{$ref:l},!0)}async function s(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof ZN.default))throw d;return o.call(this,d),await a.call(this,d.missingSchema),s.call(this,l)}}function o({missingSchema:l,missingRef:d}){if(this.refs[l])throw Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function a(l){let d=await c.call(this,l);if(!this.refs[l])await i.call(this,d.$schema);if(!this.refs[l])this.addSchema(d,l,t)}async function c(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=r(l))}finally{delete this._loading[l]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,n);return this}let i;if(typeof e==="object"){let{schemaId:s}=this.opts;if(i=e[s],i!==void 0&&typeof i!="string")throw Error(`schema ${s} must be string`)}return t=(0,$l.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(r,e);if(!n&&t){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw Error(i)}return n}getSchema(e){let t;while(typeof(t=QN.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:r}=this.opts,n=new Sl.SchemaEnv({schema:{},schemaId:r});if(t=Sl.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=QN.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r)r=(0,$l.normalizeId)(r),delete this.schemas[r],delete this.refs[r];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){if(r=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r}else if(typeof e=="object"&&t===void 0){if(t=e,r=t.keyword,Array.isArray(r)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(R1e.call(this,r,t),!t)return(0,vv.eachItem)(r,(i)=>bv.call(this,i)),this;A1e.call(this,t);let n={...t,type:(0,c0.getJSONTypes)(t.type),schemaType:(0,c0.getJSONTypes)(t.schemaType)};return(0,vv.eachItem)(r,n.type.length===0?(i)=>bv.call(this,i,n):(i)=>n.type.forEach((s)=>bv.call(this,i,n,s))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let r of t.rules){let n=r.rules.findIndex((i)=>i.keyword===e);if(n>=0)r.rules.splice(n,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((n)=>`${r}${n.instancePath} ${n.message}`).reduce((n,i)=>n+t+i)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of t){let i=n.split("/").slice(1),s=e;for(let o of i)s=s[o];for(let o in r){let a=r[o];if(typeof a!="object")continue;let{$data:c}=a.definition,l=s[o];if(c&&l)s[o]=t9(l)}}return e}_removeAllSchemas(e,t){for(let r in e){let n=e[r];if(!t||t.test(r)){if(typeof n=="string")delete e[r];else if(n&&!n.meta)this._cache.delete(n.schema),delete e[r]}}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:o}=this.opts;if(typeof e=="object")s=e[o];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let a=this._cache.get(e);if(a!==void 0)return a;r=(0,$l.normalizeId)(s||r);let c=$l.getSchemaRefs.call(this,e,r);if(a=new Sl.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),i&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(n)this.validateSchema(e,!0);return a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else Sl.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Sl.compileSchema.call(this,e)}finally{this.opts=t}}}u0.ValidationError=p1e.default;u0.MissingRefError=ZN.default;wi.default=u0;function XN(e,t,r,n="error"){for(let i in e){let s=i;if(s in t)this.logger[n](`${r}: option ${i}. ${e[s]}`)}}function QN(e){return e=(0,$l.normalizeId)(e),this.schemas[e]||this.refs[e]}function D1e(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function w1e(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function E1e(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function S1e(){let e={...this.opts};for(let t of y1e)delete e[t];return e}var $1e={log(){},warn(){},error(){}};function C1e(e){if(e===!1)return $1e;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var F1e=/^[a-z_$][a-z0-9_$:-]*$/i;function R1e(e,t){let{RULES:r}=this;if((0,vv.eachItem)(e,(n)=>{if(r.keywords[n])throw Error(`Keyword ${n} is already defined`);if(!F1e.test(n))throw Error(`Keyword ${n} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function bv(e,t,r){var n;let i=t===null||t===void 0?void 0:t.post;if(r&&i)throw Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,o=i?s.post:s.rules.find(({type:c})=>c===r);if(!o)o={type:r,rules:[]},s.rules.push(o);if(s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,c0.getJSONTypes)(t.type),schemaType:(0,c0.getJSONTypes)(t.schemaType)}};if(t.before)O1e.call(this,o,a,t.before);else o.rules.push(a);s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach((c)=>this.addKeyword(c))}function O1e(e,t,r){let n=e.rules.findIndex((i)=>i.keyword===r);if(n>=0)e.rules.splice(n,0,t);else e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)}function A1e(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=t9(t);e.validateSchema=this.compile(t,!0)}var k1e={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function t9(e){return{anyOf:[e,k1e]}}});var i9=h(function(n9){Object.defineProperty(n9,"__esModule",{value:!0});var T1e={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};n9.default=T1e});var f0=h(function(c9){Object.defineProperty(c9,"__esModule",{value:!0});c9.callRef=c9.getValidate=void 0;var q1e=_l(),s9=Ur(),fr=ue(),nc=Lr(),o9=wl(),l0=be(),j1e={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:o,opts:a,self:c}=n,{root:l}=s;if((r==="#"||r==="#/")&&i===l.baseId)return f();let d=o9.resolveRef.call(c,l,i,r);if(d===void 0)throw new q1e.default(n.opts.uriResolver,i,r);if(d instanceof o9.SchemaEnv)return m(d);return p(d);function f(){if(s===l)return d0(e,o,s,s.$async);let g=t.scopeValue("root",{ref:l});return d0(e,fr._`${g}.validate`,l,l.$async)}function m(g){let y=a9(e,g);d0(e,y,g,g.$async)}function p(g){let y=t.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,fr.stringify)(g)}:{ref:g}),x=t.name("valid"),v=e.subschema({schema:g,dataTypes:[],schemaPath:fr.nil,topSchemaRef:y,errSchemaPath:r},x);e.mergeEvaluated(v),e.ok(x)}}};function a9(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):fr._`${r.scopeValue("wrapper",{ref:t})}.validate`}c9.getValidate=a9;function d0(e,t,r,n){let{gen:i,it:s}=e,{allErrors:o,schemaEnv:a,opts:c}=s,l=c.passContext?nc.default.this:fr.nil;if(n)d();else f();function d(){if(!a.$async)throw Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{if(i.code(fr._`await ${(0,s9.callValidateCode)(e,t,l)}`),p(t),!o)i.assign(g,!0)},(y)=>{if(i.if(fr._`!(${y} instanceof ${s.ValidationError})`,()=>i.throw(y)),m(y),!o)i.assign(g,!1)}),e.ok(g)}function f(){e.result((0,s9.callValidateCode)(e,t,l),()=>p(t),()=>m(t))}function m(g){let y=fr._`${g}.errors`;i.assign(nc.default.vErrors,fr._`${nc.default.vErrors} === null ? ${y} : ${nc.default.vErrors}.concat(${y})`),i.assign(nc.default.errors,fr._`${nc.default.vErrors}.length`)}function p(g){var y;if(!s.opts.unevaluated)return;let x=(y=r===null||r===void 0?void 0:r.validate)===null||y===void 0?void 0:y.evaluated;if(s.props!==!0)if(x&&!x.dynamicProps){if(x.props!==void 0)s.props=l0.mergeEvaluated.props(i,x.props,s.props)}else{let v=i.var("props",fr._`${g}.evaluated.props`);s.props=l0.mergeEvaluated.props(i,v,s.props,fr.Name)}if(s.items!==!0)if(x&&!x.dynamicItems){if(x.items!==void 0)s.items=l0.mergeEvaluated.items(i,x.items,s.items)}else{let v=i.var("items",fr._`${g}.evaluated.items`);s.items=l0.mergeEvaluated.items(i,v,s.items,fr.Name)}}}c9.callRef=d0;c9.default=j1e});var d9=h(function(l9){Object.defineProperty(l9,"__esModule",{value:!0});var L1e=i9(),U1e=f0(),V1e=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",L1e.default,U1e.default];l9.default=V1e});var p9=h(function(f9){Object.defineProperty(f9,"__esModule",{value:!0});var p0=ue(),Ds=p0.operators,m0={maximum:{okStr:"<=",ok:Ds.LTE,fail:Ds.GT},minimum:{okStr:">=",ok:Ds.GTE,fail:Ds.LT},exclusiveMaximum:{okStr:"<",ok:Ds.LT,fail:Ds.GTE},exclusiveMinimum:{okStr:">",ok:Ds.GT,fail:Ds.LTE}},H1e={message:({keyword:e,schemaCode:t})=>p0.str`must be ${m0[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>p0._`{comparison: ${m0[e].okStr}, limit: ${t}}`},W1e={keyword:Object.keys(m0),type:"number",schemaType:"number",$data:!0,error:H1e,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data(p0._`${r} ${m0[t].fail} ${n} || isNaN(${r})`)}};f9.default=W1e});var h9=h(function(m9){Object.defineProperty(m9,"__esModule",{value:!0});var Cl=ue(),K1e={message:({schemaCode:e})=>Cl.str`must be multiple of ${e}`,params:({schemaCode:e})=>Cl._`{multipleOf: ${e}}`},Y1e={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:K1e,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,o=t.let("res"),a=s?Cl._`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:Cl._`${o} !== parseInt(${o})`;e.fail$data(Cl._`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};m9.default=Y1e});var x9=h(function(y9){Object.defineProperty(y9,"__esModule",{value:!0});function g9(e){let t=e.length,r=0,n=0,i;while(n<t)if(r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t){if(i=e.charCodeAt(n),(i&64512)===56320)n++}return r}y9.default=g9;g9.code='require("ajv/dist/runtime/ucs2length").default'});var v9=h(function(b9){Object.defineProperty(b9,"__esModule",{value:!0});var yo=ue(),Q1e=be(),Z1e=x9(),e2e={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return yo.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>yo._`{limit: ${e}}`},t2e={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:e2e,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?yo.operators.GT:yo.operators.LT,o=i.opts.unicode===!1?yo._`${r}.length`:yo._`${(0,Q1e.useFunc)(e.gen,Z1e.default)}(${r})`;e.fail$data(yo._`${o} ${s} ${n}`)}};b9.default=t2e});var D9=h(function(_9){Object.defineProperty(_9,"__esModule",{value:!0});var n2e=Ur(),h0=ue(),i2e={message:({schemaCode:e})=>h0.str`must match pattern "${e}"`,params:({schemaCode:e})=>h0._`{pattern: ${e}}`},s2e={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:i2e,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,o=s.opts.unicodeRegExp?"u":"",a=r?h0._`(new RegExp(${i}, ${o}))`:(0,n2e.usePattern)(e,n);e.fail$data(h0._`!${a}.test(${t})`)}};_9.default=s2e});var E9=h(function(w9){Object.defineProperty(w9,"__esModule",{value:!0});var Fl=ue(),a2e={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return Fl.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>Fl._`{limit: ${e}}`},c2e={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:a2e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Fl.operators.GT:Fl.operators.LT;e.fail$data(Fl._`Object.keys(${r}).length ${i} ${n}`)}};w9.default=c2e});var $9=h(function(S9){Object.defineProperty(S9,"__esModule",{value:!0});var Rl=Ur(),Ol=ue(),l2e=be(),d2e={message:({params:{missingProperty:e}})=>Ol.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>Ol._`{missingProperty: ${e}}`},f2e={keyword:"required",type:"object",schemaType:"array",$data:!0,error:d2e,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;let c=r.length>=a.loopRequired;if(o.allErrors)l();else d();if(a.strictRequired){let p=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if((p===null||p===void 0?void 0:p[y])===void 0&&!g.has(y)){let x=o.schemaEnv.baseId+o.errSchemaPath,v=`required property "${y}" is not defined at "${x}" (strictRequired)`;(0,l2e.checkStrictMode)(o,v,o.opts.strictRequired)}}function l(){if(c||s)e.block$data(Ol.nil,f);else for(let p of r)(0,Rl.checkReportMissingProp)(e,p)}function d(){let p=t.let("missing");if(c||s){let g=t.let("valid",!0);e.block$data(g,()=>m(p,g)),e.ok(g)}else t.if((0,Rl.checkMissingProp)(e,r,p)),(0,Rl.reportMissingProp)(e,p),t.else()}function f(){t.forOf("prop",n,(p)=>{e.setParams({missingProperty:p}),t.if((0,Rl.noPropertyInData)(t,i,p,a.ownProperties),()=>e.error())})}function m(p,g){e.setParams({missingProperty:p}),t.forOf(p,n,()=>{t.assign(g,(0,Rl.propertyInData)(t,i,p,a.ownProperties)),t.if((0,Ol.not)(g),()=>{e.error(),t.break()})},Ol.nil)}}};S9.default=f2e});var F9=h(function(C9){Object.defineProperty(C9,"__esModule",{value:!0});var Al=ue(),m2e={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return Al.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>Al._`{limit: ${e}}`},h2e={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:m2e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Al.operators.GT:Al.operators.LT;e.fail$data(Al._`${r}.length ${i} ${n}`)}};C9.default=h2e});var g0=h(function(O9){Object.defineProperty(O9,"__esModule",{value:!0});var R9=gl();R9.code='require("ajv/dist/runtime/equal").default';O9.default=R9});var k9=h(function(A9){Object.defineProperty(A9,"__esModule",{value:!0});var _v=hl(),Ot=ue(),x2e=be(),b2e=g0(),v2e={message:({params:{i:e,j:t}})=>Ot.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>Ot._`{i: ${e}, j: ${t}}`},_2e={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:v2e,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:o,it:a}=e;if(!n&&!i)return;let c=t.let("valid"),l=s.items?(0,_v.getSchemaTypes)(s.items):[];e.block$data(c,d,Ot._`${o} === false`),e.ok(c);function d(){let g=t.let("i",Ot._`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if(Ot._`${g} > 1`,()=>(f()?m:p)(g,y))}function f(){return l.length>0&&!l.some((g)=>g==="object"||g==="array")}function m(g,y){let x=t.name("item"),v=(0,_v.checkDataTypes)(l,x,a.opts.strictNumbers,_v.DataType.Wrong),_=t.const("indices",Ot._`{}`);t.for(Ot._`;${g}--;`,()=>{if(t.let(x,Ot._`${r}[${g}]`),t.if(v,Ot._`continue`),l.length>1)t.if(Ot._`typeof ${x} == "string"`,Ot._`${x} += "_"`);t.if(Ot._`typeof ${_}[${x}] == "number"`,()=>{t.assign(y,Ot._`${_}[${x}]`),e.error(),t.assign(c,!1).break()}).code(Ot._`${_}[${x}] = ${g}`)})}function p(g,y){let x=(0,x2e.useFunc)(t,b2e.default),v=t.name("outer");t.label(v).for(Ot._`;${g}--;`,()=>t.for(Ot._`${y} = ${g}; ${y}--;`,()=>t.if(Ot._`${x}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(v)})))}}};A9.default=_2e});var I9=h(function(P9){Object.defineProperty(P9,"__esModule",{value:!0});var Dv=ue(),w2e=be(),E2e=g0(),S2e={message:"must be equal to constant",params:({schemaCode:e})=>Dv._`{allowedValue: ${e}}`},$2e={keyword:"const",$data:!0,error:S2e,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;if(n||s&&typeof s=="object")e.fail$data(Dv._`!${(0,w2e.useFunc)(t,E2e.default)}(${r}, ${i})`);else e.fail(Dv._`${s} !== ${r}`)}};P9.default=$2e});var N9=h(function(T9){Object.defineProperty(T9,"__esModule",{value:!0});var kl=ue(),F2e=be(),R2e=g0(),O2e={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>kl._`{allowedValues: ${e}}`},A2e={keyword:"enum",schemaType:"array",$data:!0,error:O2e,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e;if(!n&&i.length===0)throw Error("enum must have non-empty array");let a=i.length>=o.opts.loopEnum,c,l=()=>c!==null&&c!==void 0?c:c=(0,F2e.useFunc)(t,R2e.default),d;if(a||n)d=t.let("valid"),e.block$data(d,f);else{if(!Array.isArray(i))throw Error("ajv implementation error");let p=t.const("vSchema",s);d=(0,kl.or)(...i.map((g,y)=>m(p,y)))}e.pass(d);function f(){t.assign(d,!1),t.forOf("v",s,(p)=>t.if(kl._`${l()}(${r}, ${p})`,()=>t.assign(d,!0).break()))}function m(p,g){let y=i[g];return typeof y==="object"&&y!==null?kl._`${l()}(${r}, ${p}[${g}])`:kl._`${r} === ${y}`}}};T9.default=A2e});var j9=h(function(q9){Object.defineProperty(q9,"__esModule",{value:!0});var P2e=p9(),I2e=h9(),T2e=v9(),N2e=D9(),q2e=E9(),j2e=$9(),M2e=F9(),B2e=k9(),L2e=I9(),U2e=N9(),V2e=[P2e.default,I2e.default,T2e.default,N2e.default,q2e.default,j2e.default,M2e.default,B2e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},L2e.default,U2e.default];q9.default=V2e});var Ev=h(function(B9){Object.defineProperty(B9,"__esModule",{value:!0});B9.validateAdditionalItems=void 0;var xo=ue(),wv=be(),H2e={message:({params:{len:e}})=>xo.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>xo._`{limit: ${e}}`},W2e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:H2e,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,wv.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}M9(e,n)}};function M9(e,t){let{gen:r,schema:n,data:i,keyword:s,it:o}=e;o.items=!0;let a=r.const("len",xo._`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass(xo._`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,wv.alwaysValidSchema)(o,n)){let l=r.var("valid",xo._`${a} <= ${t.length}`);r.if((0,xo.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,a,(d)=>{if(e.subschema({keyword:s,dataProp:d,dataPropType:wv.Type.Num},l),!o.allErrors)r.if((0,xo.not)(l),()=>r.break())})}}B9.validateAdditionalItems=M9;B9.default=W2e});var Sv=h(function(z9){Object.defineProperty(z9,"__esModule",{value:!0});z9.validateTuple=void 0;var U9=ue(),y0=be(),K2e=Ur(),Y2e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return V9(e,"additionalItems",t);if(r.items=!0,(0,y0.alwaysValidSchema)(r,t))return;e.ok((0,K2e.validateArray)(e))}};function V9(e,t,r=e.schema){let{gen:n,parentSchema:i,data:s,keyword:o,it:a}=e;if(d(i),a.opts.unevaluated&&r.length&&a.items!==!0)a.items=y0.mergeEvaluated.items(n,r.length,a.items);let c=n.name("valid"),l=n.const("len",U9._`${s}.length`);r.forEach((f,m)=>{if((0,y0.alwaysValidSchema)(a,f))return;n.if(U9._`${l} > ${m}`,()=>e.subschema({keyword:o,schemaProp:m,dataProp:m},c)),e.ok(c)});function d(f){let{opts:m,errSchemaPath:p}=a,g=r.length,y=g===f.minItems&&(g===f.maxItems||f[t]===!1);if(m.strictTuples&&!y){let x=`"${o}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;(0,y0.checkStrictMode)(a,x,m.strictTuples)}}}z9.validateTuple=V9;z9.default=Y2e});var G9=h(function(W9){Object.defineProperty(W9,"__esModule",{value:!0});var X2e=Sv(),Q2e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>(0,X2e.validateTuple)(e,"items")};W9.default=Q2e});var J9=h(function(Y9){Object.defineProperty(Y9,"__esModule",{value:!0});var K9=ue(),eEe=be(),tEe=Ur(),rEe=Ev(),nEe={message:({params:{len:e}})=>K9.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>K9._`{limit: ${e}}`},iEe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:nEe,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;if(n.items=!0,(0,eEe.alwaysValidSchema)(n,t))return;if(i)(0,rEe.validateAdditionalItems)(e,i);else e.ok((0,tEe.validateArray)(e))}};Y9.default=iEe});var Q9=h(function(X9){Object.defineProperty(X9,"__esModule",{value:!0});var Vr=ue(),x0=be(),oEe={message:({params:{min:e,max:t}})=>t===void 0?Vr.str`must contain at least ${e} valid item(s)`:Vr.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?Vr._`{minContains: ${e}}`:Vr._`{minContains: ${e}, maxContains: ${t}}`},aEe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:oEe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e,o,a,{minContains:c,maxContains:l}=n;if(s.opts.next)o=c===void 0?1:c,a=l;else o=1;let d=t.const("len",Vr._`${i}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,x0.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,x0.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,x0.alwaysValidSchema)(s,r)){let y=Vr._`${d} >= ${o}`;if(a!==void 0)y=Vr._`${y} && ${d} <= ${a}`;e.pass(y);return}s.items=!0;let f=t.name("valid");if(a===void 0&&o===1)p(f,()=>t.if(f,()=>t.break()));else if(o===0){if(t.let(f,!0),a!==void 0)t.if(Vr._`${i}.length > 0`,m)}else t.let(f,!1),m();e.result(f,()=>e.reset());function m(){let y=t.name("_valid"),x=t.let("count",0);p(y,()=>t.if(y,()=>g(x)))}function p(y,x){t.forRange("i",0,d,(v)=>{e.subschema({keyword:"contains",dataProp:v,dataPropType:x0.Type.Num,compositeRule:!0},y),x()})}function g(y){if(t.code(Vr._`${y}++`),a===void 0)t.if(Vr._`${y} >= ${o}`,()=>t.assign(f,!0).break());else if(t.if(Vr._`${y} > ${a}`,()=>t.assign(f,!1).break()),o===1)t.assign(f,!0);else t.if(Vr._`${y} >= ${o}`,()=>t.assign(f,!0))}}};X9.default=aEe});var b0=h(function(t7){Object.defineProperty(t7,"__esModule",{value:!0});t7.validateSchemaDeps=t7.validatePropertyDeps=t7.error=void 0;var $v=ue(),uEe=be(),Pl=Ur();t7.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return $v.str`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>$v._`{property: ${e},
|
|
88
|
+
|| ${o} === "boolean" || ${i} === null`).assign(a,fe._`[${i}]`)}}}function q_e({gen:e,parentData:t,parentDataProperty:r},n){e.if(fe._`${t} !== undefined`,()=>e.assign(fe._`${t}[${r}]`,n))}function Qb(e,t,r,n=Za.Correct){let i=n===Za.Correct?fe.operators.EQ:fe.operators.NEQ,s;switch(e){case"null":return fe._`${t} ${i} null`;case"array":s=fe._`Array.isArray(${t})`;break;case"object":s=fe._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=o(fe._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=o();break;default:return fe._`typeof ${t} ${i} ${e}`}return n===Za.Correct?s:(0,fe.not)(s);function o(a=fe.nil){return(0,fe.and)(fe._`typeof ${t} == "number"`,a,r?fe._`isFinite(${t})`:fe.nil)}}j5.checkDataType=Qb;function Zb(e,t,r,n){if(e.length===1)return Qb(e[0],t,r,n);let i,s=(0,T5.toHash)(e);if(s.array&&s.object){let o=fe._`typeof ${t} != "object"`;i=s.null?o:fe._`!${t} || ${o}`,delete s.null,delete s.array,delete s.object}else i=fe.nil;if(s.number)delete s.integer;for(let o in s)i=(0,fe.and)(i,Qb(o,t,r,n));return i}j5.checkDataTypes=Zb;var j_e={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?fe._`{type: ${e}}`:fe._`{type: ${t}}`};function ev(e){let t=M_e(e);(0,k_e.reportError)(t,j_e)}j5.reportTypeError=ev;function M_e(e){let{gen:t,data:r,schema:n}=e,i=(0,T5.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var V5=h(function(L5){Object.defineProperty(L5,"__esModule",{value:!0});L5.assignDefaults=void 0;var ec=ue(),W_e=be();function G_e(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)B5(e,i,r[i].default);else if(t==="array"&&Array.isArray(n))n.forEach((i,s)=>B5(e,s,i.default))}L5.assignDefaults=G_e;function B5(e,t,r){let{gen:n,compositeRule:i,data:s,opts:o}=e;if(r===void 0)return;let a=ec._`${s}${(0,ec.getProperty)(t)}`;if(i){(0,W_e.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=ec._`${a} === undefined`;if(o.useDefaults==="empty")c=ec._`${c} || ${a} === null || ${a} === ""`;n.if(c,ec._`${a} = ${(0,ec.stringify)(r)}`)}});var Ur=h(function(W5){Object.defineProperty(W5,"__esModule",{value:!0});W5.validateUnion=W5.validateArray=W5.usePattern=W5.callValidateCode=W5.schemaProperties=W5.allSchemaProperties=W5.noPropertyInData=W5.propertyInData=W5.isOwnProperty=W5.hasPropFunc=W5.reportMissingProp=W5.checkMissingProp=W5.checkReportMissingProp=void 0;var Xe=ue(),tv=be(),vs=Lr(),K_e=be();function Y_e(e,t){let{gen:r,data:n,it:i}=e;r.if(nv(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:Xe._`${t}`},!0),e.error()})}W5.checkReportMissingProp=Y_e;function J_e({gen:e,data:t,it:{opts:r}},n,i){return(0,Xe.or)(...n.map((s)=>(0,Xe.and)(nv(e,t,s,r.ownProperties),Xe._`${i} = ${s}`)))}W5.checkMissingProp=J_e;function X_e(e,t){e.setParams({missingProperty:t},!0),e.error()}W5.reportMissingProp=X_e;function z5(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:Xe._`Object.prototype.hasOwnProperty`})}W5.hasPropFunc=z5;function rv(e,t,r){return Xe._`${z5(e)}.call(${t}, ${r})`}W5.isOwnProperty=rv;function Q_e(e,t,r,n){let i=Xe._`${t}${(0,Xe.getProperty)(r)} !== undefined`;return n?Xe._`${i} && ${rv(e,t,r)}`:i}W5.propertyInData=Q_e;function nv(e,t,r,n){let i=Xe._`${t}${(0,Xe.getProperty)(r)} === undefined`;return n?(0,Xe.or)(i,(0,Xe.not)(rv(e,t,r))):i}W5.noPropertyInData=nv;function H5(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}W5.allSchemaProperties=H5;function Z_e(e,t){return H5(t).filter((r)=>!(0,tv.alwaysValidSchema)(e,t[r]))}W5.schemaProperties=Z_e;function eDe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:o},a,c,l){let d=l?Xe._`${e}, ${t}, ${n}${i}`:t,f=[[vs.default.instancePath,(0,Xe.strConcat)(vs.default.instancePath,s)],[vs.default.parentData,o.parentData],[vs.default.parentDataProperty,o.parentDataProperty],[vs.default.rootData,vs.default.rootData]];if(o.opts.dynamicRef)f.push([vs.default.dynamicAnchors,vs.default.dynamicAnchors]);let m=Xe._`${d}, ${r.object(...f)}`;return c!==Xe.nil?Xe._`${a}.call(${c}, ${m})`:Xe._`${a}(${m})`}W5.callValidateCode=eDe;var tDe=Xe._`new RegExp`;function rDe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:Xe._`${i.code==="new RegExp"?tDe:(0,K_e.useFunc)(e,i)}(${r}, ${n})`})}W5.usePattern=rDe;function nDe(e){let{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){let a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){let c=t.const("len",Xe._`${r}.length`);t.forRange("i",0,c,(l)=>{e.subschema({keyword:n,dataProp:l,dataPropType:tv.Type.Num},s),t.if((0,Xe.not)(s),a)})}}W5.validateArray=nDe;function iDe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>(0,tv.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let d=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);if(t.assign(o,Xe._`${o} || ${a}`),!e.mergeValidEvaluated(d,a))t.if((0,Xe.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}W5.validateUnion=iDe});var Q5=h(function(J5){Object.defineProperty(J5,"__esModule",{value:!0});J5.validateKeywordUsage=J5.validSchemaType=J5.funcKeywordCode=J5.macroKeywordCode=void 0;var Yt=ue(),ho=Lr(),yDe=Ur(),xDe=ml();function bDe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:s,it:o}=e,a=t.macro.call(o.self,i,s,o),c=Y5(r,n,a);if(o.opts.validateSchema!==!1)o.self.validateSchema(a,!0);let l=r.name("valid");e.subschema({schema:a,schemaPath:Yt.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}J5.macroKeywordCode=bDe;function vDe(e,t){var r;let{gen:n,keyword:i,schema:s,parentSchema:o,$data:a,it:c}=e;DDe(c,t);let l=!a&&t.compile?t.compile.call(c.self,s,o,c):t.validate,d=Y5(n,i,l),f=n.let("valid");e.block$data(f,m),e.ok((r=t.valid)!==null&&r!==void 0?r:f);function m(){if(t.errors===!1){if(y(),t.modifying)K5(e);x(()=>e.error())}else{let v=t.async?p():g();if(t.modifying)K5(e);x(()=>_De(e,v))}}function p(){let v=n.let("ruleErrs",null);return n.try(()=>y(Yt._`await `),(_)=>n.assign(f,!1).if(Yt._`${_} instanceof ${c.ValidationError}`,()=>n.assign(v,Yt._`${_}.errors`),()=>n.throw(_))),v}function g(){let v=Yt._`${d}.errors`;return n.assign(v,null),y(Yt.nil),v}function y(v=t.async?Yt._`await `:Yt.nil){let _=c.opts.passContext?ho.default.this:ho.default.self,S=!(("compile"in t)&&!a||t.schema===!1);n.assign(f,Yt._`${v}${(0,yDe.callValidateCode)(e,d,_,S)}`,t.modifying)}function x(v){var _;n.if((0,Yt.not)((_=t.valid)!==null&&_!==void 0?_:f),v)}}J5.funcKeywordCode=vDe;function K5(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,Yt._`${n.parentData}[${n.parentDataProperty}]`))}function _De(e,t){let{gen:r}=e;r.if(Yt._`Array.isArray(${t})`,()=>{r.assign(ho.default.vErrors,Yt._`${ho.default.vErrors} === null ? ${t} : ${ho.default.vErrors}.concat(${t})`).assign(ho.default.errors,Yt._`${ho.default.vErrors}.length`),(0,xDe.extendErrors)(e)},()=>e.error())}function DDe({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function Y5(e,t,r){if(r===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Yt.stringify)(r)})}function wDe(e,t,r=!1){return!t.length||t.some((n)=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}J5.validSchemaType=wDe;function EDe({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw Error("ajv implementation error");let o=i.dependencies;if(o===null||o===void 0?void 0:o.some((a)=>!Object.prototype.hasOwnProperty.call(e,a)))throw Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(i.validateSchema){if(!i.validateSchema(e[s])){let c=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw Error(c)}}}J5.validateKeywordUsage=EDe});var rN=h(function(eN){Object.defineProperty(eN,"__esModule",{value:!0});eN.extendSubschemaMode=eN.extendSubschemaData=eN.getSubschema=void 0;var Gn=ue(),Z5=be();function FDe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:Gn._`${e.schemaPath}${(0,Gn.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:Gn._`${e.schemaPath}${(0,Gn.getProperty)(t)}${(0,Gn.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Z5.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||o===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')}eN.getSubschema=FDe;function RDe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:o}){if(i!==void 0&&r!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:l,dataPathArr:d,opts:f}=t,m=a.let("data",Gn._`${t.data}${(0,Gn.getProperty)(r)}`,!0);c(m),e.errorPath=Gn.str`${l}${(0,Z5.getErrorPath)(r,n,f.jsPropertySyntax)}`,e.parentDataProperty=Gn._`${r}`,e.dataPathArr=[...d,e.parentDataProperty]}if(i!==void 0){let l=i instanceof Gn.Name?i:a.let("data",i,!0);if(c(l),o!==void 0)e.propertyName=o}if(s)e.dataTypes=s;function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}eN.extendSubschemaData=RDe;function ODe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){if(n!==void 0)e.compositeRule=n;if(i!==void 0)e.createErrors=i;if(s!==void 0)e.allErrors=s;e.jtdDiscriminator=t,e.jtdMetadata=r}eN.extendSubschemaMode=ODe});var gl=h(function(XWe,nN){nN.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var o=s[i];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r}});var iv=h(function(QWe,iN){var _s=iN.exports=function(e,t,r){if(typeof t=="function")r=t,t={};r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};e0(t,n,i,e,"",e)};_s.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};_s.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};_s.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};_s.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 e0(e,t,r,n,i,s,o,a,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,s,o,a,c,l);for(var d in n){var f=n[d];if(Array.isArray(f)){if(d in _s.arrayKeywords)for(var m=0;m<f.length;m++)e0(e,t,r,f[m],i+"/"+d+"/"+m,s,i,d,n,m)}else if(d in _s.propsKeywords){if(f&&typeof f=="object")for(var p in f)e0(e,t,r,f[p],i+"/"+d+"/"+PDe(p),s,i,d,n,p)}else if(d in _s.keywords||e.allKeys&&!(d in _s.skipKeywords))e0(e,t,r,f,i+"/"+d,s,i,d,n)}r(n,i,s,o,a,c,l)}}function PDe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var yl=h(function(cN){Object.defineProperty(cN,"__esModule",{value:!0});cN.getSchemaRefs=cN.resolveUrl=cN.normalizeId=cN._getFullPath=cN.getFullPath=cN.inlineRef=void 0;var IDe=be(),TDe=gl(),NDe=iv(),qDe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function jDe(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!sv(e);if(!t)return!1;return sN(e)<=t}cN.inlineRef=jDe;var MDe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function sv(e){for(let t in e){if(MDe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(sv))return!0;if(typeof r=="object"&&sv(r))return!0}return!1}function sN(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,qDe.has(r))continue;if(typeof e[r]=="object")(0,IDe.eachItem)(e[r],(n)=>t+=sN(n));if(t===1/0)return 1/0}return t}function oN(e,t="",r){if(r!==!1)t=tc(t);let n=e.parse(t);return aN(e,n)}cN.getFullPath=oN;function aN(e,t){return e.serialize(t).split("#")[0]+"#"}cN._getFullPath=aN;var BDe=/#\/?$/;function tc(e){return e?e.replace(BDe,""):""}cN.normalizeId=tc;function LDe(e,t,r){return r=tc(r),e.resolve(t,r)}cN.resolveUrl=LDe;var UDe=/^[a-z_][-a-z0-9._]*$/i;function VDe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=tc(e[r]||t),s={"":i},o=oN(n,i,!1),a={},c=new Set;return NDe(e,{allKeys:!0},(f,m,p,g)=>{if(g===void 0)return;let y=o+m,x=s[g];if(typeof f[r]=="string")x=v.call(this,f[r]);_.call(this,f.$anchor),_.call(this,f.$dynamicAnchor),s[m]=x;function v(S){let C=this.opts.uriResolver.resolve;if(S=tc(x?C(x,S):S),c.has(S))throw d(S);c.add(S);let D=this.refs[S];if(typeof D=="string")D=this.refs[D];if(typeof D=="object")l(f,D.schema,S);else if(S!==tc(y))if(S[0]==="#")l(f,a[S],S),a[S]=f;else this.refs[S]=y;return S}function _(S){if(typeof S=="string"){if(!UDe.test(S))throw Error(`invalid anchor "${S}"`);v.call(this,`#${S}`)}}}),a;function l(f,m,p){if(m!==void 0&&!TDe(f,m))throw d(p)}function d(f){return Error(`reference "${f}" resolves to more than one schema`)}}cN.getSchemaRefs=VDe});var vl=h(function(EN){Object.defineProperty(EN,"__esModule",{value:!0});EN.getData=EN.KeywordCxt=EN.validateFunctionCode=void 0;var mN=F5(),lN=hl(),av=Xb(),t0=hl(),YDe=V5(),bl=Q5(),ov=rN(),Y=ue(),te=Lr(),JDe=yl(),_i=be(),xl=ml();function XDe(e){if(yN(e)){if(xN(e),gN(e)){ewe(e);return}}hN(e,()=>(0,mN.topBoolOrEmptySchema)(e))}EN.validateFunctionCode=XDe;function hN({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){if(i.code.es5)e.func(t,Y._`${te.default.data}, ${te.default.valCxt}`,n.$async,()=>{e.code(Y._`"use strict"; ${dN(r,i)}`),ZDe(e,i),e.code(s)});else e.func(t,Y._`${te.default.data}, ${QDe(i)}`,n.$async,()=>e.code(dN(r,i)).code(s))}function QDe(e){return Y._`{${te.default.instancePath}="", ${te.default.parentData}, ${te.default.parentDataProperty}, ${te.default.rootData}=${te.default.data}${e.dynamicRef?Y._`, ${te.default.dynamicAnchors}={}`:Y.nil}}={}`}function ZDe(e,t){e.if(te.default.valCxt,()=>{if(e.var(te.default.instancePath,Y._`${te.default.valCxt}.${te.default.instancePath}`),e.var(te.default.parentData,Y._`${te.default.valCxt}.${te.default.parentData}`),e.var(te.default.parentDataProperty,Y._`${te.default.valCxt}.${te.default.parentDataProperty}`),e.var(te.default.rootData,Y._`${te.default.valCxt}.${te.default.rootData}`),t.dynamicRef)e.var(te.default.dynamicAnchors,Y._`${te.default.valCxt}.${te.default.dynamicAnchors}`)},()=>{if(e.var(te.default.instancePath,Y._`""`),e.var(te.default.parentData,Y._`undefined`),e.var(te.default.parentDataProperty,Y._`undefined`),e.var(te.default.rootData,te.default.data),t.dynamicRef)e.var(te.default.dynamicAnchors,Y._`{}`)})}function ewe(e){let{schema:t,opts:r,gen:n}=e;hN(e,()=>{if(r.$comment&&t.$comment)vN(e);if(swe(e),n.let(te.default.vErrors,null),n.let(te.default.errors,0),r.unevaluated)twe(e);bN(e),cwe(e)});return}function twe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",Y._`${r}.evaluated`),t.if(Y._`${e.evaluated}.dynamicProps`,()=>t.assign(Y._`${e.evaluated}.props`,Y._`undefined`)),t.if(Y._`${e.evaluated}.dynamicItems`,()=>t.assign(Y._`${e.evaluated}.items`,Y._`undefined`))}function dN(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?Y._`/*# sourceURL=${r} */`:Y.nil}function rwe(e,t){if(yN(e)){if(xN(e),gN(e)){nwe(e,t);return}}(0,mN.boolOrEmptySchema)(e,t)}function gN({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function yN(e){return typeof e.schema!="boolean"}function nwe(e,t){let{schema:r,gen:n,opts:i}=e;if(i.$comment&&r.$comment)vN(e);owe(e),awe(e);let s=n.const("_errs",te.default.errors);bN(e,s),n.var(t,Y._`${s} === ${te.default.errors}`)}function xN(e){(0,_i.checkUnknownRules)(e),iwe(e)}function bN(e,t){if(e.opts.jtd)return fN(e,[],!1,t);let r=(0,lN.getSchemaTypes)(e.schema),n=(0,lN.coerceAndCheckDataType)(e,r);fN(e,r,!n,t)}function iwe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;if(t.$ref&&n.ignoreKeywordsWithRef&&(0,_i.schemaHasRulesButRef)(t,i.RULES))i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function swe(e){let{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema)(0,_i.checkStrictMode)(e,"default is ignored in the schema root")}function owe(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=(0,JDe.resolveUrl)(e.opts.uriResolver,e.baseId,t)}function awe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function vN({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)e.code(Y._`${te.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){let o=Y.str`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(Y._`${te.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function cwe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;if(r.$async)t.if(Y._`${te.default.errors} === 0`,()=>t.return(te.default.data),()=>t.throw(Y._`new ${i}(${te.default.vErrors})`));else{if(t.assign(Y._`${n}.errors`,te.default.vErrors),s.unevaluated)uwe(e);t.return(Y._`${te.default.errors} === 0`)}}function uwe({gen:e,evaluated:t,props:r,items:n}){if(r instanceof Y.Name)e.assign(Y._`${t}.props`,r);if(n instanceof Y.Name)e.assign(Y._`${t}.items`,n)}function fN(e,t,r,n){let{gen:i,schema:s,data:o,allErrors:a,opts:c,self:l}=e,{RULES:d}=l;if(s.$ref&&(c.ignoreKeywordsWithRef||!(0,_i.schemaHasRulesButRef)(s,d))){i.block(()=>DN(e,"$ref",d.all.$ref.definition));return}if(!c.jtd)lwe(e,t);i.block(()=>{for(let m of d.rules)f(m);f(d.post)});function f(m){if(!(0,av.shouldUseGroup)(s,m))return;if(m.type){if(i.if((0,t0.checkDataType)(m.type,o,c.strictNumbers)),pN(e,m),t.length===1&&t[0]===m.type&&r)i.else(),(0,t0.reportTypeError)(e);i.endIf()}else pN(e,m);if(!a)i.if(Y._`${te.default.errors} === ${n||0}`)}}function pN(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;if(i)(0,YDe.assignDefaults)(e,t.type);r.block(()=>{for(let s of t.rules)if((0,av.shouldUseRule)(n,s))DN(e,s.keyword,s.definition,t.type)})}function lwe(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(dwe(e,t),!e.opts.allowUnionTypes)fwe(e,t);pwe(e,e.dataTypes)}function dwe(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!_N(e.dataTypes,r))cv(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),hwe(e,t)}function fwe(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))cv(e,"use allowUnionTypes to allow union type keyword")}function pwe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,av.shouldUseRule)(e.schema,i)){let{type:s}=i.definition;if(s.length&&!s.some((o)=>mwe(t,o)))cv(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function mwe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function _N(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function hwe(e,t){let r=[];for(let n of e.dataTypes)if(_N(t,n))r.push(n);else if(t.includes("integer")&&n==="number")r.push("integer");e.dataTypes=r}function cv(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,_i.checkStrictMode)(e,t,e.opts.strictTypes)}class uv{constructor(e,t,r){if((0,bl.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,_i.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",wN(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,bl.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",te.default.errors)}result(e,t,r){this.failResult((0,Y.not)(e),t,r)}failResult(e,t,r){if(this.gen.if(e),r)r();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult((0,Y.not)(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(Y._`${t} !== undefined && (${(0,Y.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?xl.reportExtraError:xl.reportError)(this,this.def.error,t)}$dataError(){(0,xl.reportError)(this,this.def.$dataError||xl.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,xl.resetErrorsCount)(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=Y.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=Y.nil,t=Y.nil){if(!this.$data)return;let{gen:r,schemaCode:n,schemaType:i,def:s}=this;if(r.if((0,Y.or)(Y._`${n} === undefined`,t)),e!==Y.nil)r.assign(e,!0);if(i.length||s.validateSchema){if(r.elseIf(this.invalid$data()),this.$dataError(),e!==Y.nil)r.assign(e,!1)}r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,Y.or)(s(),o());function s(){if(r.length){if(!(t instanceof Y.Name))throw Error("ajv implementation error");let a=Array.isArray(r)?r:[r];return Y._`${(0,t0.checkDataTypes)(a,t,i.opts.strictNumbers,t0.DataType.Wrong)}`}return Y.nil}function o(){if(n.validateSchema){let a=e.scopeValue("validate$data",{ref:n.validateSchema});return Y._`!${a}(${t})`}return Y.nil}}subschema(e,t){let r=(0,ov.getSubschema)(this.it,e);(0,ov.extendSubschemaData)(r,this.it,e),(0,ov.extendSubschemaMode)(r,e);let n={...this.it,...r,items:void 0,props:void 0};return rwe(n,t),n}mergeEvaluated(e,t){let{it:r,gen:n}=this;if(!r.opts.unevaluated)return;if(r.props!==!0&&e.props!==void 0)r.props=_i.mergeEvaluated.props(n,e.props,r.props,t);if(r.items!==!0&&e.items!==void 0)r.items=_i.mergeEvaluated.items(n,e.items,r.items,t)}mergeValidEvaluated(e,t){let{it:r,gen:n}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return n.if(t,()=>this.mergeEvaluated(e,Y.Name)),!0}}EN.KeywordCxt=uv;function DN(e,t,r,n){let i=new uv(e,r,t);if("code"in r)r.code(i,n);else if(i.$data&&r.validate)(0,bl.funcKeywordCode)(i,r);else if("macro"in r)(0,bl.macroKeywordCode)(i,r);else if(r.compile||r.validate)(0,bl.funcKeywordCode)(i,r)}var gwe=/^\/(?:[^~]|~0|~1)*$/,ywe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function wN(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return te.default.rootData;if(e[0]==="/"){if(!gwe.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,s=te.default.rootData}else{let l=ywe.exec(e);if(!l)throw Error(`Invalid JSON-pointer: ${e}`);let d=+l[1];if(i=l[2],i==="#"){if(d>=t)throw Error(c("property/index",d));return n[t-d]}if(d>t)throw Error(c("data",d));if(s=r[t-d],!i)return s}let o=s,a=i.split("/");for(let l of a)if(l)s=Y._`${s}${(0,Y.getProperty)((0,_i.unescapeJsonPointer)(l))}`,o=Y._`${o} && ${s}`;return o;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}EN.getData=wN});var r0=h(function(CN){Object.defineProperty(CN,"__esModule",{value:!0});class $N extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}CN.default=$N});var _l=h(function(RN){Object.defineProperty(RN,"__esModule",{value:!0});var lv=yl();class FN extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`);this.missingRef=(0,lv.resolveUrl)(e,t,r),this.missingSchema=(0,lv.normalizeId)((0,lv.getFullPath)(e,this.missingRef))}}RN.default=FN});var wl=h(function(kN){Object.defineProperty(kN,"__esModule",{value:!0});kN.resolveSchema=kN.getCompilingSchema=kN.resolveRef=kN.compileSchema=kN.SchemaEnv=void 0;var cn=ue(),Dwe=r0(),go=Lr(),un=yl(),ON=be(),wwe=vl();class Dl{constructor(e){var t;this.refs={},this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,un.normalizeId)(r===null||r===void 0?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r===null||r===void 0?void 0:r.$async,this.refs={}}}kN.SchemaEnv=Dl;function fv(e){let t=AN.call(this,e);if(t)return t;let r=(0,un.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new cn.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),a;if(e.$async)a=o.scopeValue("Error",{ref:Dwe.default,code:cn._`require("ajv/dist/runtime/validation_error").default`});let c=o.scopeName("validate");e.validateName=c;let l={gen:o,allErrors:this.opts.allErrors,data:go.default.data,parentData:go.default.parentData,parentDataProperty:go.default.parentDataProperty,dataNames:[go.default.data],dataPathArr:[cn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,cn.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:cn.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:cn._`""`,opts:this.opts,self:this},d;try{this._compilations.add(e),(0,wwe.validateFunctionCode)(l),o.optimize(this.opts.code.optimize);let f=o.toString();if(d=`${o.scopeRefs(go.default.scope)}return ${f}`,this.opts.code.process)d=this.opts.code.process(d,e);let p=Function(`${go.default.self}`,`${go.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async)p.$async=!0;if(this.opts.code.source===!0)p.source={validateName:c,validateCode:f,scopeValues:o._values};if(this.opts.unevaluated){let{props:g,items:y}=l;if(p.evaluated={props:g instanceof cn.Name?void 0:g,items:y instanceof cn.Name?void 0:y,dynamicProps:g instanceof cn.Name,dynamicItems:y instanceof cn.Name},p.source)p.source.evaluated=(0,cn.stringify)(p.evaluated)}return e.validate=p,e}catch(f){if(delete e.validate,delete e.validateName,d)this.logger.error("Error compiling schema, function code:",d);throw f}finally{this._compilations.delete(e)}}kN.compileSchema=fv;function Ewe(e,t,r){var n;r=(0,un.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let s=Cwe.call(this,e,r);if(s===void 0){let o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;if(o)s=new Dl({schema:o,schemaId:a,root:e,baseId:t})}if(s===void 0)return;return e.refs[r]=Swe.call(this,s)}kN.resolveRef=Ewe;function Swe(e){if((0,un.inlineRef)(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:fv.call(this,e)}function AN(e){for(let t of this._compilations)if($we(t,e))return t}kN.getCompilingSchema=AN;function $we(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Cwe(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||n0.call(this,e,t)}function n0(e,t){let r=this.opts.uriResolver.parse(t),n=(0,un._getFullPath)(this.opts.uriResolver,r),i=(0,un.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return dv.call(this,r,e);let s=(0,un.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){let a=n0.call(this,e,o);if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;return dv.call(this,r,a)}if(typeof(o===null||o===void 0?void 0:o.schema)!=="object")return;if(!o.validate)fv.call(this,o);if(s===(0,un.normalizeId)(t)){let{schema:a}=o,{schemaId:c}=this.opts,l=a[c];if(l)i=(0,un.resolveUrl)(this.opts.uriResolver,i,l);return new Dl({schema:a,schemaId:c,root:e,baseId:i})}return dv.call(this,r,o)}kN.resolveSchema=n0;var Fwe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function dv(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;let c=r[(0,ON.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r==="object"&&r[this.opts.schemaId];if(!Fwe.has(a)&&l)t=(0,un.resolveUrl)(this.opts.uriResolver,t,l)}let s;if(typeof r!="boolean"&&r.$ref&&!(0,ON.schemaHasRulesButRef)(r,this.RULES)){let a=(0,un.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=n0.call(this,n,a)}let{schemaId:o}=this.opts;if(s=s||new Dl({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s;return}});var IN=h(function(iGe,Pwe){Pwe.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 mv=h(function(sGe,jN){var Iwe=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),NN=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 pv(e){let t="",r=0,n=0;for(n=0;n<e.length;n++){if(r=e[n].charCodeAt(0),r===48)continue;if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var Twe=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function TN(e){return e.length=0,!0}function Nwe(e,t,r){if(e.length){let n=pv(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function qwe(e){let t=0,r={error:!1,address:"",zone:""},n=[],i=[],s=!1,o=!1,a=Nwe;for(let c=0;c<e.length;c++){let l=e[c];if(l==="["||l==="]")continue;if(l===":"){if(s===!0)o=!0;if(!a(i,n,r))break;if(++t>7){r.error=!0;break}if(c>0&&e[c-1]===":")s=!0;n.push(":");continue}else if(l==="%"){if(!a(i,n,r))break;a=TN}else{i.push(l);continue}}if(i.length)if(a===TN)r.zone=i.join("");else if(o)n.push(i.join(""));else n.push(pv(i));return r.address=n.join(""),r}function qN(e){if(jwe(e,":")<2)return{host:e,isIPV6:!1};let t=qwe(e);if(!t.error){let{address:r,address:n}=t;if(t.zone)r+="%"+t.zone,n+="%25"+t.zone;return{host:r,isIPV6:!0,escapedHost:n}}else return{host:e,isIPV6:!1}}function jwe(e,t){let r=0;for(let n=0;n<e.length;n++)if(e[n]===t)r++;return r}function Mwe(e){let t=e,r=[],n=-1,i=0;while(i=t.length){if(i===1)if(t===".")break;else if(t==="/"){r.push("/");break}else{r.push(t);break}else if(i===2){if(t[0]==="."){if(t[1]===".")break;else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."||t[1]==="/"){r.push("/");break}}}else if(i===3){if(t==="/.."){if(r.length!==0)r.pop();r.push("/");break}}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"){if(t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."){if(t[3]==="/"){if(t=t.slice(3),r.length!==0)r.pop();continue}}}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}function Bwe(e,t){let r=t!==!0?escape:unescape;if(e.scheme!==void 0)e.scheme=r(e.scheme);if(e.userinfo!==void 0)e.userinfo=r(e.userinfo);if(e.host!==void 0)e.host=r(e.host);if(e.path!==void 0)e.path=r(e.path);if(e.query!==void 0)e.query=r(e.query);if(e.fragment!==void 0)e.fragment=r(e.fragment);return e}function Lwe(e){let t=[];if(e.userinfo!==void 0)t.push(e.userinfo),t.push("@");if(e.host!==void 0){let r=unescape(e.host);if(!NN(r)){let n=qN(r);if(n.isIPV6===!0)r=`[${n.escapedHost}]`;else r=e.host}t.push(r)}if(typeof e.port==="number"||typeof e.port==="string")t.push(":"),t.push(String(e.port));return t.length?t.join(""):void 0}jN.exports={nonSimpleDomain:Twe,recomposeAuthority:Lwe,normalizeComponentEncoding:Bwe,removeDotSegments:Mwe,isIPv4:NN,isUUID:Iwe,normalizeIPv6:qN,stringArrayToHexStripped:pv}});var VN=h(function(oGe,UN){var{isUUID:Uwe}=mv(),Vwe=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,zwe=["http","https","ws","wss","urn","urn:uuid"];function Hwe(e){return zwe.indexOf(e)!==-1}function hv(e){if(e.secure===!0)return!0;else if(e.secure===!1)return!1;else if(e.scheme)return e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S");else return!1}function MN(e){if(!e.host)e.error=e.error||"HTTP URIs must have a host.";return e}function BN(e){let t=String(e.scheme).toLowerCase()==="https";if(e.port===(t?443:80)||e.port==="")e.port=void 0;if(!e.path)e.path="/";return e}function Wwe(e){return e.secure=hv(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function Gwe(e){if(e.port===(hv(e)?443:80)||e.port==="")e.port=void 0;if(typeof e.secure==="boolean")e.scheme=e.secure?"wss":"ws",e.secure=void 0;if(e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function Kwe(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(Vwe);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=`${n}:${t.nid||e.nid}`,s=gv(i);if(e.path=void 0,s)e=s.parse(e,t)}else e.error=e.error||"URN can not be parsed.";return e}function Ywe(e,t){if(e.nid===void 0)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,s=gv(i);if(s)e=s.serialize(e,t);let o=e,a=e.nss;return o.path=`${n||t.nid}:${a}`,t.skipEscape=!0,o}function Jwe(e,t){let r=e;if(r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!Uwe(r.uuid)))r.error=r.error||"UUID is not valid.";return r}function Xwe(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var LN={scheme:"http",domainHost:!0,parse:MN,serialize:BN},Qwe={scheme:"https",domainHost:LN.domainHost,parse:MN,serialize:BN},i0={scheme:"ws",domainHost:!0,parse:Wwe,serialize:Gwe},Zwe={scheme:"wss",domainHost:i0.domainHost,parse:i0.parse,serialize:i0.serialize},e1e={scheme:"urn",parse:Kwe,serialize:Ywe,skipNormalize:!0},t1e={scheme:"urn:uuid",parse:Jwe,serialize:Xwe,skipNormalize:!0},s0={http:LN,https:Qwe,ws:i0,wss:Zwe,urn:e1e,"urn:uuid":t1e};Object.setPrototypeOf(s0,null);function gv(e){return e&&(s0[e]||s0[e.toLowerCase()])||void 0}UN.exports={wsIsSecure:hv,SCHEMES:s0,isValidSchemeName:Hwe,getSchemeHandler:gv}});var xv=h(function(aGe,a0){var{normalizeIPv6:r1e,removeDotSegments:El,recomposeAuthority:n1e,normalizeComponentEncoding:o0,isIPv4:i1e,nonSimpleDomain:s1e}=mv(),{SCHEMES:o1e,getSchemeHandler:zN}=VN();function a1e(e,t){if(typeof e==="string")e=Kn(Di(e,t),t);else if(typeof e==="object")e=Di(Kn(e,t),t);return e}function c1e(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=HN(Di(e,n),Di(t,n),n,!0);return n.skipEscape=!0,Kn(i,n)}function HN(e,t,r,n){let i={};if(!n)e=Di(Kn(e,r),r),t=Di(Kn(t,r),r);if(r=r||{},!r.tolerant&&t.scheme)i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=El(t.path||""),i.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=El(t.path||""),i.query=t.query;else{if(!t.path)if(i.path=e.path,t.query!==void 0)i.query=t.query;else i.query=e.query;else{if(t.path[0]==="/")i.path=El(t.path);else{if((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path)i.path="/"+t.path;else if(!e.path)i.path=t.path;else i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;i.path=El(i.path)}i.query=t.query}i.userinfo=e.userinfo,i.host=e.host,i.port=e.port}i.scheme=e.scheme}return i.fragment=t.fragment,i}function u1e(e,t,r){if(typeof e==="string")e=unescape(e),e=Kn(o0(Di(e,r),!0),{...r,skipEscape:!0});else if(typeof e==="object")e=Kn(o0(e,!0),{...r,skipEscape:!0});if(typeof t==="string")t=unescape(t),t=Kn(o0(Di(t,r),!0),{...r,skipEscape:!0});else if(typeof t==="object")t=Kn(o0(t,!0),{...r,skipEscape:!0});return e.toLowerCase()===t.toLowerCase()}function Kn(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],s=zN(n.scheme||r.scheme);if(s&&s.serialize)s.serialize(r,n);if(r.path!==void 0)if(!n.skipEscape){if(r.path=escape(r.path),r.scheme!==void 0)r.path=r.path.split("%3A").join(":")}else r.path=unescape(r.path);if(n.reference!=="suffix"&&r.scheme)i.push(r.scheme,":");let o=n1e(r);if(o!==void 0){if(n.reference!=="suffix")i.push("//");if(i.push(o),r.path&&r.path[0]!=="/")i.push("/")}if(r.path!==void 0){let a=r.path;if(!n.absolutePath&&(!s||!s.absolutePath))a=El(a);if(o===void 0&&a[0]==="/"&&a[1]==="/")a="/%2F"+a.slice(2);i.push(a)}if(r.query!==void 0)i.push("?",r.query);if(r.fragment!==void 0)i.push("#",r.fragment);return i.join("")}var l1e=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Di(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1;if(r.reference==="suffix")if(r.scheme)e=r.scheme+":"+e;else e="//"+e;let s=e.match(l1e);if(s){if(n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port))n.port=s[5];if(n.host)if(i1e(n.host)===!1){let c=r1e(n.host);n.host=c.host.toLowerCase(),i=c.isIPV6}else i=!0;if(n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path)n.reference="same-document";else if(n.scheme===void 0)n.reference="relative";else if(n.fragment===void 0)n.reference="absolute";else n.reference="uri";if(r.reference&&r.reference!=="suffix"&&r.reference!==n.reference)n.error=n.error||"URI is not a "+r.reference+" reference.";let o=zN(r.scheme||n.scheme);if(!r.unicodeSupport&&(!o||!o.unicodeSupport)){if(n.host&&(r.domainHost||o&&o.domainHost)&&i===!1&&s1e(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(a){n.error=n.error||"Host's domain name can not be converted to ASCII: "+a}}if(!o||o&&!o.skipNormalize){if(e.indexOf("%")!==-1){if(n.scheme!==void 0)n.scheme=unescape(n.scheme);if(n.host!==void 0)n.host=unescape(n.host)}if(n.path)n.path=escape(unescape(n.path));if(n.fragment)n.fragment=encodeURI(decodeURIComponent(n.fragment))}if(o&&o.parse)o.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var yv={SCHEMES:o1e,normalize:a1e,resolve:c1e,resolveComponent:HN,equal:u1e,serialize:Kn,parse:Di};a0.exports=yv;a0.exports.default=yv;a0.exports.fastUri=yv});var KN=h(function(GN){Object.defineProperty(GN,"__esModule",{value:!0});var WN=xv();WN.code='require("ajv/dist/runtime/uri").default';GN.default=WN});var r9=h(function(wi){Object.defineProperty(wi,"__esModule",{value:!0});wi.CodeGen=wi.Name=wi.nil=wi.stringify=wi.str=wi._=wi.KeywordCxt=void 0;var f1e=vl();Object.defineProperty(wi,"KeywordCxt",{enumerable:!0,get:function(){return f1e.KeywordCxt}});var rc=ue();Object.defineProperty(wi,"_",{enumerable:!0,get:function(){return rc._}});Object.defineProperty(wi,"str",{enumerable:!0,get:function(){return rc.str}});Object.defineProperty(wi,"stringify",{enumerable:!0,get:function(){return rc.stringify}});Object.defineProperty(wi,"nil",{enumerable:!0,get:function(){return rc.nil}});Object.defineProperty(wi,"Name",{enumerable:!0,get:function(){return rc.Name}});Object.defineProperty(wi,"CodeGen",{enumerable:!0,get:function(){return rc.CodeGen}});var p1e=r0(),ZN=_l(),m1e=Jb(),Sl=wl(),h1e=ue(),$l=yl(),c0=hl(),vv=be(),YN=IN(),g1e=KN(),e9=(e,t)=>new RegExp(e,t);e9.code="new RegExp";var y1e=["removeAdditional","useDefaults","coerceTypes"],x1e=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b1e={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."},v1e={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},JN=200;function _1e(e){var t,r,n,i,s,o,a,c,l,d,f,m,p,g,y,x,v,_,S,C,D,O,F,M,k;let j=e.strict,Z=(t=e.code)===null||t===void 0?void 0:t.optimize,_e=Z===!0||Z===void 0?1:Z||0,qe=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:e9,Me=(i=e.uriResolver)!==null&&i!==void 0?i:g1e.default;return{strictSchema:(o=(s=e.strictSchema)!==null&&s!==void 0?s:j)!==null&&o!==void 0?o:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:j)!==null&&c!==void 0?c:!0,strictTypes:(d=(l=e.strictTypes)!==null&&l!==void 0?l:j)!==null&&d!==void 0?d:"log",strictTuples:(m=(f=e.strictTuples)!==null&&f!==void 0?f:j)!==null&&m!==void 0?m:"log",strictRequired:(g=(p=e.strictRequired)!==null&&p!==void 0?p:j)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:_e,regExp:qe}:{optimize:_e,regExp:qe},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:JN,loopEnum:(x=e.loopEnum)!==null&&x!==void 0?x:JN,meta:(v=e.meta)!==null&&v!==void 0?v:!0,messages:(_=e.messages)!==null&&_!==void 0?_:!0,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(C=e.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(D=e.addUsedSchema)!==null&&D!==void 0?D:!0,validateSchema:(O=e.validateSchema)!==null&&O!==void 0?O:!0,validateFormats:(F=e.validateFormats)!==null&&F!==void 0?F:!0,unicodeRegExp:(M=e.unicodeRegExp)!==null&&M!==void 0?M:!0,int32range:(k=e.int32range)!==null&&k!==void 0?k:!0,uriResolver:Me}}class u0{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._1e(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new h1e.ValueScope({scope:{},prefixes:x1e,es5:t,lines:r}),this.logger=C1e(e.logger);let n=e.validateFormats;if(e.validateFormats=!1,this.RULES=(0,m1e.getRules)(),XN.call(this,b1e,e,"NOT SUPPORTED"),XN.call(this,v1e,e,"DEPRECATED","warn"),this._metaOpts=S1e.call(this),e.formats)w1e.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)E1e.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);D1e.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,n=YN;if(r==="id")n={...YN},n.id=n.$id,delete n.$id;if(t&&e)this.addMetaSchema(n,n[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let n=r(t);if(!("$async"in r))this.errors=r.errors;return n}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(l,d){await i.call(this,l.$schema);let f=this._addSchema(l,d);return f.validate||s.call(this,f)}async function i(l){if(l&&!this.getSchema(l))await n.call(this,{$ref:l},!0)}async function s(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof ZN.default))throw d;return o.call(this,d),await a.call(this,d.missingSchema),s.call(this,l)}}function o({missingSchema:l,missingRef:d}){if(this.refs[l])throw Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function a(l){let d=await c.call(this,l);if(!this.refs[l])await i.call(this,d.$schema);if(!this.refs[l])this.addSchema(d,l,t)}async function c(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=r(l))}finally{delete this._loading[l]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,n);return this}let i;if(typeof e==="object"){let{schemaId:s}=this.opts;if(i=e[s],i!==void 0&&typeof i!="string")throw Error(`schema ${s} must be string`)}return t=(0,$l.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(r,e);if(!n&&t){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw Error(i)}return n}getSchema(e){let t;while(typeof(t=QN.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:r}=this.opts,n=new Sl.SchemaEnv({schema:{},schemaId:r});if(t=Sl.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=QN.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r)r=(0,$l.normalizeId)(r),delete this.schemas[r],delete this.refs[r];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){if(r=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r}else if(typeof e=="object"&&t===void 0){if(t=e,r=t.keyword,Array.isArray(r)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(R1e.call(this,r,t),!t)return(0,vv.eachItem)(r,(i)=>bv.call(this,i)),this;A1e.call(this,t);let n={...t,type:(0,c0.getJSONTypes)(t.type),schemaType:(0,c0.getJSONTypes)(t.schemaType)};return(0,vv.eachItem)(r,n.type.length===0?(i)=>bv.call(this,i,n):(i)=>n.type.forEach((s)=>bv.call(this,i,n,s))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let r of t.rules){let n=r.rules.findIndex((i)=>i.keyword===e);if(n>=0)r.rules.splice(n,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((n)=>`${r}${n.instancePath} ${n.message}`).reduce((n,i)=>n+t+i)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of t){let i=n.split("/").slice(1),s=e;for(let o of i)s=s[o];for(let o in r){let a=r[o];if(typeof a!="object")continue;let{$data:c}=a.definition,l=s[o];if(c&&l)s[o]=t9(l)}}return e}_removeAllSchemas(e,t){for(let r in e){let n=e[r];if(!t||t.test(r)){if(typeof n=="string")delete e[r];else if(n&&!n.meta)this._cache.delete(n.schema),delete e[r]}}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:o}=this.opts;if(typeof e=="object")s=e[o];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let a=this._cache.get(e);if(a!==void 0)return a;r=(0,$l.normalizeId)(s||r);let c=$l.getSchemaRefs.call(this,e,r);if(a=new Sl.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),i&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(n)this.validateSchema(e,!0);return a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else Sl.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Sl.compileSchema.call(this,e)}finally{this.opts=t}}}u0.ValidationError=p1e.default;u0.MissingRefError=ZN.default;wi.default=u0;function XN(e,t,r,n="error"){for(let i in e){let s=i;if(s in t)this.logger[n](`${r}: option ${i}. ${e[s]}`)}}function QN(e){return e=(0,$l.normalizeId)(e),this.schemas[e]||this.refs[e]}function D1e(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function w1e(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function E1e(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function S1e(){let e={...this.opts};for(let t of y1e)delete e[t];return e}var $1e={log(){},warn(){},error(){}};function C1e(e){if(e===!1)return $1e;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var F1e=/^[a-z_$][a-z0-9_$:-]*$/i;function R1e(e,t){let{RULES:r}=this;if((0,vv.eachItem)(e,(n)=>{if(r.keywords[n])throw Error(`Keyword ${n} is already defined`);if(!F1e.test(n))throw Error(`Keyword ${n} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function bv(e,t,r){var n;let i=t===null||t===void 0?void 0:t.post;if(r&&i)throw Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,o=i?s.post:s.rules.find(({type:c})=>c===r);if(!o)o={type:r,rules:[]},s.rules.push(o);if(s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,c0.getJSONTypes)(t.type),schemaType:(0,c0.getJSONTypes)(t.schemaType)}};if(t.before)O1e.call(this,o,a,t.before);else o.rules.push(a);s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach((c)=>this.addKeyword(c))}function O1e(e,t,r){let n=e.rules.findIndex((i)=>i.keyword===r);if(n>=0)e.rules.splice(n,0,t);else e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)}function A1e(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=t9(t);e.validateSchema=this.compile(t,!0)}var k1e={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function t9(e){return{anyOf:[e,k1e]}}});var i9=h(function(n9){Object.defineProperty(n9,"__esModule",{value:!0});var T1e={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};n9.default=T1e});var f0=h(function(c9){Object.defineProperty(c9,"__esModule",{value:!0});c9.callRef=c9.getValidate=void 0;var q1e=_l(),s9=Ur(),fr=ue(),nc=Lr(),o9=wl(),l0=be(),j1e={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:o,opts:a,self:c}=n,{root:l}=s;if((r==="#"||r==="#/")&&i===l.baseId)return f();let d=o9.resolveRef.call(c,l,i,r);if(d===void 0)throw new q1e.default(n.opts.uriResolver,i,r);if(d instanceof o9.SchemaEnv)return m(d);return p(d);function f(){if(s===l)return d0(e,o,s,s.$async);let g=t.scopeValue("root",{ref:l});return d0(e,fr._`${g}.validate`,l,l.$async)}function m(g){let y=a9(e,g);d0(e,y,g,g.$async)}function p(g){let y=t.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,fr.stringify)(g)}:{ref:g}),x=t.name("valid"),v=e.subschema({schema:g,dataTypes:[],schemaPath:fr.nil,topSchemaRef:y,errSchemaPath:r},x);e.mergeEvaluated(v),e.ok(x)}}};function a9(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):fr._`${r.scopeValue("wrapper",{ref:t})}.validate`}c9.getValidate=a9;function d0(e,t,r,n){let{gen:i,it:s}=e,{allErrors:o,schemaEnv:a,opts:c}=s,l=c.passContext?nc.default.this:fr.nil;if(n)d();else f();function d(){if(!a.$async)throw Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{if(i.code(fr._`await ${(0,s9.callValidateCode)(e,t,l)}`),p(t),!o)i.assign(g,!0)},(y)=>{if(i.if(fr._`!(${y} instanceof ${s.ValidationError})`,()=>i.throw(y)),m(y),!o)i.assign(g,!1)}),e.ok(g)}function f(){e.result((0,s9.callValidateCode)(e,t,l),()=>p(t),()=>m(t))}function m(g){let y=fr._`${g}.errors`;i.assign(nc.default.vErrors,fr._`${nc.default.vErrors} === null ? ${y} : ${nc.default.vErrors}.concat(${y})`),i.assign(nc.default.errors,fr._`${nc.default.vErrors}.length`)}function p(g){var y;if(!s.opts.unevaluated)return;let x=(y=r===null||r===void 0?void 0:r.validate)===null||y===void 0?void 0:y.evaluated;if(s.props!==!0)if(x&&!x.dynamicProps){if(x.props!==void 0)s.props=l0.mergeEvaluated.props(i,x.props,s.props)}else{let v=i.var("props",fr._`${g}.evaluated.props`);s.props=l0.mergeEvaluated.props(i,v,s.props,fr.Name)}if(s.items!==!0)if(x&&!x.dynamicItems){if(x.items!==void 0)s.items=l0.mergeEvaluated.items(i,x.items,s.items)}else{let v=i.var("items",fr._`${g}.evaluated.items`);s.items=l0.mergeEvaluated.items(i,v,s.items,fr.Name)}}}c9.callRef=d0;c9.default=j1e});var d9=h(function(l9){Object.defineProperty(l9,"__esModule",{value:!0});var L1e=i9(),U1e=f0(),V1e=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",L1e.default,U1e.default];l9.default=V1e});var p9=h(function(f9){Object.defineProperty(f9,"__esModule",{value:!0});var p0=ue(),Ds=p0.operators,m0={maximum:{okStr:"<=",ok:Ds.LTE,fail:Ds.GT},minimum:{okStr:">=",ok:Ds.GTE,fail:Ds.LT},exclusiveMaximum:{okStr:"<",ok:Ds.LT,fail:Ds.GTE},exclusiveMinimum:{okStr:">",ok:Ds.GT,fail:Ds.LTE}},H1e={message:({keyword:e,schemaCode:t})=>p0.str`must be ${m0[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>p0._`{comparison: ${m0[e].okStr}, limit: ${t}}`},W1e={keyword:Object.keys(m0),type:"number",schemaType:"number",$data:!0,error:H1e,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data(p0._`${r} ${m0[t].fail} ${n} || isNaN(${r})`)}};f9.default=W1e});var h9=h(function(m9){Object.defineProperty(m9,"__esModule",{value:!0});var Cl=ue(),K1e={message:({schemaCode:e})=>Cl.str`must be multiple of ${e}`,params:({schemaCode:e})=>Cl._`{multipleOf: ${e}}`},Y1e={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:K1e,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,o=t.let("res"),a=s?Cl._`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:Cl._`${o} !== parseInt(${o})`;e.fail$data(Cl._`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};m9.default=Y1e});var x9=h(function(y9){Object.defineProperty(y9,"__esModule",{value:!0});function g9(e){let t=e.length,r=0,n=0,i;while(n<t)if(r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t){if(i=e.charCodeAt(n),(i&64512)===56320)n++}return r}y9.default=g9;g9.code='require("ajv/dist/runtime/ucs2length").default'});var v9=h(function(b9){Object.defineProperty(b9,"__esModule",{value:!0});var yo=ue(),Q1e=be(),Z1e=x9(),e2e={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return yo.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>yo._`{limit: ${e}}`},t2e={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:e2e,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?yo.operators.GT:yo.operators.LT,o=i.opts.unicode===!1?yo._`${r}.length`:yo._`${(0,Q1e.useFunc)(e.gen,Z1e.default)}(${r})`;e.fail$data(yo._`${o} ${s} ${n}`)}};b9.default=t2e});var D9=h(function(_9){Object.defineProperty(_9,"__esModule",{value:!0});var n2e=Ur(),h0=ue(),i2e={message:({schemaCode:e})=>h0.str`must match pattern "${e}"`,params:({schemaCode:e})=>h0._`{pattern: ${e}}`},s2e={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:i2e,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,o=s.opts.unicodeRegExp?"u":"",a=r?h0._`(new RegExp(${i}, ${o}))`:(0,n2e.usePattern)(e,n);e.fail$data(h0._`!${a}.test(${t})`)}};_9.default=s2e});var E9=h(function(w9){Object.defineProperty(w9,"__esModule",{value:!0});var Fl=ue(),a2e={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return Fl.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>Fl._`{limit: ${e}}`},c2e={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:a2e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Fl.operators.GT:Fl.operators.LT;e.fail$data(Fl._`Object.keys(${r}).length ${i} ${n}`)}};w9.default=c2e});var $9=h(function(S9){Object.defineProperty(S9,"__esModule",{value:!0});var Rl=Ur(),Ol=ue(),l2e=be(),d2e={message:({params:{missingProperty:e}})=>Ol.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>Ol._`{missingProperty: ${e}}`},f2e={keyword:"required",type:"object",schemaType:"array",$data:!0,error:d2e,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;let c=r.length>=a.loopRequired;if(o.allErrors)l();else d();if(a.strictRequired){let p=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if((p===null||p===void 0?void 0:p[y])===void 0&&!g.has(y)){let x=o.schemaEnv.baseId+o.errSchemaPath,v=`required property "${y}" is not defined at "${x}" (strictRequired)`;(0,l2e.checkStrictMode)(o,v,o.opts.strictRequired)}}function l(){if(c||s)e.block$data(Ol.nil,f);else for(let p of r)(0,Rl.checkReportMissingProp)(e,p)}function d(){let p=t.let("missing");if(c||s){let g=t.let("valid",!0);e.block$data(g,()=>m(p,g)),e.ok(g)}else t.if((0,Rl.checkMissingProp)(e,r,p)),(0,Rl.reportMissingProp)(e,p),t.else()}function f(){t.forOf("prop",n,(p)=>{e.setParams({missingProperty:p}),t.if((0,Rl.noPropertyInData)(t,i,p,a.ownProperties),()=>e.error())})}function m(p,g){e.setParams({missingProperty:p}),t.forOf(p,n,()=>{t.assign(g,(0,Rl.propertyInData)(t,i,p,a.ownProperties)),t.if((0,Ol.not)(g),()=>{e.error(),t.break()})},Ol.nil)}}};S9.default=f2e});var F9=h(function(C9){Object.defineProperty(C9,"__esModule",{value:!0});var Al=ue(),m2e={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return Al.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>Al._`{limit: ${e}}`},h2e={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:m2e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Al.operators.GT:Al.operators.LT;e.fail$data(Al._`${r}.length ${i} ${n}`)}};C9.default=h2e});var g0=h(function(O9){Object.defineProperty(O9,"__esModule",{value:!0});var R9=gl();R9.code='require("ajv/dist/runtime/equal").default';O9.default=R9});var k9=h(function(A9){Object.defineProperty(A9,"__esModule",{value:!0});var _v=hl(),Ot=ue(),x2e=be(),b2e=g0(),v2e={message:({params:{i:e,j:t}})=>Ot.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>Ot._`{i: ${e}, j: ${t}}`},_2e={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:v2e,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:o,it:a}=e;if(!n&&!i)return;let c=t.let("valid"),l=s.items?(0,_v.getSchemaTypes)(s.items):[];e.block$data(c,d,Ot._`${o} === false`),e.ok(c);function d(){let g=t.let("i",Ot._`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if(Ot._`${g} > 1`,()=>(f()?m:p)(g,y))}function f(){return l.length>0&&!l.some((g)=>g==="object"||g==="array")}function m(g,y){let x=t.name("item"),v=(0,_v.checkDataTypes)(l,x,a.opts.strictNumbers,_v.DataType.Wrong),_=t.const("indices",Ot._`{}`);t.for(Ot._`;${g}--;`,()=>{if(t.let(x,Ot._`${r}[${g}]`),t.if(v,Ot._`continue`),l.length>1)t.if(Ot._`typeof ${x} == "string"`,Ot._`${x} += "_"`);t.if(Ot._`typeof ${_}[${x}] == "number"`,()=>{t.assign(y,Ot._`${_}[${x}]`),e.error(),t.assign(c,!1).break()}).code(Ot._`${_}[${x}] = ${g}`)})}function p(g,y){let x=(0,x2e.useFunc)(t,b2e.default),v=t.name("outer");t.label(v).for(Ot._`;${g}--;`,()=>t.for(Ot._`${y} = ${g}; ${y}--;`,()=>t.if(Ot._`${x}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(v)})))}}};A9.default=_2e});var I9=h(function(P9){Object.defineProperty(P9,"__esModule",{value:!0});var Dv=ue(),w2e=be(),E2e=g0(),S2e={message:"must be equal to constant",params:({schemaCode:e})=>Dv._`{allowedValue: ${e}}`},$2e={keyword:"const",$data:!0,error:S2e,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;if(n||s&&typeof s=="object")e.fail$data(Dv._`!${(0,w2e.useFunc)(t,E2e.default)}(${r}, ${i})`);else e.fail(Dv._`${s} !== ${r}`)}};P9.default=$2e});var N9=h(function(T9){Object.defineProperty(T9,"__esModule",{value:!0});var kl=ue(),F2e=be(),R2e=g0(),O2e={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>kl._`{allowedValues: ${e}}`},A2e={keyword:"enum",schemaType:"array",$data:!0,error:O2e,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e;if(!n&&i.length===0)throw Error("enum must have non-empty array");let a=i.length>=o.opts.loopEnum,c,l=()=>c!==null&&c!==void 0?c:c=(0,F2e.useFunc)(t,R2e.default),d;if(a||n)d=t.let("valid"),e.block$data(d,f);else{if(!Array.isArray(i))throw Error("ajv implementation error");let p=t.const("vSchema",s);d=(0,kl.or)(...i.map((g,y)=>m(p,y)))}e.pass(d);function f(){t.assign(d,!1),t.forOf("v",s,(p)=>t.if(kl._`${l()}(${r}, ${p})`,()=>t.assign(d,!0).break()))}function m(p,g){let y=i[g];return typeof y==="object"&&y!==null?kl._`${l()}(${r}, ${p}[${g}])`:kl._`${r} === ${y}`}}};T9.default=A2e});var j9=h(function(q9){Object.defineProperty(q9,"__esModule",{value:!0});var P2e=p9(),I2e=h9(),T2e=v9(),N2e=D9(),q2e=E9(),j2e=$9(),M2e=F9(),B2e=k9(),L2e=I9(),U2e=N9(),V2e=[P2e.default,I2e.default,T2e.default,N2e.default,q2e.default,j2e.default,M2e.default,B2e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},L2e.default,U2e.default];q9.default=V2e});var Ev=h(function(B9){Object.defineProperty(B9,"__esModule",{value:!0});B9.validateAdditionalItems=void 0;var xo=ue(),wv=be(),H2e={message:({params:{len:e}})=>xo.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>xo._`{limit: ${e}}`},W2e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:H2e,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,wv.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}M9(e,n)}};function M9(e,t){let{gen:r,schema:n,data:i,keyword:s,it:o}=e;o.items=!0;let a=r.const("len",xo._`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass(xo._`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,wv.alwaysValidSchema)(o,n)){let l=r.var("valid",xo._`${a} <= ${t.length}`);r.if((0,xo.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,a,(d)=>{if(e.subschema({keyword:s,dataProp:d,dataPropType:wv.Type.Num},l),!o.allErrors)r.if((0,xo.not)(l),()=>r.break())})}}B9.validateAdditionalItems=M9;B9.default=W2e});var Sv=h(function(z9){Object.defineProperty(z9,"__esModule",{value:!0});z9.validateTuple=void 0;var U9=ue(),y0=be(),K2e=Ur(),Y2e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return V9(e,"additionalItems",t);if(r.items=!0,(0,y0.alwaysValidSchema)(r,t))return;e.ok((0,K2e.validateArray)(e))}};function V9(e,t,r=e.schema){let{gen:n,parentSchema:i,data:s,keyword:o,it:a}=e;if(d(i),a.opts.unevaluated&&r.length&&a.items!==!0)a.items=y0.mergeEvaluated.items(n,r.length,a.items);let c=n.name("valid"),l=n.const("len",U9._`${s}.length`);r.forEach((f,m)=>{if((0,y0.alwaysValidSchema)(a,f))return;n.if(U9._`${l} > ${m}`,()=>e.subschema({keyword:o,schemaProp:m,dataProp:m},c)),e.ok(c)});function d(f){let{opts:m,errSchemaPath:p}=a,g=r.length,y=g===f.minItems&&(g===f.maxItems||f[t]===!1);if(m.strictTuples&&!y){let x=`"${o}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;(0,y0.checkStrictMode)(a,x,m.strictTuples)}}}z9.validateTuple=V9;z9.default=Y2e});var G9=h(function(W9){Object.defineProperty(W9,"__esModule",{value:!0});var X2e=Sv(),Q2e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>(0,X2e.validateTuple)(e,"items")};W9.default=Q2e});var J9=h(function(Y9){Object.defineProperty(Y9,"__esModule",{value:!0});var K9=ue(),eEe=be(),tEe=Ur(),rEe=Ev(),nEe={message:({params:{len:e}})=>K9.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>K9._`{limit: ${e}}`},iEe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:nEe,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;if(n.items=!0,(0,eEe.alwaysValidSchema)(n,t))return;if(i)(0,rEe.validateAdditionalItems)(e,i);else e.ok((0,tEe.validateArray)(e))}};Y9.default=iEe});var Q9=h(function(X9){Object.defineProperty(X9,"__esModule",{value:!0});var Vr=ue(),x0=be(),oEe={message:({params:{min:e,max:t}})=>t===void 0?Vr.str`must contain at least ${e} valid item(s)`:Vr.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?Vr._`{minContains: ${e}}`:Vr._`{minContains: ${e}, maxContains: ${t}}`},aEe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:oEe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e,o,a,{minContains:c,maxContains:l}=n;if(s.opts.next)o=c===void 0?1:c,a=l;else o=1;let d=t.const("len",Vr._`${i}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,x0.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,x0.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,x0.alwaysValidSchema)(s,r)){let y=Vr._`${d} >= ${o}`;if(a!==void 0)y=Vr._`${y} && ${d} <= ${a}`;e.pass(y);return}s.items=!0;let f=t.name("valid");if(a===void 0&&o===1)p(f,()=>t.if(f,()=>t.break()));else if(o===0){if(t.let(f,!0),a!==void 0)t.if(Vr._`${i}.length > 0`,m)}else t.let(f,!1),m();e.result(f,()=>e.reset());function m(){let y=t.name("_valid"),x=t.let("count",0);p(y,()=>t.if(y,()=>g(x)))}function p(y,x){t.forRange("i",0,d,(v)=>{e.subschema({keyword:"contains",dataProp:v,dataPropType:x0.Type.Num,compositeRule:!0},y),x()})}function g(y){if(t.code(Vr._`${y}++`),a===void 0)t.if(Vr._`${y} >= ${o}`,()=>t.assign(f,!0).break());else if(t.if(Vr._`${y} > ${a}`,()=>t.assign(f,!1).break()),o===1)t.assign(f,!0);else t.if(Vr._`${y} >= ${o}`,()=>t.assign(f,!0))}}};X9.default=aEe});var b0=h(function(t7){Object.defineProperty(t7,"__esModule",{value:!0});t7.validateSchemaDeps=t7.validatePropertyDeps=t7.error=void 0;var $v=ue(),uEe=be(),Pl=Ur();t7.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return $v.str`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>$v._`{property: ${e},
|
|
89
89
|
missingProperty: ${n},
|
|
90
90
|
depsCount: ${t},
|
|
91
|
-
deps: ${r}}`};var lEe={keyword:"dependencies",type:"object",schemaType:"object",error:t7.error,code(e){let[t,r]=dEe(e);Z9(e,t),e7(e,r)}};function dEe({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}function Z9(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let o in t){let a=t[o];if(a.length===0)continue;let c=(0,Pl.propertyInData)(r,n,o,i.opts.ownProperties);if(e.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),i.allErrors)r.if(c,()=>{for(let l of a)(0,Pl.checkReportMissingProp)(e,l)});else r.if($v._`${c} && (${(0,Pl.checkMissingProp)(e,a,s)})`),(0,Pl.reportMissingProp)(e,s),r.else()}}t7.validatePropertyDeps=Z9;function e7(e,t=e.schema){let{gen:r,data:n,keyword:i,it:s}=e,o=r.name("valid");for(let a in t){if((0,uEe.alwaysValidSchema)(s,t[a]))continue;r.if((0,Pl.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:a},o);e.mergeValidEvaluated(c,o)},()=>r.var(o,!0)),e.ok(o)}}t7.validateSchemaDeps=e7;t7.default=lEe});var o7=h(function(s7){Object.defineProperty(s7,"__esModule",{value:!0});var i7=ue(),mEe=be(),hEe={message:"property name must be valid",params:({params:e})=>i7._`{propertyName: ${e.propertyName}}`},gEe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:hEe,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,mEe.alwaysValidSchema)(i,r))return;let s=t.name("valid");t.forIn("key",n,(o)=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,i7.not)(s),()=>{if(e.error(!0),!i.allErrors)t.break()})}),e.ok(s)}};s7.default=gEe});var Cv=h(function(a7){Object.defineProperty(a7,"__esModule",{value:!0});var v0=Ur(),ln=ue(),xEe=Lr(),_0=be(),bEe={message:"must NOT have additional properties",params:({params:e})=>ln._`{additionalProperty: ${e.additionalProperty}}`},vEe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:bEe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:o}=e;if(!s)throw Error("ajv implementation error");let{allErrors:a,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,_0.alwaysValidSchema)(o,r))return;let l=(0,v0.allSchemaProperties)(n.properties),d=(0,v0.allSchemaProperties)(n.patternProperties);f(),e.ok(ln._`${s} === ${xEe.default.errors}`);function f(){t.forIn("key",i,(x)=>{if(!l.length&&!d.length)g(x);else t.if(m(x),()=>g(x))})}function m(x){let v;if(l.length>8){let _=(0,_0.schemaRefOrVal)(o,n.properties,"properties");v=(0,v0.isOwnProperty)(t,_,x)}else if(l.length)v=(0,ln.or)(...l.map((_)=>ln._`${x} === ${_}`));else v=ln.nil;if(d.length)v=(0,ln.or)(v,...d.map((_)=>ln._`${(0,v0.usePattern)(e,_)}.test(${x})`));return(0,ln.not)(v)}function p(x){t.code(ln._`delete ${i}[${x}]`)}function g(x){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(x);return}if(r===!1){if(e.setParams({additionalProperty:x}),e.error(),!a)t.break();return}if(typeof r=="object"&&!(0,_0.alwaysValidSchema)(o,r)){let v=t.name("valid");if(c.removeAdditional==="failing")y(x,v,!1),t.if((0,ln.not)(v),()=>{e.reset(),p(x)});else if(y(x,v),!a)t.if((0,ln.not)(v),()=>t.break())}}function y(x,v,_){let E={keyword:"additionalProperties",dataProp:x,dataPropType:_0.Type.Str};if(_===!1)Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(E,v)}}};a7.default=vEe});var d7=h(function(l7){Object.defineProperty(l7,"__esModule",{value:!0});var DEe=vl(),c7=Ur(),Fv=be(),u7=Cv(),wEe={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;if(s.opts.removeAdditional==="all"&&n.additionalProperties===void 0)u7.default.code(new DEe.KeywordCxt(s,u7.default,"additionalProperties"));let o=(0,c7.allSchemaProperties)(r);for(let f of o)s.definedProperties.add(f);if(s.opts.unevaluated&&o.length&&s.props!==!0)s.props=Fv.mergeEvaluated.props(t,(0,Fv.toHash)(o),s.props);let a=o.filter((f)=>!(0,Fv.alwaysValidSchema)(s,r[f]));if(a.length===0)return;let c=t.name("valid");for(let f of a){if(l(f))d(f);else{if(t.if((0,c7.propertyInData)(t,i,f,s.opts.ownProperties)),d(f),!s.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(f),e.ok(c)}function l(f){return s.opts.useDefaults&&!s.compositeRule&&r[f].default!==void 0}function d(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};l7.default=wEe});var g7=h(function(h7){Object.defineProperty(h7,"__esModule",{value:!0});var f7=Ur(),D0=ue(),p7=be(),m7=be(),SEe={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:o}=s,a=(0,f7.allSchemaProperties)(r),c=a.filter((y)=>(0,p7.alwaysValidSchema)(s,r[y]));if(a.length===0||c.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let l=o.strictSchema&&!o.allowMatchingProperties&&i.properties,d=t.name("valid");if(s.props!==!0&&!(s.props instanceof D0.Name))s.props=(0,m7.evaluatedPropsToName)(t,s.props);let{props:f}=s;m();function m(){for(let y of a){if(l)p(y);if(s.allErrors)g(y);else t.var(d,!0),g(y),t.if(d)}}function p(y){for(let x in l)if(new RegExp(y).test(x))(0,p7.checkStrictMode)(s,`property ${x} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){t.forIn("key",n,(x)=>{t.if(D0._`${(0,f7.usePattern)(e,y)}.test(${x})`,()=>{let v=c.includes(y);if(!v)e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:x,dataPropType:m7.Type.Str},d);if(s.opts.unevaluated&&f!==!0)t.assign(D0._`${f}[${x}]`,!0);else if(!v&&!s.allErrors)t.if((0,D0.not)(d),()=>t.break())})})}}};h7.default=SEe});var x7=h(function(y7){Object.defineProperty(y7,"__esModule",{value:!0});var CEe=be(),FEe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,CEe.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};y7.default=FEe});var v7=h(function(b7){Object.defineProperty(b7,"__esModule",{value:!0});var OEe=Ur(),AEe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:OEe.validateUnion,error:{message:"must match a schema in anyOf"}};b7.default=AEe});var D7=h(function(_7){Object.defineProperty(_7,"__esModule",{value:!0});var w0=ue(),PEe=be(),IEe={message:"must match exactly one schema in oneOf",params:({params:e})=>w0._`{passingSchemas: ${e.passing}}`},TEe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:IEe,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let s=r,o=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(l),e.result(o,()=>e.reset(),()=>e.error(!0));function l(){s.forEach((d,f)=>{let m;if((0,PEe.alwaysValidSchema)(i,d))t.var(c,!0);else m=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c);if(f>0)t.if(w0._`${c} && ${o}`).assign(o,!1).assign(a,w0._`[${a}, ${f}]`).else();t.if(c,()=>{if(t.assign(o,!0),t.assign(a,f),m)e.mergeEvaluated(m,w0.Name)})})}}};_7.default=TEe});var E7=h(function(w7){Object.defineProperty(w7,"__esModule",{value:!0});var qEe=be(),jEe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let i=t.name("valid");r.forEach((s,o)=>{if((0,qEe.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:o},i);e.ok(i),e.mergeEvaluated(a)})}};w7.default=jEe});var F7=h(function(C7){Object.defineProperty(C7,"__esModule",{value:!0});var E0=ue(),$7=be(),BEe={message:({params:e})=>E0.str`must match "${e.ifClause}" schema`,params:({params:e})=>E0._`{failingKeyword: ${e.ifClause}}`},LEe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:BEe,code(e){let{gen:t,parentSchema:r,it:n}=e;if(r.then===void 0&&r.else===void 0)(0,$7.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=S7(n,"then"),s=S7(n,"else");if(!i&&!s)return;let o=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),i&&s){let d=t.let("ifClause");e.setParams({ifClause:d}),t.if(a,l("then",d),l("else",d))}else if(i)t.if(a,l("then"));else t.if((0,E0.not)(a),l("else"));e.pass(o,()=>e.error(!0));function c(){let d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(d)}function l(d,f){return()=>{let m=e.subschema({keyword:d},a);if(t.assign(o,a),e.mergeValidEvaluated(m,o),f)t.assign(f,E0._`${d}`);else e.setParams({ifClause:d})}}}};function S7(e,t){let r=e.schema[t];return r!==void 0&&!(0,$7.alwaysValidSchema)(e,r)}C7.default=LEe});var O7=h(function(R7){Object.defineProperty(R7,"__esModule",{value:!0});var VEe=be(),zEe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)(0,VEe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};R7.default=zEe});var k7=h(function(A7){Object.defineProperty(A7,"__esModule",{value:!0});var WEe=Ev(),GEe=G9(),KEe=Sv(),YEe=J9(),JEe=Q9(),XEe=b0(),QEe=o7(),ZEe=Cv(),eSe=d7(),tSe=g7(),rSe=x7(),nSe=v7(),iSe=D7(),sSe=E7(),oSe=F7(),aSe=O7();function cSe(e=!1){let t=[rSe.default,nSe.default,iSe.default,sSe.default,oSe.default,aSe.default,QEe.default,ZEe.default,XEe.default,eSe.default,tSe.default];if(e)t.push(GEe.default,YEe.default);else t.push(WEe.default,KEe.default);return t.push(JEe.default),t}A7.default=cSe});var Ov=h(function(T7){Object.defineProperty(T7,"__esModule",{value:!0});T7.dynamicAnchor=void 0;var Rv=ue(),lSe=Lr(),P7=wl(),dSe=f0(),fSe={keyword:"$dynamicAnchor",schemaType:"string",code:(e)=>I7(e,e.schema)};function I7(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=Rv._`${lSe.default.dynamicAnchors}${(0,Rv.getProperty)(t)}`,s=n.errSchemaPath==="#"?n.validateName:pSe(e);r.if(Rv._`!${i}`,()=>r.assign(i,s))}T7.dynamicAnchor=I7;function pSe(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:s,localRefs:o,meta:a}=t.root,{schemaId:c}=n.opts,l=new P7.SchemaEnv({schema:r,schemaId:c,root:i,baseId:s,localRefs:o,meta:a});return P7.compileSchema.call(n,l),(0,dSe.getValidate)(e,l)}T7.default=fSe});var Av=h(function(B7){Object.defineProperty(B7,"__esModule",{value:!0});B7.dynamicRef=void 0;var q7=ue(),hSe=Lr(),j7=f0(),gSe={keyword:"$dynamicRef",schemaType:"string",code:(e)=>M7(e,e.schema)};function M7(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw Error(`"${n}" only supports hash fragment reference`);let s=t.slice(1);if(i.allErrors)o();else{let c=r.let("valid",!1);o(c),e.ok(c)}function o(c){if(i.schemaEnv.root.dynamicAnchors[s]){let l=r.let("_v",q7._`${hSe.default.dynamicAnchors}${(0,q7.getProperty)(s)}`);r.if(l,a(l,c),a(i.validateName,c))}else a(i.validateName,c)()}function a(c,l){return l?()=>r.block(()=>{(0,j7.callRef)(e,c),r.let(l,!0)}):()=>(0,j7.callRef)(e,c)}}B7.dynamicRef=M7;B7.default=gSe});var V7=h(function(U7){Object.defineProperty(U7,"__esModule",{value:!0});var xSe=Ov(),bSe=be(),vSe={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){if(e.schema)(0,xSe.dynamicAnchor)(e,"");else(0,bSe.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};U7.default=vSe});var H7=h(function(z7){Object.defineProperty(z7,"__esModule",{value:!0});var DSe=Av(),wSe={keyword:"$recursiveRef",schemaType:"string",code:(e)=>(0,DSe.dynamicRef)(e,e.schema)};z7.default=wSe});var G7=h(function(W7){Object.defineProperty(W7,"__esModule",{value:!0});var SSe=Ov(),$Se=Av(),CSe=V7(),FSe=H7(),RSe=[SSe.default,$Se.default,CSe.default,FSe.default];W7.default=RSe});var J7=h(function(Y7){Object.defineProperty(Y7,"__esModule",{value:!0});var K7=b0(),ASe={keyword:"dependentRequired",type:"object",schemaType:"object",error:K7.error,code:(e)=>(0,K7.validatePropertyDeps)(e)};Y7.default=ASe});var Q7=h(function(X7){Object.defineProperty(X7,"__esModule",{value:!0});var PSe=b0(),ISe={keyword:"dependentSchemas",type:"object",schemaType:"object",code:(e)=>(0,PSe.validateSchemaDeps)(e)};X7.default=ISe});var eq=h(function(Z7){Object.defineProperty(Z7,"__esModule",{value:!0});var NSe=be(),qSe={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){if(t.contains===void 0)(0,NSe.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};Z7.default=qSe});var rq=h(function(tq){Object.defineProperty(tq,"__esModule",{value:!0});var MSe=J7(),BSe=Q7(),LSe=eq(),USe=[MSe.default,BSe.default,LSe.default];tq.default=USe});var sq=h(function(iq){Object.defineProperty(iq,"__esModule",{value:!0});var ws=ue(),nq=be(),zSe=Lr(),HSe={message:"must NOT have unevaluated properties",params:({params:e})=>ws._`{unevaluatedProperty: ${e.unevaluatedProperty}}`},WSe={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:HSe,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:s}=e;if(!i)throw Error("ajv implementation error");let{allErrors:o,props:a}=s;if(a instanceof ws.Name)t.if(ws._`${a} !== true`,()=>t.forIn("key",n,(f)=>t.if(l(a,f),()=>c(f))));else if(a!==!0)t.forIn("key",n,(f)=>a===void 0?c(f):t.if(d(a,f),()=>c(f)));s.props=!0,e.ok(ws._`${i} === ${zSe.default.errors}`);function c(f){if(r===!1){if(e.setParams({unevaluatedProperty:f}),e.error(),!o)t.break();return}if(!(0,nq.alwaysValidSchema)(s,r)){let m=t.name("valid");if(e.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:nq.Type.Str},m),!o)t.if((0,ws.not)(m),()=>t.break())}}function l(f,m){return ws._`!${f} || !${f}[${m}]`}function d(f,m){let p=[];for(let g in f)if(f[g]===!0)p.push(ws._`${m} !== ${g}`);return(0,ws.and)(...p)}}};iq.default=WSe});var cq=h(function(aq){Object.defineProperty(aq,"__esModule",{value:!0});var bo=ue(),oq=be(),KSe={message:({params:{len:e}})=>bo.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>bo._`{limit: ${e}}`},YSe={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:KSe,code(e){let{gen:t,schema:r,data:n,it:i}=e,s=i.items||0;if(s===!0)return;let o=t.const("len",bo._`${n}.length`);if(r===!1)e.setParams({len:s}),e.fail(bo._`${o} > ${s}`);else if(typeof r=="object"&&!(0,oq.alwaysValidSchema)(i,r)){let c=t.var("valid",bo._`${o} <= ${s}`);t.if((0,bo.not)(c),()=>a(c,s)),e.ok(c)}i.items=!0;function a(c,l){t.forRange("i",l,o,(d)=>{if(e.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:oq.Type.Num},c),!i.allErrors)t.if((0,bo.not)(c),()=>t.break())})}}};aq.default=YSe});var lq=h(function(uq){Object.defineProperty(uq,"__esModule",{value:!0});var XSe=sq(),QSe=cq(),ZSe=[XSe.default,QSe.default];uq.default=ZSe});var fq=h(function(dq){Object.defineProperty(dq,"__esModule",{value:!0});var pt=ue(),t$e={message:({schemaCode:e})=>pt.str`must match format "${e}"`,params:({schemaCode:e})=>pt._`{format: ${e}}`},r$e={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:t$e,code(e,t){let{gen:r,data:n,$data:i,schema:s,schemaCode:o,it:a}=e,{opts:c,errSchemaPath:l,schemaEnv:d,self:f}=a;if(!c.validateFormats)return;if(i)m();else p();function m(){let g=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),y=r.const("fDef",pt._`${g}[${o}]`),x=r.let("fType"),v=r.let("format");r.if(pt._`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(x,pt._`${y}.type || "string"`).assign(v,pt._`${y}.validate`),()=>r.assign(x,pt._`"string"`).assign(v,y)),e.fail$data((0,pt.or)(_(),E()));function _(){if(c.strictSchema===!1)return pt.nil;return pt._`${o} && !${v}`}function E(){let C=d.$async?pt._`(${y}.async ? await ${v}(${n}) : ${v}(${n}))`:pt._`${v}(${n})`,D=pt._`(typeof ${v} == "function" ? ${C} : ${v}.test(${n}))`;return pt._`${v} && ${v} !== true && ${x} === ${t} && !${D}`}}function p(){let g=f.formats[s];if(!g){_();return}if(g===!0)return;let[y,x,v]=E(g);if(y===t)e.pass(C());function _(){if(c.strictSchema===!1){f.logger.warn(D());return}throw Error(D());function D(){return`unknown format "${s}" ignored in schema at path "${l}"`}}function E(D){let O=D instanceof RegExp?(0,pt.regexpCode)(D):c.code.formats?pt._`${c.code.formats}${(0,pt.getProperty)(s)}`:void 0,F=r.scopeValue("formats",{key:s,ref:D,code:O});if(typeof D=="object"&&!(D instanceof RegExp))return[D.type||"string",D.validate,pt._`${F}.validate`];return["string",D,F]}function C(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw Error("async format in sync schema");return pt._`await ${v}(${n})`}return typeof x=="function"?pt._`${v}(${n})`:pt._`${v}.test(${n})`}}}};dq.default=r$e});var mq=h(function(pq){Object.defineProperty(pq,"__esModule",{value:!0});var i$e=fq(),s$e=[i$e.default];pq.default=s$e});var yq=h(function(hq){Object.defineProperty(hq,"__esModule",{value:!0});hq.contentVocabulary=hq.metadataVocabulary=void 0;hq.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];hq.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var vq=h(function(bq){Object.defineProperty(bq,"__esModule",{value:!0});var c$e=d9(),u$e=j9(),l$e=k7(),d$e=G7(),f$e=rq(),p$e=lq(),m$e=mq(),xq=yq(),h$e=[d$e.default,c$e.default,u$e.default,(0,l$e.default)(!0),m$e.default,xq.metadataVocabulary,xq.contentVocabulary,f$e.default,p$e.default];bq.default=h$e});var Eq=h(function(Dq){Object.defineProperty(Dq,"__esModule",{value:!0});Dq.DiscrError=void 0;var _q;(function(e){e.Tag="tag",e.Mapping="mapping"})(_q||(Dq.DiscrError=_q={}))});var Cq=h(function($q){Object.defineProperty($q,"__esModule",{value:!0});var ic=ue(),kv=Eq(),Sq=wl(),y$e=_l(),x$e=be(),b$e={message:({params:{discrError:e,tagName:t}})=>e===kv.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>ic._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},v$e={keyword:"discriminator",type:"object",schemaType:"object",error:b$e,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:o}=i;if(!s.opts.discriminator)throw Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw Error("discriminator: requires propertyName");if(n.mapping)throw Error("discriminator: mapping is not supported");if(!o)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",ic._`${r}${(0,ic.getProperty)(a)}`);t.if(ic._`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:kv.DiscrError.Tag,tag:l,tagName:a})),e.ok(c);function d(){let p=m();t.if(!1);for(let g in p)t.elseIf(ic._`${l} === ${g}`),t.assign(c,f(p[g]));t.else(),e.error(!1,{discrError:kv.DiscrError.Mapping,tag:l,tagName:a}),t.endIf()}function f(p){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:p},g);return e.mergeEvaluated(y,ic.Name),g}function m(){var p;let g={},y=v(i),x=!0;for(let C=0;C<o.length;C++){let D=o[C];if((D===null||D===void 0?void 0:D.$ref)&&!(0,x$e.schemaHasRulesButRef)(D,s.self.RULES)){let F=D.$ref;if(D=Sq.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,F),D instanceof Sq.SchemaEnv)D=D.schema;if(D===void 0)throw new y$e.default(s.opts.uriResolver,s.baseId,F)}let O=(p=D===null||D===void 0?void 0:D.properties)===null||p===void 0?void 0:p[a];if(typeof O!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);x=x&&(y||v(D)),_(O,C)}if(!x)throw Error(`discriminator: "${a}" must be required`);return g;function v({required:C}){return Array.isArray(C)&&C.includes(a)}function _(C,D){if(C.const)E(C.const,D);else if(C.enum)for(let O of C.enum)E(O,D);else throw Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function E(C,D){if(typeof C!="string"||C in g)throw Error(`discriminator: "${a}" values must be unique strings`);g[C]=D}}}};$q.default=v$e});var Fq=h(function(pKe,D$e){D$e.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 Rq=h(function(mKe,w$e){w$e.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 Oq=h(function(hKe,E$e){E$e.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 Aq=h(function(gKe,S$e){S$e.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 kq=h(function(yKe,$$e){$$e.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 Pq=h(function(xKe,C$e){C$e.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 Iq=h(function(bKe,F$e){F$e.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 Tq=h(function(vKe,R$e){R$e.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 qq=h(function(Nq){Object.defineProperty(Nq,"__esModule",{value:!0});var O$e=Fq(),A$e=Rq(),k$e=Oq(),P$e=Aq(),I$e=kq(),T$e=Pq(),N$e=Iq(),q$e=Tq(),j$e=["/properties"];function M$e(e){return[O$e,A$e,k$e,P$e,I$e,t(this,T$e),N$e,t(this,q$e)].forEach((r)=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,j$e):n}}Nq.default=M$e});var jq=h(function(pr,Iv){Object.defineProperty(pr,"__esModule",{value:!0});pr.MissingRefError=pr.ValidationError=pr.CodeGen=pr.Name=pr.nil=pr.stringify=pr.str=pr._=pr.KeywordCxt=pr.Ajv2020=void 0;var L$e=r9(),U$e=vq(),V$e=Cq(),z$e=qq(),Pv="https://json-schema.org/draft/2020-12/schema";class Il extends L$e.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){if(super._addVocabularies(),U$e.default.forEach((e)=>this.addVocabulary(e)),this.opts.discriminator)this.addKeyword(V$e.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;if(!t)return;z$e.default.call(this,e),this.refs["http://json-schema.org/schema"]=Pv}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Pv)?Pv:void 0)}}pr.Ajv2020=Il;Iv.exports=pr=Il;Iv.exports.Ajv2020=Il;Object.defineProperty(pr,"__esModule",{value:!0});pr.default=Il;var H$e=vl();Object.defineProperty(pr,"KeywordCxt",{enumerable:!0,get:function(){return H$e.KeywordCxt}});var sc=ue();Object.defineProperty(pr,"_",{enumerable:!0,get:function(){return sc._}});Object.defineProperty(pr,"str",{enumerable:!0,get:function(){return sc.str}});Object.defineProperty(pr,"stringify",{enumerable:!0,get:function(){return sc.stringify}});Object.defineProperty(pr,"nil",{enumerable:!0,get:function(){return sc.nil}});Object.defineProperty(pr,"Name",{enumerable:!0,get:function(){return sc.Name}});Object.defineProperty(pr,"CodeGen",{enumerable:!0,get:function(){return sc.CodeGen}});var W$e=r0();Object.defineProperty(pr,"ValidationError",{enumerable:!0,get:function(){return W$e.default}});var G$e=_l();Object.defineProperty(pr,"MissingRefError",{enumerable:!0,get:function(){return G$e.default}})});var Kq=h(function(Wq){Object.defineProperty(Wq,"__esModule",{value:!0});Wq.formatNames=Wq.fastFormats=Wq.fullFormats=void 0;function Yn(e,t){return{validate:e,compare:t}}Wq.fullFormats={date:Yn(Uq,jv),time:Yn(Nv(!0),Mv),"date-time":Yn(Mq(!0),zq),"iso-time":Yn(Nv(),Vq),"iso-date-time":Yn(Mq(),Hq),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:tCe,"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:cCe,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:rCe,int32:{type:"number",validate:sCe},int64:{type:"number",validate:oCe},float:{type:"number",validate:Lq},double:{type:"number",validate:Lq},password:!0,binary:!0};Wq.fastFormats={...Wq.fullFormats,date:Yn(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,jv),time:Yn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Mv),"date-time":Yn(/^\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,zq),"iso-time":Yn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Vq),"iso-date-time":Yn(/^\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,Hq),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};Wq.formatNames=Object.keys(Wq.fullFormats);function J$e(e){return e%4===0&&(e%100!==0||e%400===0)}var X$e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Q$e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Uq(e){let t=X$e.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&J$e(r)?29:Q$e[n])}function jv(e,t){if(!(e&&t))return;if(e>t)return 1;if(e<t)return-1;return 0}var Tv=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Nv(e){return function(r){let n=Tv.exec(r);if(!n)return!1;let i=+n[1],s=+n[2],o=+n[3],a=n[4],c=n[5]==="-"?-1:1,l=+(n[6]||0),d=+(n[7]||0);if(l>23||d>59||e&&!a)return!1;if(i<=23&&s<=59&&o<60)return!0;let f=s-d*c,m=i-l*c-(f<0?1:0);return(m===23||m===-1)&&(f===59||f===-1)&&o<61}}function Mv(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(!(r&&n))return;return r-n}function Vq(e,t){if(!(e&&t))return;let r=Tv.exec(e),n=Tv.exec(t);if(!(r&&n))return;if(e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t)return 1;if(e<t)return-1;return 0}var qv=/t|\s/i;function Mq(e){let t=Nv(e);return function(n){let i=n.split(qv);return i.length===2&&Uq(i[0])&&t(i[1])}}function zq(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(!(r&&n))return;return r-n}function Hq(e,t){if(!(e&&t))return;let[r,n]=e.split(qv),[i,s]=t.split(qv),o=jv(r,i);if(o===void 0)return;return o||Mv(n,s)}var Z$e=/\/|:/,eCe=/^(?:[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 tCe(e){return Z$e.test(e)&&eCe.test(e)}var Bq=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function rCe(e){return Bq.lastIndex=0,Bq.test(e)}var nCe=-2147483648,iCe=2147483647;function sCe(e){return Number.isInteger(e)&&e<=iCe&&e>=nCe}function oCe(e){return Number.isInteger(e)}function Lq(){return!0}var aCe=/[^\\]\\Z/;function cCe(e){if(aCe.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}}});var Nl=h(function(Xq){Object.defineProperty(Xq,"__esModule",{value:!0});Xq.regexpCode=Xq.getEsmExportName=Xq.getProperty=Xq.safeStringify=Xq.stringify=Xq.strConcat=Xq.addCodeArg=Xq.str=Xq._=Xq.nil=Xq._Code=Xq.Name=Xq.IDENTIFIER=Xq._CodeOrName=void 0;class S0{}Xq._CodeOrName=S0;Xq.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class oc extends S0{constructor(e){super();if(!Xq.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Xq.Name=oc;class dn extends S0{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof oc)t[r.str]=(t[r.str]||0)+1;return t},{})}}Xq._Code=dn;Xq.nil=new dn("");function Yq(e,...t){let r=[e[0]],n=0;while(n<t.length)Uv(r,t[n]),r.push(e[++n]);return new dn(r)}Xq._=Yq;var Lv=new dn("+");function Jq(e,...t){let r=[Tl(e[0])],n=0;while(n<t.length)r.push(Lv),Uv(r,t[n]),r.push(Lv,Tl(e[++n]));return lCe(r),new dn(r)}Xq.str=Jq;function Uv(e,t){if(t instanceof dn)e.push(...t._items);else if(t instanceof oc)e.push(t);else e.push(pCe(t))}Xq.addCodeArg=Uv;function lCe(e){let t=1;while(t<e.length-1){if(e[t]===Lv){let r=dCe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function dCe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof oc||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof oc))return`"${e}${t.slice(1)}`;return}function fCe(e,t){return t.emptyStr()?e:e.emptyStr()?t:Jq`${e}${t}`}Xq.strConcat=fCe;function pCe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Tl(Array.isArray(e)?e.join(","):e)}function mCe(e){return new dn(Tl(e))}Xq.stringify=mCe;function Tl(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Xq.safeStringify=Tl;function hCe(e){return typeof e=="string"&&Xq.IDENTIFIER.test(e)?new dn(`.${e}`):Yq`[${e}]`}Xq.getProperty=hCe;function gCe(e){if(typeof e=="string"&&Xq.IDENTIFIER.test(e))return new dn(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Xq.getEsmExportName=gCe;function yCe(e){return new dn(e.toString())}Xq.regexpCode=yCe});var Wv=h(function(tj){Object.defineProperty(tj,"__esModule",{value:!0});tj.ValueScope=tj.ValueScopeName=tj.Scope=tj.varKinds=tj.UsedValueState=void 0;var mr=Nl();class Zq extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var C0;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(C0||(tj.UsedValueState=C0={}));tj.varKinds={const:new mr.Name("const"),let:new mr.Name("let"),var:new mr.Name("var")};class zv{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof mr.Name?e:this.name(e)}name(e){return new mr.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}tj.Scope=zv;class Hv extends mr.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=mr._`.${new mr.Name(t)}[${r}]`}}tj.ValueScopeName=Hv;var OCe=mr._`\n`;class ej extends zv{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?OCe:mr.nil}}get(){return this._scope}name(e){return new Hv(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,s=(r=t.key)!==null&&r!==void 0?r:t.ref,o=this._values[i];if(o){let l=o.get(s);if(l)return l}else o=this._values[i]=new Map;o.set(s,n);let a=this._scope[i]||(this._scope[i]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:i,itemIndex:c}),n}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return mr._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let i=mr.nil;for(let s in e){let o=e[s];if(!o)continue;let a=r[s]=r[s]||new Map;o.forEach((c)=>{if(a.has(c))return;a.set(c,C0.Started);let l=t(c);if(l){let d=this.opts.es5?tj.varKinds.var:tj.varKinds.const;i=mr._`${i}${d} ${c} = ${l};${this.opts._n}`}else if(l=n===null||n===void 0?void 0:n(c))i=mr._`${i}${l}${this.opts._n}`;else throw new Zq(c);a.set(c,C0.Completed)})}return i}}tj.ValueScope=ej});var me=h(function(hr){Object.defineProperty(hr,"__esModule",{value:!0});hr.or=hr.and=hr.not=hr.CodeGen=hr.operators=hr.varKinds=hr.ValueScopeName=hr.ValueScope=hr.Scope=hr.Name=hr.regexpCode=hr.stringify=hr.getProperty=hr.nil=hr.strConcat=hr.str=hr._=void 0;var Ee=Nl(),fn=Wv(),Es=Nl();Object.defineProperty(hr,"_",{enumerable:!0,get:function(){return Es._}});Object.defineProperty(hr,"str",{enumerable:!0,get:function(){return Es.str}});Object.defineProperty(hr,"strConcat",{enumerable:!0,get:function(){return Es.strConcat}});Object.defineProperty(hr,"nil",{enumerable:!0,get:function(){return Es.nil}});Object.defineProperty(hr,"getProperty",{enumerable:!0,get:function(){return Es.getProperty}});Object.defineProperty(hr,"stringify",{enumerable:!0,get:function(){return Es.stringify}});Object.defineProperty(hr,"regexpCode",{enumerable:!0,get:function(){return Es.regexpCode}});Object.defineProperty(hr,"Name",{enumerable:!0,get:function(){return Es.Name}});var P0=Wv();Object.defineProperty(hr,"Scope",{enumerable:!0,get:function(){return P0.Scope}});Object.defineProperty(hr,"ValueScope",{enumerable:!0,get:function(){return P0.ValueScope}});Object.defineProperty(hr,"ValueScopeName",{enumerable:!0,get:function(){return P0.ValueScopeName}});Object.defineProperty(hr,"varKinds",{enumerable:!0,get:function(){return P0.varKinds}});hr.operators={GT:new Ee._Code(">"),GTE:new Ee._Code(">="),LT:new Ee._Code("<"),LTE:new Ee._Code("<="),EQ:new Ee._Code("==="),NEQ:new Ee._Code("!=="),NOT:new Ee._Code("!"),OR:new Ee._Code("||"),AND:new Ee._Code("&&"),ADD:new Ee._Code("+")};class Ss{optimizeNodes(){return this}optimizeNames(e,t){return this}}class nj extends Ss{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?fn.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=cc(this.rhs,e,t);return this}get names(){return this.rhs instanceof Ee._CodeOrName?this.rhs.names:{}}}class Yv extends Ss{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof Ee.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=cc(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Ee.Name?{}:{...this.lhs.names};return k0(e,this.rhs)}}class ij extends Yv{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class sj extends Ss{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class oj extends Ss{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class aj extends Ss{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class cj extends Ss{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=cc(this.code,e,t),this}get names(){return this.code instanceof Ee._CodeOrName?this.code.names:{}}}class I0 extends Ss{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;while(n--){let i=r[n];if(i.optimizeNames(e,t))continue;ICe(e,i.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>vo(e,t.names),{})}}class $s extends I0{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class uj extends I0{}class ql extends $s{}ql.kind="else";class Ei extends $s{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new ql(r):r}if(t){if(e===!1)return t instanceof Ei?t:t.nodes;if(this.nodes.length)return this;return new Ei(mj(e),t instanceof Ei?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=cc(this.condition,e,t),this}get names(){let e=super.names;if(k0(e,this.condition),this.else)vo(e,this.else.names);return e}}Ei.kind="if";class ac extends $s{}ac.kind="for";class lj extends ac{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=cc(this.iteration,e,t),this}get names(){return vo(super.names,this.iteration.names)}}class dj extends ac{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?fn.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){let e=k0(super.names,this.from);return k0(e,this.to)}}class Gv extends ac{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=cc(this.iterable,e,t),this}get names(){return vo(super.names,this.iterable.names)}}class F0 extends $s{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}F0.kind="func";class R0 extends I0{render(e){return"return "+super.render(e)}}R0.kind="return";class fj extends $s{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)vo(e,this.catch.names);if(this.finally)vo(e,this.finally.names);return e}}class O0 extends $s{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}O0.kind="catch";class A0 extends $s{render(e){return"finally"+super.render(e)}}A0.kind="finally";class pj{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
91
|
+
deps: ${r}}`};var lEe={keyword:"dependencies",type:"object",schemaType:"object",error:t7.error,code(e){let[t,r]=dEe(e);Z9(e,t),e7(e,r)}};function dEe({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}function Z9(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let o in t){let a=t[o];if(a.length===0)continue;let c=(0,Pl.propertyInData)(r,n,o,i.opts.ownProperties);if(e.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),i.allErrors)r.if(c,()=>{for(let l of a)(0,Pl.checkReportMissingProp)(e,l)});else r.if($v._`${c} && (${(0,Pl.checkMissingProp)(e,a,s)})`),(0,Pl.reportMissingProp)(e,s),r.else()}}t7.validatePropertyDeps=Z9;function e7(e,t=e.schema){let{gen:r,data:n,keyword:i,it:s}=e,o=r.name("valid");for(let a in t){if((0,uEe.alwaysValidSchema)(s,t[a]))continue;r.if((0,Pl.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:a},o);e.mergeValidEvaluated(c,o)},()=>r.var(o,!0)),e.ok(o)}}t7.validateSchemaDeps=e7;t7.default=lEe});var o7=h(function(s7){Object.defineProperty(s7,"__esModule",{value:!0});var i7=ue(),mEe=be(),hEe={message:"property name must be valid",params:({params:e})=>i7._`{propertyName: ${e.propertyName}}`},gEe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:hEe,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,mEe.alwaysValidSchema)(i,r))return;let s=t.name("valid");t.forIn("key",n,(o)=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,i7.not)(s),()=>{if(e.error(!0),!i.allErrors)t.break()})}),e.ok(s)}};s7.default=gEe});var Cv=h(function(a7){Object.defineProperty(a7,"__esModule",{value:!0});var v0=Ur(),ln=ue(),xEe=Lr(),_0=be(),bEe={message:"must NOT have additional properties",params:({params:e})=>ln._`{additionalProperty: ${e.additionalProperty}}`},vEe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:bEe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:o}=e;if(!s)throw Error("ajv implementation error");let{allErrors:a,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,_0.alwaysValidSchema)(o,r))return;let l=(0,v0.allSchemaProperties)(n.properties),d=(0,v0.allSchemaProperties)(n.patternProperties);f(),e.ok(ln._`${s} === ${xEe.default.errors}`);function f(){t.forIn("key",i,(x)=>{if(!l.length&&!d.length)g(x);else t.if(m(x),()=>g(x))})}function m(x){let v;if(l.length>8){let _=(0,_0.schemaRefOrVal)(o,n.properties,"properties");v=(0,v0.isOwnProperty)(t,_,x)}else if(l.length)v=(0,ln.or)(...l.map((_)=>ln._`${x} === ${_}`));else v=ln.nil;if(d.length)v=(0,ln.or)(v,...d.map((_)=>ln._`${(0,v0.usePattern)(e,_)}.test(${x})`));return(0,ln.not)(v)}function p(x){t.code(ln._`delete ${i}[${x}]`)}function g(x){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(x);return}if(r===!1){if(e.setParams({additionalProperty:x}),e.error(),!a)t.break();return}if(typeof r=="object"&&!(0,_0.alwaysValidSchema)(o,r)){let v=t.name("valid");if(c.removeAdditional==="failing")y(x,v,!1),t.if((0,ln.not)(v),()=>{e.reset(),p(x)});else if(y(x,v),!a)t.if((0,ln.not)(v),()=>t.break())}}function y(x,v,_){let S={keyword:"additionalProperties",dataProp:x,dataPropType:_0.Type.Str};if(_===!1)Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(S,v)}}};a7.default=vEe});var d7=h(function(l7){Object.defineProperty(l7,"__esModule",{value:!0});var DEe=vl(),c7=Ur(),Fv=be(),u7=Cv(),wEe={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;if(s.opts.removeAdditional==="all"&&n.additionalProperties===void 0)u7.default.code(new DEe.KeywordCxt(s,u7.default,"additionalProperties"));let o=(0,c7.allSchemaProperties)(r);for(let f of o)s.definedProperties.add(f);if(s.opts.unevaluated&&o.length&&s.props!==!0)s.props=Fv.mergeEvaluated.props(t,(0,Fv.toHash)(o),s.props);let a=o.filter((f)=>!(0,Fv.alwaysValidSchema)(s,r[f]));if(a.length===0)return;let c=t.name("valid");for(let f of a){if(l(f))d(f);else{if(t.if((0,c7.propertyInData)(t,i,f,s.opts.ownProperties)),d(f),!s.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(f),e.ok(c)}function l(f){return s.opts.useDefaults&&!s.compositeRule&&r[f].default!==void 0}function d(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};l7.default=wEe});var g7=h(function(h7){Object.defineProperty(h7,"__esModule",{value:!0});var f7=Ur(),D0=ue(),p7=be(),m7=be(),SEe={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:o}=s,a=(0,f7.allSchemaProperties)(r),c=a.filter((y)=>(0,p7.alwaysValidSchema)(s,r[y]));if(a.length===0||c.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let l=o.strictSchema&&!o.allowMatchingProperties&&i.properties,d=t.name("valid");if(s.props!==!0&&!(s.props instanceof D0.Name))s.props=(0,m7.evaluatedPropsToName)(t,s.props);let{props:f}=s;m();function m(){for(let y of a){if(l)p(y);if(s.allErrors)g(y);else t.var(d,!0),g(y),t.if(d)}}function p(y){for(let x in l)if(new RegExp(y).test(x))(0,p7.checkStrictMode)(s,`property ${x} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){t.forIn("key",n,(x)=>{t.if(D0._`${(0,f7.usePattern)(e,y)}.test(${x})`,()=>{let v=c.includes(y);if(!v)e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:x,dataPropType:m7.Type.Str},d);if(s.opts.unevaluated&&f!==!0)t.assign(D0._`${f}[${x}]`,!0);else if(!v&&!s.allErrors)t.if((0,D0.not)(d),()=>t.break())})})}}};h7.default=SEe});var x7=h(function(y7){Object.defineProperty(y7,"__esModule",{value:!0});var CEe=be(),FEe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,CEe.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};y7.default=FEe});var v7=h(function(b7){Object.defineProperty(b7,"__esModule",{value:!0});var OEe=Ur(),AEe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:OEe.validateUnion,error:{message:"must match a schema in anyOf"}};b7.default=AEe});var D7=h(function(_7){Object.defineProperty(_7,"__esModule",{value:!0});var w0=ue(),PEe=be(),IEe={message:"must match exactly one schema in oneOf",params:({params:e})=>w0._`{passingSchemas: ${e.passing}}`},TEe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:IEe,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let s=r,o=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(l),e.result(o,()=>e.reset(),()=>e.error(!0));function l(){s.forEach((d,f)=>{let m;if((0,PEe.alwaysValidSchema)(i,d))t.var(c,!0);else m=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c);if(f>0)t.if(w0._`${c} && ${o}`).assign(o,!1).assign(a,w0._`[${a}, ${f}]`).else();t.if(c,()=>{if(t.assign(o,!0),t.assign(a,f),m)e.mergeEvaluated(m,w0.Name)})})}}};_7.default=TEe});var E7=h(function(w7){Object.defineProperty(w7,"__esModule",{value:!0});var qEe=be(),jEe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let i=t.name("valid");r.forEach((s,o)=>{if((0,qEe.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:o},i);e.ok(i),e.mergeEvaluated(a)})}};w7.default=jEe});var F7=h(function(C7){Object.defineProperty(C7,"__esModule",{value:!0});var E0=ue(),$7=be(),BEe={message:({params:e})=>E0.str`must match "${e.ifClause}" schema`,params:({params:e})=>E0._`{failingKeyword: ${e.ifClause}}`},LEe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:BEe,code(e){let{gen:t,parentSchema:r,it:n}=e;if(r.then===void 0&&r.else===void 0)(0,$7.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=S7(n,"then"),s=S7(n,"else");if(!i&&!s)return;let o=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),i&&s){let d=t.let("ifClause");e.setParams({ifClause:d}),t.if(a,l("then",d),l("else",d))}else if(i)t.if(a,l("then"));else t.if((0,E0.not)(a),l("else"));e.pass(o,()=>e.error(!0));function c(){let d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(d)}function l(d,f){return()=>{let m=e.subschema({keyword:d},a);if(t.assign(o,a),e.mergeValidEvaluated(m,o),f)t.assign(f,E0._`${d}`);else e.setParams({ifClause:d})}}}};function S7(e,t){let r=e.schema[t];return r!==void 0&&!(0,$7.alwaysValidSchema)(e,r)}C7.default=LEe});var O7=h(function(R7){Object.defineProperty(R7,"__esModule",{value:!0});var VEe=be(),zEe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)(0,VEe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};R7.default=zEe});var k7=h(function(A7){Object.defineProperty(A7,"__esModule",{value:!0});var WEe=Ev(),GEe=G9(),KEe=Sv(),YEe=J9(),JEe=Q9(),XEe=b0(),QEe=o7(),ZEe=Cv(),eSe=d7(),tSe=g7(),rSe=x7(),nSe=v7(),iSe=D7(),sSe=E7(),oSe=F7(),aSe=O7();function cSe(e=!1){let t=[rSe.default,nSe.default,iSe.default,sSe.default,oSe.default,aSe.default,QEe.default,ZEe.default,XEe.default,eSe.default,tSe.default];if(e)t.push(GEe.default,YEe.default);else t.push(WEe.default,KEe.default);return t.push(JEe.default),t}A7.default=cSe});var Ov=h(function(T7){Object.defineProperty(T7,"__esModule",{value:!0});T7.dynamicAnchor=void 0;var Rv=ue(),lSe=Lr(),P7=wl(),dSe=f0(),fSe={keyword:"$dynamicAnchor",schemaType:"string",code:(e)=>I7(e,e.schema)};function I7(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=Rv._`${lSe.default.dynamicAnchors}${(0,Rv.getProperty)(t)}`,s=n.errSchemaPath==="#"?n.validateName:pSe(e);r.if(Rv._`!${i}`,()=>r.assign(i,s))}T7.dynamicAnchor=I7;function pSe(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:s,localRefs:o,meta:a}=t.root,{schemaId:c}=n.opts,l=new P7.SchemaEnv({schema:r,schemaId:c,root:i,baseId:s,localRefs:o,meta:a});return P7.compileSchema.call(n,l),(0,dSe.getValidate)(e,l)}T7.default=fSe});var Av=h(function(B7){Object.defineProperty(B7,"__esModule",{value:!0});B7.dynamicRef=void 0;var q7=ue(),hSe=Lr(),j7=f0(),gSe={keyword:"$dynamicRef",schemaType:"string",code:(e)=>M7(e,e.schema)};function M7(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw Error(`"${n}" only supports hash fragment reference`);let s=t.slice(1);if(i.allErrors)o();else{let c=r.let("valid",!1);o(c),e.ok(c)}function o(c){if(i.schemaEnv.root.dynamicAnchors[s]){let l=r.let("_v",q7._`${hSe.default.dynamicAnchors}${(0,q7.getProperty)(s)}`);r.if(l,a(l,c),a(i.validateName,c))}else a(i.validateName,c)()}function a(c,l){return l?()=>r.block(()=>{(0,j7.callRef)(e,c),r.let(l,!0)}):()=>(0,j7.callRef)(e,c)}}B7.dynamicRef=M7;B7.default=gSe});var V7=h(function(U7){Object.defineProperty(U7,"__esModule",{value:!0});var xSe=Ov(),bSe=be(),vSe={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){if(e.schema)(0,xSe.dynamicAnchor)(e,"");else(0,bSe.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};U7.default=vSe});var H7=h(function(z7){Object.defineProperty(z7,"__esModule",{value:!0});var DSe=Av(),wSe={keyword:"$recursiveRef",schemaType:"string",code:(e)=>(0,DSe.dynamicRef)(e,e.schema)};z7.default=wSe});var G7=h(function(W7){Object.defineProperty(W7,"__esModule",{value:!0});var SSe=Ov(),$Se=Av(),CSe=V7(),FSe=H7(),RSe=[SSe.default,$Se.default,CSe.default,FSe.default];W7.default=RSe});var J7=h(function(Y7){Object.defineProperty(Y7,"__esModule",{value:!0});var K7=b0(),ASe={keyword:"dependentRequired",type:"object",schemaType:"object",error:K7.error,code:(e)=>(0,K7.validatePropertyDeps)(e)};Y7.default=ASe});var Q7=h(function(X7){Object.defineProperty(X7,"__esModule",{value:!0});var PSe=b0(),ISe={keyword:"dependentSchemas",type:"object",schemaType:"object",code:(e)=>(0,PSe.validateSchemaDeps)(e)};X7.default=ISe});var eq=h(function(Z7){Object.defineProperty(Z7,"__esModule",{value:!0});var NSe=be(),qSe={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){if(t.contains===void 0)(0,NSe.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};Z7.default=qSe});var rq=h(function(tq){Object.defineProperty(tq,"__esModule",{value:!0});var MSe=J7(),BSe=Q7(),LSe=eq(),USe=[MSe.default,BSe.default,LSe.default];tq.default=USe});var sq=h(function(iq){Object.defineProperty(iq,"__esModule",{value:!0});var ws=ue(),nq=be(),zSe=Lr(),HSe={message:"must NOT have unevaluated properties",params:({params:e})=>ws._`{unevaluatedProperty: ${e.unevaluatedProperty}}`},WSe={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:HSe,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:s}=e;if(!i)throw Error("ajv implementation error");let{allErrors:o,props:a}=s;if(a instanceof ws.Name)t.if(ws._`${a} !== true`,()=>t.forIn("key",n,(f)=>t.if(l(a,f),()=>c(f))));else if(a!==!0)t.forIn("key",n,(f)=>a===void 0?c(f):t.if(d(a,f),()=>c(f)));s.props=!0,e.ok(ws._`${i} === ${zSe.default.errors}`);function c(f){if(r===!1){if(e.setParams({unevaluatedProperty:f}),e.error(),!o)t.break();return}if(!(0,nq.alwaysValidSchema)(s,r)){let m=t.name("valid");if(e.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:nq.Type.Str},m),!o)t.if((0,ws.not)(m),()=>t.break())}}function l(f,m){return ws._`!${f} || !${f}[${m}]`}function d(f,m){let p=[];for(let g in f)if(f[g]===!0)p.push(ws._`${m} !== ${g}`);return(0,ws.and)(...p)}}};iq.default=WSe});var cq=h(function(aq){Object.defineProperty(aq,"__esModule",{value:!0});var bo=ue(),oq=be(),KSe={message:({params:{len:e}})=>bo.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>bo._`{limit: ${e}}`},YSe={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:KSe,code(e){let{gen:t,schema:r,data:n,it:i}=e,s=i.items||0;if(s===!0)return;let o=t.const("len",bo._`${n}.length`);if(r===!1)e.setParams({len:s}),e.fail(bo._`${o} > ${s}`);else if(typeof r=="object"&&!(0,oq.alwaysValidSchema)(i,r)){let c=t.var("valid",bo._`${o} <= ${s}`);t.if((0,bo.not)(c),()=>a(c,s)),e.ok(c)}i.items=!0;function a(c,l){t.forRange("i",l,o,(d)=>{if(e.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:oq.Type.Num},c),!i.allErrors)t.if((0,bo.not)(c),()=>t.break())})}}};aq.default=YSe});var lq=h(function(uq){Object.defineProperty(uq,"__esModule",{value:!0});var XSe=sq(),QSe=cq(),ZSe=[XSe.default,QSe.default];uq.default=ZSe});var fq=h(function(dq){Object.defineProperty(dq,"__esModule",{value:!0});var pt=ue(),t$e={message:({schemaCode:e})=>pt.str`must match format "${e}"`,params:({schemaCode:e})=>pt._`{format: ${e}}`},r$e={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:t$e,code(e,t){let{gen:r,data:n,$data:i,schema:s,schemaCode:o,it:a}=e,{opts:c,errSchemaPath:l,schemaEnv:d,self:f}=a;if(!c.validateFormats)return;if(i)m();else p();function m(){let g=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),y=r.const("fDef",pt._`${g}[${o}]`),x=r.let("fType"),v=r.let("format");r.if(pt._`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(x,pt._`${y}.type || "string"`).assign(v,pt._`${y}.validate`),()=>r.assign(x,pt._`"string"`).assign(v,y)),e.fail$data((0,pt.or)(_(),S()));function _(){if(c.strictSchema===!1)return pt.nil;return pt._`${o} && !${v}`}function S(){let C=d.$async?pt._`(${y}.async ? await ${v}(${n}) : ${v}(${n}))`:pt._`${v}(${n})`,D=pt._`(typeof ${v} == "function" ? ${C} : ${v}.test(${n}))`;return pt._`${v} && ${v} !== true && ${x} === ${t} && !${D}`}}function p(){let g=f.formats[s];if(!g){_();return}if(g===!0)return;let[y,x,v]=S(g);if(y===t)e.pass(C());function _(){if(c.strictSchema===!1){f.logger.warn(D());return}throw Error(D());function D(){return`unknown format "${s}" ignored in schema at path "${l}"`}}function S(D){let O=D instanceof RegExp?(0,pt.regexpCode)(D):c.code.formats?pt._`${c.code.formats}${(0,pt.getProperty)(s)}`:void 0,F=r.scopeValue("formats",{key:s,ref:D,code:O});if(typeof D=="object"&&!(D instanceof RegExp))return[D.type||"string",D.validate,pt._`${F}.validate`];return["string",D,F]}function C(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw Error("async format in sync schema");return pt._`await ${v}(${n})`}return typeof x=="function"?pt._`${v}(${n})`:pt._`${v}.test(${n})`}}}};dq.default=r$e});var mq=h(function(pq){Object.defineProperty(pq,"__esModule",{value:!0});var i$e=fq(),s$e=[i$e.default];pq.default=s$e});var yq=h(function(hq){Object.defineProperty(hq,"__esModule",{value:!0});hq.contentVocabulary=hq.metadataVocabulary=void 0;hq.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];hq.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var vq=h(function(bq){Object.defineProperty(bq,"__esModule",{value:!0});var c$e=d9(),u$e=j9(),l$e=k7(),d$e=G7(),f$e=rq(),p$e=lq(),m$e=mq(),xq=yq(),h$e=[d$e.default,c$e.default,u$e.default,(0,l$e.default)(!0),m$e.default,xq.metadataVocabulary,xq.contentVocabulary,f$e.default,p$e.default];bq.default=h$e});var Eq=h(function(Dq){Object.defineProperty(Dq,"__esModule",{value:!0});Dq.DiscrError=void 0;var _q;(function(e){e.Tag="tag",e.Mapping="mapping"})(_q||(Dq.DiscrError=_q={}))});var Cq=h(function($q){Object.defineProperty($q,"__esModule",{value:!0});var ic=ue(),kv=Eq(),Sq=wl(),y$e=_l(),x$e=be(),b$e={message:({params:{discrError:e,tagName:t}})=>e===kv.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>ic._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},v$e={keyword:"discriminator",type:"object",schemaType:"object",error:b$e,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:o}=i;if(!s.opts.discriminator)throw Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw Error("discriminator: requires propertyName");if(n.mapping)throw Error("discriminator: mapping is not supported");if(!o)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",ic._`${r}${(0,ic.getProperty)(a)}`);t.if(ic._`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:kv.DiscrError.Tag,tag:l,tagName:a})),e.ok(c);function d(){let p=m();t.if(!1);for(let g in p)t.elseIf(ic._`${l} === ${g}`),t.assign(c,f(p[g]));t.else(),e.error(!1,{discrError:kv.DiscrError.Mapping,tag:l,tagName:a}),t.endIf()}function f(p){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:p},g);return e.mergeEvaluated(y,ic.Name),g}function m(){var p;let g={},y=v(i),x=!0;for(let C=0;C<o.length;C++){let D=o[C];if((D===null||D===void 0?void 0:D.$ref)&&!(0,x$e.schemaHasRulesButRef)(D,s.self.RULES)){let F=D.$ref;if(D=Sq.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,F),D instanceof Sq.SchemaEnv)D=D.schema;if(D===void 0)throw new y$e.default(s.opts.uriResolver,s.baseId,F)}let O=(p=D===null||D===void 0?void 0:D.properties)===null||p===void 0?void 0:p[a];if(typeof O!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);x=x&&(y||v(D)),_(O,C)}if(!x)throw Error(`discriminator: "${a}" must be required`);return g;function v({required:C}){return Array.isArray(C)&&C.includes(a)}function _(C,D){if(C.const)S(C.const,D);else if(C.enum)for(let O of C.enum)S(O,D);else throw Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(C,D){if(typeof C!="string"||C in g)throw Error(`discriminator: "${a}" values must be unique strings`);g[C]=D}}}};$q.default=v$e});var Fq=h(function(pKe,D$e){D$e.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 Rq=h(function(mKe,w$e){w$e.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 Oq=h(function(hKe,E$e){E$e.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 Aq=h(function(gKe,S$e){S$e.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 kq=h(function(yKe,$$e){$$e.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 Pq=h(function(xKe,C$e){C$e.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 Iq=h(function(bKe,F$e){F$e.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 Tq=h(function(vKe,R$e){R$e.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 qq=h(function(Nq){Object.defineProperty(Nq,"__esModule",{value:!0});var O$e=Fq(),A$e=Rq(),k$e=Oq(),P$e=Aq(),I$e=kq(),T$e=Pq(),N$e=Iq(),q$e=Tq(),j$e=["/properties"];function M$e(e){return[O$e,A$e,k$e,P$e,I$e,t(this,T$e),N$e,t(this,q$e)].forEach((r)=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,j$e):n}}Nq.default=M$e});var jq=h(function(pr,Iv){Object.defineProperty(pr,"__esModule",{value:!0});pr.MissingRefError=pr.ValidationError=pr.CodeGen=pr.Name=pr.nil=pr.stringify=pr.str=pr._=pr.KeywordCxt=pr.Ajv2020=void 0;var L$e=r9(),U$e=vq(),V$e=Cq(),z$e=qq(),Pv="https://json-schema.org/draft/2020-12/schema";class Il extends L$e.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){if(super._addVocabularies(),U$e.default.forEach((e)=>this.addVocabulary(e)),this.opts.discriminator)this.addKeyword(V$e.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;if(!t)return;z$e.default.call(this,e),this.refs["http://json-schema.org/schema"]=Pv}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Pv)?Pv:void 0)}}pr.Ajv2020=Il;Iv.exports=pr=Il;Iv.exports.Ajv2020=Il;Object.defineProperty(pr,"__esModule",{value:!0});pr.default=Il;var H$e=vl();Object.defineProperty(pr,"KeywordCxt",{enumerable:!0,get:function(){return H$e.KeywordCxt}});var sc=ue();Object.defineProperty(pr,"_",{enumerable:!0,get:function(){return sc._}});Object.defineProperty(pr,"str",{enumerable:!0,get:function(){return sc.str}});Object.defineProperty(pr,"stringify",{enumerable:!0,get:function(){return sc.stringify}});Object.defineProperty(pr,"nil",{enumerable:!0,get:function(){return sc.nil}});Object.defineProperty(pr,"Name",{enumerable:!0,get:function(){return sc.Name}});Object.defineProperty(pr,"CodeGen",{enumerable:!0,get:function(){return sc.CodeGen}});var W$e=r0();Object.defineProperty(pr,"ValidationError",{enumerable:!0,get:function(){return W$e.default}});var G$e=_l();Object.defineProperty(pr,"MissingRefError",{enumerable:!0,get:function(){return G$e.default}})});var Kq=h(function(Wq){Object.defineProperty(Wq,"__esModule",{value:!0});Wq.formatNames=Wq.fastFormats=Wq.fullFormats=void 0;function Yn(e,t){return{validate:e,compare:t}}Wq.fullFormats={date:Yn(Uq,jv),time:Yn(Nv(!0),Mv),"date-time":Yn(Mq(!0),zq),"iso-time":Yn(Nv(),Vq),"iso-date-time":Yn(Mq(),Hq),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:tCe,"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:cCe,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:rCe,int32:{type:"number",validate:sCe},int64:{type:"number",validate:oCe},float:{type:"number",validate:Lq},double:{type:"number",validate:Lq},password:!0,binary:!0};Wq.fastFormats={...Wq.fullFormats,date:Yn(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,jv),time:Yn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Mv),"date-time":Yn(/^\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,zq),"iso-time":Yn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Vq),"iso-date-time":Yn(/^\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,Hq),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};Wq.formatNames=Object.keys(Wq.fullFormats);function J$e(e){return e%4===0&&(e%100!==0||e%400===0)}var X$e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Q$e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Uq(e){let t=X$e.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&J$e(r)?29:Q$e[n])}function jv(e,t){if(!(e&&t))return;if(e>t)return 1;if(e<t)return-1;return 0}var Tv=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Nv(e){return function(r){let n=Tv.exec(r);if(!n)return!1;let i=+n[1],s=+n[2],o=+n[3],a=n[4],c=n[5]==="-"?-1:1,l=+(n[6]||0),d=+(n[7]||0);if(l>23||d>59||e&&!a)return!1;if(i<=23&&s<=59&&o<60)return!0;let f=s-d*c,m=i-l*c-(f<0?1:0);return(m===23||m===-1)&&(f===59||f===-1)&&o<61}}function Mv(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(!(r&&n))return;return r-n}function Vq(e,t){if(!(e&&t))return;let r=Tv.exec(e),n=Tv.exec(t);if(!(r&&n))return;if(e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t)return 1;if(e<t)return-1;return 0}var qv=/t|\s/i;function Mq(e){let t=Nv(e);return function(n){let i=n.split(qv);return i.length===2&&Uq(i[0])&&t(i[1])}}function zq(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(!(r&&n))return;return r-n}function Hq(e,t){if(!(e&&t))return;let[r,n]=e.split(qv),[i,s]=t.split(qv),o=jv(r,i);if(o===void 0)return;return o||Mv(n,s)}var Z$e=/\/|:/,eCe=/^(?:[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 tCe(e){return Z$e.test(e)&&eCe.test(e)}var Bq=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function rCe(e){return Bq.lastIndex=0,Bq.test(e)}var nCe=-2147483648,iCe=2147483647;function sCe(e){return Number.isInteger(e)&&e<=iCe&&e>=nCe}function oCe(e){return Number.isInteger(e)}function Lq(){return!0}var aCe=/[^\\]\\Z/;function cCe(e){if(aCe.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}}});var Nl=h(function(Xq){Object.defineProperty(Xq,"__esModule",{value:!0});Xq.regexpCode=Xq.getEsmExportName=Xq.getProperty=Xq.safeStringify=Xq.stringify=Xq.strConcat=Xq.addCodeArg=Xq.str=Xq._=Xq.nil=Xq._Code=Xq.Name=Xq.IDENTIFIER=Xq._CodeOrName=void 0;class S0{}Xq._CodeOrName=S0;Xq.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class oc extends S0{constructor(e){super();if(!Xq.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Xq.Name=oc;class dn extends S0{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof oc)t[r.str]=(t[r.str]||0)+1;return t},{})}}Xq._Code=dn;Xq.nil=new dn("");function Yq(e,...t){let r=[e[0]],n=0;while(n<t.length)Uv(r,t[n]),r.push(e[++n]);return new dn(r)}Xq._=Yq;var Lv=new dn("+");function Jq(e,...t){let r=[Tl(e[0])],n=0;while(n<t.length)r.push(Lv),Uv(r,t[n]),r.push(Lv,Tl(e[++n]));return lCe(r),new dn(r)}Xq.str=Jq;function Uv(e,t){if(t instanceof dn)e.push(...t._items);else if(t instanceof oc)e.push(t);else e.push(pCe(t))}Xq.addCodeArg=Uv;function lCe(e){let t=1;while(t<e.length-1){if(e[t]===Lv){let r=dCe(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function dCe(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof oc||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof oc))return`"${e}${t.slice(1)}`;return}function fCe(e,t){return t.emptyStr()?e:e.emptyStr()?t:Jq`${e}${t}`}Xq.strConcat=fCe;function pCe(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Tl(Array.isArray(e)?e.join(","):e)}function mCe(e){return new dn(Tl(e))}Xq.stringify=mCe;function Tl(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Xq.safeStringify=Tl;function hCe(e){return typeof e=="string"&&Xq.IDENTIFIER.test(e)?new dn(`.${e}`):Yq`[${e}]`}Xq.getProperty=hCe;function gCe(e){if(typeof e=="string"&&Xq.IDENTIFIER.test(e))return new dn(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Xq.getEsmExportName=gCe;function yCe(e){return new dn(e.toString())}Xq.regexpCode=yCe});var Wv=h(function(tj){Object.defineProperty(tj,"__esModule",{value:!0});tj.ValueScope=tj.ValueScopeName=tj.Scope=tj.varKinds=tj.UsedValueState=void 0;var mr=Nl();class Zq extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var C0;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(C0||(tj.UsedValueState=C0={}));tj.varKinds={const:new mr.Name("const"),let:new mr.Name("let"),var:new mr.Name("var")};class zv{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof mr.Name?e:this.name(e)}name(e){return new mr.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}tj.Scope=zv;class Hv extends mr.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=mr._`.${new mr.Name(t)}[${r}]`}}tj.ValueScopeName=Hv;var OCe=mr._`\n`;class ej extends zv{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?OCe:mr.nil}}get(){return this._scope}name(e){return new Hv(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,s=(r=t.key)!==null&&r!==void 0?r:t.ref,o=this._values[i];if(o){let l=o.get(s);if(l)return l}else o=this._values[i]=new Map;o.set(s,n);let a=this._scope[i]||(this._scope[i]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:i,itemIndex:c}),n}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return mr._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let i=mr.nil;for(let s in e){let o=e[s];if(!o)continue;let a=r[s]=r[s]||new Map;o.forEach((c)=>{if(a.has(c))return;a.set(c,C0.Started);let l=t(c);if(l){let d=this.opts.es5?tj.varKinds.var:tj.varKinds.const;i=mr._`${i}${d} ${c} = ${l};${this.opts._n}`}else if(l=n===null||n===void 0?void 0:n(c))i=mr._`${i}${l}${this.opts._n}`;else throw new Zq(c);a.set(c,C0.Completed)})}return i}}tj.ValueScope=ej});var me=h(function(hr){Object.defineProperty(hr,"__esModule",{value:!0});hr.or=hr.and=hr.not=hr.CodeGen=hr.operators=hr.varKinds=hr.ValueScopeName=hr.ValueScope=hr.Scope=hr.Name=hr.regexpCode=hr.stringify=hr.getProperty=hr.nil=hr.strConcat=hr.str=hr._=void 0;var Ee=Nl(),fn=Wv(),Es=Nl();Object.defineProperty(hr,"_",{enumerable:!0,get:function(){return Es._}});Object.defineProperty(hr,"str",{enumerable:!0,get:function(){return Es.str}});Object.defineProperty(hr,"strConcat",{enumerable:!0,get:function(){return Es.strConcat}});Object.defineProperty(hr,"nil",{enumerable:!0,get:function(){return Es.nil}});Object.defineProperty(hr,"getProperty",{enumerable:!0,get:function(){return Es.getProperty}});Object.defineProperty(hr,"stringify",{enumerable:!0,get:function(){return Es.stringify}});Object.defineProperty(hr,"regexpCode",{enumerable:!0,get:function(){return Es.regexpCode}});Object.defineProperty(hr,"Name",{enumerable:!0,get:function(){return Es.Name}});var P0=Wv();Object.defineProperty(hr,"Scope",{enumerable:!0,get:function(){return P0.Scope}});Object.defineProperty(hr,"ValueScope",{enumerable:!0,get:function(){return P0.ValueScope}});Object.defineProperty(hr,"ValueScopeName",{enumerable:!0,get:function(){return P0.ValueScopeName}});Object.defineProperty(hr,"varKinds",{enumerable:!0,get:function(){return P0.varKinds}});hr.operators={GT:new Ee._Code(">"),GTE:new Ee._Code(">="),LT:new Ee._Code("<"),LTE:new Ee._Code("<="),EQ:new Ee._Code("==="),NEQ:new Ee._Code("!=="),NOT:new Ee._Code("!"),OR:new Ee._Code("||"),AND:new Ee._Code("&&"),ADD:new Ee._Code("+")};class Ss{optimizeNodes(){return this}optimizeNames(e,t){return this}}class nj extends Ss{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?fn.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=cc(this.rhs,e,t);return this}get names(){return this.rhs instanceof Ee._CodeOrName?this.rhs.names:{}}}class Yv extends Ss{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof Ee.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=cc(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Ee.Name?{}:{...this.lhs.names};return k0(e,this.rhs)}}class ij extends Yv{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class sj extends Ss{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class oj extends Ss{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class aj extends Ss{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class cj extends Ss{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=cc(this.code,e,t),this}get names(){return this.code instanceof Ee._CodeOrName?this.code.names:{}}}class I0 extends Ss{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;while(n--){let i=r[n];if(i.optimizeNames(e,t))continue;ICe(e,i.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>vo(e,t.names),{})}}class $s extends I0{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class uj extends I0{}class ql extends $s{}ql.kind="else";class Ei extends $s{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new ql(r):r}if(t){if(e===!1)return t instanceof Ei?t:t.nodes;if(this.nodes.length)return this;return new Ei(mj(e),t instanceof Ei?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=cc(this.condition,e,t),this}get names(){let e=super.names;if(k0(e,this.condition),this.else)vo(e,this.else.names);return e}}Ei.kind="if";class ac extends $s{}ac.kind="for";class lj extends ac{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=cc(this.iteration,e,t),this}get names(){return vo(super.names,this.iteration.names)}}class dj extends ac{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?fn.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){let e=k0(super.names,this.from);return k0(e,this.to)}}class Gv extends ac{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=cc(this.iterable,e,t),this}get names(){return vo(super.names,this.iterable.names)}}class F0 extends $s{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}F0.kind="func";class R0 extends I0{render(e){return"return "+super.render(e)}}R0.kind="return";class fj extends $s{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)vo(e,this.catch.names);if(this.finally)vo(e,this.finally.names);return e}}class O0 extends $s{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}O0.kind="catch";class A0 extends $s{render(e){return"finally"+super.render(e)}}A0.kind="finally";class pj{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
92
92
|
`:""},this._extScope=e,this._scope=new fn.Scope({parent:e}),this._nodes=[new uj]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){let i=this._scope.toName(t);if(r!==void 0&&n)this._constants[i.str]=r;return this._leafNode(new nj(e,i,r)),i}const(e,t,r){return this._def(fn.varKinds.const,e,t,r)}let(e,t,r){return this._def(fn.varKinds.let,e,t,r)}var(e,t,r){return this._def(fn.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Yv(e,t,r))}add(e,t){return this._leafNode(new ij(e,hr.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==Ee.nil)this._leafNode(new cj(e));return this}object(...e){let t=["{"];for(let[r,n]of e){if(t.length>1)t.push(",");if(t.push(r),r!==n||this.opts.es5)t.push(":"),(0,Ee.addCodeArg)(t,n)}return t.push("}"),new Ee._Code(t)}if(e,t,r){if(this._blockNode(new Ei(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Ei(e))}else(){return this._elseNode(new ql)}endIf(){return this._endBlockNode(Ei,ql)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new lj(e),t)}forRange(e,t,r,n,i=this.opts.es5?fn.varKinds.var:fn.varKinds.let){let s=this._scope.toName(e);return this._for(new dj(i,s,t,r),()=>n(s))}forOf(e,t,r,n=fn.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=t instanceof Ee.Name?t:this.var("_arr",t);return this.forRange("_i",0,Ee._`${s}.length`,(o)=>{this.var(i,Ee._`${s}[${o}]`),r(i)})}return this._for(new Gv("of",n,i,t),()=>r(i))}forIn(e,t,r,n=this.opts.es5?fn.varKinds.var:fn.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,Ee._`Object.keys(${t})`,r);let i=this._scope.toName(e);return this._for(new Gv("in",n,i,t),()=>r(i))}endFor(){return this._endBlockNode(ac)}label(e){return this._leafNode(new sj(e))}break(e){return this._leafNode(new oj(e))}return(e){let t=new R0;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(R0)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let n=new fj;if(this._blockNode(n),this.code(e),t){let i=this.name("e");this._currNode=n.catch=new O0(i),t(i)}if(r)this._currNode=n.finally=new A0,this.code(r);return this._endBlockNode(O0,A0)}throw(e){return this._leafNode(new aj(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=Ee.nil,r,n){if(this._blockNode(new F0(e,t,r)),n)this.code(n).endFunc();return this}endFunc(){return this._endBlockNode(F0)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Ei))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}hr.CodeGen=pj;function vo(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function k0(e,t){return t instanceof Ee._CodeOrName?vo(e,t.names):e}function cc(e,t,r){if(e instanceof Ee.Name)return n(e);if(!i(e))return e;return new Ee._Code(e._items.reduce((s,o)=>{if(o instanceof Ee.Name)o=n(o);if(o instanceof Ee._Code)s.push(...o._items);else s.push(o);return s},[]));function n(s){let o=r[s.str];if(o===void 0||t[s.str]!==1)return s;return delete t[s.str],o}function i(s){return s instanceof Ee._Code&&s._items.some((o)=>o instanceof Ee.Name&&t[o.str]===1&&r[o.str]!==void 0)}}function ICe(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function mj(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:Ee._`!${Kv(e)}`}hr.not=mj;var TCe=hj(hr.operators.AND);function NCe(...e){return e.reduce(TCe)}hr.and=NCe;var qCe=hj(hr.operators.OR);function jCe(...e){return e.reduce(qCe)}hr.or=jCe;function hj(e){return(t,r)=>t===Ee.nil?r:r===Ee.nil?t:Ee._`${Kv(t)} ${e} ${Kv(r)}`}function Kv(e){return e instanceof Ee.Name?e:Ee._`(${e})`}});var Ie=h(function(Ej){Object.defineProperty(Ej,"__esModule",{value:!0});Ej.checkStrictMode=Ej.getErrorPath=Ej.Type=Ej.useFunc=Ej.setEvaluated=Ej.evaluatedPropsToName=Ej.mergeEvaluated=Ej.eachItem=Ej.unescapeJsonPointer=Ej.escapeJsonPointer=Ej.escapeFragment=Ej.unescapeFragment=Ej.schemaRefOrVal=Ej.schemaHasRulesButRef=Ej.schemaHasRules=Ej.checkUnknownRules=Ej.alwaysValidSchema=Ej.toHash=void 0;var Ke=me(),UCe=Nl();function VCe(e){let t={};for(let r of e)t[r]=!0;return t}Ej.toHash=VCe;function zCe(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return bj(e,t),!vj(t,e.self.RULES.all)}Ej.alwaysValidSchema=zCe;function bj(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let i=n.RULES.keywords;for(let s in t)if(!i[s])wj(e,`unknown keyword: "${s}"`)}Ej.checkUnknownRules=bj;function vj(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}Ej.schemaHasRules=vj;function HCe(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}Ej.schemaHasRulesButRef=HCe;function WCe({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return Ke._`${r}`}return Ke._`${e}${t}${(0,Ke.getProperty)(n)}`}Ej.schemaRefOrVal=WCe;function GCe(e){return _j(decodeURIComponent(e))}Ej.unescapeFragment=GCe;function KCe(e){return encodeURIComponent(Xv(e))}Ej.escapeFragment=KCe;function Xv(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}Ej.escapeJsonPointer=Xv;function _j(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Ej.unescapeJsonPointer=_j;function YCe(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}Ej.eachItem=YCe;function yj({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,s,o,a)=>{let c=o===void 0?s:o instanceof Ke.Name?(s instanceof Ke.Name?e(i,s,o):t(i,s,o),o):s instanceof Ke.Name?(t(i,o,s),s):r(s,o);return a===Ke.Name&&!(c instanceof Ke.Name)?n(i,c):c}}Ej.mergeEvaluated={props:yj({mergeNames:(e,t,r)=>e.if(Ke._`${r} !== true && ${t} !== undefined`,()=>{e.if(Ke._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,Ke._`${r} || {}`).code(Ke._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(Ke._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,Ke._`${r} || {}`),Qv(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Dj}),items:yj({mergeNames:(e,t,r)=>e.if(Ke._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,Ke._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(Ke._`${r} !== true`,()=>e.assign(r,t===!0?!0:Ke._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Dj(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",Ke._`{}`);if(t!==void 0)Qv(e,r,t);return r}Ej.evaluatedPropsToName=Dj;function Qv(e,t,r){Object.keys(r).forEach((n)=>e.assign(Ke._`${t}${(0,Ke.getProperty)(n)}`,!0))}Ej.setEvaluated=Qv;var xj={};function JCe(e,t){return e.scopeValue("func",{ref:t,code:xj[t.code]||(xj[t.code]=new UCe._Code(t.code))})}Ej.useFunc=JCe;var Jv;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Jv||(Ej.Type=Jv={}));function XCe(e,t,r){if(e instanceof Ke.Name){let n=t===Jv.Num;return r?n?Ke._`"[" + ${e} + "]"`:Ke._`"['" + ${e} + "']"`:n?Ke._`"/" + ${e}`:Ke._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Ke.getProperty)(e).toString():"/"+Xv(e)}Ej.getErrorPath=XCe;function wj(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}Ej.checkStrictMode=wj});var Si=h(function($j){Object.defineProperty($j,"__esModule",{value:!0});var jt=me(),h6e={data:new jt.Name("data"),valCxt:new jt.Name("valCxt"),instancePath:new jt.Name("instancePath"),parentData:new jt.Name("parentData"),parentDataProperty:new jt.Name("parentDataProperty"),rootData:new jt.Name("rootData"),dynamicAnchors:new jt.Name("dynamicAnchors"),vErrors:new jt.Name("vErrors"),errors:new jt.Name("errors"),this:new jt.Name("this"),self:new jt.Name("self"),scope:new jt.Name("scope"),json:new jt.Name("json"),jsonPos:new jt.Name("jsonPos"),jsonLen:new jt.Name("jsonLen"),jsonPart:new jt.Name("jsonPart")};$j.default=h6e});var jl=h(function(Oj){Object.defineProperty(Oj,"__esModule",{value:!0});Oj.extendErrors=Oj.resetErrorsCount=Oj.reportExtraError=Oj.reportError=Oj.keyword$DataError=Oj.keywordError=void 0;var Fe=me(),N0=Ie(),Jt=Si();Oj.keywordError={message:({keyword:e})=>Fe.str`must pass "${e}" keyword validation`};Oj.keyword$DataError={message:({keyword:e,schemaType:t})=>t?Fe.str`"${e}" keyword must be ${t} ($data)`:Fe.str`"${e}" keyword is invalid ($data)`};function y6e(e,t=Oj.keywordError,r,n){let{it:i}=e,{gen:s,compositeRule:o,allErrors:a}=i,c=Rj(e,t,r);if(n!==null&&n!==void 0?n:o||a)Cj(s,c);else Fj(i,Fe._`[${c}]`)}Oj.reportError=y6e;function x6e(e,t=Oj.keywordError,r){let{it:n}=e,{gen:i,compositeRule:s,allErrors:o}=n,a=Rj(e,t,r);if(Cj(i,a),!(s||o))Fj(n,Jt.default.vErrors)}Oj.reportExtraError=x6e;function b6e(e,t){e.assign(Jt.default.errors,t),e.if(Fe._`${Jt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(Fe._`${Jt.default.vErrors}.length`,t),()=>e.assign(Jt.default.vErrors,null)))}Oj.resetErrorsCount=b6e;function v6e({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:s}){if(i===void 0)throw Error("ajv implementation error");let o=e.name("err");e.forRange("i",i,Jt.default.errors,(a)=>{if(e.const(o,Fe._`${Jt.default.vErrors}[${a}]`),e.if(Fe._`${o}.instancePath === undefined`,()=>e.assign(Fe._`${o}.instancePath`,(0,Fe.strConcat)(Jt.default.instancePath,s.errorPath))),e.assign(Fe._`${o}.schemaPath`,Fe.str`${s.errSchemaPath}/${t}`),s.opts.verbose)e.assign(Fe._`${o}.schema`,r),e.assign(Fe._`${o}.data`,n)})}Oj.extendErrors=v6e;function Cj(e,t){let r=e.const("err",t);e.if(Fe._`${Jt.default.vErrors} === null`,()=>e.assign(Jt.default.vErrors,Fe._`[${r}]`),Fe._`${Jt.default.vErrors}.push(${r})`),e.code(Fe._`${Jt.default.errors}++`)}function Fj(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;if(i.$async)r.throw(Fe._`new ${e.ValidationError}(${t})`);else r.assign(Fe._`${n}.errors`,t),r.return(!1)}var _o={keyword:new Fe.Name("keyword"),schemaPath:new Fe.Name("schemaPath"),params:new Fe.Name("params"),propertyName:new Fe.Name("propertyName"),message:new Fe.Name("message"),schema:new Fe.Name("schema"),parentSchema:new Fe.Name("parentSchema")};function Rj(e,t,r){let{createErrors:n}=e.it;if(n===!1)return Fe._`{}`;return _6e(e,t,r)}function _6e(e,t,r={}){let{gen:n,it:i}=e,s=[D6e(i,r),w6e(e,r)];return E6e(e,t,s),n.object(...s)}function D6e({errorPath:e},{instancePath:t}){let r=t?Fe.str`${e}${(0,N0.getErrorPath)(t,N0.Type.Str)}`:e;return[Jt.default.instancePath,(0,Fe.strConcat)(Jt.default.instancePath,r)]}function w6e({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:Fe.str`${t}/${e}`;if(r)i=Fe.str`${i}${(0,N0.getErrorPath)(r,N0.Type.Str)}`;return[_o.schemaPath,i]}function E6e(e,{params:t,message:r},n){let{keyword:i,data:s,schemaValue:o,it:a}=e,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:f}=a;if(n.push([_o.keyword,i],[_o.params,typeof t=="function"?t(e):t||Fe._`{}`]),c.messages)n.push([_o.message,typeof r=="function"?r(e):r]);if(c.verbose)n.push([_o.schema,o],[_o.parentSchema,Fe._`${d}${f}`],[Jt.default.data,s]);if(l)n.push([_o.propertyName,l])}});var Tj=h(function(Pj){Object.defineProperty(Pj,"__esModule",{value:!0});Pj.boolOrEmptySchema=Pj.topBoolOrEmptySchema=void 0;var R6e=jl(),O6e=me(),A6e=Si(),k6e={message:"boolean schema is false"};function P6e(e){let{gen:t,schema:r,validateName:n}=e;if(r===!1)kj(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(A6e.default.data);else t.assign(O6e._`${n}.errors`,null),t.return(!0)}Pj.topBoolOrEmptySchema=P6e;function I6e(e,t){let{gen:r,schema:n}=e;if(n===!1)r.var(t,!1),kj(e);else r.var(t,!0)}Pj.boolOrEmptySchema=I6e;function kj(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,R6e.reportError)(i,k6e,void 0,t)}});var e_=h(function(Nj){Object.defineProperty(Nj,"__esModule",{value:!0});Nj.getRules=Nj.isJSONType=void 0;var N6e=["string","number","integer","boolean","null","object","array"],q6e=new Set(N6e);function j6e(e){return typeof e=="string"&&q6e.has(e)}Nj.isJSONType=j6e;function M6e(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Nj.getRules=M6e});var t_=h(function(Bj){Object.defineProperty(Bj,"__esModule",{value:!0});Bj.shouldUseRule=Bj.shouldUseGroup=Bj.schemaHasRulesForType=void 0;function L6e({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&jj(e,n)}Bj.schemaHasRulesForType=L6e;function jj(e,t){return t.rules.some((r)=>Mj(e,r))}Bj.shouldUseGroup=jj;function Mj(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((n)=>e[n]!==void 0))}Bj.shouldUseRule=Mj});var Ml=h(function(Hj){Object.defineProperty(Hj,"__esModule",{value:!0});Hj.reportTypeError=Hj.checkDataTypes=Hj.checkDataType=Hj.coerceAndCheckDataType=Hj.getJSONTypes=Hj.getSchemaTypes=Hj.DataType=void 0;var z6e=e_(),H6e=t_(),W6e=jl(),pe=me(),Uj=Ie(),uc;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(uc||(Hj.DataType=uc={}));function G6e(e){let t=Vj(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}Hj.getSchemaTypes=G6e;function Vj(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(z6e.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}Hj.getJSONTypes=Vj;function K6e(e,t){let{gen:r,data:n,opts:i}=e,s=Y6e(t,i.coerceTypes),o=t.length>0&&!(s.length===0&&t.length===1&&(0,H6e.schemaHasRulesForType)(e,t[0]));if(o){let a=n_(t,n,i.strictNumbers,uc.Wrong);r.if(a,()=>{if(s.length)J6e(e,t,s);else i_(e)})}return o}Hj.coerceAndCheckDataType=K6e;var zj=new Set(["string","number","integer","boolean","null"]);function Y6e(e,t){return t?e.filter((r)=>zj.has(r)||t==="array"&&r==="array"):[]}function J6e(e,t,r){let{gen:n,data:i,opts:s}=e,o=n.let("dataType",pe._`typeof ${i}`),a=n.let("coerced",pe._`undefined`);if(s.coerceTypes==="array")n.if(pe._`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,pe._`${i}[0]`).assign(o,pe._`typeof ${i}`).if(n_(t,i,s.strictNumbers),()=>n.assign(a,i)));n.if(pe._`${a} !== undefined`);for(let l of r)if(zj.has(l)||l==="array"&&s.coerceTypes==="array")c(l);n.else(),i_(e),n.endIf(),n.if(pe._`${a} !== undefined`,()=>{n.assign(i,a),X6e(e,a)});function c(l){switch(l){case"string":n.elseIf(pe._`${o} == "number" || ${o} == "boolean"`).assign(a,pe._`"" + ${i}`).elseIf(pe._`${i} === null`).assign(a,pe._`""`);return;case"number":n.elseIf(pe._`${o} == "boolean" || ${i} === null
|
|
93
93
|
|| (${o} == "string" && ${i} && ${i} == +${i})`).assign(a,pe._`+${i}`);return;case"integer":n.elseIf(pe._`${o} === "boolean" || ${i} === null
|
|
94
94
|
|| (${o} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,pe._`+${i}`);return;case"boolean":n.elseIf(pe._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf(pe._`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf(pe._`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf(pe._`${o} === "string" || ${o} === "number"
|
|
95
|
-
|| ${o} === "boolean" || ${i} === null`).assign(a,pe._`[${i}]`)}}}function X6e({gen:e,parentData:t,parentDataProperty:r},n){e.if(pe._`${t} !== undefined`,()=>e.assign(pe._`${t}[${r}]`,n))}function r_(e,t,r,n=uc.Correct){let i=n===uc.Correct?pe.operators.EQ:pe.operators.NEQ,s;switch(e){case"null":return pe._`${t} ${i} null`;case"array":s=pe._`Array.isArray(${t})`;break;case"object":s=pe._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=o(pe._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=o();break;default:return pe._`typeof ${t} ${i} ${e}`}return n===uc.Correct?s:(0,pe.not)(s);function o(a=pe.nil){return(0,pe.and)(pe._`typeof ${t} == "number"`,a,r?pe._`isFinite(${t})`:pe.nil)}}Hj.checkDataType=r_;function n_(e,t,r,n){if(e.length===1)return r_(e[0],t,r,n);let i,s=(0,Uj.toHash)(e);if(s.array&&s.object){let o=pe._`typeof ${t} != "object"`;i=s.null?o:pe._`!${t} || ${o}`,delete s.null,delete s.array,delete s.object}else i=pe.nil;if(s.number)delete s.integer;for(let o in s)i=(0,pe.and)(i,r_(o,t,r,n));return i}Hj.checkDataTypes=n_;var Q6e={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?pe._`{type: ${e}}`:pe._`{type: ${t}}`};function i_(e){let t=Z6e(e);(0,W6e.reportError)(t,Q6e)}Hj.reportTypeError=i_;function Z6e(e){let{gen:t,data:r,schema:n}=e,i=(0,Uj.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var Jj=h(function(Kj){Object.defineProperty(Kj,"__esModule",{value:!0});Kj.assignDefaults=void 0;var lc=me(),oFe=Ie();function aFe(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)Gj(e,i,r[i].default);else if(t==="array"&&Array.isArray(n))n.forEach((i,s)=>Gj(e,s,i.default))}Kj.assignDefaults=aFe;function Gj(e,t,r){let{gen:n,compositeRule:i,data:s,opts:o}=e;if(r===void 0)return;let a=lc._`${s}${(0,lc.getProperty)(t)}`;if(i){(0,oFe.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=lc._`${a} === undefined`;if(o.useDefaults==="empty")c=lc._`${c} || ${a} === null || ${a} === ""`;n.if(c,lc._`${a} = ${(0,lc.stringify)(r)}`)}});var zr=h(function(Zj){Object.defineProperty(Zj,"__esModule",{value:!0});Zj.validateUnion=Zj.validateArray=Zj.usePattern=Zj.callValidateCode=Zj.schemaProperties=Zj.allSchemaProperties=Zj.noPropertyInData=Zj.propertyInData=Zj.isOwnProperty=Zj.hasPropFunc=Zj.reportMissingProp=Zj.checkMissingProp=Zj.checkReportMissingProp=void 0;var Qe=me(),s_=Ie(),Cs=Si(),cFe=Ie();function uFe(e,t){let{gen:r,data:n,it:i}=e;r.if(a_(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:Qe._`${t}`},!0),e.error()})}Zj.checkReportMissingProp=uFe;function lFe({gen:e,data:t,it:{opts:r}},n,i){return(0,Qe.or)(...n.map((s)=>(0,Qe.and)(a_(e,t,s,r.ownProperties),Qe._`${i} = ${s}`)))}Zj.checkMissingProp=lFe;function dFe(e,t){e.setParams({missingProperty:t},!0),e.error()}Zj.reportMissingProp=dFe;function Xj(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:Qe._`Object.prototype.hasOwnProperty`})}Zj.hasPropFunc=Xj;function o_(e,t,r){return Qe._`${Xj(e)}.call(${t}, ${r})`}Zj.isOwnProperty=o_;function fFe(e,t,r,n){let i=Qe._`${t}${(0,Qe.getProperty)(r)} !== undefined`;return n?Qe._`${i} && ${o_(e,t,r)}`:i}Zj.propertyInData=fFe;function a_(e,t,r,n){let i=Qe._`${t}${(0,Qe.getProperty)(r)} === undefined`;return n?(0,Qe.or)(i,(0,Qe.not)(o_(e,t,r))):i}Zj.noPropertyInData=a_;function Qj(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}Zj.allSchemaProperties=Qj;function pFe(e,t){return Qj(t).filter((r)=>!(0,s_.alwaysValidSchema)(e,t[r]))}Zj.schemaProperties=pFe;function mFe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:o},a,c,l){let d=l?Qe._`${e}, ${t}, ${n}${i}`:t,f=[[Cs.default.instancePath,(0,Qe.strConcat)(Cs.default.instancePath,s)],[Cs.default.parentData,o.parentData],[Cs.default.parentDataProperty,o.parentDataProperty],[Cs.default.rootData,Cs.default.rootData]];if(o.opts.dynamicRef)f.push([Cs.default.dynamicAnchors,Cs.default.dynamicAnchors]);let m=Qe._`${d}, ${r.object(...f)}`;return c!==Qe.nil?Qe._`${a}.call(${c}, ${m})`:Qe._`${a}(${m})`}Zj.callValidateCode=mFe;var hFe=Qe._`new RegExp`;function gFe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:Qe._`${i.code==="new RegExp"?hFe:(0,cFe.useFunc)(e,i)}(${r}, ${n})`})}Zj.usePattern=gFe;function yFe(e){let{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){let a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){let c=t.const("len",Qe._`${r}.length`);t.forRange("i",0,c,(l)=>{e.subschema({keyword:n,dataProp:l,dataPropType:s_.Type.Num},s),t.if((0,Qe.not)(s),a)})}}Zj.validateArray=yFe;function xFe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>(0,s_.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let d=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);if(t.assign(o,Qe._`${o} || ${a}`),!e.mergeValidEvaluated(d,a))t.if((0,Qe.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}Zj.validateUnion=xFe});var sM=h(function(nM){Object.defineProperty(nM,"__esModule",{value:!0});nM.validateKeywordUsage=nM.validSchemaType=nM.funcKeywordCode=nM.macroKeywordCode=void 0;var Xt=me(),Do=Si(),AFe=zr(),kFe=jl();function PFe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:s,it:o}=e,a=t.macro.call(o.self,i,s,o),c=rM(r,n,a);if(o.opts.validateSchema!==!1)o.self.validateSchema(a,!0);let l=r.name("valid");e.subschema({schema:a,schemaPath:Xt.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}nM.macroKeywordCode=PFe;function IFe(e,t){var r;let{gen:n,keyword:i,schema:s,parentSchema:o,$data:a,it:c}=e;NFe(c,t);let l=!a&&t.compile?t.compile.call(c.self,s,o,c):t.validate,d=rM(n,i,l),f=n.let("valid");e.block$data(f,m),e.ok((r=t.valid)!==null&&r!==void 0?r:f);function m(){if(t.errors===!1){if(y(),t.modifying)tM(e);x(()=>e.error())}else{let v=t.async?p():g();if(t.modifying)tM(e);x(()=>TFe(e,v))}}function p(){let v=n.let("ruleErrs",null);return n.try(()=>y(Xt._`await `),(_)=>n.assign(f,!1).if(Xt._`${_} instanceof ${c.ValidationError}`,()=>n.assign(v,Xt._`${_}.errors`),()=>n.throw(_))),v}function g(){let v=Xt._`${d}.errors`;return n.assign(v,null),y(Xt.nil),v}function y(v=t.async?Xt._`await `:Xt.nil){let _=c.opts.passContext?Do.default.this:Do.default.self,E=!(("compile"in t)&&!a||t.schema===!1);n.assign(f,Xt._`${v}${(0,AFe.callValidateCode)(e,d,_,E)}`,t.modifying)}function x(v){var _;n.if((0,Xt.not)((_=t.valid)!==null&&_!==void 0?_:f),v)}}nM.funcKeywordCode=IFe;function tM(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,Xt._`${n.parentData}[${n.parentDataProperty}]`))}function TFe(e,t){let{gen:r}=e;r.if(Xt._`Array.isArray(${t})`,()=>{r.assign(Do.default.vErrors,Xt._`${Do.default.vErrors} === null ? ${t} : ${Do.default.vErrors}.concat(${t})`).assign(Do.default.errors,Xt._`${Do.default.vErrors}.length`),(0,kFe.extendErrors)(e)},()=>e.error())}function NFe({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function rM(e,t,r){if(r===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Xt.stringify)(r)})}function qFe(e,t,r=!1){return!t.length||t.some((n)=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}nM.validSchemaType=qFe;function jFe({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw Error("ajv implementation error");let o=i.dependencies;if(o===null||o===void 0?void 0:o.some((a)=>!Object.prototype.hasOwnProperty.call(e,a)))throw Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(i.validateSchema){if(!i.validateSchema(e[s])){let c=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw Error(c)}}}nM.validateKeywordUsage=jFe});var uM=h(function(aM){Object.defineProperty(aM,"__esModule",{value:!0});aM.extendSubschemaMode=aM.extendSubschemaData=aM.getSubschema=void 0;var Jn=me(),oM=Ie();function UFe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:Jn._`${e.schemaPath}${(0,Jn.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:Jn._`${e.schemaPath}${(0,Jn.getProperty)(t)}${(0,Jn.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,oM.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||o===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')}aM.getSubschema=UFe;function VFe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:o}){if(i!==void 0&&r!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:l,dataPathArr:d,opts:f}=t,m=a.let("data",Jn._`${t.data}${(0,Jn.getProperty)(r)}`,!0);c(m),e.errorPath=Jn.str`${l}${(0,oM.getErrorPath)(r,n,f.jsPropertySyntax)}`,e.parentDataProperty=Jn._`${r}`,e.dataPathArr=[...d,e.parentDataProperty]}if(i!==void 0){let l=i instanceof Jn.Name?i:a.let("data",i,!0);if(c(l),o!==void 0)e.propertyName=o}if(s)e.dataTypes=s;function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}aM.extendSubschemaData=VFe;function zFe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){if(n!==void 0)e.compositeRule=n;if(i!==void 0)e.createErrors=i;if(s!==void 0)e.allErrors=s;e.jtdDiscriminator=t,e.jtdMetadata=r}aM.extendSubschemaMode=zFe});var Bl=h(function(pM){Object.defineProperty(pM,"__esModule",{value:!0});pM.getSchemaRefs=pM.resolveUrl=pM.normalizeId=pM._getFullPath=pM.getFullPath=pM.inlineRef=void 0;var GFe=Ie(),KFe=gl(),YFe=iv(),JFe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function XFe(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!c_(e);if(!t)return!1;return lM(e)<=t}pM.inlineRef=XFe;var QFe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c_(e){for(let t in e){if(QFe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(c_))return!0;if(typeof r=="object"&&c_(r))return!0}return!1}function lM(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,JFe.has(r))continue;if(typeof e[r]=="object")(0,GFe.eachItem)(e[r],(n)=>t+=lM(n));if(t===1/0)return 1/0}return t}function dM(e,t="",r){if(r!==!1)t=dc(t);let n=e.parse(t);return fM(e,n)}pM.getFullPath=dM;function fM(e,t){return e.serialize(t).split("#")[0]+"#"}pM._getFullPath=fM;var ZFe=/#\/?$/;function dc(e){return e?e.replace(ZFe,""):""}pM.normalizeId=dc;function eRe(e,t,r){return r=dc(r),e.resolve(t,r)}pM.resolveUrl=eRe;var tRe=/^[a-z_][-a-z0-9._]*$/i;function rRe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=dc(e[r]||t),s={"":i},o=dM(n,i,!1),a={},c=new Set;return YFe(e,{allKeys:!0},(f,m,p,g)=>{if(g===void 0)return;let y=o+m,x=s[g];if(typeof f[r]=="string")x=v.call(this,f[r]);_.call(this,f.$anchor),_.call(this,f.$dynamicAnchor),s[m]=x;function v(E){let C=this.opts.uriResolver.resolve;if(E=dc(x?C(x,E):E),c.has(E))throw d(E);c.add(E);let D=this.refs[E];if(typeof D=="string")D=this.refs[D];if(typeof D=="object")l(f,D.schema,E);else if(E!==dc(y))if(E[0]==="#")l(f,a[E],E),a[E]=f;else this.refs[E]=y;return E}function _(E){if(typeof E=="string"){if(!tRe.test(E))throw Error(`invalid anchor "${E}"`);v.call(this,`#${E}`)}}}),a;function l(f,m,p){if(m!==void 0&&!KFe(f,m))throw d(p)}function d(f){return Error(`reference "${f}" resolves to more than one schema`)}}pM.getSchemaRefs=rRe});var Vl=h(function(RM){Object.defineProperty(RM,"__esModule",{value:!0});RM.getData=RM.KeywordCxt=RM.validateFunctionCode=void 0;var bM=Tj(),hM=Ml(),l_=t_(),q0=Ml(),cRe=Jj(),Ul=sM(),u_=uM(),J=me(),re=Si(),uRe=Bl(),$i=Ie(),Ll=jl();function lRe(e){if(DM(e)){if(wM(e),_M(e)){pRe(e);return}}vM(e,()=>(0,bM.topBoolOrEmptySchema)(e))}RM.validateFunctionCode=lRe;function vM({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){if(i.code.es5)e.func(t,J._`${re.default.data}, ${re.default.valCxt}`,n.$async,()=>{e.code(J._`"use strict"; ${gM(r,i)}`),fRe(e,i),e.code(s)});else e.func(t,J._`${re.default.data}, ${dRe(i)}`,n.$async,()=>e.code(gM(r,i)).code(s))}function dRe(e){return J._`{${re.default.instancePath}="", ${re.default.parentData}, ${re.default.parentDataProperty}, ${re.default.rootData}=${re.default.data}${e.dynamicRef?J._`, ${re.default.dynamicAnchors}={}`:J.nil}}={}`}function fRe(e,t){e.if(re.default.valCxt,()=>{if(e.var(re.default.instancePath,J._`${re.default.valCxt}.${re.default.instancePath}`),e.var(re.default.parentData,J._`${re.default.valCxt}.${re.default.parentData}`),e.var(re.default.parentDataProperty,J._`${re.default.valCxt}.${re.default.parentDataProperty}`),e.var(re.default.rootData,J._`${re.default.valCxt}.${re.default.rootData}`),t.dynamicRef)e.var(re.default.dynamicAnchors,J._`${re.default.valCxt}.${re.default.dynamicAnchors}`)},()=>{if(e.var(re.default.instancePath,J._`""`),e.var(re.default.parentData,J._`undefined`),e.var(re.default.parentDataProperty,J._`undefined`),e.var(re.default.rootData,re.default.data),t.dynamicRef)e.var(re.default.dynamicAnchors,J._`{}`)})}function pRe(e){let{schema:t,opts:r,gen:n}=e;vM(e,()=>{if(r.$comment&&t.$comment)SM(e);if(xRe(e),n.let(re.default.vErrors,null),n.let(re.default.errors,0),r.unevaluated)mRe(e);EM(e),_Re(e)});return}function mRe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",J._`${r}.evaluated`),t.if(J._`${e.evaluated}.dynamicProps`,()=>t.assign(J._`${e.evaluated}.props`,J._`undefined`)),t.if(J._`${e.evaluated}.dynamicItems`,()=>t.assign(J._`${e.evaluated}.items`,J._`undefined`))}function gM(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?J._`/*# sourceURL=${r} */`:J.nil}function hRe(e,t){if(DM(e)){if(wM(e),_M(e)){gRe(e,t);return}}(0,bM.boolOrEmptySchema)(e,t)}function _M({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function DM(e){return typeof e.schema!="boolean"}function gRe(e,t){let{schema:r,gen:n,opts:i}=e;if(i.$comment&&r.$comment)SM(e);bRe(e),vRe(e);let s=n.const("_errs",re.default.errors);EM(e,s),n.var(t,J._`${s} === ${re.default.errors}`)}function wM(e){(0,$i.checkUnknownRules)(e),yRe(e)}function EM(e,t){if(e.opts.jtd)return yM(e,[],!1,t);let r=(0,hM.getSchemaTypes)(e.schema),n=(0,hM.coerceAndCheckDataType)(e,r);yM(e,r,!n,t)}function yRe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;if(t.$ref&&n.ignoreKeywordsWithRef&&(0,$i.schemaHasRulesButRef)(t,i.RULES))i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function xRe(e){let{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema)(0,$i.checkStrictMode)(e,"default is ignored in the schema root")}function bRe(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=(0,uRe.resolveUrl)(e.opts.uriResolver,e.baseId,t)}function vRe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function SM({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)e.code(J._`${re.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){let o=J.str`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(J._`${re.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function _Re(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;if(r.$async)t.if(J._`${re.default.errors} === 0`,()=>t.return(re.default.data),()=>t.throw(J._`new ${i}(${re.default.vErrors})`));else{if(t.assign(J._`${n}.errors`,re.default.vErrors),s.unevaluated)DRe(e);t.return(J._`${re.default.errors} === 0`)}}function DRe({gen:e,evaluated:t,props:r,items:n}){if(r instanceof J.Name)e.assign(J._`${t}.props`,r);if(n instanceof J.Name)e.assign(J._`${t}.items`,n)}function yM(e,t,r,n){let{gen:i,schema:s,data:o,allErrors:a,opts:c,self:l}=e,{RULES:d}=l;if(s.$ref&&(c.ignoreKeywordsWithRef||!(0,$i.schemaHasRulesButRef)(s,d))){i.block(()=>CM(e,"$ref",d.all.$ref.definition));return}if(!c.jtd)wRe(e,t);i.block(()=>{for(let m of d.rules)f(m);f(d.post)});function f(m){if(!(0,l_.shouldUseGroup)(s,m))return;if(m.type){if(i.if((0,q0.checkDataType)(m.type,o,c.strictNumbers)),xM(e,m),t.length===1&&t[0]===m.type&&r)i.else(),(0,q0.reportTypeError)(e);i.endIf()}else xM(e,m);if(!a)i.if(J._`${re.default.errors} === ${n||0}`)}}function xM(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;if(i)(0,cRe.assignDefaults)(e,t.type);r.block(()=>{for(let s of t.rules)if((0,l_.shouldUseRule)(n,s))CM(e,s.keyword,s.definition,t.type)})}function wRe(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(ERe(e,t),!e.opts.allowUnionTypes)SRe(e,t);$Re(e,e.dataTypes)}function ERe(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!$M(e.dataTypes,r))d_(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),FRe(e,t)}function SRe(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))d_(e,"use allowUnionTypes to allow union type keyword")}function $Re(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,l_.shouldUseRule)(e.schema,i)){let{type:s}=i.definition;if(s.length&&!s.some((o)=>CRe(t,o)))d_(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function CRe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function $M(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function FRe(e,t){let r=[];for(let n of e.dataTypes)if($M(t,n))r.push(n);else if(t.includes("integer")&&n==="number")r.push("integer");e.dataTypes=r}function d_(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,$i.checkStrictMode)(e,t,e.opts.strictTypes)}class f_{constructor(e,t,r){if((0,Ul.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$i.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",FM(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ul.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",re.default.errors)}result(e,t,r){this.failResult((0,J.not)(e),t,r)}failResult(e,t,r){if(this.gen.if(e),r)r();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult((0,J.not)(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(J._`${t} !== undefined && (${(0,J.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?Ll.reportExtraError:Ll.reportError)(this,this.def.error,t)}$dataError(){(0,Ll.reportError)(this,this.def.$dataError||Ll.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,Ll.resetErrorsCount)(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=J.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=J.nil,t=J.nil){if(!this.$data)return;let{gen:r,schemaCode:n,schemaType:i,def:s}=this;if(r.if((0,J.or)(J._`${n} === undefined`,t)),e!==J.nil)r.assign(e,!0);if(i.length||s.validateSchema){if(r.elseIf(this.invalid$data()),this.$dataError(),e!==J.nil)r.assign(e,!1)}r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,J.or)(s(),o());function s(){if(r.length){if(!(t instanceof J.Name))throw Error("ajv implementation error");let a=Array.isArray(r)?r:[r];return J._`${(0,q0.checkDataTypes)(a,t,i.opts.strictNumbers,q0.DataType.Wrong)}`}return J.nil}function o(){if(n.validateSchema){let a=e.scopeValue("validate$data",{ref:n.validateSchema});return J._`!${a}(${t})`}return J.nil}}subschema(e,t){let r=(0,u_.getSubschema)(this.it,e);(0,u_.extendSubschemaData)(r,this.it,e),(0,u_.extendSubschemaMode)(r,e);let n={...this.it,...r,items:void 0,props:void 0};return hRe(n,t),n}mergeEvaluated(e,t){let{it:r,gen:n}=this;if(!r.opts.unevaluated)return;if(r.props!==!0&&e.props!==void 0)r.props=$i.mergeEvaluated.props(n,e.props,r.props,t);if(r.items!==!0&&e.items!==void 0)r.items=$i.mergeEvaluated.items(n,e.items,r.items,t)}mergeValidEvaluated(e,t){let{it:r,gen:n}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return n.if(t,()=>this.mergeEvaluated(e,J.Name)),!0}}RM.KeywordCxt=f_;function CM(e,t,r,n){let i=new f_(e,r,t);if("code"in r)r.code(i,n);else if(i.$data&&r.validate)(0,Ul.funcKeywordCode)(i,r);else if("macro"in r)(0,Ul.macroKeywordCode)(i,r);else if(r.compile||r.validate)(0,Ul.funcKeywordCode)(i,r)}var RRe=/^\/(?:[^~]|~0|~1)*$/,ORe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function FM(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return re.default.rootData;if(e[0]==="/"){if(!RRe.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,s=re.default.rootData}else{let l=ORe.exec(e);if(!l)throw Error(`Invalid JSON-pointer: ${e}`);let d=+l[1];if(i=l[2],i==="#"){if(d>=t)throw Error(c("property/index",d));return n[t-d]}if(d>t)throw Error(c("data",d));if(s=r[t-d],!i)return s}let o=s,a=i.split("/");for(let l of a)if(l)s=J._`${s}${(0,J.getProperty)((0,$i.unescapeJsonPointer)(l))}`,o=J._`${o} && ${s}`;return o;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}RM.getData=FM});var j0=h(function(kM){Object.defineProperty(kM,"__esModule",{value:!0});class AM extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}kM.default=AM});var zl=h(function(IM){Object.defineProperty(IM,"__esModule",{value:!0});var p_=Bl();class PM extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`);this.missingRef=(0,p_.resolveUrl)(e,t,r),this.missingSchema=(0,p_.normalizeId)((0,p_.getFullPath)(e,this.missingRef))}}IM.default=PM});var B0=h(function(qM){Object.defineProperty(qM,"__esModule",{value:!0});qM.resolveSchema=qM.getCompilingSchema=qM.resolveRef=qM.compileSchema=qM.SchemaEnv=void 0;var pn=me(),TRe=j0(),wo=Si(),mn=Bl(),TM=Ie(),NRe=Vl();class Hl{constructor(e){var t;this.refs={},this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,mn.normalizeId)(r===null||r===void 0?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r===null||r===void 0?void 0:r.$async,this.refs={}}}qM.SchemaEnv=Hl;function h_(e){let t=NM.call(this,e);if(t)return t;let r=(0,mn.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new pn.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),a;if(e.$async)a=o.scopeValue("Error",{ref:TRe.default,code:pn._`require("ajv/dist/runtime/validation_error").default`});let c=o.scopeName("validate");e.validateName=c;let l={gen:o,allErrors:this.opts.allErrors,data:wo.default.data,parentData:wo.default.parentData,parentDataProperty:wo.default.parentDataProperty,dataNames:[wo.default.data],dataPathArr:[pn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,pn.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:pn.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:pn._`""`,opts:this.opts,self:this},d;try{this._compilations.add(e),(0,NRe.validateFunctionCode)(l),o.optimize(this.opts.code.optimize);let f=o.toString();if(d=`${o.scopeRefs(wo.default.scope)}return ${f}`,this.opts.code.process)d=this.opts.code.process(d,e);let p=Function(`${wo.default.self}`,`${wo.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async)p.$async=!0;if(this.opts.code.source===!0)p.source={validateName:c,validateCode:f,scopeValues:o._values};if(this.opts.unevaluated){let{props:g,items:y}=l;if(p.evaluated={props:g instanceof pn.Name?void 0:g,items:y instanceof pn.Name?void 0:y,dynamicProps:g instanceof pn.Name,dynamicItems:y instanceof pn.Name},p.source)p.source.evaluated=(0,pn.stringify)(p.evaluated)}return e.validate=p,e}catch(f){if(delete e.validate,delete e.validateName,d)this.logger.error("Error compiling schema, function code:",d);throw f}finally{this._compilations.delete(e)}}qM.compileSchema=h_;function qRe(e,t,r){var n;r=(0,mn.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let s=BRe.call(this,e,r);if(s===void 0){let o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;if(o)s=new Hl({schema:o,schemaId:a,root:e,baseId:t})}if(s===void 0)return;return e.refs[r]=jRe.call(this,s)}qM.resolveRef=qRe;function jRe(e){if((0,mn.inlineRef)(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:h_.call(this,e)}function NM(e){for(let t of this._compilations)if(MRe(t,e))return t}qM.getCompilingSchema=NM;function MRe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function BRe(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||M0.call(this,e,t)}function M0(e,t){let r=this.opts.uriResolver.parse(t),n=(0,mn._getFullPath)(this.opts.uriResolver,r),i=(0,mn.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return m_.call(this,r,e);let s=(0,mn.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){let a=M0.call(this,e,o);if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;return m_.call(this,r,a)}if(typeof(o===null||o===void 0?void 0:o.schema)!=="object")return;if(!o.validate)h_.call(this,o);if(s===(0,mn.normalizeId)(t)){let{schema:a}=o,{schemaId:c}=this.opts,l=a[c];if(l)i=(0,mn.resolveUrl)(this.opts.uriResolver,i,l);return new Hl({schema:a,schemaId:c,root:e,baseId:i})}return m_.call(this,r,o)}qM.resolveSchema=M0;var LRe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m_(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;let c=r[(0,TM.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r==="object"&&r[this.opts.schemaId];if(!LRe.has(a)&&l)t=(0,mn.resolveUrl)(this.opts.uriResolver,t,l)}let s;if(typeof r!="boolean"&&r.$ref&&!(0,TM.schemaHasRulesButRef)(r,this.RULES)){let a=(0,mn.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=M0.call(this,n,a)}let{schemaId:o}=this.opts;if(s=s||new Hl({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s;return}});var MM=h(function(cYe,WRe){WRe.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 UM=h(function(LM){Object.defineProperty(LM,"__esModule",{value:!0});var BM=xv();BM.code='require("ajv/dist/runtime/uri").default';LM.default=BM});var JM=h(function(Ci){Object.defineProperty(Ci,"__esModule",{value:!0});Ci.CodeGen=Ci.Name=Ci.nil=Ci.stringify=Ci.str=Ci._=Ci.KeywordCxt=void 0;var KRe=Vl();Object.defineProperty(Ci,"KeywordCxt",{enumerable:!0,get:function(){return KRe.KeywordCxt}});var fc=me();Object.defineProperty(Ci,"_",{enumerable:!0,get:function(){return fc._}});Object.defineProperty(Ci,"str",{enumerable:!0,get:function(){return fc.str}});Object.defineProperty(Ci,"stringify",{enumerable:!0,get:function(){return fc.stringify}});Object.defineProperty(Ci,"nil",{enumerable:!0,get:function(){return fc.nil}});Object.defineProperty(Ci,"Name",{enumerable:!0,get:function(){return fc.Name}});Object.defineProperty(Ci,"CodeGen",{enumerable:!0,get:function(){return fc.CodeGen}});var YRe=j0(),GM=zl(),JRe=e_(),Wl=B0(),XRe=me(),Gl=Bl(),L0=Ml(),y_=Ie(),VM=MM(),QRe=UM(),KM=(e,t)=>new RegExp(e,t);KM.code="new RegExp";var ZRe=["removeAdditional","useDefaults","coerceTypes"],eOe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),tOe={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."},rOe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},zM=200;function nOe(e){var t,r,n,i,s,o,a,c,l,d,f,m,p,g,y,x,v,_,E,C,D,O,F,M,k;let j=e.strict,Z=(t=e.code)===null||t===void 0?void 0:t.optimize,_e=Z===!0||Z===void 0?1:Z||0,qe=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:KM,Me=(i=e.uriResolver)!==null&&i!==void 0?i:QRe.default;return{strictSchema:(o=(s=e.strictSchema)!==null&&s!==void 0?s:j)!==null&&o!==void 0?o:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:j)!==null&&c!==void 0?c:!0,strictTypes:(d=(l=e.strictTypes)!==null&&l!==void 0?l:j)!==null&&d!==void 0?d:"log",strictTuples:(m=(f=e.strictTuples)!==null&&f!==void 0?f:j)!==null&&m!==void 0?m:"log",strictRequired:(g=(p=e.strictRequired)!==null&&p!==void 0?p:j)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:_e,regExp:qe}:{optimize:_e,regExp:qe},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:zM,loopEnum:(x=e.loopEnum)!==null&&x!==void 0?x:zM,meta:(v=e.meta)!==null&&v!==void 0?v:!0,messages:(_=e.messages)!==null&&_!==void 0?_:!0,inlineRefs:(E=e.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(C=e.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(D=e.addUsedSchema)!==null&&D!==void 0?D:!0,validateSchema:(O=e.validateSchema)!==null&&O!==void 0?O:!0,validateFormats:(F=e.validateFormats)!==null&&F!==void 0?F:!0,unicodeRegExp:(M=e.unicodeRegExp)!==null&&M!==void 0?M:!0,int32range:(k=e.int32range)!==null&&k!==void 0?k:!0,uriResolver:Me}}class U0{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...nOe(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new XRe.ValueScope({scope:{},prefixes:eOe,es5:t,lines:r}),this.logger=uOe(e.logger);let n=e.validateFormats;if(e.validateFormats=!1,this.RULES=(0,JRe.getRules)(),HM.call(this,tOe,e,"NOT SUPPORTED"),HM.call(this,rOe,e,"DEPRECATED","warn"),this._metaOpts=aOe.call(this),e.formats)sOe.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)oOe.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);iOe.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,n=VM;if(r==="id")n={...VM},n.id=n.$id,delete n.$id;if(t&&e)this.addMetaSchema(n,n[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let n=r(t);if(!("$async"in r))this.errors=r.errors;return n}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(l,d){await i.call(this,l.$schema);let f=this._addSchema(l,d);return f.validate||s.call(this,f)}async function i(l){if(l&&!this.getSchema(l))await n.call(this,{$ref:l},!0)}async function s(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof GM.default))throw d;return o.call(this,d),await a.call(this,d.missingSchema),s.call(this,l)}}function o({missingSchema:l,missingRef:d}){if(this.refs[l])throw Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function a(l){let d=await c.call(this,l);if(!this.refs[l])await i.call(this,d.$schema);if(!this.refs[l])this.addSchema(d,l,t)}async function c(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=r(l))}finally{delete this._loading[l]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,n);return this}let i;if(typeof e==="object"){let{schemaId:s}=this.opts;if(i=e[s],i!==void 0&&typeof i!="string")throw Error(`schema ${s} must be string`)}return t=(0,Gl.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(r,e);if(!n&&t){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw Error(i)}return n}getSchema(e){let t;while(typeof(t=WM.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:r}=this.opts,n=new Wl.SchemaEnv({schema:{},schemaId:r});if(t=Wl.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=WM.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r)r=(0,Gl.normalizeId)(r),delete this.schemas[r],delete this.refs[r];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){if(r=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r}else if(typeof e=="object"&&t===void 0){if(t=e,r=t.keyword,Array.isArray(r)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(dOe.call(this,r,t),!t)return(0,y_.eachItem)(r,(i)=>g_.call(this,i)),this;pOe.call(this,t);let n={...t,type:(0,L0.getJSONTypes)(t.type),schemaType:(0,L0.getJSONTypes)(t.schemaType)};return(0,y_.eachItem)(r,n.type.length===0?(i)=>g_.call(this,i,n):(i)=>n.type.forEach((s)=>g_.call(this,i,n,s))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let r of t.rules){let n=r.rules.findIndex((i)=>i.keyword===e);if(n>=0)r.rules.splice(n,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((n)=>`${r}${n.instancePath} ${n.message}`).reduce((n,i)=>n+t+i)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of t){let i=n.split("/").slice(1),s=e;for(let o of i)s=s[o];for(let o in r){let a=r[o];if(typeof a!="object")continue;let{$data:c}=a.definition,l=s[o];if(c&&l)s[o]=YM(l)}}return e}_removeAllSchemas(e,t){for(let r in e){let n=e[r];if(!t||t.test(r)){if(typeof n=="string")delete e[r];else if(n&&!n.meta)this._cache.delete(n.schema),delete e[r]}}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:o}=this.opts;if(typeof e=="object")s=e[o];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let a=this._cache.get(e);if(a!==void 0)return a;r=(0,Gl.normalizeId)(s||r);let c=Gl.getSchemaRefs.call(this,e,r);if(a=new Wl.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),i&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(n)this.validateSchema(e,!0);return a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else Wl.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Wl.compileSchema.call(this,e)}finally{this.opts=t}}}U0.ValidationError=YRe.default;U0.MissingRefError=GM.default;Ci.default=U0;function HM(e,t,r,n="error"){for(let i in e){let s=i;if(s in t)this.logger[n](`${r}: option ${i}. ${e[s]}`)}}function WM(e){return e=(0,Gl.normalizeId)(e),this.schemas[e]||this.refs[e]}function iOe(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function sOe(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function oOe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function aOe(){let e={...this.opts};for(let t of ZRe)delete e[t];return e}var cOe={log(){},warn(){},error(){}};function uOe(e){if(e===!1)return cOe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var lOe=/^[a-z_$][a-z0-9_$:-]*$/i;function dOe(e,t){let{RULES:r}=this;if((0,y_.eachItem)(e,(n)=>{if(r.keywords[n])throw Error(`Keyword ${n} is already defined`);if(!lOe.test(n))throw Error(`Keyword ${n} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function g_(e,t,r){var n;let i=t===null||t===void 0?void 0:t.post;if(r&&i)throw Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,o=i?s.post:s.rules.find(({type:c})=>c===r);if(!o)o={type:r,rules:[]},s.rules.push(o);if(s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,L0.getJSONTypes)(t.type),schemaType:(0,L0.getJSONTypes)(t.schemaType)}};if(t.before)fOe.call(this,o,a,t.before);else o.rules.push(a);s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach((c)=>this.addKeyword(c))}function fOe(e,t,r){let n=e.rules.findIndex((i)=>i.keyword===r);if(n>=0)e.rules.splice(n,0,t);else e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)}function pOe(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=YM(t);e.validateSchema=this.compile(t,!0)}var mOe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function YM(e){return{anyOf:[e,mOe]}}});var QM=h(function(XM){Object.defineProperty(XM,"__esModule",{value:!0});var yOe={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};XM.default=yOe});var iB=h(function(rB){Object.defineProperty(rB,"__esModule",{value:!0});rB.callRef=rB.getValidate=void 0;var bOe=zl(),ZM=zr(),gr=me(),pc=Si(),eB=B0(),V0=Ie(),vOe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:o,opts:a,self:c}=n,{root:l}=s;if((r==="#"||r==="#/")&&i===l.baseId)return f();let d=eB.resolveRef.call(c,l,i,r);if(d===void 0)throw new bOe.default(n.opts.uriResolver,i,r);if(d instanceof eB.SchemaEnv)return m(d);return p(d);function f(){if(s===l)return z0(e,o,s,s.$async);let g=t.scopeValue("root",{ref:l});return z0(e,gr._`${g}.validate`,l,l.$async)}function m(g){let y=tB(e,g);z0(e,y,g,g.$async)}function p(g){let y=t.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,gr.stringify)(g)}:{ref:g}),x=t.name("valid"),v=e.subschema({schema:g,dataTypes:[],schemaPath:gr.nil,topSchemaRef:y,errSchemaPath:r},x);e.mergeEvaluated(v),e.ok(x)}}};function tB(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):gr._`${r.scopeValue("wrapper",{ref:t})}.validate`}rB.getValidate=tB;function z0(e,t,r,n){let{gen:i,it:s}=e,{allErrors:o,schemaEnv:a,opts:c}=s,l=c.passContext?pc.default.this:gr.nil;if(n)d();else f();function d(){if(!a.$async)throw Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{if(i.code(gr._`await ${(0,ZM.callValidateCode)(e,t,l)}`),p(t),!o)i.assign(g,!0)},(y)=>{if(i.if(gr._`!(${y} instanceof ${s.ValidationError})`,()=>i.throw(y)),m(y),!o)i.assign(g,!1)}),e.ok(g)}function f(){e.result((0,ZM.callValidateCode)(e,t,l),()=>p(t),()=>m(t))}function m(g){let y=gr._`${g}.errors`;i.assign(pc.default.vErrors,gr._`${pc.default.vErrors} === null ? ${y} : ${pc.default.vErrors}.concat(${y})`),i.assign(pc.default.errors,gr._`${pc.default.vErrors}.length`)}function p(g){var y;if(!s.opts.unevaluated)return;let x=(y=r===null||r===void 0?void 0:r.validate)===null||y===void 0?void 0:y.evaluated;if(s.props!==!0)if(x&&!x.dynamicProps){if(x.props!==void 0)s.props=V0.mergeEvaluated.props(i,x.props,s.props)}else{let v=i.var("props",gr._`${g}.evaluated.props`);s.props=V0.mergeEvaluated.props(i,v,s.props,gr.Name)}if(s.items!==!0)if(x&&!x.dynamicItems){if(x.items!==void 0)s.items=V0.mergeEvaluated.items(i,x.items,s.items)}else{let v=i.var("items",gr._`${g}.evaluated.items`);s.items=V0.mergeEvaluated.items(i,v,s.items,gr.Name)}}}rB.callRef=z0;rB.default=vOe});var oB=h(function(sB){Object.defineProperty(sB,"__esModule",{value:!0});var wOe=QM(),EOe=iB(),SOe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",wOe.default,EOe.default];sB.default=SOe});var cB=h(function(aB){Object.defineProperty(aB,"__esModule",{value:!0});var H0=me(),Fs=H0.operators,W0={maximum:{okStr:"<=",ok:Fs.LTE,fail:Fs.GT},minimum:{okStr:">=",ok:Fs.GTE,fail:Fs.LT},exclusiveMaximum:{okStr:"<",ok:Fs.LT,fail:Fs.GTE},exclusiveMinimum:{okStr:">",ok:Fs.GT,fail:Fs.LTE}},COe={message:({keyword:e,schemaCode:t})=>H0.str`must be ${W0[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>H0._`{comparison: ${W0[e].okStr}, limit: ${t}}`},FOe={keyword:Object.keys(W0),type:"number",schemaType:"number",$data:!0,error:COe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data(H0._`${r} ${W0[t].fail} ${n} || isNaN(${r})`)}};aB.default=FOe});var lB=h(function(uB){Object.defineProperty(uB,"__esModule",{value:!0});var Kl=me(),OOe={message:({schemaCode:e})=>Kl.str`must be multiple of ${e}`,params:({schemaCode:e})=>Kl._`{multipleOf: ${e}}`},AOe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:OOe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,o=t.let("res"),a=s?Kl._`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:Kl._`${o} !== parseInt(${o})`;e.fail$data(Kl._`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};uB.default=AOe});var pB=h(function(fB){Object.defineProperty(fB,"__esModule",{value:!0});function dB(e){let t=e.length,r=0,n=0,i;while(n<t)if(r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t){if(i=e.charCodeAt(n),(i&64512)===56320)n++}return r}fB.default=dB;dB.code='require("ajv/dist/runtime/ucs2length").default'});var hB=h(function(mB){Object.defineProperty(mB,"__esModule",{value:!0});var Eo=me(),IOe=Ie(),TOe=pB(),NOe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return Eo.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>Eo._`{limit: ${e}}`},qOe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:NOe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?Eo.operators.GT:Eo.operators.LT,o=i.opts.unicode===!1?Eo._`${r}.length`:Eo._`${(0,IOe.useFunc)(e.gen,TOe.default)}(${r})`;e.fail$data(Eo._`${o} ${s} ${n}`)}};mB.default=qOe});var yB=h(function(gB){Object.defineProperty(gB,"__esModule",{value:!0});var MOe=zr(),G0=me(),BOe={message:({schemaCode:e})=>G0.str`must match pattern "${e}"`,params:({schemaCode:e})=>G0._`{pattern: ${e}}`},LOe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:BOe,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,o=s.opts.unicodeRegExp?"u":"",a=r?G0._`(new RegExp(${i}, ${o}))`:(0,MOe.usePattern)(e,n);e.fail$data(G0._`!${a}.test(${t})`)}};gB.default=LOe});var bB=h(function(xB){Object.defineProperty(xB,"__esModule",{value:!0});var Yl=me(),VOe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return Yl.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>Yl._`{limit: ${e}}`},zOe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:VOe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Yl.operators.GT:Yl.operators.LT;e.fail$data(Yl._`Object.keys(${r}).length ${i} ${n}`)}};xB.default=zOe});var _B=h(function(vB){Object.defineProperty(vB,"__esModule",{value:!0});var Jl=zr(),Xl=me(),WOe=Ie(),GOe={message:({params:{missingProperty:e}})=>Xl.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>Xl._`{missingProperty: ${e}}`},KOe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:GOe,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;let c=r.length>=a.loopRequired;if(o.allErrors)l();else d();if(a.strictRequired){let p=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if((p===null||p===void 0?void 0:p[y])===void 0&&!g.has(y)){let x=o.schemaEnv.baseId+o.errSchemaPath,v=`required property "${y}" is not defined at "${x}" (strictRequired)`;(0,WOe.checkStrictMode)(o,v,o.opts.strictRequired)}}function l(){if(c||s)e.block$data(Xl.nil,f);else for(let p of r)(0,Jl.checkReportMissingProp)(e,p)}function d(){let p=t.let("missing");if(c||s){let g=t.let("valid",!0);e.block$data(g,()=>m(p,g)),e.ok(g)}else t.if((0,Jl.checkMissingProp)(e,r,p)),(0,Jl.reportMissingProp)(e,p),t.else()}function f(){t.forOf("prop",n,(p)=>{e.setParams({missingProperty:p}),t.if((0,Jl.noPropertyInData)(t,i,p,a.ownProperties),()=>e.error())})}function m(p,g){e.setParams({missingProperty:p}),t.forOf(p,n,()=>{t.assign(g,(0,Jl.propertyInData)(t,i,p,a.ownProperties)),t.if((0,Xl.not)(g),()=>{e.error(),t.break()})},Xl.nil)}}};vB.default=KOe});var wB=h(function(DB){Object.defineProperty(DB,"__esModule",{value:!0});var Ql=me(),JOe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return Ql.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>Ql._`{limit: ${e}}`},XOe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:JOe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Ql.operators.GT:Ql.operators.LT;e.fail$data(Ql._`${r}.length ${i} ${n}`)}};DB.default=XOe});var K0=h(function(SB){Object.defineProperty(SB,"__esModule",{value:!0});var EB=gl();EB.code='require("ajv/dist/runtime/equal").default';SB.default=EB});var CB=h(function($B){Object.defineProperty($B,"__esModule",{value:!0});var x_=Ml(),At=me(),eAe=Ie(),tAe=K0(),rAe={message:({params:{i:e,j:t}})=>At.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>At._`{i: ${e}, j: ${t}}`},nAe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:rAe,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:o,it:a}=e;if(!n&&!i)return;let c=t.let("valid"),l=s.items?(0,x_.getSchemaTypes)(s.items):[];e.block$data(c,d,At._`${o} === false`),e.ok(c);function d(){let g=t.let("i",At._`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if(At._`${g} > 1`,()=>(f()?m:p)(g,y))}function f(){return l.length>0&&!l.some((g)=>g==="object"||g==="array")}function m(g,y){let x=t.name("item"),v=(0,x_.checkDataTypes)(l,x,a.opts.strictNumbers,x_.DataType.Wrong),_=t.const("indices",At._`{}`);t.for(At._`;${g}--;`,()=>{if(t.let(x,At._`${r}[${g}]`),t.if(v,At._`continue`),l.length>1)t.if(At._`typeof ${x} == "string"`,At._`${x} += "_"`);t.if(At._`typeof ${_}[${x}] == "number"`,()=>{t.assign(y,At._`${_}[${x}]`),e.error(),t.assign(c,!1).break()}).code(At._`${_}[${x}] = ${g}`)})}function p(g,y){let x=(0,eAe.useFunc)(t,tAe.default),v=t.name("outer");t.label(v).for(At._`;${g}--;`,()=>t.for(At._`${y} = ${g}; ${y}--;`,()=>t.if(At._`${x}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(v)})))}}};$B.default=nAe});var RB=h(function(FB){Object.defineProperty(FB,"__esModule",{value:!0});var b_=me(),sAe=Ie(),oAe=K0(),aAe={message:"must be equal to constant",params:({schemaCode:e})=>b_._`{allowedValue: ${e}}`},cAe={keyword:"const",$data:!0,error:aAe,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;if(n||s&&typeof s=="object")e.fail$data(b_._`!${(0,sAe.useFunc)(t,oAe.default)}(${r}, ${i})`);else e.fail(b_._`${s} !== ${r}`)}};FB.default=cAe});var AB=h(function(OB){Object.defineProperty(OB,"__esModule",{value:!0});var Zl=me(),lAe=Ie(),dAe=K0(),fAe={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>Zl._`{allowedValues: ${e}}`},pAe={keyword:"enum",schemaType:"array",$data:!0,error:fAe,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e;if(!n&&i.length===0)throw Error("enum must have non-empty array");let a=i.length>=o.opts.loopEnum,c,l=()=>c!==null&&c!==void 0?c:c=(0,lAe.useFunc)(t,dAe.default),d;if(a||n)d=t.let("valid"),e.block$data(d,f);else{if(!Array.isArray(i))throw Error("ajv implementation error");let p=t.const("vSchema",s);d=(0,Zl.or)(...i.map((g,y)=>m(p,y)))}e.pass(d);function f(){t.assign(d,!1),t.forOf("v",s,(p)=>t.if(Zl._`${l()}(${r}, ${p})`,()=>t.assign(d,!0).break()))}function m(p,g){let y=i[g];return typeof y==="object"&&y!==null?Zl._`${l()}(${r}, ${p}[${g}])`:Zl._`${r} === ${y}`}}};OB.default=pAe});var PB=h(function(kB){Object.defineProperty(kB,"__esModule",{value:!0});var hAe=cB(),gAe=lB(),yAe=hB(),xAe=yB(),bAe=bB(),vAe=_B(),_Ae=wB(),DAe=CB(),wAe=RB(),EAe=AB(),SAe=[hAe.default,gAe.default,yAe.default,xAe.default,bAe.default,vAe.default,_Ae.default,DAe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},wAe.default,EAe.default];kB.default=SAe});var __=h(function(TB){Object.defineProperty(TB,"__esModule",{value:!0});TB.validateAdditionalItems=void 0;var So=me(),v_=Ie(),CAe={message:({params:{len:e}})=>So.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>So._`{limit: ${e}}`},FAe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:CAe,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,v_.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}IB(e,n)}};function IB(e,t){let{gen:r,schema:n,data:i,keyword:s,it:o}=e;o.items=!0;let a=r.const("len",So._`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass(So._`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,v_.alwaysValidSchema)(o,n)){let l=r.var("valid",So._`${a} <= ${t.length}`);r.if((0,So.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,a,(d)=>{if(e.subschema({keyword:s,dataProp:d,dataPropType:v_.Type.Num},l),!o.allErrors)r.if((0,So.not)(l),()=>r.break())})}}TB.validateAdditionalItems=IB;TB.default=FAe});var D_=h(function(MB){Object.defineProperty(MB,"__esModule",{value:!0});MB.validateTuple=void 0;var qB=me(),Y0=Ie(),OAe=zr(),AAe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return jB(e,"additionalItems",t);if(r.items=!0,(0,Y0.alwaysValidSchema)(r,t))return;e.ok((0,OAe.validateArray)(e))}};function jB(e,t,r=e.schema){let{gen:n,parentSchema:i,data:s,keyword:o,it:a}=e;if(d(i),a.opts.unevaluated&&r.length&&a.items!==!0)a.items=Y0.mergeEvaluated.items(n,r.length,a.items);let c=n.name("valid"),l=n.const("len",qB._`${s}.length`);r.forEach((f,m)=>{if((0,Y0.alwaysValidSchema)(a,f))return;n.if(qB._`${l} > ${m}`,()=>e.subschema({keyword:o,schemaProp:m,dataProp:m},c)),e.ok(c)});function d(f){let{opts:m,errSchemaPath:p}=a,g=r.length,y=g===f.minItems&&(g===f.maxItems||f[t]===!1);if(m.strictTuples&&!y){let x=`"${o}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;(0,Y0.checkStrictMode)(a,x,m.strictTuples)}}}MB.validateTuple=jB;MB.default=AAe});var UB=h(function(LB){Object.defineProperty(LB,"__esModule",{value:!0});var PAe=D_(),IAe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>(0,PAe.validateTuple)(e,"items")};LB.default=IAe});var HB=h(function(zB){Object.defineProperty(zB,"__esModule",{value:!0});var VB=me(),NAe=Ie(),qAe=zr(),jAe=__(),MAe={message:({params:{len:e}})=>VB.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>VB._`{limit: ${e}}`},BAe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:MAe,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;if(n.items=!0,(0,NAe.alwaysValidSchema)(n,t))return;if(i)(0,jAe.validateAdditionalItems)(e,i);else e.ok((0,qAe.validateArray)(e))}};zB.default=BAe});var GB=h(function(WB){Object.defineProperty(WB,"__esModule",{value:!0});var Hr=me(),J0=Ie(),UAe={message:({params:{min:e,max:t}})=>t===void 0?Hr.str`must contain at least ${e} valid item(s)`:Hr.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?Hr._`{minContains: ${e}}`:Hr._`{minContains: ${e}, maxContains: ${t}}`},VAe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:UAe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e,o,a,{minContains:c,maxContains:l}=n;if(s.opts.next)o=c===void 0?1:c,a=l;else o=1;let d=t.const("len",Hr._`${i}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,J0.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,J0.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,J0.alwaysValidSchema)(s,r)){let y=Hr._`${d} >= ${o}`;if(a!==void 0)y=Hr._`${y} && ${d} <= ${a}`;e.pass(y);return}s.items=!0;let f=t.name("valid");if(a===void 0&&o===1)p(f,()=>t.if(f,()=>t.break()));else if(o===0){if(t.let(f,!0),a!==void 0)t.if(Hr._`${i}.length > 0`,m)}else t.let(f,!1),m();e.result(f,()=>e.reset());function m(){let y=t.name("_valid"),x=t.let("count",0);p(y,()=>t.if(y,()=>g(x)))}function p(y,x){t.forRange("i",0,d,(v)=>{e.subschema({keyword:"contains",dataProp:v,dataPropType:J0.Type.Num,compositeRule:!0},y),x()})}function g(y){if(t.code(Hr._`${y}++`),a===void 0)t.if(Hr._`${y} >= ${o}`,()=>t.assign(f,!0).break());else if(t.if(Hr._`${y} > ${a}`,()=>t.assign(f,!1).break()),o===1)t.assign(f,!0);else t.if(Hr._`${y} >= ${o}`,()=>t.assign(f,!0))}}};WB.default=VAe});var ZB=h(function(JB){Object.defineProperty(JB,"__esModule",{value:!0});JB.validateSchemaDeps=JB.validatePropertyDeps=JB.error=void 0;var w_=me(),HAe=Ie(),ed=zr();JB.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return w_.str`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>w_._`{property: ${e},
|
|
95
|
+
|| ${o} === "boolean" || ${i} === null`).assign(a,pe._`[${i}]`)}}}function X6e({gen:e,parentData:t,parentDataProperty:r},n){e.if(pe._`${t} !== undefined`,()=>e.assign(pe._`${t}[${r}]`,n))}function r_(e,t,r,n=uc.Correct){let i=n===uc.Correct?pe.operators.EQ:pe.operators.NEQ,s;switch(e){case"null":return pe._`${t} ${i} null`;case"array":s=pe._`Array.isArray(${t})`;break;case"object":s=pe._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=o(pe._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=o();break;default:return pe._`typeof ${t} ${i} ${e}`}return n===uc.Correct?s:(0,pe.not)(s);function o(a=pe.nil){return(0,pe.and)(pe._`typeof ${t} == "number"`,a,r?pe._`isFinite(${t})`:pe.nil)}}Hj.checkDataType=r_;function n_(e,t,r,n){if(e.length===1)return r_(e[0],t,r,n);let i,s=(0,Uj.toHash)(e);if(s.array&&s.object){let o=pe._`typeof ${t} != "object"`;i=s.null?o:pe._`!${t} || ${o}`,delete s.null,delete s.array,delete s.object}else i=pe.nil;if(s.number)delete s.integer;for(let o in s)i=(0,pe.and)(i,r_(o,t,r,n));return i}Hj.checkDataTypes=n_;var Q6e={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?pe._`{type: ${e}}`:pe._`{type: ${t}}`};function i_(e){let t=Z6e(e);(0,W6e.reportError)(t,Q6e)}Hj.reportTypeError=i_;function Z6e(e){let{gen:t,data:r,schema:n}=e,i=(0,Uj.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var Jj=h(function(Kj){Object.defineProperty(Kj,"__esModule",{value:!0});Kj.assignDefaults=void 0;var lc=me(),oFe=Ie();function aFe(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)Gj(e,i,r[i].default);else if(t==="array"&&Array.isArray(n))n.forEach((i,s)=>Gj(e,s,i.default))}Kj.assignDefaults=aFe;function Gj(e,t,r){let{gen:n,compositeRule:i,data:s,opts:o}=e;if(r===void 0)return;let a=lc._`${s}${(0,lc.getProperty)(t)}`;if(i){(0,oFe.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=lc._`${a} === undefined`;if(o.useDefaults==="empty")c=lc._`${c} || ${a} === null || ${a} === ""`;n.if(c,lc._`${a} = ${(0,lc.stringify)(r)}`)}});var zr=h(function(Zj){Object.defineProperty(Zj,"__esModule",{value:!0});Zj.validateUnion=Zj.validateArray=Zj.usePattern=Zj.callValidateCode=Zj.schemaProperties=Zj.allSchemaProperties=Zj.noPropertyInData=Zj.propertyInData=Zj.isOwnProperty=Zj.hasPropFunc=Zj.reportMissingProp=Zj.checkMissingProp=Zj.checkReportMissingProp=void 0;var Qe=me(),s_=Ie(),Cs=Si(),cFe=Ie();function uFe(e,t){let{gen:r,data:n,it:i}=e;r.if(a_(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:Qe._`${t}`},!0),e.error()})}Zj.checkReportMissingProp=uFe;function lFe({gen:e,data:t,it:{opts:r}},n,i){return(0,Qe.or)(...n.map((s)=>(0,Qe.and)(a_(e,t,s,r.ownProperties),Qe._`${i} = ${s}`)))}Zj.checkMissingProp=lFe;function dFe(e,t){e.setParams({missingProperty:t},!0),e.error()}Zj.reportMissingProp=dFe;function Xj(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:Qe._`Object.prototype.hasOwnProperty`})}Zj.hasPropFunc=Xj;function o_(e,t,r){return Qe._`${Xj(e)}.call(${t}, ${r})`}Zj.isOwnProperty=o_;function fFe(e,t,r,n){let i=Qe._`${t}${(0,Qe.getProperty)(r)} !== undefined`;return n?Qe._`${i} && ${o_(e,t,r)}`:i}Zj.propertyInData=fFe;function a_(e,t,r,n){let i=Qe._`${t}${(0,Qe.getProperty)(r)} === undefined`;return n?(0,Qe.or)(i,(0,Qe.not)(o_(e,t,r))):i}Zj.noPropertyInData=a_;function Qj(e){return e?Object.keys(e).filter((t)=>t!=="__proto__"):[]}Zj.allSchemaProperties=Qj;function pFe(e,t){return Qj(t).filter((r)=>!(0,s_.alwaysValidSchema)(e,t[r]))}Zj.schemaProperties=pFe;function mFe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:o},a,c,l){let d=l?Qe._`${e}, ${t}, ${n}${i}`:t,f=[[Cs.default.instancePath,(0,Qe.strConcat)(Cs.default.instancePath,s)],[Cs.default.parentData,o.parentData],[Cs.default.parentDataProperty,o.parentDataProperty],[Cs.default.rootData,Cs.default.rootData]];if(o.opts.dynamicRef)f.push([Cs.default.dynamicAnchors,Cs.default.dynamicAnchors]);let m=Qe._`${d}, ${r.object(...f)}`;return c!==Qe.nil?Qe._`${a}.call(${c}, ${m})`:Qe._`${a}(${m})`}Zj.callValidateCode=mFe;var hFe=Qe._`new RegExp`;function gFe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:Qe._`${i.code==="new RegExp"?hFe:(0,cFe.useFunc)(e,i)}(${r}, ${n})`})}Zj.usePattern=gFe;function yFe(e){let{gen:t,data:r,keyword:n,it:i}=e,s=t.name("valid");if(i.allErrors){let a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){let c=t.const("len",Qe._`${r}.length`);t.forRange("i",0,c,(l)=>{e.subschema({keyword:n,dataProp:l,dataPropType:s_.Type.Num},s),t.if((0,Qe.not)(s),a)})}}Zj.validateArray=yFe;function xFe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some((c)=>(0,s_.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let d=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);if(t.assign(o,Qe._`${o} || ${a}`),!e.mergeValidEvaluated(d,a))t.if((0,Qe.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}Zj.validateUnion=xFe});var sM=h(function(nM){Object.defineProperty(nM,"__esModule",{value:!0});nM.validateKeywordUsage=nM.validSchemaType=nM.funcKeywordCode=nM.macroKeywordCode=void 0;var Xt=me(),Do=Si(),AFe=zr(),kFe=jl();function PFe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:s,it:o}=e,a=t.macro.call(o.self,i,s,o),c=rM(r,n,a);if(o.opts.validateSchema!==!1)o.self.validateSchema(a,!0);let l=r.name("valid");e.subschema({schema:a,schemaPath:Xt.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}nM.macroKeywordCode=PFe;function IFe(e,t){var r;let{gen:n,keyword:i,schema:s,parentSchema:o,$data:a,it:c}=e;NFe(c,t);let l=!a&&t.compile?t.compile.call(c.self,s,o,c):t.validate,d=rM(n,i,l),f=n.let("valid");e.block$data(f,m),e.ok((r=t.valid)!==null&&r!==void 0?r:f);function m(){if(t.errors===!1){if(y(),t.modifying)tM(e);x(()=>e.error())}else{let v=t.async?p():g();if(t.modifying)tM(e);x(()=>TFe(e,v))}}function p(){let v=n.let("ruleErrs",null);return n.try(()=>y(Xt._`await `),(_)=>n.assign(f,!1).if(Xt._`${_} instanceof ${c.ValidationError}`,()=>n.assign(v,Xt._`${_}.errors`),()=>n.throw(_))),v}function g(){let v=Xt._`${d}.errors`;return n.assign(v,null),y(Xt.nil),v}function y(v=t.async?Xt._`await `:Xt.nil){let _=c.opts.passContext?Do.default.this:Do.default.self,S=!(("compile"in t)&&!a||t.schema===!1);n.assign(f,Xt._`${v}${(0,AFe.callValidateCode)(e,d,_,S)}`,t.modifying)}function x(v){var _;n.if((0,Xt.not)((_=t.valid)!==null&&_!==void 0?_:f),v)}}nM.funcKeywordCode=IFe;function tM(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,Xt._`${n.parentData}[${n.parentDataProperty}]`))}function TFe(e,t){let{gen:r}=e;r.if(Xt._`Array.isArray(${t})`,()=>{r.assign(Do.default.vErrors,Xt._`${Do.default.vErrors} === null ? ${t} : ${Do.default.vErrors}.concat(${t})`).assign(Do.default.errors,Xt._`${Do.default.vErrors}.length`),(0,kFe.extendErrors)(e)},()=>e.error())}function NFe({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function rM(e,t,r){if(r===void 0)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Xt.stringify)(r)})}function qFe(e,t,r=!1){return!t.length||t.some((n)=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}nM.validSchemaType=qFe;function jFe({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw Error("ajv implementation error");let o=i.dependencies;if(o===null||o===void 0?void 0:o.some((a)=>!Object.prototype.hasOwnProperty.call(e,a)))throw Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(i.validateSchema){if(!i.validateSchema(e[s])){let c=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw Error(c)}}}nM.validateKeywordUsage=jFe});var uM=h(function(aM){Object.defineProperty(aM,"__esModule",{value:!0});aM.extendSubschemaMode=aM.extendSubschemaData=aM.getSubschema=void 0;var Jn=me(),oM=Ie();function UFe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:Jn._`${e.schemaPath}${(0,Jn.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:Jn._`${e.schemaPath}${(0,Jn.getProperty)(t)}${(0,Jn.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,oM.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||o===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:s}}throw Error('either "keyword" or "schema" must be passed')}aM.getSubschema=UFe;function VFe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:o}){if(i!==void 0&&r!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:l,dataPathArr:d,opts:f}=t,m=a.let("data",Jn._`${t.data}${(0,Jn.getProperty)(r)}`,!0);c(m),e.errorPath=Jn.str`${l}${(0,oM.getErrorPath)(r,n,f.jsPropertySyntax)}`,e.parentDataProperty=Jn._`${r}`,e.dataPathArr=[...d,e.parentDataProperty]}if(i!==void 0){let l=i instanceof Jn.Name?i:a.let("data",i,!0);if(c(l),o!==void 0)e.propertyName=o}if(s)e.dataTypes=s;function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}aM.extendSubschemaData=VFe;function zFe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){if(n!==void 0)e.compositeRule=n;if(i!==void 0)e.createErrors=i;if(s!==void 0)e.allErrors=s;e.jtdDiscriminator=t,e.jtdMetadata=r}aM.extendSubschemaMode=zFe});var Bl=h(function(pM){Object.defineProperty(pM,"__esModule",{value:!0});pM.getSchemaRefs=pM.resolveUrl=pM.normalizeId=pM._getFullPath=pM.getFullPath=pM.inlineRef=void 0;var GFe=Ie(),KFe=gl(),YFe=iv(),JFe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function XFe(e,t=!0){if(typeof e=="boolean")return!0;if(t===!0)return!c_(e);if(!t)return!1;return lM(e)<=t}pM.inlineRef=XFe;var QFe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c_(e){for(let t in e){if(QFe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(c_))return!0;if(typeof r=="object"&&c_(r))return!0}return!1}function lM(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,JFe.has(r))continue;if(typeof e[r]=="object")(0,GFe.eachItem)(e[r],(n)=>t+=lM(n));if(t===1/0)return 1/0}return t}function dM(e,t="",r){if(r!==!1)t=dc(t);let n=e.parse(t);return fM(e,n)}pM.getFullPath=dM;function fM(e,t){return e.serialize(t).split("#")[0]+"#"}pM._getFullPath=fM;var ZFe=/#\/?$/;function dc(e){return e?e.replace(ZFe,""):""}pM.normalizeId=dc;function eRe(e,t,r){return r=dc(r),e.resolve(t,r)}pM.resolveUrl=eRe;var tRe=/^[a-z_][-a-z0-9._]*$/i;function rRe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=dc(e[r]||t),s={"":i},o=dM(n,i,!1),a={},c=new Set;return YFe(e,{allKeys:!0},(f,m,p,g)=>{if(g===void 0)return;let y=o+m,x=s[g];if(typeof f[r]=="string")x=v.call(this,f[r]);_.call(this,f.$anchor),_.call(this,f.$dynamicAnchor),s[m]=x;function v(S){let C=this.opts.uriResolver.resolve;if(S=dc(x?C(x,S):S),c.has(S))throw d(S);c.add(S);let D=this.refs[S];if(typeof D=="string")D=this.refs[D];if(typeof D=="object")l(f,D.schema,S);else if(S!==dc(y))if(S[0]==="#")l(f,a[S],S),a[S]=f;else this.refs[S]=y;return S}function _(S){if(typeof S=="string"){if(!tRe.test(S))throw Error(`invalid anchor "${S}"`);v.call(this,`#${S}`)}}}),a;function l(f,m,p){if(m!==void 0&&!KFe(f,m))throw d(p)}function d(f){return Error(`reference "${f}" resolves to more than one schema`)}}pM.getSchemaRefs=rRe});var Vl=h(function(RM){Object.defineProperty(RM,"__esModule",{value:!0});RM.getData=RM.KeywordCxt=RM.validateFunctionCode=void 0;var bM=Tj(),hM=Ml(),l_=t_(),q0=Ml(),cRe=Jj(),Ul=sM(),u_=uM(),J=me(),re=Si(),uRe=Bl(),$i=Ie(),Ll=jl();function lRe(e){if(DM(e)){if(wM(e),_M(e)){pRe(e);return}}vM(e,()=>(0,bM.topBoolOrEmptySchema)(e))}RM.validateFunctionCode=lRe;function vM({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){if(i.code.es5)e.func(t,J._`${re.default.data}, ${re.default.valCxt}`,n.$async,()=>{e.code(J._`"use strict"; ${gM(r,i)}`),fRe(e,i),e.code(s)});else e.func(t,J._`${re.default.data}, ${dRe(i)}`,n.$async,()=>e.code(gM(r,i)).code(s))}function dRe(e){return J._`{${re.default.instancePath}="", ${re.default.parentData}, ${re.default.parentDataProperty}, ${re.default.rootData}=${re.default.data}${e.dynamicRef?J._`, ${re.default.dynamicAnchors}={}`:J.nil}}={}`}function fRe(e,t){e.if(re.default.valCxt,()=>{if(e.var(re.default.instancePath,J._`${re.default.valCxt}.${re.default.instancePath}`),e.var(re.default.parentData,J._`${re.default.valCxt}.${re.default.parentData}`),e.var(re.default.parentDataProperty,J._`${re.default.valCxt}.${re.default.parentDataProperty}`),e.var(re.default.rootData,J._`${re.default.valCxt}.${re.default.rootData}`),t.dynamicRef)e.var(re.default.dynamicAnchors,J._`${re.default.valCxt}.${re.default.dynamicAnchors}`)},()=>{if(e.var(re.default.instancePath,J._`""`),e.var(re.default.parentData,J._`undefined`),e.var(re.default.parentDataProperty,J._`undefined`),e.var(re.default.rootData,re.default.data),t.dynamicRef)e.var(re.default.dynamicAnchors,J._`{}`)})}function pRe(e){let{schema:t,opts:r,gen:n}=e;vM(e,()=>{if(r.$comment&&t.$comment)SM(e);if(xRe(e),n.let(re.default.vErrors,null),n.let(re.default.errors,0),r.unevaluated)mRe(e);EM(e),_Re(e)});return}function mRe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",J._`${r}.evaluated`),t.if(J._`${e.evaluated}.dynamicProps`,()=>t.assign(J._`${e.evaluated}.props`,J._`undefined`)),t.if(J._`${e.evaluated}.dynamicItems`,()=>t.assign(J._`${e.evaluated}.items`,J._`undefined`))}function gM(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?J._`/*# sourceURL=${r} */`:J.nil}function hRe(e,t){if(DM(e)){if(wM(e),_M(e)){gRe(e,t);return}}(0,bM.boolOrEmptySchema)(e,t)}function _M({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function DM(e){return typeof e.schema!="boolean"}function gRe(e,t){let{schema:r,gen:n,opts:i}=e;if(i.$comment&&r.$comment)SM(e);bRe(e),vRe(e);let s=n.const("_errs",re.default.errors);EM(e,s),n.var(t,J._`${s} === ${re.default.errors}`)}function wM(e){(0,$i.checkUnknownRules)(e),yRe(e)}function EM(e,t){if(e.opts.jtd)return yM(e,[],!1,t);let r=(0,hM.getSchemaTypes)(e.schema),n=(0,hM.coerceAndCheckDataType)(e,r);yM(e,r,!n,t)}function yRe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;if(t.$ref&&n.ignoreKeywordsWithRef&&(0,$i.schemaHasRulesButRef)(t,i.RULES))i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function xRe(e){let{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema)(0,$i.checkStrictMode)(e,"default is ignored in the schema root")}function bRe(e){let t=e.schema[e.opts.schemaId];if(t)e.baseId=(0,uRe.resolveUrl)(e.opts.uriResolver,e.baseId,t)}function vRe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function SM({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)e.code(J._`${re.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){let o=J.str`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(J._`${re.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function _Re(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;if(r.$async)t.if(J._`${re.default.errors} === 0`,()=>t.return(re.default.data),()=>t.throw(J._`new ${i}(${re.default.vErrors})`));else{if(t.assign(J._`${n}.errors`,re.default.vErrors),s.unevaluated)DRe(e);t.return(J._`${re.default.errors} === 0`)}}function DRe({gen:e,evaluated:t,props:r,items:n}){if(r instanceof J.Name)e.assign(J._`${t}.props`,r);if(n instanceof J.Name)e.assign(J._`${t}.items`,n)}function yM(e,t,r,n){let{gen:i,schema:s,data:o,allErrors:a,opts:c,self:l}=e,{RULES:d}=l;if(s.$ref&&(c.ignoreKeywordsWithRef||!(0,$i.schemaHasRulesButRef)(s,d))){i.block(()=>CM(e,"$ref",d.all.$ref.definition));return}if(!c.jtd)wRe(e,t);i.block(()=>{for(let m of d.rules)f(m);f(d.post)});function f(m){if(!(0,l_.shouldUseGroup)(s,m))return;if(m.type){if(i.if((0,q0.checkDataType)(m.type,o,c.strictNumbers)),xM(e,m),t.length===1&&t[0]===m.type&&r)i.else(),(0,q0.reportTypeError)(e);i.endIf()}else xM(e,m);if(!a)i.if(J._`${re.default.errors} === ${n||0}`)}}function xM(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;if(i)(0,cRe.assignDefaults)(e,t.type);r.block(()=>{for(let s of t.rules)if((0,l_.shouldUseRule)(n,s))CM(e,s.keyword,s.definition,t.type)})}function wRe(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;if(ERe(e,t),!e.opts.allowUnionTypes)SRe(e,t);$Re(e,e.dataTypes)}function ERe(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach((r)=>{if(!$M(e.dataTypes,r))d_(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),FRe(e,t)}function SRe(e,t){if(t.length>1&&!(t.length===2&&t.includes("null")))d_(e,"use allowUnionTypes to allow union type keyword")}function $Re(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,l_.shouldUseRule)(e.schema,i)){let{type:s}=i.definition;if(s.length&&!s.some((o)=>CRe(t,o)))d_(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function CRe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function $M(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function FRe(e,t){let r=[];for(let n of e.dataTypes)if($M(t,n))r.push(n);else if(t.includes("integer")&&n==="number")r.push("integer");e.dataTypes=r}function d_(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,$i.checkStrictMode)(e,t,e.opts.strictTypes)}class f_{constructor(e,t,r){if((0,Ul.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$i.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",FM(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ul.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);if("code"in t?t.trackErrors:t.errors!==!1)this.errsCount=e.gen.const("_errs",re.default.errors)}result(e,t,r){this.failResult((0,J.not)(e),t,r)}failResult(e,t,r){if(this.gen.if(e),r)r();else this.error();if(t){if(this.gen.else(),t(),this.allErrors)this.gen.endIf()}else if(this.allErrors)this.gen.endIf();else this.gen.else()}pass(e,t){this.failResult((0,J.not)(e),void 0,t)}fail(e){if(e===void 0){if(this.error(),!this.allErrors)this.gen.if(!1);return}if(this.gen.if(e),this.error(),this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail(J._`${t} !== undefined && (${(0,J.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?Ll.reportExtraError:Ll.reportError)(this,this.def.error,t)}$dataError(){(0,Ll.reportError)(this,this.def.$dataError||Ll.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,Ll.resetErrorsCount)(this.gen,this.errsCount)}ok(e){if(!this.allErrors)this.gen.if(e)}setParams(e,t){if(t)Object.assign(this.params,e);else this.params=e}block$data(e,t,r=J.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=J.nil,t=J.nil){if(!this.$data)return;let{gen:r,schemaCode:n,schemaType:i,def:s}=this;if(r.if((0,J.or)(J._`${n} === undefined`,t)),e!==J.nil)r.assign(e,!0);if(i.length||s.validateSchema){if(r.elseIf(this.invalid$data()),this.$dataError(),e!==J.nil)r.assign(e,!1)}r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,J.or)(s(),o());function s(){if(r.length){if(!(t instanceof J.Name))throw Error("ajv implementation error");let a=Array.isArray(r)?r:[r];return J._`${(0,q0.checkDataTypes)(a,t,i.opts.strictNumbers,q0.DataType.Wrong)}`}return J.nil}function o(){if(n.validateSchema){let a=e.scopeValue("validate$data",{ref:n.validateSchema});return J._`!${a}(${t})`}return J.nil}}subschema(e,t){let r=(0,u_.getSubschema)(this.it,e);(0,u_.extendSubschemaData)(r,this.it,e),(0,u_.extendSubschemaMode)(r,e);let n={...this.it,...r,items:void 0,props:void 0};return hRe(n,t),n}mergeEvaluated(e,t){let{it:r,gen:n}=this;if(!r.opts.unevaluated)return;if(r.props!==!0&&e.props!==void 0)r.props=$i.mergeEvaluated.props(n,e.props,r.props,t);if(r.items!==!0&&e.items!==void 0)r.items=$i.mergeEvaluated.items(n,e.items,r.items,t)}mergeValidEvaluated(e,t){let{it:r,gen:n}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return n.if(t,()=>this.mergeEvaluated(e,J.Name)),!0}}RM.KeywordCxt=f_;function CM(e,t,r,n){let i=new f_(e,r,t);if("code"in r)r.code(i,n);else if(i.$data&&r.validate)(0,Ul.funcKeywordCode)(i,r);else if("macro"in r)(0,Ul.macroKeywordCode)(i,r);else if(r.compile||r.validate)(0,Ul.funcKeywordCode)(i,r)}var RRe=/^\/(?:[^~]|~0|~1)*$/,ORe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function FM(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(e==="")return re.default.rootData;if(e[0]==="/"){if(!RRe.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,s=re.default.rootData}else{let l=ORe.exec(e);if(!l)throw Error(`Invalid JSON-pointer: ${e}`);let d=+l[1];if(i=l[2],i==="#"){if(d>=t)throw Error(c("property/index",d));return n[t-d]}if(d>t)throw Error(c("data",d));if(s=r[t-d],!i)return s}let o=s,a=i.split("/");for(let l of a)if(l)s=J._`${s}${(0,J.getProperty)((0,$i.unescapeJsonPointer)(l))}`,o=J._`${o} && ${s}`;return o;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}RM.getData=FM});var j0=h(function(kM){Object.defineProperty(kM,"__esModule",{value:!0});class AM extends Error{constructor(e){super("validation failed");this.errors=e,this.ajv=this.validation=!0}}kM.default=AM});var zl=h(function(IM){Object.defineProperty(IM,"__esModule",{value:!0});var p_=Bl();class PM extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`);this.missingRef=(0,p_.resolveUrl)(e,t,r),this.missingSchema=(0,p_.normalizeId)((0,p_.getFullPath)(e,this.missingRef))}}IM.default=PM});var B0=h(function(qM){Object.defineProperty(qM,"__esModule",{value:!0});qM.resolveSchema=qM.getCompilingSchema=qM.resolveRef=qM.compileSchema=qM.SchemaEnv=void 0;var pn=me(),TRe=j0(),wo=Si(),mn=Bl(),TM=Ie(),NRe=Vl();class Hl{constructor(e){var t;this.refs={},this.dynamicAnchors={};let r;if(typeof e.schema=="object")r=e.schema;this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,mn.normalizeId)(r===null||r===void 0?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r===null||r===void 0?void 0:r.$async,this.refs={}}}qM.SchemaEnv=Hl;function h_(e){let t=NM.call(this,e);if(t)return t;let r=(0,mn.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,o=new pn.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),a;if(e.$async)a=o.scopeValue("Error",{ref:TRe.default,code:pn._`require("ajv/dist/runtime/validation_error").default`});let c=o.scopeName("validate");e.validateName=c;let l={gen:o,allErrors:this.opts.allErrors,data:wo.default.data,parentData:wo.default.parentData,parentDataProperty:wo.default.parentDataProperty,dataNames:[wo.default.data],dataPathArr:[pn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,pn.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:pn.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:pn._`""`,opts:this.opts,self:this},d;try{this._compilations.add(e),(0,NRe.validateFunctionCode)(l),o.optimize(this.opts.code.optimize);let f=o.toString();if(d=`${o.scopeRefs(wo.default.scope)}return ${f}`,this.opts.code.process)d=this.opts.code.process(d,e);let p=Function(`${wo.default.self}`,`${wo.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async)p.$async=!0;if(this.opts.code.source===!0)p.source={validateName:c,validateCode:f,scopeValues:o._values};if(this.opts.unevaluated){let{props:g,items:y}=l;if(p.evaluated={props:g instanceof pn.Name?void 0:g,items:y instanceof pn.Name?void 0:y,dynamicProps:g instanceof pn.Name,dynamicItems:y instanceof pn.Name},p.source)p.source.evaluated=(0,pn.stringify)(p.evaluated)}return e.validate=p,e}catch(f){if(delete e.validate,delete e.validateName,d)this.logger.error("Error compiling schema, function code:",d);throw f}finally{this._compilations.delete(e)}}qM.compileSchema=h_;function qRe(e,t,r){var n;r=(0,mn.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let s=BRe.call(this,e,r);if(s===void 0){let o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;if(o)s=new Hl({schema:o,schemaId:a,root:e,baseId:t})}if(s===void 0)return;return e.refs[r]=jRe.call(this,s)}qM.resolveRef=qRe;function jRe(e){if((0,mn.inlineRef)(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:h_.call(this,e)}function NM(e){for(let t of this._compilations)if(MRe(t,e))return t}qM.getCompilingSchema=NM;function MRe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function BRe(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||M0.call(this,e,t)}function M0(e,t){let r=this.opts.uriResolver.parse(t),n=(0,mn._getFullPath)(this.opts.uriResolver,r),i=(0,mn.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return m_.call(this,r,e);let s=(0,mn.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){let a=M0.call(this,e,o);if(typeof(a===null||a===void 0?void 0:a.schema)!=="object")return;return m_.call(this,r,a)}if(typeof(o===null||o===void 0?void 0:o.schema)!=="object")return;if(!o.validate)h_.call(this,o);if(s===(0,mn.normalizeId)(t)){let{schema:a}=o,{schemaId:c}=this.opts,l=a[c];if(l)i=(0,mn.resolveUrl)(this.opts.uriResolver,i,l);return new Hl({schema:a,schemaId:c,root:e,baseId:i})}return m_.call(this,r,o)}qM.resolveSchema=M0;var LRe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m_(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;let c=r[(0,TM.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r==="object"&&r[this.opts.schemaId];if(!LRe.has(a)&&l)t=(0,mn.resolveUrl)(this.opts.uriResolver,t,l)}let s;if(typeof r!="boolean"&&r.$ref&&!(0,TM.schemaHasRulesButRef)(r,this.RULES)){let a=(0,mn.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=M0.call(this,n,a)}let{schemaId:o}=this.opts;if(s=s||new Hl({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s;return}});var MM=h(function(cYe,WRe){WRe.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 UM=h(function(LM){Object.defineProperty(LM,"__esModule",{value:!0});var BM=xv();BM.code='require("ajv/dist/runtime/uri").default';LM.default=BM});var JM=h(function(Ci){Object.defineProperty(Ci,"__esModule",{value:!0});Ci.CodeGen=Ci.Name=Ci.nil=Ci.stringify=Ci.str=Ci._=Ci.KeywordCxt=void 0;var KRe=Vl();Object.defineProperty(Ci,"KeywordCxt",{enumerable:!0,get:function(){return KRe.KeywordCxt}});var fc=me();Object.defineProperty(Ci,"_",{enumerable:!0,get:function(){return fc._}});Object.defineProperty(Ci,"str",{enumerable:!0,get:function(){return fc.str}});Object.defineProperty(Ci,"stringify",{enumerable:!0,get:function(){return fc.stringify}});Object.defineProperty(Ci,"nil",{enumerable:!0,get:function(){return fc.nil}});Object.defineProperty(Ci,"Name",{enumerable:!0,get:function(){return fc.Name}});Object.defineProperty(Ci,"CodeGen",{enumerable:!0,get:function(){return fc.CodeGen}});var YRe=j0(),GM=zl(),JRe=e_(),Wl=B0(),XRe=me(),Gl=Bl(),L0=Ml(),y_=Ie(),VM=MM(),QRe=UM(),KM=(e,t)=>new RegExp(e,t);KM.code="new RegExp";var ZRe=["removeAdditional","useDefaults","coerceTypes"],eOe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),tOe={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."},rOe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},zM=200;function nOe(e){var t,r,n,i,s,o,a,c,l,d,f,m,p,g,y,x,v,_,S,C,D,O,F,M,k;let j=e.strict,Z=(t=e.code)===null||t===void 0?void 0:t.optimize,_e=Z===!0||Z===void 0?1:Z||0,qe=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:KM,Me=(i=e.uriResolver)!==null&&i!==void 0?i:QRe.default;return{strictSchema:(o=(s=e.strictSchema)!==null&&s!==void 0?s:j)!==null&&o!==void 0?o:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:j)!==null&&c!==void 0?c:!0,strictTypes:(d=(l=e.strictTypes)!==null&&l!==void 0?l:j)!==null&&d!==void 0?d:"log",strictTuples:(m=(f=e.strictTuples)!==null&&f!==void 0?f:j)!==null&&m!==void 0?m:"log",strictRequired:(g=(p=e.strictRequired)!==null&&p!==void 0?p:j)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:_e,regExp:qe}:{optimize:_e,regExp:qe},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:zM,loopEnum:(x=e.loopEnum)!==null&&x!==void 0?x:zM,meta:(v=e.meta)!==null&&v!==void 0?v:!0,messages:(_=e.messages)!==null&&_!==void 0?_:!0,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(C=e.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(D=e.addUsedSchema)!==null&&D!==void 0?D:!0,validateSchema:(O=e.validateSchema)!==null&&O!==void 0?O:!0,validateFormats:(F=e.validateFormats)!==null&&F!==void 0?F:!0,unicodeRegExp:(M=e.unicodeRegExp)!==null&&M!==void 0?M:!0,int32range:(k=e.int32range)!==null&&k!==void 0?k:!0,uriResolver:Me}}class U0{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...nOe(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new XRe.ValueScope({scope:{},prefixes:eOe,es5:t,lines:r}),this.logger=uOe(e.logger);let n=e.validateFormats;if(e.validateFormats=!1,this.RULES=(0,JRe.getRules)(),HM.call(this,tOe,e,"NOT SUPPORTED"),HM.call(this,rOe,e,"DEPRECATED","warn"),this._metaOpts=aOe.call(this),e.formats)sOe.call(this);if(this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords)oOe.call(this,e.keywords);if(typeof e.meta=="object")this.addMetaSchema(e.meta);iOe.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,n=VM;if(r==="id")n={...VM},n.id=n.$id,delete n.$id;if(t&&e)this.addMetaSchema(n,n[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let n=r(t);if(!("$async"in r))this.errors=r.errors;return n}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(l,d){await i.call(this,l.$schema);let f=this._addSchema(l,d);return f.validate||s.call(this,f)}async function i(l){if(l&&!this.getSchema(l))await n.call(this,{$ref:l},!0)}async function s(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof GM.default))throw d;return o.call(this,d),await a.call(this,d.missingSchema),s.call(this,l)}}function o({missingSchema:l,missingRef:d}){if(this.refs[l])throw Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function a(l){let d=await c.call(this,l);if(!this.refs[l])await i.call(this,d.$schema);if(!this.refs[l])this.addSchema(d,l,t)}async function c(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=r(l))}finally{delete this._loading[l]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,n);return this}let i;if(typeof e==="object"){let{schemaId:s}=this.opts;if(i=e[s],i!==void 0&&typeof i!="string")throw Error(`schema ${s} must be string`)}return t=(0,Gl.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(r,e);if(!n&&t){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw Error(i)}return n}getSchema(e){let t;while(typeof(t=WM.call(this,e))=="string")e=t;if(t===void 0){let{schemaId:r}=this.opts,n=new Wl.SchemaEnv({schema:{},schemaId:r});if(t=Wl.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=WM.call(this,e);if(typeof t=="object")this._cache.delete(t.schema);return delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let r=e[this.opts.schemaId];if(r)r=(0,Gl.normalizeId)(r),delete this.schemas[r],delete this.refs[r];return this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if(typeof e=="string"){if(r=e,typeof t=="object")this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r}else if(typeof e=="object"&&t===void 0){if(t=e,r=t.keyword,Array.isArray(r)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(dOe.call(this,r,t),!t)return(0,y_.eachItem)(r,(i)=>g_.call(this,i)),this;pOe.call(this,t);let n={...t,type:(0,L0.getJSONTypes)(t.type),schemaType:(0,L0.getJSONTypes)(t.schemaType)};return(0,y_.eachItem)(r,n.type.length===0?(i)=>g_.call(this,i,n):(i)=>n.type.forEach((s)=>g_.call(this,i,n,s))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let r of t.rules){let n=r.rules.findIndex((i)=>i.keyword===e);if(n>=0)r.rules.splice(n,1)}return this}addFormat(e,t){if(typeof t=="string")t=new RegExp(t);return this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){if(!e||e.length===0)return"No errors";return e.map((n)=>`${r}${n.instancePath} ${n.message}`).reduce((n,i)=>n+t+i)}$dataMetaSchema(e,t){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of t){let i=n.split("/").slice(1),s=e;for(let o of i)s=s[o];for(let o in r){let a=r[o];if(typeof a!="object")continue;let{$data:c}=a.definition,l=s[o];if(c&&l)s[o]=YM(l)}}return e}_removeAllSchemas(e,t){for(let r in e){let n=e[r];if(!t||t.test(r)){if(typeof n=="string")delete e[r];else if(n&&!n.meta)this._cache.delete(n.schema),delete e[r]}}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:o}=this.opts;if(typeof e=="object")s=e[o];else if(this.opts.jtd)throw Error("schema must be object");else if(typeof e!="boolean")throw Error("schema must be object or boolean");let a=this._cache.get(e);if(a!==void 0)return a;r=(0,Gl.normalizeId)(s||r);let c=Gl.getSchemaRefs.call(this,e,r);if(a=new Wl.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),i&&!r.startsWith("#")){if(r)this._checkUnique(r);this.refs[r]=a}if(n)this.validateSchema(e,!0);return a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta)this._compileMetaSchema(e);else Wl.compileSchema.call(this,e);if(!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Wl.compileSchema.call(this,e)}finally{this.opts=t}}}U0.ValidationError=YRe.default;U0.MissingRefError=GM.default;Ci.default=U0;function HM(e,t,r,n="error"){for(let i in e){let s=i;if(s in t)this.logger[n](`${r}: option ${i}. ${e[s]}`)}}function WM(e){return e=(0,Gl.normalizeId)(e),this.schemas[e]||this.refs[e]}function iOe(){let e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function sOe(){for(let e in this.opts.formats){let t=this.opts.formats[e];if(t)this.addFormat(e,t)}}function oOe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}function aOe(){let e={...this.opts};for(let t of ZRe)delete e[t];return e}var cOe={log(){},warn(){},error(){}};function uOe(e){if(e===!1)return cOe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}var lOe=/^[a-z_$][a-z0-9_$:-]*$/i;function dOe(e,t){let{RULES:r}=this;if((0,y_.eachItem)(e,(n)=>{if(r.keywords[n])throw Error(`Keyword ${n} is already defined`);if(!lOe.test(n))throw Error(`Keyword ${n} has invalid name`)}),!t)return;if(t.$data&&!(("code"in t)||("validate"in t)))throw Error('$data keyword must have "code" or "validate" function')}function g_(e,t,r){var n;let i=t===null||t===void 0?void 0:t.post;if(r&&i)throw Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,o=i?s.post:s.rules.find(({type:c})=>c===r);if(!o)o={type:r,rules:[]},s.rules.push(o);if(s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,L0.getJSONTypes)(t.type),schemaType:(0,L0.getJSONTypes)(t.schemaType)}};if(t.before)fOe.call(this,o,a,t.before);else o.rules.push(a);s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach((c)=>this.addKeyword(c))}function fOe(e,t,r){let n=e.rules.findIndex((i)=>i.keyword===r);if(n>=0)e.rules.splice(n,0,t);else e.rules.push(t),this.logger.warn(`rule ${r} is not defined`)}function pOe(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=YM(t);e.validateSchema=this.compile(t,!0)}var mOe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function YM(e){return{anyOf:[e,mOe]}}});var QM=h(function(XM){Object.defineProperty(XM,"__esModule",{value:!0});var yOe={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};XM.default=yOe});var iB=h(function(rB){Object.defineProperty(rB,"__esModule",{value:!0});rB.callRef=rB.getValidate=void 0;var bOe=zl(),ZM=zr(),gr=me(),pc=Si(),eB=B0(),V0=Ie(),vOe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:o,opts:a,self:c}=n,{root:l}=s;if((r==="#"||r==="#/")&&i===l.baseId)return f();let d=eB.resolveRef.call(c,l,i,r);if(d===void 0)throw new bOe.default(n.opts.uriResolver,i,r);if(d instanceof eB.SchemaEnv)return m(d);return p(d);function f(){if(s===l)return z0(e,o,s,s.$async);let g=t.scopeValue("root",{ref:l});return z0(e,gr._`${g}.validate`,l,l.$async)}function m(g){let y=tB(e,g);z0(e,y,g,g.$async)}function p(g){let y=t.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,gr.stringify)(g)}:{ref:g}),x=t.name("valid"),v=e.subschema({schema:g,dataTypes:[],schemaPath:gr.nil,topSchemaRef:y,errSchemaPath:r},x);e.mergeEvaluated(v),e.ok(x)}}};function tB(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):gr._`${r.scopeValue("wrapper",{ref:t})}.validate`}rB.getValidate=tB;function z0(e,t,r,n){let{gen:i,it:s}=e,{allErrors:o,schemaEnv:a,opts:c}=s,l=c.passContext?pc.default.this:gr.nil;if(n)d();else f();function d(){if(!a.$async)throw Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{if(i.code(gr._`await ${(0,ZM.callValidateCode)(e,t,l)}`),p(t),!o)i.assign(g,!0)},(y)=>{if(i.if(gr._`!(${y} instanceof ${s.ValidationError})`,()=>i.throw(y)),m(y),!o)i.assign(g,!1)}),e.ok(g)}function f(){e.result((0,ZM.callValidateCode)(e,t,l),()=>p(t),()=>m(t))}function m(g){let y=gr._`${g}.errors`;i.assign(pc.default.vErrors,gr._`${pc.default.vErrors} === null ? ${y} : ${pc.default.vErrors}.concat(${y})`),i.assign(pc.default.errors,gr._`${pc.default.vErrors}.length`)}function p(g){var y;if(!s.opts.unevaluated)return;let x=(y=r===null||r===void 0?void 0:r.validate)===null||y===void 0?void 0:y.evaluated;if(s.props!==!0)if(x&&!x.dynamicProps){if(x.props!==void 0)s.props=V0.mergeEvaluated.props(i,x.props,s.props)}else{let v=i.var("props",gr._`${g}.evaluated.props`);s.props=V0.mergeEvaluated.props(i,v,s.props,gr.Name)}if(s.items!==!0)if(x&&!x.dynamicItems){if(x.items!==void 0)s.items=V0.mergeEvaluated.items(i,x.items,s.items)}else{let v=i.var("items",gr._`${g}.evaluated.items`);s.items=V0.mergeEvaluated.items(i,v,s.items,gr.Name)}}}rB.callRef=z0;rB.default=vOe});var oB=h(function(sB){Object.defineProperty(sB,"__esModule",{value:!0});var wOe=QM(),EOe=iB(),SOe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",wOe.default,EOe.default];sB.default=SOe});var cB=h(function(aB){Object.defineProperty(aB,"__esModule",{value:!0});var H0=me(),Fs=H0.operators,W0={maximum:{okStr:"<=",ok:Fs.LTE,fail:Fs.GT},minimum:{okStr:">=",ok:Fs.GTE,fail:Fs.LT},exclusiveMaximum:{okStr:"<",ok:Fs.LT,fail:Fs.GTE},exclusiveMinimum:{okStr:">",ok:Fs.GT,fail:Fs.LTE}},COe={message:({keyword:e,schemaCode:t})=>H0.str`must be ${W0[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>H0._`{comparison: ${W0[e].okStr}, limit: ${t}}`},FOe={keyword:Object.keys(W0),type:"number",schemaType:"number",$data:!0,error:COe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data(H0._`${r} ${W0[t].fail} ${n} || isNaN(${r})`)}};aB.default=FOe});var lB=h(function(uB){Object.defineProperty(uB,"__esModule",{value:!0});var Kl=me(),OOe={message:({schemaCode:e})=>Kl.str`must be multiple of ${e}`,params:({schemaCode:e})=>Kl._`{multipleOf: ${e}}`},AOe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:OOe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,o=t.let("res"),a=s?Kl._`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:Kl._`${o} !== parseInt(${o})`;e.fail$data(Kl._`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};uB.default=AOe});var pB=h(function(fB){Object.defineProperty(fB,"__esModule",{value:!0});function dB(e){let t=e.length,r=0,n=0,i;while(n<t)if(r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t){if(i=e.charCodeAt(n),(i&64512)===56320)n++}return r}fB.default=dB;dB.code='require("ajv/dist/runtime/ucs2length").default'});var hB=h(function(mB){Object.defineProperty(mB,"__esModule",{value:!0});var Eo=me(),IOe=Ie(),TOe=pB(),NOe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return Eo.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>Eo._`{limit: ${e}}`},qOe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:NOe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,s=t==="maxLength"?Eo.operators.GT:Eo.operators.LT,o=i.opts.unicode===!1?Eo._`${r}.length`:Eo._`${(0,IOe.useFunc)(e.gen,TOe.default)}(${r})`;e.fail$data(Eo._`${o} ${s} ${n}`)}};mB.default=qOe});var yB=h(function(gB){Object.defineProperty(gB,"__esModule",{value:!0});var MOe=zr(),G0=me(),BOe={message:({schemaCode:e})=>G0.str`must match pattern "${e}"`,params:({schemaCode:e})=>G0._`{pattern: ${e}}`},LOe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:BOe,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,o=s.opts.unicodeRegExp?"u":"",a=r?G0._`(new RegExp(${i}, ${o}))`:(0,MOe.usePattern)(e,n);e.fail$data(G0._`!${a}.test(${t})`)}};gB.default=LOe});var bB=h(function(xB){Object.defineProperty(xB,"__esModule",{value:!0});var Yl=me(),VOe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return Yl.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>Yl._`{limit: ${e}}`},zOe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:VOe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Yl.operators.GT:Yl.operators.LT;e.fail$data(Yl._`Object.keys(${r}).length ${i} ${n}`)}};xB.default=zOe});var _B=h(function(vB){Object.defineProperty(vB,"__esModule",{value:!0});var Jl=zr(),Xl=me(),WOe=Ie(),GOe={message:({params:{missingProperty:e}})=>Xl.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>Xl._`{missingProperty: ${e}}`},KOe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:GOe,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;let c=r.length>=a.loopRequired;if(o.allErrors)l();else d();if(a.strictRequired){let p=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if((p===null||p===void 0?void 0:p[y])===void 0&&!g.has(y)){let x=o.schemaEnv.baseId+o.errSchemaPath,v=`required property "${y}" is not defined at "${x}" (strictRequired)`;(0,WOe.checkStrictMode)(o,v,o.opts.strictRequired)}}function l(){if(c||s)e.block$data(Xl.nil,f);else for(let p of r)(0,Jl.checkReportMissingProp)(e,p)}function d(){let p=t.let("missing");if(c||s){let g=t.let("valid",!0);e.block$data(g,()=>m(p,g)),e.ok(g)}else t.if((0,Jl.checkMissingProp)(e,r,p)),(0,Jl.reportMissingProp)(e,p),t.else()}function f(){t.forOf("prop",n,(p)=>{e.setParams({missingProperty:p}),t.if((0,Jl.noPropertyInData)(t,i,p,a.ownProperties),()=>e.error())})}function m(p,g){e.setParams({missingProperty:p}),t.forOf(p,n,()=>{t.assign(g,(0,Jl.propertyInData)(t,i,p,a.ownProperties)),t.if((0,Xl.not)(g),()=>{e.error(),t.break()})},Xl.nil)}}};vB.default=KOe});var wB=h(function(DB){Object.defineProperty(DB,"__esModule",{value:!0});var Ql=me(),JOe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return Ql.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>Ql._`{limit: ${e}}`},XOe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:JOe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Ql.operators.GT:Ql.operators.LT;e.fail$data(Ql._`${r}.length ${i} ${n}`)}};DB.default=XOe});var K0=h(function(SB){Object.defineProperty(SB,"__esModule",{value:!0});var EB=gl();EB.code='require("ajv/dist/runtime/equal").default';SB.default=EB});var CB=h(function($B){Object.defineProperty($B,"__esModule",{value:!0});var x_=Ml(),At=me(),eAe=Ie(),tAe=K0(),rAe={message:({params:{i:e,j:t}})=>At.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>At._`{i: ${e}, j: ${t}}`},nAe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:rAe,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:o,it:a}=e;if(!n&&!i)return;let c=t.let("valid"),l=s.items?(0,x_.getSchemaTypes)(s.items):[];e.block$data(c,d,At._`${o} === false`),e.ok(c);function d(){let g=t.let("i",At._`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if(At._`${g} > 1`,()=>(f()?m:p)(g,y))}function f(){return l.length>0&&!l.some((g)=>g==="object"||g==="array")}function m(g,y){let x=t.name("item"),v=(0,x_.checkDataTypes)(l,x,a.opts.strictNumbers,x_.DataType.Wrong),_=t.const("indices",At._`{}`);t.for(At._`;${g}--;`,()=>{if(t.let(x,At._`${r}[${g}]`),t.if(v,At._`continue`),l.length>1)t.if(At._`typeof ${x} == "string"`,At._`${x} += "_"`);t.if(At._`typeof ${_}[${x}] == "number"`,()=>{t.assign(y,At._`${_}[${x}]`),e.error(),t.assign(c,!1).break()}).code(At._`${_}[${x}] = ${g}`)})}function p(g,y){let x=(0,eAe.useFunc)(t,tAe.default),v=t.name("outer");t.label(v).for(At._`;${g}--;`,()=>t.for(At._`${y} = ${g}; ${y}--;`,()=>t.if(At._`${x}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(v)})))}}};$B.default=nAe});var RB=h(function(FB){Object.defineProperty(FB,"__esModule",{value:!0});var b_=me(),sAe=Ie(),oAe=K0(),aAe={message:"must be equal to constant",params:({schemaCode:e})=>b_._`{allowedValue: ${e}}`},cAe={keyword:"const",$data:!0,error:aAe,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;if(n||s&&typeof s=="object")e.fail$data(b_._`!${(0,sAe.useFunc)(t,oAe.default)}(${r}, ${i})`);else e.fail(b_._`${s} !== ${r}`)}};FB.default=cAe});var AB=h(function(OB){Object.defineProperty(OB,"__esModule",{value:!0});var Zl=me(),lAe=Ie(),dAe=K0(),fAe={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>Zl._`{allowedValues: ${e}}`},pAe={keyword:"enum",schemaType:"array",$data:!0,error:fAe,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e;if(!n&&i.length===0)throw Error("enum must have non-empty array");let a=i.length>=o.opts.loopEnum,c,l=()=>c!==null&&c!==void 0?c:c=(0,lAe.useFunc)(t,dAe.default),d;if(a||n)d=t.let("valid"),e.block$data(d,f);else{if(!Array.isArray(i))throw Error("ajv implementation error");let p=t.const("vSchema",s);d=(0,Zl.or)(...i.map((g,y)=>m(p,y)))}e.pass(d);function f(){t.assign(d,!1),t.forOf("v",s,(p)=>t.if(Zl._`${l()}(${r}, ${p})`,()=>t.assign(d,!0).break()))}function m(p,g){let y=i[g];return typeof y==="object"&&y!==null?Zl._`${l()}(${r}, ${p}[${g}])`:Zl._`${r} === ${y}`}}};OB.default=pAe});var PB=h(function(kB){Object.defineProperty(kB,"__esModule",{value:!0});var hAe=cB(),gAe=lB(),yAe=hB(),xAe=yB(),bAe=bB(),vAe=_B(),_Ae=wB(),DAe=CB(),wAe=RB(),EAe=AB(),SAe=[hAe.default,gAe.default,yAe.default,xAe.default,bAe.default,vAe.default,_Ae.default,DAe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},wAe.default,EAe.default];kB.default=SAe});var __=h(function(TB){Object.defineProperty(TB,"__esModule",{value:!0});TB.validateAdditionalItems=void 0;var So=me(),v_=Ie(),CAe={message:({params:{len:e}})=>So.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>So._`{limit: ${e}}`},FAe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:CAe,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,v_.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}IB(e,n)}};function IB(e,t){let{gen:r,schema:n,data:i,keyword:s,it:o}=e;o.items=!0;let a=r.const("len",So._`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass(So._`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,v_.alwaysValidSchema)(o,n)){let l=r.var("valid",So._`${a} <= ${t.length}`);r.if((0,So.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,a,(d)=>{if(e.subschema({keyword:s,dataProp:d,dataPropType:v_.Type.Num},l),!o.allErrors)r.if((0,So.not)(l),()=>r.break())})}}TB.validateAdditionalItems=IB;TB.default=FAe});var D_=h(function(MB){Object.defineProperty(MB,"__esModule",{value:!0});MB.validateTuple=void 0;var qB=me(),Y0=Ie(),OAe=zr(),AAe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return jB(e,"additionalItems",t);if(r.items=!0,(0,Y0.alwaysValidSchema)(r,t))return;e.ok((0,OAe.validateArray)(e))}};function jB(e,t,r=e.schema){let{gen:n,parentSchema:i,data:s,keyword:o,it:a}=e;if(d(i),a.opts.unevaluated&&r.length&&a.items!==!0)a.items=Y0.mergeEvaluated.items(n,r.length,a.items);let c=n.name("valid"),l=n.const("len",qB._`${s}.length`);r.forEach((f,m)=>{if((0,Y0.alwaysValidSchema)(a,f))return;n.if(qB._`${l} > ${m}`,()=>e.subschema({keyword:o,schemaProp:m,dataProp:m},c)),e.ok(c)});function d(f){let{opts:m,errSchemaPath:p}=a,g=r.length,y=g===f.minItems&&(g===f.maxItems||f[t]===!1);if(m.strictTuples&&!y){let x=`"${o}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;(0,Y0.checkStrictMode)(a,x,m.strictTuples)}}}MB.validateTuple=jB;MB.default=AAe});var UB=h(function(LB){Object.defineProperty(LB,"__esModule",{value:!0});var PAe=D_(),IAe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:(e)=>(0,PAe.validateTuple)(e,"items")};LB.default=IAe});var HB=h(function(zB){Object.defineProperty(zB,"__esModule",{value:!0});var VB=me(),NAe=Ie(),qAe=zr(),jAe=__(),MAe={message:({params:{len:e}})=>VB.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>VB._`{limit: ${e}}`},BAe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:MAe,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;if(n.items=!0,(0,NAe.alwaysValidSchema)(n,t))return;if(i)(0,jAe.validateAdditionalItems)(e,i);else e.ok((0,qAe.validateArray)(e))}};zB.default=BAe});var GB=h(function(WB){Object.defineProperty(WB,"__esModule",{value:!0});var Hr=me(),J0=Ie(),UAe={message:({params:{min:e,max:t}})=>t===void 0?Hr.str`must contain at least ${e} valid item(s)`:Hr.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?Hr._`{minContains: ${e}}`:Hr._`{minContains: ${e}, maxContains: ${t}}`},VAe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:UAe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e,o,a,{minContains:c,maxContains:l}=n;if(s.opts.next)o=c===void 0?1:c,a=l;else o=1;let d=t.const("len",Hr._`${i}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,J0.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,J0.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,J0.alwaysValidSchema)(s,r)){let y=Hr._`${d} >= ${o}`;if(a!==void 0)y=Hr._`${y} && ${d} <= ${a}`;e.pass(y);return}s.items=!0;let f=t.name("valid");if(a===void 0&&o===1)p(f,()=>t.if(f,()=>t.break()));else if(o===0){if(t.let(f,!0),a!==void 0)t.if(Hr._`${i}.length > 0`,m)}else t.let(f,!1),m();e.result(f,()=>e.reset());function m(){let y=t.name("_valid"),x=t.let("count",0);p(y,()=>t.if(y,()=>g(x)))}function p(y,x){t.forRange("i",0,d,(v)=>{e.subschema({keyword:"contains",dataProp:v,dataPropType:J0.Type.Num,compositeRule:!0},y),x()})}function g(y){if(t.code(Hr._`${y}++`),a===void 0)t.if(Hr._`${y} >= ${o}`,()=>t.assign(f,!0).break());else if(t.if(Hr._`${y} > ${a}`,()=>t.assign(f,!1).break()),o===1)t.assign(f,!0);else t.if(Hr._`${y} >= ${o}`,()=>t.assign(f,!0))}}};WB.default=VAe});var ZB=h(function(JB){Object.defineProperty(JB,"__esModule",{value:!0});JB.validateSchemaDeps=JB.validatePropertyDeps=JB.error=void 0;var w_=me(),HAe=Ie(),ed=zr();JB.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return w_.str`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>w_._`{property: ${e},
|
|
96
96
|
missingProperty: ${n},
|
|
97
97
|
depsCount: ${t},
|
|
98
|
-
deps: ${r}}`};var WAe={keyword:"dependencies",type:"object",schemaType:"object",error:JB.error,code(e){let[t,r]=GAe(e);KB(e,t),YB(e,r)}};function GAe({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}function KB(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let o in t){let a=t[o];if(a.length===0)continue;let c=(0,ed.propertyInData)(r,n,o,i.opts.ownProperties);if(e.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),i.allErrors)r.if(c,()=>{for(let l of a)(0,ed.checkReportMissingProp)(e,l)});else r.if(w_._`${c} && (${(0,ed.checkMissingProp)(e,a,s)})`),(0,ed.reportMissingProp)(e,s),r.else()}}JB.validatePropertyDeps=KB;function YB(e,t=e.schema){let{gen:r,data:n,keyword:i,it:s}=e,o=r.name("valid");for(let a in t){if((0,HAe.alwaysValidSchema)(s,t[a]))continue;r.if((0,ed.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:a},o);e.mergeValidEvaluated(c,o)},()=>r.var(o,!0)),e.ok(o)}}JB.validateSchemaDeps=YB;JB.default=WAe});var rL=h(function(tL){Object.defineProperty(tL,"__esModule",{value:!0});var eL=me(),JAe=Ie(),XAe={message:"property name must be valid",params:({params:e})=>eL._`{propertyName: ${e.propertyName}}`},QAe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:XAe,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,JAe.alwaysValidSchema)(i,r))return;let s=t.name("valid");t.forIn("key",n,(o)=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,eL.not)(s),()=>{if(e.error(!0),!i.allErrors)t.break()})}),e.ok(s)}};tL.default=QAe});var E_=h(function(nL){Object.defineProperty(nL,"__esModule",{value:!0});var X0=zr(),hn=me(),eke=Si(),Q0=Ie(),tke={message:"must NOT have additional properties",params:({params:e})=>hn._`{additionalProperty: ${e.additionalProperty}}`},rke={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:tke,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:o}=e;if(!s)throw Error("ajv implementation error");let{allErrors:a,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,Q0.alwaysValidSchema)(o,r))return;let l=(0,X0.allSchemaProperties)(n.properties),d=(0,X0.allSchemaProperties)(n.patternProperties);f(),e.ok(hn._`${s} === ${eke.default.errors}`);function f(){t.forIn("key",i,(x)=>{if(!l.length&&!d.length)g(x);else t.if(m(x),()=>g(x))})}function m(x){let v;if(l.length>8){let _=(0,Q0.schemaRefOrVal)(o,n.properties,"properties");v=(0,X0.isOwnProperty)(t,_,x)}else if(l.length)v=(0,hn.or)(...l.map((_)=>hn._`${x} === ${_}`));else v=hn.nil;if(d.length)v=(0,hn.or)(v,...d.map((_)=>hn._`${(0,X0.usePattern)(e,_)}.test(${x})`));return(0,hn.not)(v)}function p(x){t.code(hn._`delete ${i}[${x}]`)}function g(x){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(x);return}if(r===!1){if(e.setParams({additionalProperty:x}),e.error(),!a)t.break();return}if(typeof r=="object"&&!(0,Q0.alwaysValidSchema)(o,r)){let v=t.name("valid");if(c.removeAdditional==="failing")y(x,v,!1),t.if((0,hn.not)(v),()=>{e.reset(),p(x)});else if(y(x,v),!a)t.if((0,hn.not)(v),()=>t.break())}}function y(x,v,_){let E={keyword:"additionalProperties",dataProp:x,dataPropType:Q0.Type.Str};if(_===!1)Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(E,v)}}};nL.default=rke});var aL=h(function(oL){Object.defineProperty(oL,"__esModule",{value:!0});var ike=Vl(),iL=zr(),S_=Ie(),sL=E_(),ske={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;if(s.opts.removeAdditional==="all"&&n.additionalProperties===void 0)sL.default.code(new ike.KeywordCxt(s,sL.default,"additionalProperties"));let o=(0,iL.allSchemaProperties)(r);for(let f of o)s.definedProperties.add(f);if(s.opts.unevaluated&&o.length&&s.props!==!0)s.props=S_.mergeEvaluated.props(t,(0,S_.toHash)(o),s.props);let a=o.filter((f)=>!(0,S_.alwaysValidSchema)(s,r[f]));if(a.length===0)return;let c=t.name("valid");for(let f of a){if(l(f))d(f);else{if(t.if((0,iL.propertyInData)(t,i,f,s.opts.ownProperties)),d(f),!s.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(f),e.ok(c)}function l(f){return s.opts.useDefaults&&!s.compositeRule&&r[f].default!==void 0}function d(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};oL.default=ske});var fL=h(function(dL){Object.defineProperty(dL,"__esModule",{value:!0});var cL=zr(),Z0=me(),uL=Ie(),lL=Ie(),ake={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:o}=s,a=(0,cL.allSchemaProperties)(r),c=a.filter((y)=>(0,uL.alwaysValidSchema)(s,r[y]));if(a.length===0||c.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let l=o.strictSchema&&!o.allowMatchingProperties&&i.properties,d=t.name("valid");if(s.props!==!0&&!(s.props instanceof Z0.Name))s.props=(0,lL.evaluatedPropsToName)(t,s.props);let{props:f}=s;m();function m(){for(let y of a){if(l)p(y);if(s.allErrors)g(y);else t.var(d,!0),g(y),t.if(d)}}function p(y){for(let x in l)if(new RegExp(y).test(x))(0,uL.checkStrictMode)(s,`property ${x} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){t.forIn("key",n,(x)=>{t.if(Z0._`${(0,cL.usePattern)(e,y)}.test(${x})`,()=>{let v=c.includes(y);if(!v)e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:x,dataPropType:lL.Type.Str},d);if(s.opts.unevaluated&&f!==!0)t.assign(Z0._`${f}[${x}]`,!0);else if(!v&&!s.allErrors)t.if((0,Z0.not)(d),()=>t.break())})})}}};dL.default=ake});var mL=h(function(pL){Object.defineProperty(pL,"__esModule",{value:!0});var uke=Ie(),lke={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,uke.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};pL.default=lke});var gL=h(function(hL){Object.defineProperty(hL,"__esModule",{value:!0});var fke=zr(),pke={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fke.validateUnion,error:{message:"must match a schema in anyOf"}};hL.default=pke});var xL=h(function(yL){Object.defineProperty(yL,"__esModule",{value:!0});var em=me(),hke=Ie(),gke={message:"must match exactly one schema in oneOf",params:({params:e})=>em._`{passingSchemas: ${e.passing}}`},yke={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:gke,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let s=r,o=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(l),e.result(o,()=>e.reset(),()=>e.error(!0));function l(){s.forEach((d,f)=>{let m;if((0,hke.alwaysValidSchema)(i,d))t.var(c,!0);else m=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c);if(f>0)t.if(em._`${c} && ${o}`).assign(o,!1).assign(a,em._`[${a}, ${f}]`).else();t.if(c,()=>{if(t.assign(o,!0),t.assign(a,f),m)e.mergeEvaluated(m,em.Name)})})}}};yL.default=yke});var vL=h(function(bL){Object.defineProperty(bL,"__esModule",{value:!0});var bke=Ie(),vke={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let i=t.name("valid");r.forEach((s,o)=>{if((0,bke.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:o},i);e.ok(i),e.mergeEvaluated(a)})}};bL.default=vke});var EL=h(function(wL){Object.defineProperty(wL,"__esModule",{value:!0});var tm=me(),DL=Ie(),Dke={message:({params:e})=>tm.str`must match "${e.ifClause}" schema`,params:({params:e})=>tm._`{failingKeyword: ${e.ifClause}}`},wke={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Dke,code(e){let{gen:t,parentSchema:r,it:n}=e;if(r.then===void 0&&r.else===void 0)(0,DL.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=_L(n,"then"),s=_L(n,"else");if(!i&&!s)return;let o=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),i&&s){let d=t.let("ifClause");e.setParams({ifClause:d}),t.if(a,l("then",d),l("else",d))}else if(i)t.if(a,l("then"));else t.if((0,tm.not)(a),l("else"));e.pass(o,()=>e.error(!0));function c(){let d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(d)}function l(d,f){return()=>{let m=e.subschema({keyword:d},a);if(t.assign(o,a),e.mergeValidEvaluated(m,o),f)t.assign(f,tm._`${d}`);else e.setParams({ifClause:d})}}}};function _L(e,t){let r=e.schema[t];return r!==void 0&&!(0,DL.alwaysValidSchema)(e,r)}wL.default=wke});var $L=h(function(SL){Object.defineProperty(SL,"__esModule",{value:!0});var Ske=Ie(),$ke={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)(0,Ske.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};SL.default=$ke});var FL=h(function(CL){Object.defineProperty(CL,"__esModule",{value:!0});var Fke=__(),Rke=UB(),Oke=D_(),Ake=HB(),kke=GB(),Pke=ZB(),Ike=rL(),Tke=E_(),Nke=aL(),qke=fL(),jke=mL(),Mke=gL(),Bke=xL(),Lke=vL(),Uke=EL(),Vke=$L();function zke(e=!1){let t=[jke.default,Mke.default,Bke.default,Lke.default,Uke.default,Vke.default,Ike.default,Tke.default,Pke.default,Nke.default,qke.default];if(e)t.push(Rke.default,Ake.default);else t.push(Fke.default,Oke.default);return t.push(kke.default),t}CL.default=zke});var OL=h(function(RL){Object.defineProperty(RL,"__esModule",{value:!0});var mt=me(),Wke={message:({schemaCode:e})=>mt.str`must match format "${e}"`,params:({schemaCode:e})=>mt._`{format: ${e}}`},Gke={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Wke,code(e,t){let{gen:r,data:n,$data:i,schema:s,schemaCode:o,it:a}=e,{opts:c,errSchemaPath:l,schemaEnv:d,self:f}=a;if(!c.validateFormats)return;if(i)m();else p();function m(){let g=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),y=r.const("fDef",mt._`${g}[${o}]`),x=r.let("fType"),v=r.let("format");r.if(mt._`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(x,mt._`${y}.type || "string"`).assign(v,mt._`${y}.validate`),()=>r.assign(x,mt._`"string"`).assign(v,y)),e.fail$data((0,mt.or)(_(),E()));function _(){if(c.strictSchema===!1)return mt.nil;return mt._`${o} && !${v}`}function E(){let C=d.$async?mt._`(${y}.async ? await ${v}(${n}) : ${v}(${n}))`:mt._`${v}(${n})`,D=mt._`(typeof ${v} == "function" ? ${C} : ${v}.test(${n}))`;return mt._`${v} && ${v} !== true && ${x} === ${t} && !${D}`}}function p(){let g=f.formats[s];if(!g){_();return}if(g===!0)return;let[y,x,v]=E(g);if(y===t)e.pass(C());function _(){if(c.strictSchema===!1){f.logger.warn(D());return}throw Error(D());function D(){return`unknown format "${s}" ignored in schema at path "${l}"`}}function E(D){let O=D instanceof RegExp?(0,mt.regexpCode)(D):c.code.formats?mt._`${c.code.formats}${(0,mt.getProperty)(s)}`:void 0,F=r.scopeValue("formats",{key:s,ref:D,code:O});if(typeof D=="object"&&!(D instanceof RegExp))return[D.type||"string",D.validate,mt._`${F}.validate`];return["string",D,F]}function C(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw Error("async format in sync schema");return mt._`await ${v}(${n})`}return typeof x=="function"?mt._`${v}(${n})`:mt._`${v}.test(${n})`}}}};RL.default=Gke});var kL=h(function(AL){Object.defineProperty(AL,"__esModule",{value:!0});var Yke=OL(),Jke=[Yke.default];AL.default=Jke});var TL=h(function(PL){Object.defineProperty(PL,"__esModule",{value:!0});PL.contentVocabulary=PL.metadataVocabulary=void 0;PL.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];PL.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var jL=h(function(qL){Object.defineProperty(qL,"__esModule",{value:!0});var Zke=oB(),ePe=PB(),tPe=FL(),rPe=kL(),NL=TL(),nPe=[Zke.default,ePe.default,(0,tPe.default)(),rPe.default,NL.metadataVocabulary,NL.contentVocabulary];qL.default=nPe});var UL=h(function(BL){Object.defineProperty(BL,"__esModule",{value:!0});BL.DiscrError=void 0;var ML;(function(e){e.Tag="tag",e.Mapping="mapping"})(ML||(BL.DiscrError=ML={}))});var HL=h(function(zL){Object.defineProperty(zL,"__esModule",{value:!0});var mc=me(),$_=UL(),VL=B0(),sPe=zl(),oPe=Ie(),aPe={message:({params:{discrError:e,tagName:t}})=>e===$_.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>mc._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},cPe={keyword:"discriminator",type:"object",schemaType:"object",error:aPe,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:o}=i;if(!s.opts.discriminator)throw Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw Error("discriminator: requires propertyName");if(n.mapping)throw Error("discriminator: mapping is not supported");if(!o)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",mc._`${r}${(0,mc.getProperty)(a)}`);t.if(mc._`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:$_.DiscrError.Tag,tag:l,tagName:a})),e.ok(c);function d(){let p=m();t.if(!1);for(let g in p)t.elseIf(mc._`${l} === ${g}`),t.assign(c,f(p[g]));t.else(),e.error(!1,{discrError:$_.DiscrError.Mapping,tag:l,tagName:a}),t.endIf()}function f(p){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:p},g);return e.mergeEvaluated(y,mc.Name),g}function m(){var p;let g={},y=v(i),x=!0;for(let C=0;C<o.length;C++){let D=o[C];if((D===null||D===void 0?void 0:D.$ref)&&!(0,oPe.schemaHasRulesButRef)(D,s.self.RULES)){let F=D.$ref;if(D=VL.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,F),D instanceof VL.SchemaEnv)D=D.schema;if(D===void 0)throw new sPe.default(s.opts.uriResolver,s.baseId,F)}let O=(p=D===null||D===void 0?void 0:D.properties)===null||p===void 0?void 0:p[a];if(typeof O!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);x=x&&(y||v(D)),_(O,C)}if(!x)throw Error(`discriminator: "${a}" must be required`);return g;function v({required:C}){return Array.isArray(C)&&C.includes(a)}function _(C,D){if(C.const)E(C.const,D);else if(C.enum)for(let O of C.enum)E(O,D);else throw Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function E(C,D){if(typeof C!="string"||C in g)throw Error(`discriminator: "${a}" values must be unique strings`);g[C]=D}}}};zL.default=cPe});var WL=h(function(rJe,lPe){lPe.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 KL=h(function(yr,C_){Object.defineProperty(yr,"__esModule",{value:!0});yr.MissingRefError=yr.ValidationError=yr.CodeGen=yr.Name=yr.nil=yr.stringify=yr.str=yr._=yr.KeywordCxt=yr.Ajv=void 0;var dPe=JM(),fPe=jL(),pPe=HL(),GL=WL(),mPe=["/properties"],rm="http://json-schema.org/draft-07/schema";class td extends dPe.default{_addVocabularies(){if(super._addVocabularies(),fPe.default.forEach((e)=>this.addVocabulary(e)),this.opts.discriminator)this.addKeyword(pPe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(GL,mPe):GL;this.addMetaSchema(e,rm,!1),this.refs["http://json-schema.org/schema"]=rm}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(rm)?rm:void 0)}}yr.Ajv=td;C_.exports=yr=td;C_.exports.Ajv=td;Object.defineProperty(yr,"__esModule",{value:!0});yr.default=td;var hPe=Vl();Object.defineProperty(yr,"KeywordCxt",{enumerable:!0,get:function(){return hPe.KeywordCxt}});var hc=me();Object.defineProperty(yr,"_",{enumerable:!0,get:function(){return hc._}});Object.defineProperty(yr,"str",{enumerable:!0,get:function(){return hc.str}});Object.defineProperty(yr,"stringify",{enumerable:!0,get:function(){return hc.stringify}});Object.defineProperty(yr,"nil",{enumerable:!0,get:function(){return hc.nil}});Object.defineProperty(yr,"Name",{enumerable:!0,get:function(){return hc.Name}});Object.defineProperty(yr,"CodeGen",{enumerable:!0,get:function(){return hc.CodeGen}});var gPe=j0();Object.defineProperty(yr,"ValidationError",{enumerable:!0,get:function(){return gPe.default}});var yPe=zl();Object.defineProperty(yr,"MissingRefError",{enumerable:!0,get:function(){return yPe.default}})});var JL=h(function(YL){Object.defineProperty(YL,"__esModule",{value:!0});YL.formatLimitDefinition=void 0;var vPe=KL(),gn=me(),Rs=gn.operators,nm={formatMaximum:{okStr:"<=",ok:Rs.LTE,fail:Rs.GT},formatMinimum:{okStr:">=",ok:Rs.GTE,fail:Rs.LT},formatExclusiveMaximum:{okStr:"<",ok:Rs.LT,fail:Rs.GTE},formatExclusiveMinimum:{okStr:">",ok:Rs.GT,fail:Rs.LTE}},_Pe={message:({keyword:e,schemaCode:t})=>gn.str`should be ${nm[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>gn._`{comparison: ${nm[e].okStr}, limit: ${t}}`};YL.formatLimitDefinition={keyword:Object.keys(nm),type:"string",schemaType:"string",$data:!0,error:_Pe,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:s}=e,{opts:o,self:a}=s;if(!o.validateFormats)return;let c=new vPe.KeywordCxt(s,a.RULES.all.format.definition,"format");if(c.$data)l();else d();function l(){let m=t.scopeValue("formats",{ref:a.formats,code:o.code.formats}),p=t.const("fmt",gn._`${m}[${c.schemaCode}]`);e.fail$data((0,gn.or)(gn._`typeof ${p} != "object"`,gn._`${p} instanceof RegExp`,gn._`typeof ${p}.compare != "function"`,f(p)))}function d(){let m=c.schema,p=a.formats[m];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw Error(`"${i}": format "${m}" does not define "compare" function`);let g=t.scopeValue("formats",{key:m,ref:p,code:o.code.formats?gn._`${o.code.formats}${(0,gn.getProperty)(m)}`:void 0});e.fail$data(f(g))}function f(m){return gn._`${m}.compare(${r}, ${n}) ${nm[i].fail} 0`}},dependencies:["format"]};var DPe=(e)=>(e.addKeyword(YL.formatLimitDefinition),e);YL.default=DPe});var eU=h(function(rd,ZL){Object.defineProperty(rd,"__esModule",{value:!0});var gc=Kq(),EPe=JL(),R_=me(),XL=new R_.Name("fullFormats"),SPe=new R_.Name("fastFormats"),O_=(e,t={keywords:!0})=>{if(Array.isArray(t))return QL(e,t,gc.fullFormats,XL),e;let[r,n]=t.mode==="fast"?[gc.fastFormats,SPe]:[gc.fullFormats,XL],i=t.formats||gc.formatNames;if(QL(e,i,r,n),t.keywords)(0,EPe.default)(e);return e};O_.get=(e,t="full")=>{let n=(t==="fast"?gc.fastFormats:gc.fullFormats)[e];if(!n)throw Error(`Unknown format "${e}"`);return n};function QL(e,t,r,n){var i,s;(i=(s=e.opts.code).formats)!==null&&i!==void 0||(s.formats=R_._`require("ajv-formats/dist/formats").${n}`);for(let o of t)e.addFormat(o,r[o])}ZL.exports=rd=O_;Object.defineProperty(rd,"__esModule",{value:!0});rd.default=O_});var $Pe=(e,t={})=>{if(typeof e!=="function")throw TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);let{wait:r=0,maxWait:n=Number.POSITIVE_INFINITY,before:i=!1,after:s=!0}=t;if(r<0||n<0)throw RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!s)throw Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,c,l=function(...d){let f=this,m=()=>{if(o=void 0,a)clearTimeout(a),a=void 0;if(s)c=e.apply(f,d)},p=()=>{if(a=void 0,o)clearTimeout(o),o=void 0;if(s)c=e.apply(f,d)},g=i&&!o;if(clearTimeout(o),o=setTimeout(m,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a)a=setTimeout(p,n);if(g)c=e.apply(f,d);return c};return il(l,e),l.cancel=()=>{if(o)clearTimeout(o),o=void 0;if(a)clearTimeout(a),a=void 0},l},A_;var tU=A(()=>{ab();A_=$Pe});var nd=h(function(mJe,rU){var CPe=Number.MAX_SAFE_INTEGER||9007199254740991,FPe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];rU.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:CPe,RELEASE_TYPES:FPe,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var id=h(function(hJe,nU){var RPe=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};nU.exports=RPe});var yc=h(function(Xn,iU){var{MAX_SAFE_COMPONENT_LENGTH:k_,MAX_SAFE_BUILD_LENGTH:OPe,MAX_LENGTH:APe}=nd(),kPe=id();Xn=iU.exports={};var PPe=Xn.re=[],IPe=Xn.safeRe=[],z=Xn.src=[],TPe=Xn.safeSrc=[],H=Xn.t={},NPe=0,P_="[a-zA-Z0-9-]",qPe=[["\\s",1],["\\d",APe],[P_,OPe]],jPe=(e)=>{for(let[t,r]of qPe)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},oe=(e,t,r)=>{let n=jPe(t),i=NPe++;kPe(e,i,t),H[e]=i,z[i]=t,TPe[i]=n,PPe[i]=new RegExp(t,r?"g":void 0),IPe[i]=new RegExp(n,r?"g":void 0)};oe("NUMERICIDENTIFIER","0|[1-9]\\d*");oe("NUMERICIDENTIFIERLOOSE","\\d+");oe("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${P_}*`);oe("MAINVERSION",`(${z[H.NUMERICIDENTIFIER]})\\.(${z[H.NUMERICIDENTIFIER]})\\.(${z[H.NUMERICIDENTIFIER]})`);oe("MAINVERSIONLOOSE",`(${z[H.NUMERICIDENTIFIERLOOSE]})\\.(${z[H.NUMERICIDENTIFIERLOOSE]})\\.(${z[H.NUMERICIDENTIFIERLOOSE]})`);oe("PRERELEASEIDENTIFIER",`(?:${z[H.NONNUMERICIDENTIFIER]}|${z[H.NUMERICIDENTIFIER]})`);oe("PRERELEASEIDENTIFIERLOOSE",`(?:${z[H.NONNUMERICIDENTIFIER]}|${z[H.NUMERICIDENTIFIERLOOSE]})`);oe("PRERELEASE",`(?:-(${z[H.PRERELEASEIDENTIFIER]}(?:\\.${z[H.PRERELEASEIDENTIFIER]})*))`);oe("PRERELEASELOOSE",`(?:-?(${z[H.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${z[H.PRERELEASEIDENTIFIERLOOSE]})*))`);oe("BUILDIDENTIFIER",`${P_}+`);oe("BUILD",`(?:\\+(${z[H.BUILDIDENTIFIER]}(?:\\.${z[H.BUILDIDENTIFIER]})*))`);oe("FULLPLAIN",`v?${z[H.MAINVERSION]}${z[H.PRERELEASE]}?${z[H.BUILD]}?`);oe("FULL",`^${z[H.FULLPLAIN]}$`);oe("LOOSEPLAIN",`[v=\\s]*${z[H.MAINVERSIONLOOSE]}${z[H.PRERELEASELOOSE]}?${z[H.BUILD]}?`);oe("LOOSE",`^${z[H.LOOSEPLAIN]}$`);oe("GTLT","((?:<|>)?=?)");oe("XRANGEIDENTIFIERLOOSE",`${z[H.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);oe("XRANGEIDENTIFIER",`${z[H.NUMERICIDENTIFIER]}|x|X|\\*`);oe("XRANGEPLAIN",`[v=\\s]*(${z[H.XRANGEIDENTIFIER]})(?:\\.(${z[H.XRANGEIDENTIFIER]})(?:\\.(${z[H.XRANGEIDENTIFIER]})(?:${z[H.PRERELEASE]})?${z[H.BUILD]}?)?)?`);oe("XRANGEPLAINLOOSE",`[v=\\s]*(${z[H.XRANGEIDENTIFIERLOOSE]})(?:\\.(${z[H.XRANGEIDENTIFIERLOOSE]})(?:\\.(${z[H.XRANGEIDENTIFIERLOOSE]})(?:${z[H.PRERELEASELOOSE]})?${z[H.BUILD]}?)?)?`);oe("XRANGE",`^${z[H.GTLT]}\\s*${z[H.XRANGEPLAIN]}$`);oe("XRANGELOOSE",`^${z[H.GTLT]}\\s*${z[H.XRANGEPLAINLOOSE]}$`);oe("COERCEPLAIN",`(^|[^\\d])(\\d{1,${k_}})(?:\\.(\\d{1,${k_}}))?(?:\\.(\\d{1,${k_}}))?`);oe("COERCE",`${z[H.COERCEPLAIN]}(?:$|[^\\d])`);oe("COERCEFULL",z[H.COERCEPLAIN]+`(?:${z[H.PRERELEASE]})?(?:${z[H.BUILD]})?(?:$|[^\\d])`);oe("COERCERTL",z[H.COERCE],!0);oe("COERCERTLFULL",z[H.COERCEFULL],!0);oe("LONETILDE","(?:~>?)");oe("TILDETRIM",`(\\s*)${z[H.LONETILDE]}\\s+`,!0);Xn.tildeTrimReplace="$1~";oe("TILDE",`^${z[H.LONETILDE]}${z[H.XRANGEPLAIN]}$`);oe("TILDELOOSE",`^${z[H.LONETILDE]}${z[H.XRANGEPLAINLOOSE]}$`);oe("LONECARET","(?:\\^)");oe("CARETTRIM",`(\\s*)${z[H.LONECARET]}\\s+`,!0);Xn.caretTrimReplace="$1^";oe("CARET",`^${z[H.LONECARET]}${z[H.XRANGEPLAIN]}$`);oe("CARETLOOSE",`^${z[H.LONECARET]}${z[H.XRANGEPLAINLOOSE]}$`);oe("COMPARATORLOOSE",`^${z[H.GTLT]}\\s*(${z[H.LOOSEPLAIN]})$|^$`);oe("COMPARATOR",`^${z[H.GTLT]}\\s*(${z[H.FULLPLAIN]})$|^$`);oe("COMPARATORTRIM",`(\\s*)${z[H.GTLT]}\\s*(${z[H.LOOSEPLAIN]}|${z[H.XRANGEPLAIN]})`,!0);Xn.comparatorTrimReplace="$1$2$3";oe("HYPHENRANGE",`^\\s*(${z[H.XRANGEPLAIN]})\\s+-\\s+(${z[H.XRANGEPLAIN]})\\s*$`);oe("HYPHENRANGELOOSE",`^\\s*(${z[H.XRANGEPLAINLOOSE]})\\s+-\\s+(${z[H.XRANGEPLAINLOOSE]})\\s*$`);oe("STAR","(<|>)?=?\\s*\\*");oe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");oe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var im=h(function(gJe,sU){var MPe=Object.freeze({loose:!0}),BPe=Object.freeze({}),LPe=(e)=>{if(!e)return BPe;if(typeof e!=="object")return MPe;return e};sU.exports=LPe});var I_=h(function(yJe,cU){var oU=/^[0-9]+$/,aU=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let r=oU.test(e),n=oU.test(t);if(r&&n)e=+e,t=+t;return e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},UPe=(e,t)=>aU(t,e);cU.exports={compareIdentifiers:aU,rcompareIdentifiers:UPe}});var Mt=h(function(xJe,lU){var sm=id(),{MAX_LENGTH:uU,MAX_SAFE_INTEGER:om}=nd(),{safeRe:am,t:cm}=yc(),VPe=im(),{compareIdentifiers:T_}=I_();class yn{constructor(e,t){if(t=VPe(t),e instanceof yn)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else e=e.version;else if(typeof e!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>uU)throw TypeError(`version is longer than ${uU} characters`);sm("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?am[cm.LOOSE]:am[cm.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>om||this.major<0)throw TypeError("Invalid major version");if(this.minor>om||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>om||this.patch<0)throw TypeError("Invalid patch version");if(!r[4])this.prerelease=[];else this.prerelease=r[4].split(".").map((n)=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<om)return i}return n});this.build=r[5]?r[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(e){if(sm("SemVer.compare",this.version,this.options,e),!(e instanceof yn)){if(typeof e==="string"&&e===this.version)return 0;e=new yn(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof yn))e=new yn(e,this.options);if(this.major<e.major)return-1;if(this.major>e.major)return 1;if(this.minor<e.minor)return-1;if(this.minor>e.minor)return 1;if(this.patch<e.patch)return-1;if(this.patch>e.patch)return 1;return 0}comparePre(e){if(!(e instanceof yn))e=new yn(e,this.options);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],n=e.prerelease[t];if(sm("prerelease compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return T_(r,n)}while(++t)}compareBuild(e){if(!(e instanceof yn))e=new yn(e,this.options);let t=0;do{let r=this.build[t],n=e.build[t];if(sm("build compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return T_(r,n)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw Error("invalid increment argument: identifier is empty");if(t){let n=`-${t}`.match(this.options.loose?am[cm.PRERELEASELOOSE]:am[cm.PRERELEASE]);if(!n||n[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",t,r);this.inc("pre",t,r);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 n=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;while(--i>=0)if(typeof this.prerelease[i]==="number")this.prerelease[i]++,i=-2;if(i===-1){if(t===this.prerelease.join(".")&&r===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let i=[t,n];if(r===!1)i=[t];if(T_(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1]))this.prerelease=i}else this.prerelease=i}break}default:throw Error(`invalid increment argument: ${e}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}lU.exports=yn});var $o=h(function(bJe,fU){var dU=Mt(),zPe=(e,t,r=!1)=>{if(e instanceof dU)return e;try{return new dU(e,t)}catch(n){if(!r)return null;throw n}};fU.exports=zPe});var mU=h(function(vJe,pU){var HPe=$o(),WPe=(e,t)=>{let r=HPe(e,t);return r?r.version:null};pU.exports=WPe});var gU=h(function(_Je,hU){var GPe=$o(),KPe=(e,t)=>{let r=GPe(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};hU.exports=KPe});var bU=h(function(DJe,xU){var yU=Mt(),YPe=(e,t,r,n,i)=>{if(typeof r==="string")i=n,n=r,r=void 0;try{return new yU(e instanceof yU?e.version:e,r).inc(t,n,i).version}catch(s){return null}};xU.exports=YPe});var DU=h(function(wJe,_U){var vU=$o(),JPe=(e,t)=>{let r=vU(e,null,!0),n=vU(t,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,o=s?r:n,a=s?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0){if(a.minor&&!a.patch)return"minor";return"patch"}}let d=c?"pre":"";if(r.major!==n.major)return d+"major";if(r.minor!==n.minor)return d+"minor";if(r.patch!==n.patch)return d+"patch";return"prerelease"};_U.exports=JPe});var EU=h(function(EJe,wU){var XPe=Mt(),QPe=(e,t)=>new XPe(e,t).major;wU.exports=QPe});var $U=h(function(SJe,SU){var ZPe=Mt(),e8e=(e,t)=>new ZPe(e,t).minor;SU.exports=e8e});var FU=h(function($Je,CU){var t8e=Mt(),r8e=(e,t)=>new t8e(e,t).patch;CU.exports=r8e});var OU=h(function(CJe,RU){var n8e=$o(),i8e=(e,t)=>{let r=n8e(e,t);return r&&r.prerelease.length?r.prerelease:null};RU.exports=i8e});var Wr=h(function(FJe,kU){var AU=Mt(),s8e=(e,t,r)=>new AU(e,r).compare(new AU(t,r));kU.exports=s8e});var IU=h(function(RJe,PU){var o8e=Wr(),a8e=(e,t,r)=>o8e(t,e,r);PU.exports=a8e});var NU=h(function(OJe,TU){var c8e=Wr(),u8e=(e,t)=>c8e(e,t,!0);TU.exports=u8e});var um=h(function(AJe,jU){var qU=Mt(),l8e=(e,t,r)=>{let n=new qU(e,r),i=new qU(t,r);return n.compare(i)||n.compareBuild(i)};jU.exports=l8e});var BU=h(function(kJe,MU){var d8e=um(),f8e=(e,t)=>e.sort((r,n)=>d8e(r,n,t));MU.exports=f8e});var UU=h(function(PJe,LU){var p8e=um(),m8e=(e,t)=>e.sort((r,n)=>p8e(n,r,t));LU.exports=m8e});var sd=h(function(IJe,VU){var h8e=Wr(),g8e=(e,t,r)=>h8e(e,t,r)>0;VU.exports=g8e});var lm=h(function(TJe,zU){var y8e=Wr(),x8e=(e,t,r)=>y8e(e,t,r)<0;zU.exports=x8e});var N_=h(function(NJe,HU){var b8e=Wr(),v8e=(e,t,r)=>b8e(e,t,r)===0;HU.exports=v8e});var q_=h(function(qJe,WU){var _8e=Wr(),D8e=(e,t,r)=>_8e(e,t,r)!==0;WU.exports=D8e});var dm=h(function(jJe,GU){var w8e=Wr(),E8e=(e,t,r)=>w8e(e,t,r)>=0;GU.exports=E8e});var fm=h(function(MJe,KU){var S8e=Wr(),$8e=(e,t,r)=>S8e(e,t,r)<=0;KU.exports=$8e});var j_=h(function(BJe,YU){var C8e=N_(),F8e=q_(),R8e=sd(),O8e=dm(),A8e=lm(),k8e=fm(),P8e=(e,t,r,n)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return C8e(e,r,n);case"!=":return F8e(e,r,n);case">":return R8e(e,r,n);case">=":return O8e(e,r,n);case"<":return A8e(e,r,n);case"<=":return k8e(e,r,n);default:throw TypeError(`Invalid operator: ${t}`)}};YU.exports=P8e});var XU=h(function(LJe,JU){var I8e=Mt(),T8e=$o(),{safeRe:pm,t:mm}=yc(),N8e=(e,t)=>{if(e instanceof I8e)return e;if(typeof e==="number")e=String(e);if(typeof e!=="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?pm[mm.COERCEFULL]:pm[mm.COERCE]);else{let c=t.includePrerelease?pm[mm.COERCERTLFULL]:pm[mm.COERCERTL],l;while((l=c.exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||l.index+l[0].length!==r.index+r[0].length)r=l;c.lastIndex=l.index+l[1].length+l[2].length}c.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",s=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return T8e(`${n}.${i}.${s}${o}${a}`,t)};JU.exports=N8e});var eV=h(function(UJe,ZU){class QU{constructor(){this.max=1000,this.map=new Map}get(e){let t=this.map.get(e);if(t===void 0)return;else return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,t)}return this}}ZU.exports=QU});var Gr=h(function(VJe,iV){var q8e=/\s+/g;class od{constructor(e,t){if(t=M8e(t),e instanceof od)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new od(e.raw,t);if(e instanceof M_)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(q8e," "),this.set=this.raw.split("||").map((r)=>this.parseRange(r.trim())).filter((r)=>r.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter((n)=>!rV(n[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&W8e(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){if(e>0)this.formatted+="||";let t=this.set[e];for(let r=0;r<t.length;r++){if(r>0)this.formatted+=" ";this.formatted+=t[r].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&z8e)|(this.options.loose&&H8e))+":"+e,n=tV.get(r);if(n)return n;let i=this.options.loose,s=i?Qt[Bt.HYPHENRANGELOOSE]:Qt[Bt.HYPHENRANGE];e=e.replace(s,r4e(this.options.includePrerelease)),Ze("hyphen replace",e),e=e.replace(Qt[Bt.COMPARATORTRIM],L8e),Ze("comparator trim",e),e=e.replace(Qt[Bt.TILDETRIM],U8e),Ze("tilde trim",e),e=e.replace(Qt[Bt.CARETTRIM],V8e),Ze("caret trim",e);let o=e.split(" ").map((d)=>G8e(d,this.options)).join(" ").split(/\s+/).map((d)=>t4e(d,this.options));if(i)o=o.filter((d)=>(Ze("loose invalid filter",d,this.options),!!d.match(Qt[Bt.COMPARATORLOOSE])));Ze("range list",o);let a=new Map,c=o.map((d)=>new M_(d,this.options));for(let d of c){if(rV(d))return[d];a.set(d.value,d)}if(a.size>1&&a.has(""))a.delete("");let l=[...a.values()];return tV.set(r,l),l}intersects(e,t){if(!(e instanceof od))throw TypeError("a Range is required");return this.set.some((r)=>nV(r,t)&&e.set.some((n)=>nV(n,t)&&r.every((i)=>n.every((s)=>i.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new B8e(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(n4e(this.set[t],e,this.options))return!0;return!1}}iV.exports=od;var j8e=eV(),tV=new j8e,M8e=im(),M_=ad(),Ze=id(),B8e=Mt(),{safeRe:Qt,t:Bt,comparatorTrimReplace:L8e,tildeTrimReplace:U8e,caretTrimReplace:V8e}=yc(),{FLAG_INCLUDE_PRERELEASE:z8e,FLAG_LOOSE:H8e}=nd(),rV=(e)=>e.value==="<0.0.0-0",W8e=(e)=>e.value==="",nV=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();while(r&&n.length)r=n.every((s)=>i.intersects(s,t)),i=n.pop();return r},G8e=(e,t)=>(e=e.replace(Qt[Bt.BUILD],""),Ze("comp",e,t),e=J8e(e,t),Ze("caret",e),e=K8e(e,t),Ze("tildes",e),e=Q8e(e,t),Ze("xrange",e),e=e4e(e,t),Ze("stars",e),e),Zt=(e)=>!e||e.toLowerCase()==="x"||e==="*",K8e=(e,t)=>e.trim().split(/\s+/).map((r)=>Y8e(r,t)).join(" "),Y8e=(e,t)=>{let r=t.loose?Qt[Bt.TILDELOOSE]:Qt[Bt.TILDE];return e.replace(r,(n,i,s,o,a)=>{Ze("tilde",e,n,i,s,o,a);let c;if(Zt(i))c="";else if(Zt(s))c=`>=${i}.0.0 <${+i+1}.0.0-0`;else if(Zt(o))c=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`;else if(a)Ze("replaceTilde pr",a),c=`>=${i}.${s}.${o}-${a} <${i}.${+s+1}.0-0`;else c=`>=${i}.${s}.${o} <${i}.${+s+1}.0-0`;return Ze("tilde return",c),c})},J8e=(e,t)=>e.trim().split(/\s+/).map((r)=>X8e(r,t)).join(" "),X8e=(e,t)=>{Ze("caret",e,t);let r=t.loose?Qt[Bt.CARETLOOSE]:Qt[Bt.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,s,o,a,c)=>{Ze("caret",e,i,s,o,a,c);let l;if(Zt(s))l="";else if(Zt(o))l=`>=${s}.0.0${n} <${+s+1}.0.0-0`;else if(Zt(a))if(s==="0")l=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`;else if(c)if(Ze("replaceCaret pr",c),s==="0")if(o==="0")l=`>=${s}.${o}.${a}-${c} <${s}.${o}.${+a+1}-0`;else l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.${a}-${c} <${+s+1}.0.0-0`;else if(Ze("no pr"),s==="0")if(o==="0")l=`>=${s}.${o}.${a}${n} <${s}.${o}.${+a+1}-0`;else l=`>=${s}.${o}.${a}${n} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.${a} <${+s+1}.0.0-0`;return Ze("caret return",l),l})},Q8e=(e,t)=>(Ze("replaceXRanges",e,t),e.split(/\s+/).map((r)=>Z8e(r,t)).join(" ")),Z8e=(e,t)=>{e=e.trim();let r=t.loose?Qt[Bt.XRANGELOOSE]:Qt[Bt.XRANGE];return e.replace(r,(n,i,s,o,a,c)=>{Ze("xRange",e,n,i,s,o,a,c);let l=Zt(s),d=l||Zt(o),f=d||Zt(a),m=f;if(i==="="&&m)i="";if(c=t.includePrerelease?"-0":"",l)if(i===">"||i==="<")n="<0.0.0-0";else n="*";else if(i&&m){if(d)o=0;if(a=0,i===">")if(i=">=",d)s=+s+1,o=0,a=0;else o=+o+1,a=0;else if(i==="<=")if(i="<",d)s=+s+1;else o=+o+1;if(i==="<")c="-0";n=`${i+s}.${o}.${a}${c}`}else if(d)n=`>=${s}.0.0${c} <${+s+1}.0.0-0`;else if(f)n=`>=${s}.${o}.0${c} <${s}.${+o+1}.0-0`;return Ze("xRange return",n),n})},e4e=(e,t)=>(Ze("replaceStars",e,t),e.trim().replace(Qt[Bt.STAR],"")),t4e=(e,t)=>(Ze("replaceGTE0",e,t),e.trim().replace(Qt[t.includePrerelease?Bt.GTE0PRE:Bt.GTE0],"")),r4e=(e)=>(t,r,n,i,s,o,a,c,l,d,f,m)=>{if(Zt(n))r="";else if(Zt(i))r=`>=${n}.0.0${e?"-0":""}`;else if(Zt(s))r=`>=${n}.${i}.0${e?"-0":""}`;else if(o)r=`>=${r}`;else r=`>=${r}${e?"-0":""}`;if(Zt(l))c="";else if(Zt(d))c=`<${+l+1}.0.0-0`;else if(Zt(f))c=`<${l}.${+d+1}.0-0`;else if(m)c=`<=${l}.${d}.${f}-${m}`;else if(e)c=`<${l}.${d}.${+f+1}-0`;else c=`<=${c}`;return`${r} ${c}`.trim()},n4e=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++){if(Ze(e[n].semver),e[n].semver===M_.ANY)continue;if(e[n].semver.prerelease.length>0){let i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}}return!1}return!0}});var ad=h(function(zJe,lV){var cd=Symbol("SemVer ANY");class hm{static get ANY(){return cd}constructor(e,t){if(t=sV(t),e instanceof hm)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),L_("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===cd)this.value="";else this.value=this.operator+this.semver.version;L_("comp",this)}parse(e){let t=this.options.loose?oV[aV.COMPARATORLOOSE]:oV[aV.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);if(this.operator=r[1]!==void 0?r[1]:"",this.operator==="=")this.operator="";if(!r[2])this.semver=cd;else this.semver=new cV(r[2],this.options.loose)}toString(){return this.value}test(e){if(L_("Comparator.test",e,this.options.loose),this.semver===cd||e===cd)return!0;if(typeof e==="string")try{e=new cV(e,this.options)}catch(t){return!1}return B_(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof hm))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new uV(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new uV(this.value,t).test(e.semver)}if(t=sV(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0"))return!1;if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&e.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&e.operator.startsWith("<"))return!0;if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("="))return!0;if(B_(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if(B_(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}lV.exports=hm;var sV=im(),{safeRe:oV,t:aV}=yc(),B_=j_(),L_=id(),cV=Mt(),uV=Gr()});var ud=h(function(HJe,dV){var i4e=Gr(),s4e=(e,t,r)=>{try{t=new i4e(t,r)}catch(n){return!1}return t.test(e)};dV.exports=s4e});var pV=h(function(WJe,fV){var o4e=Gr(),a4e=(e,t)=>new o4e(e,t).set.map((r)=>r.map((n)=>n.value).join(" ").trim().split(" "));fV.exports=a4e});var hV=h(function(GJe,mV){var c4e=Mt(),u4e=Gr(),l4e=(e,t,r)=>{let n=null,i=null,s=null;try{s=new u4e(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===-1)n=o,i=new c4e(n,r)}}),n};mV.exports=l4e});var yV=h(function(KJe,gV){var d4e=Mt(),f4e=Gr(),p4e=(e,t,r)=>{let n=null,i=null,s=null;try{s=new f4e(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===1)n=o,i=new d4e(n,r)}}),n};gV.exports=p4e});var vV=h(function(YJe,bV){var U_=Mt(),m4e=Gr(),xV=sd(),h4e=(e,t)=>{e=new m4e(e,t);let r=new U_("0.0.0");if(e.test(r))return r;if(r=new U_("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;n<e.set.length;++n){let i=e.set[n],s=null;if(i.forEach((o)=>{let a=new U_(o.semver.version);switch(o.operator){case">":if(a.prerelease.length===0)a.patch++;else a.prerelease.push(0);a.raw=a.format();case"":case">=":if(!s||xV(a,s))s=a;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||xV(r,s)))r=s}if(r&&e.test(r))return r;return null};bV.exports=h4e});var DV=h(function(JJe,_V){var g4e=Gr(),y4e=(e,t)=>{try{return new g4e(e,t).range||"*"}catch(r){return null}};_V.exports=y4e});var gm=h(function(XJe,$V){var x4e=Mt(),SV=ad(),{ANY:b4e}=SV,v4e=Gr(),_4e=ud(),wV=sd(),EV=lm(),D4e=fm(),w4e=dm(),E4e=(e,t,r,n)=>{e=new x4e(e,n),t=new v4e(t,n);let i,s,o,a,c;switch(r){case">":i=wV,s=D4e,o=EV,a=">",c=">=";break;case"<":i=EV,s=w4e,o=wV,a="<",c="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(_4e(e,t,n))return!1;for(let l=0;l<t.set.length;++l){let d=t.set[l],f=null,m=null;if(d.forEach((p)=>{if(p.semver===b4e)p=new SV(">=0.0.0");if(f=f||p,m=m||p,i(p.semver,f.semver,n))f=p;else if(o(p.semver,m.semver,n))m=p}),f.operator===a||f.operator===c)return!1;if((!m.operator||m.operator===a)&&s(e,m.semver))return!1;else if(m.operator===c&&o(e,m.semver))return!1}return!0};$V.exports=E4e});var FV=h(function(QJe,CV){var S4e=gm(),$4e=(e,t,r)=>S4e(e,t,">",r);CV.exports=$4e});var OV=h(function(ZJe,RV){var C4e=gm(),F4e=(e,t,r)=>C4e(e,t,"<",r);RV.exports=F4e});var PV=h(function(eXe,kV){var AV=Gr(),R4e=(e,t,r)=>(e=new AV(e,r),t=new AV(t,r),e.intersects(t,r));kV.exports=R4e});var TV=h(function(tXe,IV){var O4e=ud(),A4e=Wr();IV.exports=(e,t,r)=>{let n=[],i=null,s=null,o=e.sort((d,f)=>A4e(d,f,r));for(let d of o)if(O4e(d,t,r)){if(s=d,!i)i=d}else{if(s)n.push([i,s]);s=null,i=null}if(i)n.push([i,null]);let a=[];for(let[d,f]of n)if(d===f)a.push(d);else if(!f&&d===o[0])a.push("*");else if(!f)a.push(`>=${d}`);else if(d===o[0])a.push(`<=${f}`);else a.push(`${d} - ${f}`);let c=a.join(" || "),l=typeof t.raw==="string"?t.raw:String(t);return c.length<l.length?c:t}});var LV=h(function(rXe,BV){var NV=Gr(),z_=ad(),{ANY:V_}=z_,ld=ud(),H_=Wr(),k4e=(e,t,r={})=>{if(e===t)return!0;e=new NV(e,r),t=new NV(t,r);let n=!1;e:for(let i of e.set){for(let s of t.set){let o=I4e(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},P4e=[new z_(">=0.0.0-0")],qV=[new z_(">=0.0.0")],I4e=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===V_)if(t.length===1&&t[0].semver===V_)return!0;else if(r.includePrerelease)e=P4e;else e=qV;if(t.length===1&&t[0].semver===V_)if(r.includePrerelease)return!0;else t=qV;let n=new Set,i,s;for(let p of e)if(p.operator===">"||p.operator===">=")i=jV(i,p,r);else if(p.operator==="<"||p.operator==="<=")s=MV(s,p,r);else n.add(p.semver);if(n.size>1)return null;let o;if(i&&s){if(o=H_(i.semver,s.semver,r),o>0)return null;else if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let p of n){if(i&&!ld(p,String(i),r))return null;if(s&&!ld(p,String(s),r))return null;for(let g of t)if(!ld(p,String(g),r))return!1;return!0}let a,c,l,d,f=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;if(f&&f.prerelease.length===1&&s.operator==="<"&&f.prerelease[0]===0)f=!1;for(let p of t){if(d=d||p.operator===">"||p.operator===">=",l=l||p.operator==="<"||p.operator==="<=",i){if(m){if(p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===m.major&&p.semver.minor===m.minor&&p.semver.patch===m.patch)m=!1}if(p.operator===">"||p.operator===">="){if(a=jV(i,p,r),a===p&&a!==i)return!1}else if(i.operator===">="&&!ld(i.semver,String(p),r))return!1}if(s){if(f){if(p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch)f=!1}if(p.operator==="<"||p.operator==="<="){if(c=MV(s,p,r),c===p&&c!==s)return!1}else if(s.operator==="<="&&!ld(s.semver,String(p),r))return!1}if(!p.operator&&(s||i)&&o!==0)return!1}if(i&&l&&!s&&o!==0)return!1;if(s&&d&&!i&&o!==0)return!1;if(m||f)return!1;return!0},jV=(e,t,r)=>{if(!e)return t;let n=H_(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e},MV=(e,t,r)=>{if(!e)return t;let n=H_(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};BV.exports=k4e});var HV=h(function(nXe,zV){var W_=yc(),UV=nd(),T4e=Mt(),VV=I_(),N4e=$o(),q4e=mU(),j4e=gU(),M4e=bU(),B4e=DU(),L4e=EU(),U4e=$U(),V4e=FU(),z4e=OU(),H4e=Wr(),W4e=IU(),G4e=NU(),K4e=um(),Y4e=BU(),J4e=UU(),X4e=sd(),Q4e=lm(),Z4e=N_(),e3e=q_(),t3e=dm(),r3e=fm(),n3e=j_(),i3e=XU(),s3e=ad(),o3e=Gr(),a3e=ud(),c3e=pV(),u3e=hV(),l3e=yV(),d3e=vV(),f3e=DV(),p3e=gm(),m3e=FV(),h3e=OV(),g3e=PV(),y3e=TV(),x3e=LV();zV.exports={parse:N4e,valid:q4e,clean:j4e,inc:M4e,diff:B4e,major:L4e,minor:U4e,patch:V4e,prerelease:z4e,compare:H4e,rcompare:W4e,compareLoose:G4e,compareBuild:K4e,sort:Y4e,rsort:J4e,gt:X4e,lt:Q4e,eq:Z4e,neq:e3e,gte:t3e,lte:r3e,cmp:n3e,coerce:i3e,Comparator:s3e,Range:o3e,satisfies:a3e,toComparators:c3e,maxSatisfying:u3e,minSatisfying:l3e,minVersion:d3e,validRange:f3e,outside:p3e,gtr:m3e,ltr:h3e,intersects:g3e,simplifyRange:y3e,subset:x3e,SemVer:T4e,re:W_.re,src:W_.src,tokens:W_.t,SEMVER_SPEC_VERSION:UV.SEMVER_SPEC_VERSION,RELEASE_TYPES:UV.RELEASE_TYPES,compareIdentifiers:VV.compareIdentifiers,rcompareIdentifiers:VV.rcompareIdentifiers}});function GV(e,t,r){if(!e)return!1;if(e.constructor===t)return!0;return b3e.call(e)===r}function KV(e){return GV(e,Uint8Array,"[object Uint8Array]")}function v3e(e){return GV(e,ArrayBuffer,"[object ArrayBuffer]")}function _3e(e){return KV(e)||v3e(e)}function D3e(e){if(!KV(e))throw TypeError(`Expected \`Uint8Array\`, got \`${typeof e}\``)}function w3e(e){if(!_3e(e))throw TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function G_(e,t){if(e.length===0)return new Uint8Array(0);t??=e.reduce((i,s)=>i+s.length,0);let r=new Uint8Array(t),n=0;for(let i of e)D3e(i),r.set(i,n),n+=i.length;return r}function K_(e,t="utf8"){return w3e(e),WV[t]??=new globalThis.TextDecoder(t),WV[t].decode(e)}function E3e(e){if(typeof e!=="string")throw TypeError(`Expected \`string\`, got \`${typeof e}\``)}function ym(e){return E3e(e),S3e.encode(e)}var b3e,WV,S3e,iXe;var YV=A(()=>{b3e=Object.prototype.toString;WV={utf8:new globalThis.TextDecoder("utf8")};S3e=new globalThis.TextEncoder;iXe=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"))});import{isDeepStrictEqual as $3e}from"util";import JV from"process";import Co from"fs";import XV from"path";import dd from"crypto";import C3e from"assert";var ZV,ez,Fo,F3e,QV="aes-256-cbc",xc=()=>Object.create(null),R3e=(e)=>e!==void 0&&e!==null,O3e=(e,t)=>{let r=new Set(["undefined","symbol","function"]),n=typeof t;if(r.has(n))throw TypeError(`Setting a value of type \`${n}\` for key \`${e}\` is not allowed as it's not supported by JSON`)},xm="__internal__",Y_,bm;var tz=A(()=>{uT();dT();LT();tU();YV();ZV=ne(jq(),1),ez=ne(eU(),1),Fo=ne(HV(),1),F3e=ez.default.default,Y_=`${xm}.migrations.version`;bm=class bm{path;events;#r;#t;#e;#i={};constructor(e={}){let t={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(!t.cwd){if(!t.projectName)throw Error("Please specify the `projectName` option.");t.cwd=Sb(t.projectName,{suffix:t.projectSuffix}).config}if(this.#e=t,t.schema??t.ajvOptions??t.rootSchema){if(t.schema&&typeof t.schema!=="object")throw TypeError("The `schema` option must be an object.");let s=new ZV.Ajv2020({allErrors:!0,useDefaults:!0,...t.ajvOptions});F3e(s);let o={...t.rootSchema,type:"object",properties:t.schema};this.#r=s.compile(o);for(let[a,c]of Object.entries(t.schema??{}))if(c?.default)this.#i[a]=c.default}if(t.defaults)this.#i={...this.#i,...t.defaults};if(t.serialize)this._serialize=t.serialize;if(t.deserialize)this._deserialize=t.deserialize;this.events=new EventTarget,this.#t=t.encryptionKey;let r=t.fileExtension?`.${t.fileExtension}`:"";this.path=XV.resolve(t.cwd,`${t.configName??"config"}${r}`);let n=this.store,i=Object.assign(xc(),t.defaults,n);if(t.migrations){if(!t.projectVersion)throw Error("Please specify the `projectVersion` option.");this._migrate(t.migrations,t.projectVersion,t.beforeEachMigration)}this._validate(i);try{C3e.deepEqual(n,i)}catch{this.store=i}if(t.watch)this._watch()}get(e,t){if(this.#e.accessPropertiesByDotNotation)return this._get(e,t);let{store:r}=this;return e in r?r[e]:t}set(e,t){if(typeof e!=="string"&&typeof e!=="object")throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!=="object"&&t===void 0)throw TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw TypeError(`Please don't use the ${xm} key, as it's used to manage this module internal operations.`);let{store:r}=this,n=(i,s)=>{if(O3e(i,s),this.#e.accessPropertiesByDotNotation)Db(r,i,s);else r[i]=s};if(typeof e==="object"){let i=e;for(let[s,o]of Object.entries(i))n(s,o)}else n(e,t);this.store=r}has(e){if(this.#e.accessPropertiesByDotNotation)return cT(this.store,e);return e in this.store}reset(...e){for(let t of e)if(R3e(this.#i[t]))this.set(t,this.#i[t])}delete(e){let{store:t}=this;if(this.#e.accessPropertiesByDotNotation)aT(t,e);else delete t[e];this.store=t}clear(){this.store=xc();for(let e of Object.keys(this.#i))this.reset(e)}onDidChange(e,t){if(typeof e!=="string")throw TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof t!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`);return this._handleChange(()=>this.get(e),t)}onDidAnyChange(e){if(typeof e!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleChange(()=>this.store,e)}get size(){return Object.keys(this.store).length}get store(){try{let e=Co.readFileSync(this.path,this.#t?null:"utf8"),t=this._encryptData(e),r=this._deserialize(t);return this._validate(r),Object.assign(xc(),r)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),xc();if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return xc();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(let[e,t]of Object.entries(this.store))yield[e,t]}_encryptData(e){if(!this.#t)return typeof e==="string"?e:K_(e);try{let t=e.slice(0,16),r=dd.pbkdf2Sync(this.#t,t.toString(),1e4,32,"sha512"),n=dd.createDecipheriv(QV,r,t),i=e.slice(17),s=typeof i==="string"?ym(i):i;return K_(G_([n.update(s),n.final()]))}catch{}return e.toString()}_handleChange(e,t){let r=e(),n=()=>{let i=r,s=e();if($3e(s,i))return;r=s,t.call(this,s,i)};return this.events.addEventListener("change",n),()=>{this.events.removeEventListener("change",n)}}_deserialize=(e)=>JSON.parse(e);_serialize=(e)=>JSON.stringify(e,void 0,"\t");_validate(e){if(!this.#r)return;if(this.#r(e)||!this.#r.errors)return;let r=this.#r.errors.map(({instancePath:n,message:i=""})=>`\`${n.slice(1)}\` ${i}`);throw Error("Config schema violation: "+r.join("; "))}_ensureDirectory(){Co.mkdirSync(XV.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e);if(this.#t){let r=dd.randomBytes(16),n=dd.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),i=dd.createCipheriv(QV,n,r);t=G_([r,ym(":"),i.update(ym(t)),i.final()])}if(JV.env.SNAP)Co.writeFileSync(this.path,t,{mode:this.#e.configFileMode});else try{Nb(this.path,t,{mode:this.#e.configFileMode})}catch(r){if(r?.code==="EXDEV"){Co.writeFileSync(this.path,t,{mode:this.#e.configFileMode});return}throw r}}_watch(){if(this._ensureDirectory(),!Co.existsSync(this.path))this._write(xc());if(JV.platform==="win32")Co.watch(this.path,{persistent:!1},A_(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100}));else Co.watchFile(this.path,{persistent:!1},A_(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5000}))}_migrate(e,t,r){let n=this._get(Y_,"0.0.0"),i=Object.keys(e).filter((o)=>this._shouldPerformMigration(o,n,t)),s={...this.store};for(let o of i)try{if(r)r(this,{fromVersion:n,toVersion:o,finalVersion:t,versions:i});let a=e[o];a?.(this),this._set(Y_,o),n=o,s={...this.store}}catch(a){throw this.store=s,Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${a}`)}if(this._isVersionInRangeFormat(n)||!Fo.default.eq(n,t))this._set(Y_,t)}_containsReservedKey(e){if(typeof e==="object"){if(Object.keys(e)[0]===xm)return!0}if(typeof e!=="string")return!1;if(this.#e.accessPropertiesByDotNotation){if(e.startsWith(`${xm}.`))return!0;return!1}return!1}_isVersionInRangeFormat(e){return Fo.default.clean(e)===null}_shouldPerformMigration(e,t,r){if(this._isVersionInRangeFormat(e)){if(t!=="0.0.0"&&Fo.default.satisfies(t,e))return!1;return Fo.default.satisfies(r,e)}if(Fo.default.lte(e,t))return!1;if(Fo.default.gt(e,r))return!1;return!0}_get(e,t){return oT(this.store,e,t)}_set(e,t){let{store:r}=this;Db(r,e,t),this.store=r}}});var ve,J_,N,Qn=(e)=>{switch(typeof e){case"undefined":return N.undefined;case"string":return N.string;case"number":return Number.isNaN(e)?N.nan:N.number;case"boolean":return N.boolean;case"function":return N.function;case"bigint":return N.bigint;case"symbol":return N.symbol;case"object":if(Array.isArray(e))return N.array;if(e===null)return N.null;if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return N.promise;if(typeof Map<"u"&&e instanceof Map)return N.map;if(typeof Set<"u"&&e instanceof Set)return N.set;if(typeof Date<"u"&&e instanceof Date)return N.date;return N.object;default:return N.unknown}};var fd=A(()=>{(function(e){e.assertEqual=(i)=>{};function t(i){}e.assertIs=t;function r(i){throw Error()}e.assertNever=r,e.arrayToEnum=(i)=>{let s={};for(let o of i)s[o]=o;return s},e.getValidEnumValues=(i)=>{let s=e.objectKeys(i).filter((a)=>typeof i[i[a]]!=="number"),o={};for(let a of s)o[a]=i[a];return e.objectValues(o)},e.objectValues=(i)=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys==="function"?(i)=>Object.keys(i):(i)=>{let s=[];for(let o in i)if(Object.prototype.hasOwnProperty.call(i,o))s.push(o);return s},e.find=(i,s)=>{for(let o of i)if(s(o))return o;return},e.isInteger=typeof Number.isInteger==="function"?(i)=>Number.isInteger(i):(i)=>typeof i==="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map((o)=>typeof o==="string"?`'${o}'`:o).join(s)}e.joinValues=n,e.jsonStringifyReplacer=(i,s)=>{if(typeof s==="bigint")return s.toString();return s}})(ve||(ve={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(J_||(J_={}));N=ve.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var I,A3e=(e)=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),xr;var vm=A(()=>{fd();I=ve.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"]);xr=class xr extends Error{get errors(){return this.issues}constructor(e){super();this.issues=[],this.addIssue=(r)=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let t=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,t);else this.__proto__=t;this.name="ZodError",this.issues=e}format(e){let t=e||function(i){return i.message},r={_errors:[]},n=(i)=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)r._errors.push(t(s));else{let o=r,a=0;while(a<s.path.length){let c=s.path[a];if(a!==s.path.length-1)o[c]=o[c]||{_errors:[]};else o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(s));o=o[c],a++}}};return n(this),r}static assert(e){if(!(e instanceof xr))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ve.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=(t)=>t.message){let t={},r=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];t[i]=t[i]||[],t[i].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}};xr.create=(e)=>new xr(e)});var k3e=(e,t)=>{let r;switch(e.code){case I.invalid_type:if(e.received===N.undefined)r="Required";else r=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ve.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:r=`Unrecognized key(s) in object: ${ve.joinValues(e.keys,", ")}`;break;case I.invalid_union:r="Invalid input";break;case I.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ve.joinValues(e.options)}`;break;case I.invalid_enum_value:r=`Invalid enum value. Expected ${ve.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:r="Invalid function arguments";break;case I.invalid_return_type:r="Invalid function return type";break;case I.invalid_date:r="Invalid date";break;case I.invalid_string:if(typeof e.validation==="object")if("includes"in e.validation){if(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==="number")r=`${r} at one or more positions greater than or equal to ${e.validation.position}`}else if("startsWith"in e.validation)r=`Invalid input: must start with "${e.validation.startsWith}"`;else if("endsWith"in e.validation)r=`Invalid input: must end with "${e.validation.endsWith}"`;else ve.assertNever(e.validation);else if(e.validation!=="regex")r=`Invalid ${e.validation}`;else r="Invalid";break;case I.too_small:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="bigint")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="date")r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`;else r="Invalid input";break;case I.too_big:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="bigint")r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="date")r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`;else r="Invalid input";break;case I.custom:r="Invalid input";break;case I.invalid_intersection_types:r="Intersection results could not be merged";break;case I.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:r="Number must be finite";break;default:r=t.defaultError,ve.assertNever(e)}return{message:r}},Fi;var X_=A(()=>{vm();fd();Fi=k3e});function P3e(e){rz=e}function bc(){return rz}var rz;var _m=A(()=>{X_();rz=Fi});function L(e,t){let r=bc(),n=pd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Fi?void 0:Fi].filter((i)=>!!i)});e.common.issues.push(n)}class kt{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(e,t){let r=[];for(let n of t){if(n.status==="aborted")return Q;if(n.status==="dirty")e.dirty();r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let n of t){let i=await n.key,s=await n.value;r.push({key:i,value:s})}return kt.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:i,value:s}=n;if(i.status==="aborted")return Q;if(s.status==="aborted")return Q;if(i.status==="dirty")e.dirty();if(s.status==="dirty")e.dirty();if(i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet))r[i.value]=s.value}return{status:e.value,value:r}}}var pd=(e)=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,s=[...r,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="",c=n.filter((l)=>!!l).slice().reverse();for(let l of c)a=l(o,{data:t,defaultError:a}).message;return{...i,path:s,message:a}},I3e,Q,Ro=(e)=>({status:"dirty",value:e}),Lt=(e)=>({status:"valid",value:e}),Dm=(e)=>e.status==="aborted",wm=(e)=>e.status==="dirty",Os=(e)=>e.status==="valid",vc=(e)=>typeof Promise<"u"&&e instanceof Promise;var Q_=A(()=>{_m();X_();I3e=[];Q=Object.freeze({status:"aborted"})});var nz=()=>{};var G;var iz=A(()=>{(function(e){e.errToObj=(t)=>typeof t==="string"?{message:t}:t||{},e.toString=(t)=>typeof t==="string"?t:t?.message})(G||(G={}))});class _n{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}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 le(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(t)return{errorMap:t,description:i};return{errorMap:(o,a)=>{let{message:c}=e;if(o.code==="invalid_enum_value")return{message:c??a.defaultError};if(typeof a.data>"u")return{message:c??n??a.defaultError};if(o.code!=="invalid_type")return{message:a.defaultError};return{message:c??r??a.defaultError}},description:i}}class he{get description(){return this._def.description}_getType(e){return Qn(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Qn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new kt,ctx:{common:e.parent.common,data:e.data,parsedType:Qn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(vc(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qn(e)},n=this._parseSync({data:e,path:r.path,parent:r});return sz(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qn(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return Os(r)?{value:r.value}:{issues:t.common.issues}}catch(r){if(r?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((r)=>Os(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qn(e)},n=this._parse({data:e,path:r.path,parent:r}),i=await(vc(n)?n:Promise.resolve(n));return sz(r,i)}refine(e,t){let r=(n)=>{if(typeof t==="string"||typeof t>"u")return{message:t};else if(typeof t==="function")return t(n);else return t};return this._refinement((n,i)=>{let s=e(n),o=()=>i.addIssue({code:I.custom,...r(n)});if(typeof Promise<"u"&&s instanceof Promise)return s.then((a)=>{if(!a)return o(),!1;else return!0});if(!s)return o(),!1;else return!0})}refinement(e,t){return this._refinement((r,n)=>{if(!e(r))return n.addIssue(typeof t==="function"?t(r,n):t),!1;else return!0})}_refinement(e){return new Dn({schema:this,typeName:ee.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:(t)=>this["~validate"](t)}}optional(){return vn.create(this,this._def)}nullable(){return Oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return bn.create(this)}promise(){return Po.create(this,this._def)}or(e){return $c.create([this,e],this._def)}and(e){return Cc.create(this,e,this._def)}transform(e){return new Dn({...le(this._def),schema:this,typeName:ee.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e==="function"?e:()=>e;return new Ac({...le(this._def),innerType:this,defaultValue:t,typeName:ee.ZodDefault})}brand(){return new Sm({typeName:ee.ZodBranded,type:this,...le(this._def)})}catch(e){let t=typeof e==="function"?e:()=>e;return new kc({...le(this._def),innerType:this,catchValue:t,typeName:ee.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return bd.create(this,e)}readonly(){return Pc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function cz(e){let t="[0-5]\\d";if(e.precision)t=`${t}\\.\\d{${e.precision}}`;else if(e.precision==null)t=`${t}(\\.\\d+)?`;let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function X3e(e){return new RegExp(`^${cz(e)}$`)}function uz(e){let t=`${az}T${cz(e)}`,r=[];if(r.push(e.local?"Z?":"Z"),e.offset)r.push("([+-]\\d{2}:?\\d{2})");return t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Q3e(e,t){if((t==="v4"||!t)&&z3e.test(e))return!0;if((t==="v6"||!t)&&W3e.test(e))return!0;return!1}function Z3e(e,t){if(!B3e.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));if(typeof i!=="object"||i===null)return!1;if("typ"in i&&i?.typ!=="JWT")return!1;if(!i.alg)return!1;if(t&&i.alg!==t)return!1;return!0}catch{return!1}}function eIe(e,t){if((t==="v4"||!t)&&H3e.test(e))return!0;if((t==="v6"||!t)&&G3e.test(e))return!0;return!1}function tIe(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return s%o/10**i}function _c(e){if(e instanceof ut){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=vn.create(_c(n))}return new ut({...e._def,shape:()=>t})}else if(e instanceof bn)return new bn({...e._def,type:_c(e.element)});else if(e instanceof vn)return vn.create(_c(e.unwrap()));else if(e instanceof Oi)return Oi.create(_c(e.unwrap()));else if(e instanceof ei)return ei.create(e.items.map((t)=>_c(t)));else return e}function eD(e,t){let r=Qn(e),n=Qn(t);if(e===t)return{valid:!0,data:e};else if(r===N.object&&n===N.object){let i=ve.objectKeys(t),s=ve.objectKeys(e).filter((a)=>i.indexOf(a)!==-1),o={...e,...t};for(let a of s){let c=eD(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===N.array&&n===N.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let s=0;s<e.length;s++){let o=e[s],a=t[s],c=eD(o,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else if(r===N.date&&n===N.date&&+e===+t)return{valid:!0,data:e};else return{valid:!1}}function lz(e,t){return new Is({values:e,typeName:ee.ZodEnum,...le(t)})}function oz(e,t){let r=typeof e==="function"?e(t):typeof e==="string"?{message:e}:e;return typeof r==="string"?{message:r}:r}function dz(e,t={},r){if(e)return Ao.create().superRefine((n,i)=>{let s=e(n);if(s instanceof Promise)return s.then((o)=>{if(!o){let a=oz(t,n),c=a.fatal??r??!0;i.addIssue({code:"custom",...a,fatal:c})}});if(!s){let o=oz(t,n),a=o.fatal??r??!0;i.addIssue({code:"custom",...o,fatal:a})}return});return Ao.create()}var sz=(e,t)=>{if(Os(t))return{success:!0,data:t.value};else{if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new xr(e.common.issues);return this._error=r,this._error}}}},T3e,N3e,q3e,j3e,M3e,B3e,L3e,U3e,V3e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Z_,z3e,H3e,W3e,G3e,K3e,Y3e,az="((\\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])))",J3e,xn,ks,Ps,wc,Oo,md,Ec,Sc,Ao,As,Zn,hd,bn,ut,$c,Ri=(e)=>{if(e instanceof Fc)return Ri(e.schema);else if(e instanceof Dn)return Ri(e.innerType());else if(e instanceof Rc)return[e.value];else if(e instanceof Is)return e.options;else if(e instanceof Oc)return ve.objectValues(e.enum);else if(e instanceof Ac)return Ri(e._def.innerType);else if(e instanceof Ec)return[void 0];else if(e instanceof Sc)return[null];else if(e instanceof vn)return[void 0,...Ri(e.unwrap())];else if(e instanceof Oi)return[null,...Ri(e.unwrap())];else if(e instanceof Sm)return Ri(e.unwrap());else if(e instanceof Pc)return Ri(e.unwrap());else if(e instanceof kc)return Ri(e._def.innerType);else return[]},Em,Cc,ei,gd,yd,ko,Dc,Fc,Rc,Is,Oc,Po,Dn,vn,Oi,Ac,kc,xd,rIe,Sm,bd,Pc,nIe,ee,iIe=(e,t={message:`Input not instance of ${e.name}`})=>dz((r)=>r instanceof e,t),fz,pz,sIe,oIe,mz,aIe,cIe,uIe,lIe,dIe,fIe,pIe,mIe,hIe,gIe,yIe,xIe,bIe,vIe,_Ie,DIe,wIe,EIe,SIe,$Ie,CIe,FIe,RIe,OIe,AIe,kIe,PIe,IIe,TIe,NIe=()=>fz().optional(),qIe=()=>pz().optional(),jIe=()=>mz().optional(),MIe,BIe;var hz=A(()=>{vm();_m();iz();Q_();fd();T3e=/^c[^\s-]{8,}$/i,N3e=/^[0-9a-z]+$/,q3e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,j3e=/^[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,M3e=/^[a-z0-9_-]{21}$/i,B3e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,L3e=/^[-+]?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)?)??$/,U3e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,z3e=/^(?:(?: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])$/,H3e=/^(?:(?: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])$/,W3e=/^(([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]))$/,G3e=/^(([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])$/,K3e=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Y3e=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,J3e=new RegExp(`^${az}$`);xn=class xn extends he{_parse(e){if(this._def.coerce)e.data=String(e.data);if(this._getType(e)!==N.string){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:N.string,received:i.parsedType}),Q}let r=new kt,n=void 0;for(let i of this._def.checks)if(i.kind==="min"){if(e.data.length<i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty()}else if(i.kind==="max"){if(e.data.length>i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty()}else if(i.kind==="length"){let s=e.data.length>i.value,o=e.data.length<i.value;if(s||o){if(n=this._getOrReturnCtx(e,n),s)L(n,{code:I.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message});else if(o)L(n,{code:I.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message});r.dirty()}}else if(i.kind==="email"){if(!U3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"email",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="emoji"){if(!Z_)Z_=new RegExp(V3e,"u");if(!Z_.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"emoji",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="uuid"){if(!j3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"uuid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="nanoid"){if(!M3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"nanoid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cuid"){if(!T3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"cuid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cuid2"){if(!N3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"cuid2",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="ulid"){if(!q3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"ulid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),L(n,{validation:"url",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="regex"){if(i.regex.lastIndex=0,!i.regex.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"regex",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="trim")e.data=e.data.trim();else if(i.kind==="includes"){if(!e.data.includes(i.value,i.position))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()}else if(i.kind==="toLowerCase")e.data=e.data.toLowerCase();else if(i.kind==="toUpperCase")e.data=e.data.toUpperCase();else if(i.kind==="startsWith"){if(!e.data.startsWith(i.value))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()}else if(i.kind==="endsWith"){if(!e.data.endsWith(i.value))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()}else if(i.kind==="datetime"){if(!uz(i).test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"datetime",message:i.message}),r.dirty()}else if(i.kind==="date"){if(!J3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"date",message:i.message}),r.dirty()}else if(i.kind==="time"){if(!X3e(i).test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"time",message:i.message}),r.dirty()}else if(i.kind==="duration"){if(!L3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"duration",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="ip"){if(!Q3e(e.data,i.version))n=this._getOrReturnCtx(e,n),L(n,{validation:"ip",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="jwt"){if(!Z3e(e.data,i.alg))n=this._getOrReturnCtx(e,n),L(n,{validation:"jwt",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cidr"){if(!eIe(e.data,i.version))n=this._getOrReturnCtx(e,n),L(n,{validation:"cidr",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="base64"){if(!K3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"base64",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="base64url"){if(!Y3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"base64url",code:I.invalid_string,message:i.message}),r.dirty()}else ve.assertNever(i);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement((n)=>e.test(n),{validation:t,code:I.invalid_string,...G.errToObj(r)})}_addCheck(e){return new xn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...G.errToObj(e)})}url(e){return this._addCheck({kind:"url",...G.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...G.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...G.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...G.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...G.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...G.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...G.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...G.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...G.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...G.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...G.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...G.errToObj(e)})}datetime(e){if(typeof e==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e});return this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...G.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){if(typeof e==="string")return this._addCheck({kind:"time",precision:null,message:e});return this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...G.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...G.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...G.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...G.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...G.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...G.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...G.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...G.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...G.errToObj(t)})}nonempty(e){return this.min(1,G.errToObj(e))}trim(){return new xn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new xn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new xn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e)=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find((e)=>e.kind==="date")}get isTime(){return!!this._def.checks.find((e)=>e.kind==="time")}get isDuration(){return!!this._def.checks.find((e)=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find((e)=>e.kind==="email")}get isURL(){return!!this._def.checks.find((e)=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find((e)=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find((e)=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((e)=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((e)=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((e)=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find((e)=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find((e)=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find((e)=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find((e)=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find((e)=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxLength(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};xn.create=(e)=>new xn({checks:[],typeName:ee.ZodString,coerce:e?.coerce??!1,...le(e)});ks=class ks extends he{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce)e.data=Number(e.data);if(this._getType(e)!==N.number){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:N.number,received:i.parsedType}),Q}let r=void 0,n=new kt;for(let i of this._def.checks)if(i.kind==="int"){if(!ve.isInteger(e.data))r=this._getOrReturnCtx(e,r),L(r,{code:I.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()}else if(i.kind==="min"){if(i.inclusive?e.data<i.value:e.data<=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()}else if(i.kind==="max"){if(i.inclusive?e.data>i.value:e.data>=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()}else if(i.kind==="multipleOf"){if(tIe(e.data,i.value)!==0)r=this._getOrReturnCtx(e,r),L(r,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()}else if(i.kind==="finite"){if(!Number.isFinite(e.data))r=this._getOrReturnCtx(e,r),L(r,{code:I.not_finite,message:i.message}),n.dirty()}else ve.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,G.toString(t))}gt(e,t){return this.setLimit("min",e,!1,G.toString(t))}lte(e,t){return this.setLimit("max",e,!0,G.toString(t))}lt(e,t){return this.setLimit("max",e,!1,G.toString(t))}setLimit(e,t,r,n){return new ks({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:G.toString(n)}]})}_addCheck(e){return new ks({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:G.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:G.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:G.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:G.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:G.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:G.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:G.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:G.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:G.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}get isInt(){return!!this._def.checks.find((e)=>e.kind==="int"||e.kind==="multipleOf"&&ve.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;else if(r.kind==="min"){if(t===null||r.value>t)t=r.value}else if(r.kind==="max"){if(e===null||r.value<e)e=r.value}return Number.isFinite(t)&&Number.isFinite(e)}};ks.create=(e)=>new ks({checks:[],typeName:ee.ZodNumber,coerce:e?.coerce||!1,...le(e)});Ps=class Ps extends he{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==N.bigint)return this._getInvalidInput(e);let r=void 0,n=new kt;for(let i of this._def.checks)if(i.kind==="min"){if(i.inclusive?e.data<i.value:e.data<=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()}else if(i.kind==="max"){if(i.inclusive?e.data>i.value:e.data>=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()}else if(i.kind==="multipleOf"){if(e.data%i.value!==BigInt(0))r=this._getOrReturnCtx(e,r),L(r,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()}else ve.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return L(t,{code:I.invalid_type,expected:N.bigint,received:t.parsedType}),Q}gte(e,t){return this.setLimit("min",e,!0,G.toString(t))}gt(e,t){return this.setLimit("min",e,!1,G.toString(t))}lte(e,t){return this.setLimit("max",e,!0,G.toString(t))}lt(e,t){return this.setLimit("max",e,!1,G.toString(t))}setLimit(e,t,r,n){return new Ps({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:G.toString(n)}]})}_addCheck(e){return new Ps({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:G.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:G.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:G.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:G.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:G.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};Ps.create=(e)=>new Ps({checks:[],typeName:ee.ZodBigInt,coerce:e?.coerce??!1,...le(e)});wc=class wc extends he{_parse(e){if(this._def.coerce)e.data=Boolean(e.data);if(this._getType(e)!==N.boolean){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.boolean,received:r.parsedType}),Q}return Lt(e.data)}};wc.create=(e)=>new wc({typeName:ee.ZodBoolean,coerce:e?.coerce||!1,...le(e)});Oo=class Oo extends he{_parse(e){if(this._def.coerce)e.data=new Date(e.data);if(this._getType(e)!==N.date){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:N.date,received:i.parsedType}),Q}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_date}),Q}let r=new kt,n=void 0;for(let i of this._def.checks)if(i.kind==="min"){if(e.data.getTime()<i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()}else if(i.kind==="max"){if(e.data.getTime()>i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()}else ve.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Oo({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:G.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:G.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e!=null?new Date(e):null}};Oo.create=(e)=>new Oo({checks:[],coerce:e?.coerce||!1,typeName:ee.ZodDate,...le(e)});md=class md extends he{_parse(e){if(this._getType(e)!==N.symbol){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.symbol,received:r.parsedType}),Q}return Lt(e.data)}};md.create=(e)=>new md({typeName:ee.ZodSymbol,...le(e)});Ec=class Ec extends he{_parse(e){if(this._getType(e)!==N.undefined){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.undefined,received:r.parsedType}),Q}return Lt(e.data)}};Ec.create=(e)=>new Ec({typeName:ee.ZodUndefined,...le(e)});Sc=class Sc extends he{_parse(e){if(this._getType(e)!==N.null){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.null,received:r.parsedType}),Q}return Lt(e.data)}};Sc.create=(e)=>new Sc({typeName:ee.ZodNull,...le(e)});Ao=class Ao extends he{constructor(){super(...arguments);this._any=!0}_parse(e){return Lt(e.data)}};Ao.create=(e)=>new Ao({typeName:ee.ZodAny,...le(e)});As=class As extends he{constructor(){super(...arguments);this._unknown=!0}_parse(e){return Lt(e.data)}};As.create=(e)=>new As({typeName:ee.ZodUnknown,...le(e)});Zn=class Zn extends he{_parse(e){let t=this._getOrReturnCtx(e);return L(t,{code:I.invalid_type,expected:N.never,received:t.parsedType}),Q}};Zn.create=(e)=>new Zn({typeName:ee.ZodNever,...le(e)});hd=class hd extends he{_parse(e){if(this._getType(e)!==N.undefined){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.void,received:r.parsedType}),Q}return Lt(e.data)}};hd.create=(e)=>new hd({typeName:ee.ZodVoid,...le(e)});bn=class bn extends he{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==N.array)return L(t,{code:I.invalid_type,expected:N.array,received:t.parsedType}),Q;if(n.exactLength!==null){let s=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;if(s||o)L(t,{code:s?I.too_big:I.too_small,minimum:o?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty()}if(n.minLength!==null){if(t.data.length<n.minLength.value)L(t,{code:I.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()}if(n.maxLength!==null){if(t.data.length>n.maxLength.value)L(t,{code:I.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()}if(t.common.async)return Promise.all([...t.data].map((s,o)=>n.type._parseAsync(new _n(t,s,t.path,o)))).then((s)=>kt.mergeArray(r,s));let i=[...t.data].map((s,o)=>n.type._parseSync(new _n(t,s,t.path,o)));return kt.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new bn({...this._def,minLength:{value:e,message:G.toString(t)}})}max(e,t){return new bn({...this._def,maxLength:{value:e,message:G.toString(t)}})}length(e,t){return new bn({...this._def,exactLength:{value:e,message:G.toString(t)}})}nonempty(e){return this.min(1,e)}};bn.create=(e,t)=>new bn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ee.ZodArray,...le(t)});ut=class ut extends he{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=ve.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==N.object){let c=this._getOrReturnCtx(e);return L(c,{code:I.invalid_type,expected:N.object,received:c.parsedType}),Q}let{status:r,ctx:n}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof Zn&&this._def.unknownKeys==="strip")){for(let c in n.data)if(!s.includes(c))o.push(c)}let a=[];for(let c of s){let l=i[c],d=n.data[c];a.push({key:{status:"valid",value:c},value:l._parse(new _n(n,d,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof Zn){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of o)a.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(c==="strict"){if(o.length>0)L(n,{code:I.unrecognized_keys,keys:o}),r.dirty()}else if(c==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of o){let d=n.data[l];a.push({key:{status:"valid",value:l},value:c._parse(new _n(n,d,n.path,l)),alwaysSet:l in n.data})}}if(n.common.async)return Promise.resolve().then(async()=>{let c=[];for(let l of a){let d=await l.key,f=await l.value;c.push({key:d,value:f,alwaysSet:l.alwaysSet})}return c}).then((c)=>kt.mergeObjectSync(r,c));else return kt.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(e){return G.errToObj,new ut({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;if(t.code==="unrecognized_keys")return{message:G.errToObj(e).message??n};return{message:n}}}:{}})}strip(){return new ut({...this._def,unknownKeys:"strip"})}passthrough(){return new ut({...this._def,unknownKeys:"passthrough"})}extend(e){return new ut({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ut({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ee.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ut({...this._def,catchall:e})}pick(e){let t={};for(let r of ve.objectKeys(e))if(e[r]&&this.shape[r])t[r]=this.shape[r];return new ut({...this._def,shape:()=>t})}omit(e){let t={};for(let r of ve.objectKeys(this.shape))if(!e[r])t[r]=this.shape[r];return new ut({...this._def,shape:()=>t})}deepPartial(){return _c(this)}partial(e){let t={};for(let r of ve.objectKeys(this.shape)){let n=this.shape[r];if(e&&!e[r])t[r]=n;else t[r]=n.optional()}return new ut({...this._def,shape:()=>t})}required(e){let t={};for(let r of ve.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let i=this.shape[r];while(i instanceof vn)i=i._def.innerType;t[r]=i}return new ut({...this._def,shape:()=>t})}keyof(){return lz(ve.objectKeys(this.shape))}};ut.create=(e,t)=>new ut({shape:()=>e,unknownKeys:"strip",catchall:Zn.create(),typeName:ee.ZodObject,...le(t)});ut.strictCreate=(e,t)=>new ut({shape:()=>e,unknownKeys:"strict",catchall:Zn.create(),typeName:ee.ZodObject,...le(t)});ut.lazycreate=(e,t)=>new ut({shape:e,unknownKeys:"strip",catchall:Zn.create(),typeName:ee.ZodObject,...le(t)});$c=class $c extends he{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function n(i){for(let o of i)if(o.result.status==="valid")return o.result;for(let o of i)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let s=i.map((o)=>new xr(o.ctx.common.issues));return L(t,{code:I.invalid_union,unionErrors:s}),Q}if(t.common.async)return Promise.all(r.map(async(i)=>{let s={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);else{let i=void 0,s=[];for(let a of r){let c={...t,common:{...t.common,issues:[]},parent:null},l=a._parseSync({data:t.data,path:t.path,parent:c});if(l.status==="valid")return l;else if(l.status==="dirty"&&!i)i={result:l,ctx:c};if(c.common.issues.length)s.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;let o=s.map((a)=>new xr(a));return L(t,{code:I.invalid_union,unionErrors:o}),Q}}get options(){return this._def.options}};$c.create=(e,t)=>new $c({options:e,typeName:ee.ZodUnion,...le(t)});Em=class Em extends he{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==N.object)return L(t,{code:I.invalid_type,expected:N.object,received:t.parsedType}),Q;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);if(!i)return L(t,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Q;if(t.common.async)return i._parseAsync({data:t.data,path:t.path,parent:t});else return i._parseSync({data:t.data,path:t.path,parent:t})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let i of t){let s=Ri(i.shape[e]);if(!s.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of s){if(n.has(o))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,i)}}return new Em({typeName:ee.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...le(r)})}};Cc=class Cc extends he{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(i,s)=>{if(Dm(i)||Dm(s))return Q;let o=eD(i.value,s.value);if(!o.valid)return L(r,{code:I.invalid_intersection_types}),Q;if(wm(i)||wm(s))t.dirty();return{status:t.value,value:o.data}};if(r.common.async)return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>n(i,s));else return n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Cc.create=(e,t,r)=>new Cc({left:e,right:t,typeName:ee.ZodIntersection,...le(r)});ei=class ei extends he{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.array)return L(r,{code:I.invalid_type,expected:N.array,received:r.parsedType}),Q;if(r.data.length<this._def.items.length)return L(r,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Q;if(!this._def.rest&&r.data.length>this._def.items.length)L(r,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty();let i=[...r.data].map((s,o)=>{let a=this._def.items[o]||this._def.rest;if(!a)return null;return a._parse(new _n(r,s,r.path,o))}).filter((s)=>!!s);if(r.common.async)return Promise.all(i).then((s)=>kt.mergeArray(t,s));else return kt.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new ei({...this._def,rest:e})}};ei.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ei({items:e,typeName:ee.ZodTuple,rest:null,...le(t)})};gd=class gd extends he{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.object)return L(r,{code:I.invalid_type,expected:N.object,received:r.parsedType}),Q;let n=[],i=this._def.keyType,s=this._def.valueType;for(let o in r.data)n.push({key:i._parse(new _n(r,o,r.path,o)),value:s._parse(new _n(r,r.data[o],r.path,o)),alwaysSet:o in r.data});if(r.common.async)return kt.mergeObjectAsync(t,n);else return kt.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){if(t instanceof he)return new gd({keyType:e,valueType:t,typeName:ee.ZodRecord,...le(r)});return new gd({keyType:xn.create(),valueType:e,typeName:ee.ZodRecord,...le(t)})}};yd=class yd extends he{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.map)return L(r,{code:I.invalid_type,expected:N.map,received:r.parsedType}),Q;let n=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([o,a],c)=>({key:n._parse(new _n(r,o,r.path,[c,"key"])),value:i._parse(new _n(r,a,r.path,[c,"value"]))}));if(r.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let a of s){let c=await a.key,l=await a.value;if(c.status==="aborted"||l.status==="aborted")return Q;if(c.status==="dirty"||l.status==="dirty")t.dirty();o.set(c.value,l.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let a of s){let{key:c,value:l}=a;if(c.status==="aborted"||l.status==="aborted")return Q;if(c.status==="dirty"||l.status==="dirty")t.dirty();o.set(c.value,l.value)}return{status:t.value,value:o}}}};yd.create=(e,t,r)=>new yd({valueType:t,keyType:e,typeName:ee.ZodMap,...le(r)});ko=class ko extends he{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.set)return L(r,{code:I.invalid_type,expected:N.set,received:r.parsedType}),Q;let n=this._def;if(n.minSize!==null){if(r.data.size<n.minSize.value)L(r,{code:I.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()}if(n.maxSize!==null){if(r.data.size>n.maxSize.value)L(r,{code:I.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty()}let i=this._def.valueType;function s(a){let c=new Set;for(let l of a){if(l.status==="aborted")return Q;if(l.status==="dirty")t.dirty();c.add(l.value)}return{status:t.value,value:c}}let o=[...r.data.values()].map((a,c)=>i._parse(new _n(r,a,r.path,c)));if(r.common.async)return Promise.all(o).then((a)=>s(a));else return s(o)}min(e,t){return new ko({...this._def,minSize:{value:e,message:G.toString(t)}})}max(e,t){return new ko({...this._def,maxSize:{value:e,message:G.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};ko.create=(e,t)=>new ko({valueType:e,minSize:null,maxSize:null,typeName:ee.ZodSet,...le(t)});Dc=class Dc extends he{constructor(){super(...arguments);this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==N.function)return L(t,{code:I.invalid_type,expected:N.function,received:t.parsedType}),Q;function r(o,a){return pd({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,bc(),Fi].filter((c)=>!!c),issueData:{code:I.invalid_arguments,argumentsError:a}})}function n(o,a){return pd({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,bc(),Fi].filter((c)=>!!c),issueData:{code:I.invalid_return_type,returnTypeError:a}})}let i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof Po){let o=this;return Lt(async function(...a){let c=new xr([]),l=await o._def.args.parseAsync(a,i).catch((m)=>{throw c.addIssue(r(a,m)),c}),d=await Reflect.apply(s,this,l);return await o._def.returns._def.type.parseAsync(d,i).catch((m)=>{throw c.addIssue(n(d,m)),c})})}else{let o=this;return Lt(function(...a){let c=o._def.args.safeParse(a,i);if(!c.success)throw new xr([r(a,c.error)]);let l=Reflect.apply(s,this,c.data),d=o._def.returns.safeParse(l,i);if(!d.success)throw new xr([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Dc({...this._def,args:ei.create(e).rest(As.create())})}returns(e){return new Dc({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new Dc({args:e?e:ei.create([]).rest(As.create()),returns:t||As.create(),typeName:ee.ZodFunction,...le(r)})}};Fc=class Fc extends he{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Fc.create=(e,t)=>new Fc({getter:e,typeName:ee.ZodLazy,...le(t)});Rc=class Rc extends he{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return L(t,{received:t.data,code:I.invalid_literal,expected:this._def.value}),Q}return{status:"valid",value:e.data}}get value(){return this._def.value}};Rc.create=(e,t)=>new Rc({value:e,typeName:ee.ZodLiteral,...le(t)});Is=class Is extends he{_parse(e){if(typeof e.data!=="string"){let t=this._getOrReturnCtx(e),r=this._def.values;return L(t,{expected:ve.joinValues(r),received:t.parsedType,code:I.invalid_type}),Q}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return L(t,{received:t.data,code:I.invalid_enum_value,options:r}),Q}return Lt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Is.create(e,{...this._def,...t})}exclude(e,t=this._def){return Is.create(this.options.filter((r)=>!e.includes(r)),{...this._def,...t})}};Is.create=lz;Oc=class Oc extends he{_parse(e){let t=ve.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==N.string&&r.parsedType!==N.number){let n=ve.objectValues(t);return L(r,{expected:ve.joinValues(n),received:r.parsedType,code:I.invalid_type}),Q}if(!this._cache)this._cache=new Set(ve.getValidEnumValues(this._def.values));if(!this._cache.has(e.data)){let n=ve.objectValues(t);return L(r,{received:r.data,code:I.invalid_enum_value,options:n}),Q}return Lt(e.data)}get enum(){return this._def.values}};Oc.create=(e,t)=>new Oc({values:e,typeName:ee.ZodNativeEnum,...le(t)});Po=class Po extends he{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==N.promise&&t.common.async===!1)return L(t,{code:I.invalid_type,expected:N.promise,received:t.parsedType}),Q;let r=t.parsedType===N.promise?t.data:Promise.resolve(t.data);return Lt(r.then((n)=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Po.create=(e,t)=>new Po({type:e,typeName:ee.ZodPromise,...le(t)});Dn=class Dn extends he{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:(s)=>{if(L(r,s),s.fatal)t.abort();else t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async(o)=>{if(t.value==="aborted")return Q;let a=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});if(a.status==="aborted")return Q;if(a.status==="dirty")return Ro(a.value);if(t.value==="dirty")return Ro(a.value);return a});else{if(t.value==="aborted")return Q;let o=this._def.schema._parseSync({data:s,path:r.path,parent:r});if(o.status==="aborted")return Q;if(o.status==="dirty")return Ro(o.value);if(t.value==="dirty")return Ro(o.value);return o}}if(n.type==="refinement"){let s=(o)=>{let a=n.refinement(o,i);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){let o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(o.status==="aborted")return Q;if(o.status==="dirty")t.dirty();return s(o.value),{status:t.value,value:o.value}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((o)=>{if(o.status==="aborted")return Q;if(o.status==="dirty")t.dirty();return s(o.value).then(()=>({status:t.value,value:o.value}))})}if(n.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Os(s))return Q;let o=n.transform(s.value,i);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((s)=>{if(!Os(s))return Q;return Promise.resolve(n.transform(s.value,i)).then((o)=>({status:t.value,value:o}))});ve.assertNever(n)}};Dn.create=(e,t,r)=>new Dn({schema:e,typeName:ee.ZodEffects,effect:t,...le(r)});Dn.createWithPreprocess=(e,t,r)=>new Dn({schema:t,effect:{type:"preprocess",transform:e},typeName:ee.ZodEffects,...le(r)});vn=class vn extends he{_parse(e){if(this._getType(e)===N.undefined)return Lt(void 0);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};vn.create=(e,t)=>new vn({innerType:e,typeName:ee.ZodOptional,...le(t)});Oi=class Oi extends he{_parse(e){if(this._getType(e)===N.null)return Lt(null);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Oi.create=(e,t)=>new Oi({innerType:e,typeName:ee.ZodNullable,...le(t)});Ac=class Ac extends he{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;if(t.parsedType===N.undefined)r=this._def.defaultValue();return this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Ac.create=(e,t)=>new Ac({innerType:e,typeName:ee.ZodDefault,defaultValue:typeof t.default==="function"?t.default:()=>t.default,...le(t)});kc=class kc extends he{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});if(vc(n))return n.then((i)=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new xr(r.common.issues)},input:r.data})}));else return{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new xr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};kc.create=(e,t)=>new kc({innerType:e,typeName:ee.ZodCatch,catchValue:typeof t.catch==="function"?t.catch:()=>t.catch,...le(t)});xd=class xd extends he{_parse(e){if(this._getType(e)!==N.nan){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.nan,received:r.parsedType}),Q}return{status:"valid",value:e.data}}};xd.create=(e)=>new xd({typeName:ee.ZodNaN,...le(e)});rIe=Symbol("zod_brand");Sm=class Sm extends he{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}};bd=class bd extends he{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});if(i.status==="aborted")return Q;if(i.status==="dirty")return t.dirty(),Ro(i.value);else return this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();else{let n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});if(n.status==="aborted")return Q;if(n.status==="dirty")return t.dirty(),{status:"dirty",value:n.value};else return this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new bd({in:e,out:t,typeName:ee.ZodPipeline})}};Pc=class Pc extends he{_parse(e){let t=this._def.innerType._parse(e),r=(n)=>{if(Os(n))n.value=Object.freeze(n.value);return n};return vc(t)?t.then((n)=>r(n)):r(t)}unwrap(){return this._def.innerType}};Pc.create=(e,t)=>new Pc({innerType:e,typeName:ee.ZodReadonly,...le(t)});nIe={object:ut.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ee||(ee={}));fz=xn.create,pz=ks.create,sIe=xd.create,oIe=Ps.create,mz=wc.create,aIe=Oo.create,cIe=md.create,uIe=Ec.create,lIe=Sc.create,dIe=Ao.create,fIe=As.create,pIe=Zn.create,mIe=hd.create,hIe=bn.create,gIe=ut.create,yIe=ut.strictCreate,xIe=$c.create,bIe=Em.create,vIe=Cc.create,_Ie=ei.create,DIe=gd.create,wIe=yd.create,EIe=ko.create,SIe=Dc.create,$Ie=Fc.create,CIe=Rc.create,FIe=Is.create,RIe=Oc.create,OIe=Po.create,AIe=Dn.create,kIe=vn.create,PIe=Oi.create,IIe=Dn.createWithPreprocess,TIe=bd.create,MIe={string:(e)=>xn.create({...e,coerce:!0}),number:(e)=>ks.create({...e,coerce:!0}),boolean:(e)=>wc.create({...e,coerce:!0}),bigint:(e)=>Ps.create({...e,coerce:!0}),date:(e)=>Oo.create({...e,coerce:!0})},BIe=Q});var S={};ji(S,{BRAND:()=>rIe,DIRTY:()=>Ro,EMPTY_PATH:()=>I3e,INVALID:()=>Q,NEVER:()=>BIe,OK:()=>Lt,ParseStatus:()=>kt,Schema:()=>he,ZodAny:()=>Ao,ZodArray:()=>bn,ZodBigInt:()=>Ps,ZodBoolean:()=>wc,ZodBranded:()=>Sm,ZodCatch:()=>kc,ZodDate:()=>Oo,ZodDefault:()=>Ac,ZodDiscriminatedUnion:()=>Em,ZodEffects:()=>Dn,ZodEnum:()=>Is,ZodError:()=>xr,ZodFirstPartyTypeKind:()=>ee,ZodFunction:()=>Dc,ZodIntersection:()=>Cc,ZodIssueCode:()=>I,ZodLazy:()=>Fc,ZodLiteral:()=>Rc,ZodMap:()=>yd,ZodNaN:()=>xd,ZodNativeEnum:()=>Oc,ZodNever:()=>Zn,ZodNull:()=>Sc,ZodNullable:()=>Oi,ZodNumber:()=>ks,ZodObject:()=>ut,ZodOptional:()=>vn,ZodParsedType:()=>N,ZodPipeline:()=>bd,ZodPromise:()=>Po,ZodReadonly:()=>Pc,ZodRecord:()=>gd,ZodSchema:()=>he,ZodSet:()=>ko,ZodString:()=>xn,ZodSymbol:()=>md,ZodTransformer:()=>Dn,ZodTuple:()=>ei,ZodType:()=>he,ZodUndefined:()=>Ec,ZodUnion:()=>$c,ZodUnknown:()=>As,ZodVoid:()=>hd,addIssueToContext:()=>L,any:()=>dIe,array:()=>hIe,bigint:()=>oIe,boolean:()=>mz,coerce:()=>MIe,custom:()=>dz,date:()=>aIe,datetimeRegex:()=>uz,defaultErrorMap:()=>Fi,discriminatedUnion:()=>bIe,effect:()=>AIe,enum:()=>FIe,function:()=>SIe,getErrorMap:()=>bc,getParsedType:()=>Qn,instanceof:()=>iIe,intersection:()=>vIe,isAborted:()=>Dm,isAsync:()=>vc,isDirty:()=>wm,isValid:()=>Os,late:()=>nIe,lazy:()=>$Ie,literal:()=>CIe,makeIssue:()=>pd,map:()=>wIe,nan:()=>sIe,nativeEnum:()=>RIe,never:()=>pIe,null:()=>lIe,nullable:()=>PIe,number:()=>pz,object:()=>gIe,objectUtil:()=>J_,oboolean:()=>jIe,onumber:()=>qIe,optional:()=>kIe,ostring:()=>NIe,pipeline:()=>TIe,preprocess:()=>IIe,promise:()=>OIe,quotelessJson:()=>A3e,record:()=>DIe,set:()=>EIe,setErrorMap:()=>P3e,strictObject:()=>yIe,string:()=>fz,symbol:()=>cIe,transformer:()=>AIe,tuple:()=>_Ie,undefined:()=>uIe,union:()=>xIe,unknown:()=>fIe,util:()=>ve,void:()=>mIe});var tD=A(()=>{_m();Q_();nz();fd();hz();vm()});var Ic=A(()=>{tD();tD()});import{copyFileSync as LIe,existsSync as gz,mkdirSync as UIe}from"fs";import{homedir as Cm}from"os";import{join as Tc}from"path";function zIe(e){let t=e.trim().replace(/\/+$/,"");try{let r=new URL(t);return r.protocol=r.protocol.toLowerCase(),r.host=r.host.toLowerCase(),r.toString().replace(/\/+$/,"")}catch{return console.error(`[nemar] could not parse stored apiUrl ${JSON.stringify(e)}; leaving as-is`),t}}function HIe(){return process.env.NEMAR_CONFIG_DIR||Tc(Cm(),".config","nemar")}function WIe(e){if(process.env.NEMAR_CONFIG_DIR)return;let t=Tc(e,"config.json");if(gz(t))return;let r=[];if(process.platform==="darwin")r.push(Tc(Cm(),"Library","Preferences","nemar-nodejs","config.json"));if(process.platform==="win32"){let n=process.env.APPDATA||Tc(Cm(),"AppData","Roaming");r.push(Tc(n,"nemar-nodejs","config.json"))}r.push(Tc(Cm(),".config","nemar-nodejs","config.json"));for(let n of r)if(gz(n))try{UIe(e,{recursive:!0}),LIe(n,t),console.error(`[nemar] Config migrated from ${n} to ${t}
|
|
98
|
+
deps: ${r}}`};var WAe={keyword:"dependencies",type:"object",schemaType:"object",error:JB.error,code(e){let[t,r]=GAe(e);KB(e,t),YB(e,r)}};function GAe({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}function KB(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let o in t){let a=t[o];if(a.length===0)continue;let c=(0,ed.propertyInData)(r,n,o,i.opts.ownProperties);if(e.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),i.allErrors)r.if(c,()=>{for(let l of a)(0,ed.checkReportMissingProp)(e,l)});else r.if(w_._`${c} && (${(0,ed.checkMissingProp)(e,a,s)})`),(0,ed.reportMissingProp)(e,s),r.else()}}JB.validatePropertyDeps=KB;function YB(e,t=e.schema){let{gen:r,data:n,keyword:i,it:s}=e,o=r.name("valid");for(let a in t){if((0,HAe.alwaysValidSchema)(s,t[a]))continue;r.if((0,ed.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:a},o);e.mergeValidEvaluated(c,o)},()=>r.var(o,!0)),e.ok(o)}}JB.validateSchemaDeps=YB;JB.default=WAe});var rL=h(function(tL){Object.defineProperty(tL,"__esModule",{value:!0});var eL=me(),JAe=Ie(),XAe={message:"property name must be valid",params:({params:e})=>eL._`{propertyName: ${e.propertyName}}`},QAe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:XAe,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,JAe.alwaysValidSchema)(i,r))return;let s=t.name("valid");t.forIn("key",n,(o)=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,eL.not)(s),()=>{if(e.error(!0),!i.allErrors)t.break()})}),e.ok(s)}};tL.default=QAe});var E_=h(function(nL){Object.defineProperty(nL,"__esModule",{value:!0});var X0=zr(),hn=me(),eke=Si(),Q0=Ie(),tke={message:"must NOT have additional properties",params:({params:e})=>hn._`{additionalProperty: ${e.additionalProperty}}`},rke={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:tke,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:o}=e;if(!s)throw Error("ajv implementation error");let{allErrors:a,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,Q0.alwaysValidSchema)(o,r))return;let l=(0,X0.allSchemaProperties)(n.properties),d=(0,X0.allSchemaProperties)(n.patternProperties);f(),e.ok(hn._`${s} === ${eke.default.errors}`);function f(){t.forIn("key",i,(x)=>{if(!l.length&&!d.length)g(x);else t.if(m(x),()=>g(x))})}function m(x){let v;if(l.length>8){let _=(0,Q0.schemaRefOrVal)(o,n.properties,"properties");v=(0,X0.isOwnProperty)(t,_,x)}else if(l.length)v=(0,hn.or)(...l.map((_)=>hn._`${x} === ${_}`));else v=hn.nil;if(d.length)v=(0,hn.or)(v,...d.map((_)=>hn._`${(0,X0.usePattern)(e,_)}.test(${x})`));return(0,hn.not)(v)}function p(x){t.code(hn._`delete ${i}[${x}]`)}function g(x){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(x);return}if(r===!1){if(e.setParams({additionalProperty:x}),e.error(),!a)t.break();return}if(typeof r=="object"&&!(0,Q0.alwaysValidSchema)(o,r)){let v=t.name("valid");if(c.removeAdditional==="failing")y(x,v,!1),t.if((0,hn.not)(v),()=>{e.reset(),p(x)});else if(y(x,v),!a)t.if((0,hn.not)(v),()=>t.break())}}function y(x,v,_){let S={keyword:"additionalProperties",dataProp:x,dataPropType:Q0.Type.Str};if(_===!1)Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1});e.subschema(S,v)}}};nL.default=rke});var aL=h(function(oL){Object.defineProperty(oL,"__esModule",{value:!0});var ike=Vl(),iL=zr(),S_=Ie(),sL=E_(),ske={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;if(s.opts.removeAdditional==="all"&&n.additionalProperties===void 0)sL.default.code(new ike.KeywordCxt(s,sL.default,"additionalProperties"));let o=(0,iL.allSchemaProperties)(r);for(let f of o)s.definedProperties.add(f);if(s.opts.unevaluated&&o.length&&s.props!==!0)s.props=S_.mergeEvaluated.props(t,(0,S_.toHash)(o),s.props);let a=o.filter((f)=>!(0,S_.alwaysValidSchema)(s,r[f]));if(a.length===0)return;let c=t.name("valid");for(let f of a){if(l(f))d(f);else{if(t.if((0,iL.propertyInData)(t,i,f,s.opts.ownProperties)),d(f),!s.allErrors)t.else().var(c,!0);t.endIf()}e.it.definedProperties.add(f),e.ok(c)}function l(f){return s.opts.useDefaults&&!s.compositeRule&&r[f].default!==void 0}function d(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};oL.default=ske});var fL=h(function(dL){Object.defineProperty(dL,"__esModule",{value:!0});var cL=zr(),Z0=me(),uL=Ie(),lL=Ie(),ake={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:o}=s,a=(0,cL.allSchemaProperties)(r),c=a.filter((y)=>(0,uL.alwaysValidSchema)(s,r[y]));if(a.length===0||c.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let l=o.strictSchema&&!o.allowMatchingProperties&&i.properties,d=t.name("valid");if(s.props!==!0&&!(s.props instanceof Z0.Name))s.props=(0,lL.evaluatedPropsToName)(t,s.props);let{props:f}=s;m();function m(){for(let y of a){if(l)p(y);if(s.allErrors)g(y);else t.var(d,!0),g(y),t.if(d)}}function p(y){for(let x in l)if(new RegExp(y).test(x))(0,uL.checkStrictMode)(s,`property ${x} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){t.forIn("key",n,(x)=>{t.if(Z0._`${(0,cL.usePattern)(e,y)}.test(${x})`,()=>{let v=c.includes(y);if(!v)e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:x,dataPropType:lL.Type.Str},d);if(s.opts.unevaluated&&f!==!0)t.assign(Z0._`${f}[${x}]`,!0);else if(!v&&!s.allErrors)t.if((0,Z0.not)(d),()=>t.break())})})}}};dL.default=ake});var mL=h(function(pL){Object.defineProperty(pL,"__esModule",{value:!0});var uke=Ie(),lke={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,uke.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};pL.default=lke});var gL=h(function(hL){Object.defineProperty(hL,"__esModule",{value:!0});var fke=zr(),pke={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fke.validateUnion,error:{message:"must match a schema in anyOf"}};hL.default=pke});var xL=h(function(yL){Object.defineProperty(yL,"__esModule",{value:!0});var em=me(),hke=Ie(),gke={message:"must match exactly one schema in oneOf",params:({params:e})=>em._`{passingSchemas: ${e.passing}}`},yke={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:gke,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let s=r,o=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(l),e.result(o,()=>e.reset(),()=>e.error(!0));function l(){s.forEach((d,f)=>{let m;if((0,hke.alwaysValidSchema)(i,d))t.var(c,!0);else m=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c);if(f>0)t.if(em._`${c} && ${o}`).assign(o,!1).assign(a,em._`[${a}, ${f}]`).else();t.if(c,()=>{if(t.assign(o,!0),t.assign(a,f),m)e.mergeEvaluated(m,em.Name)})})}}};yL.default=yke});var vL=h(function(bL){Object.defineProperty(bL,"__esModule",{value:!0});var bke=Ie(),vke={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let i=t.name("valid");r.forEach((s,o)=>{if((0,bke.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:o},i);e.ok(i),e.mergeEvaluated(a)})}};bL.default=vke});var EL=h(function(wL){Object.defineProperty(wL,"__esModule",{value:!0});var tm=me(),DL=Ie(),Dke={message:({params:e})=>tm.str`must match "${e.ifClause}" schema`,params:({params:e})=>tm._`{failingKeyword: ${e.ifClause}}`},wke={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Dke,code(e){let{gen:t,parentSchema:r,it:n}=e;if(r.then===void 0&&r.else===void 0)(0,DL.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=_L(n,"then"),s=_L(n,"else");if(!i&&!s)return;let o=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),i&&s){let d=t.let("ifClause");e.setParams({ifClause:d}),t.if(a,l("then",d),l("else",d))}else if(i)t.if(a,l("then"));else t.if((0,tm.not)(a),l("else"));e.pass(o,()=>e.error(!0));function c(){let d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(d)}function l(d,f){return()=>{let m=e.subschema({keyword:d},a);if(t.assign(o,a),e.mergeValidEvaluated(m,o),f)t.assign(f,tm._`${d}`);else e.setParams({ifClause:d})}}}};function _L(e,t){let r=e.schema[t];return r!==void 0&&!(0,DL.alwaysValidSchema)(e,r)}wL.default=wke});var $L=h(function(SL){Object.defineProperty(SL,"__esModule",{value:!0});var Ske=Ie(),$ke={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)(0,Ske.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};SL.default=$ke});var FL=h(function(CL){Object.defineProperty(CL,"__esModule",{value:!0});var Fke=__(),Rke=UB(),Oke=D_(),Ake=HB(),kke=GB(),Pke=ZB(),Ike=rL(),Tke=E_(),Nke=aL(),qke=fL(),jke=mL(),Mke=gL(),Bke=xL(),Lke=vL(),Uke=EL(),Vke=$L();function zke(e=!1){let t=[jke.default,Mke.default,Bke.default,Lke.default,Uke.default,Vke.default,Ike.default,Tke.default,Pke.default,Nke.default,qke.default];if(e)t.push(Rke.default,Ake.default);else t.push(Fke.default,Oke.default);return t.push(kke.default),t}CL.default=zke});var OL=h(function(RL){Object.defineProperty(RL,"__esModule",{value:!0});var mt=me(),Wke={message:({schemaCode:e})=>mt.str`must match format "${e}"`,params:({schemaCode:e})=>mt._`{format: ${e}}`},Gke={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Wke,code(e,t){let{gen:r,data:n,$data:i,schema:s,schemaCode:o,it:a}=e,{opts:c,errSchemaPath:l,schemaEnv:d,self:f}=a;if(!c.validateFormats)return;if(i)m();else p();function m(){let g=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),y=r.const("fDef",mt._`${g}[${o}]`),x=r.let("fType"),v=r.let("format");r.if(mt._`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(x,mt._`${y}.type || "string"`).assign(v,mt._`${y}.validate`),()=>r.assign(x,mt._`"string"`).assign(v,y)),e.fail$data((0,mt.or)(_(),S()));function _(){if(c.strictSchema===!1)return mt.nil;return mt._`${o} && !${v}`}function S(){let C=d.$async?mt._`(${y}.async ? await ${v}(${n}) : ${v}(${n}))`:mt._`${v}(${n})`,D=mt._`(typeof ${v} == "function" ? ${C} : ${v}.test(${n}))`;return mt._`${v} && ${v} !== true && ${x} === ${t} && !${D}`}}function p(){let g=f.formats[s];if(!g){_();return}if(g===!0)return;let[y,x,v]=S(g);if(y===t)e.pass(C());function _(){if(c.strictSchema===!1){f.logger.warn(D());return}throw Error(D());function D(){return`unknown format "${s}" ignored in schema at path "${l}"`}}function S(D){let O=D instanceof RegExp?(0,mt.regexpCode)(D):c.code.formats?mt._`${c.code.formats}${(0,mt.getProperty)(s)}`:void 0,F=r.scopeValue("formats",{key:s,ref:D,code:O});if(typeof D=="object"&&!(D instanceof RegExp))return[D.type||"string",D.validate,mt._`${F}.validate`];return["string",D,F]}function C(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw Error("async format in sync schema");return mt._`await ${v}(${n})`}return typeof x=="function"?mt._`${v}(${n})`:mt._`${v}.test(${n})`}}}};RL.default=Gke});var kL=h(function(AL){Object.defineProperty(AL,"__esModule",{value:!0});var Yke=OL(),Jke=[Yke.default];AL.default=Jke});var TL=h(function(PL){Object.defineProperty(PL,"__esModule",{value:!0});PL.contentVocabulary=PL.metadataVocabulary=void 0;PL.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];PL.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var jL=h(function(qL){Object.defineProperty(qL,"__esModule",{value:!0});var Zke=oB(),ePe=PB(),tPe=FL(),rPe=kL(),NL=TL(),nPe=[Zke.default,ePe.default,(0,tPe.default)(),rPe.default,NL.metadataVocabulary,NL.contentVocabulary];qL.default=nPe});var UL=h(function(BL){Object.defineProperty(BL,"__esModule",{value:!0});BL.DiscrError=void 0;var ML;(function(e){e.Tag="tag",e.Mapping="mapping"})(ML||(BL.DiscrError=ML={}))});var HL=h(function(zL){Object.defineProperty(zL,"__esModule",{value:!0});var mc=me(),$_=UL(),VL=B0(),sPe=zl(),oPe=Ie(),aPe={message:({params:{discrError:e,tagName:t}})=>e===$_.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>mc._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},cPe={keyword:"discriminator",type:"object",schemaType:"object",error:aPe,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:o}=i;if(!s.opts.discriminator)throw Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw Error("discriminator: requires propertyName");if(n.mapping)throw Error("discriminator: mapping is not supported");if(!o)throw Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",mc._`${r}${(0,mc.getProperty)(a)}`);t.if(mc._`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:$_.DiscrError.Tag,tag:l,tagName:a})),e.ok(c);function d(){let p=m();t.if(!1);for(let g in p)t.elseIf(mc._`${l} === ${g}`),t.assign(c,f(p[g]));t.else(),e.error(!1,{discrError:$_.DiscrError.Mapping,tag:l,tagName:a}),t.endIf()}function f(p){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:p},g);return e.mergeEvaluated(y,mc.Name),g}function m(){var p;let g={},y=v(i),x=!0;for(let C=0;C<o.length;C++){let D=o[C];if((D===null||D===void 0?void 0:D.$ref)&&!(0,oPe.schemaHasRulesButRef)(D,s.self.RULES)){let F=D.$ref;if(D=VL.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,F),D instanceof VL.SchemaEnv)D=D.schema;if(D===void 0)throw new sPe.default(s.opts.uriResolver,s.baseId,F)}let O=(p=D===null||D===void 0?void 0:D.properties)===null||p===void 0?void 0:p[a];if(typeof O!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);x=x&&(y||v(D)),_(O,C)}if(!x)throw Error(`discriminator: "${a}" must be required`);return g;function v({required:C}){return Array.isArray(C)&&C.includes(a)}function _(C,D){if(C.const)S(C.const,D);else if(C.enum)for(let O of C.enum)S(O,D);else throw Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(C,D){if(typeof C!="string"||C in g)throw Error(`discriminator: "${a}" values must be unique strings`);g[C]=D}}}};zL.default=cPe});var WL=h(function(rJe,lPe){lPe.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 KL=h(function(yr,C_){Object.defineProperty(yr,"__esModule",{value:!0});yr.MissingRefError=yr.ValidationError=yr.CodeGen=yr.Name=yr.nil=yr.stringify=yr.str=yr._=yr.KeywordCxt=yr.Ajv=void 0;var dPe=JM(),fPe=jL(),pPe=HL(),GL=WL(),mPe=["/properties"],rm="http://json-schema.org/draft-07/schema";class td extends dPe.default{_addVocabularies(){if(super._addVocabularies(),fPe.default.forEach((e)=>this.addVocabulary(e)),this.opts.discriminator)this.addKeyword(pPe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(GL,mPe):GL;this.addMetaSchema(e,rm,!1),this.refs["http://json-schema.org/schema"]=rm}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(rm)?rm:void 0)}}yr.Ajv=td;C_.exports=yr=td;C_.exports.Ajv=td;Object.defineProperty(yr,"__esModule",{value:!0});yr.default=td;var hPe=Vl();Object.defineProperty(yr,"KeywordCxt",{enumerable:!0,get:function(){return hPe.KeywordCxt}});var hc=me();Object.defineProperty(yr,"_",{enumerable:!0,get:function(){return hc._}});Object.defineProperty(yr,"str",{enumerable:!0,get:function(){return hc.str}});Object.defineProperty(yr,"stringify",{enumerable:!0,get:function(){return hc.stringify}});Object.defineProperty(yr,"nil",{enumerable:!0,get:function(){return hc.nil}});Object.defineProperty(yr,"Name",{enumerable:!0,get:function(){return hc.Name}});Object.defineProperty(yr,"CodeGen",{enumerable:!0,get:function(){return hc.CodeGen}});var gPe=j0();Object.defineProperty(yr,"ValidationError",{enumerable:!0,get:function(){return gPe.default}});var yPe=zl();Object.defineProperty(yr,"MissingRefError",{enumerable:!0,get:function(){return yPe.default}})});var JL=h(function(YL){Object.defineProperty(YL,"__esModule",{value:!0});YL.formatLimitDefinition=void 0;var vPe=KL(),gn=me(),Rs=gn.operators,nm={formatMaximum:{okStr:"<=",ok:Rs.LTE,fail:Rs.GT},formatMinimum:{okStr:">=",ok:Rs.GTE,fail:Rs.LT},formatExclusiveMaximum:{okStr:"<",ok:Rs.LT,fail:Rs.GTE},formatExclusiveMinimum:{okStr:">",ok:Rs.GT,fail:Rs.LTE}},_Pe={message:({keyword:e,schemaCode:t})=>gn.str`should be ${nm[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>gn._`{comparison: ${nm[e].okStr}, limit: ${t}}`};YL.formatLimitDefinition={keyword:Object.keys(nm),type:"string",schemaType:"string",$data:!0,error:_Pe,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:s}=e,{opts:o,self:a}=s;if(!o.validateFormats)return;let c=new vPe.KeywordCxt(s,a.RULES.all.format.definition,"format");if(c.$data)l();else d();function l(){let m=t.scopeValue("formats",{ref:a.formats,code:o.code.formats}),p=t.const("fmt",gn._`${m}[${c.schemaCode}]`);e.fail$data((0,gn.or)(gn._`typeof ${p} != "object"`,gn._`${p} instanceof RegExp`,gn._`typeof ${p}.compare != "function"`,f(p)))}function d(){let m=c.schema,p=a.formats[m];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw Error(`"${i}": format "${m}" does not define "compare" function`);let g=t.scopeValue("formats",{key:m,ref:p,code:o.code.formats?gn._`${o.code.formats}${(0,gn.getProperty)(m)}`:void 0});e.fail$data(f(g))}function f(m){return gn._`${m}.compare(${r}, ${n}) ${nm[i].fail} 0`}},dependencies:["format"]};var DPe=(e)=>(e.addKeyword(YL.formatLimitDefinition),e);YL.default=DPe});var eU=h(function(rd,ZL){Object.defineProperty(rd,"__esModule",{value:!0});var gc=Kq(),EPe=JL(),R_=me(),XL=new R_.Name("fullFormats"),SPe=new R_.Name("fastFormats"),O_=(e,t={keywords:!0})=>{if(Array.isArray(t))return QL(e,t,gc.fullFormats,XL),e;let[r,n]=t.mode==="fast"?[gc.fastFormats,SPe]:[gc.fullFormats,XL],i=t.formats||gc.formatNames;if(QL(e,i,r,n),t.keywords)(0,EPe.default)(e);return e};O_.get=(e,t="full")=>{let n=(t==="fast"?gc.fastFormats:gc.fullFormats)[e];if(!n)throw Error(`Unknown format "${e}"`);return n};function QL(e,t,r,n){var i,s;(i=(s=e.opts.code).formats)!==null&&i!==void 0||(s.formats=R_._`require("ajv-formats/dist/formats").${n}`);for(let o of t)e.addFormat(o,r[o])}ZL.exports=rd=O_;Object.defineProperty(rd,"__esModule",{value:!0});rd.default=O_});var $Pe=(e,t={})=>{if(typeof e!=="function")throw TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);let{wait:r=0,maxWait:n=Number.POSITIVE_INFINITY,before:i=!1,after:s=!0}=t;if(r<0||n<0)throw RangeError("`wait` and `maxWait` must not be negative.");if(!i&&!s)throw Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,c,l=function(...d){let f=this,m=()=>{if(o=void 0,a)clearTimeout(a),a=void 0;if(s)c=e.apply(f,d)},p=()=>{if(a=void 0,o)clearTimeout(o),o=void 0;if(s)c=e.apply(f,d)},g=i&&!o;if(clearTimeout(o),o=setTimeout(m,r),n>0&&n!==Number.POSITIVE_INFINITY&&!a)a=setTimeout(p,n);if(g)c=e.apply(f,d);return c};return il(l,e),l.cancel=()=>{if(o)clearTimeout(o),o=void 0;if(a)clearTimeout(a),a=void 0},l},A_;var tU=A(()=>{ab();A_=$Pe});var nd=h(function(mJe,rU){var CPe=Number.MAX_SAFE_INTEGER||9007199254740991,FPe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];rU.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:CPe,RELEASE_TYPES:FPe,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var id=h(function(hJe,nU){var RPe=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};nU.exports=RPe});var yc=h(function(Xn,iU){var{MAX_SAFE_COMPONENT_LENGTH:k_,MAX_SAFE_BUILD_LENGTH:OPe,MAX_LENGTH:APe}=nd(),kPe=id();Xn=iU.exports={};var PPe=Xn.re=[],IPe=Xn.safeRe=[],z=Xn.src=[],TPe=Xn.safeSrc=[],H=Xn.t={},NPe=0,P_="[a-zA-Z0-9-]",qPe=[["\\s",1],["\\d",APe],[P_,OPe]],jPe=(e)=>{for(let[t,r]of qPe)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},oe=(e,t,r)=>{let n=jPe(t),i=NPe++;kPe(e,i,t),H[e]=i,z[i]=t,TPe[i]=n,PPe[i]=new RegExp(t,r?"g":void 0),IPe[i]=new RegExp(n,r?"g":void 0)};oe("NUMERICIDENTIFIER","0|[1-9]\\d*");oe("NUMERICIDENTIFIERLOOSE","\\d+");oe("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${P_}*`);oe("MAINVERSION",`(${z[H.NUMERICIDENTIFIER]})\\.(${z[H.NUMERICIDENTIFIER]})\\.(${z[H.NUMERICIDENTIFIER]})`);oe("MAINVERSIONLOOSE",`(${z[H.NUMERICIDENTIFIERLOOSE]})\\.(${z[H.NUMERICIDENTIFIERLOOSE]})\\.(${z[H.NUMERICIDENTIFIERLOOSE]})`);oe("PRERELEASEIDENTIFIER",`(?:${z[H.NONNUMERICIDENTIFIER]}|${z[H.NUMERICIDENTIFIER]})`);oe("PRERELEASEIDENTIFIERLOOSE",`(?:${z[H.NONNUMERICIDENTIFIER]}|${z[H.NUMERICIDENTIFIERLOOSE]})`);oe("PRERELEASE",`(?:-(${z[H.PRERELEASEIDENTIFIER]}(?:\\.${z[H.PRERELEASEIDENTIFIER]})*))`);oe("PRERELEASELOOSE",`(?:-?(${z[H.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${z[H.PRERELEASEIDENTIFIERLOOSE]})*))`);oe("BUILDIDENTIFIER",`${P_}+`);oe("BUILD",`(?:\\+(${z[H.BUILDIDENTIFIER]}(?:\\.${z[H.BUILDIDENTIFIER]})*))`);oe("FULLPLAIN",`v?${z[H.MAINVERSION]}${z[H.PRERELEASE]}?${z[H.BUILD]}?`);oe("FULL",`^${z[H.FULLPLAIN]}$`);oe("LOOSEPLAIN",`[v=\\s]*${z[H.MAINVERSIONLOOSE]}${z[H.PRERELEASELOOSE]}?${z[H.BUILD]}?`);oe("LOOSE",`^${z[H.LOOSEPLAIN]}$`);oe("GTLT","((?:<|>)?=?)");oe("XRANGEIDENTIFIERLOOSE",`${z[H.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);oe("XRANGEIDENTIFIER",`${z[H.NUMERICIDENTIFIER]}|x|X|\\*`);oe("XRANGEPLAIN",`[v=\\s]*(${z[H.XRANGEIDENTIFIER]})(?:\\.(${z[H.XRANGEIDENTIFIER]})(?:\\.(${z[H.XRANGEIDENTIFIER]})(?:${z[H.PRERELEASE]})?${z[H.BUILD]}?)?)?`);oe("XRANGEPLAINLOOSE",`[v=\\s]*(${z[H.XRANGEIDENTIFIERLOOSE]})(?:\\.(${z[H.XRANGEIDENTIFIERLOOSE]})(?:\\.(${z[H.XRANGEIDENTIFIERLOOSE]})(?:${z[H.PRERELEASELOOSE]})?${z[H.BUILD]}?)?)?`);oe("XRANGE",`^${z[H.GTLT]}\\s*${z[H.XRANGEPLAIN]}$`);oe("XRANGELOOSE",`^${z[H.GTLT]}\\s*${z[H.XRANGEPLAINLOOSE]}$`);oe("COERCEPLAIN",`(^|[^\\d])(\\d{1,${k_}})(?:\\.(\\d{1,${k_}}))?(?:\\.(\\d{1,${k_}}))?`);oe("COERCE",`${z[H.COERCEPLAIN]}(?:$|[^\\d])`);oe("COERCEFULL",z[H.COERCEPLAIN]+`(?:${z[H.PRERELEASE]})?(?:${z[H.BUILD]})?(?:$|[^\\d])`);oe("COERCERTL",z[H.COERCE],!0);oe("COERCERTLFULL",z[H.COERCEFULL],!0);oe("LONETILDE","(?:~>?)");oe("TILDETRIM",`(\\s*)${z[H.LONETILDE]}\\s+`,!0);Xn.tildeTrimReplace="$1~";oe("TILDE",`^${z[H.LONETILDE]}${z[H.XRANGEPLAIN]}$`);oe("TILDELOOSE",`^${z[H.LONETILDE]}${z[H.XRANGEPLAINLOOSE]}$`);oe("LONECARET","(?:\\^)");oe("CARETTRIM",`(\\s*)${z[H.LONECARET]}\\s+`,!0);Xn.caretTrimReplace="$1^";oe("CARET",`^${z[H.LONECARET]}${z[H.XRANGEPLAIN]}$`);oe("CARETLOOSE",`^${z[H.LONECARET]}${z[H.XRANGEPLAINLOOSE]}$`);oe("COMPARATORLOOSE",`^${z[H.GTLT]}\\s*(${z[H.LOOSEPLAIN]})$|^$`);oe("COMPARATOR",`^${z[H.GTLT]}\\s*(${z[H.FULLPLAIN]})$|^$`);oe("COMPARATORTRIM",`(\\s*)${z[H.GTLT]}\\s*(${z[H.LOOSEPLAIN]}|${z[H.XRANGEPLAIN]})`,!0);Xn.comparatorTrimReplace="$1$2$3";oe("HYPHENRANGE",`^\\s*(${z[H.XRANGEPLAIN]})\\s+-\\s+(${z[H.XRANGEPLAIN]})\\s*$`);oe("HYPHENRANGELOOSE",`^\\s*(${z[H.XRANGEPLAINLOOSE]})\\s+-\\s+(${z[H.XRANGEPLAINLOOSE]})\\s*$`);oe("STAR","(<|>)?=?\\s*\\*");oe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");oe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var im=h(function(gJe,sU){var MPe=Object.freeze({loose:!0}),BPe=Object.freeze({}),LPe=(e)=>{if(!e)return BPe;if(typeof e!=="object")return MPe;return e};sU.exports=LPe});var I_=h(function(yJe,cU){var oU=/^[0-9]+$/,aU=(e,t)=>{if(typeof e==="number"&&typeof t==="number")return e===t?0:e<t?-1:1;let r=oU.test(e),n=oU.test(t);if(r&&n)e=+e,t=+t;return e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},UPe=(e,t)=>aU(t,e);cU.exports={compareIdentifiers:aU,rcompareIdentifiers:UPe}});var Mt=h(function(xJe,lU){var sm=id(),{MAX_LENGTH:uU,MAX_SAFE_INTEGER:om}=nd(),{safeRe:am,t:cm}=yc(),VPe=im(),{compareIdentifiers:T_}=I_();class yn{constructor(e,t){if(t=VPe(t),e instanceof yn)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else e=e.version;else if(typeof e!=="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>uU)throw TypeError(`version is longer than ${uU} characters`);sm("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?am[cm.LOOSE]:am[cm.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>om||this.major<0)throw TypeError("Invalid major version");if(this.minor>om||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>om||this.patch<0)throw TypeError("Invalid patch version");if(!r[4])this.prerelease=[];else this.prerelease=r[4].split(".").map((n)=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<om)return i}return n});this.build=r[5]?r[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(e){if(sm("SemVer.compare",this.version,this.options,e),!(e instanceof yn)){if(typeof e==="string"&&e===this.version)return 0;e=new yn(e,this.options)}if(e.version===this.version)return 0;return this.compareMain(e)||this.comparePre(e)}compareMain(e){if(!(e instanceof yn))e=new yn(e,this.options);if(this.major<e.major)return-1;if(this.major>e.major)return 1;if(this.minor<e.minor)return-1;if(this.minor>e.minor)return 1;if(this.patch<e.patch)return-1;if(this.patch>e.patch)return 1;return 0}comparePre(e){if(!(e instanceof yn))e=new yn(e,this.options);if(this.prerelease.length&&!e.prerelease.length)return-1;else if(!this.prerelease.length&&e.prerelease.length)return 1;else if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],n=e.prerelease[t];if(sm("prerelease compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return T_(r,n)}while(++t)}compareBuild(e){if(!(e instanceof yn))e=new yn(e,this.options);let t=0;do{let r=this.build[t],n=e.build[t];if(sm("build compare",t,r,n),r===void 0&&n===void 0)return 0;else if(n===void 0)return 1;else if(r===void 0)return-1;else if(r===n)continue;else return T_(r,n)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw Error("invalid increment argument: identifier is empty");if(t){let n=`-${t}`.match(this.options.loose?am[cm.PRERELEASELOOSE]:am[cm.PRERELEASE]);if(!n||n[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",t,r);this.inc("pre",t,r);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 n=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;while(--i>=0)if(typeof this.prerelease[i]==="number")this.prerelease[i]++,i=-2;if(i===-1){if(t===this.prerelease.join(".")&&r===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(t){let i=[t,n];if(r===!1)i=[t];if(T_(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1]))this.prerelease=i}else this.prerelease=i}break}default:throw Error(`invalid increment argument: ${e}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}lU.exports=yn});var $o=h(function(bJe,fU){var dU=Mt(),zPe=(e,t,r=!1)=>{if(e instanceof dU)return e;try{return new dU(e,t)}catch(n){if(!r)return null;throw n}};fU.exports=zPe});var mU=h(function(vJe,pU){var HPe=$o(),WPe=(e,t)=>{let r=HPe(e,t);return r?r.version:null};pU.exports=WPe});var gU=h(function(_Je,hU){var GPe=$o(),KPe=(e,t)=>{let r=GPe(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};hU.exports=KPe});var bU=h(function(DJe,xU){var yU=Mt(),YPe=(e,t,r,n,i)=>{if(typeof r==="string")i=n,n=r,r=void 0;try{return new yU(e instanceof yU?e.version:e,r).inc(t,n,i).version}catch(s){return null}};xU.exports=YPe});var DU=h(function(wJe,_U){var vU=$o(),JPe=(e,t)=>{let r=vU(e,null,!0),n=vU(t,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,o=s?r:n,a=s?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0){if(a.minor&&!a.patch)return"minor";return"patch"}}let d=c?"pre":"";if(r.major!==n.major)return d+"major";if(r.minor!==n.minor)return d+"minor";if(r.patch!==n.patch)return d+"patch";return"prerelease"};_U.exports=JPe});var EU=h(function(EJe,wU){var XPe=Mt(),QPe=(e,t)=>new XPe(e,t).major;wU.exports=QPe});var $U=h(function(SJe,SU){var ZPe=Mt(),e8e=(e,t)=>new ZPe(e,t).minor;SU.exports=e8e});var FU=h(function($Je,CU){var t8e=Mt(),r8e=(e,t)=>new t8e(e,t).patch;CU.exports=r8e});var OU=h(function(CJe,RU){var n8e=$o(),i8e=(e,t)=>{let r=n8e(e,t);return r&&r.prerelease.length?r.prerelease:null};RU.exports=i8e});var Wr=h(function(FJe,kU){var AU=Mt(),s8e=(e,t,r)=>new AU(e,r).compare(new AU(t,r));kU.exports=s8e});var IU=h(function(RJe,PU){var o8e=Wr(),a8e=(e,t,r)=>o8e(t,e,r);PU.exports=a8e});var NU=h(function(OJe,TU){var c8e=Wr(),u8e=(e,t)=>c8e(e,t,!0);TU.exports=u8e});var um=h(function(AJe,jU){var qU=Mt(),l8e=(e,t,r)=>{let n=new qU(e,r),i=new qU(t,r);return n.compare(i)||n.compareBuild(i)};jU.exports=l8e});var BU=h(function(kJe,MU){var d8e=um(),f8e=(e,t)=>e.sort((r,n)=>d8e(r,n,t));MU.exports=f8e});var UU=h(function(PJe,LU){var p8e=um(),m8e=(e,t)=>e.sort((r,n)=>p8e(n,r,t));LU.exports=m8e});var sd=h(function(IJe,VU){var h8e=Wr(),g8e=(e,t,r)=>h8e(e,t,r)>0;VU.exports=g8e});var lm=h(function(TJe,zU){var y8e=Wr(),x8e=(e,t,r)=>y8e(e,t,r)<0;zU.exports=x8e});var N_=h(function(NJe,HU){var b8e=Wr(),v8e=(e,t,r)=>b8e(e,t,r)===0;HU.exports=v8e});var q_=h(function(qJe,WU){var _8e=Wr(),D8e=(e,t,r)=>_8e(e,t,r)!==0;WU.exports=D8e});var dm=h(function(jJe,GU){var w8e=Wr(),E8e=(e,t,r)=>w8e(e,t,r)>=0;GU.exports=E8e});var fm=h(function(MJe,KU){var S8e=Wr(),$8e=(e,t,r)=>S8e(e,t,r)<=0;KU.exports=$8e});var j_=h(function(BJe,YU){var C8e=N_(),F8e=q_(),R8e=sd(),O8e=dm(),A8e=lm(),k8e=fm(),P8e=(e,t,r,n)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return C8e(e,r,n);case"!=":return F8e(e,r,n);case">":return R8e(e,r,n);case">=":return O8e(e,r,n);case"<":return A8e(e,r,n);case"<=":return k8e(e,r,n);default:throw TypeError(`Invalid operator: ${t}`)}};YU.exports=P8e});var XU=h(function(LJe,JU){var I8e=Mt(),T8e=$o(),{safeRe:pm,t:mm}=yc(),N8e=(e,t)=>{if(e instanceof I8e)return e;if(typeof e==="number")e=String(e);if(typeof e!=="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?pm[mm.COERCEFULL]:pm[mm.COERCE]);else{let c=t.includePrerelease?pm[mm.COERCERTLFULL]:pm[mm.COERCERTL],l;while((l=c.exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||l.index+l[0].length!==r.index+r[0].length)r=l;c.lastIndex=l.index+l[1].length+l[2].length}c.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",s=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return T8e(`${n}.${i}.${s}${o}${a}`,t)};JU.exports=N8e});var eV=h(function(UJe,ZU){class QU{constructor(){this.max=1000,this.map=new Map}get(e){let t=this.map.get(e);if(t===void 0)return;else return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,t)}return this}}ZU.exports=QU});var Gr=h(function(VJe,iV){var q8e=/\s+/g;class od{constructor(e,t){if(t=M8e(t),e instanceof od)if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;else return new od(e.raw,t);if(e instanceof M_)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(q8e," "),this.set=this.raw.split("||").map((r)=>this.parseRange(r.trim())).filter((r)=>r.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter((n)=>!rV(n[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&W8e(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){if(e>0)this.formatted+="||";let t=this.set[e];for(let r=0;r<t.length;r++){if(r>0)this.formatted+=" ";this.formatted+=t[r].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&z8e)|(this.options.loose&&H8e))+":"+e,n=tV.get(r);if(n)return n;let i=this.options.loose,s=i?Qt[Bt.HYPHENRANGELOOSE]:Qt[Bt.HYPHENRANGE];e=e.replace(s,r4e(this.options.includePrerelease)),Ze("hyphen replace",e),e=e.replace(Qt[Bt.COMPARATORTRIM],L8e),Ze("comparator trim",e),e=e.replace(Qt[Bt.TILDETRIM],U8e),Ze("tilde trim",e),e=e.replace(Qt[Bt.CARETTRIM],V8e),Ze("caret trim",e);let o=e.split(" ").map((d)=>G8e(d,this.options)).join(" ").split(/\s+/).map((d)=>t4e(d,this.options));if(i)o=o.filter((d)=>(Ze("loose invalid filter",d,this.options),!!d.match(Qt[Bt.COMPARATORLOOSE])));Ze("range list",o);let a=new Map,c=o.map((d)=>new M_(d,this.options));for(let d of c){if(rV(d))return[d];a.set(d.value,d)}if(a.size>1&&a.has(""))a.delete("");let l=[...a.values()];return tV.set(r,l),l}intersects(e,t){if(!(e instanceof od))throw TypeError("a Range is required");return this.set.some((r)=>nV(r,t)&&e.set.some((n)=>nV(n,t)&&r.every((i)=>n.every((s)=>i.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e==="string")try{e=new B8e(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(n4e(this.set[t],e,this.options))return!0;return!1}}iV.exports=od;var j8e=eV(),tV=new j8e,M8e=im(),M_=ad(),Ze=id(),B8e=Mt(),{safeRe:Qt,t:Bt,comparatorTrimReplace:L8e,tildeTrimReplace:U8e,caretTrimReplace:V8e}=yc(),{FLAG_INCLUDE_PRERELEASE:z8e,FLAG_LOOSE:H8e}=nd(),rV=(e)=>e.value==="<0.0.0-0",W8e=(e)=>e.value==="",nV=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();while(r&&n.length)r=n.every((s)=>i.intersects(s,t)),i=n.pop();return r},G8e=(e,t)=>(e=e.replace(Qt[Bt.BUILD],""),Ze("comp",e,t),e=J8e(e,t),Ze("caret",e),e=K8e(e,t),Ze("tildes",e),e=Q8e(e,t),Ze("xrange",e),e=e4e(e,t),Ze("stars",e),e),Zt=(e)=>!e||e.toLowerCase()==="x"||e==="*",K8e=(e,t)=>e.trim().split(/\s+/).map((r)=>Y8e(r,t)).join(" "),Y8e=(e,t)=>{let r=t.loose?Qt[Bt.TILDELOOSE]:Qt[Bt.TILDE];return e.replace(r,(n,i,s,o,a)=>{Ze("tilde",e,n,i,s,o,a);let c;if(Zt(i))c="";else if(Zt(s))c=`>=${i}.0.0 <${+i+1}.0.0-0`;else if(Zt(o))c=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`;else if(a)Ze("replaceTilde pr",a),c=`>=${i}.${s}.${o}-${a} <${i}.${+s+1}.0-0`;else c=`>=${i}.${s}.${o} <${i}.${+s+1}.0-0`;return Ze("tilde return",c),c})},J8e=(e,t)=>e.trim().split(/\s+/).map((r)=>X8e(r,t)).join(" "),X8e=(e,t)=>{Ze("caret",e,t);let r=t.loose?Qt[Bt.CARETLOOSE]:Qt[Bt.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(i,s,o,a,c)=>{Ze("caret",e,i,s,o,a,c);let l;if(Zt(s))l="";else if(Zt(o))l=`>=${s}.0.0${n} <${+s+1}.0.0-0`;else if(Zt(a))if(s==="0")l=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`;else if(c)if(Ze("replaceCaret pr",c),s==="0")if(o==="0")l=`>=${s}.${o}.${a}-${c} <${s}.${o}.${+a+1}-0`;else l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.${a}-${c} <${+s+1}.0.0-0`;else if(Ze("no pr"),s==="0")if(o==="0")l=`>=${s}.${o}.${a}${n} <${s}.${o}.${+a+1}-0`;else l=`>=${s}.${o}.${a}${n} <${s}.${+o+1}.0-0`;else l=`>=${s}.${o}.${a} <${+s+1}.0.0-0`;return Ze("caret return",l),l})},Q8e=(e,t)=>(Ze("replaceXRanges",e,t),e.split(/\s+/).map((r)=>Z8e(r,t)).join(" ")),Z8e=(e,t)=>{e=e.trim();let r=t.loose?Qt[Bt.XRANGELOOSE]:Qt[Bt.XRANGE];return e.replace(r,(n,i,s,o,a,c)=>{Ze("xRange",e,n,i,s,o,a,c);let l=Zt(s),d=l||Zt(o),f=d||Zt(a),m=f;if(i==="="&&m)i="";if(c=t.includePrerelease?"-0":"",l)if(i===">"||i==="<")n="<0.0.0-0";else n="*";else if(i&&m){if(d)o=0;if(a=0,i===">")if(i=">=",d)s=+s+1,o=0,a=0;else o=+o+1,a=0;else if(i==="<=")if(i="<",d)s=+s+1;else o=+o+1;if(i==="<")c="-0";n=`${i+s}.${o}.${a}${c}`}else if(d)n=`>=${s}.0.0${c} <${+s+1}.0.0-0`;else if(f)n=`>=${s}.${o}.0${c} <${s}.${+o+1}.0-0`;return Ze("xRange return",n),n})},e4e=(e,t)=>(Ze("replaceStars",e,t),e.trim().replace(Qt[Bt.STAR],"")),t4e=(e,t)=>(Ze("replaceGTE0",e,t),e.trim().replace(Qt[t.includePrerelease?Bt.GTE0PRE:Bt.GTE0],"")),r4e=(e)=>(t,r,n,i,s,o,a,c,l,d,f,m)=>{if(Zt(n))r="";else if(Zt(i))r=`>=${n}.0.0${e?"-0":""}`;else if(Zt(s))r=`>=${n}.${i}.0${e?"-0":""}`;else if(o)r=`>=${r}`;else r=`>=${r}${e?"-0":""}`;if(Zt(l))c="";else if(Zt(d))c=`<${+l+1}.0.0-0`;else if(Zt(f))c=`<${l}.${+d+1}.0-0`;else if(m)c=`<=${l}.${d}.${f}-${m}`;else if(e)c=`<${l}.${d}.${+f+1}-0`;else c=`<=${c}`;return`${r} ${c}`.trim()},n4e=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++){if(Ze(e[n].semver),e[n].semver===M_.ANY)continue;if(e[n].semver.prerelease.length>0){let i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}}return!1}return!0}});var ad=h(function(zJe,lV){var cd=Symbol("SemVer ANY");class hm{static get ANY(){return cd}constructor(e,t){if(t=sV(t),e instanceof hm)if(e.loose===!!t.loose)return e;else e=e.value;if(e=e.trim().split(/\s+/).join(" "),L_("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===cd)this.value="";else this.value=this.operator+this.semver.version;L_("comp",this)}parse(e){let t=this.options.loose?oV[aV.COMPARATORLOOSE]:oV[aV.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);if(this.operator=r[1]!==void 0?r[1]:"",this.operator==="=")this.operator="";if(!r[2])this.semver=cd;else this.semver=new cV(r[2],this.options.loose)}toString(){return this.value}test(e){if(L_("Comparator.test",e,this.options.loose),this.semver===cd||e===cd)return!0;if(typeof e==="string")try{e=new cV(e,this.options)}catch(t){return!1}return B_(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof hm))throw TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new uV(e.value,t).test(this.value)}else if(e.operator===""){if(e.value==="")return!0;return new uV(this.value,t).test(e.semver)}if(t=sV(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0"))return!1;if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&e.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&e.operator.startsWith("<"))return!0;if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("="))return!0;if(B_(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))return!0;if(B_(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))return!0;return!1}}lV.exports=hm;var sV=im(),{safeRe:oV,t:aV}=yc(),B_=j_(),L_=id(),cV=Mt(),uV=Gr()});var ud=h(function(HJe,dV){var i4e=Gr(),s4e=(e,t,r)=>{try{t=new i4e(t,r)}catch(n){return!1}return t.test(e)};dV.exports=s4e});var pV=h(function(WJe,fV){var o4e=Gr(),a4e=(e,t)=>new o4e(e,t).set.map((r)=>r.map((n)=>n.value).join(" ").trim().split(" "));fV.exports=a4e});var hV=h(function(GJe,mV){var c4e=Mt(),u4e=Gr(),l4e=(e,t,r)=>{let n=null,i=null,s=null;try{s=new u4e(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===-1)n=o,i=new c4e(n,r)}}),n};mV.exports=l4e});var yV=h(function(KJe,gV){var d4e=Mt(),f4e=Gr(),p4e=(e,t,r)=>{let n=null,i=null,s=null;try{s=new f4e(t,r)}catch(o){return null}return e.forEach((o)=>{if(s.test(o)){if(!n||i.compare(o)===1)n=o,i=new d4e(n,r)}}),n};gV.exports=p4e});var vV=h(function(YJe,bV){var U_=Mt(),m4e=Gr(),xV=sd(),h4e=(e,t)=>{e=new m4e(e,t);let r=new U_("0.0.0");if(e.test(r))return r;if(r=new U_("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;n<e.set.length;++n){let i=e.set[n],s=null;if(i.forEach((o)=>{let a=new U_(o.semver.version);switch(o.operator){case">":if(a.prerelease.length===0)a.patch++;else a.prerelease.push(0);a.raw=a.format();case"":case">=":if(!s||xV(a,s))s=a;break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||xV(r,s)))r=s}if(r&&e.test(r))return r;return null};bV.exports=h4e});var DV=h(function(JJe,_V){var g4e=Gr(),y4e=(e,t)=>{try{return new g4e(e,t).range||"*"}catch(r){return null}};_V.exports=y4e});var gm=h(function(XJe,$V){var x4e=Mt(),SV=ad(),{ANY:b4e}=SV,v4e=Gr(),_4e=ud(),wV=sd(),EV=lm(),D4e=fm(),w4e=dm(),E4e=(e,t,r,n)=>{e=new x4e(e,n),t=new v4e(t,n);let i,s,o,a,c;switch(r){case">":i=wV,s=D4e,o=EV,a=">",c=">=";break;case"<":i=EV,s=w4e,o=wV,a="<",c="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(_4e(e,t,n))return!1;for(let l=0;l<t.set.length;++l){let d=t.set[l],f=null,m=null;if(d.forEach((p)=>{if(p.semver===b4e)p=new SV(">=0.0.0");if(f=f||p,m=m||p,i(p.semver,f.semver,n))f=p;else if(o(p.semver,m.semver,n))m=p}),f.operator===a||f.operator===c)return!1;if((!m.operator||m.operator===a)&&s(e,m.semver))return!1;else if(m.operator===c&&o(e,m.semver))return!1}return!0};$V.exports=E4e});var FV=h(function(QJe,CV){var S4e=gm(),$4e=(e,t,r)=>S4e(e,t,">",r);CV.exports=$4e});var OV=h(function(ZJe,RV){var C4e=gm(),F4e=(e,t,r)=>C4e(e,t,"<",r);RV.exports=F4e});var PV=h(function(eXe,kV){var AV=Gr(),R4e=(e,t,r)=>(e=new AV(e,r),t=new AV(t,r),e.intersects(t,r));kV.exports=R4e});var TV=h(function(tXe,IV){var O4e=ud(),A4e=Wr();IV.exports=(e,t,r)=>{let n=[],i=null,s=null,o=e.sort((d,f)=>A4e(d,f,r));for(let d of o)if(O4e(d,t,r)){if(s=d,!i)i=d}else{if(s)n.push([i,s]);s=null,i=null}if(i)n.push([i,null]);let a=[];for(let[d,f]of n)if(d===f)a.push(d);else if(!f&&d===o[0])a.push("*");else if(!f)a.push(`>=${d}`);else if(d===o[0])a.push(`<=${f}`);else a.push(`${d} - ${f}`);let c=a.join(" || "),l=typeof t.raw==="string"?t.raw:String(t);return c.length<l.length?c:t}});var LV=h(function(rXe,BV){var NV=Gr(),z_=ad(),{ANY:V_}=z_,ld=ud(),H_=Wr(),k4e=(e,t,r={})=>{if(e===t)return!0;e=new NV(e,r),t=new NV(t,r);let n=!1;e:for(let i of e.set){for(let s of t.set){let o=I4e(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},P4e=[new z_(">=0.0.0-0")],qV=[new z_(">=0.0.0")],I4e=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===V_)if(t.length===1&&t[0].semver===V_)return!0;else if(r.includePrerelease)e=P4e;else e=qV;if(t.length===1&&t[0].semver===V_)if(r.includePrerelease)return!0;else t=qV;let n=new Set,i,s;for(let p of e)if(p.operator===">"||p.operator===">=")i=jV(i,p,r);else if(p.operator==="<"||p.operator==="<=")s=MV(s,p,r);else n.add(p.semver);if(n.size>1)return null;let o;if(i&&s){if(o=H_(i.semver,s.semver,r),o>0)return null;else if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let p of n){if(i&&!ld(p,String(i),r))return null;if(s&&!ld(p,String(s),r))return null;for(let g of t)if(!ld(p,String(g),r))return!1;return!0}let a,c,l,d,f=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;if(f&&f.prerelease.length===1&&s.operator==="<"&&f.prerelease[0]===0)f=!1;for(let p of t){if(d=d||p.operator===">"||p.operator===">=",l=l||p.operator==="<"||p.operator==="<=",i){if(m){if(p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===m.major&&p.semver.minor===m.minor&&p.semver.patch===m.patch)m=!1}if(p.operator===">"||p.operator===">="){if(a=jV(i,p,r),a===p&&a!==i)return!1}else if(i.operator===">="&&!ld(i.semver,String(p),r))return!1}if(s){if(f){if(p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch)f=!1}if(p.operator==="<"||p.operator==="<="){if(c=MV(s,p,r),c===p&&c!==s)return!1}else if(s.operator==="<="&&!ld(s.semver,String(p),r))return!1}if(!p.operator&&(s||i)&&o!==0)return!1}if(i&&l&&!s&&o!==0)return!1;if(s&&d&&!i&&o!==0)return!1;if(m||f)return!1;return!0},jV=(e,t,r)=>{if(!e)return t;let n=H_(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e},MV=(e,t,r)=>{if(!e)return t;let n=H_(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};BV.exports=k4e});var HV=h(function(nXe,zV){var W_=yc(),UV=nd(),T4e=Mt(),VV=I_(),N4e=$o(),q4e=mU(),j4e=gU(),M4e=bU(),B4e=DU(),L4e=EU(),U4e=$U(),V4e=FU(),z4e=OU(),H4e=Wr(),W4e=IU(),G4e=NU(),K4e=um(),Y4e=BU(),J4e=UU(),X4e=sd(),Q4e=lm(),Z4e=N_(),e3e=q_(),t3e=dm(),r3e=fm(),n3e=j_(),i3e=XU(),s3e=ad(),o3e=Gr(),a3e=ud(),c3e=pV(),u3e=hV(),l3e=yV(),d3e=vV(),f3e=DV(),p3e=gm(),m3e=FV(),h3e=OV(),g3e=PV(),y3e=TV(),x3e=LV();zV.exports={parse:N4e,valid:q4e,clean:j4e,inc:M4e,diff:B4e,major:L4e,minor:U4e,patch:V4e,prerelease:z4e,compare:H4e,rcompare:W4e,compareLoose:G4e,compareBuild:K4e,sort:Y4e,rsort:J4e,gt:X4e,lt:Q4e,eq:Z4e,neq:e3e,gte:t3e,lte:r3e,cmp:n3e,coerce:i3e,Comparator:s3e,Range:o3e,satisfies:a3e,toComparators:c3e,maxSatisfying:u3e,minSatisfying:l3e,minVersion:d3e,validRange:f3e,outside:p3e,gtr:m3e,ltr:h3e,intersects:g3e,simplifyRange:y3e,subset:x3e,SemVer:T4e,re:W_.re,src:W_.src,tokens:W_.t,SEMVER_SPEC_VERSION:UV.SEMVER_SPEC_VERSION,RELEASE_TYPES:UV.RELEASE_TYPES,compareIdentifiers:VV.compareIdentifiers,rcompareIdentifiers:VV.rcompareIdentifiers}});function GV(e,t,r){if(!e)return!1;if(e.constructor===t)return!0;return b3e.call(e)===r}function KV(e){return GV(e,Uint8Array,"[object Uint8Array]")}function v3e(e){return GV(e,ArrayBuffer,"[object ArrayBuffer]")}function _3e(e){return KV(e)||v3e(e)}function D3e(e){if(!KV(e))throw TypeError(`Expected \`Uint8Array\`, got \`${typeof e}\``)}function w3e(e){if(!_3e(e))throw TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``)}function G_(e,t){if(e.length===0)return new Uint8Array(0);t??=e.reduce((i,s)=>i+s.length,0);let r=new Uint8Array(t),n=0;for(let i of e)D3e(i),r.set(i,n),n+=i.length;return r}function K_(e,t="utf8"){return w3e(e),WV[t]??=new globalThis.TextDecoder(t),WV[t].decode(e)}function E3e(e){if(typeof e!=="string")throw TypeError(`Expected \`string\`, got \`${typeof e}\``)}function ym(e){return E3e(e),S3e.encode(e)}var b3e,WV,S3e,iXe;var YV=A(()=>{b3e=Object.prototype.toString;WV={utf8:new globalThis.TextDecoder("utf8")};S3e=new globalThis.TextEncoder;iXe=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"))});import{isDeepStrictEqual as $3e}from"util";import JV from"process";import Co from"fs";import XV from"path";import dd from"crypto";import C3e from"assert";var ZV,ez,Fo,F3e,QV="aes-256-cbc",xc=()=>Object.create(null),R3e=(e)=>e!==void 0&&e!==null,O3e=(e,t)=>{let r=new Set(["undefined","symbol","function"]),n=typeof t;if(r.has(n))throw TypeError(`Setting a value of type \`${n}\` for key \`${e}\` is not allowed as it's not supported by JSON`)},xm="__internal__",Y_,bm;var tz=A(()=>{uT();dT();LT();tU();YV();ZV=ne(jq(),1),ez=ne(eU(),1),Fo=ne(HV(),1),F3e=ez.default.default,Y_=`${xm}.migrations.version`;bm=class bm{path;events;#r;#t;#e;#i={};constructor(e={}){let t={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e};if(!t.cwd){if(!t.projectName)throw Error("Please specify the `projectName` option.");t.cwd=Sb(t.projectName,{suffix:t.projectSuffix}).config}if(this.#e=t,t.schema??t.ajvOptions??t.rootSchema){if(t.schema&&typeof t.schema!=="object")throw TypeError("The `schema` option must be an object.");let s=new ZV.Ajv2020({allErrors:!0,useDefaults:!0,...t.ajvOptions});F3e(s);let o={...t.rootSchema,type:"object",properties:t.schema};this.#r=s.compile(o);for(let[a,c]of Object.entries(t.schema??{}))if(c?.default)this.#i[a]=c.default}if(t.defaults)this.#i={...this.#i,...t.defaults};if(t.serialize)this._serialize=t.serialize;if(t.deserialize)this._deserialize=t.deserialize;this.events=new EventTarget,this.#t=t.encryptionKey;let r=t.fileExtension?`.${t.fileExtension}`:"";this.path=XV.resolve(t.cwd,`${t.configName??"config"}${r}`);let n=this.store,i=Object.assign(xc(),t.defaults,n);if(t.migrations){if(!t.projectVersion)throw Error("Please specify the `projectVersion` option.");this._migrate(t.migrations,t.projectVersion,t.beforeEachMigration)}this._validate(i);try{C3e.deepEqual(n,i)}catch{this.store=i}if(t.watch)this._watch()}get(e,t){if(this.#e.accessPropertiesByDotNotation)return this._get(e,t);let{store:r}=this;return e in r?r[e]:t}set(e,t){if(typeof e!=="string"&&typeof e!=="object")throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if(typeof e!=="object"&&t===void 0)throw TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw TypeError(`Please don't use the ${xm} key, as it's used to manage this module internal operations.`);let{store:r}=this,n=(i,s)=>{if(O3e(i,s),this.#e.accessPropertiesByDotNotation)Db(r,i,s);else r[i]=s};if(typeof e==="object"){let i=e;for(let[s,o]of Object.entries(i))n(s,o)}else n(e,t);this.store=r}has(e){if(this.#e.accessPropertiesByDotNotation)return cT(this.store,e);return e in this.store}reset(...e){for(let t of e)if(R3e(this.#i[t]))this.set(t,this.#i[t])}delete(e){let{store:t}=this;if(this.#e.accessPropertiesByDotNotation)aT(t,e);else delete t[e];this.store=t}clear(){this.store=xc();for(let e of Object.keys(this.#i))this.reset(e)}onDidChange(e,t){if(typeof e!=="string")throw TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof e}`);if(typeof t!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof t}`);return this._handleChange(()=>this.get(e),t)}onDidAnyChange(e){if(typeof e!=="function")throw TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof e}`);return this._handleChange(()=>this.store,e)}get size(){return Object.keys(this.store).length}get store(){try{let e=Co.readFileSync(this.path,this.#t?null:"utf8"),t=this._encryptData(e),r=this._deserialize(t);return this._validate(r),Object.assign(xc(),r)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),xc();if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return xc();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.dispatchEvent(new Event("change"))}*[Symbol.iterator](){for(let[e,t]of Object.entries(this.store))yield[e,t]}_encryptData(e){if(!this.#t)return typeof e==="string"?e:K_(e);try{let t=e.slice(0,16),r=dd.pbkdf2Sync(this.#t,t.toString(),1e4,32,"sha512"),n=dd.createDecipheriv(QV,r,t),i=e.slice(17),s=typeof i==="string"?ym(i):i;return K_(G_([n.update(s),n.final()]))}catch{}return e.toString()}_handleChange(e,t){let r=e(),n=()=>{let i=r,s=e();if($3e(s,i))return;r=s,t.call(this,s,i)};return this.events.addEventListener("change",n),()=>{this.events.removeEventListener("change",n)}}_deserialize=(e)=>JSON.parse(e);_serialize=(e)=>JSON.stringify(e,void 0,"\t");_validate(e){if(!this.#r)return;if(this.#r(e)||!this.#r.errors)return;let r=this.#r.errors.map(({instancePath:n,message:i=""})=>`\`${n.slice(1)}\` ${i}`);throw Error("Config schema violation: "+r.join("; "))}_ensureDirectory(){Co.mkdirSync(XV.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e);if(this.#t){let r=dd.randomBytes(16),n=dd.pbkdf2Sync(this.#t,r.toString(),1e4,32,"sha512"),i=dd.createCipheriv(QV,n,r);t=G_([r,ym(":"),i.update(ym(t)),i.final()])}if(JV.env.SNAP)Co.writeFileSync(this.path,t,{mode:this.#e.configFileMode});else try{Nb(this.path,t,{mode:this.#e.configFileMode})}catch(r){if(r?.code==="EXDEV"){Co.writeFileSync(this.path,t,{mode:this.#e.configFileMode});return}throw r}}_watch(){if(this._ensureDirectory(),!Co.existsSync(this.path))this._write(xc());if(JV.platform==="win32")Co.watch(this.path,{persistent:!1},A_(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100}));else Co.watchFile(this.path,{persistent:!1},A_(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5000}))}_migrate(e,t,r){let n=this._get(Y_,"0.0.0"),i=Object.keys(e).filter((o)=>this._shouldPerformMigration(o,n,t)),s={...this.store};for(let o of i)try{if(r)r(this,{fromVersion:n,toVersion:o,finalVersion:t,versions:i});let a=e[o];a?.(this),this._set(Y_,o),n=o,s={...this.store}}catch(a){throw this.store=s,Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${a}`)}if(this._isVersionInRangeFormat(n)||!Fo.default.eq(n,t))this._set(Y_,t)}_containsReservedKey(e){if(typeof e==="object"){if(Object.keys(e)[0]===xm)return!0}if(typeof e!=="string")return!1;if(this.#e.accessPropertiesByDotNotation){if(e.startsWith(`${xm}.`))return!0;return!1}return!1}_isVersionInRangeFormat(e){return Fo.default.clean(e)===null}_shouldPerformMigration(e,t,r){if(this._isVersionInRangeFormat(e)){if(t!=="0.0.0"&&Fo.default.satisfies(t,e))return!1;return Fo.default.satisfies(r,e)}if(Fo.default.lte(e,t))return!1;if(Fo.default.gt(e,r))return!1;return!0}_get(e,t){return oT(this.store,e,t)}_set(e,t){let{store:r}=this;Db(r,e,t),this.store=r}}});var ve,J_,N,Qn=(e)=>{switch(typeof e){case"undefined":return N.undefined;case"string":return N.string;case"number":return Number.isNaN(e)?N.nan:N.number;case"boolean":return N.boolean;case"function":return N.function;case"bigint":return N.bigint;case"symbol":return N.symbol;case"object":if(Array.isArray(e))return N.array;if(e===null)return N.null;if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return N.promise;if(typeof Map<"u"&&e instanceof Map)return N.map;if(typeof Set<"u"&&e instanceof Set)return N.set;if(typeof Date<"u"&&e instanceof Date)return N.date;return N.object;default:return N.unknown}};var fd=A(()=>{(function(e){e.assertEqual=(i)=>{};function t(i){}e.assertIs=t;function r(i){throw Error()}e.assertNever=r,e.arrayToEnum=(i)=>{let s={};for(let o of i)s[o]=o;return s},e.getValidEnumValues=(i)=>{let s=e.objectKeys(i).filter((a)=>typeof i[i[a]]!=="number"),o={};for(let a of s)o[a]=i[a];return e.objectValues(o)},e.objectValues=(i)=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys==="function"?(i)=>Object.keys(i):(i)=>{let s=[];for(let o in i)if(Object.prototype.hasOwnProperty.call(i,o))s.push(o);return s},e.find=(i,s)=>{for(let o of i)if(s(o))return o;return},e.isInteger=typeof Number.isInteger==="function"?(i)=>Number.isInteger(i):(i)=>typeof i==="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map((o)=>typeof o==="string"?`'${o}'`:o).join(s)}e.joinValues=n,e.jsonStringifyReplacer=(i,s)=>{if(typeof s==="bigint")return s.toString();return s}})(ve||(ve={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(J_||(J_={}));N=ve.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"])});var I,A3e=(e)=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),xr;var vm=A(()=>{fd();I=ve.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"]);xr=class xr extends Error{get errors(){return this.issues}constructor(e){super();this.issues=[],this.addIssue=(r)=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let t=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,t);else this.__proto__=t;this.name="ZodError",this.issues=e}format(e){let t=e||function(i){return i.message},r={_errors:[]},n=(i)=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)r._errors.push(t(s));else{let o=r,a=0;while(a<s.path.length){let c=s.path[a];if(a!==s.path.length-1)o[c]=o[c]||{_errors:[]};else o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(s));o=o[c],a++}}};return n(this),r}static assert(e){if(!(e instanceof xr))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ve.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=(t)=>t.message){let t={},r=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];t[i]=t[i]||[],t[i].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}};xr.create=(e)=>new xr(e)});var k3e=(e,t)=>{let r;switch(e.code){case I.invalid_type:if(e.received===N.undefined)r="Required";else r=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ve.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:r=`Unrecognized key(s) in object: ${ve.joinValues(e.keys,", ")}`;break;case I.invalid_union:r="Invalid input";break;case I.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ve.joinValues(e.options)}`;break;case I.invalid_enum_value:r=`Invalid enum value. Expected ${ve.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:r="Invalid function arguments";break;case I.invalid_return_type:r="Invalid function return type";break;case I.invalid_date:r="Invalid date";break;case I.invalid_string:if(typeof e.validation==="object")if("includes"in e.validation){if(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==="number")r=`${r} at one or more positions greater than or equal to ${e.validation.position}`}else if("startsWith"in e.validation)r=`Invalid input: must start with "${e.validation.startsWith}"`;else if("endsWith"in e.validation)r=`Invalid input: must end with "${e.validation.endsWith}"`;else ve.assertNever(e.validation);else if(e.validation!=="regex")r=`Invalid ${e.validation}`;else r="Invalid";break;case I.too_small:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="bigint")r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="date")r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`;else r="Invalid input";break;case I.too_big:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="bigint")r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="date")r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`;else r="Invalid input";break;case I.custom:r="Invalid input";break;case I.invalid_intersection_types:r="Intersection results could not be merged";break;case I.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:r="Number must be finite";break;default:r=t.defaultError,ve.assertNever(e)}return{message:r}},Fi;var X_=A(()=>{vm();fd();Fi=k3e});function P3e(e){rz=e}function bc(){return rz}var rz;var _m=A(()=>{X_();rz=Fi});function L(e,t){let r=bc(),n=pd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Fi?void 0:Fi].filter((i)=>!!i)});e.common.issues.push(n)}class kt{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(e,t){let r=[];for(let n of t){if(n.status==="aborted")return Q;if(n.status==="dirty")e.dirty();r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let n of t){let i=await n.key,s=await n.value;r.push({key:i,value:s})}return kt.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:i,value:s}=n;if(i.status==="aborted")return Q;if(s.status==="aborted")return Q;if(i.status==="dirty")e.dirty();if(s.status==="dirty")e.dirty();if(i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet))r[i.value]=s.value}return{status:e.value,value:r}}}var pd=(e)=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,s=[...r,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="",c=n.filter((l)=>!!l).slice().reverse();for(let l of c)a=l(o,{data:t,defaultError:a}).message;return{...i,path:s,message:a}},I3e,Q,Ro=(e)=>({status:"dirty",value:e}),Lt=(e)=>({status:"valid",value:e}),Dm=(e)=>e.status==="aborted",wm=(e)=>e.status==="dirty",Os=(e)=>e.status==="valid",vc=(e)=>typeof Promise<"u"&&e instanceof Promise;var Q_=A(()=>{_m();X_();I3e=[];Q=Object.freeze({status:"aborted"})});var nz=()=>{};var G;var iz=A(()=>{(function(e){e.errToObj=(t)=>typeof t==="string"?{message:t}:t||{},e.toString=(t)=>typeof t==="string"?t:t?.message})(G||(G={}))});class _n{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}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 le(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(t)return{errorMap:t,description:i};return{errorMap:(o,a)=>{let{message:c}=e;if(o.code==="invalid_enum_value")return{message:c??a.defaultError};if(typeof a.data>"u")return{message:c??n??a.defaultError};if(o.code!=="invalid_type")return{message:a.defaultError};return{message:c??r??a.defaultError}},description:i}}class he{get description(){return this._def.description}_getType(e){return Qn(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Qn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new kt,ctx:{common:e.parent.common,data:e.data,parsedType:Qn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(vc(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qn(e)},n=this._parseSync({data:e,path:r.path,parent:r});return sz(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qn(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return Os(r)?{value:r.value}:{issues:t.common.issues}}catch(r){if(r?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((r)=>Os(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Qn(e)},n=this._parse({data:e,path:r.path,parent:r}),i=await(vc(n)?n:Promise.resolve(n));return sz(r,i)}refine(e,t){let r=(n)=>{if(typeof t==="string"||typeof t>"u")return{message:t};else if(typeof t==="function")return t(n);else return t};return this._refinement((n,i)=>{let s=e(n),o=()=>i.addIssue({code:I.custom,...r(n)});if(typeof Promise<"u"&&s instanceof Promise)return s.then((a)=>{if(!a)return o(),!1;else return!0});if(!s)return o(),!1;else return!0})}refinement(e,t){return this._refinement((r,n)=>{if(!e(r))return n.addIssue(typeof t==="function"?t(r,n):t),!1;else return!0})}_refinement(e){return new Dn({schema:this,typeName:ee.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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:(t)=>this["~validate"](t)}}optional(){return vn.create(this,this._def)}nullable(){return Oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return bn.create(this)}promise(){return Po.create(this,this._def)}or(e){return $c.create([this,e],this._def)}and(e){return Cc.create(this,e,this._def)}transform(e){return new Dn({...le(this._def),schema:this,typeName:ee.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e==="function"?e:()=>e;return new Ac({...le(this._def),innerType:this,defaultValue:t,typeName:ee.ZodDefault})}brand(){return new Sm({typeName:ee.ZodBranded,type:this,...le(this._def)})}catch(e){let t=typeof e==="function"?e:()=>e;return new kc({...le(this._def),innerType:this,catchValue:t,typeName:ee.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return bd.create(this,e)}readonly(){return Pc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}function cz(e){let t="[0-5]\\d";if(e.precision)t=`${t}\\.\\d{${e.precision}}`;else if(e.precision==null)t=`${t}(\\.\\d+)?`;let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function X3e(e){return new RegExp(`^${cz(e)}$`)}function uz(e){let t=`${az}T${cz(e)}`,r=[];if(r.push(e.local?"Z?":"Z"),e.offset)r.push("([+-]\\d{2}:?\\d{2})");return t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Q3e(e,t){if((t==="v4"||!t)&&z3e.test(e))return!0;if((t==="v6"||!t)&&W3e.test(e))return!0;return!1}function Z3e(e,t){if(!B3e.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));if(typeof i!=="object"||i===null)return!1;if("typ"in i&&i?.typ!=="JWT")return!1;if(!i.alg)return!1;if(t&&i.alg!==t)return!1;return!0}catch{return!1}}function eIe(e,t){if((t==="v4"||!t)&&H3e.test(e))return!0;if((t==="v6"||!t)&&G3e.test(e))return!0;return!1}function tIe(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return s%o/10**i}function _c(e){if(e instanceof ut){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=vn.create(_c(n))}return new ut({...e._def,shape:()=>t})}else if(e instanceof bn)return new bn({...e._def,type:_c(e.element)});else if(e instanceof vn)return vn.create(_c(e.unwrap()));else if(e instanceof Oi)return Oi.create(_c(e.unwrap()));else if(e instanceof ei)return ei.create(e.items.map((t)=>_c(t)));else return e}function eD(e,t){let r=Qn(e),n=Qn(t);if(e===t)return{valid:!0,data:e};else if(r===N.object&&n===N.object){let i=ve.objectKeys(t),s=ve.objectKeys(e).filter((a)=>i.indexOf(a)!==-1),o={...e,...t};for(let a of s){let c=eD(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===N.array&&n===N.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let s=0;s<e.length;s++){let o=e[s],a=t[s],c=eD(o,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else if(r===N.date&&n===N.date&&+e===+t)return{valid:!0,data:e};else return{valid:!1}}function lz(e,t){return new Is({values:e,typeName:ee.ZodEnum,...le(t)})}function oz(e,t){let r=typeof e==="function"?e(t):typeof e==="string"?{message:e}:e;return typeof r==="string"?{message:r}:r}function dz(e,t={},r){if(e)return Ao.create().superRefine((n,i)=>{let s=e(n);if(s instanceof Promise)return s.then((o)=>{if(!o){let a=oz(t,n),c=a.fatal??r??!0;i.addIssue({code:"custom",...a,fatal:c})}});if(!s){let o=oz(t,n),a=o.fatal??r??!0;i.addIssue({code:"custom",...o,fatal:a})}return});return Ao.create()}var sz=(e,t)=>{if(Os(t))return{success:!0,data:t.value};else{if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new xr(e.common.issues);return this._error=r,this._error}}}},T3e,N3e,q3e,j3e,M3e,B3e,L3e,U3e,V3e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Z_,z3e,H3e,W3e,G3e,K3e,Y3e,az="((\\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])))",J3e,xn,ks,Ps,wc,Oo,md,Ec,Sc,Ao,As,Zn,hd,bn,ut,$c,Ri=(e)=>{if(e instanceof Fc)return Ri(e.schema);else if(e instanceof Dn)return Ri(e.innerType());else if(e instanceof Rc)return[e.value];else if(e instanceof Is)return e.options;else if(e instanceof Oc)return ve.objectValues(e.enum);else if(e instanceof Ac)return Ri(e._def.innerType);else if(e instanceof Ec)return[void 0];else if(e instanceof Sc)return[null];else if(e instanceof vn)return[void 0,...Ri(e.unwrap())];else if(e instanceof Oi)return[null,...Ri(e.unwrap())];else if(e instanceof Sm)return Ri(e.unwrap());else if(e instanceof Pc)return Ri(e.unwrap());else if(e instanceof kc)return Ri(e._def.innerType);else return[]},Em,Cc,ei,gd,yd,ko,Dc,Fc,Rc,Is,Oc,Po,Dn,vn,Oi,Ac,kc,xd,rIe,Sm,bd,Pc,nIe,ee,iIe=(e,t={message:`Input not instance of ${e.name}`})=>dz((r)=>r instanceof e,t),fz,pz,sIe,oIe,mz,aIe,cIe,uIe,lIe,dIe,fIe,pIe,mIe,hIe,gIe,yIe,xIe,bIe,vIe,_Ie,DIe,wIe,EIe,SIe,$Ie,CIe,FIe,RIe,OIe,AIe,kIe,PIe,IIe,TIe,NIe=()=>fz().optional(),qIe=()=>pz().optional(),jIe=()=>mz().optional(),MIe,BIe;var hz=A(()=>{vm();_m();iz();Q_();fd();T3e=/^c[^\s-]{8,}$/i,N3e=/^[0-9a-z]+$/,q3e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,j3e=/^[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,M3e=/^[a-z0-9_-]{21}$/i,B3e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,L3e=/^[-+]?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)?)??$/,U3e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,z3e=/^(?:(?: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])$/,H3e=/^(?:(?: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])$/,W3e=/^(([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]))$/,G3e=/^(([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])$/,K3e=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Y3e=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,J3e=new RegExp(`^${az}$`);xn=class xn extends he{_parse(e){if(this._def.coerce)e.data=String(e.data);if(this._getType(e)!==N.string){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:N.string,received:i.parsedType}),Q}let r=new kt,n=void 0;for(let i of this._def.checks)if(i.kind==="min"){if(e.data.length<i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty()}else if(i.kind==="max"){if(e.data.length>i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty()}else if(i.kind==="length"){let s=e.data.length>i.value,o=e.data.length<i.value;if(s||o){if(n=this._getOrReturnCtx(e,n),s)L(n,{code:I.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message});else if(o)L(n,{code:I.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message});r.dirty()}}else if(i.kind==="email"){if(!U3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"email",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="emoji"){if(!Z_)Z_=new RegExp(V3e,"u");if(!Z_.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"emoji",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="uuid"){if(!j3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"uuid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="nanoid"){if(!M3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"nanoid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cuid"){if(!T3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"cuid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cuid2"){if(!N3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"cuid2",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="ulid"){if(!q3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"ulid",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),L(n,{validation:"url",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="regex"){if(i.regex.lastIndex=0,!i.regex.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"regex",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="trim")e.data=e.data.trim();else if(i.kind==="includes"){if(!e.data.includes(i.value,i.position))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()}else if(i.kind==="toLowerCase")e.data=e.data.toLowerCase();else if(i.kind==="toUpperCase")e.data=e.data.toUpperCase();else if(i.kind==="startsWith"){if(!e.data.startsWith(i.value))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()}else if(i.kind==="endsWith"){if(!e.data.endsWith(i.value))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()}else if(i.kind==="datetime"){if(!uz(i).test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"datetime",message:i.message}),r.dirty()}else if(i.kind==="date"){if(!J3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"date",message:i.message}),r.dirty()}else if(i.kind==="time"){if(!X3e(i).test(e.data))n=this._getOrReturnCtx(e,n),L(n,{code:I.invalid_string,validation:"time",message:i.message}),r.dirty()}else if(i.kind==="duration"){if(!L3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"duration",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="ip"){if(!Q3e(e.data,i.version))n=this._getOrReturnCtx(e,n),L(n,{validation:"ip",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="jwt"){if(!Z3e(e.data,i.alg))n=this._getOrReturnCtx(e,n),L(n,{validation:"jwt",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="cidr"){if(!eIe(e.data,i.version))n=this._getOrReturnCtx(e,n),L(n,{validation:"cidr",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="base64"){if(!K3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"base64",code:I.invalid_string,message:i.message}),r.dirty()}else if(i.kind==="base64url"){if(!Y3e.test(e.data))n=this._getOrReturnCtx(e,n),L(n,{validation:"base64url",code:I.invalid_string,message:i.message}),r.dirty()}else ve.assertNever(i);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement((n)=>e.test(n),{validation:t,code:I.invalid_string,...G.errToObj(r)})}_addCheck(e){return new xn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...G.errToObj(e)})}url(e){return this._addCheck({kind:"url",...G.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...G.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...G.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...G.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...G.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...G.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...G.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...G.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...G.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...G.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...G.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...G.errToObj(e)})}datetime(e){if(typeof e==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e});return this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...G.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){if(typeof e==="string")return this._addCheck({kind:"time",precision:null,message:e});return this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...G.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...G.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...G.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...G.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...G.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...G.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...G.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...G.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...G.errToObj(t)})}nonempty(e){return this.min(1,G.errToObj(e))}trim(){return new xn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new xn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new xn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e)=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find((e)=>e.kind==="date")}get isTime(){return!!this._def.checks.find((e)=>e.kind==="time")}get isDuration(){return!!this._def.checks.find((e)=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find((e)=>e.kind==="email")}get isURL(){return!!this._def.checks.find((e)=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find((e)=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find((e)=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((e)=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((e)=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((e)=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find((e)=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find((e)=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find((e)=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find((e)=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find((e)=>e.kind==="base64url")}get minLength(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxLength(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};xn.create=(e)=>new xn({checks:[],typeName:ee.ZodString,coerce:e?.coerce??!1,...le(e)});ks=class ks extends he{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce)e.data=Number(e.data);if(this._getType(e)!==N.number){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:N.number,received:i.parsedType}),Q}let r=void 0,n=new kt;for(let i of this._def.checks)if(i.kind==="int"){if(!ve.isInteger(e.data))r=this._getOrReturnCtx(e,r),L(r,{code:I.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()}else if(i.kind==="min"){if(i.inclusive?e.data<i.value:e.data<=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()}else if(i.kind==="max"){if(i.inclusive?e.data>i.value:e.data>=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()}else if(i.kind==="multipleOf"){if(tIe(e.data,i.value)!==0)r=this._getOrReturnCtx(e,r),L(r,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()}else if(i.kind==="finite"){if(!Number.isFinite(e.data))r=this._getOrReturnCtx(e,r),L(r,{code:I.not_finite,message:i.message}),n.dirty()}else ve.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,G.toString(t))}gt(e,t){return this.setLimit("min",e,!1,G.toString(t))}lte(e,t){return this.setLimit("max",e,!0,G.toString(t))}lt(e,t){return this.setLimit("max",e,!1,G.toString(t))}setLimit(e,t,r,n){return new ks({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:G.toString(n)}]})}_addCheck(e){return new ks({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:G.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:G.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:G.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:G.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:G.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:G.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:G.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:G.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:G.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}get isInt(){return!!this._def.checks.find((e)=>e.kind==="int"||e.kind==="multipleOf"&&ve.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;else if(r.kind==="min"){if(t===null||r.value>t)t=r.value}else if(r.kind==="max"){if(e===null||r.value<e)e=r.value}return Number.isFinite(t)&&Number.isFinite(e)}};ks.create=(e)=>new ks({checks:[],typeName:ee.ZodNumber,coerce:e?.coerce||!1,...le(e)});Ps=class Ps extends he{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==N.bigint)return this._getInvalidInput(e);let r=void 0,n=new kt;for(let i of this._def.checks)if(i.kind==="min"){if(i.inclusive?e.data<i.value:e.data<=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()}else if(i.kind==="max"){if(i.inclusive?e.data>i.value:e.data>=i.value)r=this._getOrReturnCtx(e,r),L(r,{code:I.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()}else if(i.kind==="multipleOf"){if(e.data%i.value!==BigInt(0))r=this._getOrReturnCtx(e,r),L(r,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()}else ve.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return L(t,{code:I.invalid_type,expected:N.bigint,received:t.parsedType}),Q}gte(e,t){return this.setLimit("min",e,!0,G.toString(t))}gt(e,t){return this.setLimit("min",e,!1,G.toString(t))}lte(e,t){return this.setLimit("max",e,!0,G.toString(t))}lt(e,t){return this.setLimit("max",e,!1,G.toString(t))}setLimit(e,t,r,n){return new Ps({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:G.toString(n)}]})}_addCheck(e){return new Ps({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:G.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:G.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:G.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:G.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:G.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e}get maxValue(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e}};Ps.create=(e)=>new Ps({checks:[],typeName:ee.ZodBigInt,coerce:e?.coerce??!1,...le(e)});wc=class wc extends he{_parse(e){if(this._def.coerce)e.data=Boolean(e.data);if(this._getType(e)!==N.boolean){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.boolean,received:r.parsedType}),Q}return Lt(e.data)}};wc.create=(e)=>new wc({typeName:ee.ZodBoolean,coerce:e?.coerce||!1,...le(e)});Oo=class Oo extends he{_parse(e){if(this._def.coerce)e.data=new Date(e.data);if(this._getType(e)!==N.date){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_type,expected:N.date,received:i.parsedType}),Q}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return L(i,{code:I.invalid_date}),Q}let r=new kt,n=void 0;for(let i of this._def.checks)if(i.kind==="min"){if(e.data.getTime()<i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()}else if(i.kind==="max"){if(e.data.getTime()>i.value)n=this._getOrReturnCtx(e,n),L(n,{code:I.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()}else ve.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Oo({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:G.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:G.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)if(t.kind==="min"){if(e===null||t.value>e)e=t.value}return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)if(t.kind==="max"){if(e===null||t.value<e)e=t.value}return e!=null?new Date(e):null}};Oo.create=(e)=>new Oo({checks:[],coerce:e?.coerce||!1,typeName:ee.ZodDate,...le(e)});md=class md extends he{_parse(e){if(this._getType(e)!==N.symbol){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.symbol,received:r.parsedType}),Q}return Lt(e.data)}};md.create=(e)=>new md({typeName:ee.ZodSymbol,...le(e)});Ec=class Ec extends he{_parse(e){if(this._getType(e)!==N.undefined){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.undefined,received:r.parsedType}),Q}return Lt(e.data)}};Ec.create=(e)=>new Ec({typeName:ee.ZodUndefined,...le(e)});Sc=class Sc extends he{_parse(e){if(this._getType(e)!==N.null){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.null,received:r.parsedType}),Q}return Lt(e.data)}};Sc.create=(e)=>new Sc({typeName:ee.ZodNull,...le(e)});Ao=class Ao extends he{constructor(){super(...arguments);this._any=!0}_parse(e){return Lt(e.data)}};Ao.create=(e)=>new Ao({typeName:ee.ZodAny,...le(e)});As=class As extends he{constructor(){super(...arguments);this._unknown=!0}_parse(e){return Lt(e.data)}};As.create=(e)=>new As({typeName:ee.ZodUnknown,...le(e)});Zn=class Zn extends he{_parse(e){let t=this._getOrReturnCtx(e);return L(t,{code:I.invalid_type,expected:N.never,received:t.parsedType}),Q}};Zn.create=(e)=>new Zn({typeName:ee.ZodNever,...le(e)});hd=class hd extends he{_parse(e){if(this._getType(e)!==N.undefined){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.void,received:r.parsedType}),Q}return Lt(e.data)}};hd.create=(e)=>new hd({typeName:ee.ZodVoid,...le(e)});bn=class bn extends he{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==N.array)return L(t,{code:I.invalid_type,expected:N.array,received:t.parsedType}),Q;if(n.exactLength!==null){let s=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;if(s||o)L(t,{code:s?I.too_big:I.too_small,minimum:o?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty()}if(n.minLength!==null){if(t.data.length<n.minLength.value)L(t,{code:I.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()}if(n.maxLength!==null){if(t.data.length>n.maxLength.value)L(t,{code:I.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()}if(t.common.async)return Promise.all([...t.data].map((s,o)=>n.type._parseAsync(new _n(t,s,t.path,o)))).then((s)=>kt.mergeArray(r,s));let i=[...t.data].map((s,o)=>n.type._parseSync(new _n(t,s,t.path,o)));return kt.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new bn({...this._def,minLength:{value:e,message:G.toString(t)}})}max(e,t){return new bn({...this._def,maxLength:{value:e,message:G.toString(t)}})}length(e,t){return new bn({...this._def,exactLength:{value:e,message:G.toString(t)}})}nonempty(e){return this.min(1,e)}};bn.create=(e,t)=>new bn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ee.ZodArray,...le(t)});ut=class ut extends he{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=ve.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==N.object){let c=this._getOrReturnCtx(e);return L(c,{code:I.invalid_type,expected:N.object,received:c.parsedType}),Q}let{status:r,ctx:n}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof Zn&&this._def.unknownKeys==="strip")){for(let c in n.data)if(!s.includes(c))o.push(c)}let a=[];for(let c of s){let l=i[c],d=n.data[c];a.push({key:{status:"valid",value:c},value:l._parse(new _n(n,d,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof Zn){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of o)a.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(c==="strict"){if(o.length>0)L(n,{code:I.unrecognized_keys,keys:o}),r.dirty()}else if(c==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of o){let d=n.data[l];a.push({key:{status:"valid",value:l},value:c._parse(new _n(n,d,n.path,l)),alwaysSet:l in n.data})}}if(n.common.async)return Promise.resolve().then(async()=>{let c=[];for(let l of a){let d=await l.key,f=await l.value;c.push({key:d,value:f,alwaysSet:l.alwaysSet})}return c}).then((c)=>kt.mergeObjectSync(r,c));else return kt.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(e){return G.errToObj,new ut({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;if(t.code==="unrecognized_keys")return{message:G.errToObj(e).message??n};return{message:n}}}:{}})}strip(){return new ut({...this._def,unknownKeys:"strip"})}passthrough(){return new ut({...this._def,unknownKeys:"passthrough"})}extend(e){return new ut({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ut({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ee.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ut({...this._def,catchall:e})}pick(e){let t={};for(let r of ve.objectKeys(e))if(e[r]&&this.shape[r])t[r]=this.shape[r];return new ut({...this._def,shape:()=>t})}omit(e){let t={};for(let r of ve.objectKeys(this.shape))if(!e[r])t[r]=this.shape[r];return new ut({...this._def,shape:()=>t})}deepPartial(){return _c(this)}partial(e){let t={};for(let r of ve.objectKeys(this.shape)){let n=this.shape[r];if(e&&!e[r])t[r]=n;else t[r]=n.optional()}return new ut({...this._def,shape:()=>t})}required(e){let t={};for(let r of ve.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let i=this.shape[r];while(i instanceof vn)i=i._def.innerType;t[r]=i}return new ut({...this._def,shape:()=>t})}keyof(){return lz(ve.objectKeys(this.shape))}};ut.create=(e,t)=>new ut({shape:()=>e,unknownKeys:"strip",catchall:Zn.create(),typeName:ee.ZodObject,...le(t)});ut.strictCreate=(e,t)=>new ut({shape:()=>e,unknownKeys:"strict",catchall:Zn.create(),typeName:ee.ZodObject,...le(t)});ut.lazycreate=(e,t)=>new ut({shape:e,unknownKeys:"strip",catchall:Zn.create(),typeName:ee.ZodObject,...le(t)});$c=class $c extends he{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function n(i){for(let o of i)if(o.result.status==="valid")return o.result;for(let o of i)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let s=i.map((o)=>new xr(o.ctx.common.issues));return L(t,{code:I.invalid_union,unionErrors:s}),Q}if(t.common.async)return Promise.all(r.map(async(i)=>{let s={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);else{let i=void 0,s=[];for(let a of r){let c={...t,common:{...t.common,issues:[]},parent:null},l=a._parseSync({data:t.data,path:t.path,parent:c});if(l.status==="valid")return l;else if(l.status==="dirty"&&!i)i={result:l,ctx:c};if(c.common.issues.length)s.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;let o=s.map((a)=>new xr(a));return L(t,{code:I.invalid_union,unionErrors:o}),Q}}get options(){return this._def.options}};$c.create=(e,t)=>new $c({options:e,typeName:ee.ZodUnion,...le(t)});Em=class Em extends he{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==N.object)return L(t,{code:I.invalid_type,expected:N.object,received:t.parsedType}),Q;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);if(!i)return L(t,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Q;if(t.common.async)return i._parseAsync({data:t.data,path:t.path,parent:t});else return i._parseSync({data:t.data,path:t.path,parent:t})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let i of t){let s=Ri(i.shape[e]);if(!s.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of s){if(n.has(o))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,i)}}return new Em({typeName:ee.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...le(r)})}};Cc=class Cc extends he{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(i,s)=>{if(Dm(i)||Dm(s))return Q;let o=eD(i.value,s.value);if(!o.valid)return L(r,{code:I.invalid_intersection_types}),Q;if(wm(i)||wm(s))t.dirty();return{status:t.value,value:o.data}};if(r.common.async)return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>n(i,s));else return n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Cc.create=(e,t,r)=>new Cc({left:e,right:t,typeName:ee.ZodIntersection,...le(r)});ei=class ei extends he{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.array)return L(r,{code:I.invalid_type,expected:N.array,received:r.parsedType}),Q;if(r.data.length<this._def.items.length)return L(r,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Q;if(!this._def.rest&&r.data.length>this._def.items.length)L(r,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty();let i=[...r.data].map((s,o)=>{let a=this._def.items[o]||this._def.rest;if(!a)return null;return a._parse(new _n(r,s,r.path,o))}).filter((s)=>!!s);if(r.common.async)return Promise.all(i).then((s)=>kt.mergeArray(t,s));else return kt.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new ei({...this._def,rest:e})}};ei.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ei({items:e,typeName:ee.ZodTuple,rest:null,...le(t)})};gd=class gd extends he{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.object)return L(r,{code:I.invalid_type,expected:N.object,received:r.parsedType}),Q;let n=[],i=this._def.keyType,s=this._def.valueType;for(let o in r.data)n.push({key:i._parse(new _n(r,o,r.path,o)),value:s._parse(new _n(r,r.data[o],r.path,o)),alwaysSet:o in r.data});if(r.common.async)return kt.mergeObjectAsync(t,n);else return kt.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){if(t instanceof he)return new gd({keyType:e,valueType:t,typeName:ee.ZodRecord,...le(r)});return new gd({keyType:xn.create(),valueType:e,typeName:ee.ZodRecord,...le(t)})}};yd=class yd extends he{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.map)return L(r,{code:I.invalid_type,expected:N.map,received:r.parsedType}),Q;let n=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([o,a],c)=>({key:n._parse(new _n(r,o,r.path,[c,"key"])),value:i._parse(new _n(r,a,r.path,[c,"value"]))}));if(r.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let a of s){let c=await a.key,l=await a.value;if(c.status==="aborted"||l.status==="aborted")return Q;if(c.status==="dirty"||l.status==="dirty")t.dirty();o.set(c.value,l.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let a of s){let{key:c,value:l}=a;if(c.status==="aborted"||l.status==="aborted")return Q;if(c.status==="dirty"||l.status==="dirty")t.dirty();o.set(c.value,l.value)}return{status:t.value,value:o}}}};yd.create=(e,t,r)=>new yd({valueType:t,keyType:e,typeName:ee.ZodMap,...le(r)});ko=class ko extends he{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.set)return L(r,{code:I.invalid_type,expected:N.set,received:r.parsedType}),Q;let n=this._def;if(n.minSize!==null){if(r.data.size<n.minSize.value)L(r,{code:I.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()}if(n.maxSize!==null){if(r.data.size>n.maxSize.value)L(r,{code:I.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty()}let i=this._def.valueType;function s(a){let c=new Set;for(let l of a){if(l.status==="aborted")return Q;if(l.status==="dirty")t.dirty();c.add(l.value)}return{status:t.value,value:c}}let o=[...r.data.values()].map((a,c)=>i._parse(new _n(r,a,r.path,c)));if(r.common.async)return Promise.all(o).then((a)=>s(a));else return s(o)}min(e,t){return new ko({...this._def,minSize:{value:e,message:G.toString(t)}})}max(e,t){return new ko({...this._def,maxSize:{value:e,message:G.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};ko.create=(e,t)=>new ko({valueType:e,minSize:null,maxSize:null,typeName:ee.ZodSet,...le(t)});Dc=class Dc extends he{constructor(){super(...arguments);this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==N.function)return L(t,{code:I.invalid_type,expected:N.function,received:t.parsedType}),Q;function r(o,a){return pd({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,bc(),Fi].filter((c)=>!!c),issueData:{code:I.invalid_arguments,argumentsError:a}})}function n(o,a){return pd({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,bc(),Fi].filter((c)=>!!c),issueData:{code:I.invalid_return_type,returnTypeError:a}})}let i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof Po){let o=this;return Lt(async function(...a){let c=new xr([]),l=await o._def.args.parseAsync(a,i).catch((m)=>{throw c.addIssue(r(a,m)),c}),d=await Reflect.apply(s,this,l);return await o._def.returns._def.type.parseAsync(d,i).catch((m)=>{throw c.addIssue(n(d,m)),c})})}else{let o=this;return Lt(function(...a){let c=o._def.args.safeParse(a,i);if(!c.success)throw new xr([r(a,c.error)]);let l=Reflect.apply(s,this,c.data),d=o._def.returns.safeParse(l,i);if(!d.success)throw new xr([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Dc({...this._def,args:ei.create(e).rest(As.create())})}returns(e){return new Dc({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new Dc({args:e?e:ei.create([]).rest(As.create()),returns:t||As.create(),typeName:ee.ZodFunction,...le(r)})}};Fc=class Fc extends he{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Fc.create=(e,t)=>new Fc({getter:e,typeName:ee.ZodLazy,...le(t)});Rc=class Rc extends he{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return L(t,{received:t.data,code:I.invalid_literal,expected:this._def.value}),Q}return{status:"valid",value:e.data}}get value(){return this._def.value}};Rc.create=(e,t)=>new Rc({value:e,typeName:ee.ZodLiteral,...le(t)});Is=class Is extends he{_parse(e){if(typeof e.data!=="string"){let t=this._getOrReturnCtx(e),r=this._def.values;return L(t,{expected:ve.joinValues(r),received:t.parsedType,code:I.invalid_type}),Q}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return L(t,{received:t.data,code:I.invalid_enum_value,options:r}),Q}return Lt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Is.create(e,{...this._def,...t})}exclude(e,t=this._def){return Is.create(this.options.filter((r)=>!e.includes(r)),{...this._def,...t})}};Is.create=lz;Oc=class Oc extends he{_parse(e){let t=ve.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==N.string&&r.parsedType!==N.number){let n=ve.objectValues(t);return L(r,{expected:ve.joinValues(n),received:r.parsedType,code:I.invalid_type}),Q}if(!this._cache)this._cache=new Set(ve.getValidEnumValues(this._def.values));if(!this._cache.has(e.data)){let n=ve.objectValues(t);return L(r,{received:r.data,code:I.invalid_enum_value,options:n}),Q}return Lt(e.data)}get enum(){return this._def.values}};Oc.create=(e,t)=>new Oc({values:e,typeName:ee.ZodNativeEnum,...le(t)});Po=class Po extends he{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==N.promise&&t.common.async===!1)return L(t,{code:I.invalid_type,expected:N.promise,received:t.parsedType}),Q;let r=t.parsedType===N.promise?t.data:Promise.resolve(t.data);return Lt(r.then((n)=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Po.create=(e,t)=>new Po({type:e,typeName:ee.ZodPromise,...le(t)});Dn=class Dn extends he{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:(s)=>{if(L(r,s),s.fatal)t.abort();else t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async(o)=>{if(t.value==="aborted")return Q;let a=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});if(a.status==="aborted")return Q;if(a.status==="dirty")return Ro(a.value);if(t.value==="dirty")return Ro(a.value);return a});else{if(t.value==="aborted")return Q;let o=this._def.schema._parseSync({data:s,path:r.path,parent:r});if(o.status==="aborted")return Q;if(o.status==="dirty")return Ro(o.value);if(t.value==="dirty")return Ro(o.value);return o}}if(n.type==="refinement"){let s=(o)=>{let a=n.refinement(o,i);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){let o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(o.status==="aborted")return Q;if(o.status==="dirty")t.dirty();return s(o.value),{status:t.value,value:o.value}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((o)=>{if(o.status==="aborted")return Q;if(o.status==="dirty")t.dirty();return s(o.value).then(()=>({status:t.value,value:o.value}))})}if(n.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Os(s))return Q;let o=n.transform(s.value,i);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((s)=>{if(!Os(s))return Q;return Promise.resolve(n.transform(s.value,i)).then((o)=>({status:t.value,value:o}))});ve.assertNever(n)}};Dn.create=(e,t,r)=>new Dn({schema:e,typeName:ee.ZodEffects,effect:t,...le(r)});Dn.createWithPreprocess=(e,t,r)=>new Dn({schema:t,effect:{type:"preprocess",transform:e},typeName:ee.ZodEffects,...le(r)});vn=class vn extends he{_parse(e){if(this._getType(e)===N.undefined)return Lt(void 0);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};vn.create=(e,t)=>new vn({innerType:e,typeName:ee.ZodOptional,...le(t)});Oi=class Oi extends he{_parse(e){if(this._getType(e)===N.null)return Lt(null);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Oi.create=(e,t)=>new Oi({innerType:e,typeName:ee.ZodNullable,...le(t)});Ac=class Ac extends he{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;if(t.parsedType===N.undefined)r=this._def.defaultValue();return this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Ac.create=(e,t)=>new Ac({innerType:e,typeName:ee.ZodDefault,defaultValue:typeof t.default==="function"?t.default:()=>t.default,...le(t)});kc=class kc extends he{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});if(vc(n))return n.then((i)=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new xr(r.common.issues)},input:r.data})}));else return{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new xr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};kc.create=(e,t)=>new kc({innerType:e,typeName:ee.ZodCatch,catchValue:typeof t.catch==="function"?t.catch:()=>t.catch,...le(t)});xd=class xd extends he{_parse(e){if(this._getType(e)!==N.nan){let r=this._getOrReturnCtx(e);return L(r,{code:I.invalid_type,expected:N.nan,received:r.parsedType}),Q}return{status:"valid",value:e.data}}};xd.create=(e)=>new xd({typeName:ee.ZodNaN,...le(e)});rIe=Symbol("zod_brand");Sm=class Sm extends he{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}};bd=class bd extends he{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});if(i.status==="aborted")return Q;if(i.status==="dirty")return t.dirty(),Ro(i.value);else return this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();else{let n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});if(n.status==="aborted")return Q;if(n.status==="dirty")return t.dirty(),{status:"dirty",value:n.value};else return this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new bd({in:e,out:t,typeName:ee.ZodPipeline})}};Pc=class Pc extends he{_parse(e){let t=this._def.innerType._parse(e),r=(n)=>{if(Os(n))n.value=Object.freeze(n.value);return n};return vc(t)?t.then((n)=>r(n)):r(t)}unwrap(){return this._def.innerType}};Pc.create=(e,t)=>new Pc({innerType:e,typeName:ee.ZodReadonly,...le(t)});nIe={object:ut.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ee||(ee={}));fz=xn.create,pz=ks.create,sIe=xd.create,oIe=Ps.create,mz=wc.create,aIe=Oo.create,cIe=md.create,uIe=Ec.create,lIe=Sc.create,dIe=Ao.create,fIe=As.create,pIe=Zn.create,mIe=hd.create,hIe=bn.create,gIe=ut.create,yIe=ut.strictCreate,xIe=$c.create,bIe=Em.create,vIe=Cc.create,_Ie=ei.create,DIe=gd.create,wIe=yd.create,EIe=ko.create,SIe=Dc.create,$Ie=Fc.create,CIe=Rc.create,FIe=Is.create,RIe=Oc.create,OIe=Po.create,AIe=Dn.create,kIe=vn.create,PIe=Oi.create,IIe=Dn.createWithPreprocess,TIe=bd.create,MIe={string:(e)=>xn.create({...e,coerce:!0}),number:(e)=>ks.create({...e,coerce:!0}),boolean:(e)=>wc.create({...e,coerce:!0}),bigint:(e)=>Ps.create({...e,coerce:!0}),date:(e)=>Oo.create({...e,coerce:!0})},BIe=Q});var E={};ji(E,{BRAND:()=>rIe,DIRTY:()=>Ro,EMPTY_PATH:()=>I3e,INVALID:()=>Q,NEVER:()=>BIe,OK:()=>Lt,ParseStatus:()=>kt,Schema:()=>he,ZodAny:()=>Ao,ZodArray:()=>bn,ZodBigInt:()=>Ps,ZodBoolean:()=>wc,ZodBranded:()=>Sm,ZodCatch:()=>kc,ZodDate:()=>Oo,ZodDefault:()=>Ac,ZodDiscriminatedUnion:()=>Em,ZodEffects:()=>Dn,ZodEnum:()=>Is,ZodError:()=>xr,ZodFirstPartyTypeKind:()=>ee,ZodFunction:()=>Dc,ZodIntersection:()=>Cc,ZodIssueCode:()=>I,ZodLazy:()=>Fc,ZodLiteral:()=>Rc,ZodMap:()=>yd,ZodNaN:()=>xd,ZodNativeEnum:()=>Oc,ZodNever:()=>Zn,ZodNull:()=>Sc,ZodNullable:()=>Oi,ZodNumber:()=>ks,ZodObject:()=>ut,ZodOptional:()=>vn,ZodParsedType:()=>N,ZodPipeline:()=>bd,ZodPromise:()=>Po,ZodReadonly:()=>Pc,ZodRecord:()=>gd,ZodSchema:()=>he,ZodSet:()=>ko,ZodString:()=>xn,ZodSymbol:()=>md,ZodTransformer:()=>Dn,ZodTuple:()=>ei,ZodType:()=>he,ZodUndefined:()=>Ec,ZodUnion:()=>$c,ZodUnknown:()=>As,ZodVoid:()=>hd,addIssueToContext:()=>L,any:()=>dIe,array:()=>hIe,bigint:()=>oIe,boolean:()=>mz,coerce:()=>MIe,custom:()=>dz,date:()=>aIe,datetimeRegex:()=>uz,defaultErrorMap:()=>Fi,discriminatedUnion:()=>bIe,effect:()=>AIe,enum:()=>FIe,function:()=>SIe,getErrorMap:()=>bc,getParsedType:()=>Qn,instanceof:()=>iIe,intersection:()=>vIe,isAborted:()=>Dm,isAsync:()=>vc,isDirty:()=>wm,isValid:()=>Os,late:()=>nIe,lazy:()=>$Ie,literal:()=>CIe,makeIssue:()=>pd,map:()=>wIe,nan:()=>sIe,nativeEnum:()=>RIe,never:()=>pIe,null:()=>lIe,nullable:()=>PIe,number:()=>pz,object:()=>gIe,objectUtil:()=>J_,oboolean:()=>jIe,onumber:()=>qIe,optional:()=>kIe,ostring:()=>NIe,pipeline:()=>TIe,preprocess:()=>IIe,promise:()=>OIe,quotelessJson:()=>A3e,record:()=>DIe,set:()=>EIe,setErrorMap:()=>P3e,strictObject:()=>yIe,string:()=>fz,symbol:()=>cIe,transformer:()=>AIe,tuple:()=>_Ie,undefined:()=>uIe,union:()=>xIe,unknown:()=>fIe,util:()=>ve,void:()=>mIe});var tD=A(()=>{_m();Q_();nz();fd();hz();vm()});var Ic=A(()=>{tD();tD()});import{copyFileSync as LIe,existsSync as gz,mkdirSync as UIe}from"fs";import{homedir as Cm}from"os";import{join as Tc}from"path";function zIe(e){let t=e.trim().replace(/\/+$/,"");try{let r=new URL(t);return r.protocol=r.protocol.toLowerCase(),r.host=r.host.toLowerCase(),r.toString().replace(/\/+$/,"")}catch{return console.error(`[nemar] could not parse stored apiUrl ${JSON.stringify(e)}; leaving as-is`),t}}function HIe(){return process.env.NEMAR_CONFIG_DIR||Tc(Cm(),".config","nemar")}function WIe(e){if(process.env.NEMAR_CONFIG_DIR)return;let t=Tc(e,"config.json");if(gz(t))return;let r=[];if(process.platform==="darwin")r.push(Tc(Cm(),"Library","Preferences","nemar-nodejs","config.json"));if(process.platform==="win32"){let n=process.env.APPDATA||Tc(Cm(),"AppData","Roaming");r.push(Tc(n,"nemar-nodejs","config.json"))}r.push(Tc(Cm(),".config","nemar-nodejs","config.json"));for(let n of r)if(gz(n))try{UIe(e,{recursive:!0}),LIe(n,t),console.error(`[nemar] Config migrated from ${n} to ${t}
|
|
99
99
|
[nemar] You can safely remove the old file.`);return}catch(i){console.error(`[nemar] Failed to migrate config from ${n}:`,i,`
|
|
100
|
-
[nemar] You can manually copy ${n} to ${t}`)}}function wn(){let e=HIe();if($m&&yz===e)return $m;if(WIe(e),$m=new bm({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:e}),yz=e,!xz.has(e))xz.add(e),KIe(),YIe();return $m}function KIe(){let e=wn(),t=e.get("accounts");if(t&&Object.keys(t).length>0)return;let r=e.get("apiKey"),n=e.get("username");if(!r&&!n)return;try{let i=n||"default",s={};for(let o of GIe){let a=e.get(o);if(a!==void 0)s[o]=a}e.store={activeAccount:i,accounts:{[i]:s}}}catch(i){console.error("Config migration failed (legacy config preserved):",i)}}function YIe(){let e=wn(),t=e.store,r=t.accounts,n=!1;if(r)for(let[s,o]of Object.entries(r)){let a=o?.apiUrl;if(!a)continue;if(VIe.has(zIe(a)))r[s]={...o,apiUrl:Io},console.error(`[nemar] migrated stored apiUrl for account "${s}": ${a} -> ${Io}`),n=!0}let i=t.apiUrl;if(r&&Object.keys(r).length>0&&i!==void 0){let{apiUrl:s,...o}=t;try{e.store=o,console.error(`[nemar] removed stale top-level apiUrl from config (was: ${i})`),n=!1}catch(a){console.error("API URL cleanup failed (config file unchanged):",a)}}if(n)try{e.store={...e.store,accounts:r}}catch(s){console.error("API URL migration failed (config file unchanged):",s)}}function Fm(){return wn().get("activeAccount")}function Nc(){return wn().get("accounts")||{}}function ht(){let e={apiUrl:Io},t=Fm();if(!t)return e;return Nc()[t]||e}function bz(){return!!ht().sandboxCompleted}function En(e,t){let r=wn(),n=r.get("activeAccount")||"default",i=r.get("accounts")||{};if(!i[n])i[n]={apiUrl:Io};i[n][e]=t,r.store={...r.store,accounts:i,activeAccount:n}}function rD(e){let t=Fm();if(!t)return;let r=Nc();if(r[t])delete r[t][e],wn().set("accounts",r)}function vz(){let e=wn(),t=Fm();if(!t){e.clear();return}let r=Nc();delete r[t];let n=Object.keys(r);if(n.length>0)e.store={...e.store,accounts:r,activeAccount:n[0]};else e.clear()}function _z(){wn().clear()}function Ue(){return!!ht().apiKey}function Dz(){return wn().path}function vd(){let e=Nc(),t=Fm();return Object.entries(e).map(([r,n])=>({username:n.username||r,email:n.email,githubUsername:n.githubUsername,active:r===t}))}function wz(e,t){let r=wn(),n=Nc();n[e]=t,r.store={...r.store,accounts:n,activeAccount:e}}function Ez(e){let t=wn(),r=Nc();if(r[e])return t.store={...t.store,activeAccount:e},r[e];for(let[n,i]of Object.entries(r))if(i.githubUsername===e)return t.store={...t.store,activeAccount:n},i;return null}var Io="https://api.nemar.org",VIe,YXe,$m=null,yz=null,xz,GIe;var Ts=A(()=>{tz();Ic();VIe=new Set(["https://api.osc.earth/nemar","https://nemar-api.neuromechanist.workers.dev","https://nemar-api-dev.shirazi-10f.workers.dev"]);YXe=
|
|
100
|
+
[nemar] You can manually copy ${n} to ${t}`)}}function wn(){let e=HIe();if($m&&yz===e)return $m;if(WIe(e),$m=new bm({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:e}),yz=e,!xz.has(e))xz.add(e),KIe(),YIe();return $m}function KIe(){let e=wn(),t=e.get("accounts");if(t&&Object.keys(t).length>0)return;let r=e.get("apiKey"),n=e.get("username");if(!r&&!n)return;try{let i=n||"default",s={};for(let o of GIe){let a=e.get(o);if(a!==void 0)s[o]=a}e.store={activeAccount:i,accounts:{[i]:s}}}catch(i){console.error("Config migration failed (legacy config preserved):",i)}}function YIe(){let e=wn(),t=e.store,r=t.accounts,n=!1;if(r)for(let[s,o]of Object.entries(r)){let a=o?.apiUrl;if(!a)continue;if(VIe.has(zIe(a)))r[s]={...o,apiUrl:Io},console.error(`[nemar] migrated stored apiUrl for account "${s}": ${a} -> ${Io}`),n=!0}let i=t.apiUrl;if(r&&Object.keys(r).length>0&&i!==void 0){let{apiUrl:s,...o}=t;try{e.store=o,console.error(`[nemar] removed stale top-level apiUrl from config (was: ${i})`),n=!1}catch(a){console.error("API URL cleanup failed (config file unchanged):",a)}}if(n)try{e.store={...e.store,accounts:r}}catch(s){console.error("API URL migration failed (config file unchanged):",s)}}function Fm(){return wn().get("activeAccount")}function Nc(){return wn().get("accounts")||{}}function ht(){let e={apiUrl:Io},t=Fm();if(!t)return e;return Nc()[t]||e}function bz(){return!!ht().sandboxCompleted}function En(e,t){let r=wn(),n=r.get("activeAccount")||"default",i=r.get("accounts")||{};if(!i[n])i[n]={apiUrl:Io};i[n][e]=t,r.store={...r.store,accounts:i,activeAccount:n}}function rD(e){let t=Fm();if(!t)return;let r=Nc();if(r[t])delete r[t][e],wn().set("accounts",r)}function vz(){let e=wn(),t=Fm();if(!t){e.clear();return}let r=Nc();delete r[t];let n=Object.keys(r);if(n.length>0)e.store={...e.store,accounts:r,activeAccount:n[0]};else e.clear()}function _z(){wn().clear()}function Ue(){return!!ht().apiKey}function Dz(){return wn().path}function vd(){let e=Nc(),t=Fm();return Object.entries(e).map(([r,n])=>({username:n.username||r,email:n.email,githubUsername:n.githubUsername,active:r===t}))}function wz(e,t){let r=wn(),n=Nc();n[e]=t,r.store={...r.store,accounts:n,activeAccount:e}}function Ez(e){let t=wn(),r=Nc();if(r[e])return t.store={...t.store,activeAccount:e},r[e];for(let[n,i]of Object.entries(r))if(i.githubUsername===e)return t.store={...t.store,activeAccount:n},i;return null}var Io="https://api.nemar.org",VIe,YXe,$m=null,yz=null,xz,GIe;var Ts=A(()=>{tz();Ic();VIe=new Set(["https://api.osc.earth/nemar","https://nemar-api.neuromechanist.workers.dev","https://nemar-api-dev.shirazi-10f.workers.dev"]);YXe=E.object({apiKey:E.string().optional(),apiUrl:E.string().url().default(Io),username:E.string().optional(),email:E.string().email().optional(),githubUsername:E.string().optional(),sandboxCompleted:E.boolean().optional(),sandboxDatasetId:E.string().optional(),dismissedNoticeIds:E.array(E.number()).optional()});xz=new Set;GIe=["apiKey","apiUrl","username","email","githubUsername","sandboxCompleted","sandboxDatasetId","dismissedNoticeIds"]});function Rm(e){if(Sz)return;Sz=!0;let t=u.yellow("\u2500".repeat(60)),r=u.yellow.bold("[MAINTENANCE]"),n=u.dim(`mode: ${e.mode}`),i=e.eta?`
|
|
101
101
|
${u.dim(`eta: ${e.eta}`)}`:"";process.stderr.write(`${t}
|
|
102
102
|
${r} ${e.message}
|
|
103
103
|
${n}${i}
|
|
104
104
|
${t}
|
|
105
|
-
`)}var Sz=!1;var nD=A(()=>{He()});var Cz;var $z=A(()=>{Cz={name:"nemar-cli",version:"0.9.12-PR1205.70eb24a",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 && tsc --noEmit -p backend",prepublishOnly:"bun run build",prepare:"husky",postinstall:"bun scripts/postinstall-check.mjs",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://docs.nemar.org",engines:{bun:">=1.0.0"},files:["dist","scripts/postinstall-check.mjs","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",ajv:"^8.20.0","ajv-formats":"^3.0.1",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 To;var Om=A(()=>{$z();To=Cz.version});function V(e){if(e instanceof Error)return e.message;return String(e)}var q,No;var er=A(()=>{q=class q extends Error{statusCode;details;step;constructor(e,t,r,n){super(t);this.statusCode=e;this.details=r;this.step=n;this.name="ApiError"}};No=class No extends q{mode;eta;constructor(e,t,r,n){super(503,t,n);this.mode=e;this.eta=r;this.name="MaintenanceError"}}});function Fz(){if(process.env.TEST_API_URL)return process.env.TEST_API_URL;if(sD)return iD;return ht().apiUrl||iD}async function P(e,t={},r=!1,n){let i=`${Fz()}${e}`,s={"Content-Type":"application/json","X-CLI-Version":To,...t.headers};if(r){let c=ht();if(!c.apiKey&&r===!0)throw new q(401,"Not authenticated. Run 'nemar auth login' first.");if(c.apiKey)s.Authorization=`Bearer ${c.apiKey}`}let o;try{o=await fetch(i,{...t,headers:s})}catch(c){throw new q(0,`Network error: Could not connect to ${Fz()}`,{originalError:c instanceof Error?c.message:String(c)})}let a;try{a=await o.json()}catch{throw new q(o.status,`Invalid response from server (status ${o.status})`)}if(!o.ok){if(o.status===503&&(a.mode==="read-only"||a.mode==="full")){let c=typeof a.message==="string"?a.message:"NEMAR is in maintenance mode. Please retry shortly.",l=typeof a.eta==="string"?a.eta:null,d=new No(a.mode,c,l,a.details);throw Rm(d),d}throw new q(o.status,a.error||a.message||"Request failed",a.details,typeof a.step==="string"?a.step:void 0)}if(n){let c=n.safeParse(a);if(!c.success)throw new q(o.status,`Response for ${e} did not match the expected NEMAR contract`,{issues:c.error.issues});return c.data}return a}var iD="https://api.nemar.org",sD;var Ns=A(()=>{Ts();nD();Om();er();sD=iD.includes("workers.dev")});async function Rz(e,t){let r=new URLSearchParams;if(e)r.set("status",e);if(t)r.set("role",t);let n=r.toString()?`?${r.toString()}`:"";return P(`/admin/users${n}`,{},!0)}async function Oz(e){return P(`/admin/approve/${e}`,{method:"POST"},!0)}async function Az(e){return P(`/admin/approve/by-id/${e}`,{method:"POST"},!0)}async function kz(e){return P(`/admin/revoke/${e}`,{method:"POST"},!0)}async function Pz(e,t){return P(`/admin/users/${e}/role`,{method:"POST",body:JSON.stringify({role:t})},!0)}async function oD(e,t){return P(`/admin/datasets/${e}/visibility`,{method:"PATCH",body:JSON.stringify({visibility:t})},!0)}async function Iz(e){return P(`/datasets/${e}/publish`,{method:"POST"},!0)}async function Tz(e){return P(`/admin/datasets/${e}/ci`,{},!0)}async function Ai(e){return P(`/admin/datasets/${e}/ci`,{method:"POST"},!0)}async function aD(e){return P(`/admin/datasets/${e}/ci/validate`,{method:"POST"},!0)}async function cD(e){return P(`/admin/datasets/${e}/ci/sync`,{method:"POST"},!0)}async function Nz(e,t){return P(`/admin/datasets/${e}/doi/concept`,{method:"POST",body:JSON.stringify(t)},!0)}async function _d(e){return P(`/admin/datasets/${e}/doi`,{},!0)}async function uD(e,t){return P(`/admin/datasets/${e}/doi/update`,{method:"POST",body:JSON.stringify(t)},!0)}async function qz(e,t){return P(`/admin/datasets/${e}/withdraw`,{method:"POST",body:JSON.stringify({reason:t.reason,dry_run:t.dryRun})},!0)}async function jz(e,t){return P(`/admin/datasets/${e}/restore`,{method:"POST",body:JSON.stringify({dry_run:t.dryRun})},!0)}async function Mz(e){return P(`/admin/datasets/${e}/reset`,{method:"POST"},!0)}async function Bz(e,t=!1){return P(`/admin/datasets/${e}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({force:t})},!0)}async function Lz(e){return P("/admin/datasets/bulk-delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataset_ids:e})},!0)}async function Uz(e){return P("/admin/datasets/import",{method:"POST",body:JSON.stringify(e)},!0)}async function Vz(e){return P("/admin/datasets/exemplar",{method:"POST",body:JSON.stringify(e)},!0)}async function zz(e){return P(`/admin/datasets/${e}/exemplar/remint-dois`,{method:"POST"},!0)}async function lD(e,t){let r=new URLSearchParams;if(e)r.set("status",e);if(t!==void 0)r.set("blocklisted",t?"1":"0");let n=r.toString();return P(`/admin/imports${n?`?${n}`:""}`,{},!0)}async function Hz(e){return P(`/admin/imports/${e}/rollback`,{method:"POST"},!0)}async function Wz(e){return P(`/admin/imports/${e}/retry`,{method:"POST"},!0)}async function dD(e){return P(`/admin/imports/${e}/verify`,{method:"POST"},!0)}async function Gz(e){return P("/admin/imports/dispatch-cooldown",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataset_ids:e})},!0)}async function qc(e,t){return P(`/admin/datasets/${e}/reindex`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t??{})},!0)}async function Kz(e,t){return P("/admin/datasets/reindex/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filter:e,...t??{}})},!0)}async function Yz(e){let t=e?.limit??15;return P(`/admin/datasets/hed-sweep?limit=${encodeURIComponent(String(t))}`,{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function Jz(){return P("/admin/datasets/hed-sweep?reset=1",{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function Xz(e){let t=e?.limit??15,r=new URLSearchParams({limit:String(t)});if(e?.olderThan!=null)r.set("older-than",String(e.olderThan));if(e?.before!=null)r.set("before",e.before);return P(`/admin/datasets/data-integrity-sweep?${r.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function Qz(){return P("/admin/datasets/data-integrity-sweep?reset=1",{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function Zz(e,t){let r=t?.write?"":"?dry_run=1";return P(`/admin/datasets/${e}/availability-report${r}`,{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function eH(e){let t=e?.limit??30,r=new URLSearchParams({limit:String(t)});if(e?.missingOnly)r.set("missing-only","1");return P(`/admin/datasets/availability-report-sweep?${r.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function tH(){return P("/admin/datasets/availability-report-sweep?reset=1",{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function rH(e){let t=new URLSearchParams;if(e?.prefix)t.set("prefix",e.prefix);if(e?.visibility)t.set("visibility",e.visibility);if(e?.limit)t.set("limit",String(e.limit));let r=t.toString()?`?${t.toString()}`:"";return P(`/admin/fleet/drift${r}`,{},!0)}async function jc(e,t){return P(`/admin/datasets/${e}/enforce`,{method:"POST",body:JSON.stringify({dry_run:t})},!0)}async function nH(e){return P("/admin/datasets/enforce/bulk",{method:"POST",body:JSON.stringify({prefix:e.prefix,visibility:e.visibility,limit:e.limit,dry_run:e.dryRun})},!0)}async function iH(e,t=!1){return P(`/admin/datasets/${e}/revalidate${t?"?force=true":""}`,{method:"POST"},!0)}async function sH(e){let t=e?`?user=${encodeURIComponent(e)}`:"";return P(`/admin/email-preferences${t}`,{},!0)}async function oH(e,t){let r=t?`?user=${encodeURIComponent(t)}`:"";return P(`/admin/email-preferences${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},!0)}async function fD(e){return P("/admin/notify",{method:"POST",body:JSON.stringify(e)},!0)}async function aH(){return P("/admin/summary/coverage",{},!0)}async function cH(e,t,r){return P("/admin/manifest/dispatch",{method:"POST",body:JSON.stringify({dataset_id:e,version:t,skip_canary:r?.skipCanary??!1})},!0)}async function pD(e){return P("/admin/doctor/scan",{method:"POST",body:JSON.stringify({...e?.check&&{check:e.check},...e?.datasetId&&{dataset_id:e.datasetId}})},!0)}async function mD(e){return P("/admin/doctor/fix",{method:"POST",body:JSON.stringify({check:e.check,...e.datasetId&&{dataset_id:e.datasetId},...e.dryRun&&{dry_run:!0}})},!0)}async function uH(){return P("/admin/zarr-catalog/publish",{method:"POST"},!0)}async function lH(e){let t=new URLSearchParams;if(e?.limit!=null)t.set("limit",String(e.limit));let r=t.toString()?`?${t.toString()}`:"";return P(`/admin/datasets/zarr-fidelity-sweep${r}`,{method:"POST",headers:{"Content-Type":"application/json"}},!0)}var Mc=A(()=>{Ns()});async function ti(e,t){return P(`/datasets/${e}/upload-credentials`,{method:"POST",body:JSON.stringify({duration_seconds:t})},!0)}async function hD(e,t){return P(`/datasets/${e}/download-credentials`,{method:"POST",body:JSON.stringify({duration_seconds:t})},!0)}async function dH(e){return P(`/admin/datasets/${e}/files`,{},!0)}async function fH(e){let t,r=0,n=[],i=!0;while(i){let s=await P(`/admin/datasets/${e}/s3-lock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({continuation_token:t})},!0);if(r+=s.locked,s.failed?.length)n.push(...s.failed);if(i=s.hasMore,t=s.continuation_token,i&&!t)throw new q(500,"S3 lock paginated response missing continuation_token; aborting to avoid infinite loop")}return{locked:r,failed:n}}var Bc=A(()=>{Ns();er()});function ZIe(e){return e.startsWith("v")?e:`v${e}`}var XIe,QIe,pH,mQe;var gD=A(()=>{Ic();XIe=/^v?\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/,QIe=/^v\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/;pH=S.string().regex(XIe,"must be a semver version, optionally v-prefixed").transform(ZIe),mQe=S.string().regex(QIe,"must be the canonical v-prefixed tag (vX.Y.Z)")});var eTe,tTe,mH;var hH=A(()=>{Ic();eTe=S.object({id:S.number().int(),username:S.string().nullable(),email:S.string(),github_username:S.string().nullable(),role:S.string(),orcid:S.string().nullable().optional(),created_at:S.string().optional(),approved_at:S.string().nullable().optional(),dataset_count:S.number().int().optional(),sandbox_completed:S.boolean().optional(),sandbox_completed_at:S.string().nullable().optional(),sandbox_dataset_id:S.string().nullable().optional()}).passthrough(),tTe=S.object({prefix:S.string(),created_at:S.string(),last_used_at:S.string().nullable()}).passthrough().nullable(),mH=S.object({user:eTe,token:tTe.optional()}).passthrough()});function yH(e,t){if(e.zarr_index_url!=null&&e.zarr_status!=="ready")t.addIssue({code:S.ZodIssueCode.custom,message:"zarr_index_url must be null/absent unless zarr_status is 'ready'",path:["zarr_index_url"]})}function xH(e,t){if(e.zarr_verified_at!=null&&e.zarr_verify_status==null)t.addIssue({code:S.ZodIssueCode.custom,message:"zarr_verified_at must be null/absent unless zarr_verify_status is non-null",path:["zarr_verified_at"]})}var rTe="0.4.0",yD,Lc,gH,nTe,iTe,sTe,bH,vQe,vH,_Qe,ki,oTe,Am,DQe;var xD=A(()=>{Ic();gD();yD=S.enum(["openneuro","nemar","gin","other"]),Lc=S.union([S.literal(0),S.literal(1)]).nullable(),gH=S.object({dataset_id:S.string(),id:S.string().optional(),name:S.string(),description:S.string().nullable().optional(),status:S.string(),visibility:S.string(),concept_doi:S.string().nullable().optional(),doi:S.string().nullable().optional(),created_at:S.string(),updated_at:S.string().optional(),owner_username:S.string().nullable().optional(),source:S.string().nullable().optional(),modalities:S.string().optional(),participants:S.number().int().nonnegative(),tasks:S.string().optional(),authors:S.string().optional(),license:S.string().optional(),file_size:S.number().nonnegative(),file_size_formatted:S.string().optional(),total_files:S.number().nonnegative().nullable().optional(),num_citations:S.number().int().nonnegative().optional(),n_channels:S.number().int().nullable().optional(),electrode_system:S.string().nullable().optional(),has_hed:Lc.optional(),hed_version:S.string().nullable().optional(),data_complete:Lc.optional(),bytes_present:S.number().nonnegative().nullable().optional(),latest_version:pH.nullable().optional(),subject_count:S.number().int().nullable().optional(),file_size_bytes:S.number().nullable().optional(),sessions_count:S.number().int().nullable().optional(),age_min:S.number().nullable().optional(),age_max:S.number().nullable().optional(),bids_version:S.string().nullable().optional(),zarr_status:S.enum(["pending","ready","failed"]).nullable().optional(),zarr_store_count:S.number().int().nullable().optional(),zarr_converted_at:S.string().nullable().optional(),zarr_source_commit:S.string().nullable().optional(),zarr_errors:S.number().int().nullable().optional(),zarr_failure_count:S.number().int().nullable().optional(),zarr_deterministic:Lc.optional(),zarr_failed_at:S.string().nullable().optional(),zarr_index_url:S.string().nullable().optional(),zarr_verify_status:S.enum(["verified","failed","unverifiable"]).nullable().optional(),zarr_verified_at:S.string().nullable().optional(),total_recording_duration:S.number().nullable().optional(),recording_duration_min:S.number().nullable().optional(),recording_duration_max:S.number().nullable().optional(),recording_count:S.number().int().nullable().optional(),recordings_unavailable:S.number().int().nullable().optional(),channel_count_min:S.number().int().nullable().optional(),channel_count_max:S.number().int().nullable().optional(),sampling_frequency:S.number().nullable().optional(),power_line_frequency:S.number().nullable().optional(),eeg_reference:S.string().nullable().optional(),placement_scheme:S.string().nullable().optional()}).passthrough();nTe=gH.superRefine((e,t)=>{yH(e,t),xH(e,t)}),iTe=gH.extend({file_size:S.number().nonnegative().nullable(),modalities:S.string().nullable().optional(),tasks:S.string().nullable().optional(),authors:S.string().nullable().optional(),license:S.string().nullable().optional(),owner_github:S.string().nullable().optional(),attestation_deposit_type:S.enum(["owner","redistribution"]).nullable().optional(),attestation_key_status:S.enum(["destroyed","retained"]).nullable().optional(),attestation_deidentified:Lc.optional(),attestation_no_duplicate:Lc.optional(),attestation_upstream_source:S.string().nullable().optional(),attestation_accepted_at:S.string().nullable().optional(),zarr_data_failures:S.object({count:S.number().int().nonnegative(),detail_ref:S.string(),compacted_by:S.string().optional()}).nullable().optional()}).passthrough().superRefine((e,t)=>{yH(e,t),xH(e,t)}),sTe=S.object({id:S.string(),name:S.string(),modalities:S.string().nullable().optional(),participants:S.number().int().nullable().optional(),doi:S.string().nullable().optional(),tasks:S.string().nullable().optional(),authors:S.string().nullable().optional(),has_hed:Lc.optional(),score:S.number().optional(),snippet:S.string().optional()}).passthrough(),bH=S.record(S.string(),S.number().int().nonnegative()),vQe=S.object({datasets:S.array(nTe),count:S.number().int().nonnegative(),total_count:S.number().int().nonnegative().optional(),limit:S.number().int().optional(),offset:S.number().int().optional(),excluded_unknown:S.number().int().nonnegative().optional(),excluded_unknown_by_facet:bH.optional()}).passthrough(),vH=S.object({results:S.array(sTe),count:S.number().int().nonnegative(),returned:S.number().int().nonnegative().optional(),offset:S.number().int().nonnegative().optional(),limit:S.number().int().optional(),candidate_ceiling:S.number().int().optional(),truncated:S.boolean().optional(),method:S.enum(["exact_id","text","text_fallback","semantic","unavailable"]).optional(),min_score:S.number().optional(),warning:S.string().optional(),excluded_unknown:S.number().int().nonnegative().optional(),excluded_unknown_by_facet:bH.optional()}).passthrough(),_Qe=S.object({dataset:iTe}).passthrough(),ki=S.object({value:S.string(),count:S.number().int().nonnegative()}),oTe=S.object({values:S.array(ki),distinct_total:S.number().int().nonnegative(),truncated:S.boolean()}),Am=S.object({"electrode-system":S.array(ki).optional(),source:S.array(ki).optional(),zarr:S.array(ki).optional(),powerline:S.array(ki).optional(),"bids-version":S.array(ki).optional(),"hed-version":S.array(ki).optional(),license:S.array(ki).optional(),modality:S.array(ki).optional(),task:oTe.optional(),warning:S.string().optional()}).passthrough(),DQe=S.object({schema_version:S.literal(rTe),doc_type:S.literal("dataset"),dataset_id:S.string().regex(/^[a-z]{2}\d+$/,"neuroschema dataset_id pattern"),name:S.string(),source:yD,recording_modality:S.array(S.string()).min(1),description:S.string().nullable().optional(),bids_version:S.string().nullable().optional(),license:S.string().nullable().optional()}).passthrough()});var km=A(()=>{gD();hH();xD()});async function Im(e){return P(`/datasets/${e}/ci/status`,{},!0)}async function _H(e){return P(`/datasets/${e}/manifest`,{},!0)}async function Tm(e,t){return P(`/datasets/${e}/manifest/${t}`,{},!0)}function DH(e){let t=e;if(!t.status)t.status="active";else if(!["active","archived","deleted"].includes(t.status))throw Error(`Invalid dataset status: ${t.status}`);if(!t.visibility)t.visibility="private";else if(!["public","private"].includes(t.visibility))throw Error(`Invalid dataset visibility: ${t.visibility}`);return t}async function Uc(e={}){let t=new URLSearchParams;if(e.mine)t.set("mine","true");if(e.search)t.set("search",e.search);if(e.modality)t.set("modality",e.modality);if(e.author)t.set("author",e.author);if(e.task)t.set("task",e.task);if(e.license)t.set("license",e.license);if(e.hasDoi)t.set("has_doi","true");if(e.hasHed)t.set("has_hed","1");if(e.hasZarr)t.set("has_zarr","1");if(e.hasZarrVerified)t.set("has_zarr_verified","1");if(e.dataComplete)t.set("data_complete","1");if(e.recent)t.set("recent",String(e.recent));if(e.sort)t.set("sort",e.sort);if(e.limit!=null)t.set("limit",String(e.limit));if(e.offset!=null)t.set("offset",String(e.offset));if(e.owner)t.set("owner",e.owner);if(e.facets)for(let[i,s]of Object.entries(e.facets))t.set(i,s);if(e.includeUnknown)t.set("include_unknown","1");let r=t.toString()?`?${t.toString()}`:"",n=await P(`/datasets${r}`,{},e.mine?!0:"optional");return n.datasets=n.datasets.map(DH),n}async function wH(e){return P(`/datasets/resolve/${e}`,{},"optional")}async function EH(){return P("/datasets/facets",{signal:AbortSignal.timeout(5000)},"optional",Am)}async function SH(e,t={}){let r=new URLSearchParams({q:e});if(t.modality)r.set("modality",t.modality);if(t.limit)r.set("limit",String(t.limit));if(t.hasHed)r.set("has_hed","1");if(t.hasZarr)r.set("has_zarr","1");if(t.hasZarrVerified)r.set("has_zarr_verified","1");if(t.author)r.set("author",t.author);if(t.task)r.set("task",t.task);if(t.license)r.set("license",t.license);if(t.hasDoi)r.set("has_doi","true");if(t.dataComplete)r.set("data_complete","1");if(t.recent)r.set("recent",String(t.recent));if(t.facets)for(let[i,s]of Object.entries(t.facets))r.set(i,s);if(t.includeUnknown)r.set("include_unknown","1");return await P(`/datasets/search?${r.toString()}`,{},"optional",vH)}async function gt(e){let t=await P(`/datasets/${e}`,{},"optional");return DH(t.dataset)}async function $H(e){return P(`/datasets/${e}/versions`,{},!0)}async function Nm(e){return P("/datasets",{method:"POST",body:JSON.stringify(e)},!0)}async function qm(e){return P(`/datasets/${e}/finalize`,{method:"POST"},!0)}async function bD(e){return P(`/datasets/${e}/request-access`,{method:"POST"},!0)}async function CH(e,t){let r=t?`?status=${t}`:"";return P(`/datasets/${e}/access-requests${r}`,{},!0)}async function FH(e,t){return P(`/datasets/${e}/access-requests/${t}/approve`,{method:"POST"},!0)}async function RH(e,t){return P(`/datasets/${e}/access-requests/${t}/deny`,{method:"POST"},!0)}async function OH(e,t){return P(`/datasets/${e}/invite`,{method:"POST",body:JSON.stringify({username:t})},!0)}async function AH(e){return P(`/datasets/${e}/collaborators`,{},!0)}async function kH(e,t){return P(`/admin/datasets/${e}/enrichment`,{method:"POST",body:JSON.stringify(t)},!0)}var Pm;var qs=A(()=>{km();Ns();Pm=/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/});var Vc;var qH=A(()=>{Vc=["ci_check","enrichment_check","s3_public_read","repo_public","tag_protect","doi_create","update_metadata","update_readme","create_tag","create_release","upload_to_zenodo","publish_doi","version_doi","s3_lock","sync_nemar","notify_user"]});async function zc(e){return P(`/datasets/${e}/publish/request`,{method:"POST"},!0)}async function MH(e){return P(`/datasets/${e}/publish/status`,{},!0)}async function BH(e){return P(`/datasets/${e}/publish/resend`,{method:"POST"},!0)}async function LH(e){let t=e?`?status=${e}`:"";return P(`/admin/publish/requests${t}`,{},!0)}async function UH(e,t){return P(`/admin/publish/${e}/deny`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:t})},!0)}function aTe(e,t=[]){if(e){let r=Vc.indexOf(e);if(r>=0)return r+1}return Math.min(t.length+1,Vc.length)}function cTe(e){if(!(e instanceof q))return!1;if(e.statusCode===0)return!0;if(e.statusCode===429)return!0;if(e.statusCode>=500&&e.statusCode<600)return!0;if(e.statusCode===403&&/repository has been locked/i.test(e.message))return!0;return!1}async function Hc(e,t=!1,r=!1,n=!1,i,s){let c,l,d=0,f=!1,m,p=t,g=[],y;function x(v,_,E,C){if(!s)return;s({step:v,stepIndex:aTe(v,_),stepTotal:Vc.length,s3LockLocked:E,s3LockTotal:C,s3LockResumed:v==="s3_lock"&&f?!0:void 0})}for(let v=1;v<=5;v++)try{let _,E=!0;do{if(_=await P(`/admin/publish/${e}/approve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({resume:E?p:!0,sandbox:r,s3_lock_continuation_token:c,s3_lock_total:l,skip_ci_check:n})},!0),E=!1,_.step_results)g.push(..._.step_results);if(_.s3_lock_total!==void 0)l=_.s3_lock_total;if(_.s3_lock_batch_count!==void 0)d+=_.s3_lock_batch_count;let C=_.step??_.step_results?.[_.step_results.length-1]?.step;if(C&&(C!==m||C==="s3_lock"))x(C,_.steps_completed??[],C==="s3_lock"?d:void 0,C==="s3_lock"?l:void 0),m=C;if(_.hasMore&&_.s3_lock_continuation_token!==void 0)c=_.s3_lock_continuation_token;else break}while(_.hasMore);if(g.length>0)_.step_results=jH(g);return _}catch(_){if(y=_,v===5||!cTe(_)){if(_ instanceof q&&g.length>0)_.stepResults=jH(g);throw _}let C=_;if(i?.({attempt:v,maxAttempts:5,delayMs:1e4,step:C.step,error:C.message}),await new Promise((D)=>setTimeout(D,1e4)),p=!0,c!==void 0)f=!0}throw y}function jH(e){let t=new Map;for(let r of e)t.set(r.step,r);return Array.from(t.values())}var Dd=A(()=>{qH();Ns();er()});function HH(e){DD=e}function wD(){return DD}function wd(e){if(DD)process.stderr.write(`${e}
|
|
105
|
+
`)}var Sz=!1;var nD=A(()=>{He()});var Cz;var $z=A(()=>{Cz={name:"nemar-cli",version:"0.9.12-PR1208.6e03e2e",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 && tsc --noEmit -p backend",prepublishOnly:"bun run build",prepare:"husky",postinstall:"bun scripts/postinstall-check.mjs",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://docs.nemar.org",engines:{bun:">=1.0.0"},files:["dist","scripts/postinstall-check.mjs","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",ajv:"^8.20.0","ajv-formats":"^3.0.1",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 To;var Om=A(()=>{$z();To=Cz.version});function V(e){if(e instanceof Error)return e.message;return String(e)}var q,No;var er=A(()=>{q=class q extends Error{statusCode;details;step;constructor(e,t,r,n){super(t);this.statusCode=e;this.details=r;this.step=n;this.name="ApiError"}};No=class No extends q{mode;eta;constructor(e,t,r,n){super(503,t,n);this.mode=e;this.eta=r;this.name="MaintenanceError"}}});function Fz(){if(process.env.TEST_API_URL)return process.env.TEST_API_URL;if(sD)return iD;return ht().apiUrl||iD}async function P(e,t={},r=!1,n){let i=`${Fz()}${e}`,s={"Content-Type":"application/json","X-CLI-Version":To,...t.headers};if(r){let c=ht();if(!c.apiKey&&r===!0)throw new q(401,"Not authenticated. Run 'nemar auth login' first.");if(c.apiKey)s.Authorization=`Bearer ${c.apiKey}`}let o;try{o=await fetch(i,{...t,headers:s})}catch(c){throw new q(0,`Network error: Could not connect to ${Fz()}`,{originalError:c instanceof Error?c.message:String(c)})}let a;try{a=await o.json()}catch{throw new q(o.status,`Invalid response from server (status ${o.status})`)}if(!o.ok){if(o.status===503&&(a.mode==="read-only"||a.mode==="full")){let c=typeof a.message==="string"?a.message:"NEMAR is in maintenance mode. Please retry shortly.",l=typeof a.eta==="string"?a.eta:null,d=new No(a.mode,c,l,a.details);throw Rm(d),d}throw new q(o.status,a.error||a.message||"Request failed",a.details,typeof a.step==="string"?a.step:void 0)}if(n){let c=n.safeParse(a);if(!c.success)throw new q(o.status,`Response for ${e} did not match the expected NEMAR contract`,{issues:c.error.issues});return c.data}return a}var iD="https://api.nemar.org",sD;var Ns=A(()=>{Ts();nD();Om();er();sD=iD.includes("workers.dev")});async function Rz(e,t){let r=new URLSearchParams;if(e)r.set("status",e);if(t)r.set("role",t);let n=r.toString()?`?${r.toString()}`:"";return P(`/admin/users${n}`,{},!0)}async function Oz(e){return P(`/admin/approve/${e}`,{method:"POST"},!0)}async function Az(e){return P(`/admin/approve/by-id/${e}`,{method:"POST"},!0)}async function kz(e){return P(`/admin/revoke/${e}`,{method:"POST"},!0)}async function Pz(e,t){return P(`/admin/users/${e}/role`,{method:"POST",body:JSON.stringify({role:t})},!0)}async function oD(e,t){return P(`/admin/datasets/${e}/visibility`,{method:"PATCH",body:JSON.stringify({visibility:t})},!0)}async function Iz(e){return P(`/datasets/${e}/publish`,{method:"POST"},!0)}async function Tz(e){return P(`/admin/datasets/${e}/ci`,{},!0)}async function Ai(e){return P(`/admin/datasets/${e}/ci`,{method:"POST"},!0)}async function aD(e){return P(`/admin/datasets/${e}/ci/validate`,{method:"POST"},!0)}async function cD(e){return P(`/admin/datasets/${e}/ci/sync`,{method:"POST"},!0)}async function Nz(e,t){return P(`/admin/datasets/${e}/doi/concept`,{method:"POST",body:JSON.stringify(t)},!0)}async function _d(e){return P(`/admin/datasets/${e}/doi`,{},!0)}async function uD(e,t){return P(`/admin/datasets/${e}/doi/update`,{method:"POST",body:JSON.stringify(t)},!0)}async function qz(e,t){return P(`/admin/datasets/${e}/withdraw`,{method:"POST",body:JSON.stringify({reason:t.reason,dry_run:t.dryRun})},!0)}async function jz(e,t){return P(`/admin/datasets/${e}/restore`,{method:"POST",body:JSON.stringify({dry_run:t.dryRun})},!0)}async function Mz(e){return P(`/admin/datasets/${e}/reset`,{method:"POST"},!0)}async function Bz(e,t=!1){return P(`/admin/datasets/${e}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({force:t})},!0)}async function Lz(e){return P("/admin/datasets/bulk-delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataset_ids:e})},!0)}async function Uz(e){return P("/admin/datasets/import",{method:"POST",body:JSON.stringify(e)},!0)}async function Vz(e){return P("/admin/datasets/exemplar",{method:"POST",body:JSON.stringify(e)},!0)}async function zz(e){return P(`/admin/datasets/${e}/exemplar/remint-dois`,{method:"POST"},!0)}async function lD(e,t){let r=new URLSearchParams;if(e)r.set("status",e);if(t!==void 0)r.set("blocklisted",t?"1":"0");let n=r.toString();return P(`/admin/imports${n?`?${n}`:""}`,{},!0)}async function Hz(e){return P(`/admin/imports/${e}/rollback`,{method:"POST"},!0)}async function Wz(e){return P(`/admin/imports/${e}/retry`,{method:"POST"},!0)}async function dD(e){return P(`/admin/imports/${e}/verify`,{method:"POST"},!0)}async function Gz(e){return P("/admin/imports/dispatch-cooldown",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataset_ids:e})},!0)}async function qc(e,t){return P(`/admin/datasets/${e}/reindex`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t??{})},!0)}async function Kz(e,t){return P("/admin/datasets/reindex/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filter:e,...t??{}})},!0)}async function Yz(e){let t=e?.limit??15;return P(`/admin/datasets/hed-sweep?limit=${encodeURIComponent(String(t))}`,{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function Jz(){return P("/admin/datasets/hed-sweep?reset=1",{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function Xz(e){let t=e?.limit??15,r=new URLSearchParams({limit:String(t)});if(e?.olderThan!=null)r.set("older-than",String(e.olderThan));if(e?.before!=null)r.set("before",e.before);return P(`/admin/datasets/data-integrity-sweep?${r.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function Qz(){return P("/admin/datasets/data-integrity-sweep?reset=1",{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function Zz(e,t){let r=t?.write?"":"?dry_run=1";return P(`/admin/datasets/${e}/availability-report${r}`,{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function eH(e){let t=e?.limit??30,r=new URLSearchParams({limit:String(t)});if(e?.missingOnly)r.set("missing-only","1");return P(`/admin/datasets/availability-report-sweep?${r.toString()}`,{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function tH(){return P("/admin/datasets/availability-report-sweep?reset=1",{method:"POST",headers:{"Content-Type":"application/json"}},!0)}async function rH(e){let t=new URLSearchParams;if(e?.prefix)t.set("prefix",e.prefix);if(e?.visibility)t.set("visibility",e.visibility);if(e?.limit)t.set("limit",String(e.limit));let r=t.toString()?`?${t.toString()}`:"";return P(`/admin/fleet/drift${r}`,{},!0)}async function jc(e,t){return P(`/admin/datasets/${e}/enforce`,{method:"POST",body:JSON.stringify({dry_run:t})},!0)}async function nH(e){return P("/admin/datasets/enforce/bulk",{method:"POST",body:JSON.stringify({prefix:e.prefix,visibility:e.visibility,limit:e.limit,dry_run:e.dryRun})},!0)}async function iH(e,t=!1){return P(`/admin/datasets/${e}/revalidate${t?"?force=true":""}`,{method:"POST"},!0)}async function sH(e){let t=e?`?user=${encodeURIComponent(e)}`:"";return P(`/admin/email-preferences${t}`,{},!0)}async function oH(e,t){let r=t?`?user=${encodeURIComponent(t)}`:"";return P(`/admin/email-preferences${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},!0)}async function fD(e){return P("/admin/notify",{method:"POST",body:JSON.stringify(e)},!0)}async function aH(){return P("/admin/summary/coverage",{},!0)}async function cH(e,t,r){return P("/admin/manifest/dispatch",{method:"POST",body:JSON.stringify({dataset_id:e,version:t,skip_canary:r?.skipCanary??!1})},!0)}async function pD(e){return P("/admin/doctor/scan",{method:"POST",body:JSON.stringify({...e?.check&&{check:e.check},...e?.datasetId&&{dataset_id:e.datasetId}})},!0)}async function mD(e){return P("/admin/doctor/fix",{method:"POST",body:JSON.stringify({check:e.check,...e.datasetId&&{dataset_id:e.datasetId},...e.dryRun&&{dry_run:!0}})},!0)}async function uH(){return P("/admin/zarr-catalog/publish",{method:"POST"},!0)}async function lH(e){let t=new URLSearchParams;if(e?.limit!=null)t.set("limit",String(e.limit));let r=t.toString()?`?${t.toString()}`:"";return P(`/admin/datasets/zarr-fidelity-sweep${r}`,{method:"POST",headers:{"Content-Type":"application/json"}},!0)}var Mc=A(()=>{Ns()});async function ti(e,t){return P(`/datasets/${e}/upload-credentials`,{method:"POST",body:JSON.stringify({duration_seconds:t})},!0)}async function hD(e,t){return P(`/datasets/${e}/download-credentials`,{method:"POST",body:JSON.stringify({duration_seconds:t})},!0)}async function dH(e){return P(`/admin/datasets/${e}/files`,{},!0)}async function fH(e){let t,r=0,n=[],i=!0;while(i){let s=await P(`/admin/datasets/${e}/s3-lock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({continuation_token:t})},!0);if(r+=s.locked,s.failed?.length)n.push(...s.failed);if(i=s.hasMore,t=s.continuation_token,i&&!t)throw new q(500,"S3 lock paginated response missing continuation_token; aborting to avoid infinite loop")}return{locked:r,failed:n}}var Bc=A(()=>{Ns();er()});function ZIe(e){return e.startsWith("v")?e:`v${e}`}var XIe,QIe,pH,mQe;var gD=A(()=>{Ic();XIe=/^v?\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/,QIe=/^v\d+\.\d+\.\d+(?:-(?:rc|alpha|beta)\d*)?$/;pH=E.string().regex(XIe,"must be a semver version, optionally v-prefixed").transform(ZIe),mQe=E.string().regex(QIe,"must be the canonical v-prefixed tag (vX.Y.Z)")});var eTe,tTe,mH;var hH=A(()=>{Ic();eTe=E.object({id:E.number().int(),username:E.string().nullable(),email:E.string(),github_username:E.string().nullable(),role:E.string(),orcid:E.string().nullable().optional(),created_at:E.string().optional(),approved_at:E.string().nullable().optional(),dataset_count:E.number().int().optional(),sandbox_completed:E.boolean().optional(),sandbox_completed_at:E.string().nullable().optional(),sandbox_dataset_id:E.string().nullable().optional()}).passthrough(),tTe=E.object({prefix:E.string(),created_at:E.string(),last_used_at:E.string().nullable()}).passthrough().nullable(),mH=E.object({user:eTe,token:tTe.optional()}).passthrough()});function yH(e,t){if(e.zarr_index_url!=null&&e.zarr_status!=="ready")t.addIssue({code:E.ZodIssueCode.custom,message:"zarr_index_url must be null/absent unless zarr_status is 'ready'",path:["zarr_index_url"]})}function xH(e,t){if(e.zarr_verified_at!=null&&e.zarr_verify_status==null)t.addIssue({code:E.ZodIssueCode.custom,message:"zarr_verified_at must be null/absent unless zarr_verify_status is non-null",path:["zarr_verified_at"]})}var rTe="0.4.0",yD,Lc,gH,nTe,iTe,sTe,bH,vQe,vH,_Qe,ki,oTe,Am,DQe;var xD=A(()=>{Ic();gD();yD=E.enum(["openneuro","nemar","gin","other"]),Lc=E.union([E.literal(0),E.literal(1)]).nullable(),gH=E.object({dataset_id:E.string(),id:E.string().optional(),name:E.string(),description:E.string().nullable().optional(),status:E.string(),visibility:E.string(),concept_doi:E.string().nullable().optional(),doi:E.string().nullable().optional(),created_at:E.string(),updated_at:E.string().optional(),owner_username:E.string().nullable().optional(),source:E.string().nullable().optional(),modalities:E.string().optional(),participants:E.number().int().nonnegative(),tasks:E.string().optional(),authors:E.string().optional(),license:E.string().optional(),file_size:E.number().nonnegative(),file_size_formatted:E.string().optional(),total_files:E.number().nonnegative().nullable().optional(),num_citations:E.number().int().nonnegative().optional(),n_channels:E.number().int().nullable().optional(),electrode_system:E.string().nullable().optional(),has_hed:Lc.optional(),hed_version:E.string().nullable().optional(),data_complete:Lc.optional(),bytes_present:E.number().nonnegative().nullable().optional(),latest_version:pH.nullable().optional(),subject_count:E.number().int().nullable().optional(),file_size_bytes:E.number().nullable().optional(),sessions_count:E.number().int().nullable().optional(),age_min:E.number().nullable().optional(),age_max:E.number().nullable().optional(),bids_version:E.string().nullable().optional(),zarr_status:E.enum(["pending","ready","failed"]).nullable().optional(),zarr_store_count:E.number().int().nullable().optional(),zarr_converted_at:E.string().nullable().optional(),zarr_source_commit:E.string().nullable().optional(),zarr_errors:E.number().int().nullable().optional(),zarr_failure_count:E.number().int().nullable().optional(),zarr_deterministic:Lc.optional(),zarr_failed_at:E.string().nullable().optional(),zarr_index_url:E.string().nullable().optional(),zarr_verify_status:E.enum(["verified","failed","unverifiable"]).nullable().optional(),zarr_verified_at:E.string().nullable().optional(),total_recording_duration:E.number().nullable().optional(),recording_duration_min:E.number().nullable().optional(),recording_duration_max:E.number().nullable().optional(),recording_count:E.number().int().nullable().optional(),recordings_unavailable:E.number().int().nullable().optional(),channel_count_min:E.number().int().nullable().optional(),channel_count_max:E.number().int().nullable().optional(),sampling_frequency:E.number().nullable().optional(),power_line_frequency:E.number().nullable().optional(),eeg_reference:E.string().nullable().optional(),placement_scheme:E.string().nullable().optional()}).passthrough();nTe=gH.superRefine((e,t)=>{yH(e,t),xH(e,t)}),iTe=gH.extend({file_size:E.number().nonnegative().nullable(),modalities:E.string().nullable().optional(),tasks:E.string().nullable().optional(),authors:E.string().nullable().optional(),license:E.string().nullable().optional(),owner_github:E.string().nullable().optional(),attestation_deposit_type:E.enum(["owner","redistribution"]).nullable().optional(),attestation_key_status:E.enum(["destroyed","retained"]).nullable().optional(),attestation_deidentified:Lc.optional(),attestation_no_duplicate:Lc.optional(),attestation_upstream_source:E.string().nullable().optional(),attestation_accepted_at:E.string().nullable().optional(),zarr_data_failures:E.object({count:E.number().int().nonnegative(),detail_ref:E.string(),compacted_by:E.string().optional(),pending:E.number().int().nonnegative().optional(),discovered:E.number().int().nonnegative().optional(),events_upload_failed:E.literal(!0).optional(),manifest_upload_failed:E.literal(!0).optional()}).passthrough().nullable().optional()}).passthrough().superRefine((e,t)=>{yH(e,t),xH(e,t)}),sTe=E.object({id:E.string(),name:E.string(),modalities:E.string().nullable().optional(),participants:E.number().int().nullable().optional(),doi:E.string().nullable().optional(),tasks:E.string().nullable().optional(),authors:E.string().nullable().optional(),has_hed:Lc.optional(),score:E.number().optional(),snippet:E.string().optional()}).passthrough(),bH=E.record(E.string(),E.number().int().nonnegative()),vQe=E.object({datasets:E.array(nTe),count:E.number().int().nonnegative(),total_count:E.number().int().nonnegative().optional(),limit:E.number().int().optional(),offset:E.number().int().optional(),excluded_unknown:E.number().int().nonnegative().optional(),excluded_unknown_by_facet:bH.optional()}).passthrough(),vH=E.object({results:E.array(sTe),count:E.number().int().nonnegative(),returned:E.number().int().nonnegative().optional(),offset:E.number().int().nonnegative().optional(),limit:E.number().int().optional(),candidate_ceiling:E.number().int().optional(),truncated:E.boolean().optional(),method:E.enum(["exact_id","text","text_fallback","semantic","unavailable"]).optional(),min_score:E.number().optional(),warning:E.string().optional(),excluded_unknown:E.number().int().nonnegative().optional(),excluded_unknown_by_facet:bH.optional()}).passthrough(),_Qe=E.object({dataset:iTe}).passthrough(),ki=E.object({value:E.string(),count:E.number().int().nonnegative()}),oTe=E.object({values:E.array(ki),distinct_total:E.number().int().nonnegative(),truncated:E.boolean()}),Am=E.object({"electrode-system":E.array(ki).optional(),source:E.array(ki).optional(),zarr:E.array(ki).optional(),powerline:E.array(ki).optional(),"bids-version":E.array(ki).optional(),"hed-version":E.array(ki).optional(),license:E.array(ki).optional(),modality:E.array(ki).optional(),task:oTe.optional(),warning:E.string().optional()}).passthrough(),DQe=E.object({schema_version:E.literal(rTe),doc_type:E.literal("dataset"),dataset_id:E.string().regex(/^[a-z]{2}\d+$/,"neuroschema dataset_id pattern"),name:E.string(),source:yD,recording_modality:E.array(E.string()).min(1),description:E.string().nullable().optional(),bids_version:E.string().nullable().optional(),license:E.string().nullable().optional()}).passthrough()});var km=A(()=>{gD();hH();xD()});async function Im(e){return P(`/datasets/${e}/ci/status`,{},!0)}async function _H(e){return P(`/datasets/${e}/manifest`,{},!0)}async function Tm(e,t){return P(`/datasets/${e}/manifest/${t}`,{},!0)}function DH(e){let t=e;if(!t.status)t.status="active";else if(!["active","archived","deleted"].includes(t.status))throw Error(`Invalid dataset status: ${t.status}`);if(!t.visibility)t.visibility="private";else if(!["public","private"].includes(t.visibility))throw Error(`Invalid dataset visibility: ${t.visibility}`);return t}async function Uc(e={}){let t=new URLSearchParams;if(e.mine)t.set("mine","true");if(e.search)t.set("search",e.search);if(e.modality)t.set("modality",e.modality);if(e.author)t.set("author",e.author);if(e.task)t.set("task",e.task);if(e.license)t.set("license",e.license);if(e.hasDoi)t.set("has_doi","true");if(e.hasHed)t.set("has_hed","1");if(e.hasZarr)t.set("has_zarr","1");if(e.hasZarrVerified)t.set("has_zarr_verified","1");if(e.dataComplete)t.set("data_complete","1");if(e.recent)t.set("recent",String(e.recent));if(e.sort)t.set("sort",e.sort);if(e.limit!=null)t.set("limit",String(e.limit));if(e.offset!=null)t.set("offset",String(e.offset));if(e.owner)t.set("owner",e.owner);if(e.facets)for(let[i,s]of Object.entries(e.facets))t.set(i,s);if(e.includeUnknown)t.set("include_unknown","1");let r=t.toString()?`?${t.toString()}`:"",n=await P(`/datasets${r}`,{},e.mine?!0:"optional");return n.datasets=n.datasets.map(DH),n}async function wH(e){return P(`/datasets/resolve/${e}`,{},"optional")}async function EH(){return P("/datasets/facets",{signal:AbortSignal.timeout(5000)},"optional",Am)}async function SH(e,t={}){let r=new URLSearchParams({q:e});if(t.modality)r.set("modality",t.modality);if(t.limit)r.set("limit",String(t.limit));if(t.hasHed)r.set("has_hed","1");if(t.hasZarr)r.set("has_zarr","1");if(t.hasZarrVerified)r.set("has_zarr_verified","1");if(t.author)r.set("author",t.author);if(t.task)r.set("task",t.task);if(t.license)r.set("license",t.license);if(t.hasDoi)r.set("has_doi","true");if(t.dataComplete)r.set("data_complete","1");if(t.recent)r.set("recent",String(t.recent));if(t.facets)for(let[i,s]of Object.entries(t.facets))r.set(i,s);if(t.includeUnknown)r.set("include_unknown","1");return await P(`/datasets/search?${r.toString()}`,{},"optional",vH)}async function gt(e){let t=await P(`/datasets/${e}`,{},"optional");return DH(t.dataset)}async function $H(e){return P(`/datasets/${e}/versions`,{},!0)}async function Nm(e){return P("/datasets",{method:"POST",body:JSON.stringify(e)},!0)}async function qm(e){return P(`/datasets/${e}/finalize`,{method:"POST"},!0)}async function bD(e){return P(`/datasets/${e}/request-access`,{method:"POST"},!0)}async function CH(e,t){let r=t?`?status=${t}`:"";return P(`/datasets/${e}/access-requests${r}`,{},!0)}async function FH(e,t){return P(`/datasets/${e}/access-requests/${t}/approve`,{method:"POST"},!0)}async function RH(e,t){return P(`/datasets/${e}/access-requests/${t}/deny`,{method:"POST"},!0)}async function OH(e,t){return P(`/datasets/${e}/invite`,{method:"POST",body:JSON.stringify({username:t})},!0)}async function AH(e){return P(`/datasets/${e}/collaborators`,{},!0)}async function kH(e,t){return P(`/admin/datasets/${e}/enrichment`,{method:"POST",body:JSON.stringify(t)},!0)}var Pm;var qs=A(()=>{km();Ns();Pm=/^\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/});var Vc;var qH=A(()=>{Vc=["ci_check","enrichment_check","s3_public_read","repo_public","tag_protect","doi_create","update_metadata","update_readme","create_tag","create_release","upload_to_zenodo","publish_doi","version_doi","s3_lock","sync_nemar","notify_user"]});async function zc(e){return P(`/datasets/${e}/publish/request`,{method:"POST"},!0)}async function MH(e){return P(`/datasets/${e}/publish/status`,{},!0)}async function BH(e){return P(`/datasets/${e}/publish/resend`,{method:"POST"},!0)}async function LH(e){let t=e?`?status=${e}`:"";return P(`/admin/publish/requests${t}`,{},!0)}async function UH(e,t){return P(`/admin/publish/${e}/deny`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:t})},!0)}function aTe(e,t=[]){if(e){let r=Vc.indexOf(e);if(r>=0)return r+1}return Math.min(t.length+1,Vc.length)}function cTe(e){if(!(e instanceof q))return!1;if(e.statusCode===0)return!0;if(e.statusCode===429)return!0;if(e.statusCode>=500&&e.statusCode<600)return!0;if(e.statusCode===403&&/repository has been locked/i.test(e.message))return!0;return!1}async function Hc(e,t=!1,r=!1,n=!1,i,s){let c,l,d=0,f=!1,m,p=t,g=[],y;function x(v,_,S,C){if(!s)return;s({step:v,stepIndex:aTe(v,_),stepTotal:Vc.length,s3LockLocked:S,s3LockTotal:C,s3LockResumed:v==="s3_lock"&&f?!0:void 0})}for(let v=1;v<=5;v++)try{let _,S=!0;do{if(_=await P(`/admin/publish/${e}/approve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({resume:S?p:!0,sandbox:r,s3_lock_continuation_token:c,s3_lock_total:l,skip_ci_check:n})},!0),S=!1,_.step_results)g.push(..._.step_results);if(_.s3_lock_total!==void 0)l=_.s3_lock_total;if(_.s3_lock_batch_count!==void 0)d+=_.s3_lock_batch_count;let C=_.step??_.step_results?.[_.step_results.length-1]?.step;if(C&&(C!==m||C==="s3_lock"))x(C,_.steps_completed??[],C==="s3_lock"?d:void 0,C==="s3_lock"?l:void 0),m=C;if(_.hasMore&&_.s3_lock_continuation_token!==void 0)c=_.s3_lock_continuation_token;else break}while(_.hasMore);if(g.length>0)_.step_results=jH(g);return _}catch(_){if(y=_,v===5||!cTe(_)){if(_ instanceof q&&g.length>0)_.stepResults=jH(g);throw _}let C=_;if(i?.({attempt:v,maxAttempts:5,delayMs:1e4,step:C.step,error:C.message}),await new Promise((D)=>setTimeout(D,1e4)),p=!0,c!==void 0)f=!0}throw y}function jH(e){let t=new Map;for(let r of e)t.set(r.step,r);return Array.from(t.values())}var Dd=A(()=>{qH();Ns();er()});function HH(e){DD=e}function wD(){return DD}function wd(e){if(DD)process.stderr.write(`${e}
|
|
106
106
|
`)}var DD=!1;var WH={};ji(WH,{runCommand:()=>R});var{spawn:uTe}=globalThis.Bun;async function R(e,t={}){let r={...process.env,GIT_TERMINAL_PROMPT:"0",...t.env};for(let l of t.unsetEnv??[])delete r[l];let n=uTe({cmd:e,cwd:t.cwd,stdout:"pipe",stderr:"pipe",env:r}),i=!1,s;if(t.timeout)s=setTimeout(()=>{i=!0,n.kill()},t.timeout);if(wD()){let l=t.cwd?` (cwd=${t.cwd})`:"";wd(u.dim(`$ ${e.join(" ")}${l}`))}let o=await new Response(n.stdout).text(),a=await new Response(n.stderr).text(),c=await n.exited;if(s)clearTimeout(s);if(wD()){if(o.trim())wd(u.dim(o.trimEnd()));if(a.trim())wd(u.yellow(a.trimEnd()));wd(u.dim(`(exit ${c})`))}if(i)return{stdout:o,stderr:a||`Command timed out after ${Math.round(t.timeout/1000)}s`,exitCode:c??1};return{stdout:o,stderr:a,exitCode:c}}var Ut=A(()=>{He()});async function lTe(){try{let{exitCode:e,stderr:t}=await R(["ssh","-T","-o","BatchMode=yes","-o","ConnectTimeout=5","git@github.com"]),r=t.includes("successfully authenticated");if(!r)console.warn("SSH test to github.com failed:",{exitCode:e,stderr:t.trim().slice(0,500)});return{works:r,error:r?void 0:t.trim().slice(0,500)}}catch(e){let t=e instanceof Error?e.message:String(e);return console.warn("SSH test exception:",t),{works:!1,error:t}}}async function Ed(){try{let{stdout:e,exitCode:t,stderr:r}=await R(["gh","auth","token"]);if(t!==0)return console.warn("gh CLI returned non-zero exit code:",t),console.warn("stderr:",r),{token:null,error:`gh auth token failed: ${r.trim()||"unknown error"}`};if(!e.trim())return console.warn("gh auth token returned empty output"),{token:null,error:"gh CLI returned empty token"};return{token:e.trim()}}catch(e){let t=e instanceof Error?e.message:String(e);if(console.error("Failed to get GitHub token from gh CLI:",t),t.includes("ENOENT")||t.includes("not found"))return{token:null,error:"gh CLI not installed (command not found)"};return{token:null,error:`gh CLI error: ${t}`}}}async function jm(e){try{let{stdout:t,exitCode:r,stderr:n}=await R(["gh","api","user","--jq",".login"]);if(r!==0){if(n.includes("not logged in")||n.includes("auth login"))return{authenticated:!1,error:"gh CLI not authenticated. Run 'gh auth login' to authenticate."};return{authenticated:!1,error:`gh CLI error: ${n.trim()||"unknown error"}`}}let i=t.trim();if(!i)return{authenticated:!1,error:"gh CLI returned empty username"};if(e){let s=i.toLowerCase()===e.toLowerCase();return{authenticated:!0,username:i,matches:s,error:s?void 0:`gh CLI authenticated as '${i}', expected '${e}'`}}return{authenticated:!0,username:i}}catch(t){let r=t instanceof Error?t.message:String(t);if(r.includes("ENOENT")||r.includes("not found"))return{authenticated:!1,error:"gh CLI not installed. Install from https://cli.github.com/"};return{authenticated:!1,error:`Failed to verify gh CLI: ${r}`}}}async function Mm(e){if(!/^[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+$/.test(e))return{accepted:!1,error:`Invalid repository format: ${e}`};let{stdout:t,exitCode:r,stderr:n}=await R(["gh","api","/user/repository_invitations"]);if(r!==0){if(n.includes("not logged in")||n.includes("auth login"))return{accepted:!1,error:"gh CLI not authenticated. Run 'gh auth login' to authenticate."};if(n.includes("API rate limit")||n.includes("403"))return{accepted:!1,error:"GitHub API rate limit exceeded. Please try again in a few minutes."};if(n.includes("ENOENT")||n.includes("not found"))return{accepted:!1,error:"gh CLI not installed. Install from https://cli.github.com/"};return{accepted:!1,error:`Failed to list invitations: ${n.trim()||"unknown error"}`}}let i=null;try{i=JSON.parse(t||"[]").find((l)=>l.repository.full_name===e)?.id??null}catch(a){let c=a instanceof Error?a.message:String(a);return console.error("Failed to parse GitHub invitations response:",c),console.error(" Raw response (first 500 chars):",(t||"").slice(0,500)),{accepted:!1,error:`Failed to parse GitHub API response: ${c}`}}if(!i){let{exitCode:a}=await R(["gh","api",`/repos/${e}`,"--silent"]);if(a===0)return{accepted:!0,alreadyCollaborator:!0};return{accepted:!1,error:`No pending invitation found for ${e}. You may need to accept it manually via GitHub.`}}let{exitCode:s,stderr:o}=await R(["gh","api","--method","PATCH",`/user/repository_invitations/${i}`]);if(s!==0)return{accepted:!1,error:`Failed to accept invitation: ${o.trim()||"unknown error"}`};return{accepted:!0}}async function ri(e,t,r="origin"){let n=t;if(process.env.GH_TOKEN&&t.startsWith("git@github.com:")){let i=process.env.GH_TOKEN.trim();if(!i||/\s/.test(i))return{success:!1,error:"GH_TOKEN environment variable is set but appears malformed (empty or contains whitespace)"};n=`https://github.com/${t.replace("git@github.com:","")}`,await R(["git","config","credential.https://github.com.helper",`!printf 'username=x-access-token\\npassword=${i}'`],{cwd:e})}else if(t.startsWith("git@github.com:")){let i=t.replace("git@github.com:",""),s=await Ed();if(s.token)n=`https://github.com/${i}`,await R(["git","config","credential.https://github.com.helper",`!printf 'username=x-access-token\\npassword=${s.token}'`],{cwd:e});else{let o=await lTe();if(o.works)n=t;else return{success:!1,error:`GitHub authentication not configured.
|
|
107
107
|
|
|
108
108
|
gh CLI failed: ${s.error||"could not get token"}
|
|
@@ -123,8 +123,8 @@ Fix one of these:
|
|
|
123
123
|
`).filter((r)=>{let n=r.trim();if(!n)return!1;if(n.includes("setting annex-ignore"))return!1;if(t.some((i)=>i.test(n)))return!1;return!0}).join(`
|
|
124
124
|
`).trim()}function CTe(e){let t=["type=S3","encryption=none",`bucket=${e.bucket}`,`fileprefix=${e.prefix.replace(/\/$/,"")}/`,`datacenter=${e.region}`,"signature=v4","autoenable=true","protocol=https",`partsize=${e.partsize??$Te}`];if(e.publicUrl)t.push(`publicurl=${e.publicUrl}`);return t}async function RTe(e,t){let{stdout:r,exitCode:n}=await R(["git","annex","info",t,"--json"],{cwd:e});if(n!==0)return!1;try{let i=JSON.parse(r);return i?.success===!0&&typeof i.uuid==="string"&&i.uuid.length>0&&i.remote===t}catch{return!1}}async function yW(e,t,r,n){let i=await R(["git","annex","enableremote",t,...r],{cwd:e,env:n});if(i.exitCode!==0)return{success:!1,error:OD(i.stderr)||i.stderr.trim()||`enableremote exited with code ${i.exitCode}`};return{success:!0}}async function OTe(e,t,r,n){if(await RTe(e,t))return yW(e,t,r,n);let{stderr:i,exitCode:s}=await R(["git","annex","initremote",t,...r],{cwd:e,env:n});if(s!==0){if(FTe.test(i))return yW(e,t,r,n);return{success:!1,error:OD(i)||i.trim()||`initremote exited with code ${s}`}}let o=OD(i);if(o)console.warn(` Warning during special remote setup: ${o}`);return{success:!0}}function Km(e){if(!e)return;return{AWS_ACCESS_KEY_ID:e.accessKeyId,AWS_SECRET_ACCESS_KEY:e.secretAccessKey,...e.sessionToken?{AWS_SESSION_TOKEN:e.sessionToken}:{}}}async function Cr(e,t,r){let n={AWS_ACCESS_KEY_ID:r.accessKeyId,AWS_SECRET_ACCESS_KEY:r.secretAccessKey};if(r.sessionToken)n.AWS_SESSION_TOKEN=r.sessionToken;let i=await R(["git","config","remote.origin.annex-ignore","true"],{cwd:e});if(i.exitCode!==0)console.warn(`Warning: could not set remote.origin.annex-ignore: ${i.stderr.trim()}`);try{return await OTe(e,t.name,CTe(t),n)}catch(s){return{success:!1,error:`S3 remote configuration failed: ${s instanceof Error?s.message:String(s)}`}}}async function zt(e){let{join:t}=await import("path"),{readdirSync:r,unlinkSync:n}=await import("fs"),i=t(e,".git","annex","creds"),s;try{s=r(i)}catch(o){if(o.code==="ENOENT")return;console.warn(`Warning: Could not read ${i}: ${o.message}`);return}for(let o of s)try{n(t(i,o))}catch(a){console.warn(`Warning: Could not delete ${o}: ${a.message}`)}}async function Gc(e,t="nemar-s3",r){try{let n=Km(r)??{},{stderr:i,exitCode:s}=await R(["git","annex","enableremote",t],{cwd:e,...Object.keys(n).length>0&&{env:Object.fromEntries(Object.entries({...process.env,...n}).filter((o)=>o[1]!=null))}});if(s===0)return{success:!0,enabled:!0};if(i.includes("there is no special remote named")||i.includes("not a special remote")||i.includes("Unknown remote")||i.includes("not found"))return{success:!0,enabled:!1};return{success:!1,enabled:!1,error:i.trim()}}catch(n){return{success:!1,enabled:!1,error:n.message}}}async function ATe(e,t){let{stdout:r,exitCode:n}=await R(["git","config",`remote.${t}.annex-ignore`],{cwd:e});if(n!==0)return!1;return r.trim().toLowerCase()==="true"}async function Ym(e){let t=[],{stdout:r,exitCode:n}=await R(["git","config","--get-regexp","^remote\\..*\\.annex-s3"],{cwd:e});if(n===0&&r.trim())for(let o of r.trim().split(`
|
|
125
125
|
`)){let a=o.match(/^remote\.(.+?)\.annex-/);if(a&&xW.test(a[1]))t.push(a[1])}if(t.length===0){let{stdout:o,exitCode:a,stderr:c}=await R(["git","annex","info","--json"],{cwd:e});if(a!==0){if(c.trim())console.error(`git annex info failed: ${c.trim()}`);return[]}if(!o.trim())return[];let l;try{l=JSON.parse(o)}catch(f){let m=f instanceof Error?f.message:String(f);return console.error(`Failed to parse git-annex info JSON: ${m}`),[]}let d=[...Array.isArray(l["trusted repositories"])?l["trusted repositories"]:[],...Array.isArray(l["semitrusted repositories"])?l["semitrusted repositories"]:[],...Array.isArray(l["untrusted repositories"])?l["untrusted repositories"]:[]];for(let f of d){if(!f?.description?.includes("["))continue;let m=f.description.match(/\[(.+?)\]/);if(!m)continue;let p=m[1];if(!xW.test(p))continue;let{stdout:g}=await R(["git","config",`remote.${p}.annex-s3`],{cwd:e});if(g.trim())t.push(p)}}let i=[...new Set(t)],s=[];for(let o of i){if(await ATe(e,o))continue;s.push(o)}return s}async function Jm(e,t,r=["s3-PUBLIC","s3-PRIVATE"]){let n=[];for(let i of r){let s=await R(["git","config",`remote.${i}.annex-uuid`],{cwd:e});if(s.exitCode!==0||!s.stdout.trim())continue;let o=await R(["git","config",`remote.${i}.annex-ignore`,"true"],{cwd:e});if(o.exitCode!==0){t?.(i,o.stderr.trim()||"unknown error");continue}n.push(i)}return n}async function bW(e,t){if(t.length===0)return null;if(t.length===1)return t[0];if(t.includes(RD))return RD;let{stdout:r,exitCode:n}=await R(["git","annex","info","--json"],{cwd:e});if(n===0&&r.trim())try{let i=JSON.parse(r),s=[...Array.isArray(i["trusted repositories"])?i["trusted repositories"]:[],...Array.isArray(i["semitrusted repositories"])?i["semitrusted repositories"]:[],...Array.isArray(i["untrusted repositories"])?i["untrusted repositories"]:[]];for(let o of s){if(o?.description!==`[${RD}]`)continue;let a=typeof o.uuid==="string"?o.uuid:null;if(!a)continue;for(let c of t){let{stdout:l}=await R(["git","config",`remote.${c}.annex-uuid`],{cwd:e});if(l.trim()===a)return c}}}catch(i){let s=i instanceof Error?i.message:String(i);console.warn(`Could not parse git annex info JSON for remote selection: ${s}`)}return t[0]}var $Te="1GiB",FTe,xW,RD="nemar-s3";var Bs=A(()=>{Ut();FTe=/There is already a special remote named "[^"]+"/;xW=/^[a-zA-Z0-9._-]+$/});import{statSync as kTe}from"fs";import{join as PTe}from"path";var{spawn:_W}=globalThis.Bun;async function kD(e,t,r){let n=t&&t.length>0?t:["."],i=r&&r.length>0?r:[];try{let{stdout:s,stderr:o,exitCode:a}=await R(["git","annex","find","--not","--in=here",...i,"--json",...n],{cwd:e});if(a!==0){if(process.env.VERBOSE&&o.trim())console.warn(`countPendingDownload: git annex find failed: ${o.trim()}`);return null}let c=0,l=0,d=!1,f=!1;for(let m of s.split(`
|
|
126
|
-
`)){let p=m.trim();if(!p)continue;if(f=!0,!p.startsWith("{")){d=!0;continue}try{let g=JSON.parse(p);if(c++,g.bytesize){let y=Number.parseInt(g.bytesize,10);if(Number.isFinite(y))l+=y}}catch{d=!0}}if(c===0&&f&&d)return null;return{fileCount:c,totalBytes:l}}catch(s){if(process.env.VERBOSE)console.warn(`countPendingDownload: ${s.message}`);return null}}function TTe(e,t,r){if(e==="failed")return{success:!1,outcome:e,error:r.trim()||`${t.filesUnavailable} file(s) unavailable from every configured remote`,...t};return{success:!0,outcome:e,...t}}function jTe(e){let{retrieved:t,unavailable:r,requireComplete:n=!1,failureText:i=""}=e;if(r<=0)return"complete";if(n)return"failed";if(qTe.test(i))return"failed";if(t>0)return"partial";return NTe.test(i)?"partial":"failed"}async function PD(e,t={}){let r=t.jobs||4,n=t.paths&&t.paths.length>0?t.paths:["."],i=t.extraArgs??[],s=Km(t.credentials)??{},o=Object.fromEntries(Object.entries({...process.env,...s}).filter((a)=>a[1]!=null));try{let a=["git","annex","get","--json","--json-progress","-J",r.toString(),...i,...n],c=_W({cmd:a,cwd:e,stdout:"pipe",stderr:"pipe",env:o}),l=0,d=0,f=[],m=[],p="",g=[],y=(F)=>{if(t.onProgress?.(F),F.ok===!0||F.success===!0)l++;else if(F.ok===!1||F.success===!1){d++;let M=F.file??F.action?.file;if(M&&f.length<ITe)f.push(M);if(F.note)m.push(F.note);if(F["error-messages"]?.length)m.push(...F["error-messages"]);if(F.error)m.push(F.error)}},x=(async()=>{let F=c.stderr.getReader(),M=new TextDecoder;for(;;){let{done:k,value:j}=await F.read();if(k)break;g.push(j)}p=M.decode(g.reduce((k,j)=>{let Z=new Uint8Array(k.length+j.length);return Z.set(k),Z.set(j,k.length),Z},new Uint8Array))})(),v=c.stdout.getReader(),_=new TextDecoder,
|
|
127
|
-
`);
|
|
126
|
+
`)){let p=m.trim();if(!p)continue;if(f=!0,!p.startsWith("{")){d=!0;continue}try{let g=JSON.parse(p);if(c++,g.bytesize){let y=Number.parseInt(g.bytesize,10);if(Number.isFinite(y))l+=y}}catch{d=!0}}if(c===0&&f&&d)return null;return{fileCount:c,totalBytes:l}}catch(s){if(process.env.VERBOSE)console.warn(`countPendingDownload: ${s.message}`);return null}}function TTe(e,t,r){if(e==="failed")return{success:!1,outcome:e,error:r.trim()||`${t.filesUnavailable} file(s) unavailable from every configured remote`,...t};return{success:!0,outcome:e,...t}}function jTe(e){let{retrieved:t,unavailable:r,requireComplete:n=!1,failureText:i=""}=e;if(r<=0)return"complete";if(n)return"failed";if(qTe.test(i))return"failed";if(t>0)return"partial";return NTe.test(i)?"partial":"failed"}async function PD(e,t={}){let r=t.jobs||4,n=t.paths&&t.paths.length>0?t.paths:["."],i=t.extraArgs??[],s=Km(t.credentials)??{},o=Object.fromEntries(Object.entries({...process.env,...s}).filter((a)=>a[1]!=null));try{let a=["git","annex","get","--json","--json-progress","-J",r.toString(),...i,...n],c=_W({cmd:a,cwd:e,stdout:"pipe",stderr:"pipe",env:o}),l=0,d=0,f=[],m=[],p="",g=[],y=(F)=>{if(t.onProgress?.(F),F.ok===!0||F.success===!0)l++;else if(F.ok===!1||F.success===!1){d++;let M=F.file??F.action?.file;if(M&&f.length<ITe)f.push(M);if(F.note)m.push(F.note);if(F["error-messages"]?.length)m.push(...F["error-messages"]);if(F.error)m.push(F.error)}},x=(async()=>{let F=c.stderr.getReader(),M=new TextDecoder;for(;;){let{done:k,value:j}=await F.read();if(k)break;g.push(j)}p=M.decode(g.reduce((k,j)=>{let Z=new Uint8Array(k.length+j.length);return Z.set(k),Z.set(j,k.length),Z},new Uint8Array))})(),v=c.stdout.getReader(),_=new TextDecoder,S="";for(;;){let{done:F,value:M}=await v.read();if(F)break;S+=_.decode(M,{stream:!0});let k=S.split(`
|
|
127
|
+
`);S=k.pop()??"";for(let j of k){let Z=j.trim();if(!Z||!Z.startsWith("{"))continue;try{y(JSON.parse(Z))}catch{}}}if(S.trim().startsWith("{"))try{y(JSON.parse(S.trim()))}catch{}if(await x,await c.exited!==0&&d===0)return{success:!1,outcome:"failed",error:p.trim()||"Failed to get dataset data",filesDownloaded:l,filesUnavailable:d,unavailablePaths:f};let D=`${p}
|
|
128
128
|
${m.join(`
|
|
129
129
|
`)}`,O=jTe({retrieved:l,unavailable:d,requireComplete:t.requireComplete,failureText:D});return TTe(O,{filesDownloaded:l,filesUnavailable:d,unavailablePaths:f},p)}catch(a){return{success:!1,outcome:"failed",error:a.message,filesDownloaded:0,filesUnavailable:0,unavailablePaths:[]}}}async function DW(e,t){let r=t&&t.length>0?t:["."];try{let n=["git","annex","drop",...r],{stdout:i,stderr:s,exitCode:o}=await R(n,{cwd:e});if(o!==0){let l=[];for(let m of s.split(`
|
|
130
130
|
`)){let p=m.match(/^drop (.+) \(unsafe\)/);if(p)l.push(p[1])}let d=i.match(/^drop .+ ok$/gm),f=d?d.length:0;return{success:!1,error:s.trim(),dropped:f,kept:l}}let a=i.match(/^drop .+ ok$/gm);return{success:!0,dropped:a?a.length:0,kept:[]}}catch(n){return{success:!1,error:(n instanceof Error?n.message:String(n))||"Unknown error during drop",dropped:0,kept:[]}}}function BTe(e,t){let r=t.trim();if(r)return r;let n=e.split(`
|
|
@@ -148,19 +148,19 @@ This dataset is mirrored on NEMAR from OpenNeuro.
|
|
|
148
148
|
[prepare] ${e} -> ${r}
|
|
149
149
|
`)),console.log(u.dim(`Working directory: ${n}`));let s=w("Cloning OpenNeuro dataset...").start(),o=`https://github.com/${C5e}/${e}.git`,a=await br(o,i);if(!a.success)s.fail(`Failed to clone: ${a.error}`),process.exit(1);if(s.succeed(`Cloned ${e}`),!await Bm(i,{yes:!0}))console.error(u.red("Cannot proceed with import: branch must be named 'main'.")),process.exit(1);let l=w("Normalizing dataset metadata...").start();try{let B=await mG(i,e);if(B.length>0)l.succeed(`Un-annexed ${B.length} metadata file(s): ${B.join(", ")}`);else l.stop()}catch(B){l.fail(`Failed to normalize annexed metadata: ${B instanceof Error?B.message:String(B)}`),process.exit(1)}try{let B=await lG(i);if(B.length>0){let Ne=B.reduce((Ve,It)=>Ve+It.size,0);console.log(u.yellow(` Warning: ${B.length} file(s) (${(Ne/1e6).toFixed(1)} MB) will stay in the git repo though NEMAR policy treats them as data.`));for(let Ve of B.slice(0,5))console.log(u.dim(` - ${Ve.path} (${(Ve.size/1e6).toFixed(1)} MB)`));if(B.length>5)console.log(u.dim(` ... and ${B.length-5} more`));console.log(u.dim(" They stay readable and downloadable; see issue #1159 to migrate them."))}}catch(B){console.log(u.dim(` Could not check for un-annexed data: ${B instanceof Error?B.message:String(B)}`))}let d=R5e(i),f=d.Name||e,m=O5e(d);if(console.log(u.dim(` Dataset: ${f}`)),m)console.log(u.dim(` OpenNeuro DOI: ${m}`));let p=w("Creating NEMAR dataset record...").start();try{let B=await Uz({dataset_id:r,name:f,source:"openneuro",source_id:e});p.succeed(`Created ${B.dataset_id} (${B.github_repo})`)}catch(B){let Ne=B instanceof Error?B.message:String(B);if(aG(Ne))p.warn(`Dataset ${r} already exists, continuing...`);else p.fail(`Failed to create dataset: ${Ne}`),process.exit(1)}let g=new Map;if(!t.skipData){let B=w("Mapping annexed files from OpenNeuro S3...").start(),Ne=await R(["git","annex","enableremote","s3-PUBLIC"],{cwd:i});if(Ne.exitCode!==0)B.fail(`Failed to enable s3-PUBLIC remote: ${Ne.stderr.trim()}`),process.exit(1);let Ve=await ID(i);if(g=Ve.urlMap,g.size===0){if(Ve.fileCount>0)throw B.fail(`${Ve.fileCount} annexed file(s) present but none had a copyable source URL`),Error(`Import aborted: ${r} has ${Ve.fileCount} annexed file(s) but git-annex whereis mapped 0 to a copyable source (likely the content's only location is a remote NEMAR can't read). Refusing to publish a dataset with no data. Investigate the upstream annex remotes before retrying.`);B.warn("No annexed files found, skipping data copy")}else B.succeed(`Found ${g.size} annexed files`)}await Jm(i,(B,Ne)=>{console.log(u.yellow(` Warning: could not mark ${B} as annex-ignore (${Ne}). Future pushes may try to upload to ${B}; run 'git config remote.${B}.annex-ignore true' manually.`))});let y=w("Configuring NEMAR remote...").start(),x=await R(["git","remote","remove","origin"],{cwd:i});if(x.exitCode!==0&&!x.stderr.includes("No such remote"))y.fail(`Failed to remove OpenNeuro remote: ${x.stderr.trim()}`),process.exit(1);let v=`git@github.com:nemarDatasets/${r}.git`,_=await ri(i,v,"origin");if(!_.success)y.fail(`Failed to configure remote: ${_.error}`),process.exit(1);if(y.succeed("Configured NEMAR remote"),(await R(["git","fetch","origin","git-annex"],{cwd:i})).exitCode===0){let B=await R(["git","annex","merge"],{cwd:i});if(B.exitCode!==0)console.log(u.yellow(` Warning: found existing NEMAR git-annex state for ${r} but could not merge it (${B.stderr.trim()}). A retry may register the S3 remote under a new UUID; investigate before re-running finalize.`))}if((await R(["git","fetch","origin","main"],{cwd:i})).exitCode===0){let B=await R(["git","rev-parse","--verify","--quiet","origin/main"],{cwd:i}),Ne=await R(["git","rev-parse","--abbrev-ref","HEAD"],{cwd:i});if(uG({originMainSha:B.stdout.trim()||null,currentBranch:Ne.stdout.trim()})){let It=await R(["git","reset","--hard","origin/main"],{cwd:i});if(It.exitCode!==0)console.log(u.yellow(` Warning: found origin/main for ${r} (re-import) but could not reset onto it (${It.stderr.trim()}). Falling back to the normal push path.`));else console.log(u.dim(" Re-import: based main on origin/main for an idempotent metadata commit"))}}let D="",O=[];if(!t.skipData&&g.size>0){let B=w("Setting up NEMAR S3 remote...").start(),Ne=hG(),Ve=await Cr(i,{name:"nemar-s3",bucket:oi,prefix:`${r}/objects`,region:Ti},Ne);if(!Ve.success)B.fail(`Failed to configure S3 remote: ${Ve.error}`),process.exit(1);let It=await Kc(i,"nemar-s3");if(!It)B.fail("Failed to get NEMAR S3 remote UUID"),process.exit(1);D=It,B.succeed("Configured NEMAR S3 remote");let yt=k5e(g,r);if(O=yt.items,yt.skipped>0)console.log(u.yellow(` Skipped ${yt.skipped} keys (no usable source URL)`));console.log(u.dim(` Prepared ${O.length} files for server-side copy`))}let F=w("Seeding metadata...").start(),M;try{xG(i,r,e,d,m),M=bG(i,e,m)}catch(B){F.fail(`Failed to seed metadata: ${B instanceof Error?B.message:String(B)}`),process.exit(1)}let k=[".nemar/metadata.json"];if(M.kind==="renamed")k.push("README","README.md");else if(M.kind==="created")k.push("README.md");let j=await R(["git","add",...k],{cwd:i});if(j.exitCode!==0)F.fail(`Failed to stage metadata: ${j.stderr.trim()}`),process.exit(1);let Z=await R(["git","commit","-m",`Add NEMAR metadata (imported from OpenNeuro ${e})`],{cwd:i});if(Z.exitCode!==0&&!Z.stdout.includes("nothing to commit"))F.fail(`Failed to commit metadata: ${Z.stderr.trim()}`),process.exit(1);let _e=M.kind==="renamed"?"renamed README -> README.md":M.kind==="kept"?`kept upstream ${M.path}`:"wrote provenance stub README.md (no upstream README)";F.succeed(`Seeded .nemar/metadata.json (${_e})`);let qe=w("Pushing to nemarDatasets...").start(),Me=await tr(i,"origin");if(!Me.success)qe.fail(`Failed to push: ${Me.error}`),process.exit(1);if(Me.warning)qe.fail(`Pushed main but git-annex branch failed: ${Me.warning}. Aborting \u2014 published dataset would be uncloneable. Investigate the git-annex push failure and re-run.`),process.exit(1);qe.succeed("Pushed to nemarDatasets");let T={openneuroId:e,nemarId:r,nemarUuid:D,items:O};if(t.persistStaging)await jD(T,oi,Ti),console.log(u.dim(` Wrote import manifest to s3://${oi}/${r}/staging/`));return console.log(u.green(`[prepare] done: ${r} (${O.length} files to copy)`)),T}async function _G(e,t,r={},n){let i=JD(e),s=n??await eh(i,oi,Ti),o=`copy ${t.index}/${t.count}`;if(r.skipData||s.items.length===0){console.log(u.dim(`[${o}] no data to copy`));return}let a=s.items.filter((p)=>qD(p.key,t.index,t.count)).map((p)=>({key:p.key,source:p.source,httpUrl:p.sourceUrl,destUri:p.destUri}));if(a.length===0){console.log(u.dim(`[${o}] empty shard`));return}let c=await Us(oi,`${i}/objects/`,Ti),{toCopy:l,skipped:d}=Fd(a,c,Rd(a));if(d.length>0)console.log(u.dim(`[${o}] skipped ${d.length} already present`));if(l.length===0){console.log(u.green(`[${o}] nothing to copy (all ${d.length} present)`));return}let f=w(`[${o}] copying ${l.length} files...`).start(),m=await Yc(l,Ti,F5e,(p,g)=>{f.text=`[${o}] ${p}/${g}`});if(m.fellBack>0)console.log(u.yellow(` ${m.fellBack} objects needed the curl fallback (check S3 permissions)`));if(m.failed.length>0){f.fail(`[${o}] ${m.failed.length} of ${l.length} files failed`);for(let p of m.failed.slice(0,5))console.error(u.red(` ${p.key}: ${p.error}`));if(m.failed.length>5)console.error(u.red(` ... and ${m.failed.length-5} more`));console.error(u.red("Re-run this shard to resume (already-copied objects are skipped).")),process.exit(1)}f.succeed(`[${o}] copied ${m.copied}, skipped ${d.length}`)}async function DG(e,t={},r){let n=JD(e),i=r??await eh(n,oi,Ti),s=t.workDir||iG(ir(sG(),`nemar-finalize-${n}-`)),o=ir(s,`${n}-finalize`);console.log(u.cyan(`
|
|
150
150
|
[finalize] ${e} -> ${n}
|
|
151
|
-
`));let a=!t.skipData&&i.items.length>0;if(!t.skipData&&i.items.length===0){let F=w("Confirming dataset has no annexed data...").start(),M=await br(`git@github.com:nemarDatasets/${n}.git`,o,{useGitHubToken:!0});if(!M.success)F.fail(`Failed to clone ${n} for the empty-manifest check: ${M.error}`),process.exit(1);let{fileCount:k}=await ID(o);if(k>0)throw F.fail(`${k} annexed file(s) but the import manifest is empty`),Error(`Finalize aborted: ${n} has ${k} annexed file(s) but the import manifest is empty (no data was copied). Refusing to publish a dataset with no data. Re-run prepare + copy; if the data is genuinely unfetchable this should quarantine, not publish.`);F.succeed("Confirmed metadata-only dataset (no annexed data)")}if(a){let F=w("Verifying copied data...").start(),M=await Us(oi,`${n}/objects/`,Ti),k=i.items.filter((yt)=>!Cd(yt.key,M));if(k.length>0)F.fail(`${k.length} of ${i.items.length} objects missing or wrong size at the destination. Re-run the copy phase (a shard likely failed or was cancelled) before finalizing.`),process.exit(1);F.succeed(`Verified ${i.items.length} objects present`);let j=w("Re-cloning for git-annex finalize...").start(),Z=await br(`git@github.com:nemarDatasets/${n}.git`,o,{useGitHubToken:!0});if(!Z.success)j.fail(`Failed to clone ${n}: ${Z.error}`),process.exit(1);j.succeed(`Cloned ${n}`);let _e=hG(),qe=await Cr(o,{name:"nemar-s3",bucket:oi,prefix:`${n}/objects`,region:Ti},_e);if(!qe.success)console.error(u.red(`Failed to enable S3 remote: ${qe.error}`)),process.exit(1);let Me=await Kc(o,"nemar-s3");if(!Me)console.error(u.red("Failed to get NEMAR S3 remote UUID on finalize clone")),process.exit(1);if(i.nemarUuid&&Me!==i.nemarUuid)console.error(u.red(`nemar-s3 uuid mismatch (prepare=${i.nemarUuid} finalize=${Me}). Aborting to avoid registering keys against the wrong remote.`)),process.exit(1);let T=w("Registering files in git-annex...").start(),B=i.items.map((yt)=>yt.key),Ne=await Xm(o,B,Me);if(Ne.failed>0)T.fail(`${Ne.failed} of ${B.length} git-annex key registrations failed. Aborting before publish \u2014 those blobs would be unfindable for clones. Re-run finalize to retry.`),process.exit(1);T.succeed(`Registered ${Ne.success} files in git-annex`);let Ve=w("Pushing git-annex branch...").start(),It=await tr(o,"origin");if(!It.success)Ve.fail(`Failed to push git-annex branch: ${It.error}`),process.exit(1);if(It.warning)Ve.fail(`git-annex branch push failed: ${It.warning}. Aborting \u2014 published dataset would be uncloneable.`),process.exit(1);Ve.succeed("Pushed git-annex branch")}let c=!1,l=w("Deploying CI workflows...").start();try{await Ai(n),l.succeed("CI workflows deployed (BIDS validation, LLM enrichment, archive generation)"),c=!0}catch(F){let M=F instanceof Error?F.message:String(F);l.fail(`CI deployment failed: ${M}`),console.log(u.dim(` After fixing the deploy failure, run 'nemar admin ci add ${n}' and 'nemar admin publish request/approve ${n}' to resume.`))}let d=null;if(c){let F=w("Waiting for BIDS validation run to register...").start();if(d=await sh(n,F),d.kind==="found")F.succeed("BIDS validation run registered; deferring to ci_check at approval");else if(d.kind==="timeout"){let M=t.trustUpstream?"trusting upstream OpenNeuro validation (--trust-upstream)":"no --trust-upstream \u2014 aborting";F.warn(`BIDS validation run did not register within 120s; ${M}`)}else{let M=d.lastError instanceof Error?d.lastError.message:String(d.lastError);F.fail(`All BIDS validation polls failed (last error: ${M})`)}}let f=oG({ciDeployed:c,poll:d,trustUpstream:t.trustUpstream??!1});if(f.abortReason)console.error(u.red(f.abortReason)),process.exit(1);let m=f.skipCiCheck,p=null;try{p=(await gt(n)).visibility}catch{}let g=p!==null&&cG(p)==="skip-already-published",y=5,x=300000,v=w("Requesting publication...").start(),_=!1;if(g)_=!0,v.succeed(`${n} is already published; skipping publish/request (data re-copy only)`);for(let F=1;!g&&F<=y;F++)try{await zc(n),_=!0;break}catch(M){let k=M instanceof Error?M.message:String(M);if(k==="Dataset is already published"){g=!0,_=!0,v.succeed(`${n} is already published; skipping publish/request (data re-copy only)`);break}if(!k.includes("BIDS validation is currently running"))v.fail(`Failed to request publication: ${k}`),process.exit(1);if(F===y)v.fail(`BIDS validation still in progress after ${y} attempts (~${Math.round(y*x/60000)}min). Re-run 'nemar admin publish request/approve ${n}' once validation completes.`),process.exit(1);v.text=`Waiting for BIDS validation to complete... (attempt ${F}/${y}, next retry in 5min)`,await new Promise((Z)=>setTimeout(Z,x))}if(_&&!g)v.succeed("Publication requested");let
|
|
151
|
+
`));let a=!t.skipData&&i.items.length>0;if(!t.skipData&&i.items.length===0){let F=w("Confirming dataset has no annexed data...").start(),M=await br(`git@github.com:nemarDatasets/${n}.git`,o,{useGitHubToken:!0});if(!M.success)F.fail(`Failed to clone ${n} for the empty-manifest check: ${M.error}`),process.exit(1);let{fileCount:k}=await ID(o);if(k>0)throw F.fail(`${k} annexed file(s) but the import manifest is empty`),Error(`Finalize aborted: ${n} has ${k} annexed file(s) but the import manifest is empty (no data was copied). Refusing to publish a dataset with no data. Re-run prepare + copy; if the data is genuinely unfetchable this should quarantine, not publish.`);F.succeed("Confirmed metadata-only dataset (no annexed data)")}if(a){let F=w("Verifying copied data...").start(),M=await Us(oi,`${n}/objects/`,Ti),k=i.items.filter((yt)=>!Cd(yt.key,M));if(k.length>0)F.fail(`${k.length} of ${i.items.length} objects missing or wrong size at the destination. Re-run the copy phase (a shard likely failed or was cancelled) before finalizing.`),process.exit(1);F.succeed(`Verified ${i.items.length} objects present`);let j=w("Re-cloning for git-annex finalize...").start(),Z=await br(`git@github.com:nemarDatasets/${n}.git`,o,{useGitHubToken:!0});if(!Z.success)j.fail(`Failed to clone ${n}: ${Z.error}`),process.exit(1);j.succeed(`Cloned ${n}`);let _e=hG(),qe=await Cr(o,{name:"nemar-s3",bucket:oi,prefix:`${n}/objects`,region:Ti},_e);if(!qe.success)console.error(u.red(`Failed to enable S3 remote: ${qe.error}`)),process.exit(1);let Me=await Kc(o,"nemar-s3");if(!Me)console.error(u.red("Failed to get NEMAR S3 remote UUID on finalize clone")),process.exit(1);if(i.nemarUuid&&Me!==i.nemarUuid)console.error(u.red(`nemar-s3 uuid mismatch (prepare=${i.nemarUuid} finalize=${Me}). Aborting to avoid registering keys against the wrong remote.`)),process.exit(1);let T=w("Registering files in git-annex...").start(),B=i.items.map((yt)=>yt.key),Ne=await Xm(o,B,Me);if(Ne.failed>0)T.fail(`${Ne.failed} of ${B.length} git-annex key registrations failed. Aborting before publish \u2014 those blobs would be unfindable for clones. Re-run finalize to retry.`),process.exit(1);T.succeed(`Registered ${Ne.success} files in git-annex`);let Ve=w("Pushing git-annex branch...").start(),It=await tr(o,"origin");if(!It.success)Ve.fail(`Failed to push git-annex branch: ${It.error}`),process.exit(1);if(It.warning)Ve.fail(`git-annex branch push failed: ${It.warning}. Aborting \u2014 published dataset would be uncloneable.`),process.exit(1);Ve.succeed("Pushed git-annex branch")}let c=!1,l=w("Deploying CI workflows...").start();try{await Ai(n),l.succeed("CI workflows deployed (BIDS validation, LLM enrichment, archive generation)"),c=!0}catch(F){let M=F instanceof Error?F.message:String(F);l.fail(`CI deployment failed: ${M}`),console.log(u.dim(` After fixing the deploy failure, run 'nemar admin ci add ${n}' and 'nemar admin publish request/approve ${n}' to resume.`))}let d=null;if(c){let F=w("Waiting for BIDS validation run to register...").start();if(d=await sh(n,F),d.kind==="found")F.succeed("BIDS validation run registered; deferring to ci_check at approval");else if(d.kind==="timeout"){let M=t.trustUpstream?"trusting upstream OpenNeuro validation (--trust-upstream)":"no --trust-upstream \u2014 aborting";F.warn(`BIDS validation run did not register within 120s; ${M}`)}else{let M=d.lastError instanceof Error?d.lastError.message:String(d.lastError);F.fail(`All BIDS validation polls failed (last error: ${M})`)}}let f=oG({ciDeployed:c,poll:d,trustUpstream:t.trustUpstream??!1});if(f.abortReason)console.error(u.red(f.abortReason)),process.exit(1);let m=f.skipCiCheck,p=null;try{p=(await gt(n)).visibility}catch{}let g=p!==null&&cG(p)==="skip-already-published",y=5,x=300000,v=w("Requesting publication...").start(),_=!1;if(g)_=!0,v.succeed(`${n} is already published; skipping publish/request (data re-copy only)`);for(let F=1;!g&&F<=y;F++)try{await zc(n),_=!0;break}catch(M){let k=M instanceof Error?M.message:String(M);if(k==="Dataset is already published"){g=!0,_=!0,v.succeed(`${n} is already published; skipping publish/request (data re-copy only)`);break}if(!k.includes("BIDS validation is currently running"))v.fail(`Failed to request publication: ${k}`),process.exit(1);if(F===y)v.fail(`BIDS validation still in progress after ${y} attempts (~${Math.round(y*x/60000)}min). Re-run 'nemar admin publish request/approve ${n}' once validation completes.`),process.exit(1);v.text=`Waiting for BIDS validation to complete... (attempt ${F}/${y}, next retry in 5min)`,await new Promise((Z)=>setTimeout(Z,x))}if(_&&!g)v.succeed("Publication requested");let S=w("Approving publication...").start(),C=10,D=!1;if(g)D=!0,S.succeed(`${n} is already published; skipping publish/approve (data re-copy only)`);for(let F=1;!g&&F<=C;F++)try{await Hc(n,F>1,!1,m),D=!0;break}catch(M){let k=M instanceof Error?M.message:String(M);if(F<C)S.text=`Approving publication... (attempt ${F+1}/${C})`,await new Promise((j)=>setTimeout(j,3000));else S.fail(`Failed to approve publication after ${C} attempts: ${k}`),process.exit(1)}if(D&&!g)S.succeed("Publication approved");let O=w("Refreshing metadata + LLM enrichment...").start();try{let F=await qc(n),M=F.enrichment?.status==="ok",k=F.sync?.metadata_columns_written===!0;if(M&&k)O.succeed("Refreshed enrichment + metadata columns");else{let j=[];if(!M)j.push(`enrichment ${F.enrichment?.status??"missing"}`);if(!k)j.push("metadata columns not written");O.warn(`Partial reindex: ${j.join(", ")} (run 'nemar admin reindex ${n}' to retry)`)}}catch(F){let M=F instanceof Error?F.message:String(F);O.warn(`Reindex failed (non-fatal): ${M}. Run 'nemar admin reindex ${n}' to retry.`)}if(t.persistStaging)await MD(n,oi,Ti);console.log(u.green(`
|
|
152
152
|
Import and publish complete: ${e} -> ${n}`)),console.log(u.dim(` GitHub: https://github.com/nemarDatasets/${n}`)),console.log(u.dim(` Working dir: ${o}`))}async function P5e(e,t={}){let r=await vG(e,t);if(!t.skipData)await _G(e,{index:0,count:1},t,r);await DG(e,t,r)}var C5e="OpenNeuroDatasets",oi="nemar",Ti="us-east-2",F5e=16,fG="[openneuro-upstream-inaccessible]",rG,A5e;var oh=A(()=>{He();nn();Mc();qs();Dd();Ms();Pi();Gm();Wc();Ut();Bs();Ls();th();KD();rG=["anat","beh","dwi","eeg","emg","fmap","func","ieeg","meg","micr","motion","nirs","perf","pet"];A5e=/^README(\.[A-Za-z0-9]+)?$/i});var CG={};ji(CG,{runE2ETest:()=>M5e});import{cpSync as I5e,existsSync as tw,mkdirSync as T5e,mkdtempSync as wG,readFileSync as N5e,rmSync as QD,writeFileSync as ZD}from"fs";import{tmpdir as EG}from"os";import{join as Ni,resolve as ew}from"path";function Ht(e,...t){if(e.verbose)console.log(" ",...t)}async function $G(e,t){let r=performance.now();try{return await t(),{name:e,passed:!0,duration_ms:Math.round(performance.now()-r)}}catch(n){let i=n instanceof Error?n.message:String(n);return{name:e,passed:!1,duration_ms:Math.round(performance.now()-r),error:i}}}async function q5e(e){let t=[];for(let{name:r,fn:n}of e){let i=await $G(r,n);if(t.push(i),!i.passed)break}return t}function Fr(e,t){if(!e.success)throw Error(`${t}: ${e.error}`)}function SG(e){if(!e.creds)throw Error("credentials not yet fetched");return e.creds}function j5e(){let e=[ew(__dirname,"../../test/fixtures/bids-minimal"),ew(__dirname,"../test/fixtures/bids-minimal"),ew(process.cwd(),"test/fixtures/bids-minimal")];for(let t of e)if(tw(t))return t;throw Error("Could not find test/fixtures/bids-minimal. Run from the nemar-cli root directory.")}async function M5e(e){let t=e.verbose??!1,r=performance.now(),n=wG(Ni(EG(),"nemar-e2e-upload-")),i=wG(Ni(EG(),"nemar-e2e-clone-")),s={uploadDir:n,cloneDir:i,verbose:t},o=[];if(!e.skipReset)o.push({name:"Reset nm099999",fn:async()=>{let c=await Mz(jo);if(Ht(s,`S3 objects deleted: ${c.steps.s3_deleted}`),Ht(s,`GitHub recreated: ${c.steps.github_recreated}`),Ht(s,`D1 cleaned: ${c.steps.d1_cleaned}`),!c.success){let l=[];if(!c.steps.github_recreated)l.push("GitHub");if(!c.steps.d1_cleaned)l.push("D1");throw Error(`Reset partially failed: ${l.join(", ")}`)}}});o.push({name:"Prepare upload",fn:async()=>{let c=j5e();I5e(c,n,{recursive:!0});for(let l of[".git",".nemar",".gitattributes"]){let d=Ni(n,l);if(tw(d)){let f=await R(["chmod","-R","u+w",d]);if(f.exitCode!==0)console.warn(`chmod failed for ${d} (exit ${f.exitCode}): ${f.stderr}`);QD(d,{recursive:!0,force:!0})}}Ht(s,`Copied fixtures to ${n}`)}},{name:"Init git + annex",fn:async()=>{Fr(await Jc(n,{force:!0}),"initDataset"),Fr(await Xc(n),"configureLargefiles"),Ht(s,"Git + git-annex initialized")}},{name:"Configure remotes",fn:async()=>{s.creds=await ti(jo),Ht(s,`S3 prefix: ${s.creds.s3.prefix}`),Fr(await Cr(n,{name:"nemar-s3",bucket:s.creds.s3.bucket,prefix:`${jo}/objects`,region:s.creds.s3.region,publicUrl:`https://${s.creds.s3.bucket}.s3.${s.creds.s3.region}.amazonaws.com/${jo}/objects`},Vt(s.creds.credentials)),"configureS3Remote");let c=`git@github.com:nemarDatasets/${jo}.git`;Fr(await ri(n,c),"configureGitHubRemote"),Ht(s,"S3 + GitHub remotes configured")}},{name:"Upload to S3",fn:async()=>{Fr(await qo(n),"gitAnnexAdd"),Fr(await Ii(n,"Initial BIDS dataset"),"saveDataset");let c=await ii(n,"nemar-s3",4,Vt(SG(s).credentials));Fr(c,"copyToAnnexRemote"),Ht(s,`Files copied to S3: ${c.filesCopied}`),await zt(n)}},{name:"Push to GitHub",fn:async()=>{let c=await tr(n);if(Fr(c,"pushToGitHub"),c.warning)Ht(s,`Warning: ${c.warning}`);Ht(s,"Pushed to GitHub (main + git-annex branches)")}},{name:"Clone fresh",fn:async()=>{let c=`git@github.com:nemarDatasets/${jo}.git`;Fr(await br(c,i),"cloneDataset");let l=await Gc(i,"nemar-s3");if(!l.success)throw Error(`enableS3Remote: ${l.error}`);Ht(s,`Clone at ${i}, S3 remote enabled: ${l.enabled}`)}},{name:"Download + verify",fn:async()=>{let c=Vt(SG(s).credentials),l={AWS_ACCESS_KEY_ID:c.accessKeyId,AWS_SECRET_ACCESS_KEY:c.secretAccessKey};if(c.sessionToken)l.AWS_SESSION_TOKEN=c.sessionToken;let{stdout:d,stderr:f,exitCode:m}=await R(["git","annex","get","."],{cwd:i,env:l});if(m!==0)throw Error(`getDatasetData: ${f.trim()}`);let p=d.match(/^get .+ ok$/gm);Ht(s,`Files downloaded: ${p?p.length:0}`);let g=Ni(i,"sub-01/eeg/sub-01_task-rest_eeg.edf");if(!tw(g))throw Error("EDF file not found after download");let{size:y}=Bun.file(g);if(y<512)throw Error(`EDF file too small: ${y} bytes`);Ht(s,`EDF file verified: ${y} bytes`)}},{name:"Update cycle",fn:async()=>{let c=Ni(i,"sub-02/eeg");T5e(c,{recursive:!0});let l=Buffer.alloc(1024);l.write("0".padEnd(8),0,"ascii"),ZD(Ni(c,"sub-02_task-rest_eeg.edf"),l),ZD(Ni(c,"sub-02_task-rest_eeg.json"),JSON.stringify({TaskName:"rest",SamplingFrequency:256}));let d=N5e(Ni(i,"participants.tsv"),"utf-8");ZD(Ni(i,"participants.tsv"),`${d.trimEnd()}
|
|
153
153
|
sub-02 30 F
|
|
154
154
|
`);let f=`e2e-update-${Date.now()}`,{exitCode:m}=await R(["git","checkout","-b",f],{cwd:i});if(m!==0)throw Error("Failed to create update branch");Fr(await qo(i),"gitAnnexAdd (update)"),Fr(await Ii(i,"Add sub-02"),"saveDataset (update)"),s.creds=await ti(jo);let p=await ii(i,"nemar-s3",4,Vt(s.creds.credentials));Fr(p,"copyToAnnexRemote (update)"),Ht(s,`Update files copied to S3: ${p.filesCopied}`),await zt(i);let g=await tr(i,"origin",f);Fr(g,"pushToGitHub (update branch)");let{exitCode:y,stderr:x}=await R(["git","push","origin","git-annex"],{cwd:i});if(y!==0)throw Error(`Failed to push git-annex branch: ${x.trim()}`);Ht(s,`Update pushed to branch: ${f}`)}});let a=await q5e(o);if(!e.skipCleanup&&a.every((c)=>c.passed))a.push(await $G("Cleanup",async()=>{await R(["chmod","-R","u+w",n]),await R(["chmod","-R","u+w",i]),QD(n,{recursive:!0,force:!0}),QD(i,{recursive:!0,force:!0}),Ht(s,"Temp directories cleaned up")}));return B5e(a,r,n,i,e.skipCleanup)}function B5e(e,t,r,n,i){let s={passed:e.every((o)=>o.passed),steps:e,total_duration_ms:Math.round(performance.now()-t)};if(i)s.upload_dir=r,s.clone_dir=n;return s}var __dirname="/home/runner/work/nemar-cli/nemar-cli/src/lib",jo="nm099999";var FG=A(()=>{Mc();Bc();Ms();Pi();Ad();Ut();Bs();Ls()});var sw={};ji(sw,{EXEMPLAR_ID_RE:()=>nw,EXEMPLAR_SOURCE_ID_RE:()=>iw,cloneExemplar:()=>J5e,copyExemplarData:()=>MG,finalizeExemplar:()=>LG,findMissingCopiedKeys:()=>BG,isAnnexContentKey:()=>TG,loadExemplarFleet:()=>H5e,parseExemplarFleet:()=>IG,planSubPrefixCopy:()=>qG,prepareExemplar:()=>jG,rewriteObjectKeyPrefix:()=>PG,scrubDatasetDescription:()=>kG});import{existsSync as L5e,mkdtempSync as U5e,readFileSync as OG,writeFileSync as V5e}from"fs";import{tmpdir as z5e}from"os";import{join as ah}from"path";function kG(e){let t=typeof e.Name==="string"?e.Name:"",{DatasetDOI:r,...n}=e;return{...n,Name:`[TEST COPY] ${t}`}}function PG(e,t,r){let n=`${t}/`;if(!e.startsWith(n))throw Error(`Key "${e}" does not start with expected source prefix "${n}"`);return`${r}/${e.slice(n.length)}`}function IG(e){if(!Array.isArray(e))throw Error("Exemplar fleet file must be a JSON array");return e.map((t,r)=>{if(typeof t!=="object"||t===null)throw Error(`Fleet entry ${r} is not an object`);let{xx_id:n,source_id:i,modality:s,note:o}=t;if(typeof n!=="string"||!nw.test(n))throw Error(`Fleet entry ${r}: xx_id "${n}" must match xx099900-xx099999`);if(typeof i!=="string"||!iw.test(i))throw Error(`Fleet entry ${r} (${n}): source_id "${i}" must be an nm/on dataset id`);if(typeof s!=="string"||s.length===0)throw Error(`Fleet entry ${r} (${n}): modality is required`);if(o!==void 0&&typeof o!=="string")throw Error(`Fleet entry ${r} (${n}): note must be a string when present`);return{xx_id:n,source_id:i,modality:s,...o!==void 0?{note:o}:{}}})}function H5e(e){let t;try{t=JSON.parse(OG(e,"utf-8"))}catch(r){throw Error(`Failed to read/parse exemplar fleet file at ${e}: ${r instanceof Error?r.message:String(r)}`)}return IG(t)}function W5e(){let e=process.env.AWS_ACCESS_KEY_ID,t=process.env.AWS_SECRET_ACCESS_KEY;if(!e||!t)throw Error("AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY must be set in environment for S3 operations");return{accessKeyId:e,secretAccessKey:t,sessionToken:process.env.AWS_SESSION_TOKEN}}function G5e(e){let t=ah(e,"dataset_description.json");if(!L5e(t))throw Error(`dataset_description.json not found at ${t}`);try{return JSON.parse(OG(t,"utf-8"))}catch(r){throw Error(`Failed to parse dataset_description.json at ${t}: ${r instanceof Error?r.message:String(r)}`)}}async function K5e(e){let{stdout:t,exitCode:r}=await R(["git","tag","-l"],{cwd:e});if(r!==0)return;let n=t.trim().split(`
|
|
155
155
|
`).filter(Boolean);if(n.length===0)return;let i=await R(["git","tag","-d",...n],{cwd:e});if(i.exitCode!==0)console.warn(u.yellow(` Warning: failed to strip local tags: ${i.stderr.trim()}`))}function TG(e){return e!==Y5e}async function NG(e,t,r){let n=`${e}/${r}`;return[...(await Us(RG,n,Mo)).keys()].filter(TG).map((s)=>{let o=`${n}${s}`,a=PG(o,e,t);return{key:s,source:{bucket:RG,key:o,region:Mo},httpUrl:null,destUri:`s3://${Nd}/${a}`}})}function qG(e,t){return Fd(e,t,Rd(e))}async function rw(e,t,r,n){let i=await NG(e,t,r);if(i.length===0)return console.log(u.dim(` [${n}] nothing to copy`)),[];let s=await Us(Nd,`${t}/${r}`,Mo),{toCopy:o,skipped:a}=qG(i,s);if(o.length===0)return console.log(u.green(` [${n}] nothing to copy (all ${a.length} present)`)),i.map((d)=>d.key);let c=w(`[${n}] copying ${o.length} files...`).start(),l=await Yc(o,Mo,AG,(d,f)=>{c.text=`[${n}] ${d}/${f}`});if(l.failed.length>0){c.fail(`[${n}] ${l.failed.length} of ${o.length} files failed`);for(let d of l.failed.slice(0,5))console.error(u.red(` ${d.key}: ${d.error}`));throw console.error(u.red(`Re-run to resume [${n}] (already-copied objects are skipped).`)),Error(`[${n}] ${l.failed.length} of ${o.length} files failed to copy: ${l.failed.slice(0,5).map((d)=>`${d.key}: ${d.error}`).join("; ")}`)}return c.succeed(`[${n}] copied ${l.copied}, skipped ${a.length}`),i.map((d)=>d.key)}async function jG(e,t,r={}){if(!nw.test(e))throw Error(`Invalid exemplar id "${e}". Expected xx099900-xx099999.`);if(!iw.test(t))throw Error(`Invalid source id "${t}". Expected an nm/on dataset id.`);let n=r.workDir||U5e(ah(z5e(),`nemar-exemplar-${e}-`)),i=ah(n,e);console.log(u.cyan(`
|
|
156
156
|
[prepare] ${t} -> ${e}
|
|
157
157
|
`)),console.log(u.dim(`Working directory: ${n}`));let s=w(`Cloning ${t}...`).start(),o=`https://github.com/${Td}/${t}.git`,a=await br(o,i);if(!a.success){let k=`Failed to clone: ${a.error}`;throw s.fail(k),Error(k)}s.succeed(`Cloned ${t}`),await K5e(i);let c=w("Scrubbing dataset_description.json...").start(),l=G5e(i),d=kG(l);V5e(ah(i,"dataset_description.json"),`${JSON.stringify(d,null,2)}
|
|
158
|
-
`);let f=await R(["git","add","dataset_description.json"],{cwd:i});if(f.exitCode!==0){let k=`Failed to stage scrubbed metadata: ${f.stderr.trim()}`;throw c.fail(k),Error(k)}let m=await R(["git","commit","-m",`Scrub dataset_description.json for exemplar clone (source: ${t})`],{cwd:i});if(m.exitCode!==0&&!m.stdout.includes("nothing to commit")){let k=`Failed to commit scrubbed metadata: ${m.stderr.trim()}`;throw c.fail(k),Error(k)}c.succeed("Scrubbed dataset_description.json");let p=r.name||(typeof d.Name==="string"?d.Name:void 0),g=w("Creating exemplar dataset record...").start();try{let k=await Vz({dataset_id:e,source_id:t,name:p,description:r.description});g.succeed(`Created ${k.dataset_id} (${k.github_repo})`)}catch(k){let j=k instanceof Error?k.message:String(k),Z=k instanceof q&&k.statusCode===409;if(Z&&j.includes("Dataset"))g.warn(`Exemplar ${e} already exists, continuing...`);else if(Z){let _e=`GitHub repo for ${e} exists but has no dataset record \u2014 a previous run failed between repo creation and the D1 insert. Delete the orphan with 'nemar admin delete-dataset ${e}' (or remove the repo manually) and re-run. Original: ${j}`;throw g.fail(_e),Error(_e)}else{let _e=`Failed to create exemplar: ${j}`;throw g.fail(_e),Error(_e)}}await Jm(i,(k,j)=>{console.log(u.yellow(` Warning: could not mark ${k} as annex-ignore (${j}). Run 'git config remote.${k}.annex-ignore true' manually.`))},["nemar-s3"]);let y=w("Configuring nemar-s3-dev remote...").start(),x=W5e(),v=await Cr(i,{name:"nemar-s3-dev",bucket:Nd,prefix:`${e}/objects`,region:Mo},x);if(!v.success){let k=`Failed to configure nemar-s3-dev: ${v.error}`;throw y.fail(k),Error(k)}let _=await Kc(i,"nemar-s3-dev");if(!_)throw y.fail("Failed to get nemar-s3-dev remote UUID"),Error("Failed to get nemar-s3-dev remote UUID");y.succeed("Configured nemar-s3-dev remote");let
|
|
158
|
+
`);let f=await R(["git","add","dataset_description.json"],{cwd:i});if(f.exitCode!==0){let k=`Failed to stage scrubbed metadata: ${f.stderr.trim()}`;throw c.fail(k),Error(k)}let m=await R(["git","commit","-m",`Scrub dataset_description.json for exemplar clone (source: ${t})`],{cwd:i});if(m.exitCode!==0&&!m.stdout.includes("nothing to commit")){let k=`Failed to commit scrubbed metadata: ${m.stderr.trim()}`;throw c.fail(k),Error(k)}c.succeed("Scrubbed dataset_description.json");let p=r.name||(typeof d.Name==="string"?d.Name:void 0),g=w("Creating exemplar dataset record...").start();try{let k=await Vz({dataset_id:e,source_id:t,name:p,description:r.description});g.succeed(`Created ${k.dataset_id} (${k.github_repo})`)}catch(k){let j=k instanceof Error?k.message:String(k),Z=k instanceof q&&k.statusCode===409;if(Z&&j.includes("Dataset"))g.warn(`Exemplar ${e} already exists, continuing...`);else if(Z){let _e=`GitHub repo for ${e} exists but has no dataset record \u2014 a previous run failed between repo creation and the D1 insert. Delete the orphan with 'nemar admin delete-dataset ${e}' (or remove the repo manually) and re-run. Original: ${j}`;throw g.fail(_e),Error(_e)}else{let _e=`Failed to create exemplar: ${j}`;throw g.fail(_e),Error(_e)}}await Jm(i,(k,j)=>{console.log(u.yellow(` Warning: could not mark ${k} as annex-ignore (${j}). Run 'git config remote.${k}.annex-ignore true' manually.`))},["nemar-s3"]);let y=w("Configuring nemar-s3-dev remote...").start(),x=W5e(),v=await Cr(i,{name:"nemar-s3-dev",bucket:Nd,prefix:`${e}/objects`,region:Mo},x);if(!v.success){let k=`Failed to configure nemar-s3-dev: ${v.error}`;throw y.fail(k),Error(k)}let _=await Kc(i,"nemar-s3-dev");if(!_)throw y.fail("Failed to get nemar-s3-dev remote UUID"),Error("Failed to get nemar-s3-dev remote UUID");y.succeed("Configured nemar-s3-dev remote");let S=w("Configuring NEMAR remote...").start(),C=await R(["git","remote","remove","origin"],{cwd:i});if(C.exitCode!==0&&!C.stderr.includes("No such remote")){let k=`Failed to remove source remote: ${C.stderr.trim()}`;throw S.fail(k),Error(k)}let D=`git@github.com:${Td}/${e}.git`,O=await ri(i,D,"origin");if(!O.success){let k=`Failed to configure remote: ${O.error}`;throw S.fail(k),Error(k)}S.succeed("Configured NEMAR remote");let F=w(`Pushing to ${Td}...`).start(),M=await tr(i,"origin");if(!M.success){let k=`Failed to push: ${M.error}`;throw F.fail(k),Error(k)}if(M.warning){let k=`Pushed main but git-annex branch failed: ${M.warning}. Aborting \u2014 the exemplar would be uncloneable.`;throw F.fail(k),Error(k)}return F.succeed(`Pushed to ${Td}`),console.log(u.green(`[prepare] done: ${e}`)),{datasetPath:i,xxId:e,sourceId:t,nemarS3DevUuid:_}}async function MG(e,t={}){let{xxId:r,sourceId:n}=e;console.log(u.cyan(`
|
|
159
159
|
[copy] ${n} -> ${r}
|
|
160
160
|
`));let i=await rw(n,r,"objects/","objects");if(t.includeDerived){await rw(n,r,"zarr/","zarr"),await rw(n,r,"archives/","archives");let o=(await NG(n,r,"version/")).filter((a)=>a.key.endsWith("-records.json"));if(o.length>0){let a=w(`[records.json] copying ${o.length} file(s)...`).start(),c=await Yc(o,Mo,AG);if(c.failed.length>0)throw a.fail(`[records.json] ${c.failed.length} of ${o.length} failed`),Error(`[records.json] ${c.failed.length} of ${o.length} file(s) failed to copy: ${c.failed.slice(0,5).map((l)=>`${l.key}: ${l.error}`).join("; ")}`);a.succeed(`[records.json] copied ${c.copied}`)}}return{keys:i}}function BG(e,t){return e.filter((r)=>!Cd(r,t))}async function LG(e,t,r={}){let{datasetPath:n,xxId:i,sourceId:s,nemarS3DevUuid:o}=e;if(console.log(u.cyan(`
|
|
161
161
|
[finalize] ${s} -> ${i}
|
|
162
|
-
`)),t.keys.length>0){let _=w("Verifying copied data...").start(),
|
|
163
|
-
Exemplar clone complete: ${s} -> ${i} (not published; re-run with --publish).`));return}if(!l)throw Error(`Refusing to publish ${i}: metadata reindex did not fully succeed, so .nemar/metadata.json may still carry the source dataset's real identity. Re-run 'nemar admin reindex ${i}' until it succeeds, then 'nemar admin publish request/approve ${i}' to publish manually.`);let f=5,m=300000,p=w("Requesting publication...").start(),g=!1;for(let _=1;_<=f;_++)try{await zc(i),g=!0;break}catch(
|
|
162
|
+
`)),t.keys.length>0){let _=w("Verifying copied data...").start(),S=await Us(Nd,`${i}/objects/`,Mo),C=BG(t.keys,S);if(C.length>0){let j=`${C.length} of ${t.keys.length} objects missing at s3://${Nd}/${i}/objects/. Re-run the copy phase before finalizing.`;throw _.fail(j),Error(j)}_.succeed(`Verified ${t.keys.length} objects present`);let D=await Kc(n,"nemar-s3-dev");if(D!==o){let j=`nemar-s3-dev uuid drifted (prepare=${o} now=${D}). Aborting before registering keys against the wrong remote.`;throw console.error(u.red(j)),Error(j)}let O=w("Registering files in git-annex...").start(),F=await Xm(n,t.keys,o);if(F.failed>0){let j=`${F.failed} of ${t.keys.length} git-annex key registrations failed. Re-run finalize to retry.`;throw O.fail(j),Error(j)}O.succeed(`Registered ${F.success} files in git-annex`);let M=w("Pushing git-annex branch...").start(),k=await tr(n,"origin");if(!k.success){let j=`Failed to push git-annex branch: ${k.error}`;throw M.fail(j),Error(j)}if(k.warning){let j=`git-annex branch push failed: ${k.warning}`;throw M.fail(j),Error(j)}M.succeed("Pushed git-annex branch")}let a=!1,c=w("Deploying CI workflows...").start();try{await Ai(i),c.succeed("CI workflows deployed (BIDS validation, LLM enrichment, archive generation)"),a=!0}catch(_){let S=_ instanceof Error?_.message:String(_);c.fail(`CI deployment failed: ${S}`),console.log(u.dim(` After fixing the deploy failure, run 'nemar admin ci add ${i}'.`))}if(a){let _=w("Waiting for BIDS validation run to register...").start(),S=await sh(i,_);if(S.kind==="found")_.succeed("BIDS validation run registered");else if(S.kind==="timeout")_.warn("BIDS validation run did not register within 120s; continuing (ci_check retries at approval).");else{let C=S.lastError instanceof Error?S.lastError.message:String(S.lastError);_.fail(`BIDS validation polls failed: ${C}`)}}let l=!1,d=w("Refreshing metadata + LLM enrichment...").start();try{let _=await qc(i),S=_.enrichment?.status==="ok",C=_.sync?.metadata_columns_written===!0;if(l=S&&C,l)d.succeed("Refreshed enrichment + metadata columns");else d.warn(`Partial reindex (run 'nemar admin reindex ${i}' to retry)`)}catch(_){let S=_ instanceof Error?_.message:String(_);d.warn(`Reindex failed (non-fatal): ${S}`)}if(!r.publish){console.log(u.green(`
|
|
163
|
+
Exemplar clone complete: ${s} -> ${i} (not published; re-run with --publish).`));return}if(!l)throw Error(`Refusing to publish ${i}: metadata reindex did not fully succeed, so .nemar/metadata.json may still carry the source dataset's real identity. Re-run 'nemar admin reindex ${i}' until it succeeds, then 'nemar admin publish request/approve ${i}' to publish manually.`);let f=5,m=300000,p=w("Requesting publication...").start(),g=!1;for(let _=1;_<=f;_++)try{await zc(i),g=!0;break}catch(S){let C=S instanceof Error?S.message:String(S);if(!C.includes("BIDS validation is currently running")){let D=`Failed to request publication: ${C}`;throw p.fail(D),Error(D)}if(_===f){let D=`BIDS validation still running after ${f} attempts. Re-run 'nemar admin publish request/approve ${i}' once validation completes.`;throw p.fail(D),Error(D)}p.text=`Waiting for BIDS validation to complete... (attempt ${_}/${f})`,await new Promise((D)=>setTimeout(D,m))}if(g)p.succeed("Publication requested");let y=w("Approving publication (sandbox DOI)...").start(),x=10,v=!1;for(let _=1;_<=x;_++)try{await Hc(i,_>1,!0),v=!0;break}catch(S){let C=S instanceof Error?S.message:String(S);if(_<x)y.text=`Approving publication... (attempt ${_+1}/${x})`,await new Promise((D)=>setTimeout(D,3000));else{let D=`Failed to approve publication after ${x} attempts: ${C}`;throw y.fail(D),Error(D)}}if(v)y.succeed("Publication approved (sandbox DOI)");console.log(u.green(`
|
|
164
164
|
Exemplar clone + publish complete: ${s} -> ${i}`)),console.log(u.dim(` GitHub: https://github.com/${Td}/${i}`))}async function J5e(e){let t=await jG(e.xxId,e.sourceId,{workDir:e.workDir,name:e.name,description:e.description}),r=await MG(t,{includeDerived:e.includeDerived});await LG(t,r,{publish:e.publish})}var Td="nemarDatasets",RG="nemar",Nd="nemar-dev",Mo="us-east-2",AG=16,nw,iw,Y5e="annex-uuid";var ow=A(()=>{He();nn();Mc();er();Dd();Ms();Pi();Ut();Bs();Ls();oh();th();nw=/^xx0999\d{2}$/,iw=/^(nm|on)\d{6}$/});var pY,Urt;var mY=A(()=>{pY=["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"],Urt=new Set(pY)});function Tw(e){return e.replace(/^(doi:|https?:\/\/(dx\.)?doi\.org\/)/i,"").trim()}function hY(e){let t=e.split(",").map((r)=>r.trim());if(t.length>=2)return{name:e,familyName:t[0],givenName:t.slice(1).join(", ")};return{name:e}}var gY=A(()=>{mY()});var SY={};ji(SY,{discoverOrcidsFromReferencedDois:()=>R9e,extractDoisFromBids:()=>vY,extractDoisFromRelatedIdentifiers:()=>S9e,matchCreatorsToAuthors:()=>EY,mergeOrcidDiscoveries:()=>F9e,queryCrossrefDoi:()=>wY,queryDataCiteDoi:()=>DY});function vY(e){let t=[],r=new Set,n=(i,s)=>{let o=Tw(i).trim();if(bY.test(o)&&!r.has(o))r.add(o),t.push({doi:o,source:s})};if(Array.isArray(e.SourceDatasets))for(let i of e.SourceDatasets){if(!i||typeof i!=="object")continue;let s=i;if(typeof s.DOI==="string")n(s.DOI,"SourceDatasets");else if(typeof s.URL==="string"){let o=s.URL.match(/(?:doi\.org\/|doi:)(10\.\d{4,}\/.+)/);if(o)n(o[1],"SourceDatasets")}}if(Array.isArray(e.ReferencesAndLinks))for(let i of e.ReferencesAndLinks){if(typeof i!=="string"||!i)continue;let s=i.match(/(?:doi\.org\/|^)(10\.\d{4,}\/[^\s]+)/);if(s)n(s[1],"ReferencesAndLinks")}if(typeof e.HowToAcknowledge==="string"){let s=e.HowToAcknowledge.matchAll(/(?:doi\.org\/|(?<=\s|^))(10\.\d{4,}\/[^\s,)]+)/g);for(let o of s)n(o[1].replace(/[.;:]+$/,""),"HowToAcknowledge")}return t}function S9e(e,t){let r=[];for(let n of e){if(!n||typeof n.identifier!=="string")continue;if(n.identifier_type!=="DOI")continue;let i=Tw(n.identifier).trim();if(bY.test(i)&&!t.has(i))t.add(i),r.push({doi:i,source:"RelatedIdentifiers"})}return r}function _Y(e,t,r){let n=r instanceof Error?r.message:String(r);if(n.includes("AbortError")||n.includes("timeout")||n.includes("fetch"))console.warn(`[orcid-discovery] ${e} query failed for ${t}: ${n}`);else console.error(`[orcid-discovery] Unexpected error querying ${e} for ${t}:`,r)}async function DY(e){try{let t=await fetch(`${$9e}/${encodeURIComponent(e)}`,{headers:{Accept:"application/vnd.datacite.datacite+json"},signal:AbortSignal.timeout(1e4)});if(!t.ok){if(t.status!==404)console.warn(`[orcid-discovery] DataCite returned HTTP ${t.status} for ${e}`);return null}let r=await t.json();return{doi:e,creators:Array.isArray(r.creators)?r.creators:[]}}catch(t){return _Y("DataCite",e,t),null}}async function wY(e){try{let t=await fetch(`https://api.crossref.org/works/${encodeURIComponent(e)}`,{headers:{Accept:"application/json","User-Agent":"NEMAR/1.0 (https://nemar.org; mailto:nemar@ucsd.edu)"},signal:AbortSignal.timeout(1e4)});if(!t.ok){if(t.status!==404)console.warn(`[orcid-discovery] Crossref returned HTTP ${t.status} for ${e}`);return null}let n=(await t.json()).message?.author;if(!Array.isArray(n)||n.length===0)return null;let i=n.map((s)=>{let o=[];if(s.ORCID)o.push({nameIdentifier:s.ORCID,nameIdentifierScheme:"ORCID"});return{name:s.family&&s.given?`${s.family}, ${s.given}`:s.name||s.family||"",givenName:s.given,familyName:s.family,nameIdentifiers:o,affiliation:(s.affiliation||[]).filter((a)=>a.name)}}).filter((s)=>s.name.trim()!=="");return{doi:e,creators:i}}catch(t){return _Y("Crossref",e,t),null}}async function C9e(e){let t=await DY(e),r=await wY(e);if(!t)return r;if(!r)return t;for(let n of t.creators){if(n.nameIdentifiers?.some((a)=>a.nameIdentifierScheme==="ORCID")||!n.familyName)continue;let o=r.creators.find((a)=>a.familyName&&Kr(a.familyName)===Kr(n.familyName))?.nameIdentifiers?.find((a)=>a.nameIdentifierScheme==="ORCID");if(o)n.nameIdentifiers=[...n.nameIdentifiers??[],o]}return t}function Kr(e){return e.normalize("NFD").replace(/\p{Diacritic}/gu,"").replace(/\./g,"").toLowerCase().trim()}function yY(e){if(!e)return"";return Kr(e).charAt(0)}function EY(e,t){let r=[],n=new Set,i=new Set,s=t.map((o)=>({original:o,parsed:hY(o)}));for(let o=0;o<e.length;o++){if(i.has(o))continue;let a=e[o],c=Kr(a.name);for(let l of s){if(n.has(l.original))continue;if(Kr(l.original)===c){r.push({bidsAuthor:l.original,matchedCreator:a,confidence:"exact"}),n.add(l.original),i.add(o);break}if(l.parsed.familyName&&l.parsed.givenName){if(Kr(`${l.parsed.givenName} ${l.parsed.familyName}`)===c){r.push({bidsAuthor:l.original,matchedCreator:a,confidence:"exact"}),n.add(l.original),i.add(o);break}}if(a.givenName&&a.familyName){let d=Kr(`${a.givenName} ${a.familyName}`);if(Kr(l.original)===d){r.push({bidsAuthor:l.original,matchedCreator:a,confidence:"exact"}),n.add(l.original),i.add(o);break}}}}for(let o=0;o<e.length;o++){if(i.has(o))continue;let a=e[o];if(!a.familyName)continue;let c=Kr(a.familyName),l=yY(a.givenName);for(let d of s){if(n.has(d.original))continue;if(!d.parsed.familyName)continue;if(Kr(d.parsed.familyName)!==c)continue;let m=yY(d.parsed.givenName);if(m&&l&&m===l){r.push({bidsAuthor:d.original,matchedCreator:a,confidence:"high"}),n.add(d.original),i.add(o);break}}}for(let o=0;o<e.length;o++){if(i.has(o))continue;let a=e[o];if(!a.familyName)continue;let c=Kr(a.familyName);for(let l of s){if(n.has(l.original))continue;if(!l.parsed.familyName)continue;if(Kr(l.parsed.familyName)===c){r.push({bidsAuthor:l.original,matchedCreator:a,confidence:"medium"}),n.add(l.original),i.add(o);break}}}return r}function F9e(e,t){let r={...e};for(let[n,i]of Object.entries(t))r[n]={...r[n],orcid:i.orcid,affiliations:i.affiliations??r[n]?.affiliations};return r}async function R9e(e,t,r){let n=vY(e);if(r?.length)n.push(...r);if(n.length===0)return{discoveries:{},unresolvedDois:[],totalDoisQueried:0};let i=Array.isArray(e.Authors)?e.Authors.filter((d)=>typeof d==="string"):[];if(i.length===0)return{discoveries:{},unresolvedDois:[],totalDoisQueried:n.length};let s=new Set;if(t){for(let[d,f]of Object.entries(t))if(f.orcid)s.add(d)}let o=i.filter((d)=>!s.has(d));if(o.length===0)return{discoveries:{},unresolvedDois:[],totalDoisQueried:n.length};let a=[],c=new Map;for(let d=0;d<n.length;d+=xY){let f=n.slice(d,d+xY),m=await Promise.all(f.map((p)=>C9e(p.doi)));for(let p=0;p<f.length;p++)if(m[p])c.set(f[p].doi,m[p]?.creators??[]);else a.push(f[p].doi)}let l={};for(let[d,f]of c){let m=f.filter((g)=>g.nameIdentifiers?.some((y)=>y.nameIdentifierScheme==="ORCID"));if(m.length===0)continue;let p=EY(m,o);for(let g of p){if(l[g.bidsAuthor])continue;let y=g.matchedCreator.nameIdentifiers.find((_)=>_.nameIdentifierScheme==="ORCID");if(!y)continue;let x=y.nameIdentifier.replace(/^https?:\/\/orcid\.org\//i,"").trim();if(!E9e.test(x))continue;let v=g.matchedCreator.affiliation?.filter((_)=>_.name).map((_)=>({name:_.name,..._.affiliationIdentifier&&{identifier:_.affiliationIdentifier},..._.affiliationIdentifierScheme&&{scheme:_.affiliationIdentifierScheme}}));l[g.bidsAuthor]={orcid:x,affiliations:v?.length?v:void 0,sourceDoi:d,confidence:g.confidence}}}return{discoveries:l,unresolvedDois:a,totalDoisQueried:n.length}}var bY,E9e,$9e="https://api.datacite.org/application/vnd.datacite.datacite+json",xY=5;var $Y=A(()=>{gY();bY=/^10\.\d{4,}\/[^\s]+$/,E9e=/^\d{4}-\d{4}-\d{4}-[\dX]{4}$/});He();var y1=ne(g1(),1),{program:J7e,createCommand:X7e,createArgument:Q7e,createOption:Z7e,CommanderError:eqe,InvalidArgumentError:tqe,InvalidOptionArgumentError:rqe,Command:ge,Argument:nqe,Option:au,Help:iqe}=y1.default;var b1=process.argv.includes("--help-all");if(process.argv.includes("--no-color"))u.level=0;var x1=process.argv.indexOf("--help-all");if(x1!==-1)process.argv[x1]="--help";var cu=ge.prototype.addHelpText,v1=`
|
|
165
165
|
Run with --help-all for examples and detailed descriptions.
|
|
166
166
|
`,Yd=new WeakSet;ge.prototype.addHelpText=function(e,t){if(e==="after"||e==="afterAll"){if(b1)return cu.call(this,e,t);if(!Yd.has(this))return Yd.add(this),cu.call(this,e,v1);return this}return cu.call(this,e,t)};var PX={formatHelp(e,t){let r=t.padWidth(e,t),n=t.helpWidth??80,i=2,s=2;function o(g,y,x){if(x){let v=" ".repeat(Math.max(0,r+2-g.length)),_=`${y}${v}${x}`;return t.wrap(_,n-2,r+2)}return y}function a(g){return g.join(`
|
|
@@ -244,7 +244,7 @@ Deploy CI workflows to: ${e}
|
|
|
244
244
|
`)),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)"),r)console.log(u.dim(" (post-deploy parseability poll disabled via --no-validate)"));console.log();let n=await Re(`Deploy CI workflows to ${e}?`,t);if(n!=="confirmed"){console.log(u.dim(n==="declined"?"Skipped":"Cancelled"));return}let i=w(`Deploying CI workflows to ${e}...`).start(),s;try{s=await Ai(e)}catch(o){Je(o,i,"Failed to deploy CI workflows",{404:"Dataset not found"});return}i.succeed("CI workflows deployed"),console.log();for(let o of s.workflows_deployed)console.log(` ${u.green("[x]")} ${o}`);if(!r){let o=w("Verifying GitHub Actions can parse the workflows...").start(),a=await Q5e(e);if(!a)o.warn("Could not verify workflow parseability (deploy succeeded)");else if(a.missing.length===0&&a.errors.length===0)o.succeed("All workflows parseable by GitHub Actions");else{let c=a.missing.length>0?"Some workflows missing from GitHub Actions listing":"Could not fully verify workflow parseability (GitHub API error)";o.warn(c),KG(a)}}console.log()});qd.command("validate").description("Check whether GitHub Actions can parse the deployed CI workflows").argument("<dataset-id>","Dataset ID (e.g., nm000104)").action(async(e)=>{if(!se())return;let t=w(`Validating CI workflows for ${e}...`).start();try{let r=await aD(e);if(r.missing.length===0&&r.errors.length===0)t.succeed(`All ${r.valid.length} workflows parseable by GitHub Actions`);else t.warn("Some workflows missing or unreadable"),KG({missing:r.missing,errors:r.errors})}catch(r){Je(r,t,"Failed to validate CI workflows",{404:"Dataset not found"})}});qd.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(Oe,Ae).option(je,Te).action(async(e,t)=>{if(!se())return;if(t.all){let n=w("Fetching dataset list...").start(),i;try{if(i=(await Uc({limit:1000})).datasets,n.succeed(`Found ${i.length} datasets`),i.length>=1000)console.log(u.yellow("Warning: reached 1000 dataset limit; some datasets may be skipped"))}catch(l){Je(l,n,"Failed to fetch datasets");return}console.log(u.cyan(`
|
|
245
245
|
Sync CI templates across ${i.length} datasets (writes only diffs)
|
|
246
246
|
`));let s=await Re(`Sync templates on all ${i.length} datasets?`,t);if(s!=="confirmed"){console.log(u.dim(s==="declined"?"Skipped":"Cancelled"));return}let o=0,a=0,c=0;for(let l of i){let d=w(`Syncing ${l.dataset_id}...`).start();try{let f=await cD(l.dataset_id),m=f.changed.length+f.added.length;if(f.errors.length>0)d.warn(`${l.dataset_id}: ${m} updated, ${f.errors.length} error(s)`),c++;else if(m===0)d.succeed(`${l.dataset_id}: up to date`),o++;else{let p=[];if(f.added.length>0)p.push(`+${f.added.length} added`);if(f.changed.length>0)p.push(`~${f.changed.length} updated`);d.succeed(`${l.dataset_id}: ${p.join(", ")}`),a++}}catch(f){let m=f instanceof q?f.message:String(f);d.fail(`${l.dataset_id}: ${m}`),c++}}console.log(),console.log(u.cyan(`Done: ${o} up-to-date, ${a} updated, ${c} with errors`));return}if(!e){console.error(u.red("Error: dataset-id is required (or use --all)"));return}let r=w(`Syncing CI templates for ${e}...`).start();try{let n=await cD(e),i=n.changed.length+n.added.length;if(n.errors.length>0)r.warn(`${e}: ${n.errors.length} error(s)`);else if(i===0)r.succeed(`${e}: already up to date`);else r.succeed(`${e}: synced`);if(console.log(),console.log(` ${u.dim("Checked:")} ${n.checked.join(", ")}`),n.added.length>0)console.log(` ${u.green("Added:")} ${n.added.join(", ")}`);if(n.changed.length>0)console.log(` ${u.yellow("Updated:")} ${n.changed.join(", ")}`);if(!n.committed&&i>0&&n.errors.length===0)console.log(` ${u.yellow("Note:")} listed changes were not committed`);if(n.list_failed)console.log(` ${u.red("Warning:")} workflow directory listing failed; presence is unknown`);if(n.errors.length>0){console.log(` ${u.red("Errors:")}`);for(let s of n.errors)console.log(` - ${s}`)}console.log()}catch(n){Je(n,r,"Failed to sync CI templates",{404:"Dataset not found"})}});Se.addCommand(qd);var jd=new ge("doi").description("DOI management");jd.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(Oe,Ae).option(je,Te).action(async(e,t)=>{if(!se())return;let r=w("Fetching dataset info...").start(),n;try{n=await gt(e),r.succeed(`Found dataset: ${n.name}`)}catch(c){if(c instanceof q){if(r.fail(c.message),c.statusCode===404)console.log(u.dim(" Dataset not found"))}else r.fail("Failed to fetch dataset");return}try{let c=await _d(e);if(c.concept_doi){if(console.log(u.yellow(`
|
|
247
|
-
Dataset already has a concept DOI:`)),console.log(` Concept DOI: ${u.cyan(c.concept_doi)}`),c.zenodo_concept_url)console.log(` Zenodo URL: ${c.zenodo_concept_url}`);return}}catch(c){if(process.env.DEBUG)console.error("[debug] DOI info fetch:",c)}if(console.log(),console.log(u.cyan("Dataset Information:")),console.log(` ID: ${n.dataset_id}`),console.log(` Name: ${n.name}`),n.github_repo)console.log(` GitHub: ${n.github_repo}`);if(t.sandbox)console.log(` Mode: ${u.yellow("SANDBOX (test DOI)")}`);console.log();let i=t.provider==="zenodo"?"zenodo":"ezid";if(t.sandbox){if(console.log(u.yellow("\u2501".repeat(60))),console.log(u.yellow.bold(" SANDBOX MODE ENABLED")),console.log(u.yellow("\u2501".repeat(60))),i==="zenodo")console.log(u.yellow(" \u2022 Using Zenodo sandbox (sandbox.zenodo.org)"));else console.log(u.yellow(" \u2022 Using EZID test shoulder (doi:10.5072/FK2)")),console.log(u.yellow(" \u2022 Test DOIs auto-delete after 2 weeks"));console.log(u.yellow(" \u2022 DOI will NOT be indexed by DataCite")),console.log(u.yellow(" \u2022 DOI will NOT resolve in production")),console.log(u.yellow(" \u2022 Use this for testing workflows only")),console.log(u.yellow("\u2501".repeat(60))),console.log()}console.log(u.red("WARNING: DOIs are PERMANENT and cannot be deleted!")),console.log(u.dim("The DOI will be pre-reserved but not published until the first version release.")),console.log(` Provider: ${u.cyan(i.toUpperCase())}`),console.log();let s=t.sandbox?`Create TEST concept DOI via ${i.toUpperCase()} SANDBOX?`:`Create PERMANENT concept DOI via ${i.toUpperCase()} PRODUCTION?`,o=await Re(s,t);if(o!=="confirmed"){console.log(u.dim(o==="declined"?"Skipped":"Cancelled"));return}let a=w(`Creating concept DOI via ${i.toUpperCase()}...`).start();try{let c=await Nz(e,{title:t.title,description:t.description,sandbox:t.sandbox,provider:i});a.succeed("Concept DOI created successfully");let l=w("Finalizing repository setup...").start();try{let d=await qm(e);if(d.warnings&&d.warnings.length>0){l.warn("Repository setup finalized with warnings");for(let f of d.warnings)console.log(u.yellow(` Warning: ${f}`))}else l.succeed("Repository setup finalized")}catch(d){if(l.warn("Could not finalize repository setup"),d instanceof q){if(console.log(u.dim(` ${d.message}`)),d.statusCode===403)console.log(u.dim(" Check admin credentials and permissions"))}else console.log(u.dim(` ${d instanceof Error?d.message:"Unknown error"}`))}if(console.log(),console.log(u.green("DOI Information:")),console.log(` Concept DOI: ${u.cyan(c.concept_doi)}`),console.log(` Provider: ${c.provider.toUpperCase()}`),c.provider==="ezid")console.log(` DOI URL: ${c.doi_url}`),console.log(` EZID ID: ${c.ezid_identifier}`);else console.log(` Zenodo URL: ${c.zenodo_url}`);if(c.metadata_warning)console.log(u.yellow(` Warning: ${c.metadata_warning}`));if(console.log(),console.log(u.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(),t.sandbox)console.log(u.dim("Note: This is a sandbox DOI and will not resolve in production."))}catch(c){if(c instanceof q){if(a.fail(c.message),c.statusCode===403)console.log(u.dim(" This command requires admin privileges"))}else a.fail("Failed to create concept DOI"),console.log(u.dim(` ${V(c)}`))}});jd.command("info").description("Get DOI info for a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").action(async(e)=>{if(!se())return;let t=w("Fetching DOI info...").start();try{let r=await _d(e);if(t.stop(),console.log(),console.log(u.cyan(`DOI Information for ${e}:`)),console.log(` Dataset Name: ${r.name}`),console.log(),r.concept_doi){if(console.log(u.green("Concept DOI:")),console.log(` DOI: ${r.concept_doi}`),console.log(` URL: https://doi.org/${r.concept_doi}`),console.log(` Provider: ${(r.doi_provider||"zenodo").toUpperCase()}`),r.doi_provider==="ezid"){if(r.ezid_identifier)console.log(` EZID ID: ${r.ezid_identifier}`);if(r.ezid_status){let n=r.ezid_status==="public"?u.green:u.yellow;console.log(` Status: ${n(r.ezid_status)}`)}}if(r.zenodo_concept_url){if(console.log(` Zenodo: ${r.zenodo_concept_url}`),r.zenodo_concept_url.includes("sandbox.zenodo.org"))console.log(),console.log(u.yellow("Mode: SANDBOX (test DOI)")),console.log(u.yellow(" This DOI is not indexed by DataCite and will not resolve in production"))}}else console.log(u.yellow("No concept DOI created yet")),console.log(u.dim(" Use 'nemar admin doi create' to create one"));if(console.log(),r.latest_version_doi)console.log(u.green("Latest Version DOI:")),console.log(` DOI: ${r.latest_version_doi}`),console.log(` URL: https://doi.org/${r.latest_version_doi}`);else if(r.concept_doi)console.log(u.yellow("No version DOI published yet")),console.log(u.dim(" Version DOIs are created automatically on PR merge"))}catch(r){if(r instanceof q){if(t.fail(r.message),r.statusCode===404)console.log(u.dim(" Dataset not found"));else if(r.statusCode===403)console.log(u.dim(" This command requires admin privileges"))}else t.fail("Failed to fetch DOI info")}});jd.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("--unavailable","Tombstone the concept DOI (EZID _status=unavailable); concept-only, reversible via --make-public. For a full withdrawal (visibility + every version DOI) use 'nemar admin withdraw' instead.").option("--refresh","Refresh metadata from dataset_description.json and .nemar/metadata.json").option(Oe,Ae).option(je,Te).action(async(e,t)=>{if(!se())return;if(t.makePublic&&t.unavailable){console.log(u.red("Use --make-public or --unavailable, not both."));return}if(!t.makePublic&&!t.unavailable&&!t.refresh){console.log(u.yellow("No action specified. Use --make-public, --unavailable, and/or --refresh."));return}if(t.makePublic){console.log(u.red("WARNING: Making a DOI public is PERMANENT!")),console.log(u.dim(" The DOI will be findable in DataCite and cannot be reverted.")),console.log();let n=await Re(`Make DOI for ${e} PUBLIC and permanent?`,t);if(n!=="confirmed"){console.log(u.dim(n==="declined"?"Skipped":"Cancelled"));return}}if(t.unavailable){console.log(u.yellow("This tombstones the concept DOI (EZID _status=unavailable).")),console.log(u.dim(" Reversible with --make-public. Version DOIs are untouched.")),console.log();let n=await Re(`Mark DOI for ${e} unavailable (tombstone)?`,t);if(n!=="confirmed"){console.log(u.dim(n==="declined"?"Skipped":"Cancelled"));return}}let r=w("Updating DOI...").start();try{let n=await uD(e,{status:t.makePublic?"public":t.unavailable?"unavailable":void 0,refresh_metadata:t.refresh});r.succeed("DOI updated successfully"),console.log(),console.log(` EZID ID: ${u.cyan(n.ezid_identifier)}`),console.log(` Status: ${n.status==="public"?u.green(n.status):u.yellow(n.status)}`),console.log(` URL: ${n.doi_url}`)}catch(n){if(n instanceof q){if(r.fail(n.message),n.statusCode===400)console.log(u.dim(" DOI update is only supported for EZID-managed DOIs"))}else r.fail("Failed to update DOI"),console.log(u.dim(` ${V(n)}`))}});jd.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(Oe,Ae).option(je,Te).action(async(e,t)=>{if(!se())return;let r=w("Fetching dataset and existing enrichment...").start(),n;try{n=await gt(e),r.succeed(`Dataset: ${n.name}`)}catch(p){if(p instanceof q)r.fail(p.message);else r.fail("Failed to fetch dataset");return}let i,s=!1;try{i=await _d(e)}catch(p){if(p instanceof q&&p.statusCode===404);else s=!0,console.log(u.yellow(` Warning: Could not fetch DOI info: ${V(p)}`))}if(i?.concept_doi)console.log(` DOI: ${u.cyan(i.concept_doi)}`);let o={version:"2.0"};if(n.github_repo){let p=w("Reading existing metadata...").start(),g=await UG(n.github_repo,".nemar/metadata.json");if(g)try{let y=JSON.parse(g);if(y&&typeof y==="object"&&y.version==="2.0")o=y,p.succeed(`Loaded existing metadata (stage: ${y.pipeline_stage||"unknown"})`);else p.warn("Existing metadata has unsupported version, starting fresh")}catch(y){p.warn(`Could not parse existing metadata (${y instanceof Error?y.message:String(y)}), starting fresh`)}else p.info("No existing .nemar/metadata.json found, starting fresh")}if(t.llm!==!1&&n.github_repo){console.log(),console.log(u.cyan("--- Running LLM enrichment pipeline (CI workflow) ---"));let p=w("Triggering run-enrichment workflow...").start();try{let{spawn:g}=awaitPromise.resolve(globalThis.Bun),y=n.github_repo,x="nemarDatasets/.github",v="run-enrichment.yml",_=g({cmd:["gh","workflow","run","run-enrichment.yml","--repo","nemarDatasets/.github","--ref","main","-f",`dataset_id=${e}`,"-f","ref=main","-f","force=true"],stdout:"pipe",stderr:"pipe"}),E=await new Response(_.stderr).text();if(await _.exited!==0)throw Error(`Failed to trigger workflow: ${E.trim()}`);p.text="Waiting for workflow to register...",await new Promise((k)=>setTimeout(k,3000)),p.text="Polling workflow status...";let D=60,O="",F=0;for(let k=0;k<D;k++){let j=g({cmd:["gh","run","list","--repo","nemarDatasets/.github","--workflow","run-enrichment.yml","-L","10","--json","databaseId,status,conclusion,displayTitle,event"],stdout:"pipe",stderr:"pipe"}),Z=await new Response(j.stdout).text(),_e=await new Response(j.stderr).text();if(await j.exited!==0){if(F++,F>=3){p.warn(`gh CLI error: ${_e.trim()}`);break}await new Promise((Me)=>setTimeout(Me,5000));continue}try{let Me=JSON.parse(Z.trim());F=0;let T=Me.find((B)=>B.event==="workflow_dispatch");if(T){if(T.status==="completed"){O=T.conclusion||"unknown";break}p.text=`Workflow ${T.status}... (${k*5}s)`}}catch(Me){if(F++,F>=3){p.warn(`Unable to parse workflow status: ${Me instanceof Error?Me.message:String(Me)} (raw: ${Z.trim().slice(0,200)})`);break}}await new Promise((Me)=>setTimeout(Me,5000))}let M=!1;if(!O)p.warn("Workflow timed out after 5 minutes (may still be running)");else if(O==="success"){p.succeed("LLM enrichment workflow completed successfully");let k=await UG(y,".nemar/metadata.json");if(k)try{let j=JSON.parse(k);if(j&&typeof j==="object"&&j.version==="2.0"){Object.assign(o,j),M=!0;let Z=j.pipeline_stage||"unknown";if(console.log(u.dim(` Pipeline stage: ${Z}`)),o.authors){let _e=Object.keys(o.authors).length;console.log(u.dim(` Authors: ${_e}`))}}}catch(j){console.log(u.yellow(` Warning: Could not parse updated metadata: ${j instanceof Error?j.message:String(j)}`)),console.log(u.dim(" Using pre-workflow enrichment data"))}else console.log(u.yellow(" Warning: Could not fetch updated metadata after successful workflow.")),console.log(u.dim(" Author data below may be from a previous run."))}else p.fail(`LLM enrichment workflow failed (conclusion: ${O})`);if(!M)console.log(u.yellow(" ORCID discovery did not complete. Authors below may be from previous metadata."))}catch(g){p.fail("LLM enrichment pipeline failed"),console.log(u.dim(` ${V(g)}`)),console.log(u.yellow(" ORCID discovery did not run. You will need to enter ORCIDs manually."))}}console.log(),console.log(u.cyan("--- Author ORCIDs ---"));let a=o.authors||{},c=Object.keys(a);if(c.length>0){let p=c.filter((y)=>a[y]?.orcid),g=c.filter((y)=>!a[y]?.orcid);console.log(u.dim(` Discovered ${c.length} authors from pipeline:`));for(let y of p)console.log(u.green(` [x] ${y}: ${a[y]?.orcid}`));for(let y of g)console.log(u.yellow(` [ ] ${y}: no ORCID found`));if(g.length>0)console.log(u.dim(` ${g.length} author(s) missing ORCIDs.`))}let{updateAuthors:l}=await X.prompt([{type:"confirm",name:"updateAuthors",message:c.length>0?"Add or correct author ORCIDs?":"Add author ORCIDs manually?",default:!1}]);if(l){let p={},g=!0;while(g){let{authorName:y}=await X.prompt([{type:"input",name:"authorName",message:'Author name (as in BIDS, e.g., "Shirazi, Yahya"):'}]);if(!y)break;let x=a[y];if(x?.orcid)console.log(u.dim(` Current ORCID: ${x.orcid}`));let{orcid:v}=await X.prompt([{type:"input",name:"orcid",message:`ORCID for "${y}" (Enter to ${x?.orcid?"keep current":"skip"}):`,validate:(D)=>{if(!D)return!0;return Pm.test(D)||"Invalid ORCID format (XXXX-XXXX-XXXX-XXXX)"}}]),_={};if(v)_.orcid=v;let{affiliation:E}=await X.prompt([{type:"input",name:"affiliation",message:`Affiliation for "${y}" (optional):`}]);if(E)_.affiliations=[{name:E}];if(_.orcid||_.affiliations)p[y]=_;let{more:C}=await X.prompt([{type:"confirm",name:"more",message:"Add another author?",default:!0}]);g=C}if(Object.keys(p).length>0){let y={...o.authors||{}};for(let[x,v]of Object.entries(p)){let _=y[x]||{};y[x]={..._,...v,orcid:v.orcid||_.orcid}}o.authors=y}}console.log(),console.log(u.cyan("--- Dataset stats ---"));let d=w("Computing dataset sizes and formats...").start();try{let p=await dH(e),g=et(p.total_size);o.sizes=[`${g} (${p.file_count} files)`],o.formats=p.extensions,d.succeed(`Sizes: ${g} (${p.file_count} files), Formats: ${p.extensions.join(", ")}`)}catch(p){d.warn("Could not compute dataset stats"),console.log(u.dim(` ${V(p)}`))}console.log(),console.log(u.cyan("--- Review ---")),console.log(JSON.stringify(o,null,2)),console.log();let f=await Re("Commit to repo and refresh DOI?",t,!0);if(f!=="confirmed"){console.log(u.dim(f==="declined"?"Skipped":"Cancelled"));return}let m=w("Saving enrichment...").start();try{let p=await kH(e,o);if(m.succeed(p.message),p.bidsignore_updated)console.log(u.dim(" .bidsignore updated to include .nemar/"));if(!i&&s)try{i=await _d(e)}catch(g){if(process.env.DEBUG)console.error("[debug] DOI info re-fetch:",g)}if(i?.ezid_identifier){let g=w("Refreshing DOI metadata...").start();try{await uD(e,{refresh_metadata:!0}),g.succeed("DOI metadata refreshed")}catch(y){g.warn("Could not refresh DOI metadata"),console.log(u.dim(` ${V(y)}`))}}else if(s)console.log(u.yellow(" DOI refresh skipped: could not verify DOI exists. Run 'nemar admin doi update --refresh' manually."))}catch(p){if(p instanceof q)m.fail(p.message);else m.fail("Failed to save enrichment"),console.log(u.dim(` ${V(p)}`))}});Se.addCommand(jd);var uh=new ge("publish").description("Publication workflow management");uh.command("list").description("List publication requests").option("-s, --status <status>","Filter by status (requested, approving, published, denied)").addHelpText("after",`
|
|
247
|
+
Dataset already has a concept DOI:`)),console.log(` Concept DOI: ${u.cyan(c.concept_doi)}`),c.zenodo_concept_url)console.log(` Zenodo URL: ${c.zenodo_concept_url}`);return}}catch(c){if(process.env.DEBUG)console.error("[debug] DOI info fetch:",c)}if(console.log(),console.log(u.cyan("Dataset Information:")),console.log(` ID: ${n.dataset_id}`),console.log(` Name: ${n.name}`),n.github_repo)console.log(` GitHub: ${n.github_repo}`);if(t.sandbox)console.log(` Mode: ${u.yellow("SANDBOX (test DOI)")}`);console.log();let i=t.provider==="zenodo"?"zenodo":"ezid";if(t.sandbox){if(console.log(u.yellow("\u2501".repeat(60))),console.log(u.yellow.bold(" SANDBOX MODE ENABLED")),console.log(u.yellow("\u2501".repeat(60))),i==="zenodo")console.log(u.yellow(" \u2022 Using Zenodo sandbox (sandbox.zenodo.org)"));else console.log(u.yellow(" \u2022 Using EZID test shoulder (doi:10.5072/FK2)")),console.log(u.yellow(" \u2022 Test DOIs auto-delete after 2 weeks"));console.log(u.yellow(" \u2022 DOI will NOT be indexed by DataCite")),console.log(u.yellow(" \u2022 DOI will NOT resolve in production")),console.log(u.yellow(" \u2022 Use this for testing workflows only")),console.log(u.yellow("\u2501".repeat(60))),console.log()}console.log(u.red("WARNING: DOIs are PERMANENT and cannot be deleted!")),console.log(u.dim("The DOI will be pre-reserved but not published until the first version release.")),console.log(` Provider: ${u.cyan(i.toUpperCase())}`),console.log();let s=t.sandbox?`Create TEST concept DOI via ${i.toUpperCase()} SANDBOX?`:`Create PERMANENT concept DOI via ${i.toUpperCase()} PRODUCTION?`,o=await Re(s,t);if(o!=="confirmed"){console.log(u.dim(o==="declined"?"Skipped":"Cancelled"));return}let a=w(`Creating concept DOI via ${i.toUpperCase()}...`).start();try{let c=await Nz(e,{title:t.title,description:t.description,sandbox:t.sandbox,provider:i});a.succeed("Concept DOI created successfully");let l=w("Finalizing repository setup...").start();try{let d=await qm(e);if(d.warnings&&d.warnings.length>0){l.warn("Repository setup finalized with warnings");for(let f of d.warnings)console.log(u.yellow(` Warning: ${f}`))}else l.succeed("Repository setup finalized")}catch(d){if(l.warn("Could not finalize repository setup"),d instanceof q){if(console.log(u.dim(` ${d.message}`)),d.statusCode===403)console.log(u.dim(" Check admin credentials and permissions"))}else console.log(u.dim(` ${d instanceof Error?d.message:"Unknown error"}`))}if(console.log(),console.log(u.green("DOI Information:")),console.log(` Concept DOI: ${u.cyan(c.concept_doi)}`),console.log(` Provider: ${c.provider.toUpperCase()}`),c.provider==="ezid")console.log(` DOI URL: ${c.doi_url}`),console.log(` EZID ID: ${c.ezid_identifier}`);else console.log(` Zenodo URL: ${c.zenodo_url}`);if(c.metadata_warning)console.log(u.yellow(` Warning: ${c.metadata_warning}`));if(console.log(),console.log(u.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(),t.sandbox)console.log(u.dim("Note: This is a sandbox DOI and will not resolve in production."))}catch(c){if(c instanceof q){if(a.fail(c.message),c.statusCode===403)console.log(u.dim(" This command requires admin privileges"))}else a.fail("Failed to create concept DOI"),console.log(u.dim(` ${V(c)}`))}});jd.command("info").description("Get DOI info for a dataset").argument("<dataset-id>","Dataset ID (e.g., nm000104)").action(async(e)=>{if(!se())return;let t=w("Fetching DOI info...").start();try{let r=await _d(e);if(t.stop(),console.log(),console.log(u.cyan(`DOI Information for ${e}:`)),console.log(` Dataset Name: ${r.name}`),console.log(),r.concept_doi){if(console.log(u.green("Concept DOI:")),console.log(` DOI: ${r.concept_doi}`),console.log(` URL: https://doi.org/${r.concept_doi}`),console.log(` Provider: ${(r.doi_provider||"zenodo").toUpperCase()}`),r.doi_provider==="ezid"){if(r.ezid_identifier)console.log(` EZID ID: ${r.ezid_identifier}`);if(r.ezid_status){let n=r.ezid_status==="public"?u.green:u.yellow;console.log(` Status: ${n(r.ezid_status)}`)}}if(r.zenodo_concept_url){if(console.log(` Zenodo: ${r.zenodo_concept_url}`),r.zenodo_concept_url.includes("sandbox.zenodo.org"))console.log(),console.log(u.yellow("Mode: SANDBOX (test DOI)")),console.log(u.yellow(" This DOI is not indexed by DataCite and will not resolve in production"))}}else console.log(u.yellow("No concept DOI created yet")),console.log(u.dim(" Use 'nemar admin doi create' to create one"));if(console.log(),r.latest_version_doi)console.log(u.green("Latest Version DOI:")),console.log(` DOI: ${r.latest_version_doi}`),console.log(` URL: https://doi.org/${r.latest_version_doi}`);else if(r.concept_doi)console.log(u.yellow("No version DOI published yet")),console.log(u.dim(" Version DOIs are created automatically on PR merge"))}catch(r){if(r instanceof q){if(t.fail(r.message),r.statusCode===404)console.log(u.dim(" Dataset not found"));else if(r.statusCode===403)console.log(u.dim(" This command requires admin privileges"))}else t.fail("Failed to fetch DOI info")}});jd.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("--unavailable","Tombstone the concept DOI (EZID _status=unavailable); concept-only, reversible via --make-public. For a full withdrawal (visibility + every version DOI) use 'nemar admin withdraw' instead.").option("--refresh","Refresh metadata from dataset_description.json and .nemar/metadata.json").option(Oe,Ae).option(je,Te).action(async(e,t)=>{if(!se())return;if(t.makePublic&&t.unavailable){console.log(u.red("Use --make-public or --unavailable, not both."));return}if(!t.makePublic&&!t.unavailable&&!t.refresh){console.log(u.yellow("No action specified. Use --make-public, --unavailable, and/or --refresh."));return}if(t.makePublic){console.log(u.red("WARNING: Making a DOI public is PERMANENT!")),console.log(u.dim(" The DOI will be findable in DataCite and cannot be reverted.")),console.log();let n=await Re(`Make DOI for ${e} PUBLIC and permanent?`,t);if(n!=="confirmed"){console.log(u.dim(n==="declined"?"Skipped":"Cancelled"));return}}if(t.unavailable){console.log(u.yellow("This tombstones the concept DOI (EZID _status=unavailable).")),console.log(u.dim(" Reversible with --make-public. Version DOIs are untouched.")),console.log();let n=await Re(`Mark DOI for ${e} unavailable (tombstone)?`,t);if(n!=="confirmed"){console.log(u.dim(n==="declined"?"Skipped":"Cancelled"));return}}let r=w("Updating DOI...").start();try{let n=await uD(e,{status:t.makePublic?"public":t.unavailable?"unavailable":void 0,refresh_metadata:t.refresh});r.succeed("DOI updated successfully"),console.log(),console.log(` EZID ID: ${u.cyan(n.ezid_identifier)}`),console.log(` Status: ${n.status==="public"?u.green(n.status):u.yellow(n.status)}`),console.log(` URL: ${n.doi_url}`)}catch(n){if(n instanceof q){if(r.fail(n.message),n.statusCode===400)console.log(u.dim(" DOI update is only supported for EZID-managed DOIs"))}else r.fail("Failed to update DOI"),console.log(u.dim(` ${V(n)}`))}});jd.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(Oe,Ae).option(je,Te).action(async(e,t)=>{if(!se())return;let r=w("Fetching dataset and existing enrichment...").start(),n;try{n=await gt(e),r.succeed(`Dataset: ${n.name}`)}catch(p){if(p instanceof q)r.fail(p.message);else r.fail("Failed to fetch dataset");return}let i,s=!1;try{i=await _d(e)}catch(p){if(p instanceof q&&p.statusCode===404);else s=!0,console.log(u.yellow(` Warning: Could not fetch DOI info: ${V(p)}`))}if(i?.concept_doi)console.log(` DOI: ${u.cyan(i.concept_doi)}`);let o={version:"2.0"};if(n.github_repo){let p=w("Reading existing metadata...").start(),g=await UG(n.github_repo,".nemar/metadata.json");if(g)try{let y=JSON.parse(g);if(y&&typeof y==="object"&&y.version==="2.0")o=y,p.succeed(`Loaded existing metadata (stage: ${y.pipeline_stage||"unknown"})`);else p.warn("Existing metadata has unsupported version, starting fresh")}catch(y){p.warn(`Could not parse existing metadata (${y instanceof Error?y.message:String(y)}), starting fresh`)}else p.info("No existing .nemar/metadata.json found, starting fresh")}if(t.llm!==!1&&n.github_repo){console.log(),console.log(u.cyan("--- Running LLM enrichment pipeline (CI workflow) ---"));let p=w("Triggering run-enrichment workflow...").start();try{let{spawn:g}=awaitPromise.resolve(globalThis.Bun),y=n.github_repo,x="nemarDatasets/.github",v="run-enrichment.yml",_=g({cmd:["gh","workflow","run","run-enrichment.yml","--repo","nemarDatasets/.github","--ref","main","-f",`dataset_id=${e}`,"-f","ref=main","-f","force=true"],stdout:"pipe",stderr:"pipe"}),S=await new Response(_.stderr).text();if(await _.exited!==0)throw Error(`Failed to trigger workflow: ${S.trim()}`);p.text="Waiting for workflow to register...",await new Promise((k)=>setTimeout(k,3000)),p.text="Polling workflow status...";let D=60,O="",F=0;for(let k=0;k<D;k++){let j=g({cmd:["gh","run","list","--repo","nemarDatasets/.github","--workflow","run-enrichment.yml","-L","10","--json","databaseId,status,conclusion,displayTitle,event"],stdout:"pipe",stderr:"pipe"}),Z=await new Response(j.stdout).text(),_e=await new Response(j.stderr).text();if(await j.exited!==0){if(F++,F>=3){p.warn(`gh CLI error: ${_e.trim()}`);break}await new Promise((Me)=>setTimeout(Me,5000));continue}try{let Me=JSON.parse(Z.trim());F=0;let T=Me.find((B)=>B.event==="workflow_dispatch");if(T){if(T.status==="completed"){O=T.conclusion||"unknown";break}p.text=`Workflow ${T.status}... (${k*5}s)`}}catch(Me){if(F++,F>=3){p.warn(`Unable to parse workflow status: ${Me instanceof Error?Me.message:String(Me)} (raw: ${Z.trim().slice(0,200)})`);break}}await new Promise((Me)=>setTimeout(Me,5000))}let M=!1;if(!O)p.warn("Workflow timed out after 5 minutes (may still be running)");else if(O==="success"){p.succeed("LLM enrichment workflow completed successfully");let k=await UG(y,".nemar/metadata.json");if(k)try{let j=JSON.parse(k);if(j&&typeof j==="object"&&j.version==="2.0"){Object.assign(o,j),M=!0;let Z=j.pipeline_stage||"unknown";if(console.log(u.dim(` Pipeline stage: ${Z}`)),o.authors){let _e=Object.keys(o.authors).length;console.log(u.dim(` Authors: ${_e}`))}}}catch(j){console.log(u.yellow(` Warning: Could not parse updated metadata: ${j instanceof Error?j.message:String(j)}`)),console.log(u.dim(" Using pre-workflow enrichment data"))}else console.log(u.yellow(" Warning: Could not fetch updated metadata after successful workflow.")),console.log(u.dim(" Author data below may be from a previous run."))}else p.fail(`LLM enrichment workflow failed (conclusion: ${O})`);if(!M)console.log(u.yellow(" ORCID discovery did not complete. Authors below may be from previous metadata."))}catch(g){p.fail("LLM enrichment pipeline failed"),console.log(u.dim(` ${V(g)}`)),console.log(u.yellow(" ORCID discovery did not run. You will need to enter ORCIDs manually."))}}console.log(),console.log(u.cyan("--- Author ORCIDs ---"));let a=o.authors||{},c=Object.keys(a);if(c.length>0){let p=c.filter((y)=>a[y]?.orcid),g=c.filter((y)=>!a[y]?.orcid);console.log(u.dim(` Discovered ${c.length} authors from pipeline:`));for(let y of p)console.log(u.green(` [x] ${y}: ${a[y]?.orcid}`));for(let y of g)console.log(u.yellow(` [ ] ${y}: no ORCID found`));if(g.length>0)console.log(u.dim(` ${g.length} author(s) missing ORCIDs.`))}let{updateAuthors:l}=await X.prompt([{type:"confirm",name:"updateAuthors",message:c.length>0?"Add or correct author ORCIDs?":"Add author ORCIDs manually?",default:!1}]);if(l){let p={},g=!0;while(g){let{authorName:y}=await X.prompt([{type:"input",name:"authorName",message:'Author name (as in BIDS, e.g., "Shirazi, Yahya"):'}]);if(!y)break;let x=a[y];if(x?.orcid)console.log(u.dim(` Current ORCID: ${x.orcid}`));let{orcid:v}=await X.prompt([{type:"input",name:"orcid",message:`ORCID for "${y}" (Enter to ${x?.orcid?"keep current":"skip"}):`,validate:(D)=>{if(!D)return!0;return Pm.test(D)||"Invalid ORCID format (XXXX-XXXX-XXXX-XXXX)"}}]),_={};if(v)_.orcid=v;let{affiliation:S}=await X.prompt([{type:"input",name:"affiliation",message:`Affiliation for "${y}" (optional):`}]);if(S)_.affiliations=[{name:S}];if(_.orcid||_.affiliations)p[y]=_;let{more:C}=await X.prompt([{type:"confirm",name:"more",message:"Add another author?",default:!0}]);g=C}if(Object.keys(p).length>0){let y={...o.authors||{}};for(let[x,v]of Object.entries(p)){let _=y[x]||{};y[x]={..._,...v,orcid:v.orcid||_.orcid}}o.authors=y}}console.log(),console.log(u.cyan("--- Dataset stats ---"));let d=w("Computing dataset sizes and formats...").start();try{let p=await dH(e),g=et(p.total_size);o.sizes=[`${g} (${p.file_count} files)`],o.formats=p.extensions,d.succeed(`Sizes: ${g} (${p.file_count} files), Formats: ${p.extensions.join(", ")}`)}catch(p){d.warn("Could not compute dataset stats"),console.log(u.dim(` ${V(p)}`))}console.log(),console.log(u.cyan("--- Review ---")),console.log(JSON.stringify(o,null,2)),console.log();let f=await Re("Commit to repo and refresh DOI?",t,!0);if(f!=="confirmed"){console.log(u.dim(f==="declined"?"Skipped":"Cancelled"));return}let m=w("Saving enrichment...").start();try{let p=await kH(e,o);if(m.succeed(p.message),p.bidsignore_updated)console.log(u.dim(" .bidsignore updated to include .nemar/"));if(!i&&s)try{i=await _d(e)}catch(g){if(process.env.DEBUG)console.error("[debug] DOI info re-fetch:",g)}if(i?.ezid_identifier){let g=w("Refreshing DOI metadata...").start();try{await uD(e,{refresh_metadata:!0}),g.succeed("DOI metadata refreshed")}catch(y){g.warn("Could not refresh DOI metadata"),console.log(u.dim(` ${V(y)}`))}}else if(s)console.log(u.yellow(" DOI refresh skipped: could not verify DOI exists. Run 'nemar admin doi update --refresh' manually."))}catch(p){if(p instanceof q)m.fail(p.message);else m.fail("Failed to save enrichment"),console.log(u.dim(` ${V(p)}`))}});Se.addCommand(jd);var uh=new ge("publish").description("Publication workflow management");uh.command("list").description("List publication requests").option("-s, --status <status>","Filter by status (requested, approving, published, denied)").addHelpText("after",`
|
|
248
248
|
Description:
|
|
249
249
|
List all publication requests from users, with optional filtering by status.
|
|
250
250
|
Shows dataset ID, status, requesting user, and current progress.
|
|
@@ -331,7 +331,7 @@ ${r}
|
|
|
331
331
|
${u.cyan("Available Versions:")}
|
|
332
332
|
`);for(let D of c)console.log(` ${u.green(D.version)} ${u.dim(D.date)} ${u.dim(D.commit)}`);return}let l=t;if(!l){console.log(`
|
|
333
333
|
${u.cyan("Available Versions:")}
|
|
334
|
-
`);for(let O of c)console.log(` ${u.green(O.version)} ${u.dim(O.date)}`);console.log();let{version:D}=await X.prompt([{type:"list",name:"version",message:"Select version to revert to:",choices:c.map((O)=>({name:`${O.version} (${O.date})`,value:O.version}))}]);l=D}let d=await XH(i,l);if(!d){console.log(u.red(`Error: Version ${l} not found`)),console.log(u.dim(" Use --list to see available versions"));return}if(console.log(),console.log(u.yellow("Revert Summary:")),console.log(` Dataset: ${u.cyan(e)}`),console.log(` Target version: ${u.green(l)}`),console.log(` Commit: ${u.dim(d)}`),r.force)console.log(` Mode: ${u.red("DIRECT PUSH (--force)")}`);else console.log(` Mode: ${u.green("Pull Request")}`);if(console.log(),r.force)console.log(u.red("WARNING: --force will push directly to main without PR review!")),console.log(u.red("This should only be used in emergencies.")),console.log();let f=r.force?`Directly push revert to ${l}?`:`Create PR to revert to ${l}?`,m=await Re(f,r);if(m!=="confirmed"){console.log(u.dim(m==="declined"?"Skipped":"Cancelled"));return}let p=`revert-to-${l.replace(/\./g,"-")}-${Date.now()}`,g=w("Creating revert branch...").start(),y=await sW(i,l,p);if(!y.success){g.fail(`Failed to create branch: ${y.error}`);return}g.succeed(`Created branch: ${p}`);let x=w("Committing revert...").start(),v=r.message||`Revert to version ${l}`,_=await oW(i,l,v);if(!_.success){x.fail(`Failed to commit: ${_.error}`);return}x.succeed("Committed revert changes");let
|
|
334
|
+
`);for(let O of c)console.log(` ${u.green(O.version)} ${u.dim(O.date)}`);console.log();let{version:D}=await X.prompt([{type:"list",name:"version",message:"Select version to revert to:",choices:c.map((O)=>({name:`${O.version} (${O.date})`,value:O.version}))}]);l=D}let d=await XH(i,l);if(!d){console.log(u.red(`Error: Version ${l} not found`)),console.log(u.dim(" Use --list to see available versions"));return}if(console.log(),console.log(u.yellow("Revert Summary:")),console.log(` Dataset: ${u.cyan(e)}`),console.log(` Target version: ${u.green(l)}`),console.log(` Commit: ${u.dim(d)}`),r.force)console.log(` Mode: ${u.red("DIRECT PUSH (--force)")}`);else console.log(` Mode: ${u.green("Pull Request")}`);if(console.log(),r.force)console.log(u.red("WARNING: --force will push directly to main without PR review!")),console.log(u.red("This should only be used in emergencies.")),console.log();let f=r.force?`Directly push revert to ${l}?`:`Create PR to revert to ${l}?`,m=await Re(f,r);if(m!=="confirmed"){console.log(u.dim(m==="declined"?"Skipped":"Cancelled"));return}let p=`revert-to-${l.replace(/\./g,"-")}-${Date.now()}`,g=w("Creating revert branch...").start(),y=await sW(i,l,p);if(!y.success){g.fail(`Failed to create branch: ${y.error}`);return}g.succeed(`Created branch: ${p}`);let x=w("Committing revert...").start(),v=r.message||`Revert to version ${l}`,_=await oW(i,l,v);if(!_.success){x.fail(`Failed to commit: ${_.error}`);return}x.succeed("Committed revert changes");let S=w("Pushing branch...").start(),C=await Sd(i,p);if(!C.success){S.fail(`Failed to push: ${C.error}`);return}if(S.succeed("Pushed branch to GitHub"),!r.force){let D=w("Creating pull request...").start();try{let{spawn:O}=await import("child_process"),F=`Revert to version ${l}`,M=`## Revert Request
|
|
335
335
|
|
|
336
336
|
This PR reverts the dataset to version ${l}.
|
|
337
337
|
|
|
@@ -545,7 +545,7 @@ Description:
|
|
|
545
545
|
3. You will need to login again with the new key
|
|
546
546
|
|
|
547
547
|
Examples:
|
|
548
|
-
$ nemar auth regenerate-key`);He();er();qs();Ic();km();import{mkdirSync as CNe,readFileSync as FNe,writeFileSync as RNe}from"fs";import{homedir as ONe}from"os";import{join as SK}from"path";function $K(){return process.env.NEMAR_CONFIG_DIR||SK(ONe(),".config","nemar")}function CK(){return SK($K(),"completion-cache.json")}var ANe=3600000,kNe=
|
|
548
|
+
$ nemar auth regenerate-key`);He();er();qs();Ic();km();import{mkdirSync as CNe,readFileSync as FNe,writeFileSync as RNe}from"fs";import{homedir as ONe}from"os";import{join as SK}from"path";function $K(){return process.env.NEMAR_CONFIG_DIR||SK(ONe(),".config","nemar")}function CK(){return SK($K(),"completion-cache.json")}var ANe=3600000,kNe=E.object({cachedAt:E.number(),data:Am});function FK(){try{let e=FNe(CK(),"utf-8"),t=kNe.safeParse(JSON.parse(e));if(!t.success)return null;if(Date.now()-t.data.cachedAt>=ANe)return null;return t.data.data}catch(e){if(process.env.VERBOSE)process.stderr.write(`[completion] cache read failed: ${e instanceof Error?e.message:e}
|
|
549
549
|
`);return null}}function RK(e){try{CNe($K(),{recursive:!0}),RNe(CK(),JSON.stringify({cachedAt:Date.now(),data:e}))}catch(t){if(process.env.VERBOSE)process.stderr.write(`[completion] cache write failed: ${t instanceof Error?t.message:t}
|
|
550
550
|
`)}}async function xw(){let e=await EH();RK(e)}function Uo(){xw().catch((e)=>{if(process.env.VERBOSE)process.stderr.write(`[completion] opportunistic refresh failed: ${e instanceof Error?e.message:e}
|
|
551
551
|
`)})}var PNe=["# nemar completion for bash","# Install (current shell): source <(nemar completion bash)","# Install (persistent): nemar completion bash > /usr/local/etc/bash_completion.d/nemar","_nemar_complete() {"," local cur words_to_complete raw lines n",' cur="${COMP_WORDS[COMP_CWORD]}"',' words_to_complete=("${COMP_WORDS[@]:1:COMP_CWORD}")',' raw="$(nemar __complete -- "${words_to_complete[@]}" 2>/dev/null)"'," COMPREPLY=()",' if [[ -n "$raw" ]]; then',' mapfile -t lines <<< "$raw"'," n=${#lines[@]}"," if (( n > 0 )); then",' COMPREPLY=("${lines[@]:0:n-1}")'," fi"," fi","}","complete -F _nemar_complete nemar",""],INe=["#compdef nemar","# nemar completion for zsh","# Install (current shell): source <(nemar completion zsh)",'# Install (persistent): nemar completion zsh > "${fpath[1]}/_nemar" (then restart your shell)',"_nemar() {"," local -a request_words lines candidates",' request_words=("${(@)words[2,CURRENT]}")',' lines=("${(@f)$(nemar __complete -- "${request_words[@]}" 2>/dev/null)}")'," if (( ${#lines[@]} > 0 )); then",' candidates=("${(@)lines[1,-2]}")'," else"," candidates=()"," fi",' compadd -- "${candidates[@]}"',"}",'_nemar "$@"',""],TNe=["# nemar completion for fish","# Install: nemar completion fish > ~/.config/fish/completions/nemar.fish","function __nemar_complete_words"," set -l tokens (commandline -opc)"," set -l cur (commandline -ct)"," set -l request_words"," if test (count $tokens) -gt 1"," set request_words $tokens[2..-1]"," end"," set request_words $request_words $cur"," set -l lines (nemar __complete -- $request_words 2>/dev/null)"," if test (count $lines) -gt 0"," set -e lines[-1]"," end"," for line in $lines"," echo $line"," end","end","complete -c nemar -f -a '(__nemar_complete_words)'",""];function OK(){return PNe.join(`
|
|
@@ -580,7 +580,7 @@ Examples:
|
|
|
580
580
|
`)[0]}`)}r.push("")}if(i.length>0){r.push(t?"\x1B[33mWarnings:\x1B[0m":"Warnings:");for(let a of i){let c=t?`\x1B[33m${a.code}\x1B[0m`:a.code,l=e.codeMessages[a.code]?.split(`
|
|
581
581
|
`)[0]||"";r.push(` ${c}: ${l}`),r.push(` ${a.location}`)}r.push("")}if(r.push("Summary:"),r.push(` Files: ${e.summary.totalFiles}`),r.push(` Size: ${e9e(e.summary.size)}`),e.summary.subjects.length>0)r.push(` Subjects: ${e.summary.subjects.length}`);if(e.summary.sessions.length>0)r.push(` Sessions: ${e.summary.sessions.length}`);if(e.summary.tasks.length>0)r.push(` Tasks: ${e.summary.tasks.join(", ")}`);if(e.summary.modalities.length>0)r.push(` Modalities: ${e.summary.modalities.join(", ")}`);r.push(` Schema: BIDS ${e.summary.schemaVersion}`),r.push("");let s=e.errorCount===1?"error":"errors",o=e.warningCount===1?"warning":"warnings";return r.push(`${e.errorCount} ${s}, ${e.warningCount} ${o}`),r.join(`
|
|
582
582
|
`)}function e9e(e){if(e===0)return"0 B";let t=1024,r=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(t));return`${Number.parseFloat((e/t**n).toFixed(2))} ${r[n]}`}Od();Ts();xD();var t9e=["10-05","10-10","10-20","biosemi","egi-geodesic","other"],r9e=["50","60"],n9e=["ready","pending","failed"],i9e=yD.options,Ho=[{key:"subjects",flag:"--subjects",queryParam:"subjects",valueKind:"number",label:"Subject count",unit:"subjects"},{key:"channels",flag:"--channels",queryParam:"channels",valueKind:"number",label:"Channel count",unit:"channels"},{key:"sessions",flag:"--sessions",queryParam:"sessions",valueKind:"number",label:"Session count",unit:"sessions"},{key:"size",flag:"--size",queryParam:"size",valueKind:"bytes",label:"Dataset size"},{key:"files",flag:"--files",queryParam:"files",valueKind:"number",label:"File count",unit:"files"},{key:"citations",flag:"--citations",queryParam:"citations",valueKind:"number",label:"Citation count",unit:"citations"},{key:"duration",flag:"--duration",queryParam:"duration",valueKind:"duration",label:"Total recording duration"},{key:"recording-length",flag:"--recording-length",queryParam:"recording_length",valueKind:"duration",label:"Per-recording duration"},{key:"recordings",flag:"--recordings",queryParam:"recordings",valueKind:"number",label:"Recording count",unit:"recordings"},{key:"unavailable",flag:"--unavailable",queryParam:"unavailable",valueKind:"number",label:"Unavailable recording count",unit:"recordings"},{key:"age",flag:"--age",queryParam:"age",valueKind:"number",label:"Participant age",unit:"years"},{key:"rate",flag:"--rate",queryParam:"rate",valueKind:"number",label:"Sampling rate",unit:"Hz"},{key:"powerline",flag:"--powerline",queryParam:"powerline",valueKind:"enum",label:"Power line frequency",enumValues:r9e},{key:"reference",flag:"--reference",queryParam:"reference",valueKind:"text",label:"EEG reference"},{key:"placement",flag:"--placement",queryParam:"placement",valueKind:"text",label:"Electrode placement scheme"},{key:"electrode-system",flag:"--electrode-system",queryParam:"electrode_system",valueKind:"enum",label:"Electrode system",enumValues:t9e},{key:"source",flag:"--source",queryParam:"source",valueKind:"enum",label:"Source archive",enumValues:i9e},{key:"zarr",flag:"--zarr",queryParam:"zarr",valueKind:"enum",label:"Zarr conversion status",enumValues:n9e},{key:"bids-version",flag:"--bids-version",queryParam:"bids_version",valueKind:"version",label:"BIDS version"},{key:"hed-version",flag:"--hed-version",queryParam:"hed_version",valueKind:"version",label:"HED version"}],brt=new Map(Ho.map((e)=>[e.key,e]));var VK="Accepted forms: a..b (between), a.. (at least), ..b (at most), or a bare number (exact).";class vh extends Error{facet;badTokens;constructor(e,t){super(`Invalid value${t.length>1?"s":""} for ${e.flag}: ${t.map((r)=>`"${r}"`).join(", ")} -- must be one of: ${(e.enumValues??[]).join(", ")}`);this.facet=e;this.badTokens=t;this.name="FacetEnumCliError"}}function s9e(e){switch(e.valueKind){case"enum":return"<values>";case"text":return"<text>";case"version":return"<version>";default:return"<range>"}}function o9e(e){let t=e.unit?` (${e.unit})`:"";switch(e.valueKind){case"enum":return`${e.label} -- comma-separated, one or more of: ${(e.enumValues??[]).join(", ")}`;case"number":return`${e.label}${t} -- range (e.g. 10..50, 10.., ..50, or 10)`;case"bytes":return`${e.label}${t} -- range with optional units (e.g. 10gb..2tb, 500mb.., ..1gb; bare = bytes)`;case"duration":return`${e.label}${t} -- range with optional units (e.g. 30m..2h, 100h.., ..90s; bare = seconds)`;case"text":return`${e.label} -- substring match`;case"version":return`${e.label} -- exact or prefix match`}}function $w(e){for(let t of Ho)e.addOption(new au(`${t.flag} ${s9e(t)}`,o9e(t)));return e}function a9e(e){return new au(e.flag).attributeName()}function c9e(e,t){if(e!==null&&t!==null&&e===t)return String(e);return`${e??""}..${t??""}`}function u9e(e,t){switch(e.valueKind){case"number":case"bytes":case"duration":{let r=PK(t,e.valueKind);return c9e(r.min,r.max)}case"enum":{let r=new Set(e.enumValues??[]),n=t.split(",").map((s)=>s.trim().toLowerCase()).filter((s)=>s!==""),i=[...new Set(n.filter((s)=>!r.has(s)))];if(i.length>0)throw new vh(e,i);return n.join(",")}case"text":case"version":return t}}function zK(e){let t={};for(let r of Ho){let n=e[a9e(r)];if(n===void 0||n===null||n==="")continue;t[r.queryParam]=u9e(r,String(n))}return t}function Cw(e,t){let r=Ho.filter((n)=>(t[n.key]??0)>0).map((n)=>`${n.key} ${t[n.key]}`).join(", ");return`note: ${e} datasets excluded for unknown values - ${r}
|
|
583
|
-
(a dataset can be unknown in more than one field; --include-unknown keeps them)`}Ms();Ad();Wc();Bs();Ls();function HK(e,t){let r=e.files??{},n=t.files??{},i=[],s=[],o=[];for(let[a,c]of Object.entries(n)){let l=r[a];if(!l)i.push(a);else if(l.key!==c.key)s.push(a)}for(let a of Object.keys(r))if(!(a in n))o.push(a);return i.sort(),s.sort(),o.sort(),{added:i,changed:s,removed:o}}import{existsSync as Fw,mkdirSync as KK,statSync as l9e}from"fs";import{dirname as d9e,join as f9e,resolve as WK}from"path";var{spawn:YK}=globalThis.Bun;var Rw="openneuro.org",JK="us-east-1",Ow=`https://s3.amazonaws.com/${Rw}`,p9e=/^ds\d{6}$/;function XK(e){return p9e.test(e)}function GK(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,'"')}async function QK(e,t){if(t??await xh())try{let o=YK({cmd:["aws","s3","ls","--no-sign-request","--region",JK,`s3://${Rw}/${e}/`],stdout:"pipe",stderr:"pipe"}),a=await new Response(o.stdout).text();if(await o.exited!==0)return!1;return a.trim().length>0}catch{}let n=`${Ow}?list-type=2&prefix=${e}/&max-keys=1`,i=await fetch(n);if(!i.ok)return!1;return(await i.text()).includes("<Key>")}async function ZK(e){let t=[],r;do{let n=`${Ow}?list-type=2&prefix=${e}/`;if(r)n+=`&continuation-token=${encodeURIComponent(r)}`;let i=await fetch(n);if(!i.ok)throw Error(`Failed to list OpenNeuro dataset: HTTP ${i.status}`);let s=await i.text(),o=s.match(/<Contents>[\s\S]*?<\/Contents>/g)||[];for(let c of o){let l=c.match(/<Key>([^<]+)<\/Key>/),d=c.match(/<Size>(\d+)<\/Size>/);if(l&&d){let f=GK(l[1]),m=Number.parseInt(d[1],10);if(f.endsWith("/")&&m===0)continue;t.push({key:f,size:m})}}if(s.includes("<IsTruncated>true</IsTruncated>")){let c=s.match(/<NextContinuationToken>([^<]+)<\/NextContinuationToken>/);if(!c)throw Error(`S3 listing indicated more results but no continuation token was provided. Got ${t.length} objects so far.`);r=GK(c[1])}else r=void 0}while(r);return t}async function eY(e,t,r){let n=`s3://${Rw}/${e}/`,i=["aws","s3","sync","--no-sign-request","--region",JK,n,t],s;try{s=YK({cmd:i,stdout:"pipe",stderr:"pipe"})}catch(m){return{success:!1,filesDownloaded:0,totalBytes:0,method:"aws-cli",error:`Failed to start AWS CLI: ${m.message}`}}let o=0,a=[],c=/^download:\s+s3:\/\/[^\s]+\/(.*?)\s+to\s+/;function l(m,p){if(m.startsWith("download:")){o++;let g=m.match(c);r?.(o,g?.[1]||"")}else if(p)a.push(m)}async function d(m,p){let g=m.getReader(),y=new TextDecoder,x="";try{while(!0){let{done:_,value:
|
|
583
|
+
(a dataset can be unknown in more than one field; --include-unknown keeps them)`}Ms();Ad();Wc();Bs();Ls();function HK(e,t){let r=e.files??{},n=t.files??{},i=[],s=[],o=[];for(let[a,c]of Object.entries(n)){let l=r[a];if(!l)i.push(a);else if(l.key!==c.key)s.push(a)}for(let a of Object.keys(r))if(!(a in n))o.push(a);return i.sort(),s.sort(),o.sort(),{added:i,changed:s,removed:o}}import{existsSync as Fw,mkdirSync as KK,statSync as l9e}from"fs";import{dirname as d9e,join as f9e,resolve as WK}from"path";var{spawn:YK}=globalThis.Bun;var Rw="openneuro.org",JK="us-east-1",Ow=`https://s3.amazonaws.com/${Rw}`,p9e=/^ds\d{6}$/;function XK(e){return p9e.test(e)}function GK(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,'"')}async function QK(e,t){if(t??await xh())try{let o=YK({cmd:["aws","s3","ls","--no-sign-request","--region",JK,`s3://${Rw}/${e}/`],stdout:"pipe",stderr:"pipe"}),a=await new Response(o.stdout).text();if(await o.exited!==0)return!1;return a.trim().length>0}catch{}let n=`${Ow}?list-type=2&prefix=${e}/&max-keys=1`,i=await fetch(n);if(!i.ok)return!1;return(await i.text()).includes("<Key>")}async function ZK(e){let t=[],r;do{let n=`${Ow}?list-type=2&prefix=${e}/`;if(r)n+=`&continuation-token=${encodeURIComponent(r)}`;let i=await fetch(n);if(!i.ok)throw Error(`Failed to list OpenNeuro dataset: HTTP ${i.status}`);let s=await i.text(),o=s.match(/<Contents>[\s\S]*?<\/Contents>/g)||[];for(let c of o){let l=c.match(/<Key>([^<]+)<\/Key>/),d=c.match(/<Size>(\d+)<\/Size>/);if(l&&d){let f=GK(l[1]),m=Number.parseInt(d[1],10);if(f.endsWith("/")&&m===0)continue;t.push({key:f,size:m})}}if(s.includes("<IsTruncated>true</IsTruncated>")){let c=s.match(/<NextContinuationToken>([^<]+)<\/NextContinuationToken>/);if(!c)throw Error(`S3 listing indicated more results but no continuation token was provided. Got ${t.length} objects so far.`);r=GK(c[1])}else r=void 0}while(r);return t}async function eY(e,t,r){let n=`s3://${Rw}/${e}/`,i=["aws","s3","sync","--no-sign-request","--region",JK,n,t],s;try{s=YK({cmd:i,stdout:"pipe",stderr:"pipe"})}catch(m){return{success:!1,filesDownloaded:0,totalBytes:0,method:"aws-cli",error:`Failed to start AWS CLI: ${m.message}`}}let o=0,a=[],c=/^download:\s+s3:\/\/[^\s]+\/(.*?)\s+to\s+/;function l(m,p){if(m.startsWith("download:")){o++;let g=m.match(c);r?.(o,g?.[1]||"")}else if(p)a.push(m)}async function d(m,p){let g=m.getReader(),y=new TextDecoder,x="";try{while(!0){let{done:_,value:S}=await g.read();if(_)break;x+=y.decode(S,{stream:!0});let C=x.split(`
|
|
584
584
|
`);x=C.pop()||"";for(let D of C){let O=D.trim();if(O)l(O,p)}}let v=x.trim();if(v)l(v,p)}finally{g.releaseLock()}}await Promise.all([d(s.stdout,!1),d(s.stderr,!0)]);let f=await s.exited;if(f!==0)return{success:!1,filesDownloaded:o,totalBytes:0,method:"aws-cli",error:a.join(`
|
|
585
585
|
`)||`aws s3 sync exited with code ${f}`};return{success:!0,filesDownloaded:o,totalBytes:0,method:"aws-cli"}}async function m9e(e,t,r,n){let i=e.substring(n.length+1),s=f9e(r,i);if(!WK(s).startsWith(`${WK(r)}/`))throw Error(`Path traversal detected in key: ${e}`);if(Fw(s))try{if(l9e(s).size===t)return t}catch{}let a=d9e(s);if(!Fw(a))KK(a,{recursive:!0});let c=e.split("/").map((f)=>encodeURIComponent(f)).join("/"),l=`${Ow}/${c}`,d=await fetch(l);if(!d.ok)throw Error(`Failed to download ${i}: HTTP ${d.status}`);return await Bun.write(s,d),t}async function tY(e,t,r,n={}){let{concurrency:i=8,onProgress:s}=n,o=r.length,a=r.reduce((y,x)=>y+x.size,0),c=0,l=0,d=0,f=[];if(!Fw(t))KK(t,{recursive:!0});let m=[...r],p=Math.min(i,o),g=Array.from({length:p},async()=>{while(m.length>0){let y=m.shift();if(!y)break;try{let x=await m9e(y.key,y.size,t,e);l++,d+=x}catch(x){f.push(x.message)}c++,s?.(c,o,d,a)}});return await Promise.all(g),{success:f.length===0,filesDownloaded:l,totalBytes:d,method:"https",error:f.length>0?`${f.length} file(s) failed:
|
|
586
586
|
${f.slice(0,10).join(`
|
|
@@ -680,7 +680,7 @@ Examples:
|
|
|
680
680
|
$ nemar dataset upload ./my-eeg-dataset
|
|
681
681
|
$ nemar dataset upload ./ds -n "My EEG Study" -d "64-channel EEG data"
|
|
682
682
|
$ nemar dataset upload ./ds --dry-run # Preview without uploading
|
|
683
|
-
$ nemar dataset upload ./ds -j 16 # More parallel streams`).action(async(e,t)=>{let r=ht();if(rr(),!bz())console.log(u.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(u.cyan(" nemar sandbox")),process.exit(1);let n=qi(e);if(!Or(n))console.log(u.red(`Error: Path does not exist: ${n}`)),process.exit(1);if(await Bo("upload"),(await UY()).status==="fail")process.exit(1);if((await VY(r)).status==="fail")process.exit(1);if((await zY(n,t)).status==="fail")process.exit(1);let{datasetName:i,manifest:s,bidsDescription:o}=await FY(n,t),a=await RY(n,t,o),c=await OY(n,t);await AY(n,t,c);let l=MY(n,i,s,t);if(l.status==="stop")return;let{existingConfig:d}=l.value,f;try{f=await NK(t)}catch(D){console.log(u.red(D instanceof Error?D.message:String(D))),process.exit(1)}let m=await Re("Proceed with upload?",{yes:t.yes,no:t.no},!0);if(m!=="confirmed"){console.log(m==="declined"?"Upload skipped.":"Upload cancelled.");return}console.log();let{dataFiles:p,uploadProgress:g}=LY(n,s,t),y=await XW(n,t,i,p,d,f);if(y.status==="fail")process.exit(1);let x=y.value,v=jY(n,g,x.dataset_id),_=BY(v,p);if((await QW(x)).status==="fail")process.exit(1);let
|
|
683
|
+
$ nemar dataset upload ./ds -j 16 # More parallel streams`).action(async(e,t)=>{let r=ht();if(rr(),!bz())console.log(u.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(u.cyan(" nemar sandbox")),process.exit(1);let n=qi(e);if(!Or(n))console.log(u.red(`Error: Path does not exist: ${n}`)),process.exit(1);if(await Bo("upload"),(await UY()).status==="fail")process.exit(1);if((await VY(r)).status==="fail")process.exit(1);if((await zY(n,t)).status==="fail")process.exit(1);let{datasetName:i,manifest:s,bidsDescription:o}=await FY(n,t),a=await RY(n,t,o),c=await OY(n,t);await AY(n,t,c);let l=MY(n,i,s,t);if(l.status==="stop")return;let{existingConfig:d}=l.value,f;try{f=await NK(t)}catch(D){console.log(u.red(D instanceof Error?D.message:String(D))),process.exit(1)}let m=await Re("Proceed with upload?",{yes:t.yes,no:t.no},!0);if(m!=="confirmed"){console.log(m==="declined"?"Upload skipped.":"Upload cancelled.");return}console.log();let{dataFiles:p,uploadProgress:g}=LY(n,s,t),y=await XW(n,t,i,p,d,f);if(y.status==="fail")process.exit(1);let x=y.value,v=jY(n,g,x.dataset_id),_=BY(v,p);if((await QW(x)).status==="fail")process.exit(1);let S=r.username&&r.email?{name:r.username,email:r.email}:void 0;if((await ZW(n,S)).status==="fail")process.exit(1);if((await eG(n,x,t)).status==="fail")process.exit(1);let C=await tG(n,t,p,_,v,x);if(C.status==="fail")process.exit(1);if(v=C.value,PY(n,a,v),(await IY(n,S,v)).status==="fail")process.exit(1);if((await TY(n,v)).status==="fail")process.exit(1);await NY(n,x.dataset_id,v),qY(n,x)});function U9e(e,t,r,n){let i=Math.round(e/t*100),s=20,o=Math.round(i/100*20);return`${`[${"=".repeat(o)}${" ".repeat(20-o)}]`} ${i}% | ${e}/${t} files | ${et(r)} / ${et(n)}`}async function JY(e,t){if(t==="public")return;let r=w("Requesting download credentials...").start();try{let n=await hD(e);return r.succeed("Download credentials received (2h expiry)"),Vt(n.credentials)}catch(n){r.fail("Failed to get download credentials"),console.log(u.red(` ${n.message}`)),console.log(u.dim("Private datasets require authentication. Run 'nemar auth login' first.")),process.exit(1)}}async function V9e(e,t){if(console.log(),console.log(u.yellow("OpenNeuro Dataset")),console.log(u.yellow("This dataset will be downloaded as plain files from OpenNeuro's public S3 bucket.")),console.log(u.yellow("Unlike NEMAR datasets, there is no git-annex version tracking or selective file download.")),console.log(u.dim("For full version control, use DataLad directly:")),console.log(u.dim(` datalad install https://github.com/OpenNeuroDatasets/${e}`)),console.log(),t.data===!1)console.log(u.yellow("Note: --no-data is not supported for OpenNeuro downloads. Downloading all files.")),console.log();let r=t.output||e,n=qi(r);if(Or(n))console.log(u.red(`Error: Output path already exists: ${n}`)),console.log("Remove or rename the existing directory and try again."),process.exit(1);let i=await xh(),s=w(`Checking OpenNeuro for ${e}...`).start(),o;try{o=await QK(e,i)}catch(a){s.fail(`Could not reach OpenNeuro: ${a.message}`),process.exit(1)}if(!o)s.fail(`Dataset ${e} not found on OpenNeuro`),process.exit(1);if(s.succeed(`Found ${e} on OpenNeuro`),i){console.log(),console.log(u.bold("Download Plan:")),console.log(` Dataset: ${e} (OpenNeuro)`),console.log(` Output: ${n}`),console.log(" Method: AWS CLI (aws s3 sync)"),console.log(),console.log(u.bold("Downloading data files..."));let a=await eY(e,n,(c)=>{process.stderr.write(`\r${u.cyan(` ${c} files downloaded`)}`)});if(process.stderr.write(`\r${" ".repeat(40)}\r`),!a.success)console.log(u.red(`Download failed: ${a.error}`)),process.exit(1);console.log(u.green(`Downloaded ${a.filesDownloaded} files`))}else{console.log(),console.log(u.yellow("AWS CLI not found. Using direct HTTPS download.")),console.log(u.yellow("This will be slower than AWS CLI. To install it:")),console.log(u.dim(" https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html")),console.log();let a=w("Listing dataset files...").start(),c;try{c=await ZK(e)}catch(m){a.fail(`Failed to list files: ${m.message}`),process.exit(1)}if(c.length===0)a.fail("No files found in dataset"),process.exit(1);let l=c.reduce((m,p)=>m+p.size,0);a.succeed(`${c.length} files (${et(l)})`),console.log(u.bold("Download Plan:")),console.log(` Dataset: ${e} (OpenNeuro)`),console.log(` Output: ${n}`),console.log(" Method: HTTPS (direct download)"),console.log(` Files: ${c.length} (${et(l)})`),console.log(),console.log(u.bold("Downloading data files..."));let d=Number.parseInt(t.jobs||"8",10),f=await tY(e,n,c,{concurrency:d,onProgress:(m,p,g,y)=>{process.stderr.write(`\r${u.cyan(U9e(m,p,g,y))}`)}});if(process.stderr.write(`\r${" ".repeat(80)}\r`),!f.success){if(console.log(u.red(`
|
|
684
684
|
Download incomplete: ${f.error}`)),f.filesDownloaded>0)console.log(u.yellow(`${f.filesDownloaded} files succeeded. Re-run to retry failed files (resume support).`));console.log(`
|
|
685
685
|
Location: ${u.cyan(n)}`),process.exit(1)}console.log(u.green(`Downloaded ${f.filesDownloaded} files (${et(f.totalBytes)})`))}console.log(),console.log(u.green.bold("Download complete!")),console.log(),console.log(` Location: ${u.cyan(n)}`),console.log()}lt.command("download").description("Download a dataset from NEMAR or OpenNeuro").argument("<dataset-id>","Dataset ID (e.g., nm000104 or OpenNeuro ds000248)").option("-o, --output <path>","Output directory (default: ./<dataset-id>)").option("-j, --jobs <number>","Parallel download streams (default: 4)","4").option("--no-data","Download metadata only (skip large data files)").option("--resume","Resume a partial download into an existing clone").option("--update","Pull only the version diff into an existing clone").option("--prune","With --update, drop annex objects that no longer exist upstream").option("--subjects <list>","Comma-separated subjects (e.g. sub-01,02)").option("--sessions <list>","Comma-separated sessions (e.g. ses-pre,post)").option("--tasks <list>","Comma-separated tasks (e.g. rest,nback)").option("--runs <list>","Comma-separated runs (e.g. 1,2 \u2014 matches run-1 and run-01)").option("--datatypes <list>","Comma-separated BIDS datatypes (e.g. eeg,emg)").option("--include <globs>","Comma-separated extra include globs").option("--exclude <globs>","Comma-separated exclude globs (e.g. sourcedata/**)").option("--stimuli","Include stimuli/ content (skipped by default; can be large)").option("--derivatives","Include derivatives/ content (skipped by default; can be large)").option("--skip-port-check","Skip the porting-in-progress check (use if falsely blocked on an OpenNeuro-sourced dataset)").option("--require-complete","Exit non-zero if any file is unavailable from the archive (for strict pipelines)").addHelpText("after",`
|
|
686
686
|
Description:
|
|
@@ -716,14 +716,14 @@ Examples:
|
|
|
716
716
|
$ nemar dataset download nm000104 --tasks rest --datatypes eeg # Subset
|
|
717
717
|
$ nemar dataset download nm000104 --stimuli # Also download stimuli/
|
|
718
718
|
$ nemar dataset download nm000104 --stimuli --derivatives # Download everything
|
|
719
|
-
$ nemar dataset download ds000248 # Download from OpenNeuro`).action(async(e,t)=>{let r=await z9e(e);if(!r){await V9e(e,t);return}if(t.resume&&t.update)console.log(u.red("Error: --resume and --update are mutually exclusive.")),process.exit(1);if(t.prune&&!t.update)console.log(u.red("Error: --prune requires --update.")),process.exit(1);let n=bh({subjects:t.subjects,sessions:t.sessions,tasks:t.tasks,runs:t.runs,datatypes:t.datatypes,include:t.include,exclude:t.exclude,excludeStimuli:t.stimuli!==!0,excludeDerivatives:t.derivatives!==!0});if(n.active&&t.data===!1)console.log(u.red("Error: --no-data cannot be combined with BIDS filters (--subjects, --tasks, etc.). Filters imply data download.")),process.exit(1);await Bo("download");let i=w("Checking git-annex...").start(),s=await $d();if(!s.allPassed){i.fail("Prerequisites check failed"),console.log();for(let v of s.errors)console.log(u.red(` - ${v}`));process.exit(1)}i.succeed(`git-annex ${s.gitAnnex.version}`),i=w(`Fetching dataset info for ${r}...`).start();let o;try{o=await gt(r),i.succeed(`Found dataset: ${o.name}`)}catch(v){if(i.fail("Dataset not found"),v instanceof q)console.log(u.red(` ${v.message}`));else console.log(u.red(` ${v.message}`));process.exit(1)}if(!o.github_repo)console.log(u.red("Error: Dataset repository not available")),process.exit(1);let a=t.output||r,c=qi(a),l,d=t.resume?"resume":t.update?"update":null;if(d){if(!Or(c))console.log(u.red(`Error: --${d} target does not exist: ${c}`)),console.log(u.dim(`Drop --${d} to perform a fresh clone.`)),process.exit(1);if(i=w(`Validating ${d} target...`).start(),!await $n(c))i.fail("Not a git-annex dataset"),console.log(u.red(` ${c} is not a git-annex repository.`)),console.log(u.dim(`--${d} requires a previous clone of the same dataset.`)),process.exit(1);let v=await js(c);if(v!==r)i.fail("Dataset ID mismatch"),console.log(u.red(` Expected ${r}, but ${c} is a clone of ${v??"an unknown repo"}.`)),process.exit(1);let _=await tW(c);if(_.error)i.fail("Could not check working tree status"),console.log(u.red(` ${_.error}`)),process.exit(1);if(_.dirty)i.fail("Working tree is dirty"),console.log(u.red(` Refusing to ${d} with uncommitted local changes.`)),console.log(u.dim(" Commit, stash, or discard them first.")),process.exit(1);let
|
|
719
|
+
$ nemar dataset download ds000248 # Download from OpenNeuro`).action(async(e,t)=>{let r=await z9e(e);if(!r){await V9e(e,t);return}if(t.resume&&t.update)console.log(u.red("Error: --resume and --update are mutually exclusive.")),process.exit(1);if(t.prune&&!t.update)console.log(u.red("Error: --prune requires --update.")),process.exit(1);let n=bh({subjects:t.subjects,sessions:t.sessions,tasks:t.tasks,runs:t.runs,datatypes:t.datatypes,include:t.include,exclude:t.exclude,excludeStimuli:t.stimuli!==!0,excludeDerivatives:t.derivatives!==!0});if(n.active&&t.data===!1)console.log(u.red("Error: --no-data cannot be combined with BIDS filters (--subjects, --tasks, etc.). Filters imply data download.")),process.exit(1);await Bo("download");let i=w("Checking git-annex...").start(),s=await $d();if(!s.allPassed){i.fail("Prerequisites check failed"),console.log();for(let v of s.errors)console.log(u.red(` - ${v}`));process.exit(1)}i.succeed(`git-annex ${s.gitAnnex.version}`),i=w(`Fetching dataset info for ${r}...`).start();let o;try{o=await gt(r),i.succeed(`Found dataset: ${o.name}`)}catch(v){if(i.fail("Dataset not found"),v instanceof q)console.log(u.red(` ${v.message}`));else console.log(u.red(` ${v.message}`));process.exit(1)}if(!o.github_repo)console.log(u.red("Error: Dataset repository not available")),process.exit(1);let a=t.output||r,c=qi(a),l,d=t.resume?"resume":t.update?"update":null;if(d){if(!Or(c))console.log(u.red(`Error: --${d} target does not exist: ${c}`)),console.log(u.dim(`Drop --${d} to perform a fresh clone.`)),process.exit(1);if(i=w(`Validating ${d} target...`).start(),!await $n(c))i.fail("Not a git-annex dataset"),console.log(u.red(` ${c} is not a git-annex repository.`)),console.log(u.dim(`--${d} requires a previous clone of the same dataset.`)),process.exit(1);let v=await js(c);if(v!==r)i.fail("Dataset ID mismatch"),console.log(u.red(` Expected ${r}, but ${c} is a clone of ${v??"an unknown repo"}.`)),process.exit(1);let _=await tW(c);if(_.error)i.fail("Could not check working tree status"),console.log(u.red(` ${_.error}`)),process.exit(1);if(_.dirty)i.fail("Working tree is dirty"),console.log(u.red(` Refusing to ${d} with uncommitted local changes.`)),console.log(u.dim(" Commit, stash, or discard them first.")),process.exit(1);let S=await rW(c);if(!S.success)i.fail("Failed to fetch remote refs"),console.log(u.red(` ${S.error}`)),process.exit(1);let C=QH(c);if(C.error)console.log(u.yellow(` Warning: ${C.error}`));let D=await ZH(c);for(let M of D.warnings)console.log(u.yellow(` Warning: ${M}`));let O=C.version,F=D.version;if(t.resume){if(O&&F&&O!==F)i.fail("Local clone is behind upstream"),console.log(u.red(` Local version: ${O} | Remote HEAD: ${F}`)),console.log(u.dim(" Run `nemar dataset download <id> --update` to pull the version diff.")),process.exit(1);i.succeed(`Resume target verified: ${r}`)}else{if(O&&F&&O===F)i.succeed(`Already up to date (${O})`),process.exit(0);if(i.succeed(`Update plan: ${O??"unknown"} \u2192 ${F??"HEAD"}`),O&&F){i=w("Computing version diff from manifests...").start();try{let[Z,_e]=await Promise.all([Tm(r,O),Tm(r,F)]),qe=HK(Z,_e);if(i.succeed(`Diff: +${qe.added.length} added, ~${qe.changed.length} changed, -${qe.removed.length} removed`),l=[...qe.added,...qe.changed],l.length===0)console.log(u.dim(" No annex content changes between versions; metadata-only update."))}catch(Z){let _e=Z.message;if(i.warn(`Manifest diff unavailable: ${_e}`),/401|403|unauthor/i.test(_e))console.log(u.yellow(" Looks like an auth issue. Run `nemar auth status` to verify."));else if(!/404|not found/i.test(_e))console.log(u.yellow(" Unexpected manifest error. Please report if this recurs."));console.log(u.dim(" Falling back to full git annex get (skips already-present files).")),l=void 0}}let M=await ni(c);if(M?.startsWith("adjusted/"))console.log(u.red(` --update is not supported on git-annex adjusted branches (${M}).`)),console.log(u.dim(" Run `git -C <clone> annex sync` to bring the clone onto a normal branch first.")),process.exit(1);i=w("Resolving remote tracking branch...").start();let k=await eW(c);if(!k.ref)i.fail("Cannot resolve remote tracking branch"),console.log(u.red(` ${k.error??"no upstream ref found"}`)),process.exit(1);i.text=`Fast-forwarding to ${k.ref}...`;let j=await nW(c,k.ref);if(!j.success)i.fail("Cannot fast-forward (local has diverging commits)"),console.log(u.red(` ${j.error}`)),console.log(u.dim(" Use `nemar dataset update` (PR workflow) to push local changes first.")),process.exit(1);i.succeed(`Merged ${k.ref}`)}}else if(Or(c))console.log(u.red(`Error: Output path already exists: ${c}`)),console.log("Remove or rename the existing directory, or pass --resume / --update to reuse it."),process.exit(1);console.log();let f=t.update?"Update Plan:":t.resume?"Resume Plan:":"Download Plan:";if(console.log(u.bold(f)),console.log(` Dataset: ${o.name} (${r})`),console.log(` Output: ${c}`),console.log(` Data files: ${t.data===!1?"metadata only":"included"}`),t.data!==!1)console.log(` Parallel jobs: ${t.jobs}`);if(t.update&&l&&l.length>0)console.log(` Files to fetch: ${l.length}`);if(n.active)for(let v of n.summary)console.log(` Filter ${v}`);if(console.log(),!d){let v=`https://github.com/${o.github_repo}.git`;i=w("Cloning metadata from GitHub...").start();let _=await br(v,c);if(!_.success)i.fail("Failed to clone dataset"),console.log(u.red(` ${_.error}`)),process.exit(1);i.succeed("Metadata cloned")}if(!t.skipPortCheck&&o.source==="openneuro"&&t.data!==!1){if(await ED(c)==="absent")console.log(),console.log(u.yellow("Porting still in progress.")),console.log(u.dim(" This dataset is being imported from OpenNeuro. Data files are not yet available.")),console.log(u.dim(" The metadata-only clone is already at the path above.")),console.log(u.dim(" Wait 5\u201330 minutes (depending on dataset size), then run:")),console.log(u.dim(` cd ${c} && nemar dataset get`)),console.log(u.dim(" Run 'nemar dataset status <id>' to track porting progress.")),console.log(u.dim(" Pass --skip-port-check to bypass this check if you are certain porting is complete.")),process.exit(1)}let m=await JY(r,o.visibility),p=await Gc(c,"nemar-s3",m);if(p.enabled)console.log(u.dim(" S3 remote enabled for data downloads"));else if(!p.success)console.log(u.yellow(` Warning: Could not enable S3 remote: ${p.error}`));if(t.data===!1||t.update&&l&&l.length===0){if(t.data===!1)console.log(u.dim("Skipping data files (--no-data flag)"))}else{for(let D of n.summary)console.log(u.dim(` ${D}`));console.log(u.bold(`Downloading data files (${t.jobs} parallel streams)...`));let v=n.args.length>0?n.args:void 0,_=await kD(c,void 0,v),S=new Vm(_?.fileCount??0,_?.totalBytes??0),C=await PD(c,{jobs:Number.parseInt(t.jobs,10),credentials:m,paths:l,extraArgs:v,requireComplete:Boolean(t.requireComplete),onProgress:(D)=>S.processLine(D)});if(!C.success){if(S.finish(C.filesDownloaded),console.log(u.red(`Failed to download data files: ${C.error}`)),console.log(u.dim("The dataset was cloned but data files are not available locally.")),console.log(u.dim(`You can try again with: cd ${c} && nemar dataset get`)),m)await zt(c);process.exit(1)}if(S.finish(C.filesDownloaded),C.outcome==="partial")BD(C);else console.log(u.green(`Data downloaded (${C.filesDownloaded} files)`))}if(t.update&&t.prune){i=w("Pruning orphan annex objects...").start();let v=await wW(c);if(v.success)i.succeed(`Pruned ${v.dropped??0} unused annex objects`);else i.warn(`Prune skipped: ${v.error}`)}if(m)await zt(c);let y=await YH(c);console.log();let x=t.update?"Update complete!":t.resume?"Resume complete!":"Download complete!";if(console.log(u.green.bold(x)),console.log(),console.log(` Location: ${u.cyan(c)}`),y){if(console.log(` Files: ${y.files}`),y.size!=="unknown")console.log(` Size: ${y.size}`);if(y.missingFiles>0)console.log(u.dim(` Missing files: ${y.missingFiles} (use 'git annex get' to download)`))}if(console.log(),t.update)console.log(u.dim("Note: --update fetches only the version diff. If a prior version was")),console.log(u.dim("partially downloaded, run with --resume to fill any pre-existing gaps.")),console.log();console.log(u.dim("To get additional data:")),console.log(u.dim(` cd ${c} && git annex get <path>`))});lt.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",`
|
|
720
720
|
Description:
|
|
721
721
|
Show detailed information about a NEMAR dataset including owner,
|
|
722
722
|
creation date, GitHub repository, and DOI information.
|
|
723
723
|
|
|
724
724
|
Examples:
|
|
725
725
|
$ nemar dataset status nm000104
|
|
726
|
-
$ nemar dataset status nm000104 --json | jq '.concept_doi'`).action(async(e,t)=>{let r=w(`Fetching dataset info for ${e}...`).start(),n;try{n=await gt(e),r.stop()}catch(i){if(r.fail("Dataset not found"),i instanceof q)console.log(u.red(` ${i.message}`));else console.log(u.red(` ${i.message}`));process.exit(1)}if(t.json){console.log(JSON.stringify(n,null,2));return}if(console.log(),console.log(u.bold(`Dataset: ${n.dataset_id}`)),console.log(),console.log(` Name: ${n.name}`),console.log(` Owner: ${n.owner_username}`),console.log(` Status: ${H9e(n.status)}`),n.withdrawn_at){let i=n.withdrawn_reason?` ${u.dim(`- ${n.withdrawn_reason}`)}`:"";console.log(` Withdrawn: ${u.red(new Date(n.withdrawn_at).toLocaleDateString())}${i}`)}if(console.log(` Created: ${new Date(n.created_at).toLocaleDateString()}`),n.description)console.log(` Description: ${n.description}`);if(n.github_repo)console.log(` GitHub: https://github.com/${n.github_repo}`);if(n.concept_doi){let i=`https://doi.org/${n.concept_doi}`;console.log(n.withdrawn_at?` DOI: ${u.dim(i)} ${u.red("(tombstoned)")}`:` DOI: ${i}`)}if(n.data_complete===0)console.log(n.withdrawn_at?` Data: ${u.dim("removed as part of the withdrawal")}`:` Data: ${u.red("incomplete")} ${u.dim("(some files failed to upload; see `nemar admin data-integrity-sweep`)")}`);if(console.log(),n.withdrawn_at)console.log(u.dim("This dataset was withdrawn; its content is no longer available."));else console.log(u.dim("To download this dataset:")),console.log(u.dim(` nemar dataset download ${e}`))});async function z9e(e){if(!XK(e))return e;let t=null;try{t=await wH(e)}catch(n){return console.log(u.dim(`Could not check NEMAR availability: ${n.message}`)),null}if(!t?.found||!t.dataset_id)return null;console.log(),console.log(u.green(`This dataset is available on NEMAR as ${u.bold(t.dataset_id)}`)),console.log(u.dim("NEMAR provides git-annex version tracking and selective file download."));let{useNemarBackend:r}=await X.prompt([{type:"confirm",name:"useNemarBackend",message:`Download from NEMAR (${t.dataset_id}) instead of OpenNeuro?`,default:!0}]);return r?t.dataset_id:null}function H9e(e){switch(e.toLowerCase()){case"published":return u.green(e);case"active":return u.blue(e);case"archived":return u.dim(e);case"pending":return u.yellow(e);default:return e}}function W9e(e,t){let{offset:r,totalCount:n}=t,i=r+1,s=r+e.length,o=n>e.length?`${i}-${s} of ${n}`:`${n}`;console.log(),console.log(u.bold(`Datasets (${o}):`)),console.log();let a=(y)=>y.dataset_id||y.id||"",c=Math.max(10,...e.map((y)=>a(y).length)),l=Math.min(30,Math.max(10,...e.map((y)=>y.name.length))),d=10,f=8,m=Math.max(8,...e.map((y)=>(y.owner_username||"-").length)),p=10,g=["ID".padEnd(c),"Name".padEnd(l),"Modality".padEnd(d),"Subj".padEnd(f),"HED".padEnd(3),"Data".padEnd(p),"Owner".padEnd(m),"Status"].join(" ");console.log(u.dim(g)),console.log(u.dim("-".repeat(g.length)));for(let y of e){let x=a(y),v=y.name.length>l?`${y.name.substring(0,l-3)}...`:y.name,_=(y.modalities||"").substring(0,d),
|
|
726
|
+
$ nemar dataset status nm000104 --json | jq '.concept_doi'`).action(async(e,t)=>{let r=w(`Fetching dataset info for ${e}...`).start(),n;try{n=await gt(e),r.stop()}catch(i){if(r.fail("Dataset not found"),i instanceof q)console.log(u.red(` ${i.message}`));else console.log(u.red(` ${i.message}`));process.exit(1)}if(t.json){console.log(JSON.stringify(n,null,2));return}if(console.log(),console.log(u.bold(`Dataset: ${n.dataset_id}`)),console.log(),console.log(` Name: ${n.name}`),console.log(` Owner: ${n.owner_username}`),console.log(` Status: ${H9e(n.status)}`),n.withdrawn_at){let i=n.withdrawn_reason?` ${u.dim(`- ${n.withdrawn_reason}`)}`:"";console.log(` Withdrawn: ${u.red(new Date(n.withdrawn_at).toLocaleDateString())}${i}`)}if(console.log(` Created: ${new Date(n.created_at).toLocaleDateString()}`),n.description)console.log(` Description: ${n.description}`);if(n.github_repo)console.log(` GitHub: https://github.com/${n.github_repo}`);if(n.concept_doi){let i=`https://doi.org/${n.concept_doi}`;console.log(n.withdrawn_at?` DOI: ${u.dim(i)} ${u.red("(tombstoned)")}`:` DOI: ${i}`)}if(n.data_complete===0)console.log(n.withdrawn_at?` Data: ${u.dim("removed as part of the withdrawal")}`:` Data: ${u.red("incomplete")} ${u.dim("(some files failed to upload; see `nemar admin data-integrity-sweep`)")}`);if(console.log(),n.withdrawn_at)console.log(u.dim("This dataset was withdrawn; its content is no longer available."));else console.log(u.dim("To download this dataset:")),console.log(u.dim(` nemar dataset download ${e}`))});async function z9e(e){if(!XK(e))return e;let t=null;try{t=await wH(e)}catch(n){return console.log(u.dim(`Could not check NEMAR availability: ${n.message}`)),null}if(!t?.found||!t.dataset_id)return null;console.log(),console.log(u.green(`This dataset is available on NEMAR as ${u.bold(t.dataset_id)}`)),console.log(u.dim("NEMAR provides git-annex version tracking and selective file download."));let{useNemarBackend:r}=await X.prompt([{type:"confirm",name:"useNemarBackend",message:`Download from NEMAR (${t.dataset_id}) instead of OpenNeuro?`,default:!0}]);return r?t.dataset_id:null}function H9e(e){switch(e.toLowerCase()){case"published":return u.green(e);case"active":return u.blue(e);case"archived":return u.dim(e);case"pending":return u.yellow(e);default:return e}}function W9e(e,t){let{offset:r,totalCount:n}=t,i=r+1,s=r+e.length,o=n>e.length?`${i}-${s} of ${n}`:`${n}`;console.log(),console.log(u.bold(`Datasets (${o}):`)),console.log();let a=(y)=>y.dataset_id||y.id||"",c=Math.max(10,...e.map((y)=>a(y).length)),l=Math.min(30,Math.max(10,...e.map((y)=>y.name.length))),d=10,f=8,m=Math.max(8,...e.map((y)=>(y.owner_username||"-").length)),p=10,g=["ID".padEnd(c),"Name".padEnd(l),"Modality".padEnd(d),"Subj".padEnd(f),"HED".padEnd(3),"Data".padEnd(p),"Owner".padEnd(m),"Status"].join(" ");console.log(u.dim(g)),console.log(u.dim("-".repeat(g.length)));for(let y of e){let x=a(y),v=y.name.length>l?`${y.name.substring(0,l-3)}...`:y.name,_=(y.modalities||"").substring(0,d),S=y.participants?String(y.participants):"-",C=y.owner_username||"-",D=y.visibility==="public"?u.green("pub"):u.yellow("prv"),O;if(y.source_type==="catalog")O=u.dim(x.padEnd(c));else O=u.cyan(x.padEnd(c));let F=y.source_type==="catalog"?u.dim(v):v,M=[O,F.padEnd(l+(y.source_type==="catalog"?u.dim("").length:0)),_.padEnd(d),S.padEnd(f),y.has_hed===1?u.magenta("HED".padEnd(3)):u.dim("-".padEnd(3)),y.data_complete===0?u.red("incomplete".padEnd(p)):"".padEnd(p),C.padEnd(m),D].join(" ");console.log(M)}if(console.log(),n>s){let y=Math.floor(r/t.limit)+1,x=Math.ceil(n/t.limit);console.log(u.dim(`Page ${y}/${x}. Next: nemar dataset list --page ${y+1}`))}console.log(u.dim(` * = not synced to nemar.org ${u.dim("dim")} = catalog-only (not on GitHub)`)),console.log(u.dim("For details: nemar dataset status <dataset-id>")),console.log(u.dim("Search: nemar dataset search <query>"))}var G9e=35,K9e=8,Y9e=4,HY=10,WY=6,XY=3,wh=2,jw=80;function J9e(e,t){let r=Number.isFinite(t)&&t>0?Math.floor(t):jw,n=Math.max(10,...e.map((l)=>l.id.length)),i=Math.min(G9e,Math.max(10,...e.map((l)=>l.name.length))),s=!0,o=!0,a=!0,c=()=>{let l=n+wh+i;if(s)l+=wh+HY;if(o)l+=wh+WY;if(a)l+=wh+XY;return l};while(c()>r&&i>K9e)i--;if(c()>r&&a)a=!1;if(c()>r&&o)o=!1;if(c()>r&&s)s=!1;while(c()>r&&i>Y9e)i--;return{idWidth:n,nameWidth:i,modWidth:HY,subjWidth:WY,showModality:s,showSubj:o,showHed:a}}function X9e(e,t){let r=J9e(e,t),n=[],i=["ID".padEnd(r.idWidth),"Name".padEnd(r.nameWidth)];if(r.showModality)i.push("Modality".padEnd(r.modWidth));if(r.showSubj)i.push("Subj".padEnd(r.subjWidth));if(r.showHed)i.push("HED".padEnd(XY));let s=i.join(" ");n.push(Wt.muted(s)),n.push(Wt.muted("-".repeat(s.length)));for(let o of e)try{let a=o.name.length>r.nameWidth?`${o.name.substring(0,r.nameWidth-3)}...`:o.name,c=[Wt.id(o.id.padEnd(r.idWidth)),a.padEnd(r.nameWidth)];if(r.showModality)c.push(iY(o.modalities||"-",r.modWidth).padEnd(r.modWidth));if(r.showSubj)c.push((o.participants?String(o.participants):"-").padEnd(r.subjWidth));if(r.showHed)c.push(o.has_hed===1?Wt.metric("HED"):Wt.muted("-"));n.push(c.join(" "));let l=null;try{l=nY(o.snippet)}catch{l=null}if(l)n.push(` ${l}`)}catch{n.push(`${o.id??"?"} ${o.name??"?"}`)}return n}function QY(e){if(!e)return;let t=e.split(",").map((r)=>r.trim().toLowerCase()).filter((r)=>r&&!bw.includes(r));if(t.length>0)console.log(u.red(`Error: invalid license tier(s): ${t.join(", ")}`)),console.log(`Valid tiers: ${bw.join(", ")}`),process.exit(1)}function ZY(e){try{return zK(e)}catch(t){if(t instanceof Cn)console.log(u.red(`Error: ${t.message}`)),console.log(u.dim(VK));else if(t instanceof vh)console.log(u.red(`Error: ${t.message}`));else throw t;process.exit(1)}}var eJ=lt.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("--license <tiers>","Filter by license tier(s), comma-separated: public, attribution, sharealike, noncommercial, noderiv, unknown").option("--doi","Show only datasets with DOIs").option("--hed","Show only datasets with HED annotations").option("--has-zarr","Show only datasets with a ready Zarr copy (#1062)").option("--has-zarr-verified","Show only datasets whose Zarr copy passed fidelity verification (#1068)").option("--complete","Show only datasets verified data-complete (#970)").option("--recent [days]","Show recently published datasets").addOption(new au("--sort <order>","Sort order").choices(["newest","oldest","name","participants","size","citations"]).default("newest")).option("--include-unknown","Include datasets with an unknown value for the active facet filter(s)").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)");$w(eJ);eJ.addHelpText("after",`
|
|
727
727
|
Description:
|
|
728
728
|
Lists the full NEMAR catalog, including legacy datasets from nemar.org
|
|
729
729
|
and datasets managed via nemar-cli. Shows 20 results per page by default.
|
|
@@ -787,13 +787,13 @@ Examples:
|
|
|
787
787
|
$ nemar dataset release nm000104 --type patch
|
|
788
788
|
$ nemar dataset release nm000104 --version 2.0.0
|
|
789
789
|
$ nemar dataset release nm000104 # interactive prompt`).action(async(e,t)=>{rr(),await Bo("release");let r=w("Fetching dataset info...").start(),n;try{n=await gt(e),r.succeed(`Dataset: ${n.name||e}`)}catch(D){if(D instanceof q)r.fail(D.message);else r.fail("Failed to fetch dataset");process.exit(1)}if(!n.github_repo)console.log(u.red("Error: Dataset has no GitHub repository")),process.exit(1);let i;try{let D=await $H(e);if(i=D.current_version.replace(/^v/,""),console.log(` Current version: ${u.cyan(i)}`),D.versions.length>0){console.log(` Version DOIs: ${D.versions.length}`);for(let O of D.versions.slice(0,3))console.log(` ${O.version} - ${u.dim(O.doi)}`);if(D.versions.length>3)console.log(u.dim(` ... and ${D.versions.length-3} more`))}}catch(D){let O=D instanceof q?`${D.statusCode}: ${D.message}`:String(D);console.log(u.red(`Error: Could not fetch version history (${O})`)),console.log(" Cannot determine current version. Ensure the backend is reachable."),process.exit(1)}let s;if(t.version){if(!Aw(t.version))console.log(u.red(`Error: Invalid version: ${t.version}`)),console.log(" Expected format: X.Y.Z (e.g., 2.0.0)"),process.exit(1);s=t.version.replace(/^v/,"")}else if(t.type){let D=t.type;if(!["patch","minor","major"].includes(D))console.log(u.red(`Error: Invalid bump type: ${t.type}`)),console.log(" Expected: patch, minor, or major"),process.exit(1);s=Wo(i,D)}else{if(!tu(i))console.log(u.red(`Error: Cannot parse current version: ${i}`)),process.exit(1);let O=[{name:`patch ${i} -> ${Wo(i,"patch")}`,value:"patch"},{name:`minor ${i} -> ${Wo(i,"minor")}`,value:"minor"},{name:`major ${i} -> ${Wo(i,"major")}`,value:"major"},{name:"custom version",value:"custom"}],{bumpType:F}=await X.prompt([{type:"list",name:"bumpType",message:"Select version bump type:",choices:O}]);if(F==="custom"){let{customVersion:M}=await X.prompt([{type:"input",name:"customVersion",message:"Enter version (X.Y.Z):",validate:(k)=>Aw(k)||"Invalid format. Use X.Y.Z (e.g., 2.0.0)"}]);s=M.replace(/^v/,"")}else s=Wo(i,F)}if(console.log(),console.log(` ${u.bold("Version bump:")} ${i} -> ${u.green(s)}`),await Re(`Create release PR for ${e} v${s}?`,{yes:t.yes})!=="confirmed"){console.log("Cancelled.");return}let a,c=!0;if(t.dir){if(!Or(t.dir))console.log(u.red(`Error: Directory not found: ${t.dir}`)),process.exit(1);a=qi(t.dir),c=!1}else a=M9e(ru(B9e(),`nemar-release-${e}-`));if(c){let D=`https://github.com/${n.github_repo}.git`,O=w("Cloning dataset...").start(),F=await br(D,a);if(!F.success)O.fail(`Clone failed: ${F.error}`),process.exit(1);O.succeed("Cloned dataset")}let l=`release/v${s}`,d=w("Creating release branch...").start(),f=Pt({cmd:["git","checkout","-b",l],cwd:a,stdout:"pipe",stderr:"pipe"});if(await f.exited!==0){let D=await new Response(f.stderr).text();d.fail(`Failed to create branch: ${D.trim()}`),process.exit(1)}d.succeed(`Created branch: ${l}`);let m=ru(a,"dataset_description.json");if(!Or(m))console.log(u.red("Error: dataset_description.json not found in repo")),process.exit(1);let p;try{p=JSON.parse(Eh(m,"utf-8"))}catch(D){if(D instanceof SyntaxError)console.log(u.red("Error: dataset_description.json contains invalid JSON"));else console.log(u.red(`Error: Could not read dataset_description.json: ${D}`));process.exit(1)}p.Version=s,YY(m,`${JSON.stringify(p,null,2)}
|
|
790
|
-
`);let g=w("Committing version bump...").start(),y=Pt({cmd:["git","add","dataset_description.json"],cwd:a,stdout:"pipe",stderr:"pipe"});if(await y.exited!==0){let D=await new Response(y.stderr).text();g.fail(`Failed to stage changes: ${D.trim()}`),process.exit(1)}let x=Pt({cmd:["git","commit","-m",`Bump version to ${s}`],cwd:a,stdout:"pipe",stderr:"pipe"});if(await x.exited!==0){let D=await new Response(x.stderr).text();g.fail(`Commit failed: ${D.trim()}`),process.exit(1)}g.succeed("Committed version bump");let v=w("Pushing branch...").start(),_=await Sd(a,l);if(!_.success)v.fail(`Push failed: ${_.error}`),process.exit(1);v.succeed("Pushed branch");let
|
|
790
|
+
`);let g=w("Committing version bump...").start(),y=Pt({cmd:["git","add","dataset_description.json"],cwd:a,stdout:"pipe",stderr:"pipe"});if(await y.exited!==0){let D=await new Response(y.stderr).text();g.fail(`Failed to stage changes: ${D.trim()}`),process.exit(1)}let x=Pt({cmd:["git","commit","-m",`Bump version to ${s}`],cwd:a,stdout:"pipe",stderr:"pipe"});if(await x.exited!==0){let D=await new Response(x.stderr).text();g.fail(`Commit failed: ${D.trim()}`),process.exit(1)}g.succeed("Committed version bump");let v=w("Pushing branch...").start(),_=await Sd(a,l);if(!_.success)v.fail(`Push failed: ${_.error}`),process.exit(1);v.succeed("Pushed branch");let S=!1,C=w("Creating pull request...").start();try{let D=`Release v${s}`,O=`## Version Bump
|
|
791
791
|
|
|
792
792
|
Bumps ${e} from ${i} to ${s}.
|
|
793
793
|
|
|
794
794
|
On merge, CI will:
|
|
795
795
|
- Tag the release (v${s})
|
|
796
|
-
- Publish a version DOI (if concept DOI exists)`,F=Pt({cmd:["gh","pr","create","--repo",n.github_repo,"--head",l,"--base","main","--title",D,"--body",O],cwd:a,stdout:"pipe",stderr:"pipe"}),M=(await new Response(F.stdout).text()).trim();if(await F.exited!==0){let k=await new Response(F.stderr).text();throw Error(k.trim()||"gh pr create failed")}
|
|
796
|
+
- Publish a version DOI (if concept DOI exists)`,F=Pt({cmd:["gh","pr","create","--repo",n.github_repo,"--head",l,"--base","main","--title",D,"--body",O],cwd:a,stdout:"pipe",stderr:"pipe"}),M=(await new Response(F.stdout).text()).trim();if(await F.exited!==0){let k=await new Response(F.stderr).text();throw Error(k.trim()||"gh pr create failed")}S=!0,C.succeed("Created pull request"),console.log(),console.log(` ${u.cyan("PR:")} ${M}`)}catch(D){C.fail("Failed to create PR");let O=D instanceof Error?D.message:String(D);if(console.log(u.red(` ${O}`)),O.includes("not found")||O.includes("command not found"))console.log(u.yellow(" Install: brew install gh"));else if(O.includes("auth")||O.includes("401"))console.log(u.yellow(" Run: gh auth login"));console.log(u.dim(` Branch ${l} has been pushed. Create the PR manually.`))}if(t.monitor&&S){console.log(),console.log(u.dim("Monitoring CI checks...")),console.log(u.dim(" Press Ctrl+C to stop monitoring"));let D=0,O=60;while(D<O){await new Promise((j)=>setTimeout(j,1e4)),D++;let F=Pt({cmd:["gh","pr","checks","--repo",n.github_repo,l],cwd:a,stdout:"pipe",stderr:"pipe"}),M=await new Response(F.stdout).text();if(await F.exited===0){if(console.log(u.green(" All checks passed!")),await Re("Merge the PR?",{yes:t.yes})==="confirmed"){let Z=Pt({cmd:["gh","pr","merge","--repo",n.github_repo,l,"--squash","--delete-branch"],cwd:a,stdout:"pipe",stderr:"pipe"});if(await Z.exited===0)console.log(u.green(" PR merged successfully!"));else{let qe=await new Response(Z.stderr).text();console.log(u.red(` Merge failed: ${qe.trim()}`))}}break}if(M.includes("fail")||M.includes("X")){console.log(u.red(" Some checks failed:")),console.log(M);break}process.stdout.write(u.dim("."))}if(D>=O)console.log(u.yellow(`
|
|
797
797
|
Timed out waiting for checks.`))}if(c)console.log(),console.log(u.dim(`Working directory: ${a}`)),console.log(u.dim("You can delete this directory after the PR is merged."))});lt.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(Oe,Ae).addHelpText("after",`
|
|
798
798
|
Description:
|
|
799
799
|
Push local changes (metadata or data files) to a dataset via a pull
|
|
@@ -811,7 +811,7 @@ Examples:
|
|
|
811
811
|
$ cd nm000104 && nemar dataset update
|
|
812
812
|
$ nemar dataset update ./nm000104 --bump minor -m "Add new subjects"
|
|
813
813
|
$ nemar dataset update --branch fix/metadata -m "Fix participant ages"`).action(async(e,t)=>{rr(),await Bo("update");let r=qi(e||".");if(!Or(ru(r,".git")))console.log(u.red("Error: Not a git repository")),console.log(" Run this from inside a dataset clone, or pass the path."),process.exit(1);let n=await js(r);if(!n)console.log(u.red("Error: Could not detect dataset ID from git remote")),process.exit(1);console.log(` Dataset: ${u.cyan(n)}`);let i=await ni(r);if(i!=="main"){if(console.log(u.yellow(`Warning: Currently on branch '${i}', expected 'main'`)),await Re("Continue anyway?",{yes:t.yes})!=="confirmed"){console.log("Cancelled.");return}}let s=Pt({cmd:["git","status","--porcelain"],cwd:r,stdout:"pipe",stderr:"pipe"}),o=(await new Response(s.stdout).text()).trim();if(await s.exited!==0)console.log(u.red("Error: Failed to check git status")),process.exit(1);if(!o){console.log(u.yellow("No changes detected.")),console.log(" Make changes to the dataset files, then run this command again.");return}let a=o.split(`
|
|
814
|
-
`),c=[],l=[];for(let T of a){let B=T.substring(3).trim();if(/\.(edf|bdf|set|fdt|nwb|eeg|vhdr|vmrk|cnt|mff|gz)$/i.test(B))c.push(B);else l.push(B)}if(console.log(),l.length>0){console.log(` ${u.bold("Metadata files:")} ${l.length}`);for(let T of l.slice(0,5))console.log(` ${T}`);if(l.length>5)console.log(u.dim(` ... and ${l.length-5} more`))}if(c.length>0){console.log(` ${u.bold("Data files:")} ${c.length}`);for(let T of c.slice(0,5))console.log(` ${T}`);if(c.length>5)console.log(u.dim(` ... and ${c.length-5} more`))}let d=w("Fetching dataset info...").start(),f;try{f=await gt(n),d.succeed()}catch(T){if(T instanceof q)d.fail(T.message);else d.fail("Failed to fetch dataset");process.exit(1)}if(!f.github_repo)console.log(u.red("Error: Dataset has no GitHub repository")),process.exit(1);let m,p=ru(r,"dataset_description.json");if(!Or(p))console.log(u.red("Error: dataset_description.json not found")),console.log(" This file is required for BIDS datasets."),process.exit(1);try{let T=JSON.parse(Eh(p,"utf-8"));if(typeof T.Version!=="string"||!T.Version)console.log(u.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);m=T.Version}catch(T){if(T instanceof SyntaxError)console.log(u.red("Error: dataset_description.json contains invalid JSON"));else console.log(u.red(`Error: Could not read dataset_description.json: ${T}`));process.exit(1)}let g=t.bump;if(!["patch","minor","major"].includes(g))console.log(u.red(`Error: Invalid bump type: ${t.bump}`)),process.exit(1);let y=Wo(m,g);if(console.log(` ${u.bold("Version bump:")} ${m} -> ${u.green(y)}`),await Re(`Create update PR for ${n}?`,{yes:t.yes})!=="confirmed"){console.log("Cancelled.");return}let v=Date.now().toString(36),_=t.branch||`update/${n}-${v}`,
|
|
814
|
+
`),c=[],l=[];for(let T of a){let B=T.substring(3).trim();if(/\.(edf|bdf|set|fdt|nwb|eeg|vhdr|vmrk|cnt|mff|gz)$/i.test(B))c.push(B);else l.push(B)}if(console.log(),l.length>0){console.log(` ${u.bold("Metadata files:")} ${l.length}`);for(let T of l.slice(0,5))console.log(` ${T}`);if(l.length>5)console.log(u.dim(` ... and ${l.length-5} more`))}if(c.length>0){console.log(` ${u.bold("Data files:")} ${c.length}`);for(let T of c.slice(0,5))console.log(` ${T}`);if(c.length>5)console.log(u.dim(` ... and ${c.length-5} more`))}let d=w("Fetching dataset info...").start(),f;try{f=await gt(n),d.succeed()}catch(T){if(T instanceof q)d.fail(T.message);else d.fail("Failed to fetch dataset");process.exit(1)}if(!f.github_repo)console.log(u.red("Error: Dataset has no GitHub repository")),process.exit(1);let m,p=ru(r,"dataset_description.json");if(!Or(p))console.log(u.red("Error: dataset_description.json not found")),console.log(" This file is required for BIDS datasets."),process.exit(1);try{let T=JSON.parse(Eh(p,"utf-8"));if(typeof T.Version!=="string"||!T.Version)console.log(u.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);m=T.Version}catch(T){if(T instanceof SyntaxError)console.log(u.red("Error: dataset_description.json contains invalid JSON"));else console.log(u.red(`Error: Could not read dataset_description.json: ${T}`));process.exit(1)}let g=t.bump;if(!["patch","minor","major"].includes(g))console.log(u.red(`Error: Invalid bump type: ${t.bump}`)),process.exit(1);let y=Wo(m,g);if(console.log(` ${u.bold("Version bump:")} ${m} -> ${u.green(y)}`),await Re(`Create update PR for ${n}?`,{yes:t.yes})!=="confirmed"){console.log("Cancelled.");return}let v=Date.now().toString(36),_=t.branch||`update/${n}-${v}`,S=w("Creating update branch...").start(),C=Pt({cmd:["git","checkout","-b",_],cwd:r,stdout:"pipe",stderr:"pipe"});if(await C.exited!==0){let T=await new Response(C.stderr).text();S.fail(`Failed to create branch: ${T.trim()}`),process.exit(1)}S.succeed(`Created branch: ${_}`);let D=ru(r,"dataset_description.json"),O;try{O=JSON.parse(Eh(D,"utf-8"))}catch(T){if(T instanceof SyntaxError)console.log(u.red("Error: dataset_description.json contains invalid JSON"));else console.log(u.red(`Error: Could not read dataset_description.json: ${T}`));process.exit(1)}O.Version=y,YY(D,`${JSON.stringify(O,null,2)}
|
|
815
815
|
`);let F=w("Committing changes...").start(),M=Pt({cmd:["git","add","-A"],cwd:r,stdout:"pipe",stderr:"pipe"});if(await M.exited!==0){let T=await new Response(M.stderr).text();F.fail(`Failed to stage changes: ${T.trim()}`),process.exit(1)}let k=t.message||`Update ${n} to ${y}`,j=Pt({cmd:["git","commit","-m",k],cwd:r,stdout:"pipe",stderr:"pipe"});if(await j.exited!==0){let T=await new Response(j.stderr).text();F.fail(`Commit failed: ${T.trim()}`),process.exit(1)}if(F.succeed("Committed changes"),c.length>0)if(await Pt({cmd:["git","annex","version"],cwd:r,stdout:"pipe",stderr:"pipe"}).exited===0){let B=w("Requesting upload credentials...").start(),Ne=null;try{Ne=await ti(n),B.succeed("Upload credentials received")}catch(Ve){B.fail(`Could not get upload credentials: ${V(Ve)}`),console.log(u.yellow(" Data files will not be uploaded. Push manually after PR."))}if(Ne){if((await Ym(r)).length===0){B=w("Configuring S3 remote...").start();let yt=await Cr(r,{name:"nemar-s3",bucket:Ne.s3.bucket,prefix:`${n}/objects`,region:Ne.s3.region,publicUrl:`https://${Ne.s3.bucket}.s3.${Ne.s3.region}.amazonaws.com`},Vt(Ne.credentials));if(!yt.success)B.warn(`Failed to configure S3 remote: ${yt.error}`),console.log(u.yellow(" Data files will not be uploaded. Push manually after PR."));else B.succeed("S3 remote configured")}if((await Ym(r)).includes("nemar-s3")){B=w("Uploading data files to S3...").start();let yt=await ii(r,"nemar-s3",4,Vt(Ne.credentials));if(await zt(r),!yt.success)B.warn(`S3 upload issue: ${yt.error}`),console.log(u.yellow(" Data files may need manual upload after PR creation."));else B.succeed(`Uploaded ${yt.filesCopied} data files to S3`)}}}else console.log(u.yellow(" git-annex not available; data files will be committed to git."));let Z=w("Pushing branch...").start(),_e=await Sd(r,_);if(!_e.success)Z.fail(`Push failed: ${_e.error}`),process.exit(1);if(c.length>0){if(await Pt({cmd:["git","push","origin","git-annex"],cwd:r,stdout:"pipe",stderr:"pipe"}).exited!==0)console.log(u.yellow(" Warning: Failed to push git-annex branch"))}Z.succeed("Pushed branch");let qe=!1,Me=w("Creating pull request...").start();try{let T=t.message?`${t.message} (v${y})`:`Update ${n} to v${y}`,B=[...l,...c].slice(0,10).join(`
|
|
816
816
|
- `),Ne=`## Dataset Update
|
|
817
817
|
|
|
@@ -1086,7 +1086,7 @@ Examples:
|
|
|
1086
1086
|
$ nemar sandbox --verbose # Run with full subprocess output (debug stuck runs)
|
|
1087
1087
|
$ nemar sandbox status # Check if training is completed
|
|
1088
1088
|
$ nemar sandbox reset # Reset for re-training
|
|
1089
|
-
`).action(i7e);async function i7e(e={}){if(e.verbose)HH(!0);if(console.log(),console.log(u.bold("NEMAR Sandbox Training")),console.log(u.dim("Verify your setup and learn the upload workflow")),e.verbose)console.log(u.dim("Verbose mode: subprocess invocations will be printed"));if(console.log(),!Ue()){console.log(u.red("Not authenticated")),console.log(u.dim("Run 'nemar auth login' first"));return}let t=ht();if(t.sandboxCompleted){console.log(u.green("Sandbox training already completed!")),console.log(u.dim(`Dataset ID: ${t.sandboxDatasetId}`)),console.log(),console.log("You can upload real datasets with:"),console.log(u.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(u.dim("To re-run training, use: nemar sandbox reset"));return}console.log(u.bold("Step 1/6: Checking prerequisites..."));let r=w("Checking prerequisites...").start(),n=await Um();if(!n.allPassed){r.fail("Prerequisites check failed"),console.log(),console.log(u.red("Missing requirements:"));for(let T of n.errors)console.log(u.yellow(` - ${T}`));if(n.errors.some((T)=>T.includes("GitHub")))console.log(u.dim(" Run 'gh auth login' to authenticate with GitHub"));return}r.succeed("All prerequisites met");let i=w("Verifying GitHub CLI authentication...").start(),s=await jm(t.githubUsername);if(!s.authenticated){i.fail("GitHub CLI not authenticated"),console.log(u.red(` ${s.error}`)),console.log(),console.log("GitHub CLI is required for sandbox training. Install and authenticate:"),console.log(u.cyan(" brew install gh # or visit https://cli.github.com/")),console.log(u.cyan(" gh auth login"));return}if(t.githubUsername&&!s.matches)i.warn("GitHub CLI user mismatch"),console.log(u.yellow(` ${s.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(u.cyan(` gh auth login # Login as ${t.githubUsername}`)),console.log(),console.log(u.yellow("WARNING: If upload fails with permission errors, this mismatch is the likely cause.")),console.log();else i.succeed(`GitHub CLI authenticated as ${s.username}`);console.log(),console.log(u.bold("Step 2/6: Generating test dataset..."));let o=w("Creating minimal BIDS structure...").start(),a;try{let T=iJ();a=T.root;let B=sJ(T);o.succeed(`Test dataset created (${et(B)})`),console.log(u.dim(` Location: ${a}`))}catch(T){o.fail("Failed to generate test dataset"),console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`));return}console.log(),console.log(u.bold("Step 3/6: Registering sandbox dataset..."));let c=w("Creating dataset on NEMAR...").start(),l,d,f,m,p;try{let T=await Nm({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,attestation:TK});l=T.dataset.dataset_id,d=T.dataset.ssh_url,f=T.dataset.github_url,m=T.s3_config,p=T.dataset.s3_prefix,c.succeed(`Sandbox dataset created: ${u.cyan(l)}`),console.log(u.dim(` GitHub: ${f}`)),await new Promise((B)=>setTimeout(B,1e4))}catch(T){if(c.fail("Failed to create sandbox dataset"),T instanceof q)console.log(u.red(` ${T.message}`));else console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`));Fn(a);return}let g=w("Accepting GitHub repository invitation...").start(),y=f?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/),x=y?y[1].replace(/\.git$/,""):null;if(!x){g.fail("Invalid GitHub repository URL from backend"),console.log(u.red(` Received: ${f||"(empty)"}`)),console.log(u.red(" Expected format: https://github.com/owner/repo")),console.log(),console.log("This may indicate a backend issue. Please contact support."),Fn(a);return}let v=await Mm(x);if(v.accepted)if(v.alreadyCollaborator)g.succeed("Already a collaborator on this repository");else g.succeed("GitHub invitation accepted");else g.warn("Could not auto-accept invitation"),console.log(u.yellow(` ${v.error}`)),console.log(),console.log("You may need to accept the invitation manually:"),console.log(u.cyan(` https://github.com/${x}/invitations`)),console.log();console.log(),console.log(u.bold("Step 4/6: Initializing repository..."));let _=w("Setting up git-annex...").start(),E=t.username&&t.email?{name:t.username,email:t.email}:void 0;try{let T=await Jc(a,{author:E});if(!T.success)throw Error(T.error||"Failed to initialize dataset");await Xc(a),await ri(a,d),_.succeed("Repository initialized")}catch(T){_.fail("Failed to initialize repository"),console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`)),Fn(a);return}console.log(),console.log(u.bold("Step 5/6: Uploading to S3..."));let C=w("Requesting upload credentials...").start(),D;try{D=await ti(l),C.succeed("Upload credentials received")}catch(T){C.fail("Could not get upload credentials"),console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`)),Fn(a);return}let O=Vt(D.credentials),F=w("Configuring S3 remote...").start(),M=await Cr(a,{name:"nemar-s3",bucket:D.s3.bucket,prefix:`${p}/objects`,region:D.s3.region,publicUrl:m.public_url},O);if(!M.success){F.fail("Failed to configure S3 remote"),console.log(u.red(` ${M.error}`)),console.log(u.dim(" Re-run with --verbose to see git-annex output.")),Fn(a);return}F.succeed("S3 remote configured");let k=w("Tracking data files with git-annex...").start(),j=await qo(a);if(!j.success){k.fail("Failed to track data files"),console.log(u.red(` ${j.error}`)),console.log(u.dim(" Re-run with --verbose to see git-annex output.")),Fn(a);return}k.succeed("Data files tracked by git-annex");let Z=w("Uploading data files to S3...").start(),_e=await ii(a,"nemar-s3",4,O);if(await zt(a),!_e.success){Z.fail("S3 upload failed"),console.log(u.red(` ${_e.error}`)),console.log(u.dim(" Re-run with --verbose to see git-annex output.")),Fn(a);return}Z.succeed(`Uploaded ${_e.filesCopied} data file(s) to S3`),console.log(),console.log(u.bold("Step 6/6: Pushing to GitHub..."));let qe=w("Saving and pushing...").start();try{await Ii(a,"Initial sandbox training upload",E),await tr(a),qe.succeed("Pushed to GitHub")}catch(T){qe.fail("Failed to push to GitHub"),console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`)),Fn(a);return}let Me=w("Finalizing...").start();try{await qm(l),await fK(l),En("sandboxCompleted",!0),En("sandboxDatasetId",l),Me.succeed("Sandbox training complete!")}catch(T){Me.fail("Failed to finalize"),console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`)),Fn(a);return}Fn(a),console.log(),console.log(u.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(u.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(u.dim(`Sandbox dataset: ${l}`))}Ch.command("status").description("Check sandbox training completion status").option("--refresh","Fetch latest status from server").action(async(e)=>{if(!Ue()){console.log(u.red("Not authenticated")),console.log(u.dim("Run 'nemar auth login' first"));return}if(e.refresh){let t=w("Checking status...").start();try{let r=await mK();if(En("sandboxCompleted",r.sandbox_completed),r.sandbox_dataset_id)En("sandboxDatasetId",r.sandbox_dataset_id);if(t.stop(),r.sandbox_completed){if(console.log(u.green("Sandbox training: Completed")),console.log(u.dim(` Dataset ID: ${r.sandbox_dataset_id}`)),r.sandbox_completed_at)console.log(u.dim(` Completed: ${r.sandbox_completed_at}`))}else console.log(u.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(u.cyan(" nemar sandbox"))}catch(r){if(t.fail("Failed to check status"),r instanceof q)console.log(u.red(` ${r.message}`))}}else{let t=ht();if(t.sandboxCompleted)console.log(u.green("Sandbox training: Completed")),console.log(u.dim(` Dataset ID: ${t.sandboxDatasetId}`));else console.log(u.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(u.cyan(" nemar sandbox"))}});Ch.command("reset").description("Reset sandbox training status for re-training").option(Oe,Ae).option(je,Te).action(async(e)=>{if(!Ue()){console.log(u.red("Not authenticated")),console.log(u.dim("Run 'nemar auth login' first"));return}if(!ht().sandboxCompleted){console.log(u.yellow("Sandbox training not yet completed")),console.log(u.dim("Nothing to reset"));return}let r=await Re("Reset sandbox training status? You will need to complete training again.",e);if(r!=="confirmed"){console.log(u.dim(r==="declined"?"Skipped":"Cancelled"));return}let n=w("Resetting sandbox status...").start();try{await pK(),rD("sandboxCompleted"),rD("sandboxDatasetId"),n.succeed("Sandbox status reset"),console.log(),console.log("Run sandbox training again with:"),console.log(u.cyan(" nemar sandbox"))}catch(i){if(n.fail("Failed to reset"),i instanceof q)console.log(u.red(` ${i.message}`));else console.log(u.red(` ${i instanceof Error?i.message:"Unknown error"}`))}});Ns();er();var aJ={Default:0,NoFileComp:4},s7e={"--task":"task","--modality":"modality","--license":"license","--bids-version":"bids-version","--hed-version":"hed-version","--electrode-system":"electrode-system"};function o7e(e){let t=s7e[e];if(!t)return;let r=FK();if(!r)return;if(t==="task")return r.task?.values.map((i)=>i.value);return r[t]?.map((i)=>i.value)}function a7e(e){return Ho.find((t)=>t.flag===e)?.enumValues}function Mw(e){if(e.argChoices&&e.argChoices.length>0)return[...e.argChoices];let t=e.long??e.short;if(!t)return[];let r=o7e(t);if(r&&r.length>0)return r;let n=a7e(t);if(n)return[...n];return[]}function Bw(e){return e.required||e.optional}function c7e(e,t){return e.commands.find((r)=>r.name()===t||r.aliases().includes(t))}function Lw(e,t){return e.options.find((r)=>r.short===t||r.long===t)}function u7e(e){return Boolean(e._hidden)}function l7e(e){let t=[];for(let r of e.commands){if(u7e(r))continue;t.push(r.name(),...r.aliases())}return t}function oJ(e){let t=[];for(let r of e.options){if(r.long)t.push(r.long);if(r.short)t.push(r.short)}return t}function nu(e,t){if(!t)return e;return e.filter((r)=>r.startsWith(t))}var d7e=/^(--[A-Za-z0-9][A-Za-z0-9-]*)=(.*)$/;function cJ(e,t){let r=t.length>0?t[t.length-1]:"",n=t.length>0?t.slice(0,-1):[],i=e,s=0;while(s<n.length){let a=c7e(i,n[s]);if(!a)break;i=a,s++}let o=r.match(d7e);if(o){let[,a,c]=o,l=Lw(i,a);if(!l||!Bw(l))return[];return nu(Mw(l),c).map((d)=>`${a}=${d}`)}if(n.length>s){let a=n[n.length-1],c=Lw(i,a);if(c&&Bw(c))return nu(Mw(c),r);if(a==="="&&n.length>=2){let l=Lw(i,n[n.length-2]);if(l&&Bw(l))return nu(Mw(l),r)}}if(r.startsWith("-"))return nu(oJ(i),r);if(s===n.length)return nu(l7e(i),r);return nu(oJ(i),r)}var f7e=/[\u0000-\u001f\u007f]/;async function uJ(e,t){let r=t[0]==="--"?t.slice(1):t,n=[];try{n=cJ(e,r)}catch(i){if(process.env.VERBOSE)process.stderr.write(`[completion] candidate lookup failed: ${i instanceof Error?i.message:i}
|
|
1089
|
+
`).action(i7e);async function i7e(e={}){if(e.verbose)HH(!0);if(console.log(),console.log(u.bold("NEMAR Sandbox Training")),console.log(u.dim("Verify your setup and learn the upload workflow")),e.verbose)console.log(u.dim("Verbose mode: subprocess invocations will be printed"));if(console.log(),!Ue()){console.log(u.red("Not authenticated")),console.log(u.dim("Run 'nemar auth login' first"));return}let t=ht();if(t.sandboxCompleted){console.log(u.green("Sandbox training already completed!")),console.log(u.dim(`Dataset ID: ${t.sandboxDatasetId}`)),console.log(),console.log("You can upload real datasets with:"),console.log(u.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(u.dim("To re-run training, use: nemar sandbox reset"));return}console.log(u.bold("Step 1/6: Checking prerequisites..."));let r=w("Checking prerequisites...").start(),n=await Um();if(!n.allPassed){r.fail("Prerequisites check failed"),console.log(),console.log(u.red("Missing requirements:"));for(let T of n.errors)console.log(u.yellow(` - ${T}`));if(n.errors.some((T)=>T.includes("GitHub")))console.log(u.dim(" Run 'gh auth login' to authenticate with GitHub"));return}r.succeed("All prerequisites met");let i=w("Verifying GitHub CLI authentication...").start(),s=await jm(t.githubUsername);if(!s.authenticated){i.fail("GitHub CLI not authenticated"),console.log(u.red(` ${s.error}`)),console.log(),console.log("GitHub CLI is required for sandbox training. Install and authenticate:"),console.log(u.cyan(" brew install gh # or visit https://cli.github.com/")),console.log(u.cyan(" gh auth login"));return}if(t.githubUsername&&!s.matches)i.warn("GitHub CLI user mismatch"),console.log(u.yellow(` ${s.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(u.cyan(` gh auth login # Login as ${t.githubUsername}`)),console.log(),console.log(u.yellow("WARNING: If upload fails with permission errors, this mismatch is the likely cause.")),console.log();else i.succeed(`GitHub CLI authenticated as ${s.username}`);console.log(),console.log(u.bold("Step 2/6: Generating test dataset..."));let o=w("Creating minimal BIDS structure...").start(),a;try{let T=iJ();a=T.root;let B=sJ(T);o.succeed(`Test dataset created (${et(B)})`),console.log(u.dim(` Location: ${a}`))}catch(T){o.fail("Failed to generate test dataset"),console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`));return}console.log(),console.log(u.bold("Step 3/6: Registering sandbox dataset..."));let c=w("Creating dataset on NEMAR...").start(),l,d,f,m,p;try{let T=await Nm({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,attestation:TK});l=T.dataset.dataset_id,d=T.dataset.ssh_url,f=T.dataset.github_url,m=T.s3_config,p=T.dataset.s3_prefix,c.succeed(`Sandbox dataset created: ${u.cyan(l)}`),console.log(u.dim(` GitHub: ${f}`)),await new Promise((B)=>setTimeout(B,1e4))}catch(T){if(c.fail("Failed to create sandbox dataset"),T instanceof q)console.log(u.red(` ${T.message}`));else console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`));Fn(a);return}let g=w("Accepting GitHub repository invitation...").start(),y=f?.match(/github\.com\/([a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+)/),x=y?y[1].replace(/\.git$/,""):null;if(!x){g.fail("Invalid GitHub repository URL from backend"),console.log(u.red(` Received: ${f||"(empty)"}`)),console.log(u.red(" Expected format: https://github.com/owner/repo")),console.log(),console.log("This may indicate a backend issue. Please contact support."),Fn(a);return}let v=await Mm(x);if(v.accepted)if(v.alreadyCollaborator)g.succeed("Already a collaborator on this repository");else g.succeed("GitHub invitation accepted");else g.warn("Could not auto-accept invitation"),console.log(u.yellow(` ${v.error}`)),console.log(),console.log("You may need to accept the invitation manually:"),console.log(u.cyan(` https://github.com/${x}/invitations`)),console.log();console.log(),console.log(u.bold("Step 4/6: Initializing repository..."));let _=w("Setting up git-annex...").start(),S=t.username&&t.email?{name:t.username,email:t.email}:void 0;try{let T=await Jc(a,{author:S});if(!T.success)throw Error(T.error||"Failed to initialize dataset");await Xc(a),await ri(a,d),_.succeed("Repository initialized")}catch(T){_.fail("Failed to initialize repository"),console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`)),Fn(a);return}console.log(),console.log(u.bold("Step 5/6: Uploading to S3..."));let C=w("Requesting upload credentials...").start(),D;try{D=await ti(l),C.succeed("Upload credentials received")}catch(T){C.fail("Could not get upload credentials"),console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`)),Fn(a);return}let O=Vt(D.credentials),F=w("Configuring S3 remote...").start(),M=await Cr(a,{name:"nemar-s3",bucket:D.s3.bucket,prefix:`${p}/objects`,region:D.s3.region,publicUrl:m.public_url},O);if(!M.success){F.fail("Failed to configure S3 remote"),console.log(u.red(` ${M.error}`)),console.log(u.dim(" Re-run with --verbose to see git-annex output.")),Fn(a);return}F.succeed("S3 remote configured");let k=w("Tracking data files with git-annex...").start(),j=await qo(a);if(!j.success){k.fail("Failed to track data files"),console.log(u.red(` ${j.error}`)),console.log(u.dim(" Re-run with --verbose to see git-annex output.")),Fn(a);return}k.succeed("Data files tracked by git-annex");let Z=w("Uploading data files to S3...").start(),_e=await ii(a,"nemar-s3",4,O);if(await zt(a),!_e.success){Z.fail("S3 upload failed"),console.log(u.red(` ${_e.error}`)),console.log(u.dim(" Re-run with --verbose to see git-annex output.")),Fn(a);return}Z.succeed(`Uploaded ${_e.filesCopied} data file(s) to S3`),console.log(),console.log(u.bold("Step 6/6: Pushing to GitHub..."));let qe=w("Saving and pushing...").start();try{await Ii(a,"Initial sandbox training upload",S),await tr(a),qe.succeed("Pushed to GitHub")}catch(T){qe.fail("Failed to push to GitHub"),console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`)),Fn(a);return}let Me=w("Finalizing...").start();try{await qm(l),await fK(l),En("sandboxCompleted",!0),En("sandboxDatasetId",l),Me.succeed("Sandbox training complete!")}catch(T){Me.fail("Failed to finalize"),console.log(u.red(` ${T instanceof Error?T.message:"Unknown error"}`)),Fn(a);return}Fn(a),console.log(),console.log(u.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(u.cyan(" nemar dataset upload ./your-dataset")),console.log(),console.log(u.dim(`Sandbox dataset: ${l}`))}Ch.command("status").description("Check sandbox training completion status").option("--refresh","Fetch latest status from server").action(async(e)=>{if(!Ue()){console.log(u.red("Not authenticated")),console.log(u.dim("Run 'nemar auth login' first"));return}if(e.refresh){let t=w("Checking status...").start();try{let r=await mK();if(En("sandboxCompleted",r.sandbox_completed),r.sandbox_dataset_id)En("sandboxDatasetId",r.sandbox_dataset_id);if(t.stop(),r.sandbox_completed){if(console.log(u.green("Sandbox training: Completed")),console.log(u.dim(` Dataset ID: ${r.sandbox_dataset_id}`)),r.sandbox_completed_at)console.log(u.dim(` Completed: ${r.sandbox_completed_at}`))}else console.log(u.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(u.cyan(" nemar sandbox"))}catch(r){if(t.fail("Failed to check status"),r instanceof q)console.log(u.red(` ${r.message}`))}}else{let t=ht();if(t.sandboxCompleted)console.log(u.green("Sandbox training: Completed")),console.log(u.dim(` Dataset ID: ${t.sandboxDatasetId}`));else console.log(u.yellow("Sandbox training: Not completed")),console.log(),console.log("Run sandbox training with:"),console.log(u.cyan(" nemar sandbox"))}});Ch.command("reset").description("Reset sandbox training status for re-training").option(Oe,Ae).option(je,Te).action(async(e)=>{if(!Ue()){console.log(u.red("Not authenticated")),console.log(u.dim("Run 'nemar auth login' first"));return}if(!ht().sandboxCompleted){console.log(u.yellow("Sandbox training not yet completed")),console.log(u.dim("Nothing to reset"));return}let r=await Re("Reset sandbox training status? You will need to complete training again.",e);if(r!=="confirmed"){console.log(u.dim(r==="declined"?"Skipped":"Cancelled"));return}let n=w("Resetting sandbox status...").start();try{await pK(),rD("sandboxCompleted"),rD("sandboxDatasetId"),n.succeed("Sandbox status reset"),console.log(),console.log("Run sandbox training again with:"),console.log(u.cyan(" nemar sandbox"))}catch(i){if(n.fail("Failed to reset"),i instanceof q)console.log(u.red(` ${i.message}`));else console.log(u.red(` ${i instanceof Error?i.message:"Unknown error"}`))}});Ns();er();var aJ={Default:0,NoFileComp:4},s7e={"--task":"task","--modality":"modality","--license":"license","--bids-version":"bids-version","--hed-version":"hed-version","--electrode-system":"electrode-system"};function o7e(e){let t=s7e[e];if(!t)return;let r=FK();if(!r)return;if(t==="task")return r.task?.values.map((i)=>i.value);return r[t]?.map((i)=>i.value)}function a7e(e){return Ho.find((t)=>t.flag===e)?.enumValues}function Mw(e){if(e.argChoices&&e.argChoices.length>0)return[...e.argChoices];let t=e.long??e.short;if(!t)return[];let r=o7e(t);if(r&&r.length>0)return r;let n=a7e(t);if(n)return[...n];return[]}function Bw(e){return e.required||e.optional}function c7e(e,t){return e.commands.find((r)=>r.name()===t||r.aliases().includes(t))}function Lw(e,t){return e.options.find((r)=>r.short===t||r.long===t)}function u7e(e){return Boolean(e._hidden)}function l7e(e){let t=[];for(let r of e.commands){if(u7e(r))continue;t.push(r.name(),...r.aliases())}return t}function oJ(e){let t=[];for(let r of e.options){if(r.long)t.push(r.long);if(r.short)t.push(r.short)}return t}function nu(e,t){if(!t)return e;return e.filter((r)=>r.startsWith(t))}var d7e=/^(--[A-Za-z0-9][A-Za-z0-9-]*)=(.*)$/;function cJ(e,t){let r=t.length>0?t[t.length-1]:"",n=t.length>0?t.slice(0,-1):[],i=e,s=0;while(s<n.length){let a=c7e(i,n[s]);if(!a)break;i=a,s++}let o=r.match(d7e);if(o){let[,a,c]=o,l=Lw(i,a);if(!l||!Bw(l))return[];return nu(Mw(l),c).map((d)=>`${a}=${d}`)}if(n.length>s){let a=n[n.length-1],c=Lw(i,a);if(c&&Bw(c))return nu(Mw(c),r);if(a==="="&&n.length>=2){let l=Lw(i,n[n.length-2]);if(l&&Bw(l))return nu(Mw(l),r)}}if(r.startsWith("-"))return nu(oJ(i),r);if(s===n.length)return nu(l7e(i),r);return nu(oJ(i),r)}var f7e=/[\u0000-\u001f\u007f]/;async function uJ(e,t){let r=t[0]==="--"?t.slice(1):t,n=[];try{n=cJ(e,r)}catch(i){if(process.env.VERBOSE)process.stderr.write(`[completion] candidate lookup failed: ${i instanceof Error?i.message:i}
|
|
1090
1090
|
`);n=[]}for(let i of n){if(f7e.test(i))continue;process.stdout.write(`${i}
|
|
1091
1091
|
`)}process.stdout.write(`:${aJ.NoFileComp}
|
|
1092
1092
|
`)}nD();He();Ts();var lJ=100;async function dJ(){try{let{notices:e}=await PH();if(!e||e.length===0)return;let t=ht(),r=new Set(t.dismissedNoticeIds||[]),n=e.filter((i)=>!r.has(i.id));if(n.length===0)return;for(let i of n)p7e(i);if(Ue()){let i=["tip","announcement"],s=n.filter((o)=>i.includes(o.level)).map((o)=>o.id);if(s.length>0)m7e(s)}}catch(e){if(process.env.VERBOSE)process.stderr.write(`[notices] ${e instanceof Error?e.message:e}
|